@wssto2/vue-core 0.4.28 → 0.5.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 +67 -0
- package/dist/{AccessGate.vue_vue_type_script_setup_true_lang-J5HoyGNJ.js → AccessGate.vue_vue_type_script_setup_true_lang-Nw1IsB8N.js} +1 -1
- package/dist/{ActionRow.vue_vue_type_script_setup_true_lang-QPvYudWc.js → ActionRow.vue_vue_type_script_setup_true_lang-BCgKzUvG.js} +1 -1
- package/dist/{Activity-BWkVX1Nx.js → Activity-CoGI2_GL.js} +7 -7
- package/dist/{Changes-MG77TDwz.js → Changes-Cwfe6wbX.js} +6 -6
- package/dist/{CollectionPage.vue_vue_type_script_setup_true_lang-Bnpv9TEj.js → CollectionPage.vue_vue_type_script_setup_true_lang-CtvHtFLy.js} +4 -4
- package/dist/{DateField.vue_vue_type_script_setup_true_lang-CpuH0WTl.js → DateField.vue_vue_type_script_setup_true_lang-DRuWzSaX.js} +1 -1
- package/dist/{DeadLetters-CkDE71B3.js → DeadLetters-DyA5Dqn0.js} +7 -7
- package/dist/{FormErrors.vue_vue_type_script_setup_true_lang-DGOSc-PS.js → FormErrors.vue_vue_type_script_setup_true_lang-D7edzNTL.js} +2 -2
- package/dist/{FormGroup.vue_vue_type_script_setup_true_lang-DSwSRsA5.js → FormGroup.vue_vue_type_script_setup_true_lang-BPchlRCl.js} +2 -2
- package/dist/{FormView.vue_vue_type_script_setup_true_lang-BUrYkjmF.js → FormView.vue_vue_type_script_setup_true_lang-CPSYV7iQ.js} +2 -2
- package/dist/{General-UTBVEXbN.js → General-DTEfxWls.js} +10 -10
- package/dist/MenuButton.vue_vue_type_script_setup_true_lang-AGbN9r5q.js +28 -0
- package/dist/{NewRolePage-B7DwFWPk.js → NewRolePage-CRZoUajV.js} +3 -3
- package/dist/{NumberField.vue_vue_type_script_setup_true_lang-DaE5BLm4.js → NumberField.vue_vue_type_script_setup_true_lang-ButMV_sf.js} +1 -1
- package/dist/ProfilePage-DLY81mvN.js +764 -0
- package/dist/RoleEditor.vue_vue_type_script_setup_true_lang-gXbxXG2R.js +325 -0
- package/dist/RolePage-B9t586Q8.js +314 -0
- package/dist/{RolesPage-B5RwSZ89.js → RolesPage-BRdG-OSL.js} +6 -6
- package/dist/{SectionNavigator.vue_vue_type_script_setup_true_lang-Dmv6TpCi.js → SectionNavigator.vue_vue_type_script_setup_true_lang-Cy9Oi0ts.js} +1 -1
- package/dist/{SegmentedField.vue_vue_type_script_setup_true_lang-Dg-_ZjgR.js → SegmentedField.vue_vue_type_script_setup_true_lang-BwyMvkis.js} +1 -1
- package/dist/{SelectField.vue_vue_type_script_setup_true_lang-C3FbRQW7.js → SelectField.vue_vue_type_script_setup_true_lang-BzQC1qDQ.js} +11 -12
- package/dist/SessionList.vue_vue_type_script_setup_true_lang-DhoTd5D7.js +133 -0
- package/dist/{Sessions-DWj2OGo0.js → Sessions-vGyUOnPG.js} +5 -5
- package/dist/SettingsPage-V8WeADZZ.js +632 -0
- package/dist/{SignIn-COThB9XN.js → SignIn-C-3i8RG6.js} +7 -7
- package/dist/{SignInPage-CdzgSvRm.js → SignInPage-D2NA3VKU.js} +4 -4
- package/dist/SignIns-eoYPB6kB.js +121 -0
- package/dist/{SwitchField.vue_vue_type_script_setup_true_lang-ALvJisiP.js → SwitchField.vue_vue_type_script_setup_true_lang-D_-HACqT.js} +1 -1
- package/dist/{TextField.vue_vue_type_script_setup_true_lang-CP2WeU36.js → TextField.vue_vue_type_script_setup_true_lang-DTAQPbW0.js} +2 -2
- package/dist/{TextareaField.vue_vue_type_script_setup_true_lang-BJ4__cvJ.js → TextareaField.vue_vue_type_script_setup_true_lang-DsjK2C9T.js} +1 -1
- package/dist/{TimeField.vue_vue_type_script_setup_true_lang-DBxKAWRo.js → TimeField.vue_vue_type_script_setup_true_lang-Cz7KhUqt.js} +1 -1
- package/dist/{UserRecord-BWMnXz4q.js → UserRecord-BaQl2zzQ.js} +13 -13
- package/dist/{UsersList-Chq8yM5C.js → UsersList-BfXWgH5K.js} +9 -9
- package/dist/access/RoleCompareDialog.vue.d.ts +1 -1
- package/dist/access/RoleEditor.vue.d.ts +2 -0
- package/dist/access/constraints.d.ts +28 -0
- package/dist/access/context.d.ts +5 -0
- package/dist/access/feature.d.ts +17 -0
- package/dist/access/index.d.ts +3 -1
- package/dist/access/index.js +11 -9
- package/dist/access/refusals.d.ts +20 -2
- package/dist/app/index.js +6 -6
- package/dist/client/index.js +19 -11
- package/dist/{client-k9euDWF4.js → client-BHPFfBj3.js} +20 -20
- package/dist/collection/index.js +3 -3
- package/dist/content/index.js +66 -37
- package/dist/{contributions-BVBZP5Jb.js → contributions-DVQPcjJz.js} +1 -1
- package/dist/{describeError-B-NMa--w.js → describeError-BqGAUZgX.js} +1 -1
- package/dist/{error-CD7x0Jrz.js → error-Bb_dr_Ay.js} +2 -2
- package/dist/{fieldMessages-6HVzSDqG.js → fieldMessages-DTXpWnBd.js} +7 -7
- package/dist/form/index.js +1235 -1412
- package/dist/{guards-BJZjc3FZ.js → guards-DRh4zmxO.js} +1 -1
- package/dist/{http-BFfkA7gN.js → http-D_pBg22D.js} +1 -1
- package/dist/i18n/index.d.ts +2 -2
- package/dist/i18n/index.js +30 -30
- package/dist/identity/index.d.ts +2 -0
- package/dist/identity/index.js +8 -6
- package/dist/identity/profile/DetailsFields.vue.d.ts +8 -0
- package/dist/identity/profile/{DetailsPanel.vue.d.ts → DetailsGroup.vue.d.ts} +4 -1
- package/dist/identity/profile/{EmailPanel.vue.d.ts → EmailGroup.vue.d.ts} +1 -1
- package/dist/identity/profile/SignInsGroup.vue.d.ts +2 -0
- package/dist/identity/profile/profileSections.d.ts +37 -0
- package/dist/identity/shared/SignInList.vue.d.ts +22 -0
- package/dist/identity/shared/deviceLabel.d.ts +7 -0
- package/dist/identity/useReturnToOwnAccount.d.ts +10 -0
- package/dist/identity/users/context.d.ts +3 -0
- package/dist/identity/users/feature.d.ts +3 -0
- package/dist/index-WkbzC_ee.js +745 -0
- package/dist/index-g-qbUeTk.js +630 -0
- package/dist/index-kqk7Mclb.js +480 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/modules/notification/entities.d.ts +19 -0
- package/dist/modules/notification/routes.d.ts +25 -1
- package/dist/modules/notification/schemas.d.ts +24 -0
- package/dist/{navigation-DpcDF0rX.js → navigation-DuQwti76.js} +1 -1
- package/dist/{neighbors-RVQ4O3Qv.js → neighbors-IMRQ4rkm.js} +22 -22
- package/dist/notifications/context.d.ts +24 -1
- package/dist/notifications/feature.d.ts +10 -1
- package/dist/notifications/index.d.ts +1 -1
- package/dist/notifications/index.js +1 -1
- package/dist/notifications/push/DevicesSection.vue.d.ts +12 -0
- package/dist/notifications/push/ThisDeviceSection.vue.d.ts +15 -0
- package/dist/notifications/push/browser.d.ts +40 -0
- package/dist/notifications/push/devices.d.ts +15 -0
- package/dist/notifications/push/thisDevice.d.ts +28 -0
- package/dist/notifications/settings/ChannelsSection.vue.d.ts +16 -0
- package/dist/notifications/settings/{QuietHoursPanel.vue.d.ts → QuietHoursSection.vue.d.ts} +3 -1
- package/dist/notifications/settings/SettingsBody.vue.d.ts +17 -0
- package/dist/notifications/settings/settings.d.ts +4 -3
- package/dist/notifications/settings/state.d.ts +4 -2
- package/dist/options-g8RwEhBk.js +366 -0
- package/dist/overlay/index.js +37 -59
- package/dist/page/index.js +1 -1
- package/dist/phone/index.js +10 -11
- package/dist/platform/index.js +3 -3
- package/dist/{platform-PZpUkkMS.js → platform-Dl1fbScN.js} +2 -2
- package/dist/push-worker/index.d.ts +91 -0
- package/dist/push-worker/index.js +54 -0
- package/dist/resource/index.js +1 -1
- package/dist/{routeResource-DlTsGTg_.js → routeResource-CcYA75T2.js} +2 -2
- package/dist/router/index.js +3 -3
- package/dist/{sections-CeZl-Jxg.js → sections-D5rgQ4YB.js} +1 -1
- package/dist/shell/index.js +3 -3
- package/dist/signInEvents-DWShrJox.js +30 -0
- package/dist/state/index.js +1 -1
- package/dist/{status-dGvfh1TP.js → status-C2gHqkj6.js} +2 -2
- package/dist/styles.css +1 -1
- package/dist/{suggestions-DHJFKB26.js → suggestions-CfFTHi8y.js} +2 -2
- package/dist/testing/index.js +1 -1
- package/dist/{useCommand-Cj-APj-P.js → useCommand-CtqheKUv.js} +2 -2
- package/dist/useGroupSheet-ATvc0IiM.js +278 -0
- package/dist/{useLoad-M7V-AVwR.js → useLoad-W4tfxmm5.js} +1 -1
- package/dist/{useResourceForm-tGYTfKhH.js → useResourceForm-CJfl8rj_.js} +1 -1
- package/package.json +6 -2
- package/dist/KeyValue.vue_vue_type_script_setup_true_lang-wcZcvnow.js +0 -35
- package/dist/OtpInput.vue_vue_type_script_setup_true_lang-gp4FfWAH.js +0 -95
- package/dist/PanelActions.vue_vue_type_script_setup_true_lang-E9VdIGkf.js +0 -46
- package/dist/ProfilePage-C8VhiKIh.js +0 -654
- package/dist/RoleEditor.vue_vue_type_script_setup_true_lang-DRHmjA9w.js +0 -300
- package/dist/RolePage-ODFu68Ce.js +0 -315
- package/dist/SessionList.vue_vue_type_script_setup_true_lang-D5qm77Zo.js +0 -111
- package/dist/SettingsPage-C3fPSmi7.js +0 -255
- package/dist/SignInTable.vue_vue_type_script_setup_true_lang-Bs0yTi2E.js +0 -79
- package/dist/SignIns-cztICmqt.js +0 -66
- package/dist/control-B4SdblL6.js +0 -350
- package/dist/identity/profile/PanelActions.vue.d.ts +0 -17
- package/dist/index-BhtJR4c_.js +0 -459
- package/dist/index-C3E6DcO0.js +0 -706
- package/dist/index-sTBBHqNG.js +0 -504
- package/dist/notifications/settings/EmailPanel.vue.d.ts +0 -14
- package/dist/options-Ba_0uLWN.js +0 -18
- package/dist/route-goWMxDUN.js +0 -13
- package/dist/transport-BnP7WC0Y.js +0 -4
- /package/dist/identity/{profile/PasswordPanel.vue.d.ts → ReturnMenuItem.vue.d.ts} +0 -0
- /package/dist/identity/profile/{SessionsPanel.vue.d.ts → PasswordGroup.vue.d.ts} +0 -0
- /package/dist/identity/profile/{SignInsPanel.vue.d.ts → SessionsGroup.vue.d.ts} +0 -0
|
@@ -0,0 +1,278 @@
|
|
|
1
|
+
import { defineComponent as L, useModel as X, useId as Y, useTemplateRef as O, ref as h, computed as w, watch as N, nextTick as z, onMounted as H, openBlock as b, createElementBlock as _, normalizeClass as T, createElementVNode as $, unref as x, Fragment as I, renderList as Z, createTextVNode as ee, toDisplayString as j, createCommentVNode as C, mergeModels as A, onBeforeUnmount as te, createBlock as F, withCtx as E, createVNode as ae, renderSlot as J, provide as K, toRef as se, shallowRef as le, toValue as P } from "vue";
|
|
2
|
+
import { useI18n as Q } from "vue-i18n";
|
|
3
|
+
import { _ as oe } from "./Modal.vue_vue_type_script_setup_true_lang-DpBb8ans.js";
|
|
4
|
+
import { _ as q } from "./Banner.vue_vue_type_script_setup_true_lang-DSStj_5z.js";
|
|
5
|
+
import { D as ne } from "./useWaitStatus-fsacMl4W.js";
|
|
6
|
+
import { _ as re, s as U, c as B, f as ie } from "./FormErrors.vue_vue_type_script_setup_true_lang-D7edzNTL.js";
|
|
7
|
+
import { e as ue } from "./options-g8RwEhBk.js";
|
|
8
|
+
import { r as ce } from "./FormGroup.vue_vue_type_script_setup_true_lang-BPchlRCl.js";
|
|
9
|
+
import { t as de } from "./toast-CqSDTWRX.js";
|
|
10
|
+
import { a as fe } from "./leaveGuard-Cc8yeLxM.js";
|
|
11
|
+
const ve = ["id", "value", "name", "disabled", "aria-label", "aria-invalid", "aria-describedby"], me = {
|
|
12
|
+
key: 1,
|
|
13
|
+
class: "h-5 w-px animate-caret-blink bg-content-strong"
|
|
14
|
+
}, Ge = /* @__PURE__ */ L({
|
|
15
|
+
__name: "OtpInput",
|
|
16
|
+
props: /* @__PURE__ */ A({
|
|
17
|
+
length: { default: 6 },
|
|
18
|
+
disabled: { type: Boolean, default: !1 },
|
|
19
|
+
invalid: { type: Boolean, default: !1 },
|
|
20
|
+
autofocus: { type: Boolean, default: !1 },
|
|
21
|
+
name: { default: void 0 },
|
|
22
|
+
label: { default: void 0 },
|
|
23
|
+
describedBy: { default: void 0 }
|
|
24
|
+
}, {
|
|
25
|
+
modelValue: { default: "" },
|
|
26
|
+
modelModifiers: {}
|
|
27
|
+
}),
|
|
28
|
+
emits: /* @__PURE__ */ A(["complete"], ["update:modelValue"]),
|
|
29
|
+
setup(l, { expose: a, emit: t }) {
|
|
30
|
+
const o = l, i = X(l, "modelValue"), d = t, { t: m } = Q(), f = Y(), r = O("input"), v = h(!1), g = h(0), c = h(!1), y = (s) => s.replace(/\D/g, "").slice(0, o.length), u = w(() => y(i.value)), k = w(() => Math.min(g.value, o.length - 1)), D = w(() => o.label ?? m("core.form.otp.label", { length: o.length }));
|
|
31
|
+
function p() {
|
|
32
|
+
g.value = r.value?.selectionStart ?? u.value.length;
|
|
33
|
+
}
|
|
34
|
+
function S(s) {
|
|
35
|
+
const e = y(s);
|
|
36
|
+
r.value && r.value.value !== e && (r.value.value = e);
|
|
37
|
+
const n = e !== u.value;
|
|
38
|
+
i.value = e, z(p), n && e.length === o.length && d("complete", e);
|
|
39
|
+
}
|
|
40
|
+
function G(s) {
|
|
41
|
+
const e = s.clipboardData?.getData("text") ?? "";
|
|
42
|
+
e && (s.preventDefault(), S(e), z(() => {
|
|
43
|
+
const n = u.value.length;
|
|
44
|
+
r.value?.setSelectionRange(n, n), p();
|
|
45
|
+
}));
|
|
46
|
+
}
|
|
47
|
+
return N(
|
|
48
|
+
() => o.invalid,
|
|
49
|
+
(s) => {
|
|
50
|
+
s && (c.value = !1, requestAnimationFrame(() => c.value = !0));
|
|
51
|
+
}
|
|
52
|
+
), N(u, (s) => {
|
|
53
|
+
r.value && r.value.value !== s && (r.value.value = s, z(p));
|
|
54
|
+
}), H(() => {
|
|
55
|
+
o.autofocus && r.value?.focus();
|
|
56
|
+
}), a({ focus: () => r.value?.focus() }), (s, e) => (b(), _("div", {
|
|
57
|
+
class: T(["relative inline-flex gap-2 sm:gap-3", { "motion-safe:animate-shake": c.value }]),
|
|
58
|
+
"data-test": "otp-input",
|
|
59
|
+
onAnimationend: e[3] || (e[3] = (n) => c.value = !1)
|
|
60
|
+
}, [
|
|
61
|
+
$("input", {
|
|
62
|
+
id: x(f),
|
|
63
|
+
ref_key: "input",
|
|
64
|
+
ref: r,
|
|
65
|
+
value: u.value,
|
|
66
|
+
name: o.name,
|
|
67
|
+
type: "text",
|
|
68
|
+
inputmode: "numeric",
|
|
69
|
+
autocomplete: "one-time-code",
|
|
70
|
+
pattern: "\\d*",
|
|
71
|
+
spellcheck: "false",
|
|
72
|
+
disabled: o.disabled,
|
|
73
|
+
"aria-label": D.value,
|
|
74
|
+
"aria-invalid": o.invalid || void 0,
|
|
75
|
+
"aria-describedby": o.describedBy,
|
|
76
|
+
"data-test": "otp-input-field",
|
|
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",
|
|
78
|
+
onInput: e[0] || (e[0] = (n) => S(n.target.value)),
|
|
79
|
+
onPaste: G,
|
|
80
|
+
onFocus: e[1] || (e[1] = (n) => {
|
|
81
|
+
v.value = !0, p();
|
|
82
|
+
}),
|
|
83
|
+
onBlur: e[2] || (e[2] = (n) => v.value = !1),
|
|
84
|
+
onKeyup: p,
|
|
85
|
+
onClick: p,
|
|
86
|
+
onSelect: p
|
|
87
|
+
}, null, 40, ve),
|
|
88
|
+
(b(!0), _(I, null, Z(o.length, (n) => (b(), _("div", {
|
|
89
|
+
key: n,
|
|
90
|
+
"aria-hidden": "true",
|
|
91
|
+
"data-test": "otp-input-cell",
|
|
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" : v.value && k.value === n - 1 ? "bg-surface-cell ring-[1.5px] ring-inset ring-border-focus outline-3 outline-border-focus/20" : "", o.disabled ? "opacity-45" : ""]])
|
|
93
|
+
}, [
|
|
94
|
+
u.value[n - 1] ? (b(), _(I, { key: 0 }, [
|
|
95
|
+
ee(j(u.value[n - 1]), 1)
|
|
96
|
+
], 64)) : v.value && k.value === n - 1 ? (b(), _("span", me)) : C("", !0)
|
|
97
|
+
], 2))), 128))
|
|
98
|
+
], 34));
|
|
99
|
+
}
|
|
100
|
+
}), pe = { class: "text-footnote" }, be = { class: "text-footnote" }, Ve = /* @__PURE__ */ L({
|
|
101
|
+
__name: "GroupSheet",
|
|
102
|
+
props: {
|
|
103
|
+
sheet: {},
|
|
104
|
+
title: {},
|
|
105
|
+
subtitle: { default: void 0 },
|
|
106
|
+
editable: { type: Boolean },
|
|
107
|
+
size: { default: "md" },
|
|
108
|
+
groupLabel: {},
|
|
109
|
+
fieldLabel: { type: Function, default: void 0 }
|
|
110
|
+
},
|
|
111
|
+
emits: ["saved"],
|
|
112
|
+
setup(l, { emit: a }) {
|
|
113
|
+
const t = l, o = a, { t: i } = Q(), d = O("modal"), m = O("body"), f = h(!1);
|
|
114
|
+
let r = null;
|
|
115
|
+
N(() => t.sheet.open.value, (c) => {
|
|
116
|
+
c ? (f.value = !1, d.value?.present()) : d.value?.dismiss();
|
|
117
|
+
}), H(() => {
|
|
118
|
+
t.sheet.open.value && d.value?.present();
|
|
119
|
+
}), te(() => {
|
|
120
|
+
r && clearTimeout(r);
|
|
121
|
+
});
|
|
122
|
+
async function v() {
|
|
123
|
+
await t.sheet.save() && (f.value = !0, o("saved"), r = setTimeout(() => t.sheet.dismiss(), ne));
|
|
124
|
+
}
|
|
125
|
+
const g = w(() => t.sheet.saving.value ? "processing" : f.value ? "done" : "idle");
|
|
126
|
+
return (c, y) => (b(), F(oe, {
|
|
127
|
+
ref_key: "modal",
|
|
128
|
+
ref: d,
|
|
129
|
+
size: t.size,
|
|
130
|
+
grouped: "",
|
|
131
|
+
title: t.title,
|
|
132
|
+
subtitle: t.subtitle,
|
|
133
|
+
"before-dismiss": t.sheet.beforeDismiss,
|
|
134
|
+
"primary-label": t.editable ? x(i)("core.actions.save") : void 0,
|
|
135
|
+
status: g.value,
|
|
136
|
+
"processing-label": x(i)("core.actions.saving"),
|
|
137
|
+
"done-label": x(i)("core.actions.saved"),
|
|
138
|
+
onPrimary: v,
|
|
139
|
+
onDismissed: y[0] || (y[0] = (u) => t.sheet.closed())
|
|
140
|
+
}, {
|
|
141
|
+
default: E(() => [
|
|
142
|
+
$("div", {
|
|
143
|
+
ref_key: "body",
|
|
144
|
+
ref: m,
|
|
145
|
+
class: "flex min-w-0 flex-col gap-group-gap"
|
|
146
|
+
}, [
|
|
147
|
+
t.sheet.notice.value ? (b(), F(q, {
|
|
148
|
+
key: 0,
|
|
149
|
+
tone: "warning",
|
|
150
|
+
"data-test": "group-sheet-notice"
|
|
151
|
+
}, {
|
|
152
|
+
default: E(() => [
|
|
153
|
+
$("p", pe, j(t.sheet.notice.value), 1)
|
|
154
|
+
]),
|
|
155
|
+
_: 1
|
|
156
|
+
})) : C("", !0),
|
|
157
|
+
t.sheet.foreignGroups.value.length ? (b(), F(q, {
|
|
158
|
+
key: 1,
|
|
159
|
+
tone: "warning",
|
|
160
|
+
"data-test": "group-sheet-foreign"
|
|
161
|
+
}, {
|
|
162
|
+
default: E(() => [
|
|
163
|
+
$("p", be, j(x(i)("core.form.group.foreign", { groups: t.sheet.foreignGroups.value.map(t.groupLabel).join(", ") })), 1)
|
|
164
|
+
]),
|
|
165
|
+
_: 1
|
|
166
|
+
})) : C("", !0),
|
|
167
|
+
ae(re, {
|
|
168
|
+
form: t.sheet.form,
|
|
169
|
+
label: t.fieldLabel,
|
|
170
|
+
scope: m.value
|
|
171
|
+
}, null, 8, ["form", "label", "scope"]),
|
|
172
|
+
J(c.$slots, "default")
|
|
173
|
+
], 512)
|
|
174
|
+
]),
|
|
175
|
+
_: 3
|
|
176
|
+
}, 8, ["size", "title", "subtitle", "before-dismiss", "primary-label", "status", "processing-label", "done-label"]));
|
|
177
|
+
}
|
|
178
|
+
}), ge = ["data-group"], ze = /* @__PURE__ */ L({
|
|
179
|
+
__name: "RecordGroupScope",
|
|
180
|
+
props: {
|
|
181
|
+
only: {},
|
|
182
|
+
editable: { type: Boolean }
|
|
183
|
+
},
|
|
184
|
+
setup(l) {
|
|
185
|
+
const a = l;
|
|
186
|
+
return K(ce, { only: se(a, "only") }), K(ue, w(() => a.editable)), (t, o) => (b(), _("div", {
|
|
187
|
+
class: "flex min-w-0 flex-col gap-group-gap",
|
|
188
|
+
"data-test": "record-group-scope",
|
|
189
|
+
"data-group": a.only
|
|
190
|
+
}, [
|
|
191
|
+
J(t.$slots, "default")
|
|
192
|
+
], 8, ge));
|
|
193
|
+
}
|
|
194
|
+
});
|
|
195
|
+
function Fe(l) {
|
|
196
|
+
const { form: a } = l;
|
|
197
|
+
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.");
|
|
198
|
+
const t = () => typeof l.fields == "function" ? l.fields() : l.fields, o = () => P(l.restore) ?? t(), i = h(!1), d = h(!1), m = h([]), f = h(null), r = le({});
|
|
199
|
+
let v = {};
|
|
200
|
+
const g = (s) => Object.fromEntries(s.map((e) => [e, B(a.values[e])])), c = w(() => i.value && !U(g(o()), r.value)), { confirmDiscard: y } = fe(() => c.value);
|
|
201
|
+
function u() {
|
|
202
|
+
v = g(o()), r.value = B(v);
|
|
203
|
+
}
|
|
204
|
+
function k() {
|
|
205
|
+
u(), m.value = [], f.value = null, a.dismissFailure(), i.value = !0;
|
|
206
|
+
}
|
|
207
|
+
function D() {
|
|
208
|
+
if (i.value) {
|
|
209
|
+
c.value && Object.assign(a.values, B(v));
|
|
210
|
+
for (const s of t()) a.errors.clear(s);
|
|
211
|
+
a.dismissFailure(), i.value = !1;
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
function p(s) {
|
|
215
|
+
const e = new Set(t()), n = P(l.group), M = /* @__PURE__ */ new Set();
|
|
216
|
+
for (const W of Object.keys(s.all())) {
|
|
217
|
+
const R = ie(W);
|
|
218
|
+
if (e.has(R)) continue;
|
|
219
|
+
const V = l.groupOf?.(R) ?? l.fallbackGroup;
|
|
220
|
+
V && V !== n && M.add(V);
|
|
221
|
+
}
|
|
222
|
+
m.value = [...M];
|
|
223
|
+
}
|
|
224
|
+
async function S(s) {
|
|
225
|
+
const e = B(g(t().filter((n) => !U(a.values[n], r.value[n]))));
|
|
226
|
+
try {
|
|
227
|
+
await s.reload();
|
|
228
|
+
} catch {
|
|
229
|
+
return;
|
|
230
|
+
}
|
|
231
|
+
a.rebase?.() && (u(), Object.assign(a.values, e), f.value = s.message());
|
|
232
|
+
}
|
|
233
|
+
async function G() {
|
|
234
|
+
if (d.value) return !1;
|
|
235
|
+
d.value = !0, m.value = [], f.value = null;
|
|
236
|
+
try {
|
|
237
|
+
const s = l.onSaved ? () => l.onSaved?.() : void 0;
|
|
238
|
+
let e;
|
|
239
|
+
if (l.save) e = await a.submitFields(t(), l.save, { refresh: s });
|
|
240
|
+
else if (a.save) e = await a.save({ refresh: s });
|
|
241
|
+
else throw new Error("useGroupSheet: the form has no full-record save(), so give the sheet its own `save` for a dedicated endpoint.");
|
|
242
|
+
switch (e.status) {
|
|
243
|
+
case "saved":
|
|
244
|
+
return u(), !0;
|
|
245
|
+
case "saved-refresh-failed":
|
|
246
|
+
return u(), de.warning(a.failure.value?.message ?? ""), !0;
|
|
247
|
+
case "aborted":
|
|
248
|
+
return !1;
|
|
249
|
+
case "failed":
|
|
250
|
+
return e.failure.kind === "conflict" && l.rebase ? await S(l.rebase) : p(a.errors), !1;
|
|
251
|
+
}
|
|
252
|
+
} finally {
|
|
253
|
+
d.value = !1;
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
return {
|
|
257
|
+
open: i,
|
|
258
|
+
saving: d,
|
|
259
|
+
dirty: c,
|
|
260
|
+
foreignGroups: m,
|
|
261
|
+
notice: f,
|
|
262
|
+
failure: a.failure,
|
|
263
|
+
form: a,
|
|
264
|
+
present: k,
|
|
265
|
+
dismiss: () => {
|
|
266
|
+
i.value = !1;
|
|
267
|
+
},
|
|
268
|
+
save: G,
|
|
269
|
+
beforeDismiss: y,
|
|
270
|
+
closed: D
|
|
271
|
+
};
|
|
272
|
+
}
|
|
273
|
+
export {
|
|
274
|
+
Ve as _,
|
|
275
|
+
ze as a,
|
|
276
|
+
Ge as b,
|
|
277
|
+
Fe as u
|
|
278
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { shallowRef as S, watch as k, getCurrentScope as C, onScopeDispose as D, computed as v } from "vue";
|
|
2
2
|
import { useI18n as E } from "vue-i18n";
|
|
3
|
-
import { u as x } from "./describeError-
|
|
3
|
+
import { u as x } from "./describeError-BqGAUZgX.js";
|
|
4
4
|
const f = Symbol("vue-core.load.abandoned");
|
|
5
5
|
function M(m, t = {}) {
|
|
6
6
|
const { t: g } = E(), b = x(), p = t.errorMessage ?? ((a) => b(a, { fallback: g("core.resource.unavailable") })), e = S({ status: "loading" });
|
|
@@ -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-D7edzNTL.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,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wssto2/vue-core",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"goCore": "v1.
|
|
3
|
+
"version": "0.5.0",
|
|
4
|
+
"goCore": "v1.8.0",
|
|
5
5
|
"description": "Shared Vue 3 library for go-core applications: app shell, list / record / form pages and their controls.",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"vue",
|
|
@@ -121,6 +121,10 @@
|
|
|
121
121
|
"types": "./dist/notifications/index.d.ts",
|
|
122
122
|
"import": "./dist/notifications/index.js"
|
|
123
123
|
},
|
|
124
|
+
"./push-worker": {
|
|
125
|
+
"types": "./dist/push-worker/index.d.ts",
|
|
126
|
+
"import": "./dist/push-worker/index.js"
|
|
127
|
+
},
|
|
124
128
|
"./testing": {
|
|
125
129
|
"types": "./dist/testing/index.d.ts",
|
|
126
130
|
"import": "./dist/testing/index.js"
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { defineComponent as p, useSlots as f, computed as v, openBlock as a, createElementBlock as l, createElementVNode as t, createTextVNode as r, toDisplayString as o, renderSlot as d, normalizeClass as _, Fragment as x, unref as y } from "vue";
|
|
2
|
-
import { useI18n as b } from "vue-i18n";
|
|
3
|
-
const g = { class: "min-w-0" }, k = { class: "flex items-center gap-1 text-xs text-content-muted" }, w = { class: "sr-only" }, E = /* @__PURE__ */ p({
|
|
4
|
-
__name: "KeyValue",
|
|
5
|
-
props: {
|
|
6
|
-
label: {},
|
|
7
|
-
value: { default: void 0 },
|
|
8
|
-
wrap: { type: Boolean, default: !0 }
|
|
9
|
-
},
|
|
10
|
-
setup(u) {
|
|
11
|
-
const e = u, { t: c } = b(), i = f(), m = v(() => !i.default && (e.value === null || e.value === void 0 || e.value === ""));
|
|
12
|
-
return (s, n) => (a(), l("div", g, [
|
|
13
|
-
t("dt", k, [
|
|
14
|
-
r(o(e.label) + " ", 1),
|
|
15
|
-
d(s.$slots, "label")
|
|
16
|
-
]),
|
|
17
|
-
t("dd", {
|
|
18
|
-
class: _(["mt-0.5 text-sm font-medium text-content-strong", e.wrap ? "break-words" : "truncate"])
|
|
19
|
-
}, [
|
|
20
|
-
m.value ? (a(), l(x, { key: 0 }, [
|
|
21
|
-
n[0] || (n[0] = t("span", {
|
|
22
|
-
"aria-hidden": "true",
|
|
23
|
-
class: "font-normal text-content-disabled"
|
|
24
|
-
}, "—", -1)),
|
|
25
|
-
t("span", w, o(y(c)("core.state.no_value")), 1)
|
|
26
|
-
], 64)) : d(s.$slots, "default", {}, () => [
|
|
27
|
-
r(o(e.value), 1)
|
|
28
|
-
], void 0, 1)
|
|
29
|
-
], 2)
|
|
30
|
-
]));
|
|
31
|
-
}
|
|
32
|
-
});
|
|
33
|
-
export {
|
|
34
|
-
E as _
|
|
35
|
-
};
|
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
import { defineComponent as S, useModel as F, useId as T, useTemplateRef as $, ref as c, computed as v, watch as h, nextTick as f, onMounted as A, openBlock as s, createElementBlock as u, normalizeClass as k, createElementVNode as E, unref as R, Fragment as B, renderList as _, createTextVNode as j, toDisplayString as q, createCommentVNode as K, mergeModels as V } from "vue";
|
|
2
|
-
import { useI18n as L } from "vue-i18n";
|
|
3
|
-
const O = ["id", "value", "name", "disabled", "aria-label", "aria-invalid", "aria-describedby"], P = {
|
|
4
|
-
key: 1,
|
|
5
|
-
class: "h-5 w-px animate-caret-blink bg-content-strong"
|
|
6
|
-
}, J = /* @__PURE__ */ S({
|
|
7
|
-
__name: "OtpInput",
|
|
8
|
-
props: /* @__PURE__ */ V({
|
|
9
|
-
length: { default: 6 },
|
|
10
|
-
disabled: { type: Boolean, default: !1 },
|
|
11
|
-
invalid: { type: Boolean, default: !1 },
|
|
12
|
-
autofocus: { type: Boolean, default: !1 },
|
|
13
|
-
name: { default: void 0 },
|
|
14
|
-
label: { default: void 0 },
|
|
15
|
-
describedBy: { default: void 0 }
|
|
16
|
-
}, {
|
|
17
|
-
modelValue: { default: "" },
|
|
18
|
-
modelModifiers: {}
|
|
19
|
-
}),
|
|
20
|
-
emits: /* @__PURE__ */ V(["complete"], ["update:modelValue"]),
|
|
21
|
-
setup(p, { expose: w, emit: z }) {
|
|
22
|
-
const a = p, m = F(p, "modelValue"), C = z, { t: D } = L(), I = T(), n = $("input"), r = c(!1), g = c(0), d = c(!1), b = (l) => l.replace(/\D/g, "").slice(0, a.length), o = v(() => b(m.value)), x = v(() => Math.min(g.value, a.length - 1)), M = v(() => a.label ?? D("core.form.otp.label", { length: a.length }));
|
|
23
|
-
function i() {
|
|
24
|
-
g.value = n.value?.selectionStart ?? o.value.length;
|
|
25
|
-
}
|
|
26
|
-
function y(l) {
|
|
27
|
-
const e = b(l);
|
|
28
|
-
n.value && n.value.value !== e && (n.value.value = e);
|
|
29
|
-
const t = e !== o.value;
|
|
30
|
-
m.value = e, f(i), t && e.length === a.length && C("complete", e);
|
|
31
|
-
}
|
|
32
|
-
function N(l) {
|
|
33
|
-
const e = l.clipboardData?.getData("text") ?? "";
|
|
34
|
-
e && (l.preventDefault(), y(e), f(() => {
|
|
35
|
-
const t = o.value.length;
|
|
36
|
-
n.value?.setSelectionRange(t, t), i();
|
|
37
|
-
}));
|
|
38
|
-
}
|
|
39
|
-
return h(
|
|
40
|
-
() => a.invalid,
|
|
41
|
-
(l) => {
|
|
42
|
-
l && (d.value = !1, requestAnimationFrame(() => d.value = !0));
|
|
43
|
-
}
|
|
44
|
-
), h(o, (l) => {
|
|
45
|
-
n.value && n.value.value !== l && (n.value.value = l, f(i));
|
|
46
|
-
}), A(() => {
|
|
47
|
-
a.autofocus && n.value?.focus();
|
|
48
|
-
}), w({ focus: () => n.value?.focus() }), (l, e) => (s(), u("div", {
|
|
49
|
-
class: k(["relative inline-flex gap-2 sm:gap-3", { "motion-safe:animate-shake": d.value }]),
|
|
50
|
-
"data-test": "otp-input",
|
|
51
|
-
onAnimationend: e[3] || (e[3] = (t) => d.value = !1)
|
|
52
|
-
}, [
|
|
53
|
-
E("input", {
|
|
54
|
-
id: R(I),
|
|
55
|
-
ref_key: "input",
|
|
56
|
-
ref: n,
|
|
57
|
-
value: o.value,
|
|
58
|
-
name: a.name,
|
|
59
|
-
type: "text",
|
|
60
|
-
inputmode: "numeric",
|
|
61
|
-
autocomplete: "one-time-code",
|
|
62
|
-
pattern: "\\d*",
|
|
63
|
-
spellcheck: "false",
|
|
64
|
-
disabled: a.disabled,
|
|
65
|
-
"aria-label": M.value,
|
|
66
|
-
"aria-invalid": a.invalid || void 0,
|
|
67
|
-
"aria-describedby": a.describedBy,
|
|
68
|
-
"data-test": "otp-input-field",
|
|
69
|
-
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",
|
|
70
|
-
onInput: e[0] || (e[0] = (t) => y(t.target.value)),
|
|
71
|
-
onPaste: N,
|
|
72
|
-
onFocus: e[1] || (e[1] = (t) => {
|
|
73
|
-
r.value = !0, i();
|
|
74
|
-
}),
|
|
75
|
-
onBlur: e[2] || (e[2] = (t) => r.value = !1),
|
|
76
|
-
onKeyup: i,
|
|
77
|
-
onClick: i,
|
|
78
|
-
onSelect: i
|
|
79
|
-
}, null, 40, O),
|
|
80
|
-
(s(!0), u(B, null, _(a.length, (t) => (s(), u("div", {
|
|
81
|
-
key: t,
|
|
82
|
-
"aria-hidden": "true",
|
|
83
|
-
"data-test": "otp-input-cell",
|
|
84
|
-
class: k(["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", [a.invalid ? "bg-status-danger-surface ring-[1.5px] ring-inset ring-border-destructive" : r.value && x.value === t - 1 ? "bg-surface-cell ring-[1.5px] ring-inset ring-border-focus outline-3 outline-border-focus/20" : "", a.disabled ? "opacity-45" : ""]])
|
|
85
|
-
}, [
|
|
86
|
-
o.value[t - 1] ? (s(), u(B, { key: 0 }, [
|
|
87
|
-
j(q(o.value[t - 1]), 1)
|
|
88
|
-
], 64)) : r.value && x.value === t - 1 ? (s(), u("span", P)) : K("", !0)
|
|
89
|
-
], 2))), 128))
|
|
90
|
-
], 34));
|
|
91
|
-
}
|
|
92
|
-
});
|
|
93
|
-
export {
|
|
94
|
-
J as _
|
|
95
|
-
};
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { defineComponent as _, openBlock as n, createElementBlock as i, toDisplayString as s, unref as o, createCommentVNode as c, createBlock as y, withCtx as m, createTextVNode as l, createVNode as g } from "vue";
|
|
2
|
-
import { useI18n as x } from "vue-i18n";
|
|
3
|
-
import { _ as p } from "./Button.vue_vue_type_script_setup_true_lang-CL9Qh5yq.js";
|
|
4
|
-
import { a as k } from "./leaveGuard-Cc8yeLxM.js";
|
|
5
|
-
const b = { class: "flex flex-wrap items-center justify-end gap-3" }, v = {
|
|
6
|
-
key: 0,
|
|
7
|
-
class: "mr-auto text-footnote text-content-muted",
|
|
8
|
-
"data-unsaved": ""
|
|
9
|
-
}, w = /* @__PURE__ */ _({
|
|
10
|
-
__name: "PanelActions",
|
|
11
|
-
props: {
|
|
12
|
-
label: {},
|
|
13
|
-
processing: { type: Boolean },
|
|
14
|
-
dirty: { type: Boolean }
|
|
15
|
-
},
|
|
16
|
-
emits: ["submit", "cancel"],
|
|
17
|
-
setup(d, { emit: u }) {
|
|
18
|
-
const e = d, r = u, { t: a } = x();
|
|
19
|
-
return k(() => e.dirty), (B, t) => (n(), i("div", b, [
|
|
20
|
-
e.dirty ? (n(), i("span", v, s(o(a)("core.form.unsaved_changes")), 1)) : c("", !0),
|
|
21
|
-
e.dirty ? (n(), y(o(p), {
|
|
22
|
-
key: 1,
|
|
23
|
-
disabled: e.processing,
|
|
24
|
-
onClick: t[0] || (t[0] = (f) => r("cancel"))
|
|
25
|
-
}, {
|
|
26
|
-
default: m(() => [
|
|
27
|
-
l(s(o(a)("core.actions.cancel")), 1)
|
|
28
|
-
]),
|
|
29
|
-
_: 1
|
|
30
|
-
}, 8, ["disabled"])) : c("", !0),
|
|
31
|
-
g(o(p), {
|
|
32
|
-
prominence: "primary",
|
|
33
|
-
processing: e.processing,
|
|
34
|
-
onClick: t[1] || (t[1] = (f) => r("submit"))
|
|
35
|
-
}, {
|
|
36
|
-
default: m(() => [
|
|
37
|
-
l(s(e.label), 1)
|
|
38
|
-
]),
|
|
39
|
-
_: 1
|
|
40
|
-
}, 8, ["processing"])
|
|
41
|
-
]));
|
|
42
|
-
}
|
|
43
|
-
});
|
|
44
|
-
export {
|
|
45
|
-
w as _
|
|
46
|
-
};
|