@archbee/app-widget 1.1.32 → 1.1.34
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.
- package/README.md +3 -3
- package/dist/index.cjs.js +1428 -0
- package/dist/index.cjs.js.map +1 -0
- package/dist/index.esm.js +1412 -0
- package/dist/index.esm.js.map +1 -0
- package/package.json +18 -12
- package/index.esm.d.ts +0 -1
- package/index.esm.js +0 -1797
- package/src/index.d.ts +0 -3
- package/src/lib/main.d.ts +0 -19
- package/src/lib/scripts/index.d.ts +0 -4
- package/src/lib/scripts/initScripts.d.ts +0 -4
- package/src/lib/scripts/proxy.d.ts +0 -2
- package/src/lib/scripts/render.d.ts +0 -1
- package/src/lib/scripts/widgetActions.d.ts +0 -4
- package/src/lib/types.d.ts +0 -56
package/src/index.d.ts
DELETED
package/src/lib/main.d.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { HTMLAttributes } from 'react';
|
|
2
|
-
import { AbWidgetData, AbWidgetRef } from './types';
|
|
3
|
-
type CommonWidgetData = Omit<AbWidgetData, 'spaceId' | 'isOpen' | 'eventType' | 'collectionId' | 'onRenderFinish' | 'hasExecuted'>;
|
|
4
|
-
export declare const ArchbeeAppWidget: import("react").ForwardRefExoticComponent<{
|
|
5
|
-
spaceId: string;
|
|
6
|
-
user?: {
|
|
7
|
-
id: string;
|
|
8
|
-
email?: string;
|
|
9
|
-
first_name?: string;
|
|
10
|
-
last_name?: string;
|
|
11
|
-
profile_image_url?: string;
|
|
12
|
-
[key: string]: any;
|
|
13
|
-
};
|
|
14
|
-
onWidgetOpen?: Function;
|
|
15
|
-
onWidgetClose?: Function;
|
|
16
|
-
} & CommonWidgetData & HTMLAttributes<HTMLDivElement> & {
|
|
17
|
-
children?: import("react").ReactNode | undefined;
|
|
18
|
-
} & import("react").RefAttributes<AbWidgetRef>>;
|
|
19
|
-
export {};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import type { BubbleType, LoadingStrategy } from '../types';
|
|
2
|
-
export declare const initScripts: () => void;
|
|
3
|
-
export declare const initJsScripts: (loadingStrategy: LoadingStrategy) => void;
|
|
4
|
-
export declare const createArchbeeWidget: (spaceId: string, jwt?: string, shareableToken?: string, loadingStrategy?: LoadingStrategy, bubble?: BubbleType, bubblePlaceholder?: string, anchor?: string, hideNavbar?: boolean) => any;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const render: (component: JSX.Element, createContainer: Function, cb?: Function) => void;
|
package/src/lib/types.d.ts
DELETED
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
export interface ArchbeeWidgetInstance {
|
|
2
|
-
version: string;
|
|
3
|
-
widget: AbWidgetData;
|
|
4
|
-
queue: any;
|
|
5
|
-
push: Function;
|
|
6
|
-
}
|
|
7
|
-
export declare enum EVENT_TYPE_ENUM {
|
|
8
|
-
init = "init",
|
|
9
|
-
showWidget = "show-widget",
|
|
10
|
-
hideWidget = "hide-widget"
|
|
11
|
-
}
|
|
12
|
-
type WidgetEventType = EVENT_TYPE_ENUM.init | EVENT_TYPE_ENUM.showWidget | EVENT_TYPE_ENUM.hideWidget;
|
|
13
|
-
export declare const EVENT_TYPE_LIST: EVENT_TYPE_ENUM[];
|
|
14
|
-
export interface AbWidgetData {
|
|
15
|
-
eventType: WidgetEventType;
|
|
16
|
-
collectionId?: string;
|
|
17
|
-
spaceId?: string;
|
|
18
|
-
docId?: string;
|
|
19
|
-
blockId?: string;
|
|
20
|
-
isOpen: boolean;
|
|
21
|
-
onRenderFinish?: Function;
|
|
22
|
-
hasExecuted: boolean;
|
|
23
|
-
jwt?: string;
|
|
24
|
-
shareableToken?: string;
|
|
25
|
-
widgetType?: WidgetType;
|
|
26
|
-
bubble?: BubbleType;
|
|
27
|
-
hideNavbar?: boolean;
|
|
28
|
-
bubblePlaceholder?: string;
|
|
29
|
-
anchor?: string;
|
|
30
|
-
loadingStrategy?: LoadingStrategy;
|
|
31
|
-
}
|
|
32
|
-
type AbWidgetActionType = 'ab-doc-open' | 'ab-doc-close';
|
|
33
|
-
export interface AbWidgetAction {
|
|
34
|
-
source: 'archbee-widget';
|
|
35
|
-
type: AbWidgetActionType;
|
|
36
|
-
metadata: any;
|
|
37
|
-
}
|
|
38
|
-
export interface AbWidgetOpenAction extends AbWidgetAction {
|
|
39
|
-
type: AbWidgetActionType;
|
|
40
|
-
metadata: AbWidgetData;
|
|
41
|
-
}
|
|
42
|
-
export interface AbWidgetCloseAction extends AbWidgetAction {
|
|
43
|
-
type: AbWidgetActionType;
|
|
44
|
-
metadata: undefined;
|
|
45
|
-
}
|
|
46
|
-
export type BubbleType = 'ask' | 'invisible';
|
|
47
|
-
export type WidgetType = 'docs' | 'search';
|
|
48
|
-
export type LoadingStrategy = 'lazy' | 'eager';
|
|
49
|
-
export interface AbWidgetRef {
|
|
50
|
-
open: () => void;
|
|
51
|
-
close: () => void;
|
|
52
|
-
instance: () => ArchbeeWidgetInstance;
|
|
53
|
-
}
|
|
54
|
-
export declare const showWidgetEvent: () => CustomEvent<AbWidgetData> | undefined;
|
|
55
|
-
export declare const hideWidgetEvent: () => CustomEvent<AbWidgetData> | undefined;
|
|
56
|
-
export {};
|