@wssto2/vue-core 0.4.16 → 0.4.17
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-DnFB6WXf.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-DMrQYv2e.js} +2 -2
- package/dist/{CollectionPage.vue_vue_type_script_setup_true_lang-CD5zZ29o.js → CollectionPage.vue_vue_type_script_setup_true_lang-CVnZzaBm.js} +4 -4
- 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-BIXzNzYo.js} +2 -2
- package/dist/{DeadLetters-DmwUtgf9.js → DeadLetters-BF9PS4mA.js} +3 -3
- package/dist/{General-CUEjJBD4.js → General-yInbmj6I.js} +3 -3
- package/dist/{NewRolePage-Cyn-oV6r.js → NewRolePage-09C3P6fE.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/{ProfilePage-I74SQBFO.js → ProfilePage-CvV44C0m.js} +6 -6
- 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-BqWoby16.js} +1 -1
- package/dist/{RolePage-DWQP3qQl.js → RolePage-DuIFjSKH.js} +5 -5
- package/dist/{RolesPage-BeEsHIQ2.js → RolesPage-BzqBqils.js} +2 -2
- 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/{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-_qmODKw2.js} +2 -2
- package/dist/{SettingsPage-DRQP2nrH.js → SettingsPage-Bz48sO08.js} +5 -5
- package/dist/{SignIn-CAZkovhb.js → SignIn-DJsTGQ79.js} +2 -2
- package/dist/{SignInPage-D-49oLY3.js → SignInPage-Bb78MIDk.js} +1 -1
- 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-yRjJrf47.js} +2 -2
- package/dist/{TimeField.vue_vue_type_script_setup_true_lang-pAdLPYXA.js → TimeField.vue_vue_type_script_setup_true_lang-DrLtIexs.js} +2 -2
- 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-4L0FrCty.js} +6 -6
- package/dist/{UsersList-DPHxcaDm.js → UsersList-ww_-FoAq.js} +6 -6
- 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/CommandDialog.vue.d.ts +3 -0
- package/dist/form/index.js +242 -241
- 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-C6vCe149.js} +3 -3
- package/dist/{index-yKIOaisE.js → index-DW9gyWL1.js} +4 -4
- package/dist/{index-Bq96L43f.js → index-JjALCpwi.js} +11 -11
- 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/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/{status-DzmySsWw.js → status-Cz54-7z7.js} +1 -1
- 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/format-B8mJm946.js +0 -77
|
@@ -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
|
}
|