@wssto2/vue-core 0.4.21 → 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 +481 -0
- package/dist/{Activity-DX-RK9xj.js → Activity-CI-l_OFl.js} +1 -1
- package/dist/{Changes-_nARQ9IC.js → Changes-BdR0R20V.js} +1 -1
- package/dist/{DeadLetters-O6QReswO.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-Dbfg_jGh.js → FormView.vue_vue_type_script_setup_true_lang-BUrYkjmF.js} +1 -1
- package/dist/{General-CkZoXu29.js → General-hdmVP72B.js} +3 -3
- package/dist/{NewRolePage-OosTaMfZ.js → NewRolePage-BPeKasOp.js} +2 -2
- package/dist/{ProfilePage-Dn8fQ3ff.js → ProfilePage-Dq9lcO5O.js} +3 -3
- package/dist/{RoleEditor.vue_vue_type_script_setup_true_lang-2IOio1Sa.js → RoleEditor.vue_vue_type_script_setup_true_lang-B6g2760V.js} +3 -3
- package/dist/{RolePage-33RUvHYD.js → RolePage-BYH-0fVI.js} +3 -3
- package/dist/{RolesPage-BGPoUCMP.js → RolesPage-BRm5xDw7.js} +1 -1
- package/dist/{Sessions-BbAdbjmG.js → Sessions-B1eKG_I2.js} +1 -1
- package/dist/{SettingsPage-D47NSOYW.js → SettingsPage-0P38Ty4w.js} +3 -3
- package/dist/{SignIn-DDCRzlUq.js → SignIn-Dp8Ji0_r.js} +1 -1
- package/dist/{SignInPage-D9jryXA7.js → SignInPage-CiStJboK.js} +2 -2
- package/dist/{SignIns-C_5sRrB4.js → SignIns-Bo7R2Coi.js} +1 -1
- package/dist/{UserRecord-CUhbz62x.js → UserRecord-DGq_PPy1.js} +3 -3
- package/dist/{UsersList-BE8fnICz.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/MonthYearField.vue.d.ts +3 -1
- package/dist/form/index.js +13 -11
- package/dist/form/useCommand.d.ts +4 -1
- package/dist/form/useForm.d.ts +6 -2
- package/dist/form/useRecordDialog.d.ts +2 -2
- package/dist/identity/index.js +1 -1
- package/dist/{index-DiEoRV9D.js → index-BmowiT1y.js} +12 -12
- package/dist/{index-C3HWRCEe.js → index-Yy28omu6.js} +4 -4
- package/dist/{index-D-0JNiFF.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-UWWFHi9t.js → status-Bh3-Cg7o.js} +1 -1
- package/dist/{useCommand-VIZE7xG-.js → useCommand-Cj-APj-P.js} +54 -50
- package/dist/{useResourceForm-CP2lCwmD.js → useResourceForm-tGYTfKhH.js} +1 -1
- package/package.json +3 -2
- package/dist/FormErrors.vue_vue_type_script_setup_true_lang-DWcVKZM3.js +0 -285
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)[];
|
|
@@ -107,7 +111,7 @@ export interface Form<Values extends object, Output = Values> {
|
|
|
107
111
|
reset(): void;
|
|
108
112
|
/** Takes the draft as the baseline (defaults applied right after loading are not the user's edits). */
|
|
109
113
|
markClean(): void;
|
|
110
|
-
/** Runs the validator on a copy of the draft: the errors are set and null returned, or the parsed output. */
|
|
114
|
+
/** Runs the validator on a copy of the draft: the errors are set and null returned, or the parsed output and the failure of an earlier attempt is cleared (it complained about inputs that have since been fixed). */
|
|
111
115
|
validate(): Output | null;
|
|
112
116
|
/** Like `validate` for the given fields only: the validator's issues elsewhere are ignored (a group saving to its own endpoint). True when they are fine. */
|
|
113
117
|
check(fields: Fields<Values>): boolean;
|
|
@@ -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,
|
|
@@ -121,21 +124,22 @@ const se = (t) => ({ "data-field-key": t }), j = {
|
|
|
121
124
|
message: m.value.message,
|
|
122
125
|
"confirm-label": m.value.confirmLabel,
|
|
123
126
|
tone: m.value.tone,
|
|
127
|
+
icon: m.value.icon,
|
|
124
128
|
action: T,
|
|
125
129
|
onDismissed: d[2] || (d[2] = (_) => void e.command.answer?.(!1))
|
|
126
|
-
}, null, 8, ["title", "message", "confirm-label", "tone"])) :
|
|
130
|
+
}, null, 8, ["title", "message", "confirm-label", "tone", "icon"])) : x("", !0)
|
|
127
131
|
], 64));
|
|
128
132
|
}
|
|
129
133
|
});
|
|
130
|
-
function
|
|
131
|
-
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);
|
|
132
136
|
async function l() {
|
|
133
137
|
return await r.submit(t.run, {
|
|
134
138
|
// The page updating itself after the call is the refresh: its failure is "saved, but could not be read back".
|
|
135
139
|
refresh: t.done ? (u) => t.done?.(u) : void 0
|
|
136
140
|
});
|
|
137
141
|
}
|
|
138
|
-
async function
|
|
142
|
+
async function n() {
|
|
139
143
|
const a = t.ask ? r.validate() : null, u = a === null ? null : t.ask?.(a) ?? null;
|
|
140
144
|
return u ? (i.value = u, { status: "aborted" }) : l();
|
|
141
145
|
}
|
|
@@ -143,12 +147,12 @@ function oe(t) {
|
|
|
143
147
|
form: r,
|
|
144
148
|
open: e,
|
|
145
149
|
present(a) {
|
|
146
|
-
r.hydrate({ ...
|
|
150
|
+
r.hydrate({ ...o(), ...a }), e.value = !0;
|
|
147
151
|
},
|
|
148
152
|
dismiss() {
|
|
149
153
|
e.value = !1;
|
|
150
154
|
},
|
|
151
|
-
run:
|
|
155
|
+
run: n,
|
|
152
156
|
question: i,
|
|
153
157
|
async answer(a) {
|
|
154
158
|
return i.value = null, a ? l() : { status: "aborted" };
|
|
@@ -161,8 +165,8 @@ function oe(t) {
|
|
|
161
165
|
};
|
|
162
166
|
}
|
|
163
167
|
export {
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
+
re as _,
|
|
169
|
+
le as a,
|
|
170
|
+
H as f,
|
|
171
|
+
ie as u
|
|
168
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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wssto2/vue-core",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.24",
|
|
4
4
|
"goCore": "v1.7.0",
|
|
5
5
|
"description": "Shared Vue 3 library for go-core applications: app shell, list / record / form pages and their controls.",
|
|
6
6
|
"keywords": [
|
|
@@ -25,7 +25,8 @@
|
|
|
25
25
|
],
|
|
26
26
|
"files": [
|
|
27
27
|
"dist",
|
|
28
|
-
"src/styles"
|
|
28
|
+
"src/styles",
|
|
29
|
+
"CHANGELOG.md"
|
|
29
30
|
],
|
|
30
31
|
"exports": {
|
|
31
32
|
".": {
|