chayns-api 2.1.4 → 2.1.6

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.
@@ -1,4 +1,4 @@
1
- import { DialogDataHookResult, DialogHookResult } from '../types/IChaynsReact';
1
+ import { DialogHookResult } from '../types/IChaynsReact';
2
2
  /**
3
3
  * @category Hooks
4
4
  */
@@ -6,4 +6,4 @@ export declare const useDialogState: () => DialogHookResult;
6
6
  /**
7
7
  * @category Hooks
8
8
  */
9
- export declare const useDialogData: () => DialogDataHookResult;
9
+ export declare const useDialogData: <T extends unknown>() => T;
@@ -96,12 +96,16 @@ export interface DialogModule<T extends any = object> {
96
96
  };
97
97
  dialogInput?: T;
98
98
  backgroundColor?: string;
99
+ allowAnonymousUser?: boolean;
100
+ seamless?: boolean;
99
101
  }
100
102
  export interface DialogIFrame<T extends any = object> {
101
103
  type: DialogType.IFRAME;
102
104
  url: string;
103
105
  dialogInput?: T;
104
106
  backgroundColor?: string;
107
+ allowAnonymousUser?: boolean;
108
+ seamless?: boolean;
105
109
  }
106
110
  export declare enum DialogInputType {
107
111
  NUMBER = "number",
@@ -125,7 +129,7 @@ export declare enum DialogSelectType {
125
129
  SIMPLE = 3
126
130
  }
127
131
  export type DialogSelectListItemType = {
128
- id: number;
132
+ id: number | string;
129
133
  name: string;
130
134
  disabled?: boolean;
131
135
  isSelected?: boolean;
@@ -224,9 +228,6 @@ export type DialogHookResult = {
224
228
  sendData: ChaynsReactFunctions["dispatchEventToDialogHost"];
225
229
  addDataListener: ChaynsReactFunctions["addDialogHostEventListener"];
226
230
  };
227
- export type DialogDataHookResult = {
228
- [key: string | symbol]: object;
229
- };
230
231
  /**
231
232
  * @ignore
232
233
  */
@@ -276,7 +277,7 @@ export interface DialogResultFile {
276
277
  }
277
278
  type DialogResultValue<T> = {
278
279
  [DialogType.INPUT]: string;
279
- [DialogType.SELECT]: number[];
280
+ [DialogType.SELECT]: (number | string)[];
280
281
  [DialogType.CONFIRM]: void;
281
282
  [DialogType.ALERT]: void;
282
283
  [DialogType.DATE]: Date;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "chayns-api",
3
- "version": "2.1.4",
3
+ "version": "2.1.6",
4
4
  "description": "new chayns api",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",