sprintify-ui 0.8.20 → 0.8.21
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/sprintify-ui.es.js +6 -4
- package/dist/types/components/BaseAppDialogs.vue.d.ts +10 -1
- package/dist/types/components/BaseDialog.vue.d.ts +1 -1
- package/dist/types/components/BaseTextareaAutoresize.vue.d.ts +2 -2
- package/dist/types/types/index.d.ts +4 -2
- package/package.json +1 -1
- package/src/components/BaseAppDialogs.vue +4 -3
- package/src/stores/dialogs.ts +1 -0
- package/src/types/index.ts +4 -2
package/dist/sprintify-ui.es.js
CHANGED
|
@@ -7304,6 +7304,7 @@ const Gx = {
|
|
|
7304
7304
|
confirmText: n.confirmText ?? ze("sui.confirm"),
|
|
7305
7305
|
cancelText: n.cancelText ?? ze("sui.cancel"),
|
|
7306
7306
|
closeOnOutsideClick: n.closeOnOutsideClick ?? !0,
|
|
7307
|
+
input: n.input ?? !1,
|
|
7307
7308
|
onConfirm: n.onConfirm ?? function() {
|
|
7308
7309
|
},
|
|
7309
7310
|
onCancel: n.onCancel ?? function() {
|
|
@@ -7843,8 +7844,8 @@ const iE = {
|
|
|
7843
7844
|
__name: "BaseAppDialogs",
|
|
7844
7845
|
setup(n, { expose: t }) {
|
|
7845
7846
|
const e = Id(), r = N(() => e.dialogs);
|
|
7846
|
-
function i(d) {
|
|
7847
|
-
d.onConfirm(), l(d);
|
|
7847
|
+
function i(d, f) {
|
|
7848
|
+
d.onConfirm(f), l(d);
|
|
7848
7849
|
}
|
|
7849
7850
|
function o(d) {
|
|
7850
7851
|
d.onCancel(), l(d);
|
|
@@ -7914,10 +7915,11 @@ const iE = {
|
|
|
7914
7915
|
message: h.message,
|
|
7915
7916
|
"confirm-text": h.confirmText,
|
|
7916
7917
|
html: h.html,
|
|
7918
|
+
input: h.input,
|
|
7917
7919
|
"cancel-text": h.cancelText,
|
|
7918
7920
|
onCancel: (p) => o(h),
|
|
7919
|
-
onConfirm: (p) => i(h)
|
|
7920
|
-
}, null, 8, ["class", "color", "title", "message", "confirm-text", "html", "cancel-text", "onCancel", "onConfirm"])
|
|
7921
|
+
onConfirm: (p) => i(h, p)
|
|
7922
|
+
}, null, 8, ["class", "color", "title", "message", "confirm-text", "html", "input", "cancel-text", "onCancel", "onConfirm"])
|
|
7921
7923
|
])
|
|
7922
7924
|
]))), 128))
|
|
7923
7925
|
]),
|
|
@@ -5,10 +5,19 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
5
5
|
title: string;
|
|
6
6
|
message: string;
|
|
7
7
|
html: boolean;
|
|
8
|
+
input: false | {
|
|
9
|
+
label?: string | undefined;
|
|
10
|
+
placeholder?: string | undefined;
|
|
11
|
+
name?: string | undefined;
|
|
12
|
+
type?: string | undefined;
|
|
13
|
+
size?: "xs" | "sm" | "md" | "lg" | "xl" | undefined;
|
|
14
|
+
required?: boolean | undefined;
|
|
15
|
+
disabled?: boolean | undefined;
|
|
16
|
+
};
|
|
8
17
|
confirmText: string;
|
|
9
18
|
cancelText: string;
|
|
10
19
|
closeOnOutsideClick: boolean;
|
|
11
|
-
onConfirm: () => void;
|
|
20
|
+
onConfirm: (input?: string | undefined) => void;
|
|
12
21
|
onCancel: () => void;
|
|
13
22
|
}[]>;
|
|
14
23
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>;
|
|
@@ -68,9 +68,9 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
68
68
|
title: string;
|
|
69
69
|
message: string;
|
|
70
70
|
html: boolean;
|
|
71
|
+
input: boolean | InputConfigProps;
|
|
71
72
|
confirmText: string;
|
|
72
73
|
cancelText: string;
|
|
73
|
-
input: boolean | InputConfigProps;
|
|
74
74
|
}, {}>, {
|
|
75
75
|
default?(_: {}): any;
|
|
76
76
|
}>;
|
|
@@ -54,10 +54,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
54
54
|
focus: typeof focus;
|
|
55
55
|
blur: typeof blur;
|
|
56
56
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
57
|
+
input: (...args: any[]) => void;
|
|
57
58
|
focus: (...args: any[]) => void;
|
|
58
59
|
"update:modelValue": (...args: any[]) => void;
|
|
59
60
|
submit: (...args: any[]) => void;
|
|
60
|
-
input: (...args: any[]) => void;
|
|
61
61
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
62
62
|
modelValue: {
|
|
63
63
|
default: string;
|
|
@@ -110,8 +110,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
110
110
|
}>> & {
|
|
111
111
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
112
112
|
onFocus?: ((...args: any[]) => any) | undefined;
|
|
113
|
-
onSubmit?: ((...args: any[]) => any) | undefined;
|
|
114
113
|
onInput?: ((...args: any[]) => any) | undefined;
|
|
114
|
+
onSubmit?: ((...args: any[]) => any) | undefined;
|
|
115
115
|
}, {
|
|
116
116
|
required: boolean;
|
|
117
117
|
modelValue: string | null;
|
|
@@ -121,10 +121,11 @@ export interface DialogOptions {
|
|
|
121
121
|
title: string;
|
|
122
122
|
message: string;
|
|
123
123
|
html?: boolean;
|
|
124
|
+
input?: InputConfigProps | false;
|
|
124
125
|
confirmText?: string;
|
|
125
126
|
cancelText?: string;
|
|
126
127
|
closeOnOutsideClick?: boolean;
|
|
127
|
-
onConfirm?: () => void;
|
|
128
|
+
onConfirm?: (input?: string) => void;
|
|
128
129
|
onCancel?: () => void;
|
|
129
130
|
}
|
|
130
131
|
export interface Dialog {
|
|
@@ -133,10 +134,11 @@ export interface Dialog {
|
|
|
133
134
|
title: string;
|
|
134
135
|
message: string;
|
|
135
136
|
html: boolean;
|
|
137
|
+
input: InputConfigProps | false;
|
|
136
138
|
confirmText: string;
|
|
137
139
|
cancelText: string;
|
|
138
140
|
closeOnOutsideClick: boolean;
|
|
139
|
-
onConfirm: () => void;
|
|
141
|
+
onConfirm: (input?: string) => void;
|
|
140
142
|
onCancel: () => void;
|
|
141
143
|
}
|
|
142
144
|
/**
|
package/package.json
CHANGED
|
@@ -48,9 +48,10 @@
|
|
|
48
48
|
:message="dialog.message"
|
|
49
49
|
:confirm-text="dialog.confirmText"
|
|
50
50
|
:html="dialog.html"
|
|
51
|
+
:input="dialog.input"
|
|
51
52
|
:cancel-text="dialog.cancelText"
|
|
52
53
|
@cancel="cancel(dialog)"
|
|
53
|
-
@confirm="confirm(dialog)"
|
|
54
|
+
@confirm="event => confirm(dialog, event)"
|
|
54
55
|
/>
|
|
55
56
|
</div>
|
|
56
57
|
</div>
|
|
@@ -70,8 +71,8 @@ const dialogs = computed(() => {
|
|
|
70
71
|
return dialogStore.dialogs;
|
|
71
72
|
});
|
|
72
73
|
|
|
73
|
-
function confirm(dialog: Dialog) {
|
|
74
|
-
dialog.onConfirm();
|
|
74
|
+
function confirm(dialog: Dialog, input?: string) {
|
|
75
|
+
dialog.onConfirm(input);
|
|
75
76
|
remove(dialog);
|
|
76
77
|
}
|
|
77
78
|
|
package/src/stores/dialogs.ts
CHANGED
|
@@ -21,6 +21,7 @@ export const useDialogsStore = defineStore('dialogs', {
|
|
|
21
21
|
confirmText: options.confirmText ?? t('sui.confirm'),
|
|
22
22
|
cancelText: options.cancelText ?? t('sui.cancel'),
|
|
23
23
|
closeOnOutsideClick: options.closeOnOutsideClick ?? true,
|
|
24
|
+
input: options.input ?? false,
|
|
24
25
|
onConfirm:
|
|
25
26
|
options.onConfirm ??
|
|
26
27
|
function () {
|
package/src/types/index.ts
CHANGED
|
@@ -153,10 +153,11 @@ export interface DialogOptions {
|
|
|
153
153
|
title: string;
|
|
154
154
|
message: string;
|
|
155
155
|
html?: boolean;
|
|
156
|
+
input?: InputConfigProps | false;
|
|
156
157
|
confirmText?: string;
|
|
157
158
|
cancelText?: string;
|
|
158
159
|
closeOnOutsideClick?: boolean;
|
|
159
|
-
onConfirm?: () => void;
|
|
160
|
+
onConfirm?: (input?: string) => void;
|
|
160
161
|
onCancel?: () => void;
|
|
161
162
|
}
|
|
162
163
|
|
|
@@ -166,10 +167,11 @@ export interface Dialog {
|
|
|
166
167
|
title: string;
|
|
167
168
|
message: string;
|
|
168
169
|
html: boolean;
|
|
170
|
+
input: InputConfigProps | false;
|
|
169
171
|
confirmText: string;
|
|
170
172
|
cancelText: string;
|
|
171
173
|
closeOnOutsideClick: boolean;
|
|
172
|
-
onConfirm: () => void;
|
|
174
|
+
onConfirm: (input?: string) => void;
|
|
173
175
|
onCancel: () => void;
|
|
174
176
|
}
|
|
175
177
|
|