@throwbo/timelayer-client 3.4.3 → 3.4.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,43 @@
1
+ import { App, Component } from 'vue';
2
+ import { default as EmbedOptions } from './types/EmbedOptions';
3
+ import { default as EmbedEvents } from './types/EmbedEvents';
4
+ import { default as EmbedSettings } from './types/EmbedSettings';
5
+ import { default as ParentEmbedEvents } from './types/ParentEmbedEvents';
6
+ import { default as CalendarEvent } from './types/CalendarEvent';
7
+ declare class TimeLayer {
8
+ private app;
9
+ private pinia;
10
+ private container;
11
+ private readonly events;
12
+ private eventListeners;
13
+ constructor({ settings, container, events, }: {
14
+ settings?: EmbedSettings;
15
+ container?: HTMLElement;
16
+ events?: EmbedEvents;
17
+ });
18
+ private setupCalendar;
19
+ private fetchResources;
20
+ private initI18n;
21
+ static init({ token, settings, container, }: EmbedOptions): Promise<TimeLayer>;
22
+ authorizeSession(token: string): Promise<boolean>;
23
+ mountComponent(component: Component, container?: HTMLElement): void;
24
+ mountCalendar(container?: HTMLElement): void;
25
+ mountEventForm(container?: HTMLElement): void;
26
+ mountBookingDialog(container?: HTMLElement): void;
27
+ private mountApp;
28
+ applySettings(newSettings: EmbedOptions['settings']): void;
29
+ private initEventsDispatcher;
30
+ private fireEvent;
31
+ on<K extends keyof EmbedEvents>(eventName: K, callback: NonNullable<EmbedEvents[K]>): this;
32
+ private emit;
33
+ off<K extends keyof EmbedEvents>(eventName: K, callback?: NonNullable<EmbedEvents[K]>): this;
34
+ execute<ActionName extends keyof ParentEmbedEvents>(actionName: ActionName, data?: ParentEmbedEvents[ActionName]): Promise<void | CalendarEvent | undefined>;
35
+ private initPinia;
36
+ private unmountApp;
37
+ destroy(): void;
38
+ }
39
+ declare const TimeLayerPlugin: {
40
+ install(app: App): void;
41
+ };
42
+ export { TimeLayer, TimeLayerPlugin, TimeLayer as T };
43
+ export default TimeLayer;