@schwarzdavid/ui-kit 0.0.1-alpha.6 → 0.0.1-alpha.7
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/{style.css → ui-kit.css} +1 -1
- package/dist/ui-kit.d.ts +113 -49
- package/dist/ui-kit.js +590 -465
- package/package.json +42 -39
package/dist/ui-kit.js
CHANGED
|
@@ -1,62 +1,79 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { VAlert as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
1
|
+
import { getCurrentInstance as we, inject as he, readonly as ee, markRaw as ue, defineComponent as k, openBlock as m, createElementBlock as U, Fragment as P, renderList as te, unref as l, createBlock as y, resolveDynamicComponent as W, mergeProps as q, ref as R, computed as A, 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 j, normalizeProps as ie, toValue as le, useTemplateRef as Ie } from "vue";
|
|
2
|
+
import { VAlert as De, VIcon as Re, VOverlay as be, VProgressCircular as Ee, VDialog as z, VCard as Y, VCardTitle as de, VBtn as I, VCardText as me, VCardActions as X, VToolbar as fe, VToolbarTitle as pe, VSpacer as H, VDivider as ve } from "vuetify/components";
|
|
3
|
+
import { useI18n as ne } from "vue-i18n";
|
|
4
|
+
import { useDisplay as _e } from "vuetify";
|
|
5
|
+
import { merge as $ } from "lodash";
|
|
6
|
+
import ke from "@vuelidate/core";
|
|
7
|
+
import * as v from "@vuelidate/validators";
|
|
8
|
+
import { helpers as re } from "@vuelidate/validators";
|
|
9
|
+
const w = [];
|
|
6
10
|
for (let e = 0; e < 256; ++e)
|
|
7
|
-
|
|
8
|
-
function
|
|
9
|
-
return (
|
|
11
|
+
w.push((e + 256).toString(16).slice(1));
|
|
12
|
+
function Le(e, n = 0) {
|
|
13
|
+
return (w[e[n + 0]] + w[e[n + 1]] + w[e[n + 2]] + w[e[n + 3]] + "-" + w[e[n + 4]] + w[e[n + 5]] + "-" + w[e[n + 6]] + w[e[n + 7]] + "-" + w[e[n + 8]] + w[e[n + 9]] + "-" + w[e[n + 10]] + w[e[n + 11]] + w[e[n + 12]] + w[e[n + 13]] + w[e[n + 14]] + w[e[n + 15]]).toLowerCase();
|
|
10
14
|
}
|
|
11
|
-
let
|
|
12
|
-
const
|
|
13
|
-
function
|
|
14
|
-
if (!
|
|
15
|
+
let Z;
|
|
16
|
+
const Oe = new Uint8Array(16);
|
|
17
|
+
function Ue() {
|
|
18
|
+
if (!Z) {
|
|
15
19
|
if (typeof crypto > "u" || !crypto.getRandomValues)
|
|
16
20
|
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
17
|
-
|
|
21
|
+
Z = crypto.getRandomValues.bind(crypto);
|
|
18
22
|
}
|
|
19
|
-
return
|
|
23
|
+
return Z(Oe);
|
|
20
24
|
}
|
|
21
|
-
const
|
|
22
|
-
function
|
|
23
|
-
|
|
24
|
-
|
|
25
|
+
const Se = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), se = { randomUUID: Se };
|
|
26
|
+
function ge(e, n, t) {
|
|
27
|
+
var o;
|
|
28
|
+
if (se.randomUUID && !n && !e)
|
|
29
|
+
return se.randomUUID();
|
|
25
30
|
e = e || {};
|
|
26
|
-
const
|
|
27
|
-
|
|
31
|
+
const r = e.random ?? ((o = e.rng) == null ? void 0 : o.call(e)) ?? Ue();
|
|
32
|
+
if (r.length < 16)
|
|
33
|
+
throw new Error("Random bytes length must be >= 16");
|
|
34
|
+
return r[6] = r[6] & 15 | 64, r[8] = r[8] & 63 | 128, Le(r);
|
|
28
35
|
}
|
|
29
|
-
|
|
30
|
-
function
|
|
31
|
-
|
|
32
|
-
|
|
36
|
+
var J = /* @__PURE__ */ ((e) => (e.NOT_INSTALLED = "Need to install with `app.use` function", e.UNEXPECTED_ERROR = "Unexpected error", e))(J || {});
|
|
37
|
+
function N() {
|
|
38
|
+
const e = we();
|
|
39
|
+
if (!(e != null && e.appContext.app.__SCHWARZDAVID_UIKIT_SYMBOL__))
|
|
40
|
+
throw new Error(J.NOT_INSTALLED);
|
|
41
|
+
const n = e.appContext.app.__SCHWARZDAVID_UIKIT_SYMBOL__, t = he(n);
|
|
42
|
+
if (!t)
|
|
43
|
+
throw new Error(J.UNEXPECTED_ERROR);
|
|
44
|
+
return t;
|
|
45
|
+
}
|
|
46
|
+
function ye() {
|
|
47
|
+
const { dialogQueue: e } = N();
|
|
48
|
+
function n() {
|
|
49
|
+
let o;
|
|
33
50
|
for (; ; )
|
|
34
|
-
if (
|
|
35
|
-
return
|
|
51
|
+
if (o = ge(), !e.value.some((s) => s.id === o))
|
|
52
|
+
return o;
|
|
36
53
|
}
|
|
37
|
-
function t(
|
|
38
|
-
const
|
|
39
|
-
|
|
40
|
-
}, reject: (
|
|
41
|
-
|
|
54
|
+
function t(o) {
|
|
55
|
+
const s = n(), i = ue({ ...o, id: s, resolve: (f) => {
|
|
56
|
+
r(s), o.resolve(f);
|
|
57
|
+
}, reject: (f) => {
|
|
58
|
+
r(s), o.reject(f);
|
|
42
59
|
} });
|
|
43
|
-
return
|
|
60
|
+
return e.value.push(i), i;
|
|
44
61
|
}
|
|
45
|
-
function
|
|
46
|
-
const
|
|
47
|
-
|
|
62
|
+
function r(o) {
|
|
63
|
+
const s = typeof o == "string" ? o : o.id, c = e.value.findIndex((a) => a.id === s);
|
|
64
|
+
c >= 0 && e.value.splice(c, 1);
|
|
48
65
|
}
|
|
49
66
|
return {
|
|
50
|
-
queue:
|
|
67
|
+
queue: ee(e),
|
|
51
68
|
addToQueue: t,
|
|
52
|
-
removeFromQueue:
|
|
69
|
+
removeFromQueue: r
|
|
53
70
|
};
|
|
54
71
|
}
|
|
55
|
-
const
|
|
72
|
+
const Me = /* @__PURE__ */ k({
|
|
56
73
|
__name: "DialogOutlet",
|
|
57
74
|
setup(e) {
|
|
58
|
-
const { queue:
|
|
59
|
-
return (
|
|
75
|
+
const { queue: n } = ye();
|
|
76
|
+
return (t, r) => (m(!0), U(P, null, te(l(n), (o) => (m(), y(W(o.component), q({
|
|
60
77
|
key: o.id,
|
|
61
78
|
ref_for: !0
|
|
62
79
|
}, o.props, {
|
|
@@ -64,161 +81,124 @@ const Le = /* @__PURE__ */ I({
|
|
|
64
81
|
onReject: o.reject
|
|
65
82
|
}), null, 16, ["onResolve", "onReject"]))), 128));
|
|
66
83
|
}
|
|
67
|
-
})
|
|
68
|
-
function
|
|
69
|
-
|
|
70
|
-
|
|
84
|
+
});
|
|
85
|
+
function ae() {
|
|
86
|
+
const { toastQueue: e } = N();
|
|
87
|
+
function n() {
|
|
88
|
+
let o;
|
|
71
89
|
for (; ; )
|
|
72
|
-
if (
|
|
73
|
-
return
|
|
90
|
+
if (o = ge(), !e.value.some((s) => s.id === o))
|
|
91
|
+
return o;
|
|
74
92
|
}
|
|
75
|
-
function t(
|
|
76
|
-
const
|
|
77
|
-
|
|
93
|
+
function t(o) {
|
|
94
|
+
const s = n(), a = ue({ ...o, id: s, resolve: () => {
|
|
95
|
+
r(s), o.resolve();
|
|
78
96
|
} });
|
|
79
|
-
return
|
|
97
|
+
return e.value.unshift(a), a;
|
|
80
98
|
}
|
|
81
|
-
function
|
|
82
|
-
const
|
|
83
|
-
|
|
99
|
+
function r(o) {
|
|
100
|
+
const s = typeof o == "string" ? o : o.id, c = e.value.findIndex((a) => a.id === s);
|
|
101
|
+
c >= 0 && e.value.splice(c, 1);
|
|
84
102
|
}
|
|
85
103
|
return {
|
|
86
|
-
queue:
|
|
104
|
+
queue: ee(e),
|
|
87
105
|
addToQueue: t,
|
|
88
|
-
removeFromQueue:
|
|
106
|
+
removeFromQueue: r
|
|
89
107
|
};
|
|
90
108
|
}
|
|
91
|
-
var
|
|
92
|
-
const
|
|
109
|
+
var x = /* @__PURE__ */ ((e) => (e.SUCCESS = "success", e.INFO = "info", e.WARNING = "warning", e.ERROR = "error", e))(x || {});
|
|
110
|
+
const je = { key: 0 }, Ne = { key: 1 }, Pe = /* @__PURE__ */ k({
|
|
93
111
|
__name: "ToastEntry",
|
|
94
112
|
props: {
|
|
95
113
|
entry: {}
|
|
96
114
|
},
|
|
97
115
|
setup(e) {
|
|
98
|
-
const
|
|
99
|
-
[
|
|
100
|
-
[
|
|
101
|
-
[
|
|
102
|
-
[
|
|
103
|
-
},
|
|
104
|
-
[
|
|
105
|
-
[
|
|
106
|
-
[
|
|
107
|
-
[
|
|
108
|
-
},
|
|
109
|
-
function
|
|
110
|
-
window.clearTimeout(
|
|
116
|
+
const n = {
|
|
117
|
+
[x.ERROR]: "mdi-alert-circle-outline",
|
|
118
|
+
[x.SUCCESS]: "mdi-check-circle-outline",
|
|
119
|
+
[x.INFO]: "mdi-information-outline",
|
|
120
|
+
[x.WARNING]: "mdi-alert-circle-outline"
|
|
121
|
+
}, t = {
|
|
122
|
+
[x.ERROR]: "error",
|
|
123
|
+
[x.SUCCESS]: "success",
|
|
124
|
+
[x.INFO]: "primary",
|
|
125
|
+
[x.WARNING]: "warning"
|
|
126
|
+
}, r = e, o = ae(), s = R(-1), c = A(() => n[r.entry.type]), a = A(() => t[r.entry.type]), { t: i } = ne({ useScope: "global" });
|
|
127
|
+
function f() {
|
|
128
|
+
window.clearTimeout(s.value), o.removeFromQueue(r.entry.id);
|
|
111
129
|
}
|
|
112
|
-
return
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
},
|
|
116
|
-
}), (
|
|
130
|
+
return Ae(() => {
|
|
131
|
+
s.value = window.setTimeout(() => {
|
|
132
|
+
f();
|
|
133
|
+
}, r.entry.timeout);
|
|
134
|
+
}), (C, V) => (m(), y(l(De), {
|
|
117
135
|
theme: "dark",
|
|
118
136
|
class: "toast-entry",
|
|
119
137
|
closable: "",
|
|
120
|
-
"onClick:close":
|
|
138
|
+
"onClick:close": f,
|
|
121
139
|
density: "compact"
|
|
122
|
-
},
|
|
140
|
+
}, Te({
|
|
123
141
|
default: d(() => [
|
|
124
|
-
|
|
142
|
+
C.entry.translateMessage ? (m(), U("span", je, B(l(i)(C.entry.message)), 1)) : (m(), U("span", Ne, B(C.entry.message), 1))
|
|
125
143
|
]),
|
|
126
144
|
_: 2
|
|
127
145
|
}, [
|
|
128
|
-
|
|
146
|
+
c.value ? {
|
|
129
147
|
name: "prepend",
|
|
130
148
|
fn: d(() => [
|
|
131
|
-
|
|
132
|
-
icon:
|
|
133
|
-
color:
|
|
149
|
+
u(l(Re), {
|
|
150
|
+
icon: c.value,
|
|
151
|
+
color: a.value
|
|
134
152
|
}, null, 8, ["icon", "color"])
|
|
135
153
|
]),
|
|
136
154
|
key: "0"
|
|
137
155
|
} : void 0
|
|
138
156
|
]), 1024));
|
|
139
157
|
}
|
|
140
|
-
}),
|
|
141
|
-
const
|
|
142
|
-
for (const [
|
|
143
|
-
|
|
144
|
-
return
|
|
145
|
-
},
|
|
146
|
-
function Q() {
|
|
147
|
-
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "";
|
|
148
|
-
if (Q.cache.has(e)) return Q.cache.get(e);
|
|
149
|
-
const t = e.replace(/[^a-z]/gi, "-").replace(/\B([A-Z])/g, "-$1").toLowerCase();
|
|
150
|
-
return Q.cache.set(e, t), t;
|
|
151
|
-
}
|
|
152
|
-
Q.cache = /* @__PURE__ */ new Map();
|
|
153
|
-
function Pe(e, t) {
|
|
154
|
-
const n = ye();
|
|
155
|
-
if (!n)
|
|
156
|
-
throw new Error(`[Vuetify] ${e} must be called from inside a setup function`);
|
|
157
|
-
return n;
|
|
158
|
-
}
|
|
159
|
-
function Ne() {
|
|
160
|
-
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "composables";
|
|
161
|
-
const t = Pe(e).type;
|
|
162
|
-
return Q((t == null ? void 0 : t.aliasName) || (t == null ? void 0 : t.name));
|
|
163
|
-
}
|
|
164
|
-
const Se = Symbol.for("vuetify:display");
|
|
165
|
-
function pe() {
|
|
166
|
-
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : Ne();
|
|
167
|
-
const n = re(Se);
|
|
168
|
-
if (!n) throw new Error("Could not find Vuetify display injection");
|
|
169
|
-
const a = p(() => {
|
|
170
|
-
if (e.mobile != null) return e.mobile;
|
|
171
|
-
if (!e.mobileBreakpoint) return n.mobile.value;
|
|
172
|
-
const l = typeof e.mobileBreakpoint == "number" ? e.mobileBreakpoint : n.thresholds.value[e.mobileBreakpoint];
|
|
173
|
-
return n.width.value < l;
|
|
174
|
-
}), o = p(() => t ? {
|
|
175
|
-
[`${t}--mobile`]: a.value
|
|
176
|
-
} : {});
|
|
177
|
-
return {
|
|
178
|
-
...n,
|
|
179
|
-
displayClasses: o,
|
|
180
|
-
mobile: a
|
|
181
|
-
};
|
|
182
|
-
}
|
|
183
|
-
const Qe = /* @__PURE__ */ I({
|
|
158
|
+
}), G = (e, n) => {
|
|
159
|
+
const t = e.__vccOpts || e;
|
|
160
|
+
for (const [r, o] of n)
|
|
161
|
+
t[r] = o;
|
|
162
|
+
return t;
|
|
163
|
+
}, Qe = /* @__PURE__ */ G(Pe, [["__scopeId", "data-v-7b5e0267"]]), Fe = /* @__PURE__ */ k({
|
|
184
164
|
__name: "ToastOutlet",
|
|
185
165
|
setup(e) {
|
|
186
|
-
const { queue:
|
|
187
|
-
function o(
|
|
188
|
-
const { width:
|
|
189
|
-
|
|
166
|
+
const { queue: n } = ae(), { mobile: t } = _e(), r = A(() => t.value ? "" : "toast-outlet--desktop");
|
|
167
|
+
function o(s) {
|
|
168
|
+
const { width: c } = s.getBoundingClientRect();
|
|
169
|
+
s instanceof HTMLElement && (s.style.width = `${c.toFixed()}px`);
|
|
190
170
|
}
|
|
191
|
-
return (
|
|
171
|
+
return (s, c) => (m(), y(xe, {
|
|
192
172
|
name: "fade",
|
|
193
173
|
tag: "div",
|
|
194
|
-
class:
|
|
174
|
+
class: ce(["toast-outlet", r.value]),
|
|
195
175
|
onBeforeLeave: o
|
|
196
176
|
}, {
|
|
197
177
|
default: d(() => [
|
|
198
|
-
(m(!0),
|
|
199
|
-
key:
|
|
200
|
-
entry:
|
|
178
|
+
(m(!0), U(P, null, te(l(n), (a) => (m(), y(Qe, {
|
|
179
|
+
key: a.id,
|
|
180
|
+
entry: a
|
|
201
181
|
}, null, 8, ["entry"]))), 128))
|
|
202
182
|
]),
|
|
203
183
|
_: 1
|
|
204
184
|
}, 8, ["class"]));
|
|
205
185
|
}
|
|
206
|
-
}), $e = /* @__PURE__ */
|
|
207
|
-
function
|
|
208
|
-
return
|
|
186
|
+
}), $e = /* @__PURE__ */ G(Fe, [["__scopeId", "data-v-ba5c8268"]]), We = R(!1);
|
|
187
|
+
function Ce() {
|
|
188
|
+
return We;
|
|
209
189
|
}
|
|
210
|
-
const
|
|
190
|
+
const qe = /* @__PURE__ */ k({
|
|
211
191
|
__name: "LoadingOverlay",
|
|
212
192
|
setup(e) {
|
|
213
|
-
const
|
|
214
|
-
return (
|
|
215
|
-
modelValue:
|
|
216
|
-
"onUpdate:modelValue":
|
|
193
|
+
const n = Ce();
|
|
194
|
+
return (t, r) => (m(), y(l(be), {
|
|
195
|
+
modelValue: l(n),
|
|
196
|
+
"onUpdate:modelValue": r[0] || (r[0] = (o) => Ve(n) ? n.value = o : null),
|
|
217
197
|
persistent: "",
|
|
218
198
|
class: "d-flex align-center justify-center"
|
|
219
199
|
}, {
|
|
220
200
|
default: d(() => [
|
|
221
|
-
|
|
201
|
+
u(l(Ee), {
|
|
222
202
|
indeterminate: "",
|
|
223
203
|
color: "primary",
|
|
224
204
|
size: "100"
|
|
@@ -227,128 +207,128 @@ const Me = /* @__PURE__ */ I({
|
|
|
227
207
|
_: 1
|
|
228
208
|
}, 8, ["modelValue"]));
|
|
229
209
|
}
|
|
230
|
-
}),
|
|
210
|
+
}), pt = /* @__PURE__ */ k({
|
|
231
211
|
__name: "UiKitOutlet",
|
|
232
212
|
setup(e) {
|
|
233
|
-
return (
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
213
|
+
return (n, t) => (m(), U(P, null, [
|
|
214
|
+
u(Me),
|
|
215
|
+
u($e),
|
|
216
|
+
u(qe)
|
|
237
217
|
], 64));
|
|
238
218
|
}
|
|
239
|
-
}), T = /* @__PURE__ */
|
|
219
|
+
}), T = /* @__PURE__ */ k({
|
|
240
220
|
__name: "MaybeTranslation",
|
|
241
221
|
props: {
|
|
242
222
|
content: {},
|
|
243
223
|
translate: { type: Boolean, default: !0 }
|
|
244
224
|
},
|
|
245
225
|
setup(e) {
|
|
246
|
-
const { t } =
|
|
247
|
-
return (
|
|
248
|
-
|
|
249
|
-
], 64)) : (m(),
|
|
250
|
-
|
|
226
|
+
const { t: n } = ne({ useScope: "global" });
|
|
227
|
+
return (t, r) => t.translate ? (m(), U(P, { key: 0 }, [
|
|
228
|
+
oe(B(l(n)(t.content)), 1)
|
|
229
|
+
], 64)) : (m(), U(P, { key: 1 }, [
|
|
230
|
+
oe(B(t.content), 1)
|
|
251
231
|
], 64));
|
|
252
232
|
}
|
|
253
|
-
}),
|
|
233
|
+
}), Ge = { class: "d-flex justify-space-between pr-2 py-2" }, Be = 650, He = /* @__PURE__ */ k({
|
|
254
234
|
__name: "InfoDialog",
|
|
255
235
|
props: {
|
|
256
236
|
data: {}
|
|
257
237
|
},
|
|
258
238
|
emits: ["resolve", "reject"],
|
|
259
|
-
setup(e, { emit:
|
|
260
|
-
const
|
|
261
|
-
text:
|
|
239
|
+
setup(e, { emit: n }) {
|
|
240
|
+
const t = e, r = n, { options: { i18n: { messages: { close: o } } } } = N(), s = {
|
|
241
|
+
text: o,
|
|
262
242
|
translateText: !0,
|
|
263
243
|
value: null
|
|
264
244
|
};
|
|
265
|
-
let
|
|
266
|
-
const
|
|
267
|
-
content:
|
|
268
|
-
translateContent:
|
|
269
|
-
} : null),
|
|
270
|
-
component:
|
|
271
|
-
props:
|
|
272
|
-
} : null),
|
|
273
|
-
function
|
|
274
|
-
|
|
245
|
+
let c = null;
|
|
246
|
+
const a = R(!0), i = A(() => Object.hasOwn(t.data, "content") ? {
|
|
247
|
+
content: t.data.content,
|
|
248
|
+
translateContent: t.data.translateContent
|
|
249
|
+
} : null), f = A(() => Object.hasOwn(t.data, "component") ? {
|
|
250
|
+
component: t.data.component,
|
|
251
|
+
props: t.data.props
|
|
252
|
+
} : null), C = A(() => t.data.defaultCta === !1 ? null : $({}, s, t.data.defaultCta));
|
|
253
|
+
function V(p) {
|
|
254
|
+
L(p) ? p.action() : b(p.value);
|
|
275
255
|
}
|
|
276
|
-
function
|
|
277
|
-
return Object.hasOwn(
|
|
256
|
+
function L(p) {
|
|
257
|
+
return Object.hasOwn(p, "action");
|
|
278
258
|
}
|
|
279
|
-
function
|
|
280
|
-
|
|
259
|
+
function b(p = null) {
|
|
260
|
+
c = p, a.value = !1;
|
|
281
261
|
}
|
|
282
|
-
function
|
|
283
|
-
|
|
262
|
+
function D() {
|
|
263
|
+
r("resolve", c);
|
|
284
264
|
}
|
|
285
|
-
return (
|
|
286
|
-
modelValue:
|
|
287
|
-
"onUpdate:modelValue":
|
|
288
|
-
"max-width":
|
|
289
|
-
onAfterLeave:
|
|
265
|
+
return (p, g) => (m(), y(l(z), {
|
|
266
|
+
modelValue: a.value,
|
|
267
|
+
"onUpdate:modelValue": g[1] || (g[1] = (h) => a.value = h),
|
|
268
|
+
"max-width": p.data.width ?? Be,
|
|
269
|
+
onAfterLeave: D
|
|
290
270
|
}, {
|
|
291
271
|
default: d(() => [
|
|
292
|
-
|
|
272
|
+
u(l(Y), { class: "info-dialog-card" }, {
|
|
293
273
|
default: d(() => [
|
|
294
|
-
|
|
295
|
-
|
|
274
|
+
F("div", Ge, [
|
|
275
|
+
u(l(de), null, {
|
|
296
276
|
default: d(() => [
|
|
297
|
-
|
|
298
|
-
translate:
|
|
299
|
-
content:
|
|
277
|
+
u(T, {
|
|
278
|
+
translate: p.data.translateTitle,
|
|
279
|
+
content: p.data.title
|
|
300
280
|
}, null, 8, ["translate", "content"])
|
|
301
281
|
]),
|
|
302
282
|
_: 1
|
|
303
283
|
}),
|
|
304
|
-
|
|
284
|
+
u(l(I), {
|
|
305
285
|
icon: "$close",
|
|
306
286
|
variant: "text",
|
|
307
|
-
onClick:
|
|
287
|
+
onClick: g[0] || (g[0] = (h) => b(null))
|
|
308
288
|
})
|
|
309
289
|
]),
|
|
310
|
-
|
|
290
|
+
i.value ? (m(), y(l(me), { key: 0 }, {
|
|
311
291
|
default: d(() => [
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
translate:
|
|
315
|
-
content:
|
|
292
|
+
F("p", null, [
|
|
293
|
+
u(T, {
|
|
294
|
+
translate: i.value.translateContent,
|
|
295
|
+
content: i.value.content
|
|
316
296
|
}, null, 8, ["translate", "content"])
|
|
317
297
|
])
|
|
318
298
|
]),
|
|
319
299
|
_: 1
|
|
320
|
-
})) :
|
|
321
|
-
|
|
322
|
-
|
|
300
|
+
})) : j("", !0),
|
|
301
|
+
f.value ? (m(), y(W(f.value.component), ie(q({ key: 1 }, f.value.props)), null, 16)) : j("", !0),
|
|
302
|
+
u(l(X), { class: "justify-end" }, {
|
|
323
303
|
default: d(() => [
|
|
324
|
-
(m(!0),
|
|
325
|
-
key:
|
|
304
|
+
(m(!0), U(P, null, te(p.data.additionalCta ?? [], (h, O) => (m(), y(l(I), {
|
|
305
|
+
key: O,
|
|
326
306
|
color: "primary",
|
|
327
307
|
variant: "text",
|
|
328
|
-
onClick: () =>
|
|
308
|
+
onClick: () => V(h)
|
|
329
309
|
}, {
|
|
330
310
|
default: d(() => [
|
|
331
|
-
|
|
332
|
-
translate:
|
|
333
|
-
content:
|
|
311
|
+
u(T, {
|
|
312
|
+
translate: h.translateText,
|
|
313
|
+
content: h.text
|
|
334
314
|
}, null, 8, ["translate", "content"])
|
|
335
315
|
]),
|
|
336
316
|
_: 2
|
|
337
317
|
}, 1032, ["onClick"]))), 128)),
|
|
338
|
-
|
|
318
|
+
C.value ? (m(), y(l(I), {
|
|
339
319
|
key: 0,
|
|
340
320
|
color: "primary",
|
|
341
321
|
variant: "elevated",
|
|
342
|
-
onClick:
|
|
322
|
+
onClick: b
|
|
343
323
|
}, {
|
|
344
324
|
default: d(() => [
|
|
345
|
-
|
|
346
|
-
translate:
|
|
347
|
-
content:
|
|
325
|
+
u(T, {
|
|
326
|
+
translate: C.value.translateText,
|
|
327
|
+
content: C.value.text
|
|
348
328
|
}, null, 8, ["translate", "content"])
|
|
349
329
|
]),
|
|
350
330
|
_: 1
|
|
351
|
-
})) :
|
|
331
|
+
})) : j("", !0)
|
|
352
332
|
]),
|
|
353
333
|
_: 1
|
|
354
334
|
})
|
|
@@ -359,104 +339,108 @@ const Me = /* @__PURE__ */ I({
|
|
|
359
339
|
_: 1
|
|
360
340
|
}, 8, ["modelValue", "max-width"]));
|
|
361
341
|
}
|
|
362
|
-
}),
|
|
363
|
-
var
|
|
364
|
-
|
|
342
|
+
}), Ke = /* @__PURE__ */ G(He, [["__scopeId", "data-v-0bb08e28"]]);
|
|
343
|
+
var M = /* @__PURE__ */ ((e) => (e.SMALL = "sm", e.LARGE = "lg", e))(M || {});
|
|
344
|
+
function K(e, n) {
|
|
345
|
+
const r = {
|
|
346
|
+
text: N().options.i18n.messages[n],
|
|
347
|
+
translateText: !0
|
|
348
|
+
};
|
|
349
|
+
return $(r, e);
|
|
350
|
+
}
|
|
351
|
+
const ze = /* @__PURE__ */ k({
|
|
365
352
|
__name: "PromptDialog",
|
|
366
353
|
props: {
|
|
367
354
|
data: {}
|
|
368
355
|
},
|
|
369
356
|
emits: ["resolve", "reject"],
|
|
370
|
-
setup(e, { emit:
|
|
371
|
-
const
|
|
372
|
-
[
|
|
373
|
-
[
|
|
374
|
-
},
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
}
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
}, r = x(!0), c = x(ne(n.data.initialValue) ?? null), _ = x(null), { mobile: w } = pe(), R = p(() => n.data.required && !c.value), h = p(() => o[n.data.size ?? E.SMALL]), U = p(() => n.data.size === E.LARGE ? w.value : !1), f = p(() => D({}, l, n.data.abortCta)), A = p(() => D({}, u, n.data.saveCta)), C = p(() => n.data.size === E.LARGE ? "secondary" : "primary");
|
|
381
|
-
function b() {
|
|
382
|
-
c.value = ne(n.data.initialValue) ?? null, r.value = !1;
|
|
357
|
+
setup(e, { emit: n }) {
|
|
358
|
+
const t = e, r = n, o = {
|
|
359
|
+
[M.SMALL]: 650,
|
|
360
|
+
[M.LARGE]: 1200
|
|
361
|
+
}, s = K(t.data.saveCta, "save"), c = K(t.data.abortCta, "cancel"), a = R(!0), i = R(le(t.data.initialValue) ?? null), f = R(null), { mobile: C } = _e(), V = A(() => t.data.required && !i.value), L = A(() => o[t.data.size ?? M.SMALL]), b = A(() => t.data.size === M.LARGE ? C.value : !1), D = A(() => t.data.size === M.LARGE ? "secondary" : "primary");
|
|
362
|
+
function p() {
|
|
363
|
+
return t.data.props ?? {};
|
|
364
|
+
}
|
|
365
|
+
function g() {
|
|
366
|
+
i.value = le(t.data.initialValue) ?? null, a.value = !1;
|
|
383
367
|
}
|
|
384
|
-
function
|
|
385
|
-
|
|
368
|
+
function h() {
|
|
369
|
+
a.value = !1;
|
|
386
370
|
}
|
|
387
|
-
function
|
|
388
|
-
if (
|
|
389
|
-
|
|
371
|
+
function O() {
|
|
372
|
+
if (t.data.required && !i.value) {
|
|
373
|
+
r("reject");
|
|
390
374
|
return;
|
|
391
375
|
}
|
|
392
|
-
|
|
376
|
+
r("resolve", i.value);
|
|
393
377
|
}
|
|
394
|
-
return (
|
|
395
|
-
modelValue:
|
|
396
|
-
"onUpdate:modelValue":
|
|
397
|
-
"max-width":
|
|
398
|
-
fullscreen:
|
|
399
|
-
scrollable:
|
|
400
|
-
onAfterLeave:
|
|
378
|
+
return (E, S) => (m(), y(l(z), {
|
|
379
|
+
modelValue: a.value,
|
|
380
|
+
"onUpdate:modelValue": S[1] || (S[1] = (Q) => a.value = Q),
|
|
381
|
+
"max-width": L.value,
|
|
382
|
+
fullscreen: b.value,
|
|
383
|
+
scrollable: E.data.size === l(M).LARGE,
|
|
384
|
+
onAfterLeave: O
|
|
401
385
|
}, {
|
|
402
386
|
default: d(() => [
|
|
403
|
-
|
|
387
|
+
u(l(Y), { class: "prompt-dialog-card" }, {
|
|
404
388
|
default: d(() => [
|
|
405
|
-
|
|
389
|
+
u(l(fe), { color: "primary" }, {
|
|
406
390
|
default: d(() => [
|
|
407
|
-
|
|
391
|
+
u(l(pe), null, {
|
|
408
392
|
default: d(() => [
|
|
409
|
-
|
|
410
|
-
translate:
|
|
411
|
-
content:
|
|
393
|
+
u(T, {
|
|
394
|
+
translate: E.data.translateTitle,
|
|
395
|
+
content: E.data.title
|
|
412
396
|
}, null, 8, ["translate", "content"])
|
|
413
397
|
]),
|
|
414
398
|
_: 1
|
|
415
399
|
}),
|
|
416
|
-
|
|
417
|
-
|
|
400
|
+
u(l(H)),
|
|
401
|
+
F("div", {
|
|
418
402
|
ref_key: "toolbar",
|
|
419
|
-
ref:
|
|
403
|
+
ref: f,
|
|
420
404
|
class: "prompt-dialog-toolbar-slot"
|
|
421
405
|
}, null, 512),
|
|
422
|
-
|
|
406
|
+
u(l(I), {
|
|
423
407
|
icon: "mdi-close",
|
|
424
|
-
onClick:
|
|
408
|
+
onClick: g
|
|
425
409
|
})
|
|
426
410
|
]),
|
|
427
411
|
_: 1
|
|
428
412
|
}),
|
|
429
|
-
|
|
430
|
-
modelValue:
|
|
431
|
-
"onUpdate:modelValue":
|
|
432
|
-
toolbar:
|
|
433
|
-
}), null, 16, ["modelValue", "toolbar"])) :
|
|
434
|
-
|
|
435
|
-
|
|
413
|
+
f.value ? (m(), y(W(E.data.component), q({ key: 0 }, p(), {
|
|
414
|
+
modelValue: i.value,
|
|
415
|
+
"onUpdate:modelValue": S[0] || (S[0] = (Q) => i.value = Q),
|
|
416
|
+
toolbar: f.value
|
|
417
|
+
}), null, 16, ["modelValue", "toolbar"])) : j("", !0),
|
|
418
|
+
u(l(ve)),
|
|
419
|
+
u(l(X), null, {
|
|
436
420
|
default: d(() => [
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
color:
|
|
440
|
-
onClick:
|
|
421
|
+
u(l(H)),
|
|
422
|
+
u(l(I), {
|
|
423
|
+
color: D.value,
|
|
424
|
+
onClick: g
|
|
441
425
|
}, {
|
|
442
426
|
default: d(() => [
|
|
443
|
-
|
|
444
|
-
translate:
|
|
445
|
-
content:
|
|
427
|
+
u(T, {
|
|
428
|
+
translate: l(c).translateText,
|
|
429
|
+
content: l(c).text
|
|
446
430
|
}, null, 8, ["translate", "content"])
|
|
447
431
|
]),
|
|
448
432
|
_: 1
|
|
449
433
|
}, 8, ["color"]),
|
|
450
|
-
|
|
434
|
+
u(l(I), {
|
|
451
435
|
variant: "elevated",
|
|
452
|
-
color:
|
|
453
|
-
disabled:
|
|
454
|
-
onClick:
|
|
436
|
+
color: D.value,
|
|
437
|
+
disabled: V.value,
|
|
438
|
+
onClick: h
|
|
455
439
|
}, {
|
|
456
440
|
default: d(() => [
|
|
457
|
-
|
|
458
|
-
translate:
|
|
459
|
-
content:
|
|
441
|
+
u(T, {
|
|
442
|
+
translate: l(s).translateText,
|
|
443
|
+
content: l(s).text
|
|
460
444
|
}, null, 8, ["translate", "content"])
|
|
461
445
|
]),
|
|
462
446
|
_: 1
|
|
@@ -471,105 +455,105 @@ const qe = /* @__PURE__ */ I({
|
|
|
471
455
|
_: 1
|
|
472
456
|
}, 8, ["modelValue", "max-width", "fullscreen", "scrollable"]));
|
|
473
457
|
}
|
|
474
|
-
}),
|
|
458
|
+
}), Ye = /* @__PURE__ */ G(ze, [["__scopeId", "data-v-6cec23a5"]]), Xe = { class: "d-flex justify-space-between pr-2 py-2" }, Ze = 550, Je = /* @__PURE__ */ k({
|
|
475
459
|
__name: "ConfirmDialog",
|
|
476
460
|
props: {
|
|
477
461
|
data: {}
|
|
478
462
|
},
|
|
479
463
|
emits: ["resolve", "reject"],
|
|
480
|
-
setup(e, { emit:
|
|
481
|
-
const
|
|
482
|
-
text:
|
|
464
|
+
setup(e, { emit: n }) {
|
|
465
|
+
const t = e, r = n, { options: { i18n: { messages: { yes: o, no: s } } } } = N(), c = {
|
|
466
|
+
text: o,
|
|
483
467
|
translateText: !0
|
|
484
|
-
},
|
|
485
|
-
text:
|
|
468
|
+
}, a = {
|
|
469
|
+
text: s,
|
|
486
470
|
translateText: !0
|
|
487
471
|
};
|
|
488
|
-
let
|
|
489
|
-
const
|
|
490
|
-
content:
|
|
491
|
-
translateContent:
|
|
492
|
-
} : null),
|
|
493
|
-
component:
|
|
494
|
-
props:
|
|
495
|
-
} : null),
|
|
496
|
-
function
|
|
497
|
-
|
|
472
|
+
let i = !1;
|
|
473
|
+
const f = R(!0), C = A(() => Object.hasOwn(t.data, "content") ? {
|
|
474
|
+
content: t.data.content,
|
|
475
|
+
translateContent: t.data.translateContent
|
|
476
|
+
} : null), V = A(() => Object.hasOwn(t.data, "component") ? {
|
|
477
|
+
component: t.data.component,
|
|
478
|
+
props: t.data.props
|
|
479
|
+
} : null), L = A(() => $({}, c, t.data.confirmCta)), b = A(() => $({}, a, t.data.rejectCta)), D = A(() => t.data.highlightCta ?? "confirm"), p = A(() => t.data.level ?? "primary");
|
|
480
|
+
function g() {
|
|
481
|
+
f.value = !1;
|
|
498
482
|
}
|
|
499
|
-
function
|
|
500
|
-
|
|
483
|
+
function h() {
|
|
484
|
+
i = !0, f.value = !1;
|
|
501
485
|
}
|
|
502
|
-
function
|
|
503
|
-
if (
|
|
504
|
-
|
|
486
|
+
function O() {
|
|
487
|
+
if (t.data.throwOnReject && !i) {
|
|
488
|
+
r("reject");
|
|
505
489
|
return;
|
|
506
490
|
}
|
|
507
|
-
|
|
491
|
+
r("resolve", i);
|
|
508
492
|
}
|
|
509
|
-
return (
|
|
510
|
-
modelValue:
|
|
511
|
-
"onUpdate:modelValue":
|
|
512
|
-
persistent: !!
|
|
513
|
-
"max-width":
|
|
514
|
-
onAfterLeave:
|
|
493
|
+
return (E, S) => (m(), y(l(z), {
|
|
494
|
+
modelValue: f.value,
|
|
495
|
+
"onUpdate:modelValue": S[0] || (S[0] = (Q) => f.value = Q),
|
|
496
|
+
persistent: !!E.data.permanent,
|
|
497
|
+
"max-width": E.data.maxWidth ?? Ze,
|
|
498
|
+
onAfterLeave: O
|
|
515
499
|
}, {
|
|
516
500
|
default: d(() => [
|
|
517
|
-
|
|
501
|
+
u(l(Y), { class: "confirm-dialog-card" }, {
|
|
518
502
|
default: d(() => [
|
|
519
|
-
|
|
520
|
-
|
|
503
|
+
F("div", Xe, [
|
|
504
|
+
u(l(de), null, {
|
|
521
505
|
default: d(() => [
|
|
522
|
-
|
|
523
|
-
translate:
|
|
524
|
-
content:
|
|
506
|
+
u(T, {
|
|
507
|
+
translate: E.data.translateTitle,
|
|
508
|
+
content: E.data.title
|
|
525
509
|
}, null, 8, ["translate", "content"])
|
|
526
510
|
]),
|
|
527
511
|
_: 1
|
|
528
512
|
}),
|
|
529
|
-
|
|
513
|
+
E.data.permanent ? j("", !0) : (m(), y(l(I), {
|
|
530
514
|
key: 0,
|
|
531
515
|
icon: "$close",
|
|
532
516
|
variant: "text",
|
|
533
|
-
onClick:
|
|
517
|
+
onClick: g
|
|
534
518
|
}))
|
|
535
519
|
]),
|
|
536
|
-
|
|
520
|
+
C.value ? (m(), y(l(me), { key: 0 }, {
|
|
537
521
|
default: d(() => [
|
|
538
|
-
|
|
539
|
-
translate:
|
|
540
|
-
content:
|
|
522
|
+
u(T, {
|
|
523
|
+
translate: C.value.translateContent,
|
|
524
|
+
content: C.value.content
|
|
541
525
|
}, null, 8, ["translate", "content"])
|
|
542
526
|
]),
|
|
543
527
|
_: 1
|
|
544
|
-
})) :
|
|
545
|
-
|
|
546
|
-
|
|
528
|
+
})) : j("", !0),
|
|
529
|
+
V.value ? (m(), y(W(V.value.component), ie(q({ key: 1 }, V.value.props)), null, 16)) : j("", !0),
|
|
530
|
+
u(l(X), { class: "justify-end" }, {
|
|
547
531
|
default: d(() => [
|
|
548
|
-
|
|
549
|
-
class:
|
|
532
|
+
F("div", {
|
|
533
|
+
class: ce(["d-flex align-center", D.value === "confirm" ? "" : "flex-row-reverse"])
|
|
550
534
|
}, [
|
|
551
|
-
|
|
552
|
-
variant:
|
|
553
|
-
color:
|
|
554
|
-
onClick:
|
|
535
|
+
u(l(I), {
|
|
536
|
+
variant: D.value === "reject" ? "elevated" : "text",
|
|
537
|
+
color: p.value,
|
|
538
|
+
onClick: g
|
|
555
539
|
}, {
|
|
556
540
|
default: d(() => [
|
|
557
|
-
|
|
558
|
-
translate:
|
|
559
|
-
content:
|
|
541
|
+
u(T, {
|
|
542
|
+
translate: b.value.translateText,
|
|
543
|
+
content: b.value.text
|
|
560
544
|
}, null, 8, ["translate", "content"])
|
|
561
545
|
]),
|
|
562
546
|
_: 1
|
|
563
547
|
}, 8, ["variant", "color"]),
|
|
564
|
-
|
|
565
|
-
variant:
|
|
566
|
-
color:
|
|
567
|
-
onClick:
|
|
548
|
+
u(l(I), {
|
|
549
|
+
variant: D.value === "confirm" ? "elevated" : "text",
|
|
550
|
+
color: p.value,
|
|
551
|
+
onClick: h
|
|
568
552
|
}, {
|
|
569
553
|
default: d(() => [
|
|
570
|
-
|
|
571
|
-
translate:
|
|
572
|
-
content:
|
|
554
|
+
u(T, {
|
|
555
|
+
translate: L.value.translateText,
|
|
556
|
+
content: L.value.text
|
|
573
557
|
}, null, 8, ["translate", "content"])
|
|
574
558
|
]),
|
|
575
559
|
_: 1
|
|
@@ -585,188 +569,329 @@ const qe = /* @__PURE__ */ I({
|
|
|
585
569
|
_: 1
|
|
586
570
|
}, 8, ["modelValue", "persistent", "max-width"]));
|
|
587
571
|
}
|
|
588
|
-
}),
|
|
589
|
-
function
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
572
|
+
}), et = /* @__PURE__ */ G(Je, [["__scopeId", "data-v-3e8b3358"]]);
|
|
573
|
+
function tt(e) {
|
|
574
|
+
return e ? new Promise((n) => {
|
|
575
|
+
setTimeout(() => {
|
|
576
|
+
n();
|
|
577
|
+
}, e);
|
|
578
|
+
}) : Promise.resolve();
|
|
579
|
+
}
|
|
580
|
+
function nt(e, n = {}) {
|
|
581
|
+
const { options: { loading: { delay: t, overlay: r } } } = N(), o = R(!1), s = Ce();
|
|
582
|
+
async function c(...a) {
|
|
583
|
+
o.value = !0, r && (s.value = !0);
|
|
584
|
+
try {
|
|
585
|
+
const [i] = await Promise.all([
|
|
586
|
+
e(...a),
|
|
587
|
+
tt(t)
|
|
588
|
+
]);
|
|
589
|
+
return i;
|
|
590
|
+
} catch (i) {
|
|
591
|
+
throw i;
|
|
592
|
+
} finally {
|
|
593
|
+
o.value = !1, r && (s.value = !1);
|
|
594
|
+
}
|
|
595
|
+
}
|
|
596
|
+
return { loading: ee(o), action: c };
|
|
597
|
+
}
|
|
598
|
+
const at = /* @__PURE__ */ k({
|
|
599
|
+
__name: "FormDialog",
|
|
600
|
+
props: {
|
|
601
|
+
data: {}
|
|
602
|
+
},
|
|
603
|
+
emits: ["resolve", "reject"],
|
|
604
|
+
setup(e, { emit: n }) {
|
|
605
|
+
const t = e, r = n, o = K(t.data.saveCta, "save"), s = K(t.data.abortCta, "cancel"), c = Ie("formComponent"), a = R(!0), i = ke(), { loading: f, action: C } = nt(b);
|
|
606
|
+
function V() {
|
|
607
|
+
return t.data.props ?? {};
|
|
608
|
+
}
|
|
609
|
+
async function L() {
|
|
610
|
+
await i.value.$validate() && await C();
|
|
611
|
+
}
|
|
612
|
+
async function b() {
|
|
613
|
+
var h;
|
|
614
|
+
const g = await ((h = c.value) == null ? void 0 : h.finish());
|
|
615
|
+
if (!g) {
|
|
616
|
+
console.warn("FormDialog: No result returned from form component.");
|
|
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);
|
|
624
|
+
}
|
|
625
|
+
function D() {
|
|
626
|
+
a.value = !1;
|
|
627
|
+
}
|
|
628
|
+
function p() {
|
|
629
|
+
r("resolve", null);
|
|
630
|
+
}
|
|
631
|
+
return (g, h) => (m(), y(l(z), {
|
|
632
|
+
modelValue: a.value,
|
|
633
|
+
"onUpdate:modelValue": h[0] || (h[0] = (O) => a.value = O),
|
|
634
|
+
onAfterLeave: p,
|
|
635
|
+
"max-width": "1200",
|
|
636
|
+
scrollable: ""
|
|
637
|
+
}, {
|
|
638
|
+
default: d(() => [
|
|
639
|
+
u(l(Y), null, {
|
|
640
|
+
default: d(() => [
|
|
641
|
+
u(l(fe), { color: "primary" }, {
|
|
642
|
+
default: d(() => [
|
|
643
|
+
u(l(pe), null, {
|
|
644
|
+
default: d(() => [
|
|
645
|
+
u(T, {
|
|
646
|
+
content: g.data.title,
|
|
647
|
+
translate: !!g.data.translateTitle
|
|
648
|
+
}, null, 8, ["content", "translate"])
|
|
649
|
+
]),
|
|
650
|
+
_: 1
|
|
651
|
+
}),
|
|
652
|
+
u(l(H)),
|
|
653
|
+
u(l(I), {
|
|
654
|
+
icon: "mdi-close",
|
|
655
|
+
onClick: D
|
|
656
|
+
})
|
|
657
|
+
]),
|
|
658
|
+
_: 1
|
|
659
|
+
}),
|
|
660
|
+
(m(), y(W(g.data.component), q({
|
|
661
|
+
ref_key: "formComponent",
|
|
662
|
+
ref: c,
|
|
663
|
+
onSave: L
|
|
664
|
+
}, V()), null, 16)),
|
|
665
|
+
u(l(ve)),
|
|
666
|
+
u(l(X), null, {
|
|
667
|
+
default: d(() => [
|
|
668
|
+
u(l(H)),
|
|
669
|
+
u(l(I), {
|
|
670
|
+
onClick: D,
|
|
671
|
+
color: "primary"
|
|
672
|
+
}, {
|
|
673
|
+
default: d(() => [
|
|
674
|
+
u(T, {
|
|
675
|
+
content: l(s).text,
|
|
676
|
+
translate: l(s).translateText
|
|
677
|
+
}, null, 8, ["content", "translate"])
|
|
678
|
+
]),
|
|
679
|
+
_: 1
|
|
680
|
+
}),
|
|
681
|
+
u(l(I), {
|
|
682
|
+
onClick: L,
|
|
683
|
+
variant: "elevated",
|
|
684
|
+
color: "primary"
|
|
685
|
+
}, {
|
|
686
|
+
default: d(() => [
|
|
687
|
+
u(T, {
|
|
688
|
+
translate: l(o).translateText,
|
|
689
|
+
content: l(o).text
|
|
690
|
+
}, null, 8, ["translate", "content"])
|
|
691
|
+
]),
|
|
692
|
+
_: 1
|
|
693
|
+
})
|
|
694
|
+
]),
|
|
695
|
+
_: 1
|
|
696
|
+
})
|
|
697
|
+
]),
|
|
698
|
+
_: 1
|
|
699
|
+
})
|
|
700
|
+
]),
|
|
701
|
+
_: 1
|
|
702
|
+
}, 8, ["modelValue"]));
|
|
703
|
+
}
|
|
704
|
+
});
|
|
705
|
+
function vt() {
|
|
706
|
+
const e = ye();
|
|
707
|
+
function n(s, c) {
|
|
708
|
+
let a;
|
|
709
|
+
return typeof s == "string" ? a = {
|
|
710
|
+
title: s,
|
|
711
|
+
content: c ?? ""
|
|
712
|
+
} : a = s, new Promise((i) => {
|
|
713
|
+
const f = {
|
|
714
|
+
component: Ke,
|
|
715
|
+
props: { data: a },
|
|
716
|
+
resolve: i,
|
|
601
717
|
reject: () => {
|
|
602
|
-
|
|
718
|
+
i(null);
|
|
603
719
|
}
|
|
604
720
|
};
|
|
605
|
-
e.addToQueue(
|
|
721
|
+
e.addToQueue(f);
|
|
606
722
|
});
|
|
607
723
|
}
|
|
608
|
-
function
|
|
609
|
-
return new Promise((
|
|
610
|
-
const
|
|
611
|
-
component:
|
|
612
|
-
props: { data:
|
|
613
|
-
resolve:
|
|
614
|
-
reject:
|
|
724
|
+
function t(s) {
|
|
725
|
+
return new Promise((c, a) => {
|
|
726
|
+
const i = {
|
|
727
|
+
component: Ye,
|
|
728
|
+
props: { data: s },
|
|
729
|
+
resolve: c,
|
|
730
|
+
reject: a
|
|
615
731
|
};
|
|
616
|
-
e.addToQueue(
|
|
732
|
+
e.addToQueue(i);
|
|
617
733
|
});
|
|
618
734
|
}
|
|
619
|
-
function
|
|
620
|
-
let
|
|
621
|
-
return typeof
|
|
622
|
-
title:
|
|
623
|
-
content:
|
|
624
|
-
level:
|
|
625
|
-
}), new Promise((
|
|
626
|
-
const
|
|
627
|
-
component:
|
|
628
|
-
props: { data:
|
|
735
|
+
function r(s, c, a) {
|
|
736
|
+
let i = s;
|
|
737
|
+
return typeof s == "string" && typeof c == "string" && (i = {
|
|
738
|
+
title: s,
|
|
739
|
+
content: c,
|
|
740
|
+
level: a
|
|
741
|
+
}), new Promise((f, C) => {
|
|
742
|
+
const V = {
|
|
743
|
+
component: et,
|
|
744
|
+
props: { data: i },
|
|
745
|
+
resolve: f,
|
|
746
|
+
reject: C
|
|
747
|
+
};
|
|
748
|
+
e.addToQueue(V);
|
|
749
|
+
});
|
|
750
|
+
}
|
|
751
|
+
function o(s) {
|
|
752
|
+
return new Promise((c, a) => {
|
|
753
|
+
const i = {
|
|
754
|
+
component: at,
|
|
755
|
+
props: { data: s },
|
|
629
756
|
resolve: c,
|
|
630
|
-
reject:
|
|
757
|
+
reject: a
|
|
631
758
|
};
|
|
632
|
-
e.addToQueue(
|
|
759
|
+
e.addToQueue(i);
|
|
633
760
|
});
|
|
634
761
|
}
|
|
635
762
|
return {
|
|
636
|
-
info:
|
|
637
|
-
prompt:
|
|
638
|
-
confirm:
|
|
763
|
+
info: n,
|
|
764
|
+
prompt: t,
|
|
765
|
+
confirm: r,
|
|
766
|
+
form: o
|
|
639
767
|
};
|
|
640
768
|
}
|
|
641
|
-
var
|
|
642
|
-
function
|
|
643
|
-
const e =
|
|
644
|
-
function t(
|
|
645
|
-
return new Promise((
|
|
769
|
+
var ot = /* @__PURE__ */ ((e) => (e.DEFAULT = "primary", e.WARNING = "warning", e.DANGER = "error", e))(ot || {});
|
|
770
|
+
function _t() {
|
|
771
|
+
const e = ae(), { options: { toast: { timeout: n } } } = N();
|
|
772
|
+
function t(c, a) {
|
|
773
|
+
return new Promise((i) => {
|
|
646
774
|
e.addToQueue({
|
|
647
|
-
message:
|
|
648
|
-
resolve:
|
|
649
|
-
timeout:
|
|
650
|
-
|
|
775
|
+
message: c,
|
|
776
|
+
resolve: i,
|
|
777
|
+
timeout: (a == null ? void 0 : a.timeout) ?? n,
|
|
778
|
+
translateMessage: (a == null ? void 0 : a.translateMessage) ?? !0,
|
|
779
|
+
type: x.INFO
|
|
651
780
|
});
|
|
652
781
|
});
|
|
653
782
|
}
|
|
654
|
-
function
|
|
655
|
-
return new Promise((
|
|
783
|
+
function r(c, a) {
|
|
784
|
+
return new Promise((i) => {
|
|
656
785
|
e.addToQueue({
|
|
657
|
-
message:
|
|
658
|
-
resolve:
|
|
659
|
-
timeout:
|
|
660
|
-
|
|
786
|
+
message: c,
|
|
787
|
+
resolve: i,
|
|
788
|
+
timeout: (a == null ? void 0 : a.timeout) ?? n,
|
|
789
|
+
translateMessage: (a == null ? void 0 : a.translateMessage) ?? !0,
|
|
790
|
+
type: x.WARNING
|
|
661
791
|
});
|
|
662
792
|
});
|
|
663
793
|
}
|
|
664
|
-
function
|
|
665
|
-
return new Promise((
|
|
794
|
+
function o(c, a) {
|
|
795
|
+
return new Promise((i) => {
|
|
666
796
|
e.addToQueue({
|
|
667
|
-
message:
|
|
668
|
-
resolve:
|
|
669
|
-
timeout:
|
|
670
|
-
|
|
797
|
+
message: c,
|
|
798
|
+
resolve: i,
|
|
799
|
+
timeout: (a == null ? void 0 : a.timeout) ?? n,
|
|
800
|
+
translateMessage: (a == null ? void 0 : a.translateMessage) ?? !0,
|
|
801
|
+
type: x.ERROR
|
|
671
802
|
});
|
|
672
803
|
});
|
|
673
804
|
}
|
|
674
|
-
function
|
|
675
|
-
return new Promise((
|
|
805
|
+
function s(c, a) {
|
|
806
|
+
return new Promise((i) => {
|
|
676
807
|
e.addToQueue({
|
|
677
|
-
message:
|
|
678
|
-
resolve:
|
|
679
|
-
timeout:
|
|
680
|
-
|
|
808
|
+
message: c,
|
|
809
|
+
resolve: i,
|
|
810
|
+
timeout: (a == null ? void 0 : a.timeout) ?? n,
|
|
811
|
+
translateMessage: (a == null ? void 0 : a.translateMessage) ?? !0,
|
|
812
|
+
type: x.SUCCESS
|
|
681
813
|
});
|
|
682
814
|
});
|
|
683
815
|
}
|
|
684
816
|
return {
|
|
685
817
|
info: t,
|
|
686
|
-
warn:
|
|
687
|
-
error:
|
|
688
|
-
success:
|
|
818
|
+
warn: r,
|
|
819
|
+
error: o,
|
|
820
|
+
success: s
|
|
689
821
|
};
|
|
690
822
|
}
|
|
691
|
-
const
|
|
823
|
+
const _ = v.createI18nMessage({
|
|
824
|
+
t: (...e) => {
|
|
825
|
+
const { t: n } = ne({ useScope: "global" });
|
|
826
|
+
return n(...e);
|
|
827
|
+
},
|
|
828
|
+
messagePath(e) {
|
|
829
|
+
return console.log(e.$validator), "validation." + e.$validator;
|
|
830
|
+
}
|
|
831
|
+
}), gt = _(v.required), yt = _(v.requiredIf, { withArguments: !0 }), Ct = _(v.requiredUnless, { withArguments: !0 }), wt = _(v.minLength, { withArguments: !0 }), ht = _(v.maxLength, { withArguments: !0 }), At = _(v.minValue, { withArguments: !0 }), Tt = _(v.maxValue, { withArguments: !0 }), xt = _(v.between, { withArguments: !0 }), Vt = _(v.alpha), It = _(v.alphaNum), Dt = _(v.numeric), Rt = _(v.integer), bt = _(v.decimal), Et = _(v.email), kt = _(v.ipAddress), Lt = _(v.macAddress), Ot = _(v.sameAs, { withArguments: !0 }), Ut = _(v.url), St = _((e) => re.withParams({
|
|
832
|
+
type: "oneOf",
|
|
833
|
+
values: e
|
|
834
|
+
}, (n) => {
|
|
835
|
+
const t = Array.isArray(e) ? e : Object.values(e);
|
|
836
|
+
return !re.req(n) || t.includes(n);
|
|
837
|
+
}), { withArguments: !0 }), lt = () => ({
|
|
692
838
|
loading: {
|
|
693
839
|
delay: 2e3,
|
|
694
840
|
overlay: !1
|
|
695
841
|
},
|
|
696
|
-
dialog: {
|
|
697
|
-
info: {
|
|
698
|
-
defaultCta: {
|
|
699
|
-
text: ""
|
|
700
|
-
}
|
|
701
|
-
},
|
|
702
|
-
confirm: {
|
|
703
|
-
confirmCta: {
|
|
704
|
-
text: ""
|
|
705
|
-
},
|
|
706
|
-
rejectCta: {
|
|
707
|
-
text: ""
|
|
708
|
-
}
|
|
709
|
-
},
|
|
710
|
-
prompt: {
|
|
711
|
-
abortCta: {
|
|
712
|
-
text: ""
|
|
713
|
-
},
|
|
714
|
-
saveCta: {
|
|
715
|
-
text: ""
|
|
716
|
-
}
|
|
717
|
-
}
|
|
718
|
-
},
|
|
719
842
|
toast: {
|
|
720
843
|
timeout: 4e3
|
|
721
|
-
}
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
if (!t)
|
|
730
|
-
throw new Error("UIKit Plugin not installed");
|
|
731
|
-
return D({}, t, e);
|
|
732
|
-
}
|
|
733
|
-
function at(e) {
|
|
734
|
-
return e ? new Promise((t) => {
|
|
735
|
-
setTimeout(() => {
|
|
736
|
-
t();
|
|
737
|
-
}, e);
|
|
738
|
-
}) : Promise.resolve();
|
|
739
|
-
}
|
|
740
|
-
function dt(e, t = {}) {
|
|
741
|
-
const { loading: { delay: n, overlay: a } } = nt({ loading: t }), o = x(!1), l = fe();
|
|
742
|
-
async function u(...r) {
|
|
743
|
-
o.value = !0, a && (l.value = !0);
|
|
744
|
-
try {
|
|
745
|
-
const [c] = await Promise.all([
|
|
746
|
-
e(...r),
|
|
747
|
-
at(n)
|
|
748
|
-
]);
|
|
749
|
-
return c;
|
|
750
|
-
} catch (c) {
|
|
751
|
-
throw c;
|
|
752
|
-
} finally {
|
|
753
|
-
o.value = !1, a && (l.value = !1);
|
|
844
|
+
},
|
|
845
|
+
i18n: {
|
|
846
|
+
messages: {
|
|
847
|
+
yes: "common.yes",
|
|
848
|
+
no: "common.no",
|
|
849
|
+
cancel: "action.cancel",
|
|
850
|
+
close: "action.close",
|
|
851
|
+
save: "action.save"
|
|
754
852
|
}
|
|
755
853
|
}
|
|
756
|
-
|
|
854
|
+
});
|
|
855
|
+
function rt(e) {
|
|
856
|
+
const n = R([]), t = R([]);
|
|
857
|
+
return {
|
|
858
|
+
dialogQueue: n,
|
|
859
|
+
toastQueue: t,
|
|
860
|
+
options: e
|
|
861
|
+
};
|
|
757
862
|
}
|
|
758
|
-
function
|
|
759
|
-
return (
|
|
760
|
-
|
|
863
|
+
function Mt(e) {
|
|
864
|
+
return (n) => {
|
|
865
|
+
const t = lt(), r = $(t, e), o = rt(r);
|
|
866
|
+
n.__SCHWARZDAVID_UIKIT_SYMBOL__ = Symbol("@schwarzdavid/ui-kit"), n.provide(n.__SCHWARZDAVID_UIKIT_SYMBOL__, o);
|
|
761
867
|
};
|
|
762
868
|
}
|
|
763
869
|
export {
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
870
|
+
ot as ConfirmDialogLevel,
|
|
871
|
+
M as PromptDialogSize,
|
|
872
|
+
pt as UiKitOutlet,
|
|
873
|
+
Vt as alpha,
|
|
874
|
+
It as alphaNum,
|
|
875
|
+
xt as between,
|
|
876
|
+
Mt as createUIKit,
|
|
877
|
+
bt as decimal,
|
|
878
|
+
Et as email,
|
|
879
|
+
Rt as integer,
|
|
880
|
+
kt as ipAddress,
|
|
881
|
+
Lt as maxAddress,
|
|
882
|
+
ht as maxLength,
|
|
883
|
+
Tt as maxValue,
|
|
884
|
+
wt as minLength,
|
|
885
|
+
At as minValue,
|
|
886
|
+
Dt as numeric,
|
|
887
|
+
St as oneOf,
|
|
888
|
+
gt as required,
|
|
889
|
+
yt as requiredIf,
|
|
890
|
+
Ct as requiredUnless,
|
|
891
|
+
Ot as sameAs,
|
|
892
|
+
Ut as url,
|
|
893
|
+
vt as useDialog,
|
|
894
|
+
nt as useLoading,
|
|
895
|
+
Ce as useLoadingOverlay,
|
|
896
|
+
_t as useToast
|
|
772
897
|
};
|