UNPKG

@feedal/embed

Version:

Feedal embed script to load feedback forms via JS or NPM

38 lines (37 loc) 1.16 kB
import { EmbedOptions } from './types'; import { FeedalWidget } from './widget'; export declare function useFeedalWidget(options: EmbedOptions): { widget: FeedalWidget | null; isOpen: boolean; open: () => void; close: () => void; toggle: () => void; }; export declare function useFeedalForm(options: EmbedOptions): { widget: FeedalWidget | null; isOpen: boolean; open: () => void; close: () => void; toggle: () => void; }; export declare class FeedalService { private widgets; createWidget(options: EmbedOptions): FeedalWidget; getWidget(formId: string): FeedalWidget | undefined; destroyWidget(formId: string): void; destroyAll(): void; } export declare class FeedalFormElement extends HTMLElement { private widget?; static get observedAttributes(): string[]; connectedCallback(): void; disconnectedCallback(): void; attributeChangedCallback(): void; private initializeWidget; private updateWidget; open(): void; close(): void; toggle(): void; } export declare function createReactComponent(): string; export declare function createVueComponent(): string;