@wssto2/vue-core 0.4.16 → 0.4.18
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/{Activity-CVO3sJwy.js → Activity-DB9ABAMb.js} +3 -3
- package/dist/{AdaptivePageShell.vue_vue_type_script_setup_true_lang-B7qSUiee.js → AdaptivePageShell.vue_vue_type_script_setup_true_lang-Bm0sxqNz.js} +64 -63
- package/dist/{Changes-Bzvl3cEx.js → Changes-IIczcs6O.js} +2 -2
- package/dist/{CollectionPage.vue_vue_type_script_setup_true_lang-CD5zZ29o.js → CollectionPage.vue_vue_type_script_setup_true_lang-CUoyYpaW.js} +6 -6
- package/dist/{DataTable.vue_vue_type_script_setup_true_lang-ChS9ULwk.js → DataTable.vue_vue_type_script_setup_true_lang-Wuvo-l_z.js} +1 -1
- package/dist/{DateField.vue_vue_type_script_setup_true_lang-BufoFwVQ.js → DateField.vue_vue_type_script_setup_true_lang-8mvjzRA-.js} +3 -3
- package/dist/{DeadLetters-DmwUtgf9.js → DeadLetters-Bq5YpnvT.js} +3 -3
- package/dist/{General-CUEjJBD4.js → General-DQruOZs2.js} +5 -5
- package/dist/{NewRolePage-Cyn-oV6r.js → NewRolePage-BcA8jBBQ.js} +3 -3
- package/dist/{NumberField.vue_vue_type_script_setup_true_lang-a8kN3A7k.js → NumberField.vue_vue_type_script_setup_true_lang-CC8bKyR_.js} +1 -1
- package/dist/{Popover.vue_vue_type_script_setup_true_lang-Dx-tDhNE.js → Popover.vue_vue_type_script_setup_true_lang-BTOzgIQF.js} +12 -12
- package/dist/{ProfilePage-I74SQBFO.js → ProfilePage-BqdCzyax.js} +7 -7
- package/dist/{RecordHeader.vue_vue_type_script_setup_true_lang-D87Hs75d.js → RecordHeader.vue_vue_type_script_setup_true_lang-DijFQnU6.js} +1 -1
- package/dist/{ResourcePage.vue_vue_type_script_setup_true_lang-Da0M-hen.js → ResourcePage.vue_vue_type_script_setup_true_lang-BpLnmA6n.js} +1 -1
- package/dist/{RoleEditor.vue_vue_type_script_setup_true_lang-Ce6wjptT.js → RoleEditor.vue_vue_type_script_setup_true_lang-DPpCuJWk.js} +2 -2
- package/dist/{RolePage-DWQP3qQl.js → RolePage-IES_ADt5.js} +6 -6
- package/dist/{RolesPage-BeEsHIQ2.js → RolesPage-D0K7tEL-.js} +3 -3
- package/dist/{SectionList.vue_vue_type_script_setup_true_lang-B0p_8xQG.js → SectionList.vue_vue_type_script_setup_true_lang-D5QWy-c1.js} +1 -1
- package/dist/{SectionNavigator.vue_vue_type_script_setup_true_lang-D5Cnb4_O.js → SectionNavigator.vue_vue_type_script_setup_true_lang-CW81A_bn.js} +2 -2
- package/dist/SelectField.vue_vue_type_script_setup_true_lang-DkbBJpYX.js +489 -0
- package/dist/{SessionList.vue_vue_type_script_setup_true_lang-DoUo68xE.js → SessionList.vue_vue_type_script_setup_true_lang-C0XvavBw.js} +1 -1
- package/dist/{Sessions-D8IXcb5M.js → Sessions-BfpiOhGs.js} +2 -2
- package/dist/{SettingsPage-DRQP2nrH.js → SettingsPage-BnEpURcU.js} +5 -5
- package/dist/{SignIn-CAZkovhb.js → SignIn-DrLE0gNr.js} +2 -2
- package/dist/{SignInPage-D-49oLY3.js → SignInPage-CRynZCU2.js} +2 -2
- package/dist/{SignInTable.vue_vue_type_script_setup_true_lang-CIv34nRn.js → SignInTable.vue_vue_type_script_setup_true_lang-7Z9EmLs-.js} +1 -1
- package/dist/{SignIns-BtNfgMLc.js → SignIns-BQ8tISWn.js} +2 -2
- package/dist/{TextField.vue_vue_type_script_setup_true_lang-D3-R5XXG.js → TextField.vue_vue_type_script_setup_true_lang-CWgn-vGl.js} +97 -90
- package/dist/{TimeField.vue_vue_type_script_setup_true_lang-pAdLPYXA.js → TimeField.vue_vue_type_script_setup_true_lang-BebAIPeL.js} +3 -3
- package/dist/{Timestamp.vue_vue_type_script_setup_true_lang-FVRUr-9y.js → Timestamp.vue_vue_type_script_setup_true_lang-CU2Y5oYl.js} +1 -1
- package/dist/{UserRecord-BSbNuRFi.js → UserRecord-CqmPm4Fv.js} +7 -7
- package/dist/{UsersList-DPHxcaDm.js → UsersList-CHAray61.js} +8 -8
- package/dist/access/index.js +1 -1
- package/dist/app/index.js +1 -1
- package/dist/collection/index.js +3 -3
- package/dist/content/index.js +1 -1
- package/dist/{fieldMessages-DV6sESpn.js → fieldMessages-6HVzSDqG.js} +1 -1
- package/dist/form/ComboField.vue.d.ts +11 -8
- package/dist/form/CommandDialog.vue.d.ts +3 -0
- package/dist/form/MultiSelectField.vue.d.ts +8 -5
- package/dist/form/OptionList.vue.d.ts +7 -4
- package/dist/form/SelectField.vue.d.ts +11 -8
- package/dist/form/SuggestionList.vue.d.ts +11 -6
- package/dist/form/index.d.ts +2 -0
- package/dist/form/index.js +981 -928
- package/dist/form/options.d.ts +18 -5
- package/dist/form/suggestions.d.ts +12 -12
- package/dist/form/useOptions.d.ts +12 -12
- package/dist/form/useRecordDialog.d.ts +47 -0
- package/dist/format/index.js +1 -1
- package/dist/format-D8X4zsx6.js +78 -0
- package/dist/identity/index.js +1 -1
- package/dist/{index-CWeNiBX6.js → index-91Lo0hJy.js} +4 -4
- package/dist/{index-Bq96L43f.js → index-sYamgVg7.js} +12 -12
- package/dist/{index-yKIOaisE.js → index-wlRejl73.js} +5 -5
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/internal/intlLocale.d.ts +2 -0
- package/dist/intlLocale-CeRU44qJ.js +4 -0
- package/dist/notifications/index.js +1 -1
- package/dist/overlay/index.js +1 -1
- package/dist/page/index.js +5 -5
- package/dist/phone/index.js +112 -111
- package/dist/resource/index.js +1 -1
- package/dist/{rowLayout-D1cYQghV.js → rowLayout-BFz4Kdoy.js} +2 -2
- package/dist/shell/index.js +1 -1
- package/dist/{status-DzmySsWw.js → status-B_IMA25a.js} +1 -1
- package/dist/{suggestions-BxMm6MQA.js → suggestions-DHJFKB26.js} +50 -50
- package/dist/testing/index.js +1 -1
- package/dist/{useCommand-B-N6HJOz.js → useCommand-YN9EMb7s.js} +41 -38
- package/dist/{useTypedEntry-aTfPBAhw.js → useTypedEntry-C7k7Dyl-.js} +237 -236
- package/package.json +1 -1
- package/dist/SelectField.vue_vue_type_script_setup_true_lang-C1Flb1hA.js +0 -465
- package/dist/format-B8mJm946.js +0 -77
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { inject as
|
|
2
|
-
import { i as
|
|
3
|
-
import { f as
|
|
4
|
-
const
|
|
1
|
+
import { inject as R, shallowRef as S, ref as y, computed as p, onBeforeUnmount as x } from "vue";
|
|
2
|
+
import { i as W } from "./error-CD7x0Jrz.js";
|
|
3
|
+
import { f as h } from "./options-Ba_0uLWN.js";
|
|
4
|
+
const j = Symbol("vue-core.recentChoices"), D = 5, J = (e) => {
|
|
5
5
|
if (typeof e != "object" || e === null) return !1;
|
|
6
6
|
const n = e;
|
|
7
7
|
return (typeof n.value == "string" || typeof n.value == "number") && typeof n.label == "string";
|
|
8
|
-
},
|
|
8
|
+
}, K = {
|
|
9
9
|
read(e) {
|
|
10
10
|
try {
|
|
11
11
|
const n = JSON.parse(localStorage.getItem(`vue-core.recent.${e}`) ?? "[]");
|
|
12
|
-
return Array.isArray(n) ? n.filter(
|
|
12
|
+
return Array.isArray(n) ? n.filter(J).slice(0, D) : [];
|
|
13
13
|
} catch {
|
|
14
14
|
return [];
|
|
15
15
|
}
|
|
@@ -21,67 +21,67 @@ const W = Symbol("vue-core.recentChoices"), D = 5, j = (e) => {
|
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
23
|
};
|
|
24
|
-
function
|
|
25
|
-
const r =
|
|
24
|
+
function q(e, n) {
|
|
25
|
+
const r = h(n.trim());
|
|
26
26
|
if (r === "") return { before: "", match: "", after: e };
|
|
27
|
-
let
|
|
27
|
+
let a = "";
|
|
28
28
|
const c = [];
|
|
29
|
-
let
|
|
29
|
+
let s = 0;
|
|
30
30
|
for (const d of e) {
|
|
31
|
-
const v =
|
|
32
|
-
for (let
|
|
33
|
-
|
|
31
|
+
const v = h(d);
|
|
32
|
+
for (let m = 0; m < v.length; m++) c.push(s);
|
|
33
|
+
a += v, s += d.length;
|
|
34
34
|
}
|
|
35
|
-
const o =
|
|
35
|
+
const o = a.indexOf(r);
|
|
36
36
|
if (o < 0) return { before: "", match: "", after: e };
|
|
37
37
|
const u = c[o] ?? 0, i = c[o + r.length] ?? e.length;
|
|
38
38
|
return { before: e.slice(0, u), match: e.slice(u, i), after: e.slice(i) };
|
|
39
39
|
}
|
|
40
|
-
function
|
|
40
|
+
function z(e, n) {
|
|
41
41
|
return e === "" || n.length <= e.length ? "" : n.toLocaleLowerCase().startsWith(e.toLocaleLowerCase()) ? n.slice(e.length) : "";
|
|
42
42
|
}
|
|
43
|
-
function
|
|
44
|
-
const r =
|
|
43
|
+
function P(e, n) {
|
|
44
|
+
const r = h(n.trim());
|
|
45
45
|
if (r === "") return [...e];
|
|
46
|
-
const
|
|
47
|
-
for (const
|
|
48
|
-
const o =
|
|
49
|
-
o.startsWith(r) ?
|
|
46
|
+
const a = [], c = [];
|
|
47
|
+
for (const s of e) {
|
|
48
|
+
const o = h(s.label);
|
|
49
|
+
o.startsWith(r) ? a.push(s) : (o.includes(r) || s.description !== void 0 && h(s.description).includes(r)) && c.push(s);
|
|
50
50
|
}
|
|
51
|
-
return [...
|
|
51
|
+
return [...a, ...c];
|
|
52
52
|
}
|
|
53
|
-
function
|
|
54
|
-
return e && (n > 0 || r === "loading" || r === "failed" || r === "loaded" &&
|
|
53
|
+
function F(e, n, r, a) {
|
|
54
|
+
return e && (n > 0 || r === "loading" || r === "failed" || r === "loaded" && a);
|
|
55
55
|
}
|
|
56
|
-
function
|
|
57
|
-
const e = S([]), n =
|
|
58
|
-
let r = 0,
|
|
56
|
+
function U() {
|
|
57
|
+
const e = S([]), n = y("idle");
|
|
58
|
+
let r = 0, a = null;
|
|
59
59
|
function c() {
|
|
60
|
-
r++,
|
|
60
|
+
r++, a?.abort(), a = null;
|
|
61
61
|
}
|
|
62
|
-
async function
|
|
62
|
+
async function s(o, u = (i) => i) {
|
|
63
63
|
c();
|
|
64
64
|
const i = r;
|
|
65
|
-
|
|
65
|
+
a = new AbortController(), n.value = "loading";
|
|
66
66
|
try {
|
|
67
|
-
const d = await o(
|
|
67
|
+
const d = await o(a.signal);
|
|
68
68
|
if (i !== r) return;
|
|
69
69
|
e.value = u(d), n.value = "loaded";
|
|
70
70
|
} catch (d) {
|
|
71
|
-
if (i !== r ||
|
|
71
|
+
if (i !== r || W(d)) return;
|
|
72
72
|
e.value = [], n.value = "failed";
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
|
-
return { items: e, status: n, run:
|
|
75
|
+
return { items: e, status: n, run: s, cancel: c };
|
|
76
76
|
}
|
|
77
|
-
function
|
|
78
|
-
const n =
|
|
77
|
+
function G(e) {
|
|
78
|
+
const n = R(j, K), r = U(), { items: a, status: c } = r, s = S([]), o = y(!1), u = y(0), i = y(!1);
|
|
79
79
|
let d = "", v = null;
|
|
80
|
-
const
|
|
80
|
+
const m = p(() => c.value === "idle" ? s.value : a.value), T = p(() => c.value === "idle" && s.value.length > 0), w = p(() => m.value[u.value]);
|
|
81
81
|
function g() {
|
|
82
82
|
r.cancel(), v && clearTimeout(v), v = null;
|
|
83
83
|
}
|
|
84
|
-
|
|
84
|
+
x(g);
|
|
85
85
|
function b(t) {
|
|
86
86
|
return u.value = 0, i.value = !1, t.slice(0, e.limit());
|
|
87
87
|
}
|
|
@@ -90,14 +90,14 @@ function F(e) {
|
|
|
90
90
|
d = t, g(), o.value = !0;
|
|
91
91
|
const l = e.source(), f = t.trim() === "";
|
|
92
92
|
if (!l || f && !e.listAllWhenEmpty || typeof l == "function" && t.trim().length < e.minLength()) {
|
|
93
|
-
c.value = "idle",
|
|
93
|
+
c.value = "idle", a.value = [], u.value = 0, i.value = !1;
|
|
94
94
|
return;
|
|
95
95
|
}
|
|
96
|
-
typeof l == "function" ? v = setTimeout(() => void E(t, l), e.debounce()) : (
|
|
96
|
+
typeof l == "function" ? v = setTimeout(() => void E(t, l), e.debounce()) : (a.value = b(P(l, t)), c.value = "loaded");
|
|
97
97
|
}
|
|
98
98
|
function k(t) {
|
|
99
99
|
const l = e.recents();
|
|
100
|
-
|
|
100
|
+
s.value = l ? n.read(l) : [], L(t), o.value = m.value.length > 0;
|
|
101
101
|
}
|
|
102
102
|
function A() {
|
|
103
103
|
g(), o.value = !1, c.value === "loading" && (c.value = "idle");
|
|
@@ -105,8 +105,8 @@ function F(e) {
|
|
|
105
105
|
function I(t) {
|
|
106
106
|
const l = e.recents();
|
|
107
107
|
if (!l) return;
|
|
108
|
-
const f = n.read(l).filter((
|
|
109
|
-
n.write(l, [
|
|
108
|
+
const f = n.read(l).filter((O) => O.value !== t.value), N = { value: t.value, label: t.label, ...t.description !== void 0 ? { description: t.description } : {}, ...t.meta !== void 0 ? { meta: t.meta } : {} };
|
|
109
|
+
n.write(l, [N, ...f].slice(0, D));
|
|
110
110
|
}
|
|
111
111
|
function C(t, l = !0) {
|
|
112
112
|
u.value = t, l && (i.value = !0);
|
|
@@ -119,20 +119,20 @@ function F(e) {
|
|
|
119
119
|
k(d), o.value = !0;
|
|
120
120
|
return;
|
|
121
121
|
}
|
|
122
|
-
const f =
|
|
122
|
+
const f = m.value.length - 1;
|
|
123
123
|
C(t.key === "ArrowDown" ? Math.min(u.value + 1, f) : Math.max(u.value - 1, 0));
|
|
124
124
|
} else if (t.key === "Enter" && o.value) {
|
|
125
125
|
const f = w.value;
|
|
126
126
|
f && !f.disabled && (i.value || !l.enterNeedsMove) && (t.preventDefault(), l.pick(f));
|
|
127
127
|
} else t.key === "Tab" && !t.shiftKey && o.value && l.complete?.() && t.preventDefault();
|
|
128
128
|
}
|
|
129
|
-
return { items:
|
|
129
|
+
return { items: m, showingRecent: T, status: c, open: o, highlighted: u, moved: i, current: w, ask: L, show: k, close: A, cancel: g, remember: I, highlight: C, keydown: M };
|
|
130
130
|
}
|
|
131
131
|
export {
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
132
|
+
U as a,
|
|
133
|
+
z as c,
|
|
134
|
+
F as l,
|
|
135
|
+
q as m,
|
|
136
|
+
j as r,
|
|
137
|
+
G as u
|
|
138
138
|
};
|
package/dist/testing/index.js
CHANGED
|
@@ -3,7 +3,7 @@ import { createMemoryHistory as P, createRouter as E, RouterView as $ } from "vu
|
|
|
3
3
|
import { a as A, i as O } from "../platform-q3cjODLx.js";
|
|
4
4
|
import { createI18n as k } from "vue-i18n";
|
|
5
5
|
import { coreMessages as M } from "../i18n/index.js";
|
|
6
|
-
import { i as R, c as S } from "../format-
|
|
6
|
+
import { i as R, c as S } from "../format-D8X4zsx6.js";
|
|
7
7
|
function K() {
|
|
8
8
|
let e, t;
|
|
9
9
|
return { promise: new Promise((s, r) => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { nextTick as f, defineComponent as L, useTemplateRef as p, ref as w, watch as
|
|
1
|
+
import { nextTick as f, defineComponent as L, useTemplateRef as p, ref as w, watch as D, onBeforeUnmount as S, computed as x, openBlock as v, createBlock as E, unref as c, createSlots as T, withCtx as y, createElementVNode as $, createElementBlock as B, toDisplayString as C, createCommentVNode as N, createVNode as z, renderSlot as g } from "vue";
|
|
2
2
|
import { useI18n as V } from "vue-i18n";
|
|
3
3
|
import { f as q } from "./useDialog-CXR3hN0G.js";
|
|
4
4
|
import { _ as A } from "./Modal.vue_vue_type_script_setup_true_lang-DpBb8ans.js";
|
|
@@ -7,12 +7,12 @@ import { _ as O, u as I } from "./FormErrors.vue_vue_type_script_setup_true_lang
|
|
|
7
7
|
import { a as R } from "./leaveGuard-Cc8yeLxM.js";
|
|
8
8
|
const d = "input:not([type=hidden]):not([disabled]), textarea:not([disabled]), select:not([disabled]), button:not([disabled]), [tabindex]:not([tabindex='-1'])";
|
|
9
9
|
async function U(t = document, n) {
|
|
10
|
-
const e = [...t.querySelectorAll("[data-field-error]")],
|
|
11
|
-
if (!
|
|
12
|
-
const r = n?.sections.value.find((
|
|
10
|
+
const e = [...t.querySelectorAll("[data-field-error]")], o = e.find((s) => s.matches(d) || s.querySelector(d)) ?? e[0];
|
|
11
|
+
if (!o) return !1;
|
|
12
|
+
const r = n?.sections.value.find((s) => s.element.contains(o));
|
|
13
13
|
r && (await n?.scrollTo(r.id, { updateUrl: !1 }), await f());
|
|
14
|
-
const
|
|
15
|
-
return (
|
|
14
|
+
const a = o.matches(d) ? o : o.querySelector(d);
|
|
15
|
+
return (a ?? o).scrollIntoView?.({ block: "center" }), (a ?? o).focus({ preventScroll: !0 }), !0;
|
|
16
16
|
}
|
|
17
17
|
const Q = (t) => ({ "data-field-key": t }), G = {
|
|
18
18
|
key: 0,
|
|
@@ -24,6 +24,7 @@ const Q = (t) => ({ "data-field-key": t }), G = {
|
|
|
24
24
|
title: {},
|
|
25
25
|
subtitle: { default: void 0 },
|
|
26
26
|
confirmLabel: {},
|
|
27
|
+
confirmDisabled: { type: Boolean, default: !1 },
|
|
27
28
|
doneLabel: { default: void 0 },
|
|
28
29
|
busyLabel: { default: void 0 },
|
|
29
30
|
message: { default: void 0 },
|
|
@@ -32,98 +33,100 @@ const Q = (t) => ({ "data-field-key": t }), G = {
|
|
|
32
33
|
},
|
|
33
34
|
emits: ["done"],
|
|
34
35
|
setup(t, { emit: n }) {
|
|
35
|
-
const e = t,
|
|
36
|
+
const e = t, o = n, { t: r } = V(), a = p("modal"), s = p("body"), u = w(!1);
|
|
36
37
|
let m = null;
|
|
37
38
|
const { confirmDiscard: _ } = R(() => e.command.open.value && e.command.form.dirty.value);
|
|
38
|
-
|
|
39
|
-
|
|
39
|
+
D(() => e.command.open.value, (l) => {
|
|
40
|
+
l ? (u.value = !1, a.value?.present()) : a.value?.dismiss();
|
|
40
41
|
});
|
|
41
|
-
async function b(
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
42
|
+
async function b(l = {}) {
|
|
43
|
+
if (e.confirmDisabled) return;
|
|
44
|
+
const i = await e.command.run();
|
|
45
|
+
if (i.status === "failed") {
|
|
46
|
+
i.failure.kind === "invalid" && await f().then(() => U(s.value ?? document));
|
|
45
47
|
return;
|
|
46
48
|
}
|
|
47
|
-
if (
|
|
48
|
-
if (
|
|
49
|
-
e.command.present(), await f(), q(
|
|
49
|
+
if (i.status !== "aborted") {
|
|
50
|
+
if (o("done"), l.addAnother) {
|
|
51
|
+
e.command.present(), await f(), q(s.value)[0]?.focus();
|
|
50
52
|
return;
|
|
51
53
|
}
|
|
52
54
|
u.value = !0, m = setTimeout(() => e.command.dismiss(), F);
|
|
53
55
|
}
|
|
54
56
|
}
|
|
55
|
-
|
|
57
|
+
S(() => {
|
|
56
58
|
m && clearTimeout(m);
|
|
57
59
|
});
|
|
58
|
-
const k =
|
|
59
|
-
return (
|
|
60
|
+
const k = x(() => e.command.form.submitting.value ? "processing" : u.value ? "done" : "idle");
|
|
61
|
+
return (l, i) => (v(), E(A, {
|
|
60
62
|
ref_key: "modal",
|
|
61
|
-
ref:
|
|
63
|
+
ref: a,
|
|
62
64
|
size: e.size,
|
|
63
65
|
grouped: "",
|
|
64
66
|
title: e.title,
|
|
65
67
|
subtitle: e.subtitle,
|
|
66
68
|
"before-dismiss": c(_),
|
|
67
69
|
"primary-label": e.confirmLabel,
|
|
70
|
+
"primary-disabled": e.confirmDisabled,
|
|
68
71
|
status: k.value,
|
|
69
72
|
"processing-label": e.busyLabel ?? c(r)("core.actions.saving"),
|
|
70
73
|
"done-label": e.doneLabel ?? c(r)("core.actions.saved"),
|
|
71
|
-
onPrimary:
|
|
72
|
-
onDismissed:
|
|
73
|
-
},
|
|
74
|
+
onPrimary: i[0] || (i[0] = (h) => b()),
|
|
75
|
+
onDismissed: i[1] || (i[1] = (h) => e.command.dismiss())
|
|
76
|
+
}, T({
|
|
74
77
|
default: y(() => [
|
|
75
|
-
|
|
78
|
+
$("div", {
|
|
76
79
|
ref_key: "body",
|
|
77
|
-
ref:
|
|
80
|
+
ref: s,
|
|
78
81
|
class: "flex min-w-0 flex-col gap-group-gap",
|
|
79
82
|
"data-test": "command-dialog"
|
|
80
83
|
}, [
|
|
81
|
-
e.message ? (v(),
|
|
84
|
+
e.message ? (v(), B("p", G, C(e.message), 1)) : N("", !0),
|
|
82
85
|
z(O, {
|
|
83
86
|
form: e.command.form,
|
|
84
87
|
label: e.fieldLabel,
|
|
85
|
-
scope:
|
|
88
|
+
scope: s.value
|
|
86
89
|
}, null, 8, ["form", "label", "scope"]),
|
|
87
|
-
g(
|
|
90
|
+
g(l.$slots, "default")
|
|
88
91
|
], 512)
|
|
89
92
|
]),
|
|
90
93
|
_: 2
|
|
91
94
|
}, [
|
|
92
|
-
|
|
95
|
+
l.$slots.actions ? {
|
|
93
96
|
name: "actions",
|
|
94
97
|
fn: y(() => [
|
|
95
|
-
g(
|
|
98
|
+
g(l.$slots, "actions", {
|
|
96
99
|
run: b,
|
|
97
100
|
busy: e.command.form.submitting.value
|
|
98
101
|
})
|
|
99
102
|
]),
|
|
100
103
|
key: "0"
|
|
101
104
|
} : void 0
|
|
102
|
-
]), 1032, ["size", "title", "subtitle", "before-dismiss", "primary-label", "status", "processing-label", "done-label"]));
|
|
105
|
+
]), 1032, ["size", "title", "subtitle", "before-dismiss", "primary-label", "primary-disabled", "status", "processing-label", "done-label"]));
|
|
103
106
|
}
|
|
104
107
|
});
|
|
105
108
|
function Y(t) {
|
|
106
|
-
const n = I(t), e = w(!1),
|
|
109
|
+
const n = I(t), e = w(!1), o = () => typeof t.defaults == "function" ? t.defaults() : t.defaults;
|
|
107
110
|
async function r() {
|
|
108
111
|
return await n.submit(t.run, {
|
|
109
112
|
// The page updating itself after the call is the refresh: its failure is "saved, but could not be read back".
|
|
110
|
-
refresh: t.done ? (
|
|
113
|
+
refresh: t.done ? (s) => t.done?.(s) : void 0
|
|
111
114
|
});
|
|
112
115
|
}
|
|
113
116
|
return {
|
|
114
117
|
form: n,
|
|
115
118
|
open: e,
|
|
116
|
-
present(
|
|
117
|
-
n.hydrate({ ...
|
|
119
|
+
present(a) {
|
|
120
|
+
n.hydrate({ ...o(), ...a }), e.value = !0;
|
|
118
121
|
},
|
|
119
122
|
dismiss() {
|
|
120
123
|
e.value = !1;
|
|
121
124
|
},
|
|
122
125
|
run: r,
|
|
123
126
|
async confirm() {
|
|
124
|
-
const
|
|
125
|
-
if (
|
|
126
|
-
if (
|
|
127
|
+
const a = await r();
|
|
128
|
+
if (a.status === "failed") throw new Error(a.failure.message);
|
|
129
|
+
if (a.status === "aborted") throw new Error("aborted");
|
|
127
130
|
}
|
|
128
131
|
};
|
|
129
132
|
}
|