@schwarzdavid/ui-kit 0.0.1-alpha.5 → 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 +593 -441
- 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,160 +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
|
-
|
|
130
|
+
return Ae(() => {
|
|
131
|
+
s.value = window.setTimeout(() => {
|
|
132
|
+
f();
|
|
133
|
+
}, r.entry.timeout);
|
|
134
|
+
}), (C, V) => (m(), y(l(De), {
|
|
116
135
|
theme: "dark",
|
|
117
136
|
class: "toast-entry",
|
|
118
137
|
closable: "",
|
|
119
|
-
"onClick:close":
|
|
138
|
+
"onClick:close": f,
|
|
120
139
|
density: "compact"
|
|
121
|
-
},
|
|
140
|
+
}, Te({
|
|
122
141
|
default: d(() => [
|
|
123
|
-
|
|
142
|
+
C.entry.translateMessage ? (m(), U("span", je, B(l(i)(C.entry.message)), 1)) : (m(), U("span", Ne, B(C.entry.message), 1))
|
|
124
143
|
]),
|
|
125
144
|
_: 2
|
|
126
145
|
}, [
|
|
127
|
-
|
|
146
|
+
c.value ? {
|
|
128
147
|
name: "prepend",
|
|
129
148
|
fn: d(() => [
|
|
130
|
-
|
|
131
|
-
icon:
|
|
132
|
-
color:
|
|
149
|
+
u(l(Re), {
|
|
150
|
+
icon: c.value,
|
|
151
|
+
color: a.value
|
|
133
152
|
}, null, 8, ["icon", "color"])
|
|
134
153
|
]),
|
|
135
154
|
key: "0"
|
|
136
155
|
} : void 0
|
|
137
156
|
]), 1024));
|
|
138
157
|
}
|
|
139
|
-
}),
|
|
140
|
-
const
|
|
141
|
-
for (const [
|
|
142
|
-
|
|
143
|
-
return
|
|
144
|
-
},
|
|
145
|
-
function Q() {
|
|
146
|
-
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "";
|
|
147
|
-
if (Q.cache.has(e)) return Q.cache.get(e);
|
|
148
|
-
const t = e.replace(/[^a-z]/gi, "-").replace(/\B([A-Z])/g, "-$1").toLowerCase();
|
|
149
|
-
return Q.cache.set(e, t), t;
|
|
150
|
-
}
|
|
151
|
-
Q.cache = /* @__PURE__ */ new Map();
|
|
152
|
-
function je(e, t) {
|
|
153
|
-
const n = ye();
|
|
154
|
-
if (!n)
|
|
155
|
-
throw new Error(`[Vuetify] ${e} must be called from inside a setup function`);
|
|
156
|
-
return n;
|
|
157
|
-
}
|
|
158
|
-
function Ne() {
|
|
159
|
-
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "composables";
|
|
160
|
-
const t = je(e).type;
|
|
161
|
-
return Q((t == null ? void 0 : t.aliasName) || (t == null ? void 0 : t.name));
|
|
162
|
-
}
|
|
163
|
-
const Se = Symbol.for("vuetify:display");
|
|
164
|
-
function pe() {
|
|
165
|
-
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : Ne();
|
|
166
|
-
const n = re(Se);
|
|
167
|
-
if (!n) throw new Error("Could not find Vuetify display injection");
|
|
168
|
-
const a = p(() => {
|
|
169
|
-
if (e.mobile != null) return e.mobile;
|
|
170
|
-
if (!e.mobileBreakpoint) return n.mobile.value;
|
|
171
|
-
const l = typeof e.mobileBreakpoint == "number" ? e.mobileBreakpoint : n.thresholds.value[e.mobileBreakpoint];
|
|
172
|
-
return n.width.value < l;
|
|
173
|
-
}), o = p(() => t ? {
|
|
174
|
-
[`${t}--mobile`]: a.value
|
|
175
|
-
} : {});
|
|
176
|
-
return {
|
|
177
|
-
...n,
|
|
178
|
-
displayClasses: o,
|
|
179
|
-
mobile: a
|
|
180
|
-
};
|
|
181
|
-
}
|
|
182
|
-
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({
|
|
183
164
|
__name: "ToastOutlet",
|
|
184
165
|
setup(e) {
|
|
185
|
-
const { queue:
|
|
186
|
-
function o(
|
|
187
|
-
const { width:
|
|
188
|
-
|
|
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`);
|
|
189
170
|
}
|
|
190
|
-
return (
|
|
171
|
+
return (s, c) => (m(), y(xe, {
|
|
191
172
|
name: "fade",
|
|
192
173
|
tag: "div",
|
|
193
|
-
class:
|
|
174
|
+
class: ce(["toast-outlet", r.value]),
|
|
194
175
|
onBeforeLeave: o
|
|
195
176
|
}, {
|
|
196
177
|
default: d(() => [
|
|
197
|
-
(m(!0),
|
|
198
|
-
key:
|
|
199
|
-
entry:
|
|
178
|
+
(m(!0), U(P, null, te(l(n), (a) => (m(), y(Qe, {
|
|
179
|
+
key: a.id,
|
|
180
|
+
entry: a
|
|
200
181
|
}, null, 8, ["entry"]))), 128))
|
|
201
182
|
]),
|
|
202
183
|
_: 1
|
|
203
184
|
}, 8, ["class"]));
|
|
204
185
|
}
|
|
205
|
-
}), $e = /* @__PURE__ */
|
|
206
|
-
function
|
|
207
|
-
return
|
|
186
|
+
}), $e = /* @__PURE__ */ G(Fe, [["__scopeId", "data-v-ba5c8268"]]), We = R(!1);
|
|
187
|
+
function Ce() {
|
|
188
|
+
return We;
|
|
208
189
|
}
|
|
209
|
-
const
|
|
190
|
+
const qe = /* @__PURE__ */ k({
|
|
210
191
|
__name: "LoadingOverlay",
|
|
211
192
|
setup(e) {
|
|
212
|
-
const
|
|
213
|
-
return (
|
|
214
|
-
modelValue:
|
|
215
|
-
"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),
|
|
216
197
|
persistent: "",
|
|
217
198
|
class: "d-flex align-center justify-center"
|
|
218
199
|
}, {
|
|
219
200
|
default: d(() => [
|
|
220
|
-
|
|
201
|
+
u(l(Ee), {
|
|
221
202
|
indeterminate: "",
|
|
222
203
|
color: "primary",
|
|
223
204
|
size: "100"
|
|
@@ -226,128 +207,128 @@ const Me = /* @__PURE__ */ I({
|
|
|
226
207
|
_: 1
|
|
227
208
|
}, 8, ["modelValue"]));
|
|
228
209
|
}
|
|
229
|
-
}),
|
|
210
|
+
}), pt = /* @__PURE__ */ k({
|
|
230
211
|
__name: "UiKitOutlet",
|
|
231
212
|
setup(e) {
|
|
232
|
-
return (
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
213
|
+
return (n, t) => (m(), U(P, null, [
|
|
214
|
+
u(Me),
|
|
215
|
+
u($e),
|
|
216
|
+
u(qe)
|
|
236
217
|
], 64));
|
|
237
218
|
}
|
|
238
|
-
}), T = /* @__PURE__ */
|
|
219
|
+
}), T = /* @__PURE__ */ k({
|
|
239
220
|
__name: "MaybeTranslation",
|
|
240
221
|
props: {
|
|
241
222
|
content: {},
|
|
242
223
|
translate: { type: Boolean, default: !0 }
|
|
243
224
|
},
|
|
244
225
|
setup(e) {
|
|
245
|
-
const { t } =
|
|
246
|
-
return (
|
|
247
|
-
|
|
248
|
-
], 64)) : (m(),
|
|
249
|
-
|
|
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)
|
|
250
231
|
], 64));
|
|
251
232
|
}
|
|
252
|
-
}),
|
|
233
|
+
}), Ge = { class: "d-flex justify-space-between pr-2 py-2" }, Be = 650, He = /* @__PURE__ */ k({
|
|
253
234
|
__name: "InfoDialog",
|
|
254
235
|
props: {
|
|
255
236
|
data: {}
|
|
256
237
|
},
|
|
257
238
|
emits: ["resolve", "reject"],
|
|
258
|
-
setup(e, { emit:
|
|
259
|
-
const
|
|
260
|
-
text:
|
|
239
|
+
setup(e, { emit: n }) {
|
|
240
|
+
const t = e, r = n, { options: { i18n: { messages: { close: o } } } } = N(), s = {
|
|
241
|
+
text: o,
|
|
261
242
|
translateText: !0,
|
|
262
243
|
value: null
|
|
263
244
|
};
|
|
264
|
-
let
|
|
265
|
-
const
|
|
266
|
-
content:
|
|
267
|
-
translateContent:
|
|
268
|
-
} : null),
|
|
269
|
-
component:
|
|
270
|
-
props:
|
|
271
|
-
} : null),
|
|
272
|
-
function
|
|
273
|
-
|
|
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);
|
|
274
255
|
}
|
|
275
|
-
function
|
|
276
|
-
return Object.hasOwn(
|
|
256
|
+
function L(p) {
|
|
257
|
+
return Object.hasOwn(p, "action");
|
|
277
258
|
}
|
|
278
|
-
function
|
|
279
|
-
|
|
259
|
+
function b(p = null) {
|
|
260
|
+
c = p, a.value = !1;
|
|
280
261
|
}
|
|
281
|
-
function
|
|
282
|
-
|
|
262
|
+
function D() {
|
|
263
|
+
r("resolve", c);
|
|
283
264
|
}
|
|
284
|
-
return (
|
|
285
|
-
modelValue:
|
|
286
|
-
"onUpdate:modelValue":
|
|
287
|
-
"max-width":
|
|
288
|
-
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
|
|
289
270
|
}, {
|
|
290
271
|
default: d(() => [
|
|
291
|
-
|
|
272
|
+
u(l(Y), { class: "info-dialog-card" }, {
|
|
292
273
|
default: d(() => [
|
|
293
|
-
|
|
294
|
-
|
|
274
|
+
F("div", Ge, [
|
|
275
|
+
u(l(de), null, {
|
|
295
276
|
default: d(() => [
|
|
296
|
-
|
|
297
|
-
translate:
|
|
298
|
-
content:
|
|
277
|
+
u(T, {
|
|
278
|
+
translate: p.data.translateTitle,
|
|
279
|
+
content: p.data.title
|
|
299
280
|
}, null, 8, ["translate", "content"])
|
|
300
281
|
]),
|
|
301
282
|
_: 1
|
|
302
283
|
}),
|
|
303
|
-
|
|
284
|
+
u(l(I), {
|
|
304
285
|
icon: "$close",
|
|
305
286
|
variant: "text",
|
|
306
|
-
onClick:
|
|
287
|
+
onClick: g[0] || (g[0] = (h) => b(null))
|
|
307
288
|
})
|
|
308
289
|
]),
|
|
309
|
-
|
|
290
|
+
i.value ? (m(), y(l(me), { key: 0 }, {
|
|
310
291
|
default: d(() => [
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
translate:
|
|
314
|
-
content:
|
|
292
|
+
F("p", null, [
|
|
293
|
+
u(T, {
|
|
294
|
+
translate: i.value.translateContent,
|
|
295
|
+
content: i.value.content
|
|
315
296
|
}, null, 8, ["translate", "content"])
|
|
316
297
|
])
|
|
317
298
|
]),
|
|
318
299
|
_: 1
|
|
319
|
-
})) :
|
|
320
|
-
|
|
321
|
-
|
|
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" }, {
|
|
322
303
|
default: d(() => [
|
|
323
|
-
(m(!0),
|
|
324
|
-
key:
|
|
304
|
+
(m(!0), U(P, null, te(p.data.additionalCta ?? [], (h, O) => (m(), y(l(I), {
|
|
305
|
+
key: O,
|
|
325
306
|
color: "primary",
|
|
326
307
|
variant: "text",
|
|
327
|
-
onClick: () => h
|
|
308
|
+
onClick: () => V(h)
|
|
328
309
|
}, {
|
|
329
310
|
default: d(() => [
|
|
330
|
-
|
|
331
|
-
translate:
|
|
332
|
-
content:
|
|
311
|
+
u(T, {
|
|
312
|
+
translate: h.translateText,
|
|
313
|
+
content: h.text
|
|
333
314
|
}, null, 8, ["translate", "content"])
|
|
334
315
|
]),
|
|
335
316
|
_: 2
|
|
336
317
|
}, 1032, ["onClick"]))), 128)),
|
|
337
|
-
|
|
318
|
+
C.value ? (m(), y(l(I), {
|
|
338
319
|
key: 0,
|
|
339
320
|
color: "primary",
|
|
340
321
|
variant: "elevated",
|
|
341
|
-
onClick:
|
|
322
|
+
onClick: b
|
|
342
323
|
}, {
|
|
343
324
|
default: d(() => [
|
|
344
|
-
|
|
345
|
-
translate:
|
|
346
|
-
content:
|
|
325
|
+
u(T, {
|
|
326
|
+
translate: C.value.translateText,
|
|
327
|
+
content: C.value.text
|
|
347
328
|
}, null, 8, ["translate", "content"])
|
|
348
329
|
]),
|
|
349
330
|
_: 1
|
|
350
|
-
})) :
|
|
331
|
+
})) : j("", !0)
|
|
351
332
|
]),
|
|
352
333
|
_: 1
|
|
353
334
|
})
|
|
@@ -358,104 +339,108 @@ const Me = /* @__PURE__ */ I({
|
|
|
358
339
|
_: 1
|
|
359
340
|
}, 8, ["modelValue", "max-width"]));
|
|
360
341
|
}
|
|
361
|
-
}),
|
|
362
|
-
var
|
|
363
|
-
|
|
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({
|
|
364
352
|
__name: "PromptDialog",
|
|
365
353
|
props: {
|
|
366
354
|
data: {}
|
|
367
355
|
},
|
|
368
356
|
emits: ["resolve", "reject"],
|
|
369
|
-
setup(e, { emit:
|
|
370
|
-
const
|
|
371
|
-
[
|
|
372
|
-
[
|
|
373
|
-
},
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
}
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
}, r = w(!0), c = w(ne(n.data.initialValue) ?? null), _ = w(null), { mobile: h } = pe(), R = p(() => n.data.required && !c.value), A = p(() => o[n.data.size ?? E.SMALL]), U = p(() => n.data.size === E.LARGE ? h.value : !1), f = p(() => D({}, l, n.data.abortCta)), x = p(() => D({}, u, n.data.saveCta)), C = p(() => n.data.size === E.LARGE ? "secondary" : "primary");
|
|
380
|
-
function b() {
|
|
381
|
-
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;
|
|
382
367
|
}
|
|
383
|
-
function
|
|
384
|
-
|
|
368
|
+
function h() {
|
|
369
|
+
a.value = !1;
|
|
385
370
|
}
|
|
386
|
-
function
|
|
387
|
-
if (
|
|
388
|
-
|
|
371
|
+
function O() {
|
|
372
|
+
if (t.data.required && !i.value) {
|
|
373
|
+
r("reject");
|
|
389
374
|
return;
|
|
390
375
|
}
|
|
391
|
-
|
|
376
|
+
r("resolve", i.value);
|
|
392
377
|
}
|
|
393
|
-
return (
|
|
394
|
-
modelValue:
|
|
395
|
-
"onUpdate:modelValue":
|
|
396
|
-
"max-width":
|
|
397
|
-
fullscreen:
|
|
398
|
-
scrollable:
|
|
399
|
-
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
|
|
400
385
|
}, {
|
|
401
386
|
default: d(() => [
|
|
402
|
-
|
|
387
|
+
u(l(Y), { class: "prompt-dialog-card" }, {
|
|
403
388
|
default: d(() => [
|
|
404
|
-
|
|
389
|
+
u(l(fe), { color: "primary" }, {
|
|
405
390
|
default: d(() => [
|
|
406
|
-
|
|
391
|
+
u(l(pe), null, {
|
|
407
392
|
default: d(() => [
|
|
408
|
-
|
|
409
|
-
translate:
|
|
410
|
-
content:
|
|
393
|
+
u(T, {
|
|
394
|
+
translate: E.data.translateTitle,
|
|
395
|
+
content: E.data.title
|
|
411
396
|
}, null, 8, ["translate", "content"])
|
|
412
397
|
]),
|
|
413
398
|
_: 1
|
|
414
399
|
}),
|
|
415
|
-
|
|
416
|
-
|
|
400
|
+
u(l(H)),
|
|
401
|
+
F("div", {
|
|
417
402
|
ref_key: "toolbar",
|
|
418
|
-
ref:
|
|
403
|
+
ref: f,
|
|
419
404
|
class: "prompt-dialog-toolbar-slot"
|
|
420
405
|
}, null, 512),
|
|
421
|
-
|
|
406
|
+
u(l(I), {
|
|
422
407
|
icon: "mdi-close",
|
|
423
|
-
onClick:
|
|
408
|
+
onClick: g
|
|
424
409
|
})
|
|
425
410
|
]),
|
|
426
411
|
_: 1
|
|
427
412
|
}),
|
|
428
|
-
|
|
429
|
-
modelValue:
|
|
430
|
-
"onUpdate:modelValue":
|
|
431
|
-
toolbar:
|
|
432
|
-
}), null, 16, ["modelValue", "toolbar"])) :
|
|
433
|
-
|
|
434
|
-
|
|
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, {
|
|
435
420
|
default: d(() => [
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
color:
|
|
439
|
-
onClick:
|
|
421
|
+
u(l(H)),
|
|
422
|
+
u(l(I), {
|
|
423
|
+
color: D.value,
|
|
424
|
+
onClick: g
|
|
440
425
|
}, {
|
|
441
426
|
default: d(() => [
|
|
442
|
-
|
|
443
|
-
translate:
|
|
444
|
-
content:
|
|
427
|
+
u(T, {
|
|
428
|
+
translate: l(c).translateText,
|
|
429
|
+
content: l(c).text
|
|
445
430
|
}, null, 8, ["translate", "content"])
|
|
446
431
|
]),
|
|
447
432
|
_: 1
|
|
448
433
|
}, 8, ["color"]),
|
|
449
|
-
|
|
434
|
+
u(l(I), {
|
|
450
435
|
variant: "elevated",
|
|
451
|
-
color:
|
|
452
|
-
disabled:
|
|
453
|
-
onClick:
|
|
436
|
+
color: D.value,
|
|
437
|
+
disabled: V.value,
|
|
438
|
+
onClick: h
|
|
454
439
|
}, {
|
|
455
440
|
default: d(() => [
|
|
456
|
-
|
|
457
|
-
translate:
|
|
458
|
-
content:
|
|
441
|
+
u(T, {
|
|
442
|
+
translate: l(s).translateText,
|
|
443
|
+
content: l(s).text
|
|
459
444
|
}, null, 8, ["translate", "content"])
|
|
460
445
|
]),
|
|
461
446
|
_: 1
|
|
@@ -470,105 +455,105 @@ const qe = /* @__PURE__ */ I({
|
|
|
470
455
|
_: 1
|
|
471
456
|
}, 8, ["modelValue", "max-width", "fullscreen", "scrollable"]));
|
|
472
457
|
}
|
|
473
|
-
}),
|
|
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({
|
|
474
459
|
__name: "ConfirmDialog",
|
|
475
460
|
props: {
|
|
476
461
|
data: {}
|
|
477
462
|
},
|
|
478
463
|
emits: ["resolve", "reject"],
|
|
479
|
-
setup(e, { emit:
|
|
480
|
-
const
|
|
481
|
-
text:
|
|
464
|
+
setup(e, { emit: n }) {
|
|
465
|
+
const t = e, r = n, { options: { i18n: { messages: { yes: o, no: s } } } } = N(), c = {
|
|
466
|
+
text: o,
|
|
482
467
|
translateText: !0
|
|
483
|
-
},
|
|
484
|
-
text:
|
|
468
|
+
}, a = {
|
|
469
|
+
text: s,
|
|
485
470
|
translateText: !0
|
|
486
471
|
};
|
|
487
|
-
let
|
|
488
|
-
const
|
|
489
|
-
content:
|
|
490
|
-
translateContent:
|
|
491
|
-
} : null),
|
|
492
|
-
component:
|
|
493
|
-
props:
|
|
494
|
-
} : null),
|
|
495
|
-
function
|
|
496
|
-
|
|
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;
|
|
497
482
|
}
|
|
498
|
-
function
|
|
499
|
-
|
|
483
|
+
function h() {
|
|
484
|
+
i = !0, f.value = !1;
|
|
500
485
|
}
|
|
501
|
-
function
|
|
502
|
-
if (
|
|
503
|
-
|
|
486
|
+
function O() {
|
|
487
|
+
if (t.data.throwOnReject && !i) {
|
|
488
|
+
r("reject");
|
|
504
489
|
return;
|
|
505
490
|
}
|
|
506
|
-
|
|
491
|
+
r("resolve", i);
|
|
507
492
|
}
|
|
508
|
-
return (
|
|
509
|
-
modelValue:
|
|
510
|
-
"onUpdate:modelValue":
|
|
511
|
-
persistent: !!
|
|
512
|
-
"max-width":
|
|
513
|
-
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
|
|
514
499
|
}, {
|
|
515
500
|
default: d(() => [
|
|
516
|
-
|
|
501
|
+
u(l(Y), { class: "confirm-dialog-card" }, {
|
|
517
502
|
default: d(() => [
|
|
518
|
-
|
|
519
|
-
|
|
503
|
+
F("div", Xe, [
|
|
504
|
+
u(l(de), null, {
|
|
520
505
|
default: d(() => [
|
|
521
|
-
|
|
522
|
-
translate:
|
|
523
|
-
content:
|
|
506
|
+
u(T, {
|
|
507
|
+
translate: E.data.translateTitle,
|
|
508
|
+
content: E.data.title
|
|
524
509
|
}, null, 8, ["translate", "content"])
|
|
525
510
|
]),
|
|
526
511
|
_: 1
|
|
527
512
|
}),
|
|
528
|
-
|
|
513
|
+
E.data.permanent ? j("", !0) : (m(), y(l(I), {
|
|
529
514
|
key: 0,
|
|
530
515
|
icon: "$close",
|
|
531
516
|
variant: "text",
|
|
532
|
-
onClick:
|
|
517
|
+
onClick: g
|
|
533
518
|
}))
|
|
534
519
|
]),
|
|
535
|
-
|
|
520
|
+
C.value ? (m(), y(l(me), { key: 0 }, {
|
|
536
521
|
default: d(() => [
|
|
537
|
-
|
|
538
|
-
translate:
|
|
539
|
-
content:
|
|
522
|
+
u(T, {
|
|
523
|
+
translate: C.value.translateContent,
|
|
524
|
+
content: C.value.content
|
|
540
525
|
}, null, 8, ["translate", "content"])
|
|
541
526
|
]),
|
|
542
527
|
_: 1
|
|
543
|
-
})) :
|
|
544
|
-
|
|
545
|
-
|
|
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" }, {
|
|
546
531
|
default: d(() => [
|
|
547
|
-
|
|
548
|
-
class:
|
|
532
|
+
F("div", {
|
|
533
|
+
class: ce(["d-flex align-center", D.value === "confirm" ? "" : "flex-row-reverse"])
|
|
549
534
|
}, [
|
|
550
|
-
|
|
551
|
-
variant:
|
|
552
|
-
color:
|
|
553
|
-
onClick:
|
|
535
|
+
u(l(I), {
|
|
536
|
+
variant: D.value === "reject" ? "elevated" : "text",
|
|
537
|
+
color: p.value,
|
|
538
|
+
onClick: g
|
|
554
539
|
}, {
|
|
555
540
|
default: d(() => [
|
|
556
|
-
|
|
557
|
-
translate:
|
|
558
|
-
content:
|
|
541
|
+
u(T, {
|
|
542
|
+
translate: b.value.translateText,
|
|
543
|
+
content: b.value.text
|
|
559
544
|
}, null, 8, ["translate", "content"])
|
|
560
545
|
]),
|
|
561
546
|
_: 1
|
|
562
547
|
}, 8, ["variant", "color"]),
|
|
563
|
-
|
|
564
|
-
variant:
|
|
565
|
-
color:
|
|
566
|
-
onClick:
|
|
548
|
+
u(l(I), {
|
|
549
|
+
variant: D.value === "confirm" ? "elevated" : "text",
|
|
550
|
+
color: p.value,
|
|
551
|
+
onClick: h
|
|
567
552
|
}, {
|
|
568
553
|
default: d(() => [
|
|
569
|
-
|
|
570
|
-
translate:
|
|
571
|
-
content:
|
|
554
|
+
u(T, {
|
|
555
|
+
translate: L.value.translateText,
|
|
556
|
+
content: L.value.text
|
|
572
557
|
}, null, 8, ["translate", "content"])
|
|
573
558
|
]),
|
|
574
559
|
_: 1
|
|
@@ -584,162 +569,329 @@ const qe = /* @__PURE__ */ I({
|
|
|
584
569
|
_: 1
|
|
585
570
|
}, 8, ["modelValue", "persistent", "max-width"]));
|
|
586
571
|
}
|
|
587
|
-
}),
|
|
588
|
-
function
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
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,
|
|
600
717
|
reject: () => {
|
|
601
|
-
|
|
718
|
+
i(null);
|
|
602
719
|
}
|
|
603
720
|
};
|
|
604
|
-
e.addToQueue(
|
|
721
|
+
e.addToQueue(f);
|
|
605
722
|
});
|
|
606
723
|
}
|
|
607
|
-
function
|
|
608
|
-
return new Promise((
|
|
609
|
-
const
|
|
610
|
-
component:
|
|
611
|
-
props: { data:
|
|
612
|
-
resolve:
|
|
613
|
-
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
|
|
731
|
+
};
|
|
732
|
+
e.addToQueue(i);
|
|
733
|
+
});
|
|
734
|
+
}
|
|
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
|
|
614
747
|
};
|
|
615
|
-
e.addToQueue(
|
|
748
|
+
e.addToQueue(V);
|
|
616
749
|
});
|
|
617
750
|
}
|
|
618
|
-
function
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
level: u
|
|
624
|
-
}), new Promise((c, _) => {
|
|
625
|
-
const h = {
|
|
626
|
-
component: Je,
|
|
627
|
-
props: { data: r },
|
|
751
|
+
function o(s) {
|
|
752
|
+
return new Promise((c, a) => {
|
|
753
|
+
const i = {
|
|
754
|
+
component: at,
|
|
755
|
+
props: { data: s },
|
|
628
756
|
resolve: c,
|
|
629
|
-
reject:
|
|
757
|
+
reject: a
|
|
630
758
|
};
|
|
631
|
-
e.addToQueue(
|
|
759
|
+
e.addToQueue(i);
|
|
632
760
|
});
|
|
633
761
|
}
|
|
634
762
|
return {
|
|
635
|
-
info:
|
|
636
|
-
prompt:
|
|
637
|
-
confirm:
|
|
763
|
+
info: n,
|
|
764
|
+
prompt: t,
|
|
765
|
+
confirm: r,
|
|
766
|
+
form: o
|
|
638
767
|
};
|
|
639
768
|
}
|
|
640
|
-
var
|
|
641
|
-
function
|
|
642
|
-
const e =
|
|
643
|
-
function t(
|
|
644
|
-
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) => {
|
|
645
774
|
e.addToQueue({
|
|
646
|
-
message:
|
|
647
|
-
resolve:
|
|
648
|
-
timeout:
|
|
649
|
-
|
|
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
|
|
650
780
|
});
|
|
651
781
|
});
|
|
652
782
|
}
|
|
653
|
-
function
|
|
654
|
-
return new Promise((
|
|
783
|
+
function r(c, a) {
|
|
784
|
+
return new Promise((i) => {
|
|
655
785
|
e.addToQueue({
|
|
656
|
-
message:
|
|
657
|
-
resolve:
|
|
658
|
-
timeout:
|
|
659
|
-
|
|
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
|
|
660
791
|
});
|
|
661
792
|
});
|
|
662
793
|
}
|
|
663
|
-
function
|
|
664
|
-
return new Promise((
|
|
794
|
+
function o(c, a) {
|
|
795
|
+
return new Promise((i) => {
|
|
665
796
|
e.addToQueue({
|
|
666
|
-
message:
|
|
667
|
-
resolve:
|
|
668
|
-
timeout:
|
|
669
|
-
|
|
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
|
|
670
802
|
});
|
|
671
803
|
});
|
|
672
804
|
}
|
|
673
|
-
function
|
|
674
|
-
return new Promise((
|
|
805
|
+
function s(c, a) {
|
|
806
|
+
return new Promise((i) => {
|
|
675
807
|
e.addToQueue({
|
|
676
|
-
message:
|
|
677
|
-
resolve:
|
|
678
|
-
timeout:
|
|
679
|
-
|
|
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
|
|
680
813
|
});
|
|
681
814
|
});
|
|
682
815
|
}
|
|
683
816
|
return {
|
|
684
817
|
info: t,
|
|
685
|
-
warn:
|
|
686
|
-
error:
|
|
687
|
-
success:
|
|
818
|
+
warn: r,
|
|
819
|
+
error: o,
|
|
820
|
+
success: s
|
|
688
821
|
};
|
|
689
822
|
}
|
|
690
|
-
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 = () => ({
|
|
691
838
|
loading: {
|
|
692
839
|
delay: 2e3,
|
|
693
840
|
overlay: !1
|
|
694
|
-
}
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
}
|
|
706
|
-
function at(e) {
|
|
707
|
-
return e ? new Promise((t) => {
|
|
708
|
-
setTimeout(() => {
|
|
709
|
-
t();
|
|
710
|
-
}, e);
|
|
711
|
-
}) : Promise.resolve();
|
|
712
|
-
}
|
|
713
|
-
function dt(e, t = {}) {
|
|
714
|
-
const { loading: { delay: n, overlay: a } } = nt({ loading: t }), o = w(!1), l = fe();
|
|
715
|
-
async function u(...r) {
|
|
716
|
-
o.value = !0, a && (l.value = !0);
|
|
717
|
-
try {
|
|
718
|
-
const [c] = await Promise.all([
|
|
719
|
-
e(...r),
|
|
720
|
-
at(n)
|
|
721
|
-
]);
|
|
722
|
-
return c;
|
|
723
|
-
} catch (c) {
|
|
724
|
-
throw c;
|
|
725
|
-
} finally {
|
|
726
|
-
o.value = !1, a && (l.value = !1);
|
|
841
|
+
},
|
|
842
|
+
toast: {
|
|
843
|
+
timeout: 4e3
|
|
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"
|
|
727
852
|
}
|
|
728
853
|
}
|
|
729
|
-
|
|
854
|
+
});
|
|
855
|
+
function rt(e) {
|
|
856
|
+
const n = R([]), t = R([]);
|
|
857
|
+
return {
|
|
858
|
+
dialogQueue: n,
|
|
859
|
+
toastQueue: t,
|
|
860
|
+
options: e
|
|
861
|
+
};
|
|
730
862
|
}
|
|
731
|
-
function
|
|
732
|
-
return (
|
|
733
|
-
|
|
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);
|
|
734
867
|
};
|
|
735
868
|
}
|
|
736
869
|
export {
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
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
|
|
745
897
|
};
|