@soyio/soyio-widget 0.0.51 → 0.0.52

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/dist/index.d.ts CHANGED
@@ -1,36 +1,3 @@
1
- declare type ConfigProps = {
2
- companyId: string;
3
- userReference?: string;
4
- flowTemplateId?: string;
5
- userEmail?: string;
6
- identityId?: string;
7
- };
8
-
9
- declare type EventData = {
10
- eventName: 'IDENTITY_REGISTERED' | 'IDENTITY_AUTHENTICATED';
11
- identityId: string;
12
- userReference?: string;
13
- };
14
-
15
- declare type Flow = 'authenticate' | 'register';
16
-
17
- declare class Widget {
18
- #private;
19
- private flow;
20
- private configProps;
21
- private onEvent;
22
- private isSandbox;
23
- constructor(options: WidgetConfig);
24
- validateProps(): void;
25
- }
26
- export default Widget;
27
-
28
- declare type WidgetConfig = {
29
- flow: Flow;
30
- configProps: Partial<ConfigProps>;
31
- onEvent: (data: EventData) => void;
32
- isSandbox?: boolean;
33
- developmentUrl?: string;
34
- };
35
-
36
- export { }
1
+ export * from './src/index'
2
+ import SoyioWidget from './src/index'
3
+ export default SoyioWidget
@@ -0,0 +1,6 @@
1
+ export declare const CONTAINER_ID = "soyio-widget-iframe-container";
2
+ export declare const IFRAME_ID = "soyio-widget-iframe";
3
+ export declare const PRODUCTION_URL = "https://app.soyio.id/widget";
4
+ export declare const SANDBOX_URL = "https://sandbox.soyio.id/widget";
5
+ export declare const FINISHING_EVENTS: string[];
6
+ export declare const CLOSED_EVENT = "WIDGET_CLOSED";
@@ -0,0 +1,3 @@
1
+ declare function setReady(iframe: HTMLIFrameElement): void;
2
+ declare function setConfig(iframe: HTMLIFrameElement, config: Partial<ConfigProps>): void;
3
+ export { setReady, setConfig };
@@ -0,0 +1,10 @@
1
+ declare class Widget {
2
+ #private;
3
+ private flow;
4
+ private configProps;
5
+ private onEvent;
6
+ private isSandbox;
7
+ constructor(options: WidgetConfig);
8
+ validateProps(): void;
9
+ }
10
+ export default Widget;
@@ -0,0 +1,5 @@
1
+ type Hooks = {
2
+ onEvent: (event: any) => void;
3
+ };
4
+ export declare function setListeners(hooks: Hooks): void;
5
+ export {};
@@ -0,0 +1 @@
1
+ export declare function getFullUrl(flow: Flow, configProps: Partial<ConfigProps>, isSandbox: boolean, developmentUrl: string | undefined): string;
@@ -0,0 +1,3 @@
1
+ export declare function showPopUp(flow: Flow, configProps: Partial<ConfigProps>, isSandbox: boolean, developmentUrl: string | undefined): void;
2
+ export declare function clearOverlayEffects(): void;
3
+ export declare function removePopUp(): void;
@@ -0,0 +1,2 @@
1
+ declare const _default: import("vite").UserConfig;
2
+ export default _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@soyio/soyio-widget",
3
- "version": "0.0.51",
3
+ "version": "0.0.52",
4
4
  "type": "module",
5
5
  "main": "./dist/index.umd.cjs",
6
6
  "module": "./dist/index.js",