GraffitiPersonalData: {
    __isFragment?: never;
    __isSuspense?: never;
    __isTeleport?: never;
    new (
        ...args: any[],
    ): CreateComponentPublicInstanceWithMixins<
        Readonly<
            {
                autosave?: boolean;
                modelValue: {};
                name: string;
                public?: boolean;
                session: GraffitiSession;
            },
        > & Readonly<{ "onUpdate:modelValue"?: (value: {}) => any }>,
        {},
        {},
        {},
        {},
        ComponentOptionsMixin,
        ComponentOptionsMixin,
        { "update:modelValue": (value: {}) => any },
        PublicProps,
        { autosave: boolean; public: boolean },
        false,
        {},
        {},
        GlobalComponents,
        GlobalDirectives,
        string,
        {},
        any,
        ComponentProvideOptions,
        { B: {}; C: {}; D: {}; Defaults: {}; M: {}; P: {} },
        Readonly<
            {
                autosave?: boolean;
                modelValue: {};
                name: string;
                public?: boolean;
                session: GraffitiSession;
            },
        > & Readonly<{ "onUpdate:modelValue"?: (value: {}) => any }>,
        {},
        {},
        {},
        {},
        { autosave: boolean; public: boolean },
    >;
} & ComponentOptionsBase & VNodeProps & AllowedComponentProps & ComponentCustomProps & new () => {
    $slots: {
        default(
            _: {
                isPolling: boolean;
                isSaving: boolean;
                poll: () => Promise<void>;
                save: () => Promise<void>;
            },
        ): any;
    };
}

Graffiti Personal Data Vue Component

A Vue component for reading and writing personal information using the Graffiti API. Inspired by the madata Vue component.

The component takes the following props:

  • v-model: A two-way binding to the personal data value.
  • name (string): The name of the personal data to read or write. Similar to a file name: different names refer to different personal data.
  • session: A Graffiti Session object from a successful login. This component can't be used while logged out.
  • autosave (boolean, optional): Whether to automatically save changes to the personal data. Default is false.
  • public (boolean, optional): Whether the personal data is publicly available. Default is false.

It exposes the following slots:

  • save (()=> Promise): A function to save the personal data.
  • isSaving (Ref): A reactive signal for whether the personal data is currently being saved.
  • poll (()=> Promise): A function to poll the personal data.
  • isPolling (Ref): A reactive signal for whether the personal data is currently being polled.

See a live example or the example's source code.