@v1nt1248/3nclient-lib 0.2.81 → 0.2.82
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,7 +1,7 @@
|
|
|
1
1
|
import { Component } from '../../../vue/dist/vue.esm-bundler.js';
|
|
2
|
-
import { ExtractComponentProps, Ui3nIconField } from '../../types
|
|
2
|
+
import { ExtractComponentProps, Ui3nIconField } from '../../types';
|
|
3
3
|
export type Ui3nDialogEvent = 'open' | 'before-close' | 'close' | 'confirm' | 'cancel' | 'click-overlay';
|
|
4
|
-
export interface Ui3nDialogProps {
|
|
4
|
+
export interface Ui3nDialogProps<ConfirmData = unknown, CancelData = unknown, CloseData = unknown> {
|
|
5
5
|
id?: string;
|
|
6
6
|
title?: string;
|
|
7
7
|
icon?: string | Ui3nIconField;
|
|
@@ -13,9 +13,9 @@ export interface Ui3nDialogProps {
|
|
|
13
13
|
contentCssStyle?: Record<string, string>;
|
|
14
14
|
confirmButton?: boolean;
|
|
15
15
|
cancelButton?: boolean;
|
|
16
|
-
onClose?: (data?:
|
|
17
|
-
onConfirm?: (data:
|
|
18
|
-
onCancel?: (data:
|
|
16
|
+
onClose?: (data?: CloseData) => void;
|
|
17
|
+
onConfirm?: (data: ConfirmData) => void;
|
|
18
|
+
onCancel?: (data: CancelData) => void;
|
|
19
19
|
confirmButtonText?: string;
|
|
20
20
|
cancelButtonText?: string;
|
|
21
21
|
confirmButtonColor?: string;
|
|
@@ -25,10 +25,10 @@ export interface Ui3nDialogProps {
|
|
|
25
25
|
closeOnClickOverlay?: boolean;
|
|
26
26
|
closeOnEsc?: boolean;
|
|
27
27
|
}
|
|
28
|
-
export interface Ui3nDialogComponentProps<T extends Component> {
|
|
28
|
+
export interface Ui3nDialogComponentProps<T extends Component, ConfirmData = unknown, CancelData = unknown, CloseData = unknown> {
|
|
29
29
|
component: T;
|
|
30
30
|
componentProps?: ExtractComponentProps<T>;
|
|
31
|
-
dialogProps?: Ui3nDialogProps
|
|
31
|
+
dialogProps?: Ui3nDialogProps<ConfirmData, CancelData, CloseData>;
|
|
32
32
|
}
|
|
33
33
|
export interface Ui3nDialogComponentEmits {
|
|
34
34
|
(ev: 'open', value?: unknown): void;
|
|
@@ -8,7 +8,7 @@ declare const _default: <T extends Component>(__VLS_props: NonNullable<Awaited<t
|
|
|
8
8
|
readonly "onBefore-close"?: ((value?: unknown) => any) | undefined;
|
|
9
9
|
readonly onConfirm?: ((value?: unknown) => any) | undefined;
|
|
10
10
|
readonly "onClick-overlay"?: ((value?: unknown) => any) | undefined;
|
|
11
|
-
} & import('../../../vue/dist/vue.esm-bundler.js').VNodeProps & import('../../../vue/dist/vue.esm-bundler.js').AllowedComponentProps & import('../../../vue/dist/vue.esm-bundler.js').ComponentCustomProps, never>, "onClose" | "onCancel" | "onOpen" | "onBefore-close" | "onConfirm" | "onClick-overlay"> & Ui3nDialogComponentProps<T> & Partial<{}>> & import('../../../vue/dist/vue.esm-bundler.js').PublicProps;
|
|
11
|
+
} & import('../../../vue/dist/vue.esm-bundler.js').VNodeProps & import('../../../vue/dist/vue.esm-bundler.js').AllowedComponentProps & import('../../../vue/dist/vue.esm-bundler.js').ComponentCustomProps, never>, "onClose" | "onCancel" | "onOpen" | "onBefore-close" | "onConfirm" | "onClick-overlay"> & Ui3nDialogComponentProps<T, unknown, unknown, unknown> & Partial<{}>> & import('../../../vue/dist/vue.esm-bundler.js').PublicProps;
|
|
12
12
|
expose(exposed: import('../../../vue/dist/vue.esm-bundler.js').ShallowUnwrapRef<{}>): void;
|
|
13
13
|
attrs: any;
|
|
14
14
|
slots: {};
|
package/dist/ui3n-utils.js
CHANGED
|
@@ -3350,6 +3350,8 @@ function YE(E, C) {
|
|
|
3350
3350
|
N.width = Q.width, N.height = Q.height, N.getContext("2d").drawImage(w, 0, 0, Q.width, Q.height);
|
|
3351
3351
|
const H = N.toDataURL();
|
|
3352
3352
|
typeof E != "string" && URL.revokeObjectURL(w.src), i(H);
|
|
3353
|
+
}, w.onerror = function() {
|
|
3354
|
+
i("");
|
|
3353
3355
|
}, w.src = typeof E == "string" ? E : URL.createObjectURL(E);
|
|
3354
3356
|
} catch (w) {
|
|
3355
3357
|
s(w);
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { Component } from 'vue';
|
|
2
|
-
import type { ExtractComponentProps, Ui3nIconField } from '@/types
|
|
2
|
+
import type { ExtractComponentProps, Ui3nIconField } from '@/types';
|
|
3
3
|
|
|
4
4
|
export type Ui3nDialogEvent = 'open' | 'before-close' | 'close' | 'confirm' | 'cancel' | 'click-overlay';
|
|
5
5
|
|
|
6
|
-
export interface Ui3nDialogProps {
|
|
6
|
+
export interface Ui3nDialogProps<ConfirmData = unknown, CancelData = unknown, CloseData = unknown> {
|
|
7
7
|
id?: string;
|
|
8
8
|
title?: string;
|
|
9
9
|
icon?: string | Ui3nIconField;
|
|
@@ -15,9 +15,9 @@ export interface Ui3nDialogProps {
|
|
|
15
15
|
contentCssStyle?: Record<string, string>;
|
|
16
16
|
confirmButton?: boolean;
|
|
17
17
|
cancelButton?: boolean;
|
|
18
|
-
onClose?: (data?:
|
|
19
|
-
onConfirm?: (data:
|
|
20
|
-
onCancel?: (data:
|
|
18
|
+
onClose?: (data?: CloseData) => void;
|
|
19
|
+
onConfirm?: (data: ConfirmData) => void;
|
|
20
|
+
onCancel?: (data: CancelData) => void;
|
|
21
21
|
confirmButtonText?: string;
|
|
22
22
|
cancelButtonText?: string;
|
|
23
23
|
confirmButtonColor?: string;
|
|
@@ -28,10 +28,12 @@ export interface Ui3nDialogProps {
|
|
|
28
28
|
closeOnEsc?: boolean;
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
export interface Ui3nDialogComponentProps<
|
|
31
|
+
export interface Ui3nDialogComponentProps<
|
|
32
|
+
T extends Component, ConfirmData = unknown, CancelData = unknown, CloseData = unknown
|
|
33
|
+
> {
|
|
32
34
|
component: T;
|
|
33
35
|
componentProps?: ExtractComponentProps<T>;
|
|
34
|
-
dialogProps?: Ui3nDialogProps
|
|
36
|
+
dialogProps?: Ui3nDialogProps<ConfirmData, CancelData, CloseData>;
|
|
35
37
|
}
|
|
36
38
|
|
|
37
39
|
export interface Ui3nDialogComponentEmits {
|