@wssto2/vue-core 0.4.23 → 0.4.24
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 +21 -0
- package/dist/{Activity-Cu_mAn_m.js → Activity-CI-l_OFl.js} +1 -1
- package/dist/{Changes-DW_3-MwX.js → Changes-BdR0R20V.js} +1 -1
- package/dist/{DeadLetters-CpcMccCc.js → DeadLetters-CRTeoZS1.js} +1 -1
- package/dist/FormErrors.vue_vue_type_script_setup_true_lang-DGOSc-PS.js +295 -0
- package/dist/{FormView.vue_vue_type_script_setup_true_lang-CbvMRBOc.js → FormView.vue_vue_type_script_setup_true_lang-BUrYkjmF.js} +1 -1
- package/dist/{General-Dbc3qDRz.js → General-hdmVP72B.js} +3 -3
- package/dist/{NewRolePage-DPHFJ0I8.js → NewRolePage-BPeKasOp.js} +2 -2
- package/dist/{ProfilePage-Cc7eiyV2.js → ProfilePage-Dq9lcO5O.js} +3 -3
- package/dist/{RoleEditor.vue_vue_type_script_setup_true_lang-2fpYYCXj.js → RoleEditor.vue_vue_type_script_setup_true_lang-B6g2760V.js} +3 -3
- package/dist/{RolePage-C0jmkQkO.js → RolePage-BYH-0fVI.js} +3 -3
- package/dist/{RolesPage-eb4gqxdW.js → RolesPage-BRm5xDw7.js} +1 -1
- package/dist/{Sessions-DSDcj8Yd.js → Sessions-B1eKG_I2.js} +1 -1
- package/dist/{SettingsPage-BF7MW1GH.js → SettingsPage-0P38Ty4w.js} +3 -3
- package/dist/{SignIn-BR8-RVIk.js → SignIn-Dp8Ji0_r.js} +1 -1
- package/dist/{SignInPage-Dcws582A.js → SignInPage-CiStJboK.js} +2 -2
- package/dist/{SignIns-3u7YgKqh.js → SignIns-Bo7R2Coi.js} +1 -1
- package/dist/{UserRecord-AtZIwCO9.js → UserRecord-DGq_PPy1.js} +3 -3
- package/dist/{UsersList-1IeQnvOL.js → UsersList-BulNu4aE.js} +3 -3
- package/dist/access/index.js +1 -1
- package/dist/form/CommandDialog.vue.d.ts +6 -0
- package/dist/form/index.js +8 -8
- package/dist/form/useForm.d.ts +5 -1
- package/dist/form/useRecordDialog.d.ts +2 -2
- package/dist/identity/index.js +1 -1
- package/dist/{index--CxZ33h0.js → index-BmowiT1y.js} +12 -12
- package/dist/{index-Du3Ti2Zp.js → index-Yy28omu6.js} +4 -4
- package/dist/{index-DBTK_iMB.js → index-tnSTp0cM.js} +2 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/notifications/index.js +1 -1
- package/dist/{status-QOGPjIHu.js → status-Bh3-Cg7o.js} +1 -1
- package/dist/{useCommand-CT1RF_IB.js → useCommand-Cj-APj-P.js} +53 -50
- package/dist/{useResourceForm-CQuniKhd.js → useResourceForm-tGYTfKhH.js} +1 -1
- package/package.json +1 -1
- package/dist/FormErrors.vue_vue_type_script_setup_true_lang-4WQz-TYS.js +0 -286
package/dist/form/useForm.d.ts
CHANGED
|
@@ -84,7 +84,11 @@ export interface FormOptions<Values extends object, Output = Values> {
|
|
|
84
84
|
readonly describeFieldError?: (message: string, field: string) => string;
|
|
85
85
|
/** The draft's name for a field the server names, given the whole dotted path (`tax_id` is `taxId`, `lines.0.unit_price` is `lines.0.unitPrice`). Default: the same name. */
|
|
86
86
|
readonly serverField?: (field: string) => string;
|
|
87
|
-
/**
|
|
87
|
+
/**
|
|
88
|
+
* The sentence for a failure; return undefined for the default: the reason a request was refused as `useDescribeError` words it (the app's own
|
|
89
|
+
* describer first, a reason code the client translates, the server's sentence for a business rule, the library's words for forbidden, conflict,
|
|
90
|
+
* offline), the library's per-kind sentence for a server fault, a validator refusal, a refusal that names fields ("check the marked fields") and `refresh`.
|
|
91
|
+
*/
|
|
88
92
|
readonly failureMessage?: (kind: FormFailureKind, error: unknown) => string | undefined;
|
|
89
93
|
}
|
|
90
94
|
type Fields<Values> = readonly (keyof Values & string)[];
|
|
@@ -20,8 +20,8 @@ export interface RecordDialog<Values extends object, Output = Values, Done = unk
|
|
|
20
20
|
readonly form: Command<Values, Output, Done>["form"];
|
|
21
21
|
/** The row being edited, `null` for a new record: the title, the fields that only a new one has, "Save and add another". */
|
|
22
22
|
readonly editing: Readonly<Ref<Row | null>>;
|
|
23
|
-
/** Opens the dialog for a new record, with the defaults. */
|
|
24
|
-
create(): void;
|
|
23
|
+
/** Opens the dialog for a new record, with the defaults; `initial` is laid over them as the starting point (a suggested category), and is not an edit: the untouched dialog closes without asking. */
|
|
24
|
+
create(initial?: Partial<Values>): void;
|
|
25
25
|
/** Opens it for `row`: `toValues(row)` over the defaults. */
|
|
26
26
|
edit(row: Row): void;
|
|
27
27
|
}
|
package/dist/identity/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as t, h as n, j as a, i, k as o, d as r, l as d, m as u, n as y, r as l, o as I, s as f, q as p, t as A, f as c } from "../index
|
|
1
|
+
import { _ as t, h as n, j as a, i, k as o, d as r, l as d, m as u, n as y, r as l, o as I, s as f, q as p, t as A, f as c } from "../index-BmowiT1y.js";
|
|
2
2
|
export {
|
|
3
3
|
t as SignInAsButton,
|
|
4
4
|
n as identityFeature,
|
|
@@ -14,12 +14,12 @@ import { useRouter as J, useRoute as de } from "vue-router";
|
|
|
14
14
|
import { _ as Q } from "./Icon.vue_vue_type_script_lang-D7oC-d-S.js";
|
|
15
15
|
import { _ as L } from "./Button.vue_vue_type_script_setup_true_lang-CL9Qh5yq.js";
|
|
16
16
|
import { u as fe } from "./leaveGuard-Cc8yeLxM.js";
|
|
17
|
-
import { _ as he } from "./FormView.vue_vue_type_script_setup_true_lang-
|
|
17
|
+
import { _ as he } from "./FormView.vue_vue_type_script_setup_true_lang-BUrYkjmF.js";
|
|
18
18
|
import { _ as ye } from "./TextField.vue_vue_type_script_setup_true_lang-CP2WeU36.js";
|
|
19
19
|
import { u as ge } from "./mediaQuery-CygcXmFW.js";
|
|
20
20
|
import { u as ve } from "./useDialog-CXR3hN0G.js";
|
|
21
21
|
import { c as _e } from "./closeOverlays-CjVsIrpL.js";
|
|
22
|
-
import { u as be } from "./FormErrors.vue_vue_type_script_setup_true_lang-
|
|
22
|
+
import { u as be } from "./FormErrors.vue_vue_type_script_setup_true_lang-DGOSc-PS.js";
|
|
23
23
|
import { u as we } from "./format-D8X4zsx6.js";
|
|
24
24
|
import { _ as xe } from "./AccountMenuItem.vue_vue_type_script_setup_true_lang-CPeNxh5K.js";
|
|
25
25
|
import { b as Ee } from "./routeResource-DlTsGTg_.js";
|
|
@@ -315,7 +315,7 @@ function Cs(e) {
|
|
|
315
315
|
const Ye = async (e) => {
|
|
316
316
|
await B(e.http);
|
|
317
317
|
}, Je = z({
|
|
318
|
-
login: { name: "login", path: "/login", component: () => import("./SignInPage-
|
|
318
|
+
login: { name: "login", path: "/login", component: () => import("./SignInPage-CiStJboK.js"), meta: { public: !0, titleKey: "core.identity.signin.title" } }
|
|
319
319
|
});
|
|
320
320
|
function Os(e = {}) {
|
|
321
321
|
return H({
|
|
@@ -334,7 +334,7 @@ function Os(e = {}) {
|
|
|
334
334
|
});
|
|
335
335
|
}
|
|
336
336
|
const Z = z({
|
|
337
|
-
index: { name: "profile", path: "/profile", component: () => import("./ProfilePage-
|
|
337
|
+
index: { name: "profile", path: "/profile", component: () => import("./ProfilePage-Dq9lcO5O.js"), meta: { titleKey: "core.profile.title" } }
|
|
338
338
|
}), Qe = /* @__PURE__ */ E({
|
|
339
339
|
__name: "ProfileMenuItem",
|
|
340
340
|
setup(e) {
|
|
@@ -358,19 +358,19 @@ function es(e) {
|
|
|
358
358
|
return { name: `users.record.${e.path}`, path: e.path, component: s, meta: { ...e.meta } };
|
|
359
359
|
}
|
|
360
360
|
const W = "iam.user:view", qs = "iam.user:manage", ss = "iam.user.activity:view", ee = z({
|
|
361
|
-
index: { name: "users.index", path: "/users", component: () => import("./UsersList-
|
|
361
|
+
index: { name: "users.index", path: "/users", component: () => import("./UsersList-BulNu4aE.js"), meta: { access: W, titleKey: "core.users.title" } },
|
|
362
362
|
record: {
|
|
363
363
|
name: "users.record",
|
|
364
364
|
path: "/users/:id",
|
|
365
|
-
component: () => import("./UserRecord-
|
|
365
|
+
component: () => import("./UserRecord-DGq_PPy1.js"),
|
|
366
366
|
meta: { access: W, titleKey: "core.users.title", remountOnParam: "id" },
|
|
367
367
|
children: [
|
|
368
|
-
{ name: "users.record.general", path: "general", component: () => import("./General-
|
|
369
|
-
{ name: "users.record.signin", path: "signin", component: () => import("./SignIn-
|
|
370
|
-
{ name: "users.record.sessions", path: "sessions", component: () => import("./Sessions-
|
|
371
|
-
{ name: "users.record.signins", path: "signins", component: () => import("./SignIns-
|
|
372
|
-
{ name: "users.record.changes", path: "changes", component: () => import("./Changes-
|
|
373
|
-
{ name: "users.record.activity", path: "activity", component: () => import("./Activity-
|
|
368
|
+
{ name: "users.record.general", path: "general", component: () => import("./General-hdmVP72B.js"), meta: { section: { labelKey: "core.users.sections.general", icon: "user3Line", groupKey: "core.users.section_groups.person" } } },
|
|
369
|
+
{ name: "users.record.signin", path: "signin", component: () => import("./SignIn-Dp8Ji0_r.js"), meta: { section: { labelKey: "core.users.sections.signin", icon: "key2Line", groupKey: "core.users.section_groups.access" } } },
|
|
370
|
+
{ name: "users.record.sessions", path: "sessions", component: () => import("./Sessions-B1eKG_I2.js"), meta: { section: { labelKey: "core.users.sections.sessions", icon: "deviceLine", groupKey: "core.users.section_groups.access" } } },
|
|
371
|
+
{ name: "users.record.signins", path: "signins", component: () => import("./SignIns-Bo7R2Coi.js"), meta: { section: { labelKey: "core.users.sections.signins", icon: "timeFill", groupKey: "core.users.section_groups.activity" } } },
|
|
372
|
+
{ name: "users.record.changes", path: "changes", component: () => import("./Changes-BdR0R20V.js"), meta: { section: { labelKey: "core.users.sections.changes", icon: "edit", groupKey: "core.users.section_groups.activity" } } },
|
|
373
|
+
{ name: "users.record.activity", path: "activity", component: () => import("./Activity-CI-l_OFl.js"), meta: { access: ss, section: { labelKey: "core.users.sections.activity", icon: "listCheck", groupKey: "core.users.section_groups.activity" } } }
|
|
374
374
|
]
|
|
375
375
|
}
|
|
376
376
|
});
|
|
@@ -16,7 +16,7 @@ import { _ as Oe } from "./AsyncSection.vue_vue_type_script_setup_true_lang-Blj6
|
|
|
16
16
|
import { u as Ae } from "./useLoad-M7V-AVwR.js";
|
|
17
17
|
import { _ as De, a as Ke } from "./SelectField.vue_vue_type_script_setup_true_lang-C3FbRQW7.js";
|
|
18
18
|
import { _ as Be } from "./SegmentedField.vue_vue_type_script_setup_true_lang-Dg-_ZjgR.js";
|
|
19
|
-
import { u as Pe, _ as Ue } from "./useCommand-
|
|
19
|
+
import { u as Pe, _ as Ue } from "./useCommand-Cj-APj-P.js";
|
|
20
20
|
import { u as Fe } from "./platform-q3cjODLx.js";
|
|
21
21
|
import { _ as Ge } from "./IconTile.vue_vue_type_script_setup_true_lang-_FXvaj93.js";
|
|
22
22
|
import { u as Me } from "./mediaQuery-CygcXmFW.js";
|
|
@@ -43,12 +43,12 @@ const C = {
|
|
|
43
43
|
viewAccess: "iam.user:view",
|
|
44
44
|
manageBindings: "iam.user:manage"
|
|
45
45
|
}, re = Ee({
|
|
46
|
-
roles: { name: "access.roles", path: "/iam/roles", component: () => import("./RolesPage-
|
|
47
|
-
newRole: { name: "access.roles.new", path: "/iam/roles/new", component: () => import("./NewRolePage-
|
|
46
|
+
roles: { name: "access.roles", path: "/iam/roles", component: () => import("./RolesPage-BRm5xDw7.js"), meta: { access: F.viewRoles, titleKey: "core.access.title" } },
|
|
47
|
+
newRole: { name: "access.roles.new", path: "/iam/roles/new", component: () => import("./NewRolePage-BPeKasOp.js"), meta: { access: F.manageRoles, titleKey: "core.access.new_title" } },
|
|
48
48
|
role: {
|
|
49
49
|
name: "access.role",
|
|
50
50
|
path: "/iam/roles/:ref",
|
|
51
|
-
component: () => import("./RolePage-
|
|
51
|
+
component: () => import("./RolePage-BYH-0fVI.js"),
|
|
52
52
|
// A role's ref (its key, or the id of a custom one) swaps in place when a link leads to another role.
|
|
53
53
|
meta: { access: F.viewRoles, titleKey: "core.access.title", remountOnParam: "ref" }
|
|
54
54
|
}
|
|
@@ -31,9 +31,9 @@ const M = {
|
|
|
31
31
|
deadLettersRetryAll: y("POST", "/v1/events/dead-letters/retry", { permission: "events.deadletter:retry" }),
|
|
32
32
|
consumers: y("GET", "/v1/events/consumers", { permission: "events.deadletter:view" })
|
|
33
33
|
}, [ke, ee] = fe("vue-core.notifications"), we = "events.deadletter:view", bt = "events.deadletter:retry", J = Z({
|
|
34
|
-
index: { name: "events.deadletters", path: "/events/dead-letters", component: () => import("./DeadLetters-
|
|
34
|
+
index: { name: "events.deadletters", path: "/events/dead-letters", component: () => import("./DeadLetters-CRTeoZS1.js"), meta: { access: we, titleKey: "core.notifications.dead_letters.title" } }
|
|
35
35
|
}), j = Z({
|
|
36
|
-
index: { name: "notifications.settings", path: "/profile/notifications", component: () => import("./SettingsPage-
|
|
36
|
+
index: { name: "notifications.settings", path: "/profile/notifications", component: () => import("./SettingsPage-0P38Ty4w.js"), meta: { titleKey: "core.notifications.settings.title" } }
|
|
37
37
|
}), Te = /* @__PURE__ */ z({
|
|
38
38
|
__name: "SettingsMenuItem",
|
|
39
39
|
setup(o) {
|
package/dist/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/** The version of @wssto2/vue-core (kept equal to package.json by index.test.ts). */
|
|
2
|
-
export declare const version = "0.4.
|
|
2
|
+
export declare const version = "0.4.24";
|
package/dist/index.js
CHANGED
|
@@ -1,30 +1,32 @@
|
|
|
1
|
-
import { nextTick as f, defineComponent as
|
|
2
|
-
import { useI18n as
|
|
1
|
+
import { nextTick as f, defineComponent as N, useTemplateRef as v, ref as b, provide as q, computed as L, watch as D, onBeforeUnmount as z, openBlock as p, createElementBlock as S, Fragment as F, createVNode as $, unref as y, createSlots as V, withCtx as h, createElementVNode as A, toDisplayString as O, createCommentVNode as x, renderSlot as E, createBlock as I } from "vue";
|
|
2
|
+
import { useI18n as K } from "vue-i18n";
|
|
3
3
|
import { f as R } from "./useDialog-CXR3hN0G.js";
|
|
4
4
|
import { _ as U } from "./Modal.vue_vue_type_script_setup_true_lang-DpBb8ans.js";
|
|
5
5
|
import { _ as G } from "./AlertDialog.vue_vue_type_script_setup_true_lang-whA4WLdl.js";
|
|
6
|
-
import { D as
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
6
|
+
import { D as M } from "./useWaitStatus-fsacMl4W.js";
|
|
7
|
+
import { d as P } from "./control-B4SdblL6.js";
|
|
8
|
+
import { _ as W, u as Y } from "./FormErrors.vue_vue_type_script_setup_true_lang-DGOSc-PS.js";
|
|
9
|
+
import { a as j } from "./leaveGuard-Cc8yeLxM.js";
|
|
9
10
|
const c = "input:not([type=hidden]):not([disabled]), textarea:not([disabled]), select:not([disabled]), button:not([disabled]), [tabindex]:not([tabindex='-1'])";
|
|
10
|
-
async function
|
|
11
|
-
const e = [...t.querySelectorAll("[data-field-error]")],
|
|
12
|
-
if (!
|
|
13
|
-
const i = r?.sections.value.find((
|
|
11
|
+
async function H(t = document, r) {
|
|
12
|
+
const e = [...t.querySelectorAll("[data-field-error]")], o = e.find((n) => n.matches(c) || n.querySelector(c)) ?? e[0];
|
|
13
|
+
if (!o) return !1;
|
|
14
|
+
const i = r?.sections.value.find((n) => n.element.contains(o));
|
|
14
15
|
i && (await r?.scrollTo(i.id, { updateUrl: !1 }), await f());
|
|
15
|
-
const l =
|
|
16
|
-
return (l ??
|
|
16
|
+
const l = o.matches(c) ? o : o.querySelector(c);
|
|
17
|
+
return (l ?? o).scrollIntoView?.({ block: "center" }), (l ?? o).focus({ preventScroll: !0 }), !0;
|
|
17
18
|
}
|
|
18
|
-
const
|
|
19
|
+
const le = (t) => ({ "data-field-key": t }), J = {
|
|
19
20
|
key: 0,
|
|
20
21
|
class: "text-body text-content-muted"
|
|
21
|
-
},
|
|
22
|
+
}, re = /* @__PURE__ */ N({
|
|
22
23
|
__name: "CommandDialog",
|
|
23
24
|
props: {
|
|
24
25
|
command: {},
|
|
25
26
|
title: {},
|
|
26
27
|
subtitle: { default: void 0 },
|
|
27
28
|
confirmLabel: {},
|
|
29
|
+
editable: { type: Boolean, default: !0 },
|
|
28
30
|
confirmDisabled: { type: Boolean, default: !1 },
|
|
29
31
|
doneLabel: { default: void 0 },
|
|
30
32
|
busyLabel: { default: void 0 },
|
|
@@ -34,10 +36,11 @@ const se = (t) => ({ "data-field-key": t }), j = {
|
|
|
34
36
|
},
|
|
35
37
|
emits: ["done"],
|
|
36
38
|
setup(t, { emit: r }) {
|
|
37
|
-
const e = t,
|
|
39
|
+
const e = t, o = r, { t: i } = K(), l = v("modal"), n = v("body"), a = b(!1);
|
|
38
40
|
let u = null;
|
|
39
|
-
|
|
40
|
-
|
|
41
|
+
q(P, L(() => e.editable));
|
|
42
|
+
const { confirmDiscard: B } = j(() => e.editable && e.command.open.value && e.command.form.dirty.value);
|
|
43
|
+
D(() => e.command.open.value, (s) => {
|
|
41
44
|
s ? (a.value = !1, l.value?.present()) : l.value?.dismiss();
|
|
42
45
|
});
|
|
43
46
|
async function w(s = {}) {
|
|
@@ -45,67 +48,67 @@ const se = (t) => ({ "data-field-key": t }), j = {
|
|
|
45
48
|
}
|
|
46
49
|
async function g(s, d = {}) {
|
|
47
50
|
if (s.status === "failed") {
|
|
48
|
-
s.failure.kind === "invalid" && await f().then(() =>
|
|
51
|
+
s.failure.kind === "invalid" && await f().then(() => H(n.value ?? document));
|
|
49
52
|
return;
|
|
50
53
|
}
|
|
51
54
|
if (s.status !== "aborted") {
|
|
52
|
-
if (
|
|
53
|
-
e.command.present(), await f(), R(
|
|
55
|
+
if (o("done"), d.addAnother) {
|
|
56
|
+
e.command.present(), await f(), R(n.value)[0]?.focus();
|
|
54
57
|
return;
|
|
55
58
|
}
|
|
56
|
-
a.value = !0, u = setTimeout(() => e.command.dismiss(),
|
|
59
|
+
a.value = !0, u = setTimeout(() => e.command.dismiss(), M);
|
|
57
60
|
}
|
|
58
61
|
}
|
|
59
62
|
const k = v("ask"), m = b(null);
|
|
60
|
-
|
|
63
|
+
D(() => e.command.question?.value, (s) => {
|
|
61
64
|
s && (m.value = s, f(() => k.value?.present()));
|
|
62
65
|
});
|
|
63
66
|
const T = async () => {
|
|
64
67
|
e.command.answer && await g(await e.command.answer(!0));
|
|
65
68
|
};
|
|
66
|
-
|
|
69
|
+
z(() => {
|
|
67
70
|
u && clearTimeout(u);
|
|
68
71
|
});
|
|
69
|
-
const
|
|
70
|
-
return (s, d) => (p(),
|
|
71
|
-
|
|
72
|
+
const C = L(() => e.command.form.submitting.value ? "processing" : a.value ? "done" : "idle");
|
|
73
|
+
return (s, d) => (p(), S(F, null, [
|
|
74
|
+
$(U, {
|
|
72
75
|
ref_key: "modal",
|
|
73
76
|
ref: l,
|
|
74
77
|
size: e.size,
|
|
75
78
|
grouped: "",
|
|
76
79
|
title: e.title,
|
|
77
80
|
subtitle: e.subtitle,
|
|
78
|
-
"before-dismiss": y(
|
|
79
|
-
"primary-label": e.confirmLabel,
|
|
81
|
+
"before-dismiss": y(B),
|
|
82
|
+
"primary-label": e.editable ? e.confirmLabel : void 0,
|
|
80
83
|
"primary-disabled": e.confirmDisabled,
|
|
81
|
-
status:
|
|
84
|
+
status: C.value,
|
|
82
85
|
"processing-label": e.busyLabel ?? y(i)("core.actions.saving"),
|
|
83
86
|
"done-label": e.doneLabel ?? y(i)("core.actions.saved"),
|
|
84
87
|
onPrimary: d[0] || (d[0] = (_) => w()),
|
|
85
88
|
onDismissed: d[1] || (d[1] = (_) => e.command.dismiss())
|
|
86
|
-
},
|
|
87
|
-
default:
|
|
88
|
-
|
|
89
|
+
}, V({
|
|
90
|
+
default: h(() => [
|
|
91
|
+
A("div", {
|
|
89
92
|
ref_key: "body",
|
|
90
|
-
ref:
|
|
93
|
+
ref: n,
|
|
91
94
|
class: "flex min-w-0 flex-col gap-group-gap",
|
|
92
95
|
"data-test": "command-dialog"
|
|
93
96
|
}, [
|
|
94
|
-
e.message ? (p(),
|
|
95
|
-
|
|
97
|
+
e.message ? (p(), S("p", J, O(e.message), 1)) : x("", !0),
|
|
98
|
+
$(W, {
|
|
96
99
|
form: e.command.form,
|
|
97
100
|
label: e.fieldLabel,
|
|
98
|
-
scope:
|
|
101
|
+
scope: n.value
|
|
99
102
|
}, null, 8, ["form", "label", "scope"]),
|
|
100
|
-
|
|
103
|
+
E(s.$slots, "default")
|
|
101
104
|
], 512)
|
|
102
105
|
]),
|
|
103
106
|
_: 2
|
|
104
107
|
}, [
|
|
105
|
-
s.$slots.actions ? {
|
|
108
|
+
e.editable && s.$slots.actions ? {
|
|
106
109
|
name: "actions",
|
|
107
|
-
fn:
|
|
108
|
-
|
|
110
|
+
fn: h(() => [
|
|
111
|
+
E(s.$slots, "actions", {
|
|
109
112
|
run: w,
|
|
110
113
|
busy: e.command.form.submitting.value
|
|
111
114
|
})
|
|
@@ -113,7 +116,7 @@ const se = (t) => ({ "data-field-key": t }), j = {
|
|
|
113
116
|
key: "0"
|
|
114
117
|
} : void 0
|
|
115
118
|
]), 1032, ["size", "title", "subtitle", "before-dismiss", "primary-label", "primary-disabled", "status", "processing-label", "done-label"]),
|
|
116
|
-
m.value ? (p(),
|
|
119
|
+
m.value ? (p(), I(G, {
|
|
117
120
|
key: 0,
|
|
118
121
|
ref_key: "ask",
|
|
119
122
|
ref: k,
|
|
@@ -124,19 +127,19 @@ const se = (t) => ({ "data-field-key": t }), j = {
|
|
|
124
127
|
icon: m.value.icon,
|
|
125
128
|
action: T,
|
|
126
129
|
onDismissed: d[2] || (d[2] = (_) => void e.command.answer?.(!1))
|
|
127
|
-
}, null, 8, ["title", "message", "confirm-label", "tone", "icon"])) :
|
|
130
|
+
}, null, 8, ["title", "message", "confirm-label", "tone", "icon"])) : x("", !0)
|
|
128
131
|
], 64));
|
|
129
132
|
}
|
|
130
133
|
});
|
|
131
|
-
function
|
|
132
|
-
const r =
|
|
134
|
+
function ie(t) {
|
|
135
|
+
const r = Y(t), e = b(!1), o = () => typeof t.defaults == "function" ? t.defaults() : t.defaults, i = b(null);
|
|
133
136
|
async function l() {
|
|
134
137
|
return await r.submit(t.run, {
|
|
135
138
|
// The page updating itself after the call is the refresh: its failure is "saved, but could not be read back".
|
|
136
139
|
refresh: t.done ? (u) => t.done?.(u) : void 0
|
|
137
140
|
});
|
|
138
141
|
}
|
|
139
|
-
async function
|
|
142
|
+
async function n() {
|
|
140
143
|
const a = t.ask ? r.validate() : null, u = a === null ? null : t.ask?.(a) ?? null;
|
|
141
144
|
return u ? (i.value = u, { status: "aborted" }) : l();
|
|
142
145
|
}
|
|
@@ -144,12 +147,12 @@ function oe(t) {
|
|
|
144
147
|
form: r,
|
|
145
148
|
open: e,
|
|
146
149
|
present(a) {
|
|
147
|
-
r.hydrate({ ...
|
|
150
|
+
r.hydrate({ ...o(), ...a }), e.value = !0;
|
|
148
151
|
},
|
|
149
152
|
dismiss() {
|
|
150
153
|
e.value = !1;
|
|
151
154
|
},
|
|
152
|
-
run:
|
|
155
|
+
run: n,
|
|
153
156
|
question: i,
|
|
154
157
|
async answer(a) {
|
|
155
158
|
return i.value = null, a ? l() : { status: "aborted" };
|
|
@@ -162,8 +165,8 @@ function oe(t) {
|
|
|
162
165
|
};
|
|
163
166
|
}
|
|
164
167
|
export {
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
168
|
+
re as _,
|
|
169
|
+
le as a,
|
|
170
|
+
H as f,
|
|
171
|
+
ie as u
|
|
169
172
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { shallowRef as v, watch as m, computed as f } from "vue";
|
|
2
|
-
import { u as i, c as h } from "./FormErrors.vue_vue_type_script_setup_true_lang-
|
|
2
|
+
import { u as i, c as h } from "./FormErrors.vue_vue_type_script_setup_true_lang-DGOSc-PS.js";
|
|
3
3
|
function b(u) {
|
|
4
4
|
const t = i(u), r = v(null), s = v(!1);
|
|
5
5
|
let n = null;
|
package/package.json
CHANGED