@reinosoft-ui/core 0.1.82 → 0.1.83

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,21 +1,38 @@
1
1
  export type ConfirmType = 'success' | 'error' | 'warning';
2
- export type ConfirmOptions = {
2
+ export interface Confirm {
3
+ id: string;
3
4
  title?: string;
4
5
  text?: string;
5
- type?: ConfirmType;
6
- confirmText?: string;
7
- cancelText?: string;
8
- };
9
- export declare const confirmState: {
10
- title: string;
11
- text: string;
12
6
  type: ConfirmType;
13
7
  confirmText: string;
14
8
  cancelText: string;
15
- open: boolean;
16
- resolve?: ((v: boolean) => void) | undefined;
9
+ }
10
+ export declare const confirmStore: {
11
+ current: {
12
+ id: string;
13
+ title?: string | undefined;
14
+ text?: string | undefined;
15
+ type: ConfirmType;
16
+ confirmText: string;
17
+ cancelText: string;
18
+ resolve: (v: boolean) => void;
19
+ } | null;
20
+ queue: {
21
+ id: string;
22
+ title?: string | undefined;
23
+ text?: string | undefined;
24
+ type: ConfirmType;
25
+ confirmText: string;
26
+ cancelText: string;
27
+ resolve: (v: boolean) => void;
28
+ }[];
17
29
  };
18
30
  export declare function confirm(text: string): Promise<boolean>;
19
- export declare function confirm(options: ConfirmOptions): Promise<boolean>;
20
- export declare const confirmOk: () => void | undefined;
21
- export declare const confirmCancel: () => void | undefined;
31
+ export declare function confirm(options: Partial<Confirm>): Promise<boolean>;
32
+ export declare namespace confirm {
33
+ var success: (data: Partial<Confirm> | string) => Promise<boolean>;
34
+ var error: (data: Partial<Confirm> | string) => Promise<boolean>;
35
+ var warning: (data: Partial<Confirm> | string) => Promise<boolean>;
36
+ }
37
+ export declare const confirmOk: () => void;
38
+ export declare const confirmCancel: () => void;
@@ -7,5 +7,5 @@ declare const ConfirmModalPlugin: {
7
7
  };
8
8
  export { ConfirmModalPlugin };
9
9
  export { confirm } from './confirm';
10
- export type { ConfirmOptions, ConfirmType } from './confirm';
10
+ export type { Confirm, ConfirmType } from './confirm';
11
11
  export { default as ConfirmModal } from './ConfirmModal.vue';
package/dist/index.d.ts CHANGED
@@ -28,7 +28,7 @@ export type { Toast, ToastVariant } from './components/Toast';
28
28
  export type { EditorApi } from './components/Editor/useEditor';
29
29
  export type { EditorButton, IconType } from './components/Editor';
30
30
  export type { OptionDefinition } from './components/Select/types';
31
- export type { ConfirmOptions, ConfirmType } from './components/ConfirmModal/confirm';
31
+ export type { Confirm, ConfirmType } from './components/ConfirmModal/confirm';
32
32
  export type { PasswordRule } from './components/PasswordValidator/PasswordValidator';
33
33
  export * from './components/Card';
34
34
  export * from './components/Steps';