@schwarzdavid/ui-kit 0.0.1-alpha.20 → 0.0.1-alpha.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/main.d.ts +12 -8
- package/dist/main.js +392 -374
- package/package.json +1 -1
package/dist/main.js
CHANGED
|
@@ -1,45 +1,45 @@
|
|
|
1
|
-
import { Fragment as e, Teleport as t, TransitionGroup as n, computed as r, createBlock as i, createCommentVNode as a, createElementBlock as o, createElementVNode as s, createSlots as c, createVNode as l, defineComponent as u,
|
|
2
|
-
import { useDisplay as
|
|
1
|
+
import { Fragment as e, Teleport as t, TransitionGroup as n, computed as r, createBlock as i, createCommentVNode as a, createElementBlock as o, createElementVNode as s, createSlots as c, createVNode as l, defineComponent as u, getCurrentScope as d, hasInjectionContext as f, inject as p, isRef as m, markRaw as h, mergeProps as g, nextTick as _, normalizeClass as v, normalizeProps as y, normalizeStyle as b, onBeforeUnmount as x, onBeforeUpdate as S, onMounted as C, onScopeDispose as w, openBlock as T, provide as E, readonly as D, ref as O, renderList as k, renderSlot as A, resolveDynamicComponent as j, shallowReadonly as M, shallowRef as N, toDisplayString as P, toValue as ee, unref as F, useAttrs as te, useSlots as ne, useTemplateRef as re, vShow as ie, watch as I, watchEffect as L, withCtx as R, withDirectives as ae, withKeys as oe, withModifiers as se } from "vue";
|
|
2
|
+
import { useDisplay as z } from "vuetify";
|
|
3
3
|
import { useI18n as ce } from "vue-i18n";
|
|
4
|
-
import { VAlert as le, VBottomSheet as ue, VBtn as
|
|
5
|
-
import { merge as
|
|
6
|
-
import
|
|
4
|
+
import { VAlert as le, VBottomSheet as ue, VBtn as B, VCard as V, VDialog as de, VIcon as fe, VOverlay as pe, VProgressCircular as H } from "vuetify/components";
|
|
5
|
+
import { merge as U } from "lodash-es";
|
|
6
|
+
import me from "@vuelidate/core";
|
|
7
7
|
//#region lib/internal/createId.ts
|
|
8
|
-
function
|
|
8
|
+
function he(e) {
|
|
9
9
|
let t = Array.from(e, (e) => e.toString(16).padStart(2, "0")).join("");
|
|
10
10
|
return `${t.slice(0, 8)}-${t.slice(8, 12)}-${t.slice(12, 16)}-${t.slice(16, 20)}-${t.slice(20)}`;
|
|
11
11
|
}
|
|
12
|
-
function
|
|
12
|
+
function ge() {
|
|
13
13
|
let e = globalThis.crypto;
|
|
14
14
|
if (e.randomUUID) return e.randomUUID();
|
|
15
15
|
let t = globalThis.crypto.getRandomValues(/* @__PURE__ */ new Uint8Array(16));
|
|
16
|
-
return t[6] = t[6] & 15 | 64, t[8] = t[8] & 63 | 128,
|
|
16
|
+
return t[6] = t[6] & 15 | 64, t[8] = t[8] & 63 | 128, he(t);
|
|
17
17
|
}
|
|
18
18
|
//#endregion
|
|
19
19
|
//#region lib/plugin/constants/errors.ts
|
|
20
|
-
var
|
|
20
|
+
var W = {
|
|
21
21
|
NOT_INSTALLED: "@schwarzdavid/ui-kit is not available in this context. Install it with app.use(createUIKit()) and call its composables inside setup() or app.runWithContext().",
|
|
22
22
|
DIALOG_ENTRY_CONTEXT_MISSING: "useDialogEntry() must be called inside a dialog preset rendered by UiKitOutlet.",
|
|
23
|
-
|
|
23
|
+
FORM_DIALOG_CONTEXT_MISSING: "useFormDialog() and onDialogFinish() must be called inside a component rendered by the form dialog preset.",
|
|
24
24
|
TOAST_ENTRY_CONTEXT_MISSING: "useToastEntry() must be called inside a toast component rendered by UiKitOutlet."
|
|
25
|
-
},
|
|
25
|
+
}, G = Symbol("@schwarzdavid/ui-kit");
|
|
26
26
|
//#endregion
|
|
27
27
|
//#region lib/plugin/composables/usePluginContext.ts
|
|
28
|
-
function
|
|
29
|
-
let e =
|
|
30
|
-
if (!e) throw Error(
|
|
28
|
+
function K() {
|
|
29
|
+
let e = f() ? p(G, null) : null;
|
|
30
|
+
if (!e) throw Error(W.NOT_INSTALLED);
|
|
31
31
|
return e;
|
|
32
32
|
}
|
|
33
33
|
//#endregion
|
|
34
34
|
//#region lib/composables/dialog/internal/useDialogQueue.ts
|
|
35
|
-
function
|
|
36
|
-
let { dialogQueue: e } =
|
|
35
|
+
function q() {
|
|
36
|
+
let { dialogQueue: e } = K();
|
|
37
37
|
function t(t) {
|
|
38
|
-
let r =
|
|
38
|
+
let r = ge(), i = (e) => {
|
|
39
39
|
n(r), t.resolve(e);
|
|
40
40
|
}, a = (e) => {
|
|
41
41
|
n(r), t.reject(e);
|
|
42
|
-
}, o =
|
|
42
|
+
}, o = h({
|
|
43
43
|
...t,
|
|
44
44
|
id: r,
|
|
45
45
|
resolve: i,
|
|
@@ -52,30 +52,30 @@ function K() {
|
|
|
52
52
|
r >= 0 && e.value.splice(r, 1);
|
|
53
53
|
}
|
|
54
54
|
return {
|
|
55
|
-
queue:
|
|
55
|
+
queue: M(e),
|
|
56
56
|
addToQueue: t,
|
|
57
57
|
removeFromQueue: n
|
|
58
58
|
};
|
|
59
59
|
}
|
|
60
60
|
//#endregion
|
|
61
61
|
//#region lib/composables/dialog/constants/injectionKeys.ts
|
|
62
|
-
var
|
|
62
|
+
var _e = Symbol("@schwarzdavid/ui-kit:dialog-entry"), J = Symbol("@schwarzdavid/ui-kit:form-dialog"), ve = /* @__PURE__ */ u({
|
|
63
63
|
__name: "DialogEntryProvider",
|
|
64
64
|
props: { entry: {} },
|
|
65
65
|
setup(e) {
|
|
66
66
|
let t = e;
|
|
67
|
-
return
|
|
67
|
+
return E(_e, {
|
|
68
68
|
id: t.entry.id,
|
|
69
69
|
data: t.entry.data,
|
|
70
70
|
resolve: t.entry.resolve,
|
|
71
71
|
reject: t.entry.reject
|
|
72
|
-
}), (t, n) => (
|
|
72
|
+
}), (t, n) => (T(), i(j(e.entry.component)));
|
|
73
73
|
}
|
|
74
|
-
}),
|
|
74
|
+
}), ye = /* @__PURE__ */ u({
|
|
75
75
|
__name: "DialogOutlet",
|
|
76
76
|
setup(t) {
|
|
77
|
-
let { queue: n } =
|
|
78
|
-
return (t, r) => (
|
|
77
|
+
let { queue: n } = q();
|
|
78
|
+
return (t, r) => (T(!0), o(e, null, k(F(n), (e) => (T(), i(ve, {
|
|
79
79
|
key: e.id,
|
|
80
80
|
entry: e
|
|
81
81
|
}, null, 8, ["entry"]))), 128));
|
|
@@ -100,13 +100,13 @@ var X = /* @__PURE__ */ u({
|
|
|
100
100
|
},
|
|
101
101
|
setup(e) {
|
|
102
102
|
let t = e, n = Y(), i = r(() => n(t.content, t.translate));
|
|
103
|
-
return (e, t) =>
|
|
103
|
+
return (e, t) => P(i.value);
|
|
104
104
|
}
|
|
105
105
|
});
|
|
106
106
|
//#endregion
|
|
107
107
|
//#region lib/composables/toast/internal/useToastQueue.ts
|
|
108
|
-
function
|
|
109
|
-
let { toastQueue: e, toastTimers: t } =
|
|
108
|
+
function be() {
|
|
109
|
+
let { toastQueue: e, toastTimers: t } = K();
|
|
110
110
|
function n(t) {
|
|
111
111
|
return e.value.find((e) => e.id === t);
|
|
112
112
|
}
|
|
@@ -142,7 +142,7 @@ function ye() {
|
|
|
142
142
|
!i?.holds.delete(n) || i.holds.size > 0 || r(e, i);
|
|
143
143
|
}
|
|
144
144
|
function u(n) {
|
|
145
|
-
let i =
|
|
145
|
+
let i = ge(), a = h({
|
|
146
146
|
...n,
|
|
147
147
|
id: i
|
|
148
148
|
});
|
|
@@ -158,7 +158,7 @@ function ye() {
|
|
|
158
158
|
return a;
|
|
159
159
|
}
|
|
160
160
|
return {
|
|
161
|
-
queue:
|
|
161
|
+
queue: M(e),
|
|
162
162
|
addToQueue: u,
|
|
163
163
|
removeFromQueue: a,
|
|
164
164
|
close: o,
|
|
@@ -169,16 +169,16 @@ function ye() {
|
|
|
169
169
|
}
|
|
170
170
|
//#endregion
|
|
171
171
|
//#region lib/composables/toast/constants/injectionKey.ts
|
|
172
|
-
var
|
|
172
|
+
var xe = Symbol("@schwarzdavid/ui-kit:toast-entry"), Se = /* @__PURE__ */ u({
|
|
173
173
|
__name: "ToastEntryProvider",
|
|
174
174
|
props: { entry: {} },
|
|
175
175
|
setup(e) {
|
|
176
|
-
let t = e, { options: n } =
|
|
176
|
+
let t = e, { options: n } = K(), { close: a, trigger: o, pause: s, resume: c } = be(), l = r(() => n.components.toast);
|
|
177
177
|
function u(e) {
|
|
178
178
|
let n = e.currentTarget;
|
|
179
179
|
n instanceof Node && e.relatedTarget instanceof Node && n.contains(e.relatedTarget) || c(t.entry.id, "focus");
|
|
180
180
|
}
|
|
181
|
-
return
|
|
181
|
+
return E(xe, {
|
|
182
182
|
entry: t.entry,
|
|
183
183
|
close: () => {
|
|
184
184
|
a(t.entry.id);
|
|
@@ -186,56 +186,56 @@ var be = Symbol("@schwarzdavid/ui-kit:toast-entry"), xe = /* @__PURE__ */ u({
|
|
|
186
186
|
trigger: () => {
|
|
187
187
|
o(t.entry.id);
|
|
188
188
|
}
|
|
189
|
-
}), (t, n) => (
|
|
190
|
-
onMouseenter: n[0] ||= (t) =>
|
|
191
|
-
onMouseleave: n[1] ||= (t) =>
|
|
192
|
-
onFocusin: n[2] ||= (t) =>
|
|
189
|
+
}), (t, n) => (T(), i(j(l.value), {
|
|
190
|
+
onMouseenter: n[0] ||= (t) => F(s)(e.entry.id, "hover"),
|
|
191
|
+
onMouseleave: n[1] ||= (t) => F(c)(e.entry.id, "hover"),
|
|
192
|
+
onFocusin: n[2] ||= (t) => F(s)(e.entry.id, "focus"),
|
|
193
193
|
onFocusout: u
|
|
194
194
|
}, null, 32));
|
|
195
195
|
}
|
|
196
196
|
}), Z = /* @__PURE__ */ function(e) {
|
|
197
197
|
return e.SUCCESS = "success", e.INFO = "info", e.WARNING = "warning", e.ERROR = "error", e;
|
|
198
|
-
}({}),
|
|
198
|
+
}({}), Ce = {
|
|
199
199
|
class: "ui-toast-outlet__announcer",
|
|
200
200
|
"aria-live": "polite",
|
|
201
201
|
"aria-atomic": "true"
|
|
202
|
-
},
|
|
202
|
+
}, we = /* @__PURE__ */ u({
|
|
203
203
|
__name: "ToastOutlet",
|
|
204
204
|
setup(t) {
|
|
205
|
-
let { queue: r, pause: c, resume: u } =
|
|
205
|
+
let { queue: r, pause: c, resume: u } = be(), { xs: d } = z(), f = N(null), p = /* @__PURE__ */ new WeakSet();
|
|
206
206
|
I(() => r.value.at(-1), (e) => {
|
|
207
|
-
e && e.type !== Z.ERROR && !p.has(e) && (p.add(e), f.value = null,
|
|
207
|
+
e && e.type !== Z.ERROR && !p.has(e) && (p.add(e), f.value = null, _(() => {
|
|
208
208
|
f.value = e;
|
|
209
209
|
}));
|
|
210
210
|
});
|
|
211
|
-
let m =
|
|
211
|
+
let m = N(!1);
|
|
212
212
|
function h() {
|
|
213
213
|
m.value = document.visibilityState === "hidden";
|
|
214
214
|
}
|
|
215
|
-
|
|
215
|
+
C(() => {
|
|
216
216
|
h(), document.addEventListener("visibilitychange", h);
|
|
217
|
-
}),
|
|
217
|
+
}), x(() => {
|
|
218
218
|
document.removeEventListener("visibilitychange", h);
|
|
219
|
-
}),
|
|
219
|
+
}), L(() => {
|
|
220
220
|
for (let e of r.value) m.value ? c(e.id, "hidden") : u(e.id, "hidden");
|
|
221
221
|
});
|
|
222
|
-
function
|
|
222
|
+
function g(e) {
|
|
223
223
|
if (e instanceof HTMLElement) {
|
|
224
224
|
let { width: t } = e.getBoundingClientRect();
|
|
225
225
|
e.style.width = `${t.toFixed()}px`;
|
|
226
226
|
}
|
|
227
227
|
}
|
|
228
|
-
return (t, c) => (
|
|
228
|
+
return (t, c) => (T(), o(e, null, [s("div", Ce, [f.value ? (T(), i(X, {
|
|
229
229
|
key: 0,
|
|
230
230
|
content: f.value.message,
|
|
231
231
|
translate: f.value.translateMessage
|
|
232
232
|
}, null, 8, ["content", "translate"])) : a("", !0)]), l(n, {
|
|
233
233
|
name: "ui-toast",
|
|
234
234
|
tag: "div",
|
|
235
|
-
class:
|
|
236
|
-
onBeforeLeave:
|
|
235
|
+
class: v(["ui-toast-outlet", { "ui-toast-outlet--mobile": F(d) }]),
|
|
236
|
+
onBeforeLeave: g
|
|
237
237
|
}, {
|
|
238
|
-
default:
|
|
238
|
+
default: R(() => [(T(!0), o(e, null, k(F(r), (e) => (T(), i(Se, {
|
|
239
239
|
key: e.id,
|
|
240
240
|
entry: e
|
|
241
241
|
}, null, 8, ["entry"]))), 128))]),
|
|
@@ -245,22 +245,22 @@ var be = Symbol("@schwarzdavid/ui-kit:toast-entry"), xe = /* @__PURE__ */ u({
|
|
|
245
245
|
});
|
|
246
246
|
//#endregion
|
|
247
247
|
//#region lib/composables/loading-overlay/useLoadingOverlay.ts
|
|
248
|
-
function
|
|
249
|
-
return
|
|
248
|
+
function Te() {
|
|
249
|
+
return K().loadingOverlay;
|
|
250
250
|
}
|
|
251
251
|
//#endregion
|
|
252
252
|
//#region lib/composables/loading-overlay/components/LoadingOverlay.vue
|
|
253
|
-
var
|
|
253
|
+
var Ee = /* @__PURE__ */ u({
|
|
254
254
|
__name: "LoadingOverlay",
|
|
255
255
|
setup(e) {
|
|
256
|
-
let t =
|
|
257
|
-
return (e, n) => (
|
|
258
|
-
modelValue:
|
|
259
|
-
"onUpdate:modelValue": n[0] ||= (e) =>
|
|
256
|
+
let t = Te();
|
|
257
|
+
return (e, n) => (T(), i(F(pe), {
|
|
258
|
+
modelValue: F(t),
|
|
259
|
+
"onUpdate:modelValue": n[0] ||= (e) => m(t) ? t.value = e : null,
|
|
260
260
|
persistent: "",
|
|
261
261
|
class: "d-flex align-center justify-center"
|
|
262
262
|
}, {
|
|
263
|
-
default:
|
|
263
|
+
default: R(() => [l(F(H), {
|
|
264
264
|
indeterminate: "",
|
|
265
265
|
color: "primary",
|
|
266
266
|
size: "100"
|
|
@@ -268,28 +268,28 @@ var Te = /* @__PURE__ */ u({
|
|
|
268
268
|
_: 1
|
|
269
269
|
}, 8, ["modelValue"]));
|
|
270
270
|
}
|
|
271
|
-
}),
|
|
271
|
+
}), De = /* @__PURE__ */ u({
|
|
272
272
|
__name: "UiKitOutlet",
|
|
273
273
|
setup(t) {
|
|
274
|
-
return (t, n) => (
|
|
275
|
-
l(
|
|
276
|
-
l(
|
|
277
|
-
l(
|
|
274
|
+
return (t, n) => (T(), o(e, null, [
|
|
275
|
+
l(ye),
|
|
276
|
+
l(we),
|
|
277
|
+
l(Ee)
|
|
278
278
|
], 64));
|
|
279
279
|
}
|
|
280
280
|
});
|
|
281
281
|
//#endregion
|
|
282
282
|
//#region lib/components/sheet/internal/resolveSheetStages.ts
|
|
283
|
-
function
|
|
283
|
+
function Oe(e, t) {
|
|
284
284
|
return t ? [e ? "preview" : "content", "fullscreen"] : e ? ["preview", "content"] : ["content"];
|
|
285
285
|
}
|
|
286
286
|
//#endregion
|
|
287
287
|
//#region lib/components/sheet/internal/resolveSheetRelease.ts
|
|
288
|
-
var
|
|
289
|
-
function
|
|
288
|
+
var ke = .5, Ae = 1.5, je = .6;
|
|
289
|
+
function Me(e) {
|
|
290
290
|
let { heights: t, current: n, delta: r, velocity: i, dismissible: a } = e, o = t.length - 1, s = t[n] - r;
|
|
291
|
-
if (a && (i >
|
|
292
|
-
if (i >
|
|
291
|
+
if (a && (i > Ae || s < t[0] * je)) return { type: "dismiss" };
|
|
292
|
+
if (i > ke) return n === 0 ? a ? { type: "dismiss" } : {
|
|
293
293
|
type: "stage",
|
|
294
294
|
index: 0
|
|
295
295
|
} : {
|
|
@@ -309,12 +309,12 @@ function je(e) {
|
|
|
309
309
|
}
|
|
310
310
|
//#endregion
|
|
311
311
|
//#region lib/components/sheet/internal/useSheetDrag.ts
|
|
312
|
-
var
|
|
313
|
-
function
|
|
314
|
-
let t =
|
|
312
|
+
var Ne = 8, Pe = 100, Fe = "input, textarea, select, [contenteditable]";
|
|
313
|
+
function Ie(e) {
|
|
314
|
+
let t = O(!1), n = O(0), r = null, i = 0, a = 0, o = !1, s = [], c = null, l = !1;
|
|
315
315
|
function u(e) {
|
|
316
316
|
let t = performance.now();
|
|
317
|
-
s = s.filter((e) => t - e.time <=
|
|
317
|
+
s = s.filter((e) => t - e.time <= Pe), s.push({
|
|
318
318
|
y: e,
|
|
319
319
|
time: t
|
|
320
320
|
});
|
|
@@ -327,7 +327,7 @@ function Fe(e) {
|
|
|
327
327
|
return Math.abs(e) > Math.abs(t);
|
|
328
328
|
}
|
|
329
329
|
function p(e, t) {
|
|
330
|
-
return Math.max(Math.abs(e), Math.abs(t)) >=
|
|
330
|
+
return Math.max(Math.abs(e), Math.abs(t)) >= Ne;
|
|
331
331
|
}
|
|
332
332
|
function m() {
|
|
333
333
|
window.removeEventListener("pointermove", v), window.removeEventListener("pointerup", y), window.removeEventListener("pointercancel", b);
|
|
@@ -339,7 +339,7 @@ function Fe(e) {
|
|
|
339
339
|
if (r !== null || t.button > 0) return;
|
|
340
340
|
l = !1;
|
|
341
341
|
let n = t.target;
|
|
342
|
-
n instanceof Element && n.closest(
|
|
342
|
+
n instanceof Element && n.closest(Fe) || (o = n instanceof Node && !!e.body.value?.contains(n), !(o && t.pointerType !== "touch" && t.pointerType !== "pen") && (r = t.pointerId, i = t.clientX, a = t.clientY, s = [], u(t.clientY), window.addEventListener("pointermove", v), window.addEventListener("pointerup", y), window.addEventListener("pointercancel", b)));
|
|
343
343
|
}
|
|
344
344
|
function _(t) {
|
|
345
345
|
return o ? t > 0 ? (e.body.value?.scrollTop ?? 0) === 0 : e.current.value < e.heights().length - 1 : !0;
|
|
@@ -367,7 +367,7 @@ function Fe(e) {
|
|
|
367
367
|
return;
|
|
368
368
|
}
|
|
369
369
|
u(n.clientY);
|
|
370
|
-
let i =
|
|
370
|
+
let i = Me({
|
|
371
371
|
heights: e.heights(),
|
|
372
372
|
current: e.current.value,
|
|
373
373
|
delta: n.clientY - a,
|
|
@@ -399,53 +399,53 @@ function Fe(e) {
|
|
|
399
399
|
function S() {
|
|
400
400
|
c = null;
|
|
401
401
|
}
|
|
402
|
-
function
|
|
402
|
+
function C(e) {
|
|
403
403
|
l && (l = !1, e.detail !== 0 && (e.preventDefault(), e.stopPropagation()));
|
|
404
404
|
}
|
|
405
405
|
return I(e.surface, (e, t, n) => {
|
|
406
|
-
e && (e.addEventListener("pointerdown", g), e.addEventListener("touchmove", x, { passive: !1 }), e.addEventListener("touchend", S), e.addEventListener("touchcancel", S), e.addEventListener("click",
|
|
407
|
-
e.removeEventListener("pointerdown", g), e.removeEventListener("touchmove", x), e.removeEventListener("touchend", S), e.removeEventListener("touchcancel", S), e.removeEventListener("click",
|
|
406
|
+
e && (e.addEventListener("pointerdown", g), e.addEventListener("touchmove", x, { passive: !1 }), e.addEventListener("touchend", S), e.addEventListener("touchcancel", S), e.addEventListener("click", C, !0), n(() => {
|
|
407
|
+
e.removeEventListener("pointerdown", g), e.removeEventListener("touchmove", x), e.removeEventListener("touchend", S), e.removeEventListener("touchcancel", S), e.removeEventListener("click", C, !0), h();
|
|
408
408
|
}));
|
|
409
409
|
}, {
|
|
410
410
|
immediate: !0,
|
|
411
411
|
flush: "sync"
|
|
412
|
-
}),
|
|
413
|
-
dragging:
|
|
414
|
-
offset:
|
|
412
|
+
}), w(h), {
|
|
413
|
+
dragging: D(t),
|
|
414
|
+
offset: D(n)
|
|
415
415
|
};
|
|
416
416
|
}
|
|
417
417
|
//#endregion
|
|
418
418
|
//#region node_modules/@mdi/js/mdi.js
|
|
419
|
-
var
|
|
419
|
+
var Le = "M11,15H13V17H11V15M11,7H13V13H11V7M12,2C6.47,2 2,6.5 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4A8,8 0 0,1 20,12A8,8 0 0,1 12,20Z", Re = "M12,2L1,21H23M12,6L19.53,19H4.47M11,10V14H13V10M11,16V18H13V16", ze = "M12 2C6.5 2 2 6.5 2 12S6.5 22 12 22 22 17.5 22 12 17.5 2 12 2M12 20C7.59 20 4 16.41 4 12S7.59 4 12 4 20 7.59 20 12 16.41 20 12 20M16.59 7.58L10 14.17L7.41 11.59L6 13L10 17L18 9L16.59 7.58Z", Be = "M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z", Ve = "M11,9H13V7H11M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20,12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M11,17H13V11H11V17Z";
|
|
420
420
|
//#endregion
|
|
421
421
|
//#region lib/internal/icons.ts
|
|
422
|
-
function
|
|
422
|
+
function He(e) {
|
|
423
423
|
return `svg:${e}`;
|
|
424
424
|
}
|
|
425
425
|
var Q = {
|
|
426
|
-
close:
|
|
427
|
-
success:
|
|
428
|
-
error:
|
|
429
|
-
warning:
|
|
430
|
-
info: Ve
|
|
431
|
-
},
|
|
426
|
+
close: He(Be),
|
|
427
|
+
success: He(ze),
|
|
428
|
+
error: He(Le),
|
|
429
|
+
warning: He(Re),
|
|
430
|
+
info: He(Ve)
|
|
431
|
+
}, Ue = ["aria-label"], We = {
|
|
432
432
|
key: 1,
|
|
433
433
|
class: "ui-sheet__handle",
|
|
434
434
|
"aria-hidden": "true"
|
|
435
|
-
},
|
|
435
|
+
}, Ge = { class: "ui-sheet__header" }, Ke = {
|
|
436
436
|
key: 0,
|
|
437
437
|
class: "ui-sheet__title"
|
|
438
|
-
},
|
|
438
|
+
}, qe = {
|
|
439
439
|
key: 0,
|
|
440
440
|
ref: "preview",
|
|
441
441
|
class: "ui-sheet__preview"
|
|
442
|
-
},
|
|
442
|
+
}, Je = {
|
|
443
443
|
ref: "content",
|
|
444
444
|
class: "ui-sheet__content"
|
|
445
|
-
},
|
|
445
|
+
}, Ye = {
|
|
446
446
|
key: 2,
|
|
447
447
|
class: "ui-sheet__footer"
|
|
448
|
-
},
|
|
448
|
+
}, Xe = .9, Ze = .2, Qe = /* @__PURE__ */ u({
|
|
449
449
|
__name: "UiBottomSheet",
|
|
450
450
|
props: {
|
|
451
451
|
modelValue: { type: Boolean },
|
|
@@ -481,179 +481,181 @@ var Q = {
|
|
|
481
481
|
"closed"
|
|
482
482
|
],
|
|
483
483
|
setup(e, { emit: t }) {
|
|
484
|
-
let n = e, c = t, u = ne(), { options: d } =
|
|
485
|
-
|
|
486
|
-
|
|
484
|
+
let n = e, c = t, u = ne(), { options: d } = K(), f = Y(), p = re("surface"), m = re("body"), h = re("preview"), _ = re("content"), y = O(!!u.preview);
|
|
485
|
+
S(() => {
|
|
486
|
+
y.value = !!u.preview;
|
|
487
487
|
});
|
|
488
|
-
let
|
|
489
|
-
get: () =>
|
|
488
|
+
let w = r(() => Oe(y.value, n.expandable)), E = O(N()), D = r(() => w.value.includes(E.value) ? E.value : w.value[0]), k = r({
|
|
489
|
+
get: () => w.value.indexOf(D.value),
|
|
490
490
|
set: (e) => {
|
|
491
|
-
E.value =
|
|
491
|
+
E.value = w.value[e];
|
|
492
492
|
}
|
|
493
|
-
}), M = r(() =>
|
|
493
|
+
}), M = r(() => k.value >= w.value.length - 1);
|
|
494
494
|
function N() {
|
|
495
|
-
return n.stage &&
|
|
495
|
+
return n.stage && w.value.includes(n.stage) ? n.stage : w.value[0];
|
|
496
496
|
}
|
|
497
|
-
let
|
|
497
|
+
let P = r(() => d.i18n.messages), ee = r(() => f(M.value ? P.value.collapse : P.value.expand)), te = r(() => f(P.value.close)), L = O({
|
|
498
498
|
chrome: 0,
|
|
499
499
|
preview: 0,
|
|
500
500
|
content: 0
|
|
501
|
-
}),
|
|
502
|
-
function
|
|
501
|
+
}), z = O(0);
|
|
502
|
+
function ce(e) {
|
|
503
503
|
let t = getComputedStyle(e);
|
|
504
504
|
return (parseFloat(t.paddingTop) || 0) + (parseFloat(t.paddingBottom) || 0);
|
|
505
505
|
}
|
|
506
|
-
function
|
|
506
|
+
function le(e) {
|
|
507
507
|
if (!e) return 0;
|
|
508
508
|
if (e.style.display !== "none") return e.offsetHeight;
|
|
509
509
|
e.style.display = "";
|
|
510
510
|
let t = e.offsetHeight;
|
|
511
511
|
return e.style.display = "none", t;
|
|
512
512
|
}
|
|
513
|
-
function
|
|
513
|
+
function V() {
|
|
514
514
|
let e = p.value, t = m.value;
|
|
515
|
-
|
|
516
|
-
chrome: e.offsetHeight - t.offsetHeight +
|
|
517
|
-
preview:
|
|
518
|
-
content:
|
|
515
|
+
z.value = window.innerHeight, e && t && (L.value = {
|
|
516
|
+
chrome: e.offsetHeight - t.offsetHeight + ce(t),
|
|
517
|
+
preview: le(h.value),
|
|
518
|
+
content: le(_.value)
|
|
519
519
|
});
|
|
520
520
|
}
|
|
521
|
-
function
|
|
522
|
-
let { chrome: t, preview: n, content: r } =
|
|
523
|
-
return e === "fullscreen" ?
|
|
521
|
+
function de(e) {
|
|
522
|
+
let { chrome: t, preview: n, content: r } = L.value;
|
|
523
|
+
return e === "fullscreen" ? z.value : e === "preview" ? t + n : Math.min(t + r, Xe * z.value);
|
|
524
524
|
}
|
|
525
|
-
function
|
|
526
|
-
return
|
|
525
|
+
function fe() {
|
|
526
|
+
return V(), w.value.map(de);
|
|
527
527
|
}
|
|
528
|
-
let
|
|
529
|
-
function
|
|
530
|
-
|
|
528
|
+
let pe = null, H = O(null), U = r(() => n.modelValue ? null : H.value);
|
|
529
|
+
function me(e) {
|
|
530
|
+
H.value = e, c("update:modelValue", !1), c("close");
|
|
531
531
|
}
|
|
532
|
-
function
|
|
533
|
-
|
|
532
|
+
function he() {
|
|
533
|
+
me(null);
|
|
534
534
|
}
|
|
535
|
-
function
|
|
536
|
-
|
|
535
|
+
function ge() {
|
|
536
|
+
me(pe);
|
|
537
537
|
}
|
|
538
|
-
let { dragging: W, offset:
|
|
538
|
+
let { dragging: W, offset: G } = Ie({
|
|
539
539
|
surface: p,
|
|
540
540
|
body: m,
|
|
541
|
-
heights:
|
|
542
|
-
current:
|
|
541
|
+
heights: fe,
|
|
542
|
+
current: k,
|
|
543
543
|
dismissible: r(() => !n.persistent),
|
|
544
|
-
onDismiss:
|
|
545
|
-
}), q =
|
|
544
|
+
onDismiss: ge
|
|
545
|
+
}), q = O([]);
|
|
546
546
|
I(W, (e) => {
|
|
547
|
-
q.value = e ?
|
|
548
|
-
}, { flush: "sync" }), I(
|
|
549
|
-
W.value && q.value.length && (
|
|
550
|
-
height: q.value[
|
|
547
|
+
q.value = e ? fe() : [], e && (pe = null, H.value = null);
|
|
548
|
+
}, { flush: "sync" }), I(G, (e) => {
|
|
549
|
+
W.value && q.value.length && (pe = {
|
|
550
|
+
height: q.value[k.value],
|
|
551
551
|
offset: Math.max(e, 0)
|
|
552
552
|
});
|
|
553
553
|
}, { flush: "sync" });
|
|
554
554
|
let _e = r(() => {
|
|
555
|
-
if (
|
|
556
|
-
let { height: e, offset: t } =
|
|
555
|
+
if (U.value) {
|
|
556
|
+
let { height: e, offset: t } = U.value;
|
|
557
557
|
return {
|
|
558
558
|
height: `${String(e)}px`,
|
|
559
559
|
transform: `translateY(${String(t)}px)`
|
|
560
560
|
};
|
|
561
561
|
}
|
|
562
562
|
if (W.value && q.value.length) {
|
|
563
|
-
let e = q.value[
|
|
564
|
-
if (
|
|
563
|
+
let e = q.value[k.value];
|
|
564
|
+
if (G.value >= 0) return {
|
|
565
565
|
height: `${String(e)}px`,
|
|
566
|
-
transform: `translateY(${String(
|
|
566
|
+
transform: `translateY(${String(G.value)}px)`
|
|
567
567
|
};
|
|
568
|
-
let t = q.value[q.value.length - 1], n = e -
|
|
568
|
+
let t = q.value[q.value.length - 1], n = e - G.value, r = Math.min(n, t) + Math.max(n - t, 0) * Ze;
|
|
569
569
|
return { height: `${String(r)}px` };
|
|
570
570
|
}
|
|
571
|
-
let { chrome: e, preview: t, content: n } =
|
|
572
|
-
return
|
|
571
|
+
let { chrome: e, preview: t, content: n } = L.value;
|
|
572
|
+
return D.value === "preview" && e + t > 0 ? { height: `${String(e + t)}px` } : D.value === "content" && e + n > 0 ? { height: `min(${String(e + n)}px, 90dvh)` } : {};
|
|
573
573
|
}), J = null;
|
|
574
574
|
function ve() {
|
|
575
575
|
J?.disconnect(), J = null;
|
|
576
|
-
let e = [
|
|
576
|
+
let e = [h.value, _.value].filter((e) => !!e);
|
|
577
577
|
e.length && typeof ResizeObserver < "u" && (J = new ResizeObserver(() => {
|
|
578
|
-
W.value ||
|
|
578
|
+
W.value || V();
|
|
579
579
|
}), e.forEach((e) => {
|
|
580
580
|
J?.observe(e);
|
|
581
581
|
}));
|
|
582
582
|
}
|
|
583
|
-
I([
|
|
584
|
-
|
|
585
|
-
}),
|
|
586
|
-
J?.disconnect(), window.removeEventListener("resize",
|
|
583
|
+
I([h, _], ve, { flush: "post" }), C(() => {
|
|
584
|
+
z.value = window.innerHeight, window.addEventListener("resize", V);
|
|
585
|
+
}), x(() => {
|
|
586
|
+
J?.disconnect(), window.removeEventListener("resize", V);
|
|
587
587
|
});
|
|
588
588
|
function ye() {
|
|
589
|
-
|
|
589
|
+
D.value !== n.stage && c("update:stage", D.value);
|
|
590
590
|
}
|
|
591
591
|
I(() => n.stage, (e) => {
|
|
592
|
-
e &&
|
|
593
|
-
}), I(
|
|
592
|
+
e && w.value.includes(e) ? E.value = e : ye();
|
|
593
|
+
}), I(w, (e) => {
|
|
594
594
|
e.includes(E.value) || (E.value = e[0]);
|
|
595
595
|
}), I(() => n.modelValue, (e) => {
|
|
596
|
-
e && (
|
|
597
|
-
}), I(
|
|
596
|
+
e && (H.value = null, E.value = N());
|
|
597
|
+
}), I(D, ye, { immediate: !0 }), I(D, V, { flush: "post" });
|
|
598
598
|
function be() {
|
|
599
|
-
|
|
599
|
+
k.value = M.value ? 0 : w.value.length - 1;
|
|
600
600
|
}
|
|
601
601
|
function xe() {
|
|
602
|
-
|
|
603
|
-
}
|
|
604
|
-
function Z() {
|
|
605
|
-
n.persistent || H();
|
|
602
|
+
H.value = null, c("closed");
|
|
606
603
|
}
|
|
607
604
|
function Se() {
|
|
608
|
-
|
|
605
|
+
n.persistent || he();
|
|
606
|
+
}
|
|
607
|
+
function Z() {
|
|
608
|
+
d.dialog.closeOnOverlayClick && !n.persistent && he();
|
|
609
609
|
}
|
|
610
610
|
function Ce() {
|
|
611
611
|
n.form && c("submit");
|
|
612
612
|
}
|
|
613
|
-
return (t, n) => (
|
|
613
|
+
return (t, n) => (T(), i(F(ue), {
|
|
614
614
|
"model-value": e.modelValue,
|
|
615
|
+
width: "100%",
|
|
616
|
+
"max-width": "100%",
|
|
615
617
|
persistent: "",
|
|
616
618
|
"no-click-animation": "",
|
|
617
619
|
scrollable: !1,
|
|
618
620
|
"retain-focus": "",
|
|
619
621
|
"content-class": "ui-sheet-overlay",
|
|
620
|
-
"onClick:outside":
|
|
621
|
-
onKeydown: oe(se(
|
|
622
|
+
"onClick:outside": Z,
|
|
623
|
+
onKeydown: oe(se(Se, ["stop", "prevent"]), ["esc"]),
|
|
622
624
|
onAfterEnter: n[0] ||= (e) => c("opened"),
|
|
623
625
|
onAfterLeave: xe
|
|
624
626
|
}, {
|
|
625
|
-
default:
|
|
627
|
+
default: R(() => [s("div", {
|
|
626
628
|
ref_key: "surface",
|
|
627
629
|
ref: p,
|
|
628
|
-
class:
|
|
629
|
-
"ui-sheet--dragging":
|
|
630
|
-
"ui-sheet--dismissing": !!
|
|
630
|
+
class: v(["ui-sheet", [`ui-sheet--${D.value}`, {
|
|
631
|
+
"ui-sheet--dragging": F(W),
|
|
632
|
+
"ui-sheet--dismissing": !!U.value
|
|
631
633
|
}]]),
|
|
632
|
-
style:
|
|
633
|
-
}, [(
|
|
634
|
-
default:
|
|
635
|
-
|
|
634
|
+
style: b(_e.value)
|
|
635
|
+
}, [(T(), i(j(e.form ? "form" : "div"), g({ class: "ui-sheet__layout" }, e.form ? { novalidate: !0 } : {}, { onSubmit: se(Ce, ["prevent"]) }), {
|
|
636
|
+
default: R(() => [
|
|
637
|
+
w.value.length > 1 ? (T(), o("button", {
|
|
636
638
|
key: 0,
|
|
637
639
|
type: "button",
|
|
638
640
|
class: "ui-sheet__handle",
|
|
639
|
-
"aria-label":
|
|
641
|
+
"aria-label": ee.value,
|
|
640
642
|
onClick: be
|
|
641
|
-
}, [...n[1] ||= [s("span", { class: "ui-sheet__grip" }, null, -1)]], 8,
|
|
642
|
-
s("header",
|
|
643
|
-
e.title ? (
|
|
643
|
+
}, [...n[1] ||= [s("span", { class: "ui-sheet__grip" }, null, -1)]], 8, Ue)) : (T(), o("div", We, [...n[2] ||= [s("span", { class: "ui-sheet__grip" }, null, -1)]])),
|
|
644
|
+
s("header", Ge, [
|
|
645
|
+
e.title ? (T(), o("h2", Ke, [l(X, {
|
|
644
646
|
content: e.title,
|
|
645
647
|
translate: e.translateTitle
|
|
646
648
|
}, null, 8, ["content", "translate"])])) : a("", !0),
|
|
647
|
-
|
|
648
|
-
e.closable &&
|
|
649
|
+
A(t.$slots, "header"),
|
|
650
|
+
e.closable && D.value !== "preview" ? (T(), i(F(B), {
|
|
649
651
|
key: 1,
|
|
650
652
|
variant: "text",
|
|
651
653
|
density: "comfortable",
|
|
652
|
-
icon:
|
|
653
|
-
"aria-label":
|
|
654
|
+
icon: F(Q).close,
|
|
655
|
+
"aria-label": te.value,
|
|
654
656
|
disabled: e.persistent,
|
|
655
657
|
class: "ui-sheet__close",
|
|
656
|
-
onClick:
|
|
658
|
+
onClick: he
|
|
657
659
|
}, null, 8, [
|
|
658
660
|
"icon",
|
|
659
661
|
"aria-label",
|
|
@@ -664,8 +666,8 @@ var Q = {
|
|
|
664
666
|
ref_key: "body",
|
|
665
667
|
ref: m,
|
|
666
668
|
class: "ui-sheet__body"
|
|
667
|
-
}, [
|
|
668
|
-
|
|
669
|
+
}, [y.value ? ae((T(), o("div", qe, [A(t.$slots, "preview")], 512)), [[ie, D.value === "preview"]]) : a("", !0), ae(s("div", Je, [A(t.$slots, "default")], 512), [[ie, D.value !== "preview"]])], 512),
|
|
670
|
+
F(u).actions ? (T(), o("footer", Ye, [A(t.$slots, "actions")])) : a("", !0)
|
|
669
671
|
]),
|
|
670
672
|
_: 3
|
|
671
673
|
}, 16))], 6)]),
|
|
@@ -677,27 +679,27 @@ var Q = {
|
|
|
677
679
|
//#region lib/composables/dialog/internal/useDialogCta.ts
|
|
678
680
|
function $(e, t) {
|
|
679
681
|
let n = {
|
|
680
|
-
text:
|
|
682
|
+
text: K().options.i18n.messages[t],
|
|
681
683
|
translateText: !0
|
|
682
684
|
};
|
|
683
|
-
return
|
|
685
|
+
return U(n, e);
|
|
684
686
|
}
|
|
685
687
|
//#endregion
|
|
686
688
|
//#region lib/composables/dialog/internal/dialogWidths.ts
|
|
687
|
-
var
|
|
689
|
+
var $e = {
|
|
688
690
|
sm: 440,
|
|
689
691
|
md: 560,
|
|
690
692
|
lg: 720
|
|
691
693
|
};
|
|
692
|
-
function
|
|
693
|
-
return typeof e == "number" ? e :
|
|
694
|
+
function et(e) {
|
|
695
|
+
return typeof e == "number" ? e : $e[e];
|
|
694
696
|
}
|
|
695
697
|
//#endregion
|
|
696
698
|
//#region lib/components/sheet/UiResponsiveDialog.vue?vue&type=script&setup=true&lang.ts
|
|
697
|
-
var
|
|
699
|
+
var tt = { class: "ui-responsive-dialog__sheet-section" }, nt = { class: "ui-dialog__header" }, rt = { class: "ui-dialog__title" }, it = { class: "ui-dialog__body" }, at = {
|
|
698
700
|
key: 0,
|
|
699
701
|
class: "ui-dialog__footer"
|
|
700
|
-
},
|
|
702
|
+
}, ot = /* @__PURE__ */ u({
|
|
701
703
|
inheritAttrs: !1,
|
|
702
704
|
__name: "UiResponsiveDialog",
|
|
703
705
|
props: {
|
|
@@ -735,8 +737,8 @@ var et = { class: "ui-responsive-dialog__sheet-section" }, tt = { class: "ui-dia
|
|
|
735
737
|
"update:stage"
|
|
736
738
|
],
|
|
737
739
|
setup(n, { emit: u }) {
|
|
738
|
-
let d = n, f = u, p = ne(), m = te(), { options:
|
|
739
|
-
function
|
|
740
|
+
let d = n, f = u, p = ne(), m = te(), { options: h } = K(), { mobile: _ } = z(), v = Y(), y = $(void 0, "close"), b = r(() => v(y.text, y.translateText)), x = r(() => et(d.width)), S = N(null), C = !1;
|
|
741
|
+
function w(e) {
|
|
740
742
|
e instanceof HTMLElement && (S.value = e);
|
|
741
743
|
}
|
|
742
744
|
I(() => d.modelValue, (e, t) => {
|
|
@@ -753,13 +755,13 @@ var et = { class: "ui-responsive-dialog__sheet-section" }, tt = { class: "ui-dia
|
|
|
753
755
|
function O() {
|
|
754
756
|
d.persistent || D();
|
|
755
757
|
}
|
|
756
|
-
function
|
|
757
|
-
|
|
758
|
+
function k() {
|
|
759
|
+
h.dialog.closeOnOverlayClick && !d.persistent && D();
|
|
758
760
|
}
|
|
759
|
-
function
|
|
761
|
+
function M() {
|
|
760
762
|
d.form && f("submit");
|
|
761
763
|
}
|
|
762
|
-
return (r, u) => (
|
|
764
|
+
return (r, u) => (T(), o(e, null, [F(_) ? (T(), i(Qe, g({ key: 0 }, F(m), {
|
|
763
765
|
"model-value": n.modelValue,
|
|
764
766
|
stage: n.stage,
|
|
765
767
|
title: n.title,
|
|
@@ -775,25 +777,25 @@ var et = { class: "ui-responsive-dialog__sheet-section" }, tt = { class: "ui-dia
|
|
|
775
777
|
onOpened: u[4] ||= (e) => f("opened"),
|
|
776
778
|
onClosed: E
|
|
777
779
|
}), c({
|
|
778
|
-
default:
|
|
779
|
-
ref:
|
|
780
|
+
default: R(() => [s("div", {
|
|
781
|
+
ref: w,
|
|
780
782
|
class: "ui-responsive-dialog__sheet-section"
|
|
781
783
|
}, null, 512)]),
|
|
782
784
|
_: 2
|
|
783
785
|
}, [
|
|
784
|
-
|
|
786
|
+
F(p).preview ? {
|
|
785
787
|
name: "preview",
|
|
786
|
-
fn:
|
|
788
|
+
fn: R(() => [s("div", tt, [A(r.$slots, "preview")])]),
|
|
787
789
|
key: "0"
|
|
788
790
|
} : void 0,
|
|
789
|
-
|
|
791
|
+
F(p).header ? {
|
|
790
792
|
name: "header",
|
|
791
|
-
fn:
|
|
793
|
+
fn: R(() => [A(r.$slots, "header")]),
|
|
792
794
|
key: "1"
|
|
793
795
|
} : void 0,
|
|
794
|
-
|
|
796
|
+
F(p).actions ? {
|
|
795
797
|
name: "actions",
|
|
796
|
-
fn:
|
|
798
|
+
fn: R(() => [A(r.$slots, "actions")]),
|
|
797
799
|
key: "2"
|
|
798
800
|
} : void 0
|
|
799
801
|
]), 1040, [
|
|
@@ -805,37 +807,37 @@ var et = { class: "ui-responsive-dialog__sheet-section" }, tt = { class: "ui-dia
|
|
|
805
807
|
"closable",
|
|
806
808
|
"persistent",
|
|
807
809
|
"form"
|
|
808
|
-
])) : (
|
|
810
|
+
])) : (T(), i(F(de), g({ key: 1 }, F(m), {
|
|
809
811
|
"model-value": n.modelValue,
|
|
810
812
|
"max-width": x.value,
|
|
811
813
|
persistent: "",
|
|
812
814
|
"no-click-animation": "",
|
|
813
815
|
scrollable: !1,
|
|
814
816
|
"retain-focus": "",
|
|
815
|
-
"onClick:outside":
|
|
817
|
+
"onClick:outside": k,
|
|
816
818
|
onKeydown: oe(se(O, ["stop", "prevent"]), ["esc"]),
|
|
817
819
|
onAfterEnter: u[5] ||= (e) => f("opened"),
|
|
818
820
|
onAfterLeave: E
|
|
819
821
|
}), {
|
|
820
|
-
default:
|
|
822
|
+
default: R(() => [l(F(V), {
|
|
821
823
|
variant: "flat",
|
|
822
824
|
border: !1,
|
|
823
825
|
rounded: !1,
|
|
824
826
|
class: "ui-dialog"
|
|
825
827
|
}, {
|
|
826
|
-
default:
|
|
827
|
-
default:
|
|
828
|
-
s("header",
|
|
829
|
-
s("h2",
|
|
828
|
+
default: R(() => [(T(), i(j(n.form ? "form" : "div"), g({ class: "ui-dialog__layout" }, n.form ? { novalidate: !0 } : {}, { onSubmit: se(M, ["prevent"]) }), {
|
|
829
|
+
default: R(() => [
|
|
830
|
+
s("header", nt, [
|
|
831
|
+
s("h2", rt, [l(X, {
|
|
830
832
|
content: n.title,
|
|
831
833
|
translate: n.translateTitle
|
|
832
834
|
}, null, 8, ["content", "translate"])]),
|
|
833
|
-
|
|
834
|
-
n.closable ? (
|
|
835
|
+
A(r.$slots, "header"),
|
|
836
|
+
n.closable ? (T(), i(F(B), {
|
|
835
837
|
key: 0,
|
|
836
838
|
variant: "text",
|
|
837
839
|
density: "comfortable",
|
|
838
|
-
icon:
|
|
840
|
+
icon: F(Q).close,
|
|
839
841
|
"aria-label": b.value,
|
|
840
842
|
disabled: n.persistent,
|
|
841
843
|
class: "ui-dialog__close",
|
|
@@ -846,11 +848,11 @@ var et = { class: "ui-responsive-dialog__sheet-section" }, tt = { class: "ui-dia
|
|
|
846
848
|
"disabled"
|
|
847
849
|
])) : a("", !0)
|
|
848
850
|
]),
|
|
849
|
-
s("div",
|
|
850
|
-
ref:
|
|
851
|
+
s("div", it, [s("div", {
|
|
852
|
+
ref: w,
|
|
851
853
|
class: "ui-responsive-dialog__slot"
|
|
852
854
|
}, null, 512)]),
|
|
853
|
-
|
|
855
|
+
F(p).actions ? (T(), o("footer", at, [A(r.$slots, "actions")])) : a("", !0)
|
|
854
856
|
]),
|
|
855
857
|
_: 3
|
|
856
858
|
}, 16))]),
|
|
@@ -861,16 +863,16 @@ var et = { class: "ui-responsive-dialog__sheet-section" }, tt = { class: "ui-dia
|
|
|
861
863
|
"model-value",
|
|
862
864
|
"max-width",
|
|
863
865
|
"onKeydown"
|
|
864
|
-
])), S.value ? (
|
|
866
|
+
])), S.value ? (T(), i(t, {
|
|
865
867
|
key: 2,
|
|
866
868
|
to: S.value
|
|
867
|
-
}, [
|
|
869
|
+
}, [A(r.$slots, "default")], 8, ["to"])) : a("", !0)], 64));
|
|
868
870
|
}
|
|
869
871
|
});
|
|
870
872
|
//#endregion
|
|
871
873
|
//#region lib/composables/dialog/useDialog.ts
|
|
872
|
-
function
|
|
873
|
-
let e =
|
|
874
|
+
function st() {
|
|
875
|
+
let e = q(), { options: { components: { dialog: t } } } = K();
|
|
874
876
|
function n(n, r) {
|
|
875
877
|
let i = typeof n == "string" ? {
|
|
876
878
|
title: n,
|
|
@@ -923,30 +925,42 @@ function ot() {
|
|
|
923
925
|
}
|
|
924
926
|
//#endregion
|
|
925
927
|
//#region lib/composables/dialog/useDialogEntry.ts
|
|
926
|
-
function
|
|
927
|
-
let e =
|
|
928
|
-
if (!e) throw Error(
|
|
928
|
+
function ct() {
|
|
929
|
+
let e = f() ? p(_e, null) : null;
|
|
930
|
+
if (!e) throw Error(W.DIALOG_ENTRY_CONTEXT_MISSING);
|
|
929
931
|
return e;
|
|
930
932
|
}
|
|
931
933
|
//#endregion
|
|
932
|
-
//#region lib/composables/dialog/
|
|
933
|
-
function
|
|
934
|
-
let
|
|
935
|
-
if (!
|
|
936
|
-
|
|
934
|
+
//#region lib/composables/dialog/useFormDialog.ts
|
|
935
|
+
function lt() {
|
|
936
|
+
let e = f() ? p(J, null) : null;
|
|
937
|
+
if (!e) throw Error(W.FORM_DIALOG_CONTEXT_MISSING);
|
|
938
|
+
let t = e;
|
|
939
|
+
function n(e) {
|
|
940
|
+
let n = t.addFinishHandler(e);
|
|
941
|
+
return d() && w(n), n;
|
|
942
|
+
}
|
|
943
|
+
return {
|
|
937
944
|
submit: t.submit,
|
|
945
|
+
close: t.close,
|
|
946
|
+
onFinish: n,
|
|
938
947
|
loading: t.loading
|
|
939
948
|
};
|
|
940
949
|
}
|
|
941
950
|
//#endregion
|
|
951
|
+
//#region lib/composables/dialog/onDialogFinish.ts
|
|
952
|
+
function ut(e) {
|
|
953
|
+
return lt().onFinish(e);
|
|
954
|
+
}
|
|
955
|
+
//#endregion
|
|
942
956
|
//#region lib/composables/dialog/presets/ConfirmDialogProps.ts
|
|
943
|
-
var
|
|
957
|
+
var dt = /* @__PURE__ */ function(e) {
|
|
944
958
|
return e.DEFAULT = "primary", e.WARNING = "warning", e.DANGER = "error", e;
|
|
945
959
|
}({});
|
|
946
960
|
//#endregion
|
|
947
961
|
//#region lib/composables/toast/useToast.ts
|
|
948
|
-
function
|
|
949
|
-
let e =
|
|
962
|
+
function ft() {
|
|
963
|
+
let e = be(), { options: { toast: t } } = K();
|
|
950
964
|
function n(e) {
|
|
951
965
|
return e === Z.ERROR ? t.errorTimeout : t.timeout;
|
|
952
966
|
}
|
|
@@ -971,89 +985,89 @@ function ut() {
|
|
|
971
985
|
}
|
|
972
986
|
//#endregion
|
|
973
987
|
//#region lib/composables/toast/useToastEntry.ts
|
|
974
|
-
function
|
|
975
|
-
let e =
|
|
976
|
-
if (!e) throw Error(
|
|
988
|
+
function pt() {
|
|
989
|
+
let e = f() ? p(xe, null) : null;
|
|
990
|
+
if (!e) throw Error(W.TOAST_ENTRY_CONTEXT_MISSING);
|
|
977
991
|
return e;
|
|
978
992
|
}
|
|
979
993
|
//#endregion
|
|
980
994
|
//#region lib/composables/loading/useLoading.ts
|
|
981
|
-
function
|
|
995
|
+
function mt(e) {
|
|
982
996
|
return e ? new Promise((t) => {
|
|
983
997
|
setTimeout(t, e);
|
|
984
998
|
}) : Promise.resolve();
|
|
985
999
|
}
|
|
986
|
-
function
|
|
987
|
-
let { options: { loading: n } } =
|
|
1000
|
+
function ht(e, t = {}) {
|
|
1001
|
+
let { options: { loading: n } } = K(), r = t.delay ?? n.delay, i = t.overlay ?? n.overlay, a = O(!1), o = Te(), s = e;
|
|
988
1002
|
async function c(...e) {
|
|
989
1003
|
a.value = !0, i && (o.value = !0);
|
|
990
1004
|
try {
|
|
991
|
-
let [t] = await Promise.all([s(...e),
|
|
1005
|
+
let [t] = await Promise.all([s(...e), mt(r)]);
|
|
992
1006
|
return t;
|
|
993
1007
|
} finally {
|
|
994
1008
|
a.value = !1, i && (o.value = !1);
|
|
995
1009
|
}
|
|
996
1010
|
}
|
|
997
1011
|
return {
|
|
998
|
-
loading:
|
|
1012
|
+
loading: D(a),
|
|
999
1013
|
action: c
|
|
1000
1014
|
};
|
|
1001
1015
|
}
|
|
1002
1016
|
//#endregion
|
|
1003
1017
|
//#region lib/composables/dialog/components/dialog/presets/InfoDialog.vue?vue&type=script&setup=true&lang.ts
|
|
1004
|
-
var
|
|
1018
|
+
var gt = {
|
|
1005
1019
|
key: 0,
|
|
1006
1020
|
class: "ui-dialog__text"
|
|
1007
|
-
},
|
|
1021
|
+
}, _t = /* @__PURE__ */ u({
|
|
1008
1022
|
__name: "InfoDialog",
|
|
1009
1023
|
setup(t) {
|
|
1010
|
-
let { data: n, resolve: s } =
|
|
1024
|
+
let { data: n, resolve: s } = ct(), u = n.defaultCta === !1 ? null : $(n.defaultCta, "close"), d = r(() => n.additionalCta ?? []), { mobile: f } = z(), p = r(() => u !== null && !f.value), m = r(() => p.value || d.value.length > 0), h = O(!0), _ = r(() => "props" in n ? n.props : {}), v = null;
|
|
1011
1025
|
function b(e) {
|
|
1012
1026
|
"action" in e ? e.action() : x(e.value);
|
|
1013
1027
|
}
|
|
1014
1028
|
function x(e) {
|
|
1015
|
-
|
|
1029
|
+
h.value &&= (v = e, !1);
|
|
1016
1030
|
}
|
|
1017
1031
|
function S() {
|
|
1018
1032
|
x(null);
|
|
1019
1033
|
}
|
|
1020
1034
|
function C() {
|
|
1021
|
-
s(
|
|
1035
|
+
s(v);
|
|
1022
1036
|
}
|
|
1023
|
-
return (t, r) => (
|
|
1024
|
-
"model-value":
|
|
1025
|
-
title:
|
|
1026
|
-
"translate-title":
|
|
1027
|
-
width:
|
|
1037
|
+
return (t, r) => (T(), i(ot, {
|
|
1038
|
+
"model-value": h.value,
|
|
1039
|
+
title: F(n).title,
|
|
1040
|
+
"translate-title": F(n).translateTitle,
|
|
1041
|
+
width: F(n).width ?? "sm",
|
|
1028
1042
|
onClose: S,
|
|
1029
1043
|
onClosed: C
|
|
1030
1044
|
}, c({
|
|
1031
|
-
default:
|
|
1032
|
-
content:
|
|
1033
|
-
translate:
|
|
1034
|
-
}, null, 8, ["content", "translate"])])) : (
|
|
1045
|
+
default: R(() => ["content" in F(n) ? (T(), o("p", gt, [l(X, {
|
|
1046
|
+
content: F(n).content,
|
|
1047
|
+
translate: F(n).translateContent
|
|
1048
|
+
}, null, 8, ["content", "translate"])])) : (T(), i(j(F(n).component), y(g({ key: 1 }, _.value)), null, 16))]),
|
|
1035
1049
|
_: 2
|
|
1036
1050
|
}, [m.value ? {
|
|
1037
1051
|
name: "actions",
|
|
1038
|
-
fn:
|
|
1052
|
+
fn: R(() => [(T(!0), o(e, null, k(d.value, (e, t) => (T(), i(F(B), {
|
|
1039
1053
|
key: t,
|
|
1040
1054
|
variant: "text",
|
|
1041
1055
|
onClick: () => b(e)
|
|
1042
1056
|
}, {
|
|
1043
|
-
default:
|
|
1057
|
+
default: R(() => [l(X, {
|
|
1044
1058
|
content: e.text,
|
|
1045
1059
|
translate: e.translateText
|
|
1046
1060
|
}, null, 8, ["content", "translate"])]),
|
|
1047
1061
|
_: 2
|
|
1048
|
-
}, 1032, ["onClick"]))), 128)), p.value &&
|
|
1062
|
+
}, 1032, ["onClick"]))), 128)), p.value && F(u) ? (T(), i(F(B), {
|
|
1049
1063
|
key: 0,
|
|
1050
1064
|
variant: "flat",
|
|
1051
1065
|
color: "primary",
|
|
1052
1066
|
onClick: S
|
|
1053
1067
|
}, {
|
|
1054
|
-
default:
|
|
1055
|
-
content:
|
|
1056
|
-
translate:
|
|
1068
|
+
default: R(() => [l(X, {
|
|
1069
|
+
content: F(u).text,
|
|
1070
|
+
translate: F(u).translateText
|
|
1057
1071
|
}, null, 8, ["content", "translate"])]),
|
|
1058
1072
|
_: 1
|
|
1059
1073
|
})) : a("", !0)]),
|
|
@@ -1065,16 +1079,16 @@ var mt = {
|
|
|
1065
1079
|
"width"
|
|
1066
1080
|
]));
|
|
1067
1081
|
}
|
|
1068
|
-
}),
|
|
1082
|
+
}), vt = {
|
|
1069
1083
|
key: 0,
|
|
1070
1084
|
class: "ui-dialog__text"
|
|
1071
|
-
},
|
|
1085
|
+
}, yt = /* @__PURE__ */ u({
|
|
1072
1086
|
__name: "ConfirmDialog",
|
|
1073
1087
|
setup(t) {
|
|
1074
|
-
let { data: n, resolve: a, reject: s } =
|
|
1088
|
+
let { data: n, resolve: a, reject: s } = ct(), c = $(n.confirmCta, "yes"), u = $(n.rejectCta, "no"), d = O(!0), f = {
|
|
1075
1089
|
reject: null,
|
|
1076
1090
|
confirm: null
|
|
1077
|
-
}, p = r(() => n.highlightCta ?? "confirm"), m = r(() => n.level ?? "primary"),
|
|
1091
|
+
}, p = r(() => n.highlightCta ?? "confirm"), m = r(() => n.level ?? "primary"), h = r(() => "props" in n ? n.props : {}), _ = r(() => {
|
|
1078
1092
|
let e = p.value, t = [{
|
|
1079
1093
|
key: "reject",
|
|
1080
1094
|
cta: u,
|
|
@@ -1089,34 +1103,34 @@ var mt = {
|
|
|
1089
1103
|
onClick: S
|
|
1090
1104
|
}];
|
|
1091
1105
|
return e === "reject" ? t.reverse() : t;
|
|
1092
|
-
}),
|
|
1106
|
+
}), v = !1;
|
|
1093
1107
|
function b(e, t) {
|
|
1094
1108
|
t && "$el" in t ? f[e] = t.$el : f[e] = null;
|
|
1095
1109
|
}
|
|
1096
1110
|
function x() {
|
|
1097
|
-
d.value &&= (
|
|
1111
|
+
d.value &&= (v = !1, !1);
|
|
1098
1112
|
}
|
|
1099
1113
|
function S() {
|
|
1100
|
-
d.value &&= (
|
|
1114
|
+
d.value &&= (v = !0, !1);
|
|
1101
1115
|
}
|
|
1102
1116
|
function C() {
|
|
1103
|
-
f[n.level ===
|
|
1117
|
+
f[n.level === dt.DANGER ? "reject" : "confirm"]?.focus();
|
|
1104
1118
|
}
|
|
1105
|
-
function
|
|
1106
|
-
!
|
|
1119
|
+
function w() {
|
|
1120
|
+
!v && n.throwOnReject ? s() : a(v);
|
|
1107
1121
|
}
|
|
1108
|
-
return (t, r) => (
|
|
1122
|
+
return (t, r) => (T(), i(ot, {
|
|
1109
1123
|
"model-value": d.value,
|
|
1110
|
-
title:
|
|
1111
|
-
"translate-title":
|
|
1112
|
-
width:
|
|
1124
|
+
title: F(n).title,
|
|
1125
|
+
"translate-title": F(n).translateTitle,
|
|
1126
|
+
width: F(n).width ?? "sm",
|
|
1113
1127
|
closable: !1,
|
|
1114
|
-
persistent: !!
|
|
1128
|
+
persistent: !!F(n).permanent,
|
|
1115
1129
|
onClose: x,
|
|
1116
1130
|
onOpened: C,
|
|
1117
|
-
onClosed:
|
|
1131
|
+
onClosed: w
|
|
1118
1132
|
}, {
|
|
1119
|
-
actions:
|
|
1133
|
+
actions: R(() => [(T(!0), o(e, null, k(_.value, (e) => (T(), i(F(B), {
|
|
1120
1134
|
key: e.key,
|
|
1121
1135
|
ref_for: !0,
|
|
1122
1136
|
ref: (t) => b(e.key, t),
|
|
@@ -1124,7 +1138,7 @@ var mt = {
|
|
|
1124
1138
|
color: e.color,
|
|
1125
1139
|
onClick: e.onClick
|
|
1126
1140
|
}, {
|
|
1127
|
-
default:
|
|
1141
|
+
default: R(() => [l(X, {
|
|
1128
1142
|
content: e.cta.text,
|
|
1129
1143
|
translate: e.cta.translateText
|
|
1130
1144
|
}, null, 8, ["content", "translate"])]),
|
|
@@ -1134,10 +1148,10 @@ var mt = {
|
|
|
1134
1148
|
"color",
|
|
1135
1149
|
"onClick"
|
|
1136
1150
|
]))), 128))]),
|
|
1137
|
-
default:
|
|
1138
|
-
content:
|
|
1139
|
-
translate:
|
|
1140
|
-
}, null, 8, ["content", "translate"])])) : (
|
|
1151
|
+
default: R(() => ["content" in F(n) ? (T(), o("p", vt, [l(X, {
|
|
1152
|
+
content: F(n).content,
|
|
1153
|
+
translate: F(n).translateContent
|
|
1154
|
+
}, null, 8, ["content", "translate"])])) : (T(), i(j(F(n).component), y(g({ key: 1 }, h.value)), null, 16))]),
|
|
1141
1155
|
_: 1
|
|
1142
1156
|
}, 8, [
|
|
1143
1157
|
"model-value",
|
|
@@ -1150,116 +1164,120 @@ var mt = {
|
|
|
1150
1164
|
});
|
|
1151
1165
|
//#endregion
|
|
1152
1166
|
//#region lib/composables/dialog/internal/declaresProp.ts
|
|
1153
|
-
function
|
|
1167
|
+
function bt(e, t) {
|
|
1154
1168
|
let n = e.props;
|
|
1155
1169
|
return Array.isArray(n) ? n.includes(t) : typeof n == "object" && !!n && t in n;
|
|
1156
1170
|
}
|
|
1157
1171
|
//#endregion
|
|
1158
1172
|
//#region lib/composables/dialog/internal/isEmptyValue.ts
|
|
1159
|
-
function
|
|
1173
|
+
function xt(e) {
|
|
1160
1174
|
let t = Object.getPrototypeOf(e);
|
|
1161
1175
|
return t === Object.prototype || t === null;
|
|
1162
1176
|
}
|
|
1163
|
-
function
|
|
1164
|
-
return e == null || e === "" ? !0 : Array.isArray(e) ? e.length === 0 : e instanceof Date ? Number.isNaN(e.getTime()) : e instanceof Map || e instanceof Set ? e.size === 0 : typeof e == "object" &&
|
|
1177
|
+
function St(e) {
|
|
1178
|
+
return e == null || e === "" ? !0 : Array.isArray(e) ? e.length === 0 : e instanceof Date ? Number.isNaN(e.getTime()) : e instanceof Map || e instanceof Set ? e.size === 0 : typeof e == "object" && xt(e) && Object.keys(e).length === 0;
|
|
1165
1179
|
}
|
|
1166
1180
|
//#endregion
|
|
1167
1181
|
//#region lib/internal/toErrorMessage.ts
|
|
1168
|
-
function
|
|
1182
|
+
function Ct(e, t) {
|
|
1169
1183
|
return e instanceof Error ? e.message : typeof e == "string" ? e : typeof e == "object" && e && "message" in e && typeof e.message == "string" ? e.message : t;
|
|
1170
1184
|
}
|
|
1171
1185
|
//#endregion
|
|
1172
1186
|
//#region lib/composables/dialog/components/dialog/presets/FormDialog.vue
|
|
1173
|
-
var
|
|
1187
|
+
var wt = /* @__PURE__ */ u({
|
|
1174
1188
|
__name: "FormDialog",
|
|
1175
1189
|
setup(e) {
|
|
1176
|
-
let { data: t, resolve: n, reject: o } =
|
|
1190
|
+
let { data: t, resolve: n, reject: o } = ct(), { options: c } = K(), u = Y(), d = $(t.saveCta, "save"), f = $(t.abortCta, "cancel"), p = r(() => u(c.i18n.messages.saveFailed, !0)), m = r(() => u(c.i18n.messages.unknownError, !0)), h = O(!0), _ = O(null), v = O(ee(t.initialValue) ?? null), b = N(null), x = re("content"), S = me(), { loading: C, action: w } = ht(ie), D = O(!1), k = r(() => !!t.required && St(v.value)), A = r(() => {
|
|
1177
1191
|
let e = { ...t.props };
|
|
1178
|
-
return
|
|
1179
|
-
|
|
1180
|
-
}),
|
|
1181
|
-
}),
|
|
1182
|
-
function
|
|
1183
|
-
e instanceof HTMLDivElement && (
|
|
1192
|
+
return bt(t.component, "modelValue") && (e.modelValue = v.value, e["onUpdate:modelValue"] = (e) => {
|
|
1193
|
+
v.value = e;
|
|
1194
|
+
}), bt(t.component, "toolbar") && (e.toolbar = b.value), e;
|
|
1195
|
+
}), M = /* @__PURE__ */ new Set(), P = null;
|
|
1196
|
+
function te(e) {
|
|
1197
|
+
e instanceof HTMLDivElement && (b.value = e);
|
|
1184
1198
|
}
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1199
|
+
E(J, {
|
|
1200
|
+
addFinishHandler(e) {
|
|
1201
|
+
return M.add(e), () => {
|
|
1202
|
+
M.delete(e);
|
|
1203
|
+
};
|
|
1188
1204
|
},
|
|
1189
|
-
submit:
|
|
1190
|
-
|
|
1205
|
+
submit: ne,
|
|
1206
|
+
close: I,
|
|
1207
|
+
loading: C
|
|
1191
1208
|
});
|
|
1192
|
-
async function
|
|
1193
|
-
if (!(
|
|
1194
|
-
|
|
1209
|
+
async function ne() {
|
|
1210
|
+
if (!(C.value || D.value || k.value)) {
|
|
1211
|
+
D.value = !0;
|
|
1195
1212
|
try {
|
|
1196
|
-
if (!await
|
|
1197
|
-
_.value = null, await
|
|
1213
|
+
if (!await S.value.$validate() || !h.value) return;
|
|
1214
|
+
_.value = null, await w();
|
|
1198
1215
|
} catch (e) {
|
|
1199
|
-
_.value =
|
|
1216
|
+
_.value = Ct(e, m.value);
|
|
1200
1217
|
} finally {
|
|
1201
|
-
|
|
1218
|
+
D.value = !1;
|
|
1202
1219
|
}
|
|
1203
1220
|
}
|
|
1204
1221
|
}
|
|
1205
|
-
async function
|
|
1206
|
-
let e
|
|
1207
|
-
|
|
1222
|
+
async function ie() {
|
|
1223
|
+
for (let e of [...M]) if (await e() === !1) return;
|
|
1224
|
+
let e = v.value;
|
|
1225
|
+
P = t.action ? await t.action(e) : e, h.value = !1;
|
|
1208
1226
|
}
|
|
1209
|
-
function
|
|
1210
|
-
|
|
1227
|
+
function I() {
|
|
1228
|
+
C.value || D.value || (h.value = !1);
|
|
1211
1229
|
}
|
|
1212
|
-
function
|
|
1213
|
-
|
|
1230
|
+
function L() {
|
|
1231
|
+
x.value?.querySelector("input:not([type=hidden]), textarea, select")?.focus();
|
|
1214
1232
|
}
|
|
1215
|
-
function
|
|
1216
|
-
t.required &&
|
|
1233
|
+
function ae() {
|
|
1234
|
+
t.required && P === null ? o() : n(P);
|
|
1217
1235
|
}
|
|
1218
|
-
return (e, n) => (
|
|
1219
|
-
"model-value":
|
|
1220
|
-
title:
|
|
1221
|
-
"translate-title":
|
|
1222
|
-
width:
|
|
1223
|
-
persistent:
|
|
1236
|
+
return (e, n) => (T(), i(ot, {
|
|
1237
|
+
"model-value": h.value,
|
|
1238
|
+
title: F(t).title,
|
|
1239
|
+
"translate-title": F(t).translateTitle,
|
|
1240
|
+
width: F(t).width ?? "md",
|
|
1241
|
+
persistent: F(C) || D.value,
|
|
1224
1242
|
form: "",
|
|
1225
|
-
onClose:
|
|
1226
|
-
onSubmit:
|
|
1227
|
-
onOpened:
|
|
1228
|
-
onClosed:
|
|
1243
|
+
onClose: I,
|
|
1244
|
+
onSubmit: ne,
|
|
1245
|
+
onOpened: L,
|
|
1246
|
+
onClosed: ae
|
|
1229
1247
|
}, {
|
|
1230
|
-
header:
|
|
1231
|
-
ref:
|
|
1248
|
+
header: R(() => [s("div", {
|
|
1249
|
+
ref: te,
|
|
1232
1250
|
class: "ui-dialog__toolbar"
|
|
1233
1251
|
}, null, 512)]),
|
|
1234
|
-
actions:
|
|
1252
|
+
actions: R(() => [l(F(B), {
|
|
1235
1253
|
variant: "text",
|
|
1236
|
-
disabled:
|
|
1237
|
-
onClick:
|
|
1254
|
+
disabled: F(C),
|
|
1255
|
+
onClick: I
|
|
1238
1256
|
}, {
|
|
1239
|
-
default:
|
|
1240
|
-
content:
|
|
1241
|
-
translate:
|
|
1257
|
+
default: R(() => [l(X, {
|
|
1258
|
+
content: F(f).text,
|
|
1259
|
+
translate: F(f).translateText
|
|
1242
1260
|
}, null, 8, ["content", "translate"])]),
|
|
1243
1261
|
_: 1
|
|
1244
|
-
}, 8, ["disabled"]), l(
|
|
1262
|
+
}, 8, ["disabled"]), l(F(B), {
|
|
1245
1263
|
variant: "flat",
|
|
1246
1264
|
color: "primary",
|
|
1247
1265
|
type: "submit",
|
|
1248
|
-
disabled:
|
|
1249
|
-
loading:
|
|
1266
|
+
disabled: k.value,
|
|
1267
|
+
loading: F(C)
|
|
1250
1268
|
}, {
|
|
1251
|
-
default:
|
|
1252
|
-
content:
|
|
1253
|
-
translate:
|
|
1269
|
+
default: R(() => [l(X, {
|
|
1270
|
+
content: F(d).text,
|
|
1271
|
+
translate: F(d).translateText
|
|
1254
1272
|
}, null, 8, ["content", "translate"])]),
|
|
1255
1273
|
_: 1
|
|
1256
1274
|
}, 8, ["disabled", "loading"])]),
|
|
1257
|
-
default:
|
|
1275
|
+
default: R(() => [_.value === null ? a("", !0) : (T(), i(F(le), {
|
|
1258
1276
|
key: 0,
|
|
1259
1277
|
type: "error",
|
|
1260
1278
|
variant: "tonal",
|
|
1261
1279
|
density: "compact",
|
|
1262
|
-
icon:
|
|
1280
|
+
icon: F(Q).error,
|
|
1263
1281
|
title: p.value,
|
|
1264
1282
|
text: _.value
|
|
1265
1283
|
}, null, 8, [
|
|
@@ -1268,9 +1286,9 @@ var St = /* @__PURE__ */ u({
|
|
|
1268
1286
|
"text"
|
|
1269
1287
|
])), s("div", {
|
|
1270
1288
|
ref_key: "content",
|
|
1271
|
-
ref:
|
|
1289
|
+
ref: x,
|
|
1272
1290
|
class: "ui-dialog__content"
|
|
1273
|
-
}, [
|
|
1291
|
+
}, [b.value ? (T(), i(j(F(t).component), y(g({ key: 0 }, A.value)), null, 16)) : a("", !0)], 512)]),
|
|
1274
1292
|
_: 1
|
|
1275
1293
|
}, 8, [
|
|
1276
1294
|
"model-value",
|
|
@@ -1280,7 +1298,7 @@ var St = /* @__PURE__ */ u({
|
|
|
1280
1298
|
"persistent"
|
|
1281
1299
|
]));
|
|
1282
1300
|
}
|
|
1283
|
-
}),
|
|
1301
|
+
}), Tt = ["role"], Et = { class: "ui-toast__message" }, Dt = /* @__PURE__ */ u({
|
|
1284
1302
|
__name: "ToastEntry",
|
|
1285
1303
|
setup(e) {
|
|
1286
1304
|
let t = {
|
|
@@ -1288,48 +1306,48 @@ var St = /* @__PURE__ */ u({
|
|
|
1288
1306
|
[Z.SUCCESS]: Q.success,
|
|
1289
1307
|
[Z.INFO]: Q.info,
|
|
1290
1308
|
[Z.WARNING]: Q.warning
|
|
1291
|
-
}, { entry: n, close: c, trigger: u } =
|
|
1292
|
-
return (e, t) => (
|
|
1309
|
+
}, { entry: n, close: c, trigger: u } = pt(), { options: d } = K(), f = Y(), p = r(() => f(d.i18n.messages.close, !0)), m = r(() => t[n.type]), h = r(() => n.type === Z.ERROR ? "alert" : void 0);
|
|
1310
|
+
return (e, t) => (T(), o("div", {
|
|
1293
1311
|
class: "ui-toast",
|
|
1294
1312
|
role: h.value
|
|
1295
1313
|
}, [
|
|
1296
|
-
l(
|
|
1314
|
+
l(F(fe), {
|
|
1297
1315
|
icon: m.value,
|
|
1298
1316
|
size: "20",
|
|
1299
1317
|
class: "ui-toast__icon"
|
|
1300
1318
|
}, null, 8, ["icon"]),
|
|
1301
|
-
s("span",
|
|
1302
|
-
content:
|
|
1303
|
-
translate:
|
|
1319
|
+
s("span", Et, [l(X, {
|
|
1320
|
+
content: F(n).message,
|
|
1321
|
+
translate: F(n).translateMessage
|
|
1304
1322
|
}, null, 8, ["content", "translate"])]),
|
|
1305
|
-
|
|
1323
|
+
F(n).action ? (T(), i(F(B), {
|
|
1306
1324
|
key: 0,
|
|
1307
1325
|
variant: "text",
|
|
1308
1326
|
size: "small",
|
|
1309
1327
|
class: "ui-toast__action",
|
|
1310
|
-
onClick:
|
|
1328
|
+
onClick: F(u)
|
|
1311
1329
|
}, {
|
|
1312
|
-
default:
|
|
1313
|
-
content:
|
|
1314
|
-
translate:
|
|
1330
|
+
default: R(() => [l(X, {
|
|
1331
|
+
content: F(n).action.text,
|
|
1332
|
+
translate: F(n).action.translateText ?? !0
|
|
1315
1333
|
}, null, 8, ["content", "translate"])]),
|
|
1316
1334
|
_: 1
|
|
1317
1335
|
}, 8, ["onClick"])) : a("", !0),
|
|
1318
|
-
l(
|
|
1336
|
+
l(F(B), {
|
|
1319
1337
|
variant: "text",
|
|
1320
1338
|
size: "small",
|
|
1321
|
-
icon:
|
|
1339
|
+
icon: F(Q).close,
|
|
1322
1340
|
"aria-label": p.value,
|
|
1323
1341
|
class: "ui-toast__close",
|
|
1324
|
-
onClick:
|
|
1342
|
+
onClick: F(c)
|
|
1325
1343
|
}, null, 8, [
|
|
1326
1344
|
"icon",
|
|
1327
1345
|
"aria-label",
|
|
1328
1346
|
"onClick"
|
|
1329
1347
|
])
|
|
1330
|
-
], 8,
|
|
1348
|
+
], 8, Tt));
|
|
1331
1349
|
}
|
|
1332
|
-
}),
|
|
1350
|
+
}), Ot = () => ({
|
|
1333
1351
|
loading: {
|
|
1334
1352
|
delay: 2e3,
|
|
1335
1353
|
overlay: !1
|
|
@@ -1352,43 +1370,43 @@ var St = /* @__PURE__ */ u({
|
|
|
1352
1370
|
} },
|
|
1353
1371
|
components: {
|
|
1354
1372
|
dialog: {
|
|
1355
|
-
info:
|
|
1356
|
-
confirm:
|
|
1357
|
-
form:
|
|
1373
|
+
info: h(_t),
|
|
1374
|
+
confirm: h(yt),
|
|
1375
|
+
form: h(wt)
|
|
1358
1376
|
},
|
|
1359
|
-
toast:
|
|
1377
|
+
toast: h(Dt)
|
|
1360
1378
|
}
|
|
1361
1379
|
});
|
|
1362
1380
|
//#endregion
|
|
1363
1381
|
//#region lib/plugin/helper/resolvePluginOptions.ts
|
|
1364
|
-
function
|
|
1365
|
-
let { components: t, ...n } = e, r =
|
|
1382
|
+
function kt(e = {}) {
|
|
1383
|
+
let { components: t, ...n } = e, r = Ot(), i = U(r, n);
|
|
1366
1384
|
return i.components = {
|
|
1367
1385
|
dialog: {
|
|
1368
|
-
info:
|
|
1369
|
-
confirm:
|
|
1370
|
-
form:
|
|
1386
|
+
info: h(t?.dialog?.info ?? r.components.dialog.info),
|
|
1387
|
+
confirm: h(t?.dialog?.confirm ?? r.components.dialog.confirm),
|
|
1388
|
+
form: h(t?.dialog?.form ?? r.components.dialog.form)
|
|
1371
1389
|
},
|
|
1372
|
-
toast:
|
|
1390
|
+
toast: h(t?.toast ?? r.components.toast)
|
|
1373
1391
|
}, i;
|
|
1374
1392
|
}
|
|
1375
1393
|
//#endregion
|
|
1376
1394
|
//#region lib/plugin/helper/createPluginContext.ts
|
|
1377
|
-
function
|
|
1395
|
+
function At(e) {
|
|
1378
1396
|
return {
|
|
1379
|
-
dialogQueue:
|
|
1380
|
-
toastQueue:
|
|
1397
|
+
dialogQueue: O([]),
|
|
1398
|
+
toastQueue: O([]),
|
|
1381
1399
|
toastTimers: /* @__PURE__ */ new Map(),
|
|
1382
|
-
loadingOverlay:
|
|
1400
|
+
loadingOverlay: O(!1),
|
|
1383
1401
|
options: e
|
|
1384
1402
|
};
|
|
1385
1403
|
}
|
|
1386
1404
|
//#endregion
|
|
1387
1405
|
//#region lib/plugin/createUIKit.ts
|
|
1388
|
-
function
|
|
1406
|
+
function jt(e) {
|
|
1389
1407
|
return (t) => {
|
|
1390
|
-
t.provide(
|
|
1408
|
+
t.provide(G, At(kt(e)));
|
|
1391
1409
|
};
|
|
1392
1410
|
}
|
|
1393
1411
|
//#endregion
|
|
1394
|
-
export {
|
|
1412
|
+
export { dt as ConfirmDialogLevel, Z as ToastType, Qe as UiBottomSheet, De as UiKitOutlet, ot as UiResponsiveDialog, jt as createUIKit, ut as onDialogFinish, st as useDialog, ct as useDialogEntry, lt as useFormDialog, ht as useLoading, Te as useLoadingOverlay, ft as useToast, pt as useToastEntry };
|