@wssto2/vue-core 0.15.2 → 0.16.0
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/CHANGELOG.md +19 -0
- package/dist/{Activity-RAk3h7Aa.js → Activity-DOUuIkZR.js} +1 -1
- package/dist/{AdaptivePageShell.vue_vue_type_script_setup_true_lang-uO4EAmBb.js → AdaptivePageShell.vue_vue_type_script_setup_true_lang-d_dPurWG.js} +170 -168
- package/dist/{Changes-Dsar4rXS.js → Changes-BfcbVgmu.js} +1 -1
- package/dist/{CollectionPage.vue_vue_type_script_setup_true_lang-qxeSTAKV.js → CollectionPage.vue_vue_type_script_setup_true_lang-B5hSkJ2N.js} +1 -1
- package/dist/{DeadLetters-vt9vhJD7.js → DeadLetters-CuMvfXH8.js} +2 -2
- package/dist/{General-Bu_ZIVbk.js → General-B5vcSEhP.js} +2 -2
- package/dist/{IncidentRecord-CQdv_bN5.js → IncidentRecord-wmStcEag.js} +5 -5
- package/dist/{IncidentsList-DwQ0wuM8.js → IncidentsList-CFx5tsxP.js} +2 -2
- package/dist/{NewRolePage-C-wbA-uW.js → NewRolePage-CZxAp7LR.js} +2 -2
- package/dist/{ProfilePage-7Xk2hsNL.js → ProfilePage-B-T8kBcc.js} +3 -3
- package/dist/{RecordHeader.vue_vue_type_script_setup_true_lang-CZtvUH5L.js → RecordHeader.vue_vue_type_script_setup_true_lang-Bt5mT19g.js} +1 -1
- package/dist/{ResourcePage.vue_vue_type_script_setup_true_lang-uLrX13ab.js → ResourcePage.vue_vue_type_script_setup_true_lang-DOiFuJnH.js} +1 -1
- package/dist/{RoleEditor.vue_vue_type_script_setup_true_lang-V2D7fhR9.js → RoleEditor.vue_vue_type_script_setup_true_lang-CqSsNPCw.js} +1 -1
- package/dist/{RolePage-Crp71rRb.js → RolePage-zcUWpuDE.js} +3 -3
- package/dist/{RolesPage-DKXXnnDV.js → RolesPage-C7_zWw-c.js} +1 -1
- package/dist/{SectionNavigator.vue_vue_type_script_setup_true_lang-5ogQCj8M.js → SectionNavigator.vue_vue_type_script_setup_true_lang-BlCx9dVL.js} +2 -2
- package/dist/{ServiceAccountDialog.vue_vue_type_script_setup_true_lang-CGvJW3bi.js → ServiceAccountDialog.vue_vue_type_script_setup_true_lang-C2D_D5Hi.js} +1 -1
- package/dist/{ServiceAccountRecord-Caj7mo3A.js → ServiceAccountRecord-BYxpHzTR.js} +4 -4
- package/dist/{ServiceAccountsList-D-YqPi_h.js → ServiceAccountsList-BUuK-RUj.js} +3 -3
- package/dist/{Sessions-Bv5GU5Oi.js → Sessions-Cm-Kilwl.js} +1 -1
- package/dist/{SettingsPage-lRWvsMYK.js → SettingsPage-Bavl0K-F.js} +2 -2
- package/dist/{SignIn-m6PANavm.js → SignIn-SfEhFiyM.js} +1 -1
- package/dist/{SignInPage-C9--4P11.js → SignInPage-BU0n2ehq.js} +1 -1
- package/dist/{SignIns-BhLnkY08.js → SignIns-Ahbn5cO6.js} +1 -1
- package/dist/{UserRecord-L3ahHNjb.js → UserRecord-3pCKMHkq.js} +4 -4
- package/dist/{UsersList-C6u3YCCp.js → UsersList-vw3aDpvo.js} +2 -2
- package/dist/access/index.js +3 -3
- package/dist/app/index.js +1 -1
- package/dist/{application-C900Wz0A.js → application-CHPpOssP.js} +1 -1
- package/dist/back-LcLlFodC.js +63 -0
- package/dist/{chrome-nUcmVu8G.js → chrome-kMBKIB1N.js} +2 -2
- package/dist/collection/index.js +2 -2
- package/dist/form/GroupSheet.vue.d.ts +3 -1
- package/dist/form/index.js +3 -3
- package/dist/identity/index.js +1 -1
- package/dist/incidents/index.js +1 -1
- package/dist/{index-vES_D5ls.js → index-Ct7W_gYE.js} +2 -2
- package/dist/{index-_hDHxrt5.js → index-D9_xqF5g.js} +3 -3
- package/dist/{index-D5DuvKP1.js → index-nByFc1eL.js} +12 -12
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/{neighbors-DrEahe7B.js → neighbors-BpypL3Wb.js} +32 -31
- package/dist/notifications/index.js +1 -1
- package/dist/page/back.d.ts +37 -0
- package/dist/page/index.d.ts +1 -0
- package/dist/page/index.js +46 -42
- package/dist/resource/index.js +1 -1
- package/dist/router/index.js +1 -1
- package/dist/router/sections.d.ts +1 -1
- package/dist/sections-CSpJN0Z7.js +54 -0
- package/dist/shell/index.js +1 -1
- package/dist/testing/index.js +1 -1
- package/dist/{useGroupSheet-Qqo3ywsS.js → useGroupSheet-B-Hs4gNO.js} +104 -97
- package/dist/{useSaveChrome-7huA3FzR.js → useSaveChrome-DB9OwIjT.js} +1 -1
- package/package.json +1 -1
- package/dist/sections-DI_JhgQG.js +0 -53
|
@@ -1,18 +1,19 @@
|
|
|
1
|
-
import { defineComponent as L, useModel as X, useId as Y, useTemplateRef as O, ref as
|
|
1
|
+
import { defineComponent as L, useModel as X, useId as Y, useTemplateRef as O, ref as y, computed as w, watch as N, nextTick as $, onMounted as H, openBlock as b, createElementBlock as _, normalizeClass as T, createElementVNode as D, unref as k, Fragment as I, renderList as Z, createTextVNode as ee, toDisplayString as j, createCommentVNode as C, mergeModels as P, onBeforeUnmount as te, createBlock as V, withCtx as z, createVNode as ae, renderSlot as J, provide as A, toRef as se, shallowRef as le, toValue as K } from "vue";
|
|
2
2
|
import { useI18n as Q } from "vue-i18n";
|
|
3
3
|
import { _ as oe } from "./Modal.vue_vue_type_script_setup_true_lang-CZ7WrDwu.js";
|
|
4
4
|
import { _ as q } from "./Banner.vue_vue_type_script_setup_true_lang-sv0phngk.js";
|
|
5
5
|
import { D as ne } from "./shortcut-oixX55SZ.js";
|
|
6
6
|
import { _ as re, r as ie, s as U, c as B, f as ue } from "./FormGroup.vue_vue_type_script_setup_true_lang-dsO1m9Mm.js";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
|
|
7
|
+
import { f as ce } from "./useCommand-DAMgQ5NE.js";
|
|
8
|
+
import { d as de } from "./options-B48UiYsG.js";
|
|
9
|
+
import { t as fe } from "./toast-CqSDTWRX.js";
|
|
10
|
+
import { a as ve } from "./leaveGuard-Cc8yeLxM.js";
|
|
11
|
+
const me = ["id", "value", "name", "disabled", "aria-label", "aria-invalid", "aria-describedby"], pe = {
|
|
11
12
|
key: 1,
|
|
12
13
|
class: "h-5 w-px animate-caret-blink bg-content-strong"
|
|
13
|
-
},
|
|
14
|
+
}, Ee = /* @__PURE__ */ L({
|
|
14
15
|
__name: "OtpInput",
|
|
15
|
-
props: /* @__PURE__ */
|
|
16
|
+
props: /* @__PURE__ */ P({
|
|
16
17
|
length: { default: 6 },
|
|
17
18
|
disabled: { type: Boolean, default: !1 },
|
|
18
19
|
invalid: { type: Boolean, default: !1 },
|
|
@@ -24,44 +25,44 @@ const ve = ["id", "value", "name", "disabled", "aria-label", "aria-invalid", "ar
|
|
|
24
25
|
modelValue: { default: "" },
|
|
25
26
|
modelModifiers: {}
|
|
26
27
|
}),
|
|
27
|
-
emits: /* @__PURE__ */
|
|
28
|
+
emits: /* @__PURE__ */ P(["complete"], ["update:modelValue"]),
|
|
28
29
|
setup(l, { expose: a, emit: t }) {
|
|
29
|
-
const o = l,
|
|
30
|
+
const o = l, u = X(l, "modelValue"), c = t, { t: d } = Q(), v = Y(), r = O("input"), f = y(!1), g = y(0), m = y(!1), h = (s) => s.replace(/\D/g, "").slice(0, o.length), i = w(() => h(u.value)), x = w(() => Math.min(g.value, o.length - 1)), G = w(() => o.label ?? d("core.form.otp.label", { length: o.length }));
|
|
30
31
|
function p() {
|
|
31
|
-
g.value = r.value?.selectionStart ??
|
|
32
|
+
g.value = r.value?.selectionStart ?? i.value.length;
|
|
32
33
|
}
|
|
33
34
|
function S(s) {
|
|
34
|
-
const e =
|
|
35
|
+
const e = h(s);
|
|
35
36
|
r.value && r.value.value !== e && (r.value.value = e);
|
|
36
|
-
const n = e !==
|
|
37
|
-
|
|
37
|
+
const n = e !== i.value;
|
|
38
|
+
u.value = e, $(p), n && e.length === o.length && c("complete", e);
|
|
38
39
|
}
|
|
39
|
-
function
|
|
40
|
+
function E(s) {
|
|
40
41
|
const e = s.clipboardData?.getData("text") ?? "";
|
|
41
|
-
e && (s.preventDefault(), S(e),
|
|
42
|
-
const n =
|
|
42
|
+
e && (s.preventDefault(), S(e), $(() => {
|
|
43
|
+
const n = i.value.length;
|
|
43
44
|
r.value?.setSelectionRange(n, n), p();
|
|
44
45
|
}));
|
|
45
46
|
}
|
|
46
47
|
return N(
|
|
47
48
|
() => o.invalid,
|
|
48
49
|
(s) => {
|
|
49
|
-
s && (
|
|
50
|
+
s && (m.value = !1, requestAnimationFrame(() => m.value = !0));
|
|
50
51
|
}
|
|
51
|
-
), N(
|
|
52
|
-
r.value && r.value.value !== s && (r.value.value = s,
|
|
52
|
+
), N(i, (s) => {
|
|
53
|
+
r.value && r.value.value !== s && (r.value.value = s, $(p));
|
|
53
54
|
}), H(() => {
|
|
54
55
|
o.autofocus && r.value?.focus();
|
|
55
56
|
}), a({ focus: () => r.value?.focus() }), (s, e) => (b(), _("div", {
|
|
56
|
-
class: T(["relative inline-flex gap-2 sm:gap-3", { "motion-safe:animate-shake":
|
|
57
|
+
class: T(["relative inline-flex gap-2 sm:gap-3", { "motion-safe:animate-shake": m.value }]),
|
|
57
58
|
"data-test": "otp-input",
|
|
58
|
-
onAnimationend: e[3] || (e[3] = (n) =>
|
|
59
|
+
onAnimationend: e[3] || (e[3] = (n) => m.value = !1)
|
|
59
60
|
}, [
|
|
60
|
-
|
|
61
|
-
id:
|
|
61
|
+
D("input", {
|
|
62
|
+
id: k(v),
|
|
62
63
|
ref_key: "input",
|
|
63
64
|
ref: r,
|
|
64
|
-
value:
|
|
65
|
+
value: i.value,
|
|
65
66
|
name: o.name,
|
|
66
67
|
type: "text",
|
|
67
68
|
inputmode: "numeric",
|
|
@@ -69,34 +70,34 @@ const ve = ["id", "value", "name", "disabled", "aria-label", "aria-invalid", "ar
|
|
|
69
70
|
pattern: "\\d*",
|
|
70
71
|
spellcheck: "false",
|
|
71
72
|
disabled: o.disabled,
|
|
72
|
-
"aria-label":
|
|
73
|
+
"aria-label": G.value,
|
|
73
74
|
"aria-invalid": o.invalid || void 0,
|
|
74
75
|
"aria-describedby": o.describedBy,
|
|
75
76
|
"data-test": "otp-input-field",
|
|
76
77
|
class: "absolute inset-0 z-10 h-full w-full cursor-text border-0 bg-transparent p-0 text-base text-transparent caret-transparent outline-none selection:bg-transparent disabled:cursor-not-allowed",
|
|
77
78
|
onInput: e[0] || (e[0] = (n) => S(n.target.value)),
|
|
78
|
-
onPaste:
|
|
79
|
+
onPaste: E,
|
|
79
80
|
onFocus: e[1] || (e[1] = (n) => {
|
|
80
|
-
|
|
81
|
+
f.value = !0, p();
|
|
81
82
|
}),
|
|
82
|
-
onBlur: e[2] || (e[2] = (n) =>
|
|
83
|
+
onBlur: e[2] || (e[2] = (n) => f.value = !1),
|
|
83
84
|
onKeyup: p,
|
|
84
85
|
onClick: p,
|
|
85
86
|
onSelect: p
|
|
86
|
-
}, null, 40,
|
|
87
|
+
}, null, 40, me),
|
|
87
88
|
(b(!0), _(I, null, Z(o.length, (n) => (b(), _("div", {
|
|
88
89
|
key: n,
|
|
89
90
|
"aria-hidden": "true",
|
|
90
91
|
"data-test": "otp-input-cell",
|
|
91
|
-
class: T(["flex size-11 items-center justify-center rounded-control bg-fill text-lg font-medium tabular-nums text-content-strong transition-[box-shadow] sm:size-13 sm:text-xl", [o.invalid ? "bg-status-danger-surface ring-[1.5px] ring-inset ring-border-destructive" :
|
|
92
|
+
class: T(["flex size-11 items-center justify-center rounded-control bg-fill text-lg font-medium tabular-nums text-content-strong transition-[box-shadow] sm:size-13 sm:text-xl", [o.invalid ? "bg-status-danger-surface ring-[1.5px] ring-inset ring-border-destructive" : f.value && x.value === n - 1 ? "bg-surface-cell ring-[1.5px] ring-inset ring-border-focus outline-3 outline-border-focus/20" : "", o.disabled ? "opacity-45" : ""]])
|
|
92
93
|
}, [
|
|
93
|
-
|
|
94
|
-
ee(j(
|
|
95
|
-
], 64)) :
|
|
94
|
+
i.value[n - 1] ? (b(), _(I, { key: 0 }, [
|
|
95
|
+
ee(j(i.value[n - 1]), 1)
|
|
96
|
+
], 64)) : f.value && x.value === n - 1 ? (b(), _("span", pe)) : C("", !0)
|
|
96
97
|
], 2))), 128))
|
|
97
98
|
], 34));
|
|
98
99
|
}
|
|
99
|
-
}),
|
|
100
|
+
}), be = { class: "text-footnote" }, ge = { class: "text-footnote" }, Fe = /* @__PURE__ */ L({
|
|
100
101
|
__name: "GroupSheet",
|
|
101
102
|
props: {
|
|
102
103
|
sheet: {},
|
|
@@ -109,72 +110,78 @@ const ve = ["id", "value", "name", "disabled", "aria-label", "aria-invalid", "ar
|
|
|
109
110
|
},
|
|
110
111
|
emits: ["saved"],
|
|
111
112
|
setup(l, { emit: a }) {
|
|
112
|
-
const t = l, o = a, { t:
|
|
113
|
+
const t = l, o = a, { t: u } = Q(), c = O("modal"), d = O("body"), v = y(!1);
|
|
113
114
|
let r = null;
|
|
114
|
-
N(() => t.sheet.open.value, (
|
|
115
|
-
|
|
115
|
+
N(() => t.sheet.open.value, (h) => {
|
|
116
|
+
h ? (v.value = !1, c.value?.present()) : c.value?.dismiss();
|
|
116
117
|
}), H(() => {
|
|
117
|
-
t.sheet.open.value &&
|
|
118
|
+
t.sheet.open.value && c.value?.present();
|
|
118
119
|
}), te(() => {
|
|
119
120
|
r && clearTimeout(r);
|
|
120
121
|
});
|
|
121
|
-
|
|
122
|
-
|
|
122
|
+
const f = () => $().then(() => d.value ? ce(d.value) : !1);
|
|
123
|
+
async function g() {
|
|
124
|
+
if (!await t.sheet.save()) {
|
|
125
|
+
f();
|
|
126
|
+
return;
|
|
127
|
+
}
|
|
128
|
+
v.value = !0, o("saved"), r = setTimeout(() => t.sheet.dismiss(), ne);
|
|
123
129
|
}
|
|
124
|
-
const
|
|
125
|
-
return (
|
|
130
|
+
const m = w(() => t.sheet.saving.value ? "processing" : v.value ? "done" : "idle");
|
|
131
|
+
return (h, i) => (b(), V(oe, {
|
|
126
132
|
ref_key: "modal",
|
|
127
|
-
ref:
|
|
133
|
+
ref: c,
|
|
128
134
|
size: t.size,
|
|
129
135
|
grouped: "",
|
|
130
136
|
title: t.title,
|
|
131
137
|
subtitle: t.subtitle,
|
|
132
138
|
"before-dismiss": t.sheet.beforeDismiss,
|
|
133
|
-
"primary-label": t.editable ?
|
|
134
|
-
status:
|
|
135
|
-
"processing-label":
|
|
136
|
-
"done-label":
|
|
137
|
-
onPrimary:
|
|
138
|
-
|
|
139
|
+
"primary-label": t.editable ? k(u)("core.actions.save") : void 0,
|
|
140
|
+
status: m.value,
|
|
141
|
+
"processing-label": k(u)("core.actions.saving"),
|
|
142
|
+
"done-label": k(u)("core.actions.saved"),
|
|
143
|
+
onPrimary: g,
|
|
144
|
+
onPresented: f,
|
|
145
|
+
onDismissed: i[0] || (i[0] = (x) => t.sheet.closed())
|
|
139
146
|
}, {
|
|
140
|
-
default:
|
|
141
|
-
|
|
147
|
+
default: z(() => [
|
|
148
|
+
D("div", {
|
|
142
149
|
ref_key: "body",
|
|
143
|
-
ref:
|
|
150
|
+
ref: d,
|
|
144
151
|
class: "flex min-w-0 flex-col gap-group-gap"
|
|
145
152
|
}, [
|
|
146
|
-
t.sheet.notice.value ? (b(),
|
|
153
|
+
t.sheet.notice.value ? (b(), V(q, {
|
|
147
154
|
key: 0,
|
|
148
155
|
tone: "warning",
|
|
149
156
|
"data-test": "group-sheet-notice"
|
|
150
157
|
}, {
|
|
151
|
-
default:
|
|
152
|
-
|
|
158
|
+
default: z(() => [
|
|
159
|
+
D("p", be, j(t.sheet.notice.value), 1)
|
|
153
160
|
]),
|
|
154
161
|
_: 1
|
|
155
162
|
})) : C("", !0),
|
|
156
|
-
t.sheet.foreignGroups.value.length ? (b(),
|
|
163
|
+
t.sheet.foreignGroups.value.length ? (b(), V(q, {
|
|
157
164
|
key: 1,
|
|
158
165
|
tone: "warning",
|
|
159
166
|
"data-test": "group-sheet-foreign"
|
|
160
167
|
}, {
|
|
161
|
-
default:
|
|
162
|
-
|
|
168
|
+
default: z(() => [
|
|
169
|
+
D("p", ge, j(k(u)("core.form.group.foreign", { groups: t.sheet.foreignGroups.value.map(t.groupLabel).join(", ") })), 1)
|
|
163
170
|
]),
|
|
164
171
|
_: 1
|
|
165
172
|
})) : C("", !0),
|
|
166
173
|
ae(re, {
|
|
167
174
|
form: t.sheet.form,
|
|
168
175
|
label: t.fieldLabel,
|
|
169
|
-
scope:
|
|
176
|
+
scope: d.value
|
|
170
177
|
}, null, 8, ["form", "label", "scope"]),
|
|
171
|
-
J(
|
|
178
|
+
J(h.$slots, "default")
|
|
172
179
|
], 512)
|
|
173
180
|
]),
|
|
174
181
|
_: 3
|
|
175
182
|
}, 8, ["size", "title", "subtitle", "before-dismiss", "primary-label", "status", "processing-label", "done-label"]));
|
|
176
183
|
}
|
|
177
|
-
}),
|
|
184
|
+
}), he = ["data-group"], Ve = /* @__PURE__ */ L({
|
|
178
185
|
__name: "RecordGroupScope",
|
|
179
186
|
props: {
|
|
180
187
|
only: {},
|
|
@@ -182,43 +189,43 @@ const ve = ["id", "value", "name", "disabled", "aria-label", "aria-invalid", "ar
|
|
|
182
189
|
},
|
|
183
190
|
setup(l) {
|
|
184
191
|
const a = l;
|
|
185
|
-
return
|
|
192
|
+
return A(ie, { only: se(a, "only") }), A(de, w(() => a.editable)), (t, o) => (b(), _("div", {
|
|
186
193
|
class: "flex min-w-0 flex-col gap-group-gap",
|
|
187
194
|
"data-test": "record-group-scope",
|
|
188
195
|
"data-group": a.only
|
|
189
196
|
}, [
|
|
190
197
|
J(t.$slots, "default")
|
|
191
|
-
], 8,
|
|
198
|
+
], 8, he));
|
|
192
199
|
}
|
|
193
200
|
});
|
|
194
201
|
function ze(l) {
|
|
195
202
|
const { form: a } = l;
|
|
196
203
|
if (l.rebase && !a.rebase) throw new Error("useGroupSheet: `rebase` needs a record form (useResourceForm), which can take the freshly read record as its base.");
|
|
197
|
-
const t = () => typeof l.fields == "function" ? l.fields() : l.fields, o = () =>
|
|
198
|
-
let
|
|
199
|
-
const g = (s) => Object.fromEntries(s.map((e) => [e, B(a.values[e])])),
|
|
200
|
-
function
|
|
201
|
-
|
|
204
|
+
const t = () => typeof l.fields == "function" ? l.fields() : l.fields, o = () => K(l.restore) ?? t(), u = y(!1), c = y(!1), d = y([]), v = y(null), r = le({});
|
|
205
|
+
let f = {};
|
|
206
|
+
const g = (s) => Object.fromEntries(s.map((e) => [e, B(a.values[e])])), m = w(() => u.value && !U(g(o()), r.value)), { confirmDiscard: h } = ve(() => m.value);
|
|
207
|
+
function i() {
|
|
208
|
+
f = g(o()), r.value = B(f);
|
|
202
209
|
}
|
|
203
|
-
function
|
|
204
|
-
|
|
210
|
+
function x() {
|
|
211
|
+
i(), d.value = [], v.value = null, a.dismissFailure(), u.value = !0;
|
|
205
212
|
}
|
|
206
|
-
function
|
|
207
|
-
if (
|
|
208
|
-
|
|
213
|
+
function G() {
|
|
214
|
+
if (u.value) {
|
|
215
|
+
m.value && Object.assign(a.values, B(f));
|
|
209
216
|
for (const s of t()) a.errors.clear(s);
|
|
210
|
-
a.dismissFailure(),
|
|
217
|
+
a.dismissFailure(), u.value = !1;
|
|
211
218
|
}
|
|
212
219
|
}
|
|
213
220
|
function p(s) {
|
|
214
|
-
const e = new Set(t()), n =
|
|
221
|
+
const e = new Set(t()), n = K(l.group), M = /* @__PURE__ */ new Set();
|
|
215
222
|
for (const W of Object.keys(s.all())) {
|
|
216
223
|
const R = ue(W);
|
|
217
224
|
if (e.has(R)) continue;
|
|
218
|
-
const
|
|
219
|
-
|
|
225
|
+
const F = l.groupOf?.(R) ?? l.fallbackGroup;
|
|
226
|
+
F && F !== n && M.add(F);
|
|
220
227
|
}
|
|
221
|
-
|
|
228
|
+
d.value = [...M];
|
|
222
229
|
}
|
|
223
230
|
async function S(s) {
|
|
224
231
|
const e = B(g(t().filter((n) => !U(a.values[n], r.value[n]))));
|
|
@@ -227,11 +234,11 @@ function ze(l) {
|
|
|
227
234
|
} catch {
|
|
228
235
|
return;
|
|
229
236
|
}
|
|
230
|
-
a.rebase?.() && (
|
|
237
|
+
a.rebase?.() && (i(), Object.assign(a.values, e), v.value = s.message());
|
|
231
238
|
}
|
|
232
|
-
async function
|
|
233
|
-
if (
|
|
234
|
-
|
|
239
|
+
async function E() {
|
|
240
|
+
if (c.value) return !1;
|
|
241
|
+
c.value = !0, d.value = [], v.value = null;
|
|
235
242
|
try {
|
|
236
243
|
const s = l.onSaved ? () => l.onSaved?.() : void 0;
|
|
237
244
|
let e;
|
|
@@ -240,38 +247,38 @@ function ze(l) {
|
|
|
240
247
|
else throw new Error("useGroupSheet: the form has no full-record save(), so give the sheet its own `save` for a dedicated endpoint.");
|
|
241
248
|
switch (e.status) {
|
|
242
249
|
case "saved":
|
|
243
|
-
return
|
|
250
|
+
return i(), !0;
|
|
244
251
|
case "saved-refresh-failed":
|
|
245
|
-
return
|
|
252
|
+
return i(), fe.warning(a.failure.value?.message ?? ""), !0;
|
|
246
253
|
case "aborted":
|
|
247
254
|
return !1;
|
|
248
255
|
case "failed":
|
|
249
256
|
return e.failure.kind === "conflict" && l.rebase ? await S(l.rebase) : p(a.errors), !1;
|
|
250
257
|
}
|
|
251
258
|
} finally {
|
|
252
|
-
|
|
259
|
+
c.value = !1;
|
|
253
260
|
}
|
|
254
261
|
}
|
|
255
262
|
return {
|
|
256
|
-
open:
|
|
257
|
-
saving:
|
|
258
|
-
dirty:
|
|
259
|
-
foreignGroups:
|
|
260
|
-
notice:
|
|
263
|
+
open: u,
|
|
264
|
+
saving: c,
|
|
265
|
+
dirty: m,
|
|
266
|
+
foreignGroups: d,
|
|
267
|
+
notice: v,
|
|
261
268
|
failure: a.failure,
|
|
262
269
|
form: a,
|
|
263
|
-
present:
|
|
270
|
+
present: x,
|
|
264
271
|
dismiss: () => {
|
|
265
|
-
|
|
272
|
+
u.value = !1;
|
|
266
273
|
},
|
|
267
|
-
save:
|
|
268
|
-
beforeDismiss:
|
|
269
|
-
closed:
|
|
274
|
+
save: E,
|
|
275
|
+
beforeDismiss: h,
|
|
276
|
+
closed: G
|
|
270
277
|
};
|
|
271
278
|
}
|
|
272
279
|
export {
|
|
273
|
-
|
|
280
|
+
Fe as _,
|
|
274
281
|
Ve as a,
|
|
275
|
-
|
|
282
|
+
Ee as b,
|
|
276
283
|
ze as u
|
|
277
284
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { computed as u, toValue as l } from "vue";
|
|
2
2
|
import { useI18n as m } from "vue-i18n";
|
|
3
|
-
import {
|
|
3
|
+
import { a as i } from "./chrome-kMBKIB1N.js";
|
|
4
4
|
import { a as n } from "./leaveGuard-Cc8yeLxM.js";
|
|
5
5
|
function o(e) {
|
|
6
6
|
const { t: a } = m(), r = u(() => (l(e.ready) ?? !0) && (l(e.allowed) ?? !0)), c = u(() => r.value && e.form.dirty.value);
|
package/package.json
CHANGED
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import { computed as n, watch as h } from "vue";
|
|
2
|
-
import { useI18n as b } from "vue-i18n";
|
|
3
|
-
import { useRoute as g, useRouter as p } from "vue-router";
|
|
4
|
-
import { u as y } from "./platform-ORzRR3Tw.js";
|
|
5
|
-
import { i as w } from "./access-DmAceEo5.js";
|
|
6
|
-
function j() {
|
|
7
|
-
const t = g(), u = p(), { access: c } = y(), { t: r } = b(), i = n(() => {
|
|
8
|
-
for (let e = t.matched.length - 1; e >= 0; e--) {
|
|
9
|
-
const a = t.matched[e];
|
|
10
|
-
if (a?.children.some((o) => o.name && o.meta?.section)) return a;
|
|
11
|
-
}
|
|
12
|
-
return null;
|
|
13
|
-
}), l = n(() => (i.value?.children ?? []).filter((e) => e.name && e.meta?.section)), f = (e) => t.matched.some((a) => a.name === e.name) || t.meta.sectionParent === e.name, d = (e) => {
|
|
14
|
-
const a = u.getRoutes().find((s) => s.name === e)?.path ?? "", o = new Set([...a.matchAll(/:(\w+)/g)].map((s) => s[1]));
|
|
15
|
-
return Object.fromEntries(Object.entries(t.params).filter(([s]) => o.has(s)));
|
|
16
|
-
}, v = n(
|
|
17
|
-
() => l.value.filter((e) => w(e.meta?.access, c)).map((e) => {
|
|
18
|
-
const a = e.meta.section, o = r(a.labelKey);
|
|
19
|
-
return {
|
|
20
|
-
name: String(e.name),
|
|
21
|
-
label: o,
|
|
22
|
-
shortLabel: a.shortLabelKey ? r(a.shortLabelKey) : o,
|
|
23
|
-
icon: a.icon,
|
|
24
|
-
group: a.groupKey ? r(a.groupKey) : void 0,
|
|
25
|
-
to: { name: e.name, params: d(e.name), query: t.meta.sectionParent ? {} : t.query },
|
|
26
|
-
active: f(e)
|
|
27
|
-
};
|
|
28
|
-
})
|
|
29
|
-
), m = n(() => v.value.find((e) => e.active) ?? null);
|
|
30
|
-
return {
|
|
31
|
-
sections: v,
|
|
32
|
-
declared: n(() => l.value.length),
|
|
33
|
-
active: m,
|
|
34
|
-
first: n(() => v.value[0] ?? null),
|
|
35
|
-
subPage: n(() => !!m.value && t.meta.sectionParent === m.value.name),
|
|
36
|
-
bare: n(() => !!i.value && t.matched[t.matched.length - 1] === i.value),
|
|
37
|
-
denied: n(() => l.value.some(f) && !m.value)
|
|
38
|
-
};
|
|
39
|
-
}
|
|
40
|
-
function q(t) {
|
|
41
|
-
const u = p();
|
|
42
|
-
h(
|
|
43
|
-
() => [t.bare.value || t.denied.value, t.first.value],
|
|
44
|
-
([c, r]) => {
|
|
45
|
-
c && r && u.replace(r.to);
|
|
46
|
-
},
|
|
47
|
-
{ immediate: !0 }
|
|
48
|
-
);
|
|
49
|
-
}
|
|
50
|
-
export {
|
|
51
|
-
q as a,
|
|
52
|
-
j as u
|
|
53
|
-
};
|