import { PropertyValues } from 'lit'; import { WeavyComponentSettingsType, WeavyComponentSettings } from '../contexts/settings-context'; import { ComponentFeaturePolicy } from '../contexts/features-context'; import { AppTypeString, AppTypeGuid, LinkType, AgentAppTypeGuidMapping, AgentAppTypeStringMapping } from '../types/app.types'; import { WyLinkEventType, WyNotificationEventType } from '../types/notifications.events'; import { ContextDataBlobsType, ContextDataType } from '../types/context.types'; import { AnnotationsAppearanceType } from '../types/msg.types'; import { EnterToSend } from '../types/editor.types'; import { WeavyComponent } from './weavy-component'; import { WeavyTypeComponentContextProps, WeavyComponentSettingProps, WeavyComponentContextProps } from '../types/component.types'; /** * Base class for exposed/public weavy components. This class provides common external properties and internal data provided as contexts for sub components. */ export declare class WeavyTypeComponent extends WeavyComponent implements WeavyComponentContextProps, WeavyTypeComponentContextProps, WeavyComponentSettingProps { #private; constructor(); /** * Uploaded context data blob ids. * @internal * * @type {ContextDataBlobsType | undefined} */ contextDataBlobs: ContextDataBlobsType | undefined; /** * Policy for checking which features are available. * @internal * * @type {ComponentFeaturePolicy | undefined} */ componentFeatures: ComponentFeaturePolicy | undefined; /** * The weavy component settings provided as a context on the component. * * @type {WeavyComponentSettingsType} */ settings: WeavyComponentSettingsType; /** * Checks if an entity matches the component configuration. * * @internal * @param link - Entity to check for a match. * @returns True if the entity targets this component. */ matchesLink(link?: LinkType): boolean; /** * Any provided link that should be loaded, shown and highlighted; provided through context. * @internal */ protected _link: LinkType | undefined; /** * Any provided link that should be loaded, shown and highlighted. */ set link(link: LinkType | undefined); get link(): LinkType | undefined; /** * Clears the link and resets the promise. * * @internal */ protected clearLink(): void; /** * Handles storage update events. * * @param e - `storage` event. * @internal */ protected storageLinkHandler: (e: StorageEvent) => void; /** * Sets the link value to a new link * @param link */ protected setLink(link: LinkType | undefined): Promise; /** * Shares a link with other blocks that may consume it automatically in other tabs or windows or when reloading the page. * * @param link - The entity to provide. */ protected provideStorageLink(link: LinkType): void | undefined; /** * Handler for reacting to the `wy-link` event. * * @param e - `wy-link` event. * @internal */ protected linkEventHandler: (e: WyLinkEventType) => Promise; /** * Element to match visibility on. */ protected get visibilityElement(): Element | undefined; /** * Handler for reacting to the `wy-notification` event. Consumes the event when the related component is visible. * * @param e - `wy-notification` event. * @internal */ protected notificationEventConsumer: (e: WyNotificationEventType) => void; /** * Any app types handled by the component. * * @type {AppTypeGuid[]} */ protected appTypes?: AppTypeGuid[]; /** * Config for enabling/disabling specific features in the weavy component. * Prefix a feature with minus to disable it. */ features?: string; /** @internal */ protected _agentUid?: string; /** * The configured uid of the agent for the weavy component. */ set agent(agent: string | null | undefined); get agent(): string | undefined; /** * Contextual data for agents to reference. Provide descriptive data for optimal results. * * @example * ```js * myComponent.contextualData = ` * Country data: * ${serializedCountryData} * `; * ``` */ contextualData?: string; /** * DEPRECATED: Use `.contextualData` property instead. * * Array with contextual data. * * *Note: Only the first item in the array is currently used.* * @internal * @deprecated */ set data(data: ContextDataType[]); /** * DEPRECATED: Use `.contextualData` property instead. * * Array with contextual data. * * *Note: Only the first item in the array is currently used.* * @internal * @deprecated */ get data(): ContextDataType[] | undefined; /** * Appearance of annotations. * * @type {"none" | "buttons-inline"} * @default "buttons-inline" */ set annotations(annotations: AnnotationsAppearanceType); get annotations(): AnnotationsAppearanceType; /** * Enter-to-send keymap in the editor. `"modifier"` is `Enter` combined with `Ctrl` or `Cmd`. * * @type {"never" | "modifier" | "auto" | "always"} * @default "auto" */ set enterToSend(enterToSend: EnterToSend); get enterToSend(): EnterToSend; /** * A space separated string of available reaction emojis in unicode. * * @default "😍 😎 😉 😜 👍" */ set reactions(reactions: string); get reactions(): string; /** * Resolves when context data blob uploads has finished. * * @internal * @returns {Promise} */ whenContextDataBlobs(): Promise; /** * Resolves when Weavy component features config is available. * * @internal * @returns {Promise} */ whenComponentFeatures(): Promise; /** * Resolves when a provided link is available. * * @internal * @returns {Promise} */ whenLink(): Promise; /** * Resolves when Weavy component settings are available. * * @internal * @returns {Promise} */ whenSettings(): Promise; /** * DEPRECATED: Use `.agent` property instead. * @internal * @deprecated */ bot?: string; connectedCallback(): void; disconnectedCallback(): void; protected willUpdate(changedProperties: PropertyValues): Promise; } /** Map for all app type guids. Returns app type string. */ export declare const AppTypeGuids: Map<"d65dd4bc-418e-403c-9f56-f9cf4da931ed" | "88f96a08-c6c1-4eac-a0bd-5bf8fba1a3fd" | "523edd88-4bbf-4547-b60f-2859a6d2ddc1" | "5ebfa152-de85-48da-82dd-30a1b560c313" | "edb400ac-839b-45a7-b2a8-6a01820d1c44" | "7e14f418-8f15-46f4-b182-f619b671e470" | "2352a1c6-abc6-420e-8b85-ca7d5aed8779", AppTypeString>; /** Map for all app type strings. Returns app type guid. */ export declare const AppTypeStrings: Map<"posts" | "comments" | "files" | "chat" | "chat_room" | "private_chat" | "agent_chat", AppTypeGuid>; /** Map for all agent app type guids. Returns app type string. */ export declare const AgentAppTypeGuids: Map; /** Map for all agent app type strings. Returns app type guid. */ export declare const AgentAppTypeStrings: Map; //# sourceMappingURL=weavy-type-component.d.ts.map