@wssto2/vue-core 0.4.28 → 0.5.1
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 +77 -0
- package/dist/{AccessGate.vue_vue_type_script_setup_true_lang-J5HoyGNJ.js → AccessGate.vue_vue_type_script_setup_true_lang-DZ9GcLC1.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-dpY2kIs2.js} +7 -7
- package/dist/{Changes-MG77TDwz.js → Changes-CL8F1w8q.js} +6 -6
- package/dist/{CollectionPage.vue_vue_type_script_setup_true_lang-Bnpv9TEj.js → CollectionPage.vue_vue_type_script_setup_true_lang-l-e-6WeS.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-BZLyL5lR.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-mrVzi-5R.js} +10 -10
- package/dist/MenuButton.vue_vue_type_script_setup_true_lang-AGbN9r5q.js +28 -0
- package/dist/{NewRolePage-B7DwFWPk.js → NewRolePage-B2DItwvf.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-EiTIYzZ5.js +764 -0
- package/dist/RoleEditor.vue_vue_type_script_setup_true_lang-BqqilJGF.js +325 -0
- package/dist/RolePage-jMHAt9y8.js +314 -0
- package/dist/{RolesPage-B5RwSZ89.js → RolesPage-B9GaVQBx.js} +6 -6
- package/dist/{SectionNavigator.vue_vue_type_script_setup_true_lang-Dmv6TpCi.js → SectionNavigator.vue_vue_type_script_setup_true_lang-Ci04hApd.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-CHLokZ9e.js} +5 -5
- package/dist/SettingsPage-CudoKdXm.js +632 -0
- package/dist/{SignIn-COThB9XN.js → SignIn-ypRvdmjg.js} +7 -7
- package/dist/{SignInPage-CdzgSvRm.js → SignInPage-CbPeKlAo.js} +4 -4
- package/dist/SignIns-BApzbGq-.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-BCTaBajE.js} +13 -13
- package/dist/{UsersList-Chq8yM5C.js → UsersList-CqSK3cQL.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 +118 -116
- package/dist/app/keepAlive.d.ts +4 -8
- 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-fx5q5n1u.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-D4mXf_2X.js} +1 -1
- package/dist/{http-BFfkA7gN.js → http-CdQowFlW.js} +1 -1
- package/dist/i18n/index.d.ts +2 -2
- package/dist/i18n/index.js +30 -30
- package/dist/identity/index.d.ts +3 -1
- package/dist/identity/index.js +7 -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/session.d.ts +10 -7
- 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-BTRv8mcf.js +630 -0
- package/dist/index-VPzJJN6Z.js +745 -0
- package/dist/index-auJqVMWC.js +478 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/keepAlive-z3IRFkQq.js +46 -0
- 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-Bc5EQ_Si.js} +1 -1
- package/dist/{neighbors-RVQ4O3Qv.js → neighbors-Bv6vnWlW.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/platform.d.ts +7 -2
- package/dist/platform/session.d.ts +17 -0
- package/dist/platform-Dx6STiwY.js +283 -0
- 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-B0HxIOC2.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-BUFELJz2.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/keepAlive-CDvMQlcJ.js +0 -49
- package/dist/notifications/settings/EmailPanel.vue.d.ts +0 -14
- package/dist/options-Ba_0uLWN.js +0 -18
- package/dist/platform-PZpUkkMS.js +0 -268
- 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
package/dist/control-B4SdblL6.js
DELETED
|
@@ -1,350 +0,0 @@
|
|
|
1
|
-
import { inject as B, ref as z, computed as s, onBeforeUnmount as A, defineComponent as C, useSlots as F, openBlock as l, createBlock as L, resolveDynamicComponent as T, unref as t, normalizeClass as b, withCtx as w, createElementBlock as r, renderSlot as d, createCommentVNode as i, createElementVNode as x, createTextVNode as h, toDisplayString as v, createVNode as V, useAttrs as G, useId as K, mergeProps as j, createSlots as P, mergeDefaults as M } from "vue";
|
|
2
|
-
import { useI18n as O } from "vue-i18n";
|
|
3
|
-
import { _ as I } from "./Icon.vue_vue_type_script_lang-D7oC-d-S.js";
|
|
4
|
-
import { RouterLink as U } from "vue-router";
|
|
5
|
-
import { c as Y, a as J } from "./controlSurface-t7OEFESJ.js";
|
|
6
|
-
import { u as Q } from "./mediaQuery-CygcXmFW.js";
|
|
7
|
-
const W = {
|
|
8
|
-
label: void 0,
|
|
9
|
-
labelHidden: !1,
|
|
10
|
-
hint: void 0,
|
|
11
|
-
error: void 0,
|
|
12
|
-
required: !1,
|
|
13
|
-
editable: !0,
|
|
14
|
-
disabled: !1,
|
|
15
|
-
lockedReason: void 0,
|
|
16
|
-
presentation: "control",
|
|
17
|
-
name: void 0
|
|
18
|
-
}, X = Symbol("vue-core.formGroup"), Z = Symbol("vue-core.formRowIndent"), ee = Symbol("vue-core.formEditable"), R = () => B(X, null), te = () => B(Z, 0);
|
|
19
|
-
function oe(u) {
|
|
20
|
-
const e = R(), c = B(ee, z(!0)), n = Q(), k = s(() => !!e && !!u.disabled && (n.value || u.presentation === "value")), m = s(() => (u.editable ?? !0) && c.value && !k.value), a = s(() => !!e && !!u.disabled && m.value);
|
|
21
|
-
if (e) {
|
|
22
|
-
const f = e.registerLocked(s(() => !!u.disabled && c.value && u.presentation !== "value"));
|
|
23
|
-
A(f);
|
|
24
|
-
}
|
|
25
|
-
return { editable: m, locked: a };
|
|
26
|
-
}
|
|
27
|
-
const le = ["label", "labelHidden", "hint", "error", "required", "editable", "disabled", "lockedReason", "presentation", "name"];
|
|
28
|
-
function He(u) {
|
|
29
|
-
return Object.fromEntries(le.map((e) => [e, u[e]]));
|
|
30
|
-
}
|
|
31
|
-
const ae = {
|
|
32
|
-
key: 0,
|
|
33
|
-
class: "flex shrink-0 items-center"
|
|
34
|
-
}, re = { class: "row-body min-h-row min-w-0 flex-1 border-t border-border-separator py-2 pr-row-inset" }, se = {
|
|
35
|
-
key: 0,
|
|
36
|
-
class: "text-content-destructive",
|
|
37
|
-
"aria-hidden": "true"
|
|
38
|
-
}, ie = ["id"], ne = {
|
|
39
|
-
key: 0,
|
|
40
|
-
class: "break-words text-body text-content-strong"
|
|
41
|
-
}, de = ["id"], ue = /* @__PURE__ */ C({
|
|
42
|
-
__name: "FormRow",
|
|
43
|
-
props: {
|
|
44
|
-
label: { default: void 0 },
|
|
45
|
-
labelHidden: { type: Boolean, default: !1 },
|
|
46
|
-
for: { default: void 0 },
|
|
47
|
-
sub: { default: void 0 },
|
|
48
|
-
subId: { default: void 0 },
|
|
49
|
-
required: { type: Boolean, default: !1 },
|
|
50
|
-
layout: { default: "entry" },
|
|
51
|
-
value: { default: void 0 },
|
|
52
|
-
to: { default: void 0 },
|
|
53
|
-
error: { default: void 0 },
|
|
54
|
-
errorId: { default: void 0 },
|
|
55
|
-
indent: { default: 0 },
|
|
56
|
-
labelLines: { default: void 0 },
|
|
57
|
-
labelAlign: { default: "center" }
|
|
58
|
-
},
|
|
59
|
-
setup(u) {
|
|
60
|
-
const e = u, c = F(), n = te(), k = s(() => n + e.indent), m = ["pl-row-inset", "pl-[calc(var(--app-row-inset)+1.25rem)]", "pl-[calc(var(--app-row-inset)+2.5rem)]"], a = { 1: "line-clamp-1", 2: "line-clamp-2", 3: "line-clamp-3" }, f = s(() => e.labelHidden && (e.layout === "entry" || e.layout === "value") ? "stacked" : e.layout), S = s(() => {
|
|
61
|
-
switch (f.value) {
|
|
62
|
-
case "entry":
|
|
63
|
-
return "grid grid-cols-[var(--form-label-width,11rem)_minmax(0,1fr)] items-center gap-x-4 compact:grid-cols-[minmax(0,auto)_minmax(40%,1fr)]";
|
|
64
|
-
case "value":
|
|
65
|
-
return "grid grid-cols-[minmax(min-content,1fr)_minmax(0,auto)] items-center gap-x-4";
|
|
66
|
-
case "setting":
|
|
67
|
-
return "flex items-center gap-4";
|
|
68
|
-
default:
|
|
69
|
-
return "flex flex-col gap-1";
|
|
70
|
-
}
|
|
71
|
-
}), p = s(() => e.labelHidden ? "sr-only" : f.value === "stacked" ? "text-footnote text-content-muted" : e.layout === "value" ? "text-body text-content-muted" : "text-body text-content-strong"), _ = s(() => e.value !== void 0 && e.value !== null && e.value !== "");
|
|
72
|
-
return (y, g) => (l(), L(T(e.to ? t(U) : "div"), {
|
|
73
|
-
to: e.to,
|
|
74
|
-
"data-test": "form-row",
|
|
75
|
-
"data-layout": f.value,
|
|
76
|
-
"data-field-error": e.error ? "true" : void 0,
|
|
77
|
-
class: b(["form-row flex min-w-0 items-stretch gap-3 transition-colors duration-motion-fast first:rounded-t-group last:rounded-b-group focus-within:bg-tint-soft/50 [&:first-child>.row-body]:border-t-0", [m[Math.min(k.value, 2)], e.to ? "hover:bg-fill focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-border-focus" : ""]])
|
|
78
|
-
}, {
|
|
79
|
-
default: w(() => [
|
|
80
|
-
c.leading ? (l(), r("div", ae, [
|
|
81
|
-
d(y.$slots, "leading")
|
|
82
|
-
])) : i("", !0),
|
|
83
|
-
x("div", re, [
|
|
84
|
-
x("div", {
|
|
85
|
-
class: b(["min-w-0", S.value])
|
|
86
|
-
}, [
|
|
87
|
-
e.label || e.sub || c.sub ? (l(), r("div", {
|
|
88
|
-
key: 0,
|
|
89
|
-
class: b([e.labelHidden && !e.sub && !c.sub ? "contents" : f.value === "setting" ? "min-w-min flex-1" : "min-w-0", e.labelAlign === "top" ? "self-start pt-1" : ""])
|
|
90
|
-
}, [
|
|
91
|
-
x("div", {
|
|
92
|
-
class: b(c["label-trailing"] ? "flex items-center justify-between gap-3" : "")
|
|
93
|
-
}, [
|
|
94
|
-
(l(), L(T(e.for ? "label" : "span"), {
|
|
95
|
-
for: e.for,
|
|
96
|
-
class: b(["break-words", [p.value, e.labelHidden ? "" : e.labelLines ? a[e.labelLines] : "block"]])
|
|
97
|
-
}, {
|
|
98
|
-
default: w(() => [
|
|
99
|
-
h(v(e.label), 1),
|
|
100
|
-
e.required ? (l(), r("span", se, " *")) : i("", !0)
|
|
101
|
-
]),
|
|
102
|
-
_: 1
|
|
103
|
-
}, 8, ["for", "class"])),
|
|
104
|
-
d(y.$slots, "label-trailing")
|
|
105
|
-
], 2),
|
|
106
|
-
e.sub || c.sub ? (l(), r("small", {
|
|
107
|
-
key: 0,
|
|
108
|
-
id: e.subId,
|
|
109
|
-
class: "mt-0.5 block text-footnote text-content-muted"
|
|
110
|
-
}, [
|
|
111
|
-
d(y.$slots, "sub", {}, () => [
|
|
112
|
-
h(v(e.sub), 1)
|
|
113
|
-
])
|
|
114
|
-
], 8, ie)) : i("", !0)
|
|
115
|
-
], 2)) : i("", !0),
|
|
116
|
-
x("div", {
|
|
117
|
-
class: b(["flex min-w-0 items-center gap-2", f.value === "value" ? "justify-end text-right" : f.value === "setting" ? "flex-wrap justify-end text-right" : f.value === "entry" ? "compact:justify-end" : ""])
|
|
118
|
-
}, [
|
|
119
|
-
d(y.$slots, "default", {}, () => [
|
|
120
|
-
_.value ? (l(), r("span", ne, v(e.value), 1)) : i("", !0)
|
|
121
|
-
]),
|
|
122
|
-
d(y.$slots, "trailing"),
|
|
123
|
-
e.to ? (l(), L(t(I), {
|
|
124
|
-
key: 0,
|
|
125
|
-
name: "arrowRightSLine",
|
|
126
|
-
size: 18,
|
|
127
|
-
class: "shrink-0 text-content-disabled"
|
|
128
|
-
})) : i("", !0)
|
|
129
|
-
], 2)
|
|
130
|
-
], 2),
|
|
131
|
-
e.error ? (l(), r("p", {
|
|
132
|
-
key: 0,
|
|
133
|
-
id: e.errorId,
|
|
134
|
-
class: "mt-1 flex items-start gap-1.5 text-footnote text-content-destructive",
|
|
135
|
-
role: "alert"
|
|
136
|
-
}, [
|
|
137
|
-
V(t(I), {
|
|
138
|
-
name: "alertTriangle",
|
|
139
|
-
size: 14,
|
|
140
|
-
class: "mt-px shrink-0"
|
|
141
|
-
}),
|
|
142
|
-
h(" " + v(e.error), 1)
|
|
143
|
-
], 8, de)) : i("", !0)
|
|
144
|
-
])
|
|
145
|
-
]),
|
|
146
|
-
_: 3
|
|
147
|
-
}, 8, ["to", "data-layout", "data-field-error", "class"]));
|
|
148
|
-
}
|
|
149
|
-
}), ce = ["title"], fe = {
|
|
150
|
-
key: 0,
|
|
151
|
-
class: "mr-1.5 inline-flex shrink-0 items-center align-middle",
|
|
152
|
-
"data-test": "field-prefix"
|
|
153
|
-
}, ve = {
|
|
154
|
-
key: 1,
|
|
155
|
-
class: "mr-1"
|
|
156
|
-
}, me = {
|
|
157
|
-
key: 2,
|
|
158
|
-
class: "ml-1 text-content-muted"
|
|
159
|
-
}, be = {
|
|
160
|
-
key: 3,
|
|
161
|
-
class: "block text-body text-content-disabled"
|
|
162
|
-
}, pe = {
|
|
163
|
-
key: 0,
|
|
164
|
-
class: "sr-only"
|
|
165
|
-
}, ye = ["data-field-error"], ge = ["for"], xe = {
|
|
166
|
-
key: 0,
|
|
167
|
-
class: "text-content-destructive",
|
|
168
|
-
"aria-hidden": "true"
|
|
169
|
-
}, he = {
|
|
170
|
-
key: 1,
|
|
171
|
-
class: "flex min-w-0 items-center gap-2"
|
|
172
|
-
}, ke = { class: "min-w-0 flex-1" }, _e = {
|
|
173
|
-
key: 0,
|
|
174
|
-
class: "mr-1.5 inline-flex shrink-0 items-center align-middle",
|
|
175
|
-
"data-test": "field-prefix"
|
|
176
|
-
}, we = ["id"], $e = ["id"], Ne = /* @__PURE__ */ C({
|
|
177
|
-
__name: "Field",
|
|
178
|
-
props: /* @__PURE__ */ M({
|
|
179
|
-
label: {},
|
|
180
|
-
labelHidden: { type: Boolean },
|
|
181
|
-
hint: {},
|
|
182
|
-
error: {},
|
|
183
|
-
required: { type: Boolean },
|
|
184
|
-
editable: { type: Boolean },
|
|
185
|
-
disabled: { type: Boolean },
|
|
186
|
-
lockedReason: {},
|
|
187
|
-
presentation: {},
|
|
188
|
-
name: {},
|
|
189
|
-
value: { type: [String, Number, Boolean, null] },
|
|
190
|
-
prefix: {},
|
|
191
|
-
suffix: {},
|
|
192
|
-
valueStyle: {},
|
|
193
|
-
rowLayout: {},
|
|
194
|
-
rowLabelAlign: {}
|
|
195
|
-
}, { ...W, value: void 0, prefix: void 0, suffix: void 0, valueStyle: void 0, rowLayout: "entry", rowLabelAlign: "center" }),
|
|
196
|
-
setup(u) {
|
|
197
|
-
const e = u, { t: c } = O(), n = F(), k = G(), m = R(), { editable: a, locked: f } = oe(e), S = K(), p = s(() => e.name ?? S), _ = s(() => `${p.value}-hint`), y = s(() => `${p.value}-error`);
|
|
198
|
-
if (m?.registerField) {
|
|
199
|
-
const o = k["data-field-key"], N = m.registerField(typeof o == "string" ? o : void 0, s(() => e.disabled));
|
|
200
|
-
A(N);
|
|
201
|
-
}
|
|
202
|
-
const g = s(() => {
|
|
203
|
-
const o = e.value;
|
|
204
|
-
return o == null ? !1 : typeof o == "string" ? o.length > 0 : typeof o == "number" ? !Number.isNaN(o) : !0;
|
|
205
|
-
}), E = s(() => typeof e.value == "boolean" ? e.value ? c("core.form.yes") : c("core.form.no") : e.value), D = s(() => !!m && !a.value && m.hideEmpty.value && !g.value && !n.readonly), q = s(() => [e.hint && a.value ? _.value : null, e.error ? y.value : null].filter(Boolean).join(" ") || void 0), $ = s(() => {
|
|
206
|
-
const o = a.value ? e.rowLayout : e.rowLayout === "stacked" ? "stacked" : "value";
|
|
207
|
-
return e.labelHidden && (o === "entry" || o === "value") ? "stacked" : o;
|
|
208
|
-
}), H = s(
|
|
209
|
-
() => a.value && !f.value && e.required ? { "data-field-required": "true", "data-field-filled": g.value ? "true" : void 0 } : {}
|
|
210
|
-
);
|
|
211
|
-
return (o, N) => t(m) && !D.value ? (l(), L(ue, j({ key: 0 }, H.value, {
|
|
212
|
-
label: e.label,
|
|
213
|
-
"label-hidden": e.labelHidden,
|
|
214
|
-
for: t(a) ? p.value : void 0,
|
|
215
|
-
sub: t(a) ? e.hint : void 0,
|
|
216
|
-
"sub-id": _.value,
|
|
217
|
-
required: t(a) && !t(f) && e.required,
|
|
218
|
-
layout: $.value,
|
|
219
|
-
"label-align": $.value === "entry" ? e.rowLabelAlign : void 0,
|
|
220
|
-
error: t(a) ? e.error : void 0,
|
|
221
|
-
"error-id": y.value,
|
|
222
|
-
"data-field-locked": t(f) ? "true" : void 0
|
|
223
|
-
}), P({
|
|
224
|
-
default: w(() => [
|
|
225
|
-
x("div", {
|
|
226
|
-
class: "relative w-full min-w-0",
|
|
227
|
-
title: t(f) ? e.lockedReason : void 0
|
|
228
|
-
}, [
|
|
229
|
-
x("div", {
|
|
230
|
-
class: b(t(a) ? $.value === "setting" ? "flex min-w-0 flex-col items-end" : $.value === "stacked" ? "flex min-w-0 flex-col items-stretch" : "flex min-w-0 flex-col items-start compact:items-end" : "")
|
|
231
|
-
}, [
|
|
232
|
-
t(a) ? d(o.$slots, "default", {
|
|
233
|
-
id: p.value,
|
|
234
|
-
describedby: q.value,
|
|
235
|
-
invalid: !!e.error,
|
|
236
|
-
required: e.required,
|
|
237
|
-
disabled: e.disabled
|
|
238
|
-
}, void 0, void 0, 0) : t(n).readonly ? d(o.$slots, "readonly", {}, void 0, void 0, 1) : g.value ? (l(), r("span", {
|
|
239
|
-
key: 2,
|
|
240
|
-
class: b(["block break-words text-body text-content-strong", e.valueStyle === "mono" ? "font-mono" : e.valueStyle === "numeric" ? "tabular-nums" : ""])
|
|
241
|
-
}, [
|
|
242
|
-
t(n).prefix ? (l(), r("span", fe, [
|
|
243
|
-
d(o.$slots, "prefix")
|
|
244
|
-
])) : i("", !0),
|
|
245
|
-
e.prefix ? (l(), r("span", ve, v(e.prefix), 1)) : i("", !0),
|
|
246
|
-
h(v(E.value), 1),
|
|
247
|
-
e.suffix ? (l(), r("span", me, v(e.suffix), 1)) : i("", !0)
|
|
248
|
-
], 2)) : (l(), r("span", be, v(t(c)("core.state.no_value")), 1))
|
|
249
|
-
], 2)
|
|
250
|
-
], 8, ce),
|
|
251
|
-
t(f) && e.lockedReason ? (l(), r("span", pe, v(e.lockedReason), 1)) : i("", !0)
|
|
252
|
-
]),
|
|
253
|
-
_: 2
|
|
254
|
-
}, [
|
|
255
|
-
t(a) && t(n).trailing ? {
|
|
256
|
-
name: "trailing",
|
|
257
|
-
fn: w(() => [
|
|
258
|
-
d(o.$slots, "trailing")
|
|
259
|
-
]),
|
|
260
|
-
key: "0"
|
|
261
|
-
} : void 0,
|
|
262
|
-
t(a) && t(n).labelTrailing ? {
|
|
263
|
-
name: "label-trailing",
|
|
264
|
-
fn: w(() => [
|
|
265
|
-
d(o.$slots, "labelTrailing")
|
|
266
|
-
]),
|
|
267
|
-
key: "1"
|
|
268
|
-
} : void 0
|
|
269
|
-
]), 1040, ["label", "label-hidden", "for", "sub", "sub-id", "required", "layout", "label-align", "error", "error-id", "data-field-locked"])) : t(m) ? i("", !0) : (l(), r("div", j({ key: 1 }, H.value, {
|
|
270
|
-
"data-field-error": e.error ? "true" : void 0,
|
|
271
|
-
class: "flex min-w-0 flex-col gap-1"
|
|
272
|
-
}), [
|
|
273
|
-
e.label || t(a) && t(n).labelTrailing ? (l(), r("div", {
|
|
274
|
-
key: 0,
|
|
275
|
-
class: b(e.labelHidden && !(t(a) && t(n).labelTrailing) ? "contents" : "flex items-center justify-between gap-3")
|
|
276
|
-
}, [
|
|
277
|
-
e.label ? (l(), r("label", {
|
|
278
|
-
key: 0,
|
|
279
|
-
for: t(a) ? p.value : void 0,
|
|
280
|
-
class: b(e.labelHidden ? "sr-only" : "text-footnote font-medium text-content-muted")
|
|
281
|
-
}, [
|
|
282
|
-
h(v(e.label), 1),
|
|
283
|
-
t(a) && e.required ? (l(), r("span", xe, " *")) : i("", !0)
|
|
284
|
-
], 10, ge)) : i("", !0),
|
|
285
|
-
t(a) ? d(o.$slots, "labelTrailing", {}, void 0, void 0, 1) : i("", !0)
|
|
286
|
-
], 2)) : i("", !0),
|
|
287
|
-
t(a) && t(n).trailing ? (l(), r("div", he, [
|
|
288
|
-
x("div", ke, [
|
|
289
|
-
d(o.$slots, "default", {
|
|
290
|
-
id: p.value,
|
|
291
|
-
describedby: q.value,
|
|
292
|
-
invalid: !!e.error,
|
|
293
|
-
required: e.required,
|
|
294
|
-
disabled: e.disabled
|
|
295
|
-
})
|
|
296
|
-
]),
|
|
297
|
-
d(o.$slots, "trailing")
|
|
298
|
-
])) : t(a) ? d(o.$slots, "default", {
|
|
299
|
-
id: p.value,
|
|
300
|
-
describedby: q.value,
|
|
301
|
-
invalid: !!e.error,
|
|
302
|
-
required: e.required,
|
|
303
|
-
disabled: e.disabled
|
|
304
|
-
}, void 0, void 0, 2) : t(n).readonly ? d(o.$slots, "readonly", {}, void 0, void 0, 3) : (l(), r("span", {
|
|
305
|
-
key: 4,
|
|
306
|
-
class: b(["text-body", g.value ? "text-content-strong" : "text-content-disabled"])
|
|
307
|
-
}, [
|
|
308
|
-
g.value && t(n).prefix ? (l(), r("span", _e, [
|
|
309
|
-
d(o.$slots, "prefix")
|
|
310
|
-
])) : i("", !0),
|
|
311
|
-
h(v(g.value ? `${e.prefix ?? ""}${E.value}${e.suffix ?? ""}` : t(c)("core.state.no_value")), 1)
|
|
312
|
-
], 2)),
|
|
313
|
-
e.hint && t(a) ? (l(), r("p", {
|
|
314
|
-
key: 5,
|
|
315
|
-
id: _.value,
|
|
316
|
-
class: "text-footnote text-content-muted"
|
|
317
|
-
}, v(e.hint), 9, we)) : i("", !0),
|
|
318
|
-
e.error ? (l(), r("p", {
|
|
319
|
-
key: 6,
|
|
320
|
-
id: y.value,
|
|
321
|
-
role: "alert",
|
|
322
|
-
class: "flex items-start gap-1.5 text-footnote text-content-destructive"
|
|
323
|
-
}, [
|
|
324
|
-
V(t(I), {
|
|
325
|
-
name: "alertTriangle",
|
|
326
|
-
size: 14,
|
|
327
|
-
class: "mt-px shrink-0"
|
|
328
|
-
}),
|
|
329
|
-
h(" " + v(e.error), 1)
|
|
330
|
-
], 8, $e)) : i("", !0)
|
|
331
|
-
], 16, ye));
|
|
332
|
-
}
|
|
333
|
-
}), Le = "rounded-control transition-[background-color,box-shadow,opacity] duration-motion-fast ease-motion-standard";
|
|
334
|
-
function Te(u, e) {
|
|
335
|
-
const c = !!R();
|
|
336
|
-
return s(() => c ? Y({ kind: u, state: e() }) : [Le, ...J(u, e()).map(([n]) => n)].join(" "));
|
|
337
|
-
}
|
|
338
|
-
export {
|
|
339
|
-
Ne as _,
|
|
340
|
-
R as a,
|
|
341
|
-
W as b,
|
|
342
|
-
Te as c,
|
|
343
|
-
ee as d,
|
|
344
|
-
ue as e,
|
|
345
|
-
He as f,
|
|
346
|
-
X as g,
|
|
347
|
-
Z as h,
|
|
348
|
-
te as i,
|
|
349
|
-
oe as u
|
|
350
|
-
};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The action row at the foot of a panel that edits: one primary button saying what it does (with a spinner while it works),
|
|
3
|
-
* "Unsaved changes" and Cancel while there are edits, and, while it shows, leaving the page asks first.
|
|
4
|
-
*/
|
|
5
|
-
type __VLS_Props = {
|
|
6
|
-
label: string;
|
|
7
|
-
processing?: boolean;
|
|
8
|
-
dirty: boolean;
|
|
9
|
-
};
|
|
10
|
-
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
11
|
-
cancel: () => any;
|
|
12
|
-
submit: () => any;
|
|
13
|
-
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
14
|
-
onCancel?: (() => any) | undefined;
|
|
15
|
-
onSubmit?: (() => any) | undefined;
|
|
16
|
-
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
17
|
-
export default _default;
|