@wssto2/vue-core 0.4.14 → 0.4.16
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/dist/{ActionRow.vue_vue_type_script_setup_true_lang-LlfIPWsJ.js → ActionRow.vue_vue_type_script_setup_true_lang-DOjn7fqy.js} +1 -1
- package/dist/{Activity-BdSvn0GP.js → Activity-CVO3sJwy.js} +6 -6
- package/dist/{Changes-BQO--N9F.js → Changes-Bzvl3cEx.js} +5 -5
- package/dist/{CollectionPage.vue_vue_type_script_setup_true_lang-DkpFEHUw.js → CollectionPage.vue_vue_type_script_setup_true_lang-CD5zZ29o.js} +2 -2
- package/dist/DateField.vue_vue_type_script_setup_true_lang-BufoFwVQ.js +278 -0
- package/dist/{DeadLetters-OmeiADEi.js → DeadLetters-DmwUtgf9.js} +4 -4
- package/dist/FormErrors.vue_vue_type_script_setup_true_lang-DWcVKZM3.js +285 -0
- package/dist/{FormGroup.vue_vue_type_script_setup_true_lang-DG2zdG_a.js → FormGroup.vue_vue_type_script_setup_true_lang-BokxZ7LU.js} +1 -1
- package/dist/{FormView.vue_vue_type_script_setup_true_lang-cr0xNDXP.js → FormView.vue_vue_type_script_setup_true_lang-Dz5TZt92.js} +2 -2
- package/dist/{General-CBwFLiKQ.js → General-CUEjJBD4.js} +10 -10
- package/dist/{NewRolePage-CblUW2gA.js → NewRolePage-Cyn-oV6r.js} +3 -3
- package/dist/NumberField.vue_vue_type_script_setup_true_lang-a8kN3A7k.js +150 -0
- package/dist/{ProfilePage-BOoDDbmB.js → ProfilePage-I74SQBFO.js} +41 -41
- package/dist/{RoleEditor.vue_vue_type_script_setup_true_lang-BCE5yrwy.js → RoleEditor.vue_vue_type_script_setup_true_lang-Ce6wjptT.js} +44 -44
- package/dist/{RolePage-xDsFL_eC.js → RolePage-DWQP3qQl.js} +8 -8
- package/dist/{RolesPage-C39wsF6X.js → RolesPage-BeEsHIQ2.js} +5 -5
- package/dist/SegmentedField.vue_vue_type_script_setup_true_lang-BMBkEmxr.js +81 -0
- package/dist/SelectField.vue_vue_type_script_setup_true_lang-C1Flb1hA.js +465 -0
- package/dist/{SessionList.vue_vue_type_script_setup_true_lang-D4k5QeWS.js → SessionList.vue_vue_type_script_setup_true_lang-DoUo68xE.js} +2 -2
- package/dist/{Sessions-m_i4aTfw.js → Sessions-D8IXcb5M.js} +4 -4
- package/dist/{SettingsPage-ktKvQQnE.js → SettingsPage-DRQP2nrH.js} +9 -9
- package/dist/{SignIn-CkoEixY4.js → SignIn-CAZkovhb.js} +6 -6
- package/dist/{SignInPage-DVcpFz3G.js → SignInPage-D-49oLY3.js} +3 -3
- package/dist/{SignIns-BnVAtncZ.js → SignIns-BtNfgMLc.js} +3 -3
- package/dist/SwitchField.vue_vue_type_script_setup_true_lang-0weBvsJf.js +87 -0
- package/dist/TextField.vue_vue_type_script_setup_true_lang-D3-R5XXG.js +292 -0
- package/dist/TextareaField.vue_vue_type_script_setup_true_lang-4wC3c0BM.js +91 -0
- package/dist/TimeField.vue_vue_type_script_setup_true_lang-pAdLPYXA.js +187 -0
- package/dist/{UserRecord-Cg69_mbU.js → UserRecord-BSbNuRFi.js} +10 -10
- package/dist/{UsersList-BFmBDGs7.js → UsersList-DPHxcaDm.js} +8 -8
- package/dist/access/index.js +1 -1
- package/dist/app/application.d.ts +8 -2
- package/dist/app/index.js +93 -93
- package/dist/collection/index.js +1 -1
- package/dist/control-B_Nwtmag.js +334 -0
- package/dist/{describeError-CvGmajU0.js → describeError-B-NMa--w.js} +12 -7
- package/dist/fieldMessages-DV6sESpn.js +25 -0
- package/dist/form/CardSelectField.vue.d.ts +2 -2
- package/dist/form/ChoiceChips.vue.d.ts +2 -2
- package/dist/form/ComboField.vue.d.ts +2 -2
- package/dist/form/DateField.vue.d.ts +10 -2
- package/dist/form/DateTimeField.vue.d.ts +10 -2
- package/dist/form/Field.vue.d.ts +2 -1
- package/dist/form/FileField.vue.d.ts +10 -2
- package/dist/form/FormErrors.vue.d.ts +1 -1
- package/dist/form/FormRow.vue.d.ts +3 -0
- package/dist/form/I18nField.vue.d.ts +10 -2
- package/dist/form/MoneyField.vue.d.ts +10 -2
- package/dist/form/MonthYearField.vue.d.ts +10 -2
- package/dist/form/MultiSelectField.vue.d.ts +2 -2
- package/dist/form/NumberField.vue.d.ts +25 -2
- package/dist/form/PhotoField.vue.d.ts +10 -2
- package/dist/form/SegmentedField.vue.d.ts +2 -2
- package/dist/form/SelectField.vue.d.ts +7 -8
- package/dist/form/SwitchField.vue.d.ts +3 -2
- package/dist/form/TextField.vue.d.ts +10 -2
- package/dist/form/TextareaField.vue.d.ts +10 -2
- package/dist/form/TimeField.vue.d.ts +10 -2
- package/dist/form/field.d.ts +12 -0
- package/dist/form/index.d.ts +3 -1
- package/dist/form/index.js +1167 -956
- package/dist/form/useForm.d.ts +2 -2
- package/dist/form/useHiddenFieldErrors.d.ts +23 -0
- package/dist/form/useSaveChrome.d.ts +8 -3
- package/dist/i18n/describeError.d.ts +8 -0
- package/dist/i18n/index.d.ts +3 -2
- package/dist/i18n/index.js +32 -28
- package/dist/identity/fieldMessages.d.ts +1 -1
- package/dist/identity/index.js +1 -1
- package/dist/{index-RNF5-9uf.js → index-Bq96L43f.js} +15 -15
- package/dist/{index-B416VXmR.js → index-CWeNiBX6.js} +2 -2
- package/dist/{index-KcCoCfr-.js → index-yKIOaisE.js} +10 -10
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/notifications/index.js +1 -1
- package/dist/phone/PhoneField.vue.d.ts +1 -0
- package/dist/phone/index.js +66 -65
- package/dist/resource/index.js +1 -1
- package/dist/{routeResource-BwEFXzIX.js → routeResource-DlTsGTg_.js} +1 -1
- package/dist/state/index.js +1 -1
- package/dist/{status-OZUHZpWl.js → status-DzmySsWw.js} +1 -1
- package/dist/{useCommand-BkONMn3X.js → useCommand-B-N6HJOz.js} +1 -1
- package/dist/{useLoad-DuEsLECT.js → useLoad-M7V-AVwR.js} +1 -1
- package/dist/{useResourceForm-D1hIpwW5.js → useResourceForm-CP2lCwmD.js} +1 -1
- package/dist/useSaveChrome-7huA3FzR.js +26 -0
- package/package.json +1 -1
- package/dist/DateField.vue_vue_type_script_setup_true_lang-GVasv8ao.js +0 -255
- package/dist/FormErrors.vue_vue_type_script_setup_true_lang-BQb7wLT0.js +0 -276
- package/dist/NumberField.vue_vue_type_script_setup_true_lang-C7N5nq0P.js +0 -113
- package/dist/SegmentedField.vue_vue_type_script_setup_true_lang-BMqWlpsL.js +0 -58
- package/dist/SelectField.vue_vue_type_script_setup_true_lang-BJoAkBo2.js +0 -437
- package/dist/SwitchField.vue_vue_type_script_setup_true_lang-CM8yp9JQ.js +0 -64
- package/dist/TextField.vue_vue_type_script_setup_true_lang-B9dwVASU.js +0 -269
- package/dist/TextareaField.vue_vue_type_script_setup_true_lang-CqAWfABZ.js +0 -68
- package/dist/TimeField.vue_vue_type_script_setup_true_lang-DWfAUlnz.js +0 -164
- package/dist/control-7EP4tjYy.js +0 -313
- package/dist/fieldMessages-D_dpSe19.js +0 -25
- package/dist/useSaveChrome-DuWm0Czf.js +0 -25
package/dist/control-7EP4tjYy.js
DELETED
|
@@ -1,313 +0,0 @@
|
|
|
1
|
-
import { inject as q, ref as G, computed as r, onBeforeUnmount as C, defineComponent as F, useSlots as V, openBlock as l, createBlock as L, resolveDynamicComponent as T, unref as t, normalizeClass as y, withCtx as _, createElementBlock as a, renderSlot as f, createCommentVNode as n, createElementVNode as g, createTextVNode as x, toDisplayString as u, createVNode as D, useAttrs as K, useId as P, mergeProps as A, createSlots as M, mergeDefaults as O } from "vue";
|
|
2
|
-
import { useI18n as U } from "vue-i18n";
|
|
3
|
-
import { _ as I } from "./Icon.vue_vue_type_script_lang-D7oC-d-S.js";
|
|
4
|
-
import { RouterLink as Y } from "vue-router";
|
|
5
|
-
import { c as H, a as J } from "./controlSurface-t7OEFESJ.js";
|
|
6
|
-
import { u as Q } from "./mediaQuery-CygcXmFW.js";
|
|
7
|
-
const W = {
|
|
8
|
-
label: void 0,
|
|
9
|
-
hint: void 0,
|
|
10
|
-
error: void 0,
|
|
11
|
-
required: !1,
|
|
12
|
-
editable: !0,
|
|
13
|
-
disabled: !1,
|
|
14
|
-
lockedReason: void 0,
|
|
15
|
-
presentation: "control",
|
|
16
|
-
name: void 0
|
|
17
|
-
}, X = Symbol("vue-core.formGroup"), Z = Symbol("vue-core.formRowIndent"), ee = Symbol("vue-core.formEditable"), R = () => q(X, null), te = () => q(Z, 0);
|
|
18
|
-
function oe(i) {
|
|
19
|
-
const e = R(), d = q(ee, G(!0)), c = Q(), h = r(() => !!e && !!i.disabled && (c.value || i.presentation === "value")), v = r(() => (i.editable ?? !0) && d.value && !h.value), o = r(() => !!e && !!i.disabled && v.value);
|
|
20
|
-
if (e) {
|
|
21
|
-
const m = e.registerLocked(r(() => !!i.disabled && d.value && i.presentation !== "value"));
|
|
22
|
-
C(m);
|
|
23
|
-
}
|
|
24
|
-
return { editable: v, locked: o };
|
|
25
|
-
}
|
|
26
|
-
const le = ["label", "hint", "error", "required", "editable", "disabled", "lockedReason", "presentation", "name"];
|
|
27
|
-
function Re(i) {
|
|
28
|
-
return Object.fromEntries(le.map((e) => [e, i[e]]));
|
|
29
|
-
}
|
|
30
|
-
const re = {
|
|
31
|
-
key: 0,
|
|
32
|
-
class: "flex shrink-0 items-center"
|
|
33
|
-
}, ae = { class: "row-body min-h-row min-w-0 flex-1 border-t border-border-separator py-2 pr-row-inset" }, se = {
|
|
34
|
-
key: 0,
|
|
35
|
-
class: "text-content-destructive",
|
|
36
|
-
"aria-hidden": "true"
|
|
37
|
-
}, ne = ["id"], ie = {
|
|
38
|
-
key: 0,
|
|
39
|
-
class: "break-words text-body text-content-strong"
|
|
40
|
-
}, de = ["id"], ue = /* @__PURE__ */ F({
|
|
41
|
-
__name: "FormRow",
|
|
42
|
-
props: {
|
|
43
|
-
label: { default: void 0 },
|
|
44
|
-
for: { default: void 0 },
|
|
45
|
-
sub: { default: void 0 },
|
|
46
|
-
subId: { default: void 0 },
|
|
47
|
-
required: { type: Boolean, default: !1 },
|
|
48
|
-
layout: { default: "entry" },
|
|
49
|
-
value: { default: void 0 },
|
|
50
|
-
to: { default: void 0 },
|
|
51
|
-
error: { default: void 0 },
|
|
52
|
-
errorId: { default: void 0 },
|
|
53
|
-
indent: { default: 0 },
|
|
54
|
-
labelLines: { default: void 0 },
|
|
55
|
-
labelAlign: { default: "center" }
|
|
56
|
-
},
|
|
57
|
-
setup(i) {
|
|
58
|
-
const e = i, d = V(), c = te(), h = r(() => c + e.indent), v = ["pl-row-inset", "pl-[calc(var(--app-row-inset)+1.25rem)]", "pl-[calc(var(--app-row-inset)+2.5rem)]"], o = { 1: "line-clamp-1", 2: "line-clamp-2", 3: "line-clamp-3" }, m = r(() => {
|
|
59
|
-
switch (e.layout) {
|
|
60
|
-
case "entry":
|
|
61
|
-
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)]";
|
|
62
|
-
case "value":
|
|
63
|
-
return "grid grid-cols-[minmax(min-content,1fr)_minmax(0,auto)] items-center gap-x-4";
|
|
64
|
-
case "setting":
|
|
65
|
-
return "flex items-center gap-4";
|
|
66
|
-
default:
|
|
67
|
-
return "flex flex-col gap-1";
|
|
68
|
-
}
|
|
69
|
-
}), S = r(() => e.layout === "stacked" ? "text-footnote text-content-muted" : e.layout === "value" ? "text-body text-content-muted" : "text-body text-content-strong"), p = r(() => e.value !== void 0 && e.value !== null && e.value !== "");
|
|
70
|
-
return (b, w) => (l(), L(T(e.to ? t(Y) : "div"), {
|
|
71
|
-
to: e.to,
|
|
72
|
-
"data-test": "form-row",
|
|
73
|
-
"data-layout": e.layout,
|
|
74
|
-
"data-field-error": e.error ? "true" : void 0,
|
|
75
|
-
class: y(["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", [v[Math.min(h.value, 2)], e.to ? "hover:bg-fill focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-border-focus" : ""]])
|
|
76
|
-
}, {
|
|
77
|
-
default: _(() => [
|
|
78
|
-
d.leading ? (l(), a("div", re, [
|
|
79
|
-
f(b.$slots, "leading")
|
|
80
|
-
])) : n("", !0),
|
|
81
|
-
g("div", ae, [
|
|
82
|
-
g("div", {
|
|
83
|
-
class: y(["min-w-0", m.value])
|
|
84
|
-
}, [
|
|
85
|
-
e.label || e.sub || d.sub ? (l(), a("div", {
|
|
86
|
-
key: 0,
|
|
87
|
-
class: y([e.layout === "setting" ? "min-w-min flex-1" : "min-w-0", e.labelAlign === "top" ? "self-start pt-1" : ""])
|
|
88
|
-
}, [
|
|
89
|
-
g("div", {
|
|
90
|
-
class: y(d["label-trailing"] ? "flex items-center justify-between gap-3" : "")
|
|
91
|
-
}, [
|
|
92
|
-
(l(), L(T(e.for ? "label" : "span"), {
|
|
93
|
-
for: e.for,
|
|
94
|
-
class: y(["break-words", [S.value, e.labelLines ? o[e.labelLines] : "block"]])
|
|
95
|
-
}, {
|
|
96
|
-
default: _(() => [
|
|
97
|
-
x(u(e.label), 1),
|
|
98
|
-
e.required ? (l(), a("span", se, " *")) : n("", !0)
|
|
99
|
-
]),
|
|
100
|
-
_: 1
|
|
101
|
-
}, 8, ["for", "class"])),
|
|
102
|
-
f(b.$slots, "label-trailing")
|
|
103
|
-
], 2),
|
|
104
|
-
e.sub || d.sub ? (l(), a("small", {
|
|
105
|
-
key: 0,
|
|
106
|
-
id: e.subId,
|
|
107
|
-
class: "mt-0.5 block text-footnote text-content-muted"
|
|
108
|
-
}, [
|
|
109
|
-
f(b.$slots, "sub", {}, () => [
|
|
110
|
-
x(u(e.sub), 1)
|
|
111
|
-
])
|
|
112
|
-
], 8, ne)) : n("", !0)
|
|
113
|
-
], 2)) : n("", !0),
|
|
114
|
-
g("div", {
|
|
115
|
-
class: y(["flex min-w-0 items-center gap-2", e.layout === "value" ? "justify-end text-right" : e.layout === "setting" ? "flex-wrap justify-end text-right" : e.layout === "entry" ? "compact:justify-end" : ""])
|
|
116
|
-
}, [
|
|
117
|
-
f(b.$slots, "default", {}, () => [
|
|
118
|
-
p.value ? (l(), a("span", ie, u(e.value), 1)) : n("", !0)
|
|
119
|
-
]),
|
|
120
|
-
f(b.$slots, "trailing"),
|
|
121
|
-
e.to ? (l(), L(t(I), {
|
|
122
|
-
key: 0,
|
|
123
|
-
name: "arrowRightSLine",
|
|
124
|
-
size: 18,
|
|
125
|
-
class: "shrink-0 text-content-disabled"
|
|
126
|
-
})) : n("", !0)
|
|
127
|
-
], 2)
|
|
128
|
-
], 2),
|
|
129
|
-
e.error ? (l(), a("p", {
|
|
130
|
-
key: 0,
|
|
131
|
-
id: e.errorId,
|
|
132
|
-
class: "mt-1 flex items-start gap-1.5 text-footnote text-content-destructive",
|
|
133
|
-
role: "alert"
|
|
134
|
-
}, [
|
|
135
|
-
D(t(I), {
|
|
136
|
-
name: "alertTriangle",
|
|
137
|
-
size: 14,
|
|
138
|
-
class: "mt-px shrink-0"
|
|
139
|
-
}),
|
|
140
|
-
x(" " + u(e.error), 1)
|
|
141
|
-
], 8, de)) : n("", !0)
|
|
142
|
-
])
|
|
143
|
-
]),
|
|
144
|
-
_: 3
|
|
145
|
-
}, 8, ["to", "data-layout", "data-field-error", "class"]));
|
|
146
|
-
}
|
|
147
|
-
}), ce = ["title"], fe = {
|
|
148
|
-
key: 0,
|
|
149
|
-
class: "mr-1"
|
|
150
|
-
}, ve = {
|
|
151
|
-
key: 1,
|
|
152
|
-
class: "ml-1 text-content-muted"
|
|
153
|
-
}, me = {
|
|
154
|
-
key: 3,
|
|
155
|
-
class: "block text-body text-content-disabled"
|
|
156
|
-
}, be = {
|
|
157
|
-
key: 0,
|
|
158
|
-
class: "sr-only"
|
|
159
|
-
}, ye = ["data-field-error"], pe = {
|
|
160
|
-
key: 0,
|
|
161
|
-
class: "flex items-center justify-between gap-3"
|
|
162
|
-
}, ge = ["for"], xe = {
|
|
163
|
-
key: 0,
|
|
164
|
-
class: "text-content-destructive",
|
|
165
|
-
"aria-hidden": "true"
|
|
166
|
-
}, he = ["id"], ke = ["id"], Ee = /* @__PURE__ */ F({
|
|
167
|
-
__name: "Field",
|
|
168
|
-
props: /* @__PURE__ */ O({
|
|
169
|
-
label: {},
|
|
170
|
-
hint: {},
|
|
171
|
-
error: {},
|
|
172
|
-
required: { type: Boolean },
|
|
173
|
-
editable: { type: Boolean },
|
|
174
|
-
disabled: { type: Boolean },
|
|
175
|
-
lockedReason: {},
|
|
176
|
-
presentation: {},
|
|
177
|
-
name: {},
|
|
178
|
-
value: { type: [String, Number, Boolean, null] },
|
|
179
|
-
prefix: {},
|
|
180
|
-
suffix: {},
|
|
181
|
-
valueStyle: {},
|
|
182
|
-
rowLayout: {},
|
|
183
|
-
rowLabelAlign: {}
|
|
184
|
-
}, { ...W, value: void 0, prefix: void 0, suffix: void 0, valueStyle: void 0, rowLayout: "entry", rowLabelAlign: "center" }),
|
|
185
|
-
setup(i) {
|
|
186
|
-
const e = i, { t: d } = U(), c = V(), h = K(), v = R(), { editable: o, locked: m } = oe(e), S = P(), p = r(() => e.name ?? S), b = r(() => `${p.value}-hint`), w = r(() => `${p.value}-error`);
|
|
187
|
-
if (v?.registerField) {
|
|
188
|
-
const s = h["data-field-key"], j = v.registerField(typeof s == "string" ? s : void 0, r(() => e.disabled));
|
|
189
|
-
C(j);
|
|
190
|
-
}
|
|
191
|
-
const k = r(() => {
|
|
192
|
-
const s = e.value;
|
|
193
|
-
return s == null ? !1 : typeof s == "string" ? s.length > 0 : typeof s == "number" ? !Number.isNaN(s) : !0;
|
|
194
|
-
}), E = r(() => typeof e.value == "boolean" ? e.value ? d("core.form.yes") : d("core.form.no") : e.value), z = r(() => !!v && !o.value && v.hideEmpty.value && !k.value && !c.readonly), N = r(() => [e.hint && o.value ? b.value : null, e.error ? w.value : null].filter(Boolean).join(" ") || void 0), $ = r(() => o.value ? e.rowLayout : e.rowLayout === "stacked" ? "stacked" : "value"), B = r(
|
|
195
|
-
() => o.value && !m.value && e.required ? { "data-field-required": "true", "data-field-filled": k.value ? "true" : void 0 } : {}
|
|
196
|
-
);
|
|
197
|
-
return (s, j) => t(v) && !z.value ? (l(), L(ue, A({ key: 0 }, B.value, {
|
|
198
|
-
label: e.label,
|
|
199
|
-
for: t(o) ? p.value : void 0,
|
|
200
|
-
sub: t(o) ? e.hint : void 0,
|
|
201
|
-
"sub-id": b.value,
|
|
202
|
-
required: t(o) && !t(m) && e.required,
|
|
203
|
-
layout: $.value,
|
|
204
|
-
"label-align": $.value === "entry" ? e.rowLabelAlign : void 0,
|
|
205
|
-
error: t(o) ? e.error : void 0,
|
|
206
|
-
"error-id": w.value,
|
|
207
|
-
"data-field-locked": t(m) ? "true" : void 0
|
|
208
|
-
}), M({
|
|
209
|
-
default: _(() => [
|
|
210
|
-
g("div", {
|
|
211
|
-
class: "relative w-full min-w-0",
|
|
212
|
-
title: t(m) ? e.lockedReason : void 0
|
|
213
|
-
}, [
|
|
214
|
-
g("div", {
|
|
215
|
-
class: y(t(o) ? $.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" : "")
|
|
216
|
-
}, [
|
|
217
|
-
t(o) ? f(s.$slots, "default", {
|
|
218
|
-
id: p.value,
|
|
219
|
-
describedby: N.value,
|
|
220
|
-
invalid: !!e.error,
|
|
221
|
-
required: e.required,
|
|
222
|
-
disabled: e.disabled
|
|
223
|
-
}, void 0, void 0, 0) : t(c).readonly ? f(s.$slots, "readonly", {}, void 0, void 0, 1) : k.value ? (l(), a("span", {
|
|
224
|
-
key: 2,
|
|
225
|
-
class: y(["block break-words text-body text-content-strong", e.valueStyle === "mono" ? "font-mono" : e.valueStyle === "numeric" ? "tabular-nums" : ""])
|
|
226
|
-
}, [
|
|
227
|
-
e.prefix ? (l(), a("span", fe, u(e.prefix), 1)) : n("", !0),
|
|
228
|
-
x(u(E.value), 1),
|
|
229
|
-
e.suffix ? (l(), a("span", ve, u(e.suffix), 1)) : n("", !0)
|
|
230
|
-
], 2)) : (l(), a("span", me, u(t(d)("core.state.no_value")), 1))
|
|
231
|
-
], 2)
|
|
232
|
-
], 8, ce),
|
|
233
|
-
t(m) && e.lockedReason ? (l(), a("span", be, u(e.lockedReason), 1)) : n("", !0)
|
|
234
|
-
]),
|
|
235
|
-
_: 2
|
|
236
|
-
}, [
|
|
237
|
-
t(o) && t(c).trailing ? {
|
|
238
|
-
name: "trailing",
|
|
239
|
-
fn: _(() => [
|
|
240
|
-
f(s.$slots, "trailing")
|
|
241
|
-
]),
|
|
242
|
-
key: "0"
|
|
243
|
-
} : void 0,
|
|
244
|
-
t(o) && t(c).labelTrailing ? {
|
|
245
|
-
name: "label-trailing",
|
|
246
|
-
fn: _(() => [
|
|
247
|
-
f(s.$slots, "labelTrailing")
|
|
248
|
-
]),
|
|
249
|
-
key: "1"
|
|
250
|
-
} : void 0
|
|
251
|
-
]), 1040, ["label", "for", "sub", "sub-id", "required", "layout", "label-align", "error", "error-id", "data-field-locked"])) : t(v) ? n("", !0) : (l(), a("div", A({ key: 1 }, B.value, {
|
|
252
|
-
"data-field-error": e.error ? "true" : void 0,
|
|
253
|
-
class: "flex min-w-0 flex-col gap-1"
|
|
254
|
-
}), [
|
|
255
|
-
e.label || t(o) && t(c).labelTrailing ? (l(), a("div", pe, [
|
|
256
|
-
e.label ? (l(), a("label", {
|
|
257
|
-
key: 0,
|
|
258
|
-
for: t(o) ? p.value : void 0,
|
|
259
|
-
class: "text-footnote font-medium text-content-muted"
|
|
260
|
-
}, [
|
|
261
|
-
x(u(e.label), 1),
|
|
262
|
-
t(o) && e.required ? (l(), a("span", xe, " *")) : n("", !0)
|
|
263
|
-
], 8, ge)) : n("", !0),
|
|
264
|
-
t(o) ? f(s.$slots, "labelTrailing", {}, void 0, void 0, 1) : n("", !0)
|
|
265
|
-
])) : n("", !0),
|
|
266
|
-
t(o) ? f(s.$slots, "default", {
|
|
267
|
-
id: p.value,
|
|
268
|
-
describedby: N.value,
|
|
269
|
-
invalid: !!e.error,
|
|
270
|
-
required: e.required,
|
|
271
|
-
disabled: e.disabled
|
|
272
|
-
}, void 0, void 0, 1) : t(c).readonly ? f(s.$slots, "readonly", {}, void 0, void 0, 2) : (l(), a("span", {
|
|
273
|
-
key: 3,
|
|
274
|
-
class: y(["text-body", k.value ? "text-content-strong" : "text-content-disabled"])
|
|
275
|
-
}, u(k.value ? `${e.prefix ?? ""}${E.value}${e.suffix ?? ""}` : t(d)("core.state.no_value")), 3)),
|
|
276
|
-
e.hint && t(o) ? (l(), a("p", {
|
|
277
|
-
key: 4,
|
|
278
|
-
id: b.value,
|
|
279
|
-
class: "text-footnote text-content-muted"
|
|
280
|
-
}, u(e.hint), 9, he)) : n("", !0),
|
|
281
|
-
e.error ? (l(), a("p", {
|
|
282
|
-
key: 5,
|
|
283
|
-
id: w.value,
|
|
284
|
-
role: "alert",
|
|
285
|
-
class: "flex items-start gap-1.5 text-footnote text-content-destructive"
|
|
286
|
-
}, [
|
|
287
|
-
D(t(I), {
|
|
288
|
-
name: "alertTriangle",
|
|
289
|
-
size: 14,
|
|
290
|
-
class: "mt-px shrink-0"
|
|
291
|
-
}),
|
|
292
|
-
x(" " + u(e.error), 1)
|
|
293
|
-
], 8, ke)) : n("", !0)
|
|
294
|
-
], 16, ye));
|
|
295
|
-
}
|
|
296
|
-
}), _e = "rounded-control transition-[background-color,box-shadow,opacity] duration-motion-fast ease-motion-standard";
|
|
297
|
-
function Ne(i, e) {
|
|
298
|
-
const d = !!R();
|
|
299
|
-
return r(() => d ? H({ kind: i, state: e() }) : [_e, ...J(i, e()).map(([c]) => c)].join(" "));
|
|
300
|
-
}
|
|
301
|
-
export {
|
|
302
|
-
Ee as _,
|
|
303
|
-
R as a,
|
|
304
|
-
W as b,
|
|
305
|
-
Ne as c,
|
|
306
|
-
ee as d,
|
|
307
|
-
ue as e,
|
|
308
|
-
Re as f,
|
|
309
|
-
X as g,
|
|
310
|
-
Z as h,
|
|
311
|
-
te as i,
|
|
312
|
-
oe as u
|
|
313
|
-
};
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { useI18n as m } from "vue-i18n";
|
|
2
|
-
import { a as c } from "./error-CD7x0Jrz.js";
|
|
3
|
-
import { u as d } from "./format-B8mJm946.js";
|
|
4
|
-
import { u as l } from "./describeError-CvGmajU0.js";
|
|
5
|
-
function g() {
|
|
6
|
-
const { t: s, te: u } = m(), a = d(), f = l(), i = (e) => [`errors.${e}`, `core.errors.${e}`].find((t) => u(t));
|
|
7
|
-
function n(e, t) {
|
|
8
|
-
if (c(e) && e.code) {
|
|
9
|
-
const r = i(e.code), o = typeof e.params?.locked_until == "string" ? new Date(e.params.locked_until) : null;
|
|
10
|
-
if (r && o && !Number.isNaN(o.getTime())) return s(r, { ...e.params, locked_until: a.time(o) });
|
|
11
|
-
}
|
|
12
|
-
return f(e, t === void 0 ? void 0 : { fallback: t });
|
|
13
|
-
}
|
|
14
|
-
return {
|
|
15
|
-
sentence: n,
|
|
16
|
-
translate: (e) => {
|
|
17
|
-
const t = i(e);
|
|
18
|
-
return t === void 0 ? e : s(t);
|
|
19
|
-
},
|
|
20
|
-
failureMessage: (e, t) => c(t) && t.code && (e === "failed" || e === "forbidden" || e === "conflict") ? n(t) : void 0
|
|
21
|
-
};
|
|
22
|
-
}
|
|
23
|
-
export {
|
|
24
|
-
g as u
|
|
25
|
-
};
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { computed as u, toValue as r } from "vue";
|
|
2
|
-
import { useI18n as n } from "vue-i18n";
|
|
3
|
-
import { u as s } from "./chrome-nUcmVu8G.js";
|
|
4
|
-
import { a as m } from "./leaveGuard-Cc8yeLxM.js";
|
|
5
|
-
function d(e) {
|
|
6
|
-
const { t: a } = n(), l = u(() => (r(e.ready) ?? !0) && (r(e.allowed) ?? !0)), c = u(() => l.value && e.form.dirty.value);
|
|
7
|
-
m(() => l.value && e.form.dirty.value), s({
|
|
8
|
-
actions: () => l.value ? [
|
|
9
|
-
{
|
|
10
|
-
id: e.id ?? "save",
|
|
11
|
-
label: r(e.label) ?? a("core.actions.save"),
|
|
12
|
-
shortLabel: a("core.actions.save"),
|
|
13
|
-
icon: "save",
|
|
14
|
-
placement: "primary",
|
|
15
|
-
processing: e.form.submitting.value,
|
|
16
|
-
onClick: e.save
|
|
17
|
-
}
|
|
18
|
-
] : [],
|
|
19
|
-
leading: () => c.value ? { id: `${e.id ?? "save"}-cancel`, label: a("core.actions.cancel"), prominence: "plain", onClick: e.cancel } : null,
|
|
20
|
-
status: () => c.value ? a("core.form.unsaved_changes") : null
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
export {
|
|
24
|
-
d as u
|
|
25
|
-
};
|