@schwarzdavid/ui-kit 0.0.1-alpha.7 → 0.0.1-alpha.9
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/ui-kit.css +1 -1
- package/dist/ui-kit.d.ts +7 -6
- package/dist/ui-kit.js +227 -220
- package/package.json +3 -2
package/dist/ui-kit.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.toast-entry[data-v-7b5e0267]{pointer-events:all}.toast-entry[data-v-7b5e0267] .v-alert__prepend{align-self:center}.toast-outlet[data-v-ba5c8268]{position:fixed;z-index:9999;bottom:8px;right:8px;left:8px;display:flex;flex-direction:column;row-gap:8px;pointer-events:none}.toast-outlet--desktop[data-v-ba5c8268]{left:unset;max-width:500px;width:100%}.fade-move[data-v-ba5c8268],.fade-enter-active[data-v-ba5c8268],.fade-leave-active[data-v-ba5c8268]{transition:all .3s cubic-bezier(.4,0,.2,1)}.fade-enter-from[data-v-ba5c8268],.fade-leave-to[data-v-ba5c8268]{opacity:0;transform:translate(50%) scaleY(.5)}.fade-leave-active[data-v-ba5c8268]{position:absolute}.info-dialog-card[data-v-
|
|
1
|
+
.toast-entry[data-v-7b5e0267]{pointer-events:all}.toast-entry[data-v-7b5e0267] .v-alert__prepend{align-self:center}.toast-outlet[data-v-ba5c8268]{position:fixed;z-index:9999;bottom:8px;right:8px;left:8px;display:flex;flex-direction:column;row-gap:8px;pointer-events:none}.toast-outlet--desktop[data-v-ba5c8268]{left:unset;max-width:500px;width:100%}.fade-move[data-v-ba5c8268],.fade-enter-active[data-v-ba5c8268],.fade-leave-active[data-v-ba5c8268]{transition:all .3s cubic-bezier(.4,0,.2,1)}.fade-enter-from[data-v-ba5c8268],.fade-leave-to[data-v-ba5c8268]{opacity:0;transform:translate(50%) scaleY(.5)}.fade-leave-active[data-v-ba5c8268]{position:absolute}.info-dialog-card[data-v-0f8116ef]>.v-card-text{padding-left:16px!important;padding-right:16px!important}.prompt-dialog-card[data-v-6cec23a5]>.v-card-item{padding-left:16px!important;padding-right:16px!important}.prompt-dialog-toolbar-slot[data-v-6cec23a5]{display:contents}.confirm-dialog-card[data-v-3e8b3358]>.v-card-text{padding-left:16px!important;padding-right:16px!important}
|
package/dist/ui-kit.d.ts
CHANGED
|
@@ -69,7 +69,7 @@ export declare interface DialogComposable {
|
|
|
69
69
|
prompt<T, R extends boolean = false, C extends PromptDialogComponent<T> = PromptDialogComponent<T>>(options: PromptDialogProps<T, R, C>): Promise<R extends true ? T : T | null>;
|
|
70
70
|
confirm(title: string, content: string, level?: ConfirmDialogLevel): Promise<boolean>;
|
|
71
71
|
confirm<C extends Component = Component>(options: ConfirmDialogProps<C>): Promise<boolean>;
|
|
72
|
-
form<
|
|
72
|
+
form<R, T = R, RejectOnEmpty extends boolean = false>(options: FormDialogProps<R, T, RejectOnEmpty>): Promise<RejectOnEmpty extends true ? R : R | null>;
|
|
73
73
|
}
|
|
74
74
|
|
|
75
75
|
declare interface DialogCta {
|
|
@@ -87,27 +87,28 @@ declare interface DialogValueCta<T> extends DialogCta {
|
|
|
87
87
|
|
|
88
88
|
export declare const email: ValidationRuleWithoutParams<any>;
|
|
89
89
|
|
|
90
|
-
declare type FormDialogAction<T, R> = (value: T) => Promise<R>;
|
|
90
|
+
export declare type FormDialogAction<T, R> = (value: T) => Promise<R>;
|
|
91
91
|
|
|
92
|
-
declare type FormDialogComponent<T> = new () => Omit<ComponentPublicInstance, '$emit'> & FormDialogComponentExposed<T> & {
|
|
92
|
+
export declare type FormDialogComponent<T> = new () => Omit<ComponentPublicInstance, '$emit'> & FormDialogComponentExposed<T> & {
|
|
93
93
|
$emit: EmitFn<FormDialogComponentEmits>;
|
|
94
94
|
};
|
|
95
95
|
|
|
96
|
-
declare type FormDialogComponentEmits = {
|
|
96
|
+
export declare type FormDialogComponentEmits = {
|
|
97
97
|
save: [];
|
|
98
98
|
};
|
|
99
99
|
|
|
100
|
-
declare interface FormDialogComponentExposed<T> {
|
|
100
|
+
export declare interface FormDialogComponentExposed<T> {
|
|
101
101
|
finish(): Promisable<T>;
|
|
102
102
|
}
|
|
103
103
|
|
|
104
|
-
declare type FormDialogProps<R, T = R, C extends FormDialogComponent<T> = FormDialogComponent<T>, P extends object = ComponentProps<C>> = DialogProps<P> & {
|
|
104
|
+
export declare type FormDialogProps<R, T = R, RejectOnEmpty extends boolean = false, C extends FormDialogComponent<T> = FormDialogComponent<T>, P extends object = ComponentProps<C>> = DialogProps<P> & {
|
|
105
105
|
title: string;
|
|
106
106
|
translateTitle?: string;
|
|
107
107
|
saveCta?: Partial<DialogCta>;
|
|
108
108
|
abortCta?: Partial<DialogCta>;
|
|
109
109
|
component: C;
|
|
110
110
|
action?: FormDialogAction<T, R>;
|
|
111
|
+
rejectOnEmpty?: RejectOnEmpty;
|
|
111
112
|
};
|
|
112
113
|
|
|
113
114
|
declare interface InfoDialogBaseProps<T> {
|
package/dist/ui-kit.js
CHANGED
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
import { getCurrentInstance as we, inject as he, readonly as ee, markRaw as ue, defineComponent as
|
|
2
|
-
import { VAlert as
|
|
1
|
+
import { getCurrentInstance as we, inject as he, readonly as ee, markRaw as ue, defineComponent as L, openBlock as m, createElementBlock as S, Fragment as N, renderList as te, unref as l, createBlock as g, resolveDynamicComponent as W, mergeProps as q, ref as k, computed as w, onMounted as Ae, createSlots as Te, withCtx as d, toDisplayString as B, createVNode as u, TransitionGroup as xe, normalizeClass as ce, isRef as Ve, createTextVNode as oe, createElementVNode as F, createCommentVNode as M, normalizeProps as ie, toValue as le, useTemplateRef as De } from "vue";
|
|
2
|
+
import { VAlert as Ie, VIcon as Re, VOverlay as be, VProgressCircular as Ee, VDialog as z, VCard as Y, VCardTitle as de, VBtn as R, VCardText as me, VCardActions as X, VToolbar as fe, VToolbarTitle as pe, VSpacer as H, VDivider as ve, VDefaultsProvider as ke } from "vuetify/components";
|
|
3
3
|
import { useI18n as ne } from "vue-i18n";
|
|
4
4
|
import { useDisplay as _e } from "vuetify";
|
|
5
5
|
import { merge as $ } from "lodash";
|
|
6
|
-
import
|
|
6
|
+
import Oe from "@vuelidate/core";
|
|
7
7
|
import * as v from "@vuelidate/validators";
|
|
8
8
|
import { helpers as re } from "@vuelidate/validators";
|
|
9
|
-
const
|
|
9
|
+
const C = [];
|
|
10
10
|
for (let e = 0; e < 256; ++e)
|
|
11
|
-
|
|
11
|
+
C.push((e + 256).toString(16).slice(1));
|
|
12
12
|
function Le(e, n = 0) {
|
|
13
|
-
return (
|
|
13
|
+
return (C[e[n + 0]] + C[e[n + 1]] + C[e[n + 2]] + C[e[n + 3]] + "-" + C[e[n + 4]] + C[e[n + 5]] + "-" + C[e[n + 6]] + C[e[n + 7]] + "-" + C[e[n + 8]] + C[e[n + 9]] + "-" + C[e[n + 10]] + C[e[n + 11]] + C[e[n + 12]] + C[e[n + 13]] + C[e[n + 14]] + C[e[n + 15]]).toLowerCase();
|
|
14
14
|
}
|
|
15
15
|
let Z;
|
|
16
|
-
const
|
|
17
|
-
function
|
|
16
|
+
const Ue = new Uint8Array(16);
|
|
17
|
+
function Se() {
|
|
18
18
|
if (!Z) {
|
|
19
19
|
if (typeof crypto > "u" || !crypto.getRandomValues)
|
|
20
20
|
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
21
21
|
Z = crypto.getRandomValues.bind(crypto);
|
|
22
22
|
}
|
|
23
|
-
return Z(
|
|
23
|
+
return Z(Ue);
|
|
24
24
|
}
|
|
25
|
-
const
|
|
25
|
+
const je = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), se = { randomUUID: je };
|
|
26
26
|
function ge(e, n, t) {
|
|
27
27
|
var o;
|
|
28
28
|
if (se.randomUUID && !n && !e)
|
|
29
29
|
return se.randomUUID();
|
|
30
30
|
e = e || {};
|
|
31
|
-
const r = e.random ?? ((o = e.rng) == null ? void 0 : o.call(e)) ??
|
|
31
|
+
const r = e.random ?? ((o = e.rng) == null ? void 0 : o.call(e)) ?? Se();
|
|
32
32
|
if (r.length < 16)
|
|
33
33
|
throw new Error("Random bytes length must be >= 16");
|
|
34
34
|
return r[6] = r[6] & 15 | 64, r[8] = r[8] & 63 | 128, Le(r);
|
|
35
35
|
}
|
|
36
36
|
var J = /* @__PURE__ */ ((e) => (e.NOT_INSTALLED = "Need to install with `app.use` function", e.UNEXPECTED_ERROR = "Unexpected error", e))(J || {});
|
|
37
|
-
function
|
|
37
|
+
function P() {
|
|
38
38
|
const e = we();
|
|
39
39
|
if (!(e != null && e.appContext.app.__SCHWARZDAVID_UIKIT_SYMBOL__))
|
|
40
40
|
throw new Error(J.NOT_INSTALLED);
|
|
@@ -44,7 +44,7 @@ function N() {
|
|
|
44
44
|
return t;
|
|
45
45
|
}
|
|
46
46
|
function ye() {
|
|
47
|
-
const { dialogQueue: e } =
|
|
47
|
+
const { dialogQueue: e } = P();
|
|
48
48
|
function n() {
|
|
49
49
|
let o;
|
|
50
50
|
for (; ; )
|
|
@@ -69,11 +69,11 @@ function ye() {
|
|
|
69
69
|
removeFromQueue: r
|
|
70
70
|
};
|
|
71
71
|
}
|
|
72
|
-
const Me = /* @__PURE__ */
|
|
72
|
+
const Me = /* @__PURE__ */ L({
|
|
73
73
|
__name: "DialogOutlet",
|
|
74
74
|
setup(e) {
|
|
75
75
|
const { queue: n } = ye();
|
|
76
|
-
return (t, r) => (m(!0),
|
|
76
|
+
return (t, r) => (m(!0), S(N, null, te(l(n), (o) => (m(), g(W(o.component), q({
|
|
77
77
|
key: o.id,
|
|
78
78
|
ref_for: !0
|
|
79
79
|
}, o.props, {
|
|
@@ -83,7 +83,7 @@ const Me = /* @__PURE__ */ k({
|
|
|
83
83
|
}
|
|
84
84
|
});
|
|
85
85
|
function ae() {
|
|
86
|
-
const { toastQueue: e } =
|
|
86
|
+
const { toastQueue: e } = P();
|
|
87
87
|
function n() {
|
|
88
88
|
let o;
|
|
89
89
|
for (; ; )
|
|
@@ -107,7 +107,7 @@ function ae() {
|
|
|
107
107
|
};
|
|
108
108
|
}
|
|
109
109
|
var x = /* @__PURE__ */ ((e) => (e.SUCCESS = "success", e.INFO = "info", e.WARNING = "warning", e.ERROR = "error", e))(x || {});
|
|
110
|
-
const
|
|
110
|
+
const Pe = { key: 0 }, Ne = { key: 1 }, Qe = /* @__PURE__ */ L({
|
|
111
111
|
__name: "ToastEntry",
|
|
112
112
|
props: {
|
|
113
113
|
entry: {}
|
|
@@ -123,7 +123,7 @@ const je = { key: 0 }, Ne = { key: 1 }, Pe = /* @__PURE__ */ k({
|
|
|
123
123
|
[x.SUCCESS]: "success",
|
|
124
124
|
[x.INFO]: "primary",
|
|
125
125
|
[x.WARNING]: "warning"
|
|
126
|
-
}, r = e, o = ae(), s =
|
|
126
|
+
}, r = e, o = ae(), s = k(-1), c = w(() => n[r.entry.type]), a = w(() => t[r.entry.type]), { t: i } = ne({ useScope: "global" });
|
|
127
127
|
function f() {
|
|
128
128
|
window.clearTimeout(s.value), o.removeFromQueue(r.entry.id);
|
|
129
129
|
}
|
|
@@ -131,7 +131,7 @@ const je = { key: 0 }, Ne = { key: 1 }, Pe = /* @__PURE__ */ k({
|
|
|
131
131
|
s.value = window.setTimeout(() => {
|
|
132
132
|
f();
|
|
133
133
|
}, r.entry.timeout);
|
|
134
|
-
}), (
|
|
134
|
+
}), (y, V) => (m(), g(l(Ie), {
|
|
135
135
|
theme: "dark",
|
|
136
136
|
class: "toast-entry",
|
|
137
137
|
closable: "",
|
|
@@ -139,7 +139,7 @@ const je = { key: 0 }, Ne = { key: 1 }, Pe = /* @__PURE__ */ k({
|
|
|
139
139
|
density: "compact"
|
|
140
140
|
}, Te({
|
|
141
141
|
default: d(() => [
|
|
142
|
-
|
|
142
|
+
y.entry.translateMessage ? (m(), S("span", Pe, B(l(i)(y.entry.message)), 1)) : (m(), S("span", Ne, B(y.entry.message), 1))
|
|
143
143
|
]),
|
|
144
144
|
_: 2
|
|
145
145
|
}, [
|
|
@@ -160,22 +160,22 @@ const je = { key: 0 }, Ne = { key: 1 }, Pe = /* @__PURE__ */ k({
|
|
|
160
160
|
for (const [r, o] of n)
|
|
161
161
|
t[r] = o;
|
|
162
162
|
return t;
|
|
163
|
-
},
|
|
163
|
+
}, Fe = /* @__PURE__ */ G(Qe, [["__scopeId", "data-v-7b5e0267"]]), $e = /* @__PURE__ */ L({
|
|
164
164
|
__name: "ToastOutlet",
|
|
165
165
|
setup(e) {
|
|
166
|
-
const { queue: n } = ae(), { mobile: t } = _e(), r =
|
|
166
|
+
const { queue: n } = ae(), { mobile: t } = _e(), r = w(() => t.value ? "" : "toast-outlet--desktop");
|
|
167
167
|
function o(s) {
|
|
168
168
|
const { width: c } = s.getBoundingClientRect();
|
|
169
169
|
s instanceof HTMLElement && (s.style.width = `${c.toFixed()}px`);
|
|
170
170
|
}
|
|
171
|
-
return (s, c) => (m(),
|
|
171
|
+
return (s, c) => (m(), g(xe, {
|
|
172
172
|
name: "fade",
|
|
173
173
|
tag: "div",
|
|
174
174
|
class: ce(["toast-outlet", r.value]),
|
|
175
175
|
onBeforeLeave: o
|
|
176
176
|
}, {
|
|
177
177
|
default: d(() => [
|
|
178
|
-
(m(!0),
|
|
178
|
+
(m(!0), S(N, null, te(l(n), (a) => (m(), g(Fe, {
|
|
179
179
|
key: a.id,
|
|
180
180
|
entry: a
|
|
181
181
|
}, null, 8, ["entry"]))), 128))
|
|
@@ -183,15 +183,15 @@ const je = { key: 0 }, Ne = { key: 1 }, Pe = /* @__PURE__ */ k({
|
|
|
183
183
|
_: 1
|
|
184
184
|
}, 8, ["class"]));
|
|
185
185
|
}
|
|
186
|
-
}),
|
|
186
|
+
}), We = /* @__PURE__ */ G($e, [["__scopeId", "data-v-ba5c8268"]]), qe = k(!1);
|
|
187
187
|
function Ce() {
|
|
188
|
-
return
|
|
188
|
+
return qe;
|
|
189
189
|
}
|
|
190
|
-
const
|
|
190
|
+
const Ge = /* @__PURE__ */ L({
|
|
191
191
|
__name: "LoadingOverlay",
|
|
192
192
|
setup(e) {
|
|
193
193
|
const n = Ce();
|
|
194
|
-
return (t, r) => (m(),
|
|
194
|
+
return (t, r) => (m(), g(l(be), {
|
|
195
195
|
modelValue: l(n),
|
|
196
196
|
"onUpdate:modelValue": r[0] || (r[0] = (o) => Ve(n) ? n.value = o : null),
|
|
197
197
|
persistent: "",
|
|
@@ -207,16 +207,16 @@ const qe = /* @__PURE__ */ k({
|
|
|
207
207
|
_: 1
|
|
208
208
|
}, 8, ["modelValue"]));
|
|
209
209
|
}
|
|
210
|
-
}),
|
|
210
|
+
}), vt = /* @__PURE__ */ L({
|
|
211
211
|
__name: "UiKitOutlet",
|
|
212
212
|
setup(e) {
|
|
213
|
-
return (n, t) => (m(),
|
|
213
|
+
return (n, t) => (m(), S(N, null, [
|
|
214
214
|
u(Me),
|
|
215
|
-
u(
|
|
216
|
-
u(
|
|
215
|
+
u(We),
|
|
216
|
+
u(Ge)
|
|
217
217
|
], 64));
|
|
218
218
|
}
|
|
219
|
-
}),
|
|
219
|
+
}), h = /* @__PURE__ */ L({
|
|
220
220
|
__name: "MaybeTranslation",
|
|
221
221
|
props: {
|
|
222
222
|
content: {},
|
|
@@ -224,111 +224,111 @@ const qe = /* @__PURE__ */ k({
|
|
|
224
224
|
},
|
|
225
225
|
setup(e) {
|
|
226
226
|
const { t: n } = ne({ useScope: "global" });
|
|
227
|
-
return (t, r) => t.translate ? (m(),
|
|
227
|
+
return (t, r) => t.translate ? (m(), S(N, { key: 0 }, [
|
|
228
228
|
oe(B(l(n)(t.content)), 1)
|
|
229
|
-
], 64)) : (m(),
|
|
229
|
+
], 64)) : (m(), S(N, { key: 1 }, [
|
|
230
230
|
oe(B(t.content), 1)
|
|
231
231
|
], 64));
|
|
232
232
|
}
|
|
233
|
-
}),
|
|
233
|
+
}), Be = { class: "d-flex justify-space-between pr-2 py-2" }, He = 650, Ke = /* @__PURE__ */ L({
|
|
234
234
|
__name: "InfoDialog",
|
|
235
235
|
props: {
|
|
236
236
|
data: {}
|
|
237
237
|
},
|
|
238
238
|
emits: ["resolve", "reject"],
|
|
239
239
|
setup(e, { emit: n }) {
|
|
240
|
-
const t = e, r = n, { options: { i18n: { messages: { close: o } } } } =
|
|
240
|
+
const t = e, r = n, { options: { i18n: { messages: { close: o } } } } = P(), s = {
|
|
241
241
|
text: o,
|
|
242
242
|
translateText: !0,
|
|
243
243
|
value: null
|
|
244
244
|
};
|
|
245
245
|
let c = null;
|
|
246
|
-
const a =
|
|
246
|
+
const a = k(!0), i = w(() => Object.hasOwn(t.data, "content") ? {
|
|
247
247
|
content: t.data.content,
|
|
248
248
|
translateContent: t.data.translateContent
|
|
249
|
-
} : null), f =
|
|
249
|
+
} : null), f = w(() => Object.hasOwn(t.data, "component") ? {
|
|
250
250
|
component: t.data.component,
|
|
251
251
|
props: t.data.props
|
|
252
|
-
} : null),
|
|
252
|
+
} : null), y = w(() => t.data.defaultCta === !1 ? null : $({}, s, t.data.defaultCta));
|
|
253
253
|
function V(p) {
|
|
254
|
-
|
|
254
|
+
b(p) ? p.action() : O(p.value);
|
|
255
255
|
}
|
|
256
|
-
function
|
|
256
|
+
function b(p) {
|
|
257
257
|
return Object.hasOwn(p, "action");
|
|
258
258
|
}
|
|
259
|
-
function
|
|
259
|
+
function O(p = null) {
|
|
260
260
|
c = p, a.value = !1;
|
|
261
261
|
}
|
|
262
|
-
function
|
|
262
|
+
function E() {
|
|
263
263
|
r("resolve", c);
|
|
264
264
|
}
|
|
265
|
-
return (p,
|
|
265
|
+
return (p, A) => (m(), g(l(z), {
|
|
266
266
|
modelValue: a.value,
|
|
267
|
-
"onUpdate:modelValue":
|
|
268
|
-
"max-width": p.data.width ??
|
|
269
|
-
onAfterLeave:
|
|
267
|
+
"onUpdate:modelValue": A[1] || (A[1] = (D) => a.value = D),
|
|
268
|
+
"max-width": p.data.width ?? He,
|
|
269
|
+
onAfterLeave: E
|
|
270
270
|
}, {
|
|
271
271
|
default: d(() => [
|
|
272
272
|
u(l(Y), { class: "info-dialog-card" }, {
|
|
273
273
|
default: d(() => [
|
|
274
|
-
F("div",
|
|
274
|
+
F("div", Be, [
|
|
275
275
|
u(l(de), null, {
|
|
276
276
|
default: d(() => [
|
|
277
|
-
u(
|
|
277
|
+
u(h, {
|
|
278
278
|
translate: p.data.translateTitle,
|
|
279
279
|
content: p.data.title
|
|
280
280
|
}, null, 8, ["translate", "content"])
|
|
281
281
|
]),
|
|
282
282
|
_: 1
|
|
283
283
|
}),
|
|
284
|
-
u(l(
|
|
284
|
+
u(l(R), {
|
|
285
285
|
icon: "$close",
|
|
286
286
|
variant: "text",
|
|
287
|
-
onClick:
|
|
287
|
+
onClick: A[0] || (A[0] = (D) => O(null))
|
|
288
288
|
})
|
|
289
289
|
]),
|
|
290
|
-
i.value ? (m(),
|
|
290
|
+
i.value ? (m(), g(l(me), { key: 0 }, {
|
|
291
291
|
default: d(() => [
|
|
292
292
|
F("p", null, [
|
|
293
|
-
u(
|
|
293
|
+
u(h, {
|
|
294
294
|
translate: i.value.translateContent,
|
|
295
295
|
content: i.value.content
|
|
296
296
|
}, null, 8, ["translate", "content"])
|
|
297
297
|
])
|
|
298
298
|
]),
|
|
299
299
|
_: 1
|
|
300
|
-
})) :
|
|
301
|
-
f.value ? (m(),
|
|
300
|
+
})) : M("", !0),
|
|
301
|
+
f.value ? (m(), g(W(f.value.component), ie(q({ key: 1 }, f.value.props)), null, 16)) : M("", !0),
|
|
302
302
|
u(l(X), { class: "justify-end" }, {
|
|
303
303
|
default: d(() => [
|
|
304
|
-
(m(!0),
|
|
305
|
-
key:
|
|
304
|
+
(m(!0), S(N, null, te(p.data.additionalCta ?? [], (D, I) => (m(), g(l(R), {
|
|
305
|
+
key: I,
|
|
306
306
|
color: "primary",
|
|
307
307
|
variant: "text",
|
|
308
|
-
onClick: () => V(
|
|
308
|
+
onClick: () => V(D)
|
|
309
309
|
}, {
|
|
310
310
|
default: d(() => [
|
|
311
|
-
u(
|
|
312
|
-
translate:
|
|
313
|
-
content:
|
|
311
|
+
u(h, {
|
|
312
|
+
translate: D.translateText,
|
|
313
|
+
content: D.text
|
|
314
314
|
}, null, 8, ["translate", "content"])
|
|
315
315
|
]),
|
|
316
316
|
_: 2
|
|
317
317
|
}, 1032, ["onClick"]))), 128)),
|
|
318
|
-
|
|
318
|
+
y.value ? (m(), g(l(R), {
|
|
319
319
|
key: 0,
|
|
320
320
|
color: "primary",
|
|
321
321
|
variant: "elevated",
|
|
322
|
-
onClick:
|
|
322
|
+
onClick: O
|
|
323
323
|
}, {
|
|
324
324
|
default: d(() => [
|
|
325
|
-
u(
|
|
326
|
-
translate:
|
|
327
|
-
content:
|
|
325
|
+
u(h, {
|
|
326
|
+
translate: y.value.translateText,
|
|
327
|
+
content: y.value.text
|
|
328
328
|
}, null, 8, ["translate", "content"])
|
|
329
329
|
]),
|
|
330
330
|
_: 1
|
|
331
|
-
})) :
|
|
331
|
+
})) : M("", !0)
|
|
332
332
|
]),
|
|
333
333
|
_: 1
|
|
334
334
|
})
|
|
@@ -339,16 +339,16 @@ const qe = /* @__PURE__ */ k({
|
|
|
339
339
|
_: 1
|
|
340
340
|
}, 8, ["modelValue", "max-width"]));
|
|
341
341
|
}
|
|
342
|
-
}),
|
|
343
|
-
var
|
|
342
|
+
}), ze = /* @__PURE__ */ G(Ke, [["__scopeId", "data-v-0f8116ef"]]);
|
|
343
|
+
var j = /* @__PURE__ */ ((e) => (e.SMALL = "sm", e.LARGE = "lg", e))(j || {});
|
|
344
344
|
function K(e, n) {
|
|
345
345
|
const r = {
|
|
346
|
-
text:
|
|
346
|
+
text: P().options.i18n.messages[n],
|
|
347
347
|
translateText: !0
|
|
348
348
|
};
|
|
349
349
|
return $(r, e);
|
|
350
350
|
}
|
|
351
|
-
const
|
|
351
|
+
const Ye = /* @__PURE__ */ L({
|
|
352
352
|
__name: "PromptDialog",
|
|
353
353
|
props: {
|
|
354
354
|
data: {}
|
|
@@ -356,32 +356,32 @@ const ze = /* @__PURE__ */ k({
|
|
|
356
356
|
emits: ["resolve", "reject"],
|
|
357
357
|
setup(e, { emit: n }) {
|
|
358
358
|
const t = e, r = n, o = {
|
|
359
|
-
[
|
|
360
|
-
[
|
|
361
|
-
}, s = K(t.data.saveCta, "save"), c = K(t.data.abortCta, "cancel"), a =
|
|
359
|
+
[j.SMALL]: 650,
|
|
360
|
+
[j.LARGE]: 1200
|
|
361
|
+
}, s = K(t.data.saveCta, "save"), c = K(t.data.abortCta, "cancel"), a = k(!0), i = k(le(t.data.initialValue) ?? null), f = k(null), { mobile: y } = _e(), V = w(() => t.data.required && !i.value), b = w(() => o[t.data.size ?? j.SMALL]), O = w(() => t.data.size === j.LARGE ? y.value : !1), E = w(() => t.data.size === j.LARGE ? "secondary" : "primary");
|
|
362
362
|
function p() {
|
|
363
363
|
return t.data.props ?? {};
|
|
364
364
|
}
|
|
365
|
-
function
|
|
365
|
+
function A() {
|
|
366
366
|
i.value = le(t.data.initialValue) ?? null, a.value = !1;
|
|
367
367
|
}
|
|
368
|
-
function
|
|
368
|
+
function D() {
|
|
369
369
|
a.value = !1;
|
|
370
370
|
}
|
|
371
|
-
function
|
|
371
|
+
function I() {
|
|
372
372
|
if (t.data.required && !i.value) {
|
|
373
373
|
r("reject");
|
|
374
374
|
return;
|
|
375
375
|
}
|
|
376
376
|
r("resolve", i.value);
|
|
377
377
|
}
|
|
378
|
-
return (
|
|
378
|
+
return (T, U) => (m(), g(l(z), {
|
|
379
379
|
modelValue: a.value,
|
|
380
|
-
"onUpdate:modelValue":
|
|
381
|
-
"max-width":
|
|
382
|
-
fullscreen:
|
|
383
|
-
scrollable:
|
|
384
|
-
onAfterLeave:
|
|
380
|
+
"onUpdate:modelValue": U[1] || (U[1] = (Q) => a.value = Q),
|
|
381
|
+
"max-width": b.value,
|
|
382
|
+
fullscreen: O.value,
|
|
383
|
+
scrollable: T.data.size === l(j).LARGE,
|
|
384
|
+
onAfterLeave: I
|
|
385
385
|
}, {
|
|
386
386
|
default: d(() => [
|
|
387
387
|
u(l(Y), { class: "prompt-dialog-card" }, {
|
|
@@ -390,9 +390,9 @@ const ze = /* @__PURE__ */ k({
|
|
|
390
390
|
default: d(() => [
|
|
391
391
|
u(l(pe), null, {
|
|
392
392
|
default: d(() => [
|
|
393
|
-
u(
|
|
394
|
-
translate:
|
|
395
|
-
content:
|
|
393
|
+
u(h, {
|
|
394
|
+
translate: T.data.translateTitle,
|
|
395
|
+
content: T.data.title
|
|
396
396
|
}, null, 8, ["translate", "content"])
|
|
397
397
|
]),
|
|
398
398
|
_: 1
|
|
@@ -403,42 +403,42 @@ const ze = /* @__PURE__ */ k({
|
|
|
403
403
|
ref: f,
|
|
404
404
|
class: "prompt-dialog-toolbar-slot"
|
|
405
405
|
}, null, 512),
|
|
406
|
-
u(l(
|
|
406
|
+
u(l(R), {
|
|
407
407
|
icon: "mdi-close",
|
|
408
|
-
onClick:
|
|
408
|
+
onClick: A
|
|
409
409
|
})
|
|
410
410
|
]),
|
|
411
411
|
_: 1
|
|
412
412
|
}),
|
|
413
|
-
f.value ? (m(),
|
|
413
|
+
f.value ? (m(), g(W(T.data.component), q({ key: 0 }, p(), {
|
|
414
414
|
modelValue: i.value,
|
|
415
|
-
"onUpdate:modelValue":
|
|
415
|
+
"onUpdate:modelValue": U[0] || (U[0] = (Q) => i.value = Q),
|
|
416
416
|
toolbar: f.value
|
|
417
|
-
}), null, 16, ["modelValue", "toolbar"])) :
|
|
417
|
+
}), null, 16, ["modelValue", "toolbar"])) : M("", !0),
|
|
418
418
|
u(l(ve)),
|
|
419
419
|
u(l(X), null, {
|
|
420
420
|
default: d(() => [
|
|
421
421
|
u(l(H)),
|
|
422
|
-
u(l(
|
|
423
|
-
color:
|
|
424
|
-
onClick:
|
|
422
|
+
u(l(R), {
|
|
423
|
+
color: E.value,
|
|
424
|
+
onClick: A
|
|
425
425
|
}, {
|
|
426
426
|
default: d(() => [
|
|
427
|
-
u(
|
|
427
|
+
u(h, {
|
|
428
428
|
translate: l(c).translateText,
|
|
429
429
|
content: l(c).text
|
|
430
430
|
}, null, 8, ["translate", "content"])
|
|
431
431
|
]),
|
|
432
432
|
_: 1
|
|
433
433
|
}, 8, ["color"]),
|
|
434
|
-
u(l(
|
|
434
|
+
u(l(R), {
|
|
435
435
|
variant: "elevated",
|
|
436
|
-
color:
|
|
436
|
+
color: E.value,
|
|
437
437
|
disabled: V.value,
|
|
438
|
-
onClick:
|
|
438
|
+
onClick: D
|
|
439
439
|
}, {
|
|
440
440
|
default: d(() => [
|
|
441
|
-
u(
|
|
441
|
+
u(h, {
|
|
442
442
|
translate: l(s).translateText,
|
|
443
443
|
content: l(s).text
|
|
444
444
|
}, null, 8, ["translate", "content"])
|
|
@@ -455,14 +455,14 @@ const ze = /* @__PURE__ */ k({
|
|
|
455
455
|
_: 1
|
|
456
456
|
}, 8, ["modelValue", "max-width", "fullscreen", "scrollable"]));
|
|
457
457
|
}
|
|
458
|
-
}),
|
|
458
|
+
}), Xe = /* @__PURE__ */ G(Ye, [["__scopeId", "data-v-6cec23a5"]]), Ze = { class: "d-flex justify-space-between pr-2 py-2" }, Je = 550, et = /* @__PURE__ */ L({
|
|
459
459
|
__name: "ConfirmDialog",
|
|
460
460
|
props: {
|
|
461
461
|
data: {}
|
|
462
462
|
},
|
|
463
463
|
emits: ["resolve", "reject"],
|
|
464
464
|
setup(e, { emit: n }) {
|
|
465
|
-
const t = e, r = n, { options: { i18n: { messages: { yes: o, no: s } } } } =
|
|
465
|
+
const t = e, r = n, { options: { i18n: { messages: { yes: o, no: s } } } } = P(), c = {
|
|
466
466
|
text: o,
|
|
467
467
|
translateText: !0
|
|
468
468
|
}, a = {
|
|
@@ -470,90 +470,90 @@ const ze = /* @__PURE__ */ k({
|
|
|
470
470
|
translateText: !0
|
|
471
471
|
};
|
|
472
472
|
let i = !1;
|
|
473
|
-
const f =
|
|
473
|
+
const f = k(!0), y = w(() => Object.hasOwn(t.data, "content") ? {
|
|
474
474
|
content: t.data.content,
|
|
475
475
|
translateContent: t.data.translateContent
|
|
476
|
-
} : null), V =
|
|
476
|
+
} : null), V = w(() => Object.hasOwn(t.data, "component") ? {
|
|
477
477
|
component: t.data.component,
|
|
478
478
|
props: t.data.props
|
|
479
|
-
} : null),
|
|
480
|
-
function
|
|
479
|
+
} : null), b = w(() => $({}, c, t.data.confirmCta)), O = w(() => $({}, a, t.data.rejectCta)), E = w(() => t.data.highlightCta ?? "confirm"), p = w(() => t.data.level ?? "primary");
|
|
480
|
+
function A() {
|
|
481
481
|
f.value = !1;
|
|
482
482
|
}
|
|
483
|
-
function
|
|
483
|
+
function D() {
|
|
484
484
|
i = !0, f.value = !1;
|
|
485
485
|
}
|
|
486
|
-
function
|
|
486
|
+
function I() {
|
|
487
487
|
if (t.data.throwOnReject && !i) {
|
|
488
488
|
r("reject");
|
|
489
489
|
return;
|
|
490
490
|
}
|
|
491
491
|
r("resolve", i);
|
|
492
492
|
}
|
|
493
|
-
return (
|
|
493
|
+
return (T, U) => (m(), g(l(z), {
|
|
494
494
|
modelValue: f.value,
|
|
495
|
-
"onUpdate:modelValue":
|
|
496
|
-
persistent: !!
|
|
497
|
-
"max-width":
|
|
498
|
-
onAfterLeave:
|
|
495
|
+
"onUpdate:modelValue": U[0] || (U[0] = (Q) => f.value = Q),
|
|
496
|
+
persistent: !!T.data.permanent,
|
|
497
|
+
"max-width": T.data.maxWidth ?? Je,
|
|
498
|
+
onAfterLeave: I
|
|
499
499
|
}, {
|
|
500
500
|
default: d(() => [
|
|
501
501
|
u(l(Y), { class: "confirm-dialog-card" }, {
|
|
502
502
|
default: d(() => [
|
|
503
|
-
F("div",
|
|
503
|
+
F("div", Ze, [
|
|
504
504
|
u(l(de), null, {
|
|
505
505
|
default: d(() => [
|
|
506
|
-
u(
|
|
507
|
-
translate:
|
|
508
|
-
content:
|
|
506
|
+
u(h, {
|
|
507
|
+
translate: T.data.translateTitle,
|
|
508
|
+
content: T.data.title
|
|
509
509
|
}, null, 8, ["translate", "content"])
|
|
510
510
|
]),
|
|
511
511
|
_: 1
|
|
512
512
|
}),
|
|
513
|
-
|
|
513
|
+
T.data.permanent ? M("", !0) : (m(), g(l(R), {
|
|
514
514
|
key: 0,
|
|
515
515
|
icon: "$close",
|
|
516
516
|
variant: "text",
|
|
517
|
-
onClick:
|
|
517
|
+
onClick: A
|
|
518
518
|
}))
|
|
519
519
|
]),
|
|
520
|
-
|
|
520
|
+
y.value ? (m(), g(l(me), { key: 0 }, {
|
|
521
521
|
default: d(() => [
|
|
522
|
-
u(
|
|
523
|
-
translate:
|
|
524
|
-
content:
|
|
522
|
+
u(h, {
|
|
523
|
+
translate: y.value.translateContent,
|
|
524
|
+
content: y.value.content
|
|
525
525
|
}, null, 8, ["translate", "content"])
|
|
526
526
|
]),
|
|
527
527
|
_: 1
|
|
528
|
-
})) :
|
|
529
|
-
V.value ? (m(),
|
|
528
|
+
})) : M("", !0),
|
|
529
|
+
V.value ? (m(), g(W(V.value.component), ie(q({ key: 1 }, V.value.props)), null, 16)) : M("", !0),
|
|
530
530
|
u(l(X), { class: "justify-end" }, {
|
|
531
531
|
default: d(() => [
|
|
532
532
|
F("div", {
|
|
533
|
-
class: ce(["d-flex align-center",
|
|
533
|
+
class: ce(["d-flex align-center", E.value === "confirm" ? "" : "flex-row-reverse"])
|
|
534
534
|
}, [
|
|
535
|
-
u(l(
|
|
536
|
-
variant:
|
|
535
|
+
u(l(R), {
|
|
536
|
+
variant: E.value === "reject" ? "elevated" : "text",
|
|
537
537
|
color: p.value,
|
|
538
|
-
onClick:
|
|
538
|
+
onClick: A
|
|
539
539
|
}, {
|
|
540
540
|
default: d(() => [
|
|
541
|
-
u(
|
|
542
|
-
translate:
|
|
543
|
-
content:
|
|
541
|
+
u(h, {
|
|
542
|
+
translate: O.value.translateText,
|
|
543
|
+
content: O.value.text
|
|
544
544
|
}, null, 8, ["translate", "content"])
|
|
545
545
|
]),
|
|
546
546
|
_: 1
|
|
547
547
|
}, 8, ["variant", "color"]),
|
|
548
|
-
u(l(
|
|
549
|
-
variant:
|
|
548
|
+
u(l(R), {
|
|
549
|
+
variant: E.value === "confirm" ? "elevated" : "text",
|
|
550
550
|
color: p.value,
|
|
551
|
-
onClick:
|
|
551
|
+
onClick: D
|
|
552
552
|
}, {
|
|
553
553
|
default: d(() => [
|
|
554
|
-
u(
|
|
555
|
-
translate:
|
|
556
|
-
content:
|
|
554
|
+
u(h, {
|
|
555
|
+
translate: b.value.translateText,
|
|
556
|
+
content: b.value.text
|
|
557
557
|
}, null, 8, ["translate", "content"])
|
|
558
558
|
]),
|
|
559
559
|
_: 1
|
|
@@ -569,22 +569,22 @@ const ze = /* @__PURE__ */ k({
|
|
|
569
569
|
_: 1
|
|
570
570
|
}, 8, ["modelValue", "persistent", "max-width"]));
|
|
571
571
|
}
|
|
572
|
-
}),
|
|
573
|
-
function
|
|
572
|
+
}), tt = /* @__PURE__ */ G(et, [["__scopeId", "data-v-3e8b3358"]]);
|
|
573
|
+
function nt(e) {
|
|
574
574
|
return e ? new Promise((n) => {
|
|
575
575
|
setTimeout(() => {
|
|
576
576
|
n();
|
|
577
577
|
}, e);
|
|
578
578
|
}) : Promise.resolve();
|
|
579
579
|
}
|
|
580
|
-
function
|
|
581
|
-
const { options: { loading: { delay: t, overlay: r } } } =
|
|
580
|
+
function at(e, n = {}) {
|
|
581
|
+
const { options: { loading: { delay: t, overlay: r } } } = P(), o = k(!1), s = Ce();
|
|
582
582
|
async function c(...a) {
|
|
583
583
|
o.value = !0, r && (s.value = !0);
|
|
584
584
|
try {
|
|
585
585
|
const [i] = await Promise.all([
|
|
586
586
|
e(...a),
|
|
587
|
-
|
|
587
|
+
nt(t)
|
|
588
588
|
]);
|
|
589
589
|
return i;
|
|
590
590
|
} catch (i) {
|
|
@@ -595,43 +595,45 @@ function nt(e, n = {}) {
|
|
|
595
595
|
}
|
|
596
596
|
return { loading: ee(o), action: c };
|
|
597
597
|
}
|
|
598
|
-
const
|
|
598
|
+
const ot = /* @__PURE__ */ L({
|
|
599
599
|
__name: "FormDialog",
|
|
600
600
|
props: {
|
|
601
601
|
data: {}
|
|
602
602
|
},
|
|
603
603
|
emits: ["resolve", "reject"],
|
|
604
604
|
setup(e, { emit: n }) {
|
|
605
|
-
const t = e, r = n, o = K(t.data.saveCta, "save"), s = K(t.data.abortCta, "cancel"), c =
|
|
606
|
-
|
|
605
|
+
const t = e, r = n, o = K(t.data.saveCta, "save"), s = K(t.data.abortCta, "cancel"), c = De("formComponent"), a = k(!0), i = Oe(), { loading: f, action: y } = at(p), V = w(() => ({
|
|
606
|
+
global: {
|
|
607
|
+
disabled: f.value
|
|
608
|
+
}
|
|
609
|
+
}));
|
|
610
|
+
let b = null;
|
|
611
|
+
function O() {
|
|
607
612
|
return t.data.props ?? {};
|
|
608
613
|
}
|
|
609
|
-
async function
|
|
610
|
-
await i.value.$validate() && await
|
|
614
|
+
async function E() {
|
|
615
|
+
await i.value.$validate() && await y();
|
|
611
616
|
}
|
|
612
|
-
async function
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
return;
|
|
618
|
-
}
|
|
619
|
-
if (typeof t.data.action == "function") {
|
|
620
|
-
const O = await t.data.action(g);
|
|
621
|
-
r("resolve", O);
|
|
622
|
-
} else
|
|
623
|
-
r("resolve", g);
|
|
617
|
+
async function p() {
|
|
618
|
+
if (!c.value)
|
|
619
|
+
throw new Error("Form component not mounted");
|
|
620
|
+
const I = await c.value.finish();
|
|
621
|
+
typeof t.data.action == "function" ? b = await t.data.action(I) : b = I;
|
|
624
622
|
}
|
|
625
|
-
function
|
|
623
|
+
function A() {
|
|
626
624
|
a.value = !1;
|
|
627
625
|
}
|
|
628
|
-
function
|
|
629
|
-
|
|
626
|
+
function D() {
|
|
627
|
+
if (t.data.rejectOnEmpty && b === null) {
|
|
628
|
+
r("reject");
|
|
629
|
+
return;
|
|
630
|
+
}
|
|
631
|
+
r("resolve", b);
|
|
630
632
|
}
|
|
631
|
-
return (
|
|
633
|
+
return (I, T) => (m(), g(l(z), {
|
|
632
634
|
modelValue: a.value,
|
|
633
|
-
"onUpdate:modelValue":
|
|
634
|
-
onAfterLeave:
|
|
635
|
+
"onUpdate:modelValue": T[0] || (T[0] = (U) => a.value = U),
|
|
636
|
+
onAfterLeave: D,
|
|
635
637
|
"max-width": "1200",
|
|
636
638
|
scrollable: ""
|
|
637
639
|
}, {
|
|
@@ -642,49 +644,54 @@ const at = /* @__PURE__ */ k({
|
|
|
642
644
|
default: d(() => [
|
|
643
645
|
u(l(pe), null, {
|
|
644
646
|
default: d(() => [
|
|
645
|
-
u(
|
|
646
|
-
content:
|
|
647
|
-
translate: !!
|
|
647
|
+
u(h, {
|
|
648
|
+
content: I.data.title,
|
|
649
|
+
translate: !!I.data.translateTitle
|
|
648
650
|
}, null, 8, ["content", "translate"])
|
|
649
651
|
]),
|
|
650
652
|
_: 1
|
|
651
653
|
}),
|
|
652
654
|
u(l(H)),
|
|
653
|
-
u(l(
|
|
655
|
+
u(l(R), {
|
|
654
656
|
icon: "mdi-close",
|
|
655
|
-
onClick:
|
|
657
|
+
onClick: A
|
|
656
658
|
})
|
|
657
659
|
]),
|
|
658
660
|
_: 1
|
|
659
661
|
}),
|
|
660
|
-
(
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
662
|
+
u(l(ke), { defaults: V.value }, {
|
|
663
|
+
default: d(() => [
|
|
664
|
+
(m(), g(W(I.data.component), q({
|
|
665
|
+
ref_key: "formComponent",
|
|
666
|
+
ref: c,
|
|
667
|
+
onSave: E
|
|
668
|
+
}, O()), null, 16))
|
|
669
|
+
]),
|
|
670
|
+
_: 1
|
|
671
|
+
}, 8, ["defaults"]),
|
|
665
672
|
u(l(ve)),
|
|
666
673
|
u(l(X), null, {
|
|
667
674
|
default: d(() => [
|
|
668
675
|
u(l(H)),
|
|
669
|
-
u(l(
|
|
670
|
-
onClick:
|
|
676
|
+
u(l(R), {
|
|
677
|
+
onClick: A,
|
|
671
678
|
color: "primary"
|
|
672
679
|
}, {
|
|
673
680
|
default: d(() => [
|
|
674
|
-
u(
|
|
681
|
+
u(h, {
|
|
675
682
|
content: l(s).text,
|
|
676
683
|
translate: l(s).translateText
|
|
677
684
|
}, null, 8, ["content", "translate"])
|
|
678
685
|
]),
|
|
679
686
|
_: 1
|
|
680
687
|
}),
|
|
681
|
-
u(l(
|
|
682
|
-
onClick:
|
|
688
|
+
u(l(R), {
|
|
689
|
+
onClick: E,
|
|
683
690
|
variant: "elevated",
|
|
684
691
|
color: "primary"
|
|
685
692
|
}, {
|
|
686
693
|
default: d(() => [
|
|
687
|
-
u(
|
|
694
|
+
u(h, {
|
|
688
695
|
translate: l(o).translateText,
|
|
689
696
|
content: l(o).text
|
|
690
697
|
}, null, 8, ["translate", "content"])
|
|
@@ -702,7 +709,7 @@ const at = /* @__PURE__ */ k({
|
|
|
702
709
|
}, 8, ["modelValue"]));
|
|
703
710
|
}
|
|
704
711
|
});
|
|
705
|
-
function
|
|
712
|
+
function _t() {
|
|
706
713
|
const e = ye();
|
|
707
714
|
function n(s, c) {
|
|
708
715
|
let a;
|
|
@@ -711,7 +718,7 @@ function vt() {
|
|
|
711
718
|
content: c ?? ""
|
|
712
719
|
} : a = s, new Promise((i) => {
|
|
713
720
|
const f = {
|
|
714
|
-
component:
|
|
721
|
+
component: ze,
|
|
715
722
|
props: { data: a },
|
|
716
723
|
resolve: i,
|
|
717
724
|
reject: () => {
|
|
@@ -724,7 +731,7 @@ function vt() {
|
|
|
724
731
|
function t(s) {
|
|
725
732
|
return new Promise((c, a) => {
|
|
726
733
|
const i = {
|
|
727
|
-
component:
|
|
734
|
+
component: Xe,
|
|
728
735
|
props: { data: s },
|
|
729
736
|
resolve: c,
|
|
730
737
|
reject: a
|
|
@@ -738,12 +745,12 @@ function vt() {
|
|
|
738
745
|
title: s,
|
|
739
746
|
content: c,
|
|
740
747
|
level: a
|
|
741
|
-
}), new Promise((f,
|
|
748
|
+
}), new Promise((f, y) => {
|
|
742
749
|
const V = {
|
|
743
|
-
component:
|
|
750
|
+
component: tt,
|
|
744
751
|
props: { data: i },
|
|
745
752
|
resolve: f,
|
|
746
|
-
reject:
|
|
753
|
+
reject: y
|
|
747
754
|
};
|
|
748
755
|
e.addToQueue(V);
|
|
749
756
|
});
|
|
@@ -751,7 +758,7 @@ function vt() {
|
|
|
751
758
|
function o(s) {
|
|
752
759
|
return new Promise((c, a) => {
|
|
753
760
|
const i = {
|
|
754
|
-
component:
|
|
761
|
+
component: ot,
|
|
755
762
|
props: { data: s },
|
|
756
763
|
resolve: c,
|
|
757
764
|
reject: a
|
|
@@ -766,9 +773,9 @@ function vt() {
|
|
|
766
773
|
form: o
|
|
767
774
|
};
|
|
768
775
|
}
|
|
769
|
-
var
|
|
770
|
-
function
|
|
771
|
-
const e = ae(), { options: { toast: { timeout: n } } } =
|
|
776
|
+
var lt = /* @__PURE__ */ ((e) => (e.DEFAULT = "primary", e.WARNING = "warning", e.DANGER = "error", e))(lt || {});
|
|
777
|
+
function gt() {
|
|
778
|
+
const e = ae(), { options: { toast: { timeout: n } } } = P();
|
|
772
779
|
function t(c, a) {
|
|
773
780
|
return new Promise((i) => {
|
|
774
781
|
e.addToQueue({
|
|
@@ -828,13 +835,13 @@ const _ = v.createI18nMessage({
|
|
|
828
835
|
messagePath(e) {
|
|
829
836
|
return console.log(e.$validator), "validation." + e.$validator;
|
|
830
837
|
}
|
|
831
|
-
}),
|
|
838
|
+
}), yt = _(v.required), Ct = _(v.requiredIf, { withArguments: !0 }), wt = _(v.requiredUnless, { withArguments: !0 }), ht = _(v.minLength, { withArguments: !0 }), At = _(v.maxLength, { withArguments: !0 }), Tt = _(v.minValue, { withArguments: !0 }), xt = _(v.maxValue, { withArguments: !0 }), Vt = _(v.between, { withArguments: !0 }), Dt = _(v.alpha), It = _(v.alphaNum), Rt = _(v.numeric), bt = _(v.integer), Et = _(v.decimal), kt = _(v.email), Ot = _(v.ipAddress), Lt = _(v.macAddress), Ut = _(v.sameAs, { withArguments: !0 }), St = _(v.url), jt = _((e) => re.withParams({
|
|
832
839
|
type: "oneOf",
|
|
833
840
|
values: e
|
|
834
841
|
}, (n) => {
|
|
835
842
|
const t = Array.isArray(e) ? e : Object.values(e);
|
|
836
843
|
return !re.req(n) || t.includes(n);
|
|
837
|
-
}), { withArguments: !0 }),
|
|
844
|
+
}), { withArguments: !0 }), rt = () => ({
|
|
838
845
|
loading: {
|
|
839
846
|
delay: 2e3,
|
|
840
847
|
overlay: !1
|
|
@@ -852,8 +859,8 @@ const _ = v.createI18nMessage({
|
|
|
852
859
|
}
|
|
853
860
|
}
|
|
854
861
|
});
|
|
855
|
-
function
|
|
856
|
-
const n =
|
|
862
|
+
function st(e) {
|
|
863
|
+
const n = k([]), t = k([]);
|
|
857
864
|
return {
|
|
858
865
|
dialogQueue: n,
|
|
859
866
|
toastQueue: t,
|
|
@@ -862,36 +869,36 @@ function rt(e) {
|
|
|
862
869
|
}
|
|
863
870
|
function Mt(e) {
|
|
864
871
|
return (n) => {
|
|
865
|
-
const t =
|
|
872
|
+
const t = rt(), r = $(t, e), o = st(r);
|
|
866
873
|
n.__SCHWARZDAVID_UIKIT_SYMBOL__ = Symbol("@schwarzdavid/ui-kit"), n.provide(n.__SCHWARZDAVID_UIKIT_SYMBOL__, o);
|
|
867
874
|
};
|
|
868
875
|
}
|
|
869
876
|
export {
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
877
|
+
lt as ConfirmDialogLevel,
|
|
878
|
+
j as PromptDialogSize,
|
|
879
|
+
vt as UiKitOutlet,
|
|
880
|
+
Dt as alpha,
|
|
874
881
|
It as alphaNum,
|
|
875
|
-
|
|
882
|
+
Vt as between,
|
|
876
883
|
Mt as createUIKit,
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
884
|
+
Et as decimal,
|
|
885
|
+
kt as email,
|
|
886
|
+
bt as integer,
|
|
887
|
+
Ot as ipAddress,
|
|
881
888
|
Lt as maxAddress,
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
889
|
+
At as maxLength,
|
|
890
|
+
xt as maxValue,
|
|
891
|
+
ht as minLength,
|
|
892
|
+
Tt as minValue,
|
|
893
|
+
Rt as numeric,
|
|
894
|
+
jt as oneOf,
|
|
895
|
+
yt as required,
|
|
896
|
+
Ct as requiredIf,
|
|
897
|
+
wt as requiredUnless,
|
|
898
|
+
Ut as sameAs,
|
|
899
|
+
St as url,
|
|
900
|
+
_t as useDialog,
|
|
901
|
+
at as useLoading,
|
|
895
902
|
Ce as useLoadingOverlay,
|
|
896
|
-
|
|
903
|
+
gt as useToast
|
|
897
904
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@schwarzdavid/ui-kit",
|
|
3
|
-
"version": "0.0.1-alpha.
|
|
3
|
+
"version": "0.0.1-alpha.9",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"preview": "vite preview",
|
|
@@ -10,7 +10,8 @@
|
|
|
10
10
|
"build:docs": "storybook build",
|
|
11
11
|
"lint": "eslint .",
|
|
12
12
|
"lint:fix": "eslint . --fix",
|
|
13
|
-
"prepublishOnly": "npm run build:lib"
|
|
13
|
+
"prepublishOnly": "npm run build:lib",
|
|
14
|
+
"update:version": "npm version prerelease --preid alpha"
|
|
14
15
|
},
|
|
15
16
|
"author": "David Schwarz <david@ists-wurscht.at>",
|
|
16
17
|
"license": "Apache-2.0",
|