@wssto2/vue-core 0.4.13 → 0.4.15
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-CkvS5W6K.js} +1 -1
- package/dist/{Activity-DhVVSf60.js → Activity-4q26REYj.js} +6 -6
- package/dist/{Changes-Czs32zlz.js → Changes-CKIuGF8O.js} +5 -5
- package/dist/{CollectionPage.vue_vue_type_script_setup_true_lang-DkpFEHUw.js → CollectionPage.vue_vue_type_script_setup_true_lang-B17cUOzj.js} +2 -2
- package/dist/{DateField.vue_vue_type_script_setup_true_lang-GVasv8ao.js → DateField.vue_vue_type_script_setup_true_lang-DehwWm78.js} +17 -16
- package/dist/{DeadLetters-DBUALYXL.js → DeadLetters-DPGcQOz1.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-noYI9QMk.js} +1 -1
- package/dist/{FormView.vue_vue_type_script_setup_true_lang-cr0xNDXP.js → FormView.vue_vue_type_script_setup_true_lang-BcIbTMHN.js} +2 -2
- package/dist/{General-UWbJQLc8.js → General-CUA9b3ML.js} +10 -10
- package/dist/{NewRolePage-Dm7urTx0.js → NewRolePage-DBfCvDWA.js} +3 -3
- package/dist/NumberField.vue_vue_type_script_setup_true_lang-Dm6FfJ2T.js +126 -0
- package/dist/{ProfilePage-Ep75xf-u.js → ProfilePage-On-eAiJ-.js} +41 -41
- package/dist/{RoleEditor.vue_vue_type_script_setup_true_lang-CDZjkiU5.js → RoleEditor.vue_vue_type_script_setup_true_lang-fvAf3rQm.js} +44 -44
- package/dist/{RolePage-CQc_wV3b.js → RolePage-B8oul55j.js} +8 -8
- package/dist/{RolesPage-CG7InZ_u.js → RolesPage-DsXVivdj.js} +5 -5
- package/dist/{SegmentedField.vue_vue_type_script_setup_true_lang-BMqWlpsL.js → SegmentedField.vue_vue_type_script_setup_true_lang-B2d55hrh.js} +7 -6
- package/dist/SelectField.vue_vue_type_script_setup_true_lang-DedKLLQK.js +443 -0
- package/dist/{SessionList.vue_vue_type_script_setup_true_lang-D4k5QeWS.js → SessionList.vue_vue_type_script_setup_true_lang-CirlMdHb.js} +2 -2
- package/dist/{Sessions-_w3Tnevz.js → Sessions-BTyXDEuY.js} +4 -4
- package/dist/{SettingsPage-BNdeH-_0.js → SettingsPage-DHTmMgif.js} +9 -9
- package/dist/{SignIn-DIjshMpl.js → SignIn-DU4DE2wj.js} +6 -6
- package/dist/{SignInPage-C3-LHjo2.js → SignInPage-BA22kyOp.js} +3 -3
- package/dist/{SignIns-DNdLctGJ.js → SignIns-C8QAZBaL.js} +3 -3
- package/dist/{SwitchField.vue_vue_type_script_setup_true_lang-CM8yp9JQ.js → SwitchField.vue_vue_type_script_setup_true_lang-B2Z2hy_h.js} +11 -10
- package/dist/{TextField.vue_vue_type_script_setup_true_lang-B9dwVASU.js → TextField.vue_vue_type_script_setup_true_lang-nqnGG7Zc.js} +27 -26
- package/dist/{TextareaField.vue_vue_type_script_setup_true_lang-CqAWfABZ.js → TextareaField.vue_vue_type_script_setup_true_lang-BgIQyYtf.js} +9 -8
- package/dist/{TimeField.vue_vue_type_script_setup_true_lang-DWfAUlnz.js → TimeField.vue_vue_type_script_setup_true_lang-Dr0h-V_8.js} +25 -24
- package/dist/{UserRecord-C0JZgK47.js → UserRecord-D1BNmYp9.js} +10 -10
- package/dist/{UsersList-Bc8dCuRB.js → UsersList-ltx3G23-.js} +8 -8
- package/dist/access/index.js +1 -1
- package/dist/app/application.d.ts +13 -0
- package/dist/app/index.js +160 -159
- package/dist/collection/index.js +1 -1
- package/dist/control-CX9BG2UB.js +320 -0
- package/dist/describeError-B-NMa--w.js +53 -0
- package/dist/fieldMessages-DV6sESpn.js +25 -0
- package/dist/form/DateField.vue.d.ts +1 -0
- package/dist/form/DateTimeField.vue.d.ts +1 -0
- package/dist/form/Field.vue.d.ts +1 -0
- package/dist/form/FileField.vue.d.ts +1 -0
- 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 +1 -0
- package/dist/form/MoneyField.vue.d.ts +1 -0
- package/dist/form/MonthYearField.vue.d.ts +1 -0
- package/dist/form/NumberField.vue.d.ts +5 -0
- package/dist/form/PhotoField.vue.d.ts +1 -0
- package/dist/form/SelectField.vue.d.ts +5 -6
- package/dist/form/SwitchField.vue.d.ts +1 -0
- package/dist/form/TextField.vue.d.ts +1 -0
- package/dist/form/TextareaField.vue.d.ts +1 -0
- package/dist/form/TimeField.vue.d.ts +1 -0
- package/dist/form/field.d.ts +3 -0
- package/dist/form/index.d.ts +2 -0
- package/dist/form/index.js +469 -456
- 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 +19 -1
- package/dist/i18n/index.d.ts +2 -2
- package/dist/i18n/index.js +8 -6
- package/dist/identity/fieldMessages.d.ts +1 -1
- package/dist/identity/index.js +1 -1
- package/dist/{index-Cz4LtYKa.js → index-BCw_Ki6z.js} +2 -2
- package/dist/{index-BesWsiIg.js → index-Chh4z9xW.js} +10 -10
- package/dist/{index-BEDhdJQE.js → index-DwdVrW6q.js} +15 -15
- 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/resource/resource.d.ts +1 -1
- package/dist/{routeResource-DstM0hvf.js → routeResource-DlTsGTg_.js} +36 -32
- package/dist/state/index.js +1 -1
- package/dist/state/useLoad.d.ts +7 -0
- package/dist/{status-DfAac6vw.js → status-cWCAMAmW.js} +1 -1
- package/dist/{useCommand-BkONMn3X.js → useCommand-B-N6HJOz.js} +1 -1
- package/dist/useLoad-M7V-AVwR.js +43 -0
- package/dist/{useResourceForm-D1hIpwW5.js → useResourceForm-CP2lCwmD.js} +1 -1
- package/dist/useSaveChrome-7huA3FzR.js +26 -0
- package/package.json +1 -1
- 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/SelectField.vue_vue_type_script_setup_true_lang-BJoAkBo2.js +0 -437
- package/dist/control-7EP4tjYy.js +0 -313
- package/dist/describeError-Ctga6GcS.js +0 -41
- package/dist/fieldMessages-C3Rpbktw.js +0 -25
- package/dist/useLoad-CYRVx6HW.js +0 -39
- package/dist/useSaveChrome-DuWm0Czf.js +0 -25
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import { defineComponent as G, useModel as I, useTemplateRef as W, computed as w, ref as B, watch as F, openBlock as D, createBlock as $, mergeProps as A, unref as q, withCtx as E, createElementVNode as M, normalizeClass as O, createElementBlock as N, toDisplayString as C, createCommentVNode as S, mergeModels as P, mergeDefaults as j } from "vue";
|
|
2
|
+
import { b as z } from "./controlSurface-t7OEFESJ.js";
|
|
3
|
+
import { u as H } from "./format-B8mJm946.js";
|
|
4
|
+
import { a as T, c as J, _ as K, f as L, b as Q } from "./control-CX9BG2UB.js";
|
|
5
|
+
function U(r) {
|
|
6
|
+
const n = r.number(1234.5, { minimumFractionDigits: 1, maximumFractionDigits: 1, useGrouping: !0 }), e = /^\d(\D)\d/.exec(n)?.[1] ?? "";
|
|
7
|
+
return { decimal: n.charAt(n.length - 2) || ".", group: e === "." || e === "," ? e : "" };
|
|
8
|
+
}
|
|
9
|
+
function X(r, n) {
|
|
10
|
+
const e = r.trim().startsWith("-"), t = r.replace(/[^\d.,]/g, "");
|
|
11
|
+
if (t === "") return e ? void 0 : null;
|
|
12
|
+
const d = [...t].filter((a) => a === "." || a === ",");
|
|
13
|
+
let m = t, g = "";
|
|
14
|
+
if (n.decimals > 0 && d.length > 0) {
|
|
15
|
+
const a = Math.max(t.lastIndexOf("."), t.lastIndexOf(",")), f = t.charAt(a), p = t.slice(a + 1), s = t.includes(".") && t.includes(","), o = d.filter((y) => y === f).length > 1, k = !s && f === n.group && p.length === 3;
|
|
16
|
+
(s || !o && !k) && (m = t.slice(0, a), g = p);
|
|
17
|
+
}
|
|
18
|
+
const v = (a) => a.replace(/\D/g, ""), x = +`${v(m) || "0"}.${v(g) || "0"}`;
|
|
19
|
+
if (!Number.isFinite(x)) return;
|
|
20
|
+
const c = Number(x.toFixed(n.decimals));
|
|
21
|
+
return e ? -c || 0 : c;
|
|
22
|
+
}
|
|
23
|
+
const Y = {
|
|
24
|
+
key: 0,
|
|
25
|
+
class: "shrink-0 text-footnote text-content-muted"
|
|
26
|
+
}, Z = ["id", "value", "name", "placeholder", "disabled", "required", "aria-required", "aria-invalid", "aria-describedby"], ee = {
|
|
27
|
+
key: 1,
|
|
28
|
+
class: "shrink-0 text-footnote text-content-muted"
|
|
29
|
+
}, oe = /* @__PURE__ */ G({
|
|
30
|
+
__name: "NumberField",
|
|
31
|
+
props: /* @__PURE__ */ P(/* @__PURE__ */ j({
|
|
32
|
+
label: {},
|
|
33
|
+
labelHidden: { type: Boolean },
|
|
34
|
+
hint: {},
|
|
35
|
+
error: {},
|
|
36
|
+
required: { type: Boolean },
|
|
37
|
+
editable: { type: Boolean },
|
|
38
|
+
disabled: { type: Boolean },
|
|
39
|
+
lockedReason: {},
|
|
40
|
+
presentation: {},
|
|
41
|
+
name: {},
|
|
42
|
+
decimals: {},
|
|
43
|
+
negative: { type: Boolean },
|
|
44
|
+
grouping: { type: Boolean },
|
|
45
|
+
maxDigits: {},
|
|
46
|
+
placeholder: {},
|
|
47
|
+
prefix: {},
|
|
48
|
+
suffix: {},
|
|
49
|
+
width: {}
|
|
50
|
+
}, { ...Q, decimals: 0, negative: !1, grouping: !0, maxDigits: void 0, placeholder: void 0, prefix: void 0, suffix: void 0, width: "sm" }), {
|
|
51
|
+
modelValue: { default: null },
|
|
52
|
+
modelModifiers: {}
|
|
53
|
+
}),
|
|
54
|
+
emits: ["update:modelValue"],
|
|
55
|
+
setup(r, { expose: n }) {
|
|
56
|
+
const e = r, t = I(r, "modelValue"), d = H(), m = W("input"), g = !!T(), v = J("text", () => e.error ? "error" : e.disabled ? "locked" : "rest"), x = w(() => g ? z(e.width) : "w-full"), c = w(() => U(d)), a = (l) => l === null ? "" : d.number(l, { minimumFractionDigits: e.decimals, maximumFractionDigits: e.decimals, useGrouping: e.grouping }), f = (l) => l === null ? "" : String(l).replace(".", c.value.decimal), p = (l) => X(l, { decimals: e.decimals, group: e.grouping ? c.value.group : "" }), s = B(!1), o = B(a(t.value));
|
|
57
|
+
F(t, (l) => {
|
|
58
|
+
s.value ? p(o.value) !== l && (o.value = f(l)) : o.value = a(l);
|
|
59
|
+
}), F(() => [e.decimals, e.grouping, c.value.decimal], () => {
|
|
60
|
+
s.value || (o.value = a(t.value));
|
|
61
|
+
});
|
|
62
|
+
function k(l) {
|
|
63
|
+
const u = l.target;
|
|
64
|
+
let i = u.value.replace(/[^\d.,\-\s]/g, "");
|
|
65
|
+
e.negative ? i = i.replace(/(?!^)-/g, "") : i = i.replace(/-/g, "");
|
|
66
|
+
const _ = i.replace(/\D/g, "").length;
|
|
67
|
+
if (e.maxDigits !== void 0 && _ > e.maxDigits) {
|
|
68
|
+
if (i.length === o.value.length + 1) {
|
|
69
|
+
const b = Math.max(0, (u.selectionStart ?? i.length) - 1);
|
|
70
|
+
u.value = o.value, u.setSelectionRange(b, b);
|
|
71
|
+
return;
|
|
72
|
+
}
|
|
73
|
+
let R = 0;
|
|
74
|
+
i = [...i].filter((b) => !/\d/.test(b) || ++R <= e.maxDigits).join("");
|
|
75
|
+
}
|
|
76
|
+
i !== u.value && (u.value = i), o.value = i;
|
|
77
|
+
const h = p(i);
|
|
78
|
+
h !== void 0 ? t.value = h : t.value = null;
|
|
79
|
+
}
|
|
80
|
+
function y() {
|
|
81
|
+
s.value = !0, o.value = f(t.value);
|
|
82
|
+
}
|
|
83
|
+
function V() {
|
|
84
|
+
s.value = !1, o.value = a(t.value);
|
|
85
|
+
}
|
|
86
|
+
return n({ focus: () => m.value?.focus() }), (l, u) => (D(), $(K, A(q(L)(e), {
|
|
87
|
+
value: t.value === null ? null : a(t.value),
|
|
88
|
+
prefix: e.prefix,
|
|
89
|
+
suffix: e.suffix,
|
|
90
|
+
"value-style": "numeric"
|
|
91
|
+
}), {
|
|
92
|
+
default: E(({ id: i, describedby: _, invalid: h }) => [
|
|
93
|
+
M("div", {
|
|
94
|
+
class: O(["flex items-center gap-1.5", [q(v), x.value]])
|
|
95
|
+
}, [
|
|
96
|
+
e.prefix ? (D(), N("span", Y, C(e.prefix), 1)) : S("", !0),
|
|
97
|
+
M("input", {
|
|
98
|
+
id: i,
|
|
99
|
+
ref_key: "input",
|
|
100
|
+
ref: m,
|
|
101
|
+
value: o.value,
|
|
102
|
+
type: "text",
|
|
103
|
+
inputmode: "decimal",
|
|
104
|
+
autocomplete: "off",
|
|
105
|
+
name: e.name,
|
|
106
|
+
placeholder: e.placeholder,
|
|
107
|
+
disabled: e.disabled,
|
|
108
|
+
required: e.required,
|
|
109
|
+
"aria-required": e.required || void 0,
|
|
110
|
+
"aria-invalid": h || void 0,
|
|
111
|
+
"aria-describedby": _,
|
|
112
|
+
class: "block w-full min-w-0 border-0 bg-transparent px-0 py-1 text-right text-body tabular-nums text-content-strong placeholder:text-content-disabled focus:outline-none focus:ring-0 disabled:cursor-not-allowed",
|
|
113
|
+
onInput: k,
|
|
114
|
+
onFocus: y,
|
|
115
|
+
onBlur: V
|
|
116
|
+
}, null, 40, Z),
|
|
117
|
+
e.suffix ? (D(), N("span", ee, C(e.suffix), 1)) : S("", !0)
|
|
118
|
+
], 2)
|
|
119
|
+
]),
|
|
120
|
+
_: 1
|
|
121
|
+
}, 16, ["value", "prefix", "suffix"]));
|
|
122
|
+
}
|
|
123
|
+
});
|
|
124
|
+
export {
|
|
125
|
+
oe as _
|
|
126
|
+
};
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { defineComponent as A, watch as X, openBlock as v, createBlock as S, unref as e, withCtx as u, createVNode as r, mergeProps as E, useModel as pe, useId as fe, useTemplateRef as J, ref as w, onMounted as me, onBeforeUnmount as ve, computed as
|
|
1
|
+
import { defineComponent as A, watch as X, openBlock as v, createBlock as S, unref as e, withCtx as u, createVNode as r, mergeProps as E, useModel as pe, useId as fe, useTemplateRef as J, ref as w, onMounted as me, onBeforeUnmount as ve, computed as M, createElementBlock as I, withModifiers as _e, toDisplayString as b, createCommentVNode as W, createElementVNode as x, createTextVNode as N, Fragment as le, mergeModels as oe } from "vue";
|
|
2
2
|
import { useI18n as R } from "vue-i18n";
|
|
3
3
|
import { a as ge } from "./AdaptivePageShell.vue_vue_type_script_setup_true_lang-B7qSUiee.js";
|
|
4
4
|
import { u as L } from "./platform-q3cjODLx.js";
|
|
5
5
|
import { _ as Q } from "./AsyncSection.vue_vue_type_script_setup_true_lang-Blj6KgCr.js";
|
|
6
|
-
import { u as Y } from "./useLoad-
|
|
7
|
-
import { i as k, d as G } from "./index-
|
|
8
|
-
import { u as Z } from "./FormErrors.vue_vue_type_script_setup_true_lang-
|
|
9
|
-
import { _ as ee } from "./FormView.vue_vue_type_script_setup_true_lang-
|
|
10
|
-
import { _ as U } from "./TextField.vue_vue_type_script_setup_true_lang-
|
|
6
|
+
import { u as Y } from "./useLoad-M7V-AVwR.js";
|
|
7
|
+
import { i as k, d as G } from "./index-DwdVrW6q.js";
|
|
8
|
+
import { u as Z } from "./FormErrors.vue_vue_type_script_setup_true_lang-DWcVKZM3.js";
|
|
9
|
+
import { _ as ee } from "./FormView.vue_vue_type_script_setup_true_lang-BcIbTMHN.js";
|
|
10
|
+
import { _ as U } from "./TextField.vue_vue_type_script_setup_true_lang-nqnGG7Zc.js";
|
|
11
11
|
import { _ as H } from "./Panel.vue_vue_type_script_setup_true_lang-BA0u_DtS.js";
|
|
12
12
|
import { t as C } from "./toast-CqSDTWRX.js";
|
|
13
|
-
import { u as O } from "./fieldMessages-
|
|
13
|
+
import { u as O } from "./fieldMessages-DV6sESpn.js";
|
|
14
14
|
import { _ as re } from "./PanelActions.vue_vue_type_script_setup_true_lang-E9VdIGkf.js";
|
|
15
|
-
import { _ as
|
|
15
|
+
import { _ as B } from "./Button.vue_vue_type_script_setup_true_lang-CL9Qh5yq.js";
|
|
16
16
|
import { _ as ye } from "./KeyValue.vue_vue_type_script_setup_true_lang-wcZcvnow.js";
|
|
17
17
|
import { u as ie } from "./format-B8mJm946.js";
|
|
18
18
|
import { _ as we } from "./Banner.vue_vue_type_script_setup_true_lang-DSStj_5z.js";
|
|
@@ -21,7 +21,7 @@ import { a as be } from "./leaveGuard-Cc8yeLxM.js";
|
|
|
21
21
|
import { _ as xe } from "./Modal.vue_vue_type_script_setup_true_lang-DpBb8ans.js";
|
|
22
22
|
import { _ as he } from "./OtpInput.vue_vue_type_script_setup_true_lang-gp4FfWAH.js";
|
|
23
23
|
import { _ as $e } from "./AlertDialog.vue_vue_type_script_setup_true_lang-whA4WLdl.js";
|
|
24
|
-
import { _ as qe } from "./SessionList.vue_vue_type_script_setup_true_lang-
|
|
24
|
+
import { _ as qe } from "./SessionList.vue_vue_type_script_setup_true_lang-CirlMdHb.js";
|
|
25
25
|
import { _ as ke } from "./PageBar.vue_vue_type_script_setup_true_lang-B7qdEeej.js";
|
|
26
26
|
import { _ as Ce } from "./SignInTable.vue_vue_type_script_setup_true_lang-CIv34nRn.js";
|
|
27
27
|
import { _ as Se } from "./ViewTabs.vue_vue_type_script_setup_true_lang-BJIoZAlH.js";
|
|
@@ -115,10 +115,10 @@ const Pe = /* @__PURE__ */ A({
|
|
|
115
115
|
const t = q, s = pe(q, "modelValue"), i = m, { t: n } = R(), d = ie(), a = fe(), l = J("otp"), c = w(Date.now());
|
|
116
116
|
let g;
|
|
117
117
|
me(() => g = setInterval(() => c.value = Date.now(), 1e3)), ve(() => clearInterval(g));
|
|
118
|
-
const _ =
|
|
118
|
+
const _ = M(() => {
|
|
119
119
|
const $ = t.resendAvailableAt ? Date.parse(t.resendAvailableAt) : Number.NaN;
|
|
120
120
|
return Number.isNaN($) ? 0 : Math.max(0, Math.ceil(($ - c.value) / 1e3));
|
|
121
|
-
}), P =
|
|
121
|
+
}), P = M(() => `${Math.floor(_.value / 60)}:${String(_.value % 60).padStart(2, "0")}`), y = M(() => t.expiresAt && !t.expired ? d.time(t.expiresAt) : ""), h = M(() => s.value.length === t.length), z = M(() => t.verifying || t.resending);
|
|
122
122
|
function D($ = s.value) {
|
|
123
123
|
$.length === t.length && !z.value && !t.expired && i("verify", $);
|
|
124
124
|
}
|
|
@@ -127,18 +127,18 @@ const Pe = /* @__PURE__ */ A({
|
|
|
127
127
|
}
|
|
128
128
|
return X(() => t.error, ($) => {
|
|
129
129
|
$ && (s.value = "", l.value?.focus());
|
|
130
|
-
}), o({ focus: () => l.value?.focus() }), ($, V) => (v(),
|
|
130
|
+
}), o({ focus: () => l.value?.focus() }), ($, V) => (v(), I("form", {
|
|
131
131
|
class: "flex flex-col items-center text-center",
|
|
132
132
|
"data-verify-code": "",
|
|
133
133
|
novalidate: "",
|
|
134
|
-
onSubmit: V[2] || (V[2] = _e((
|
|
134
|
+
onSubmit: V[2] || (V[2] = _e((F) => D(), ["prevent"]))
|
|
135
135
|
}, [
|
|
136
|
-
t.description ? (v(),
|
|
136
|
+
t.description ? (v(), I("p", Ve, b(t.description), 1)) : W("", !0),
|
|
137
137
|
r(e(he), {
|
|
138
138
|
ref_key: "otp",
|
|
139
139
|
ref: l,
|
|
140
140
|
modelValue: s.value,
|
|
141
|
-
"onUpdate:modelValue": V[0] || (V[0] = (
|
|
141
|
+
"onUpdate:modelValue": V[0] || (V[0] = (F) => s.value = F),
|
|
142
142
|
class: "mt-6",
|
|
143
143
|
length: t.length,
|
|
144
144
|
invalid: !!t.error,
|
|
@@ -147,15 +147,15 @@ const Pe = /* @__PURE__ */ A({
|
|
|
147
147
|
autofocus: "",
|
|
148
148
|
onComplete: D
|
|
149
149
|
}, null, 8, ["modelValue", "length", "invalid", "disabled", "described-by"]),
|
|
150
|
-
t.error ? (v(),
|
|
150
|
+
t.error ? (v(), I("p", {
|
|
151
151
|
key: 1,
|
|
152
152
|
id: e(a),
|
|
153
153
|
role: "alert",
|
|
154
154
|
class: "mt-3 text-footnote text-content-destructive",
|
|
155
155
|
"data-verify-error": ""
|
|
156
|
-
}, b(t.error), 9, Ee)) : y.value ? (v(),
|
|
156
|
+
}, b(t.error), 9, Ee)) : y.value ? (v(), I("p", Ne, b(e(n)("core.profile.email.valid_until", { time: y.value })), 1)) : W("", !0),
|
|
157
157
|
x("div", Ue, [
|
|
158
|
-
t.expired ? W("", !0) : (v(), S(e(
|
|
158
|
+
t.expired ? W("", !0) : (v(), S(e(B), {
|
|
159
159
|
key: 0,
|
|
160
160
|
type: "submit",
|
|
161
161
|
prominence: "primary",
|
|
@@ -170,7 +170,7 @@ const Pe = /* @__PURE__ */ A({
|
|
|
170
170
|
]),
|
|
171
171
|
_: 1
|
|
172
172
|
}, 8, ["disabled", "processing"])),
|
|
173
|
-
r(e(
|
|
173
|
+
r(e(B), {
|
|
174
174
|
prominence: t.expired ? "primary" : "standard",
|
|
175
175
|
size: "lg",
|
|
176
176
|
class: "w-full justify-center",
|
|
@@ -180,20 +180,20 @@ const Pe = /* @__PURE__ */ A({
|
|
|
180
180
|
onClick: j
|
|
181
181
|
}, {
|
|
182
182
|
default: u(() => [
|
|
183
|
-
_.value > 0 ? (v(),
|
|
183
|
+
_.value > 0 ? (v(), I(le, { key: 0 }, [
|
|
184
184
|
N(b(e(n)("core.profile.email.resend_in", { time: P.value })), 1)
|
|
185
|
-
], 64)) : (v(),
|
|
185
|
+
], 64)) : (v(), I(le, { key: 1 }, [
|
|
186
186
|
N(b(t.expired ? e(n)("core.profile.email.request_new") : e(n)("core.profile.email.resend")), 1)
|
|
187
187
|
], 64))
|
|
188
188
|
]),
|
|
189
189
|
_: 1
|
|
190
190
|
}, 8, ["prominence", "disabled", "processing"]),
|
|
191
|
-
r(e(
|
|
191
|
+
r(e(B), {
|
|
192
192
|
prominence: "link",
|
|
193
193
|
class: "mt-1 self-center",
|
|
194
194
|
disabled: t.verifying,
|
|
195
195
|
"data-verify-cancel": "",
|
|
196
|
-
onClick: V[1] || (V[1] = (
|
|
196
|
+
onClick: V[1] || (V[1] = (F) => i("cancel"))
|
|
197
197
|
}, {
|
|
198
198
|
default: u(() => [
|
|
199
199
|
N(b(e(n)("core.profile.email.cancel_change")), 1)
|
|
@@ -206,7 +206,7 @@ const Pe = /* @__PURE__ */ A({
|
|
|
206
206
|
}), Re = { class: "text-body text-content-muted" }, De = {
|
|
207
207
|
key: 1,
|
|
208
208
|
class: "px-2 py-4 sm:px-6"
|
|
209
|
-
},
|
|
209
|
+
}, Fe = /* @__PURE__ */ A({
|
|
210
210
|
__name: "EmailChangeDialog",
|
|
211
211
|
emits: ["pending", "changed", "cancelled"],
|
|
212
212
|
setup(q, { expose: o, emit: m }) {
|
|
@@ -216,15 +216,15 @@ const Pe = /* @__PURE__ */ A({
|
|
|
216
216
|
return ae.length > 0 ? { success: !1, error: { issues: ae } } : { success: !0, data: { email: f.trim(), current_password: T } };
|
|
217
217
|
}
|
|
218
218
|
}, serverField: (p) => p === "current_password" ? "password" : p }), { confirmDiscard: P } = be(() => c.value && a.value === "request" && _.dirty.value), y = w(""), h = w(""), z = w(!1), D = w(!1), j = w(!1), $ = w(!1), V = ["identity.code.expired", "identity.code.too_many_attempts", "identity.code.no_pending"];
|
|
219
|
-
function
|
|
219
|
+
function F() {
|
|
220
220
|
y.value = "", h.value = "", z.value = !1;
|
|
221
221
|
}
|
|
222
222
|
function ne(p) {
|
|
223
|
-
l.value = p, a.value = p ? "verify" : "request", _.hydrate({ email: "", password: "" }),
|
|
223
|
+
l.value = p, a.value = p ? "verify" : "request", _.hydrate({ email: "", password: "" }), F(), d.value?.present();
|
|
224
224
|
}
|
|
225
225
|
async function te() {
|
|
226
226
|
const p = await _.submit(async (f) => (await i.request(k.profileRequestEmail, f)).data);
|
|
227
|
-
p.status === "saved" && (l.value = p.value,
|
|
227
|
+
p.status === "saved" && (l.value = p.value, F(), a.value = "verify", t("pending", p.value));
|
|
228
228
|
}
|
|
229
229
|
async function de(p) {
|
|
230
230
|
if (!D.value) {
|
|
@@ -235,7 +235,7 @@ const Pe = /* @__PURE__ */ A({
|
|
|
235
235
|
} catch (f) {
|
|
236
236
|
if (G(f)) return;
|
|
237
237
|
if (K(f) && f.fields.email?.[0]) {
|
|
238
|
-
l.value = null, t("pending", null), a.value = "request", _.errors.set({ email: [n.
|
|
238
|
+
l.value = null, t("pending", null), a.value = "request", _.errors.set({ email: [n.describeFieldError(f.fields.email[0])] });
|
|
239
239
|
return;
|
|
240
240
|
}
|
|
241
241
|
z.value = K(f) && f.code !== null && V.includes(f.code), h.value = n.sentence(f, s("core.profile.email.verify_failed"));
|
|
@@ -248,7 +248,7 @@ const Pe = /* @__PURE__ */ A({
|
|
|
248
248
|
if (!j.value) {
|
|
249
249
|
j.value = !0;
|
|
250
250
|
try {
|
|
251
|
-
l.value = (await i.request(k.profileResendEmail)).data,
|
|
251
|
+
l.value = (await i.request(k.profileResendEmail)).data, F(), t("pending", l.value), C.success(s("core.profile.email.code_sent", { email: l.value.email }));
|
|
252
252
|
} catch (p) {
|
|
253
253
|
if (G(p)) return;
|
|
254
254
|
if (K(p) && p.code === "identity.code.no_pending") {
|
|
@@ -308,7 +308,7 @@ const Pe = /* @__PURE__ */ A({
|
|
|
308
308
|
}), null, 16, ["label"])
|
|
309
309
|
]),
|
|
310
310
|
_: 1
|
|
311
|
-
}, 8, ["form"])) : (v(),
|
|
311
|
+
}, 8, ["form"])) : (v(), I("div", De, [
|
|
312
312
|
r(Ae, {
|
|
313
313
|
modelValue: y.value,
|
|
314
314
|
"onUpdate:modelValue": f[0] || (f[0] = (T) => y.value = T),
|
|
@@ -328,14 +328,14 @@ const Pe = /* @__PURE__ */ A({
|
|
|
328
328
|
_: 1
|
|
329
329
|
}, 8, ["title", "primary-label", "without-footer", "status", "before-dismiss"]));
|
|
330
330
|
}
|
|
331
|
-
}),
|
|
331
|
+
}), Ie = { class: "flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between" }, Me = { class: "text-footnote" }, Be = { class: "mt-2 flex flex-wrap gap-2" }, Le = /* @__PURE__ */ A({
|
|
332
332
|
__name: "EmailPanel",
|
|
333
333
|
props: {
|
|
334
334
|
profile: {}
|
|
335
335
|
},
|
|
336
336
|
emits: ["updated"],
|
|
337
337
|
setup(q, { emit: o }) {
|
|
338
|
-
const m = q, t = o, { t: s } = R(), { http: i } = L(), n = ie(), d = O(), a = J("dialog"), l = w(!1), c =
|
|
338
|
+
const m = q, t = o, { t: s } = R(), { http: i } = L(), n = ie(), d = O(), a = J("dialog"), l = w(!1), c = M(() => m.profile.pending_email), g = (P) => t("updated", { ...m.profile, pending_email: P });
|
|
339
339
|
async function _() {
|
|
340
340
|
if (!l.value) {
|
|
341
341
|
l.value = !0;
|
|
@@ -354,7 +354,7 @@ const Pe = /* @__PURE__ */ A({
|
|
|
354
354
|
"data-profile-email": ""
|
|
355
355
|
}, {
|
|
356
356
|
default: u(() => [
|
|
357
|
-
x("div",
|
|
357
|
+
x("div", Ie, [
|
|
358
358
|
x("dl", null, [
|
|
359
359
|
r(e(ye), {
|
|
360
360
|
label: e(s)("core.profile.email.current"),
|
|
@@ -362,7 +362,7 @@ const Pe = /* @__PURE__ */ A({
|
|
|
362
362
|
"data-profile-email-current": ""
|
|
363
363
|
}, null, 8, ["label", "value"])
|
|
364
364
|
]),
|
|
365
|
-
r(e(
|
|
365
|
+
r(e(B), {
|
|
366
366
|
icon: "mailUnreadFill",
|
|
367
367
|
"data-email-change": "",
|
|
368
368
|
onClick: y[0] || (y[0] = (h) => a.value?.present(null))
|
|
@@ -381,9 +381,9 @@ const Pe = /* @__PURE__ */ A({
|
|
|
381
381
|
}, {
|
|
382
382
|
default: u(() => [
|
|
383
383
|
x("p", null, b(e(s)("core.profile.email.pending", { email: c.value.email })), 1),
|
|
384
|
-
x("p",
|
|
385
|
-
x("div",
|
|
386
|
-
r(e(
|
|
384
|
+
x("p", Me, b(e(s)("core.profile.email.valid_until", { time: e(n).time(c.value.expires_at) })), 1),
|
|
385
|
+
x("div", Be, [
|
|
386
|
+
r(e(B), {
|
|
387
387
|
size: "sm",
|
|
388
388
|
prominence: "primary",
|
|
389
389
|
"data-email-enter-code": "",
|
|
@@ -394,7 +394,7 @@ const Pe = /* @__PURE__ */ A({
|
|
|
394
394
|
]),
|
|
395
395
|
_: 1
|
|
396
396
|
}),
|
|
397
|
-
r(e(
|
|
397
|
+
r(e(B), {
|
|
398
398
|
size: "sm",
|
|
399
399
|
processing: l.value,
|
|
400
400
|
"data-email-cancel": "",
|
|
@@ -409,7 +409,7 @@ const Pe = /* @__PURE__ */ A({
|
|
|
409
409
|
]),
|
|
410
410
|
_: 1
|
|
411
411
|
})) : W("", !0),
|
|
412
|
-
r(
|
|
412
|
+
r(Fe, {
|
|
413
413
|
ref_key: "dialog",
|
|
414
414
|
ref: a,
|
|
415
415
|
onPending: g,
|
|
@@ -481,7 +481,7 @@ const Pe = /* @__PURE__ */ A({
|
|
|
481
481
|
autocomplete: "new-password"
|
|
482
482
|
}), null, 16, ["type", "label"]),
|
|
483
483
|
x("div", ze, [
|
|
484
|
-
r(e(
|
|
484
|
+
r(e(B), E({
|
|
485
485
|
prominence: "link",
|
|
486
486
|
size: "sm",
|
|
487
487
|
icon: t.value ? "eyeOff" : "eye"
|
|
@@ -505,7 +505,7 @@ const Pe = /* @__PURE__ */ A({
|
|
|
505
505
|
}), Te = { class: "p-3" }, Ge = /* @__PURE__ */ A({
|
|
506
506
|
__name: "SessionsPanel",
|
|
507
507
|
setup(q) {
|
|
508
|
-
const { t: o } = R(), { http: m } = L(), t = O(), s = Y(async ({ signal: l }) => (await m.request(k.profileSessions, void 0, { signal: l })).data), i =
|
|
508
|
+
const { t: o } = R(), { http: m } = L(), t = O(), s = Y(async ({ signal: l }) => (await m.request(k.profileSessions, void 0, { signal: l })).data), i = M(() => s.data.value?.sessions ?? []), n = J("dialog"), d = w(null);
|
|
509
509
|
async function a(l) {
|
|
510
510
|
try {
|
|
511
511
|
await m.request(k.profileRevokeSession, { session_id: l.id }), C.success(o("core.account.sessions.ended"));
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import { defineComponent as I, computed as
|
|
1
|
+
import { defineComponent as I, computed as h, ref as M, openBlock as l, createElementBlock as v, createElementVNode as w, unref as t, Fragment as B, renderList as N, normalizeClass as K, toDisplayString as d, createVNode as V, withCtx as p, createTextVNode as y, createCommentVNode as $, createBlock as _, createSlots as X, watch as Y, mergeProps as F } from "vue";
|
|
2
2
|
import { useI18n as Q } from "vue-i18n";
|
|
3
|
-
import { u as Z } from "./FormErrors.vue_vue_type_script_setup_true_lang-
|
|
4
|
-
import { _ as
|
|
5
|
-
import { _ as ee } from "./FormView.vue_vue_type_script_setup_true_lang-
|
|
6
|
-
import { _ as te } from "./TextareaField.vue_vue_type_script_setup_true_lang-
|
|
7
|
-
import { _ as se } from "./TextField.vue_vue_type_script_setup_true_lang-
|
|
8
|
-
import { u as ae } from "./useSaveChrome-
|
|
3
|
+
import { u as Z } from "./FormErrors.vue_vue_type_script_setup_true_lang-DWcVKZM3.js";
|
|
4
|
+
import { _ as W } from "./FormGroup.vue_vue_type_script_setup_true_lang-noYI9QMk.js";
|
|
5
|
+
import { _ as ee } from "./FormView.vue_vue_type_script_setup_true_lang-BcIbTMHN.js";
|
|
6
|
+
import { _ as te } from "./TextareaField.vue_vue_type_script_setup_true_lang-BgIQyYtf.js";
|
|
7
|
+
import { _ as se } from "./TextField.vue_vue_type_script_setup_true_lang-nqnGG7Zc.js";
|
|
8
|
+
import { u as ae } from "./useSaveChrome-7huA3FzR.js";
|
|
9
9
|
import { t as oe } from "./toast-CqSDTWRX.js";
|
|
10
10
|
import { _ as S } from "./Badge.vue_vue_type_script_setup_true_lang-DJyZc0C7.js";
|
|
11
11
|
import { _ as E } from "./Banner.vue_vue_type_script_setup_true_lang-DSStj_5z.js";
|
|
12
|
-
import { d as
|
|
12
|
+
import { d as G, u as J, p as ne, o as R, r as D, g as H, s as le, e as re, a as ie, f as ce, b as ue, h as de } from "./index-Chh4z9xW.js";
|
|
13
13
|
import { _ as me } from "./Button.vue_vue_type_script_setup_true_lang-CL9Qh5yq.js";
|
|
14
14
|
import { _ as fe } from "./Tabs.vue_vue_type_script_setup_true_lang-CcMcE38r.js";
|
|
15
|
-
import { _ as pe } from "./SegmentedField.vue_vue_type_script_setup_true_lang-
|
|
16
|
-
import { _ as _e } from "./SwitchField.vue_vue_type_script_setup_true_lang-
|
|
15
|
+
import { _ as pe } from "./SegmentedField.vue_vue_type_script_setup_true_lang-B2d55hrh.js";
|
|
16
|
+
import { _ as _e } from "./SwitchField.vue_vue_type_script_setup_true_lang-B2Z2hy_h.js";
|
|
17
17
|
import { u as ge } from "./platform-q3cjODLx.js";
|
|
18
18
|
const ve = {
|
|
19
19
|
class: "flex min-w-0 flex-col gap-4 lg:grid lg:grid-cols-[15rem_minmax(0,1fr)] lg:items-start lg:gap-8",
|
|
20
20
|
"data-test": "permission-tree"
|
|
21
|
-
}, be = ["aria-label"],
|
|
21
|
+
}, be = ["aria-label"], he = ["data-test", "aria-current", "onClick"], ye = { class: "min-w-0 flex-1 truncate" }, ke = ["data-test"], xe = ["data-test"], we = { class: "flex min-w-0 items-center justify-between gap-3 px-row-inset" }, $e = { class: "min-w-0 flex-1 text-title3 font-semibold text-content-strong" }, Oe = { class: "text-footnote tabular-nums text-content-muted" }, Le = {
|
|
22
22
|
key: 0,
|
|
23
23
|
class: "contents",
|
|
24
24
|
"data-test": "tree-toggle-all"
|
|
@@ -29,21 +29,21 @@ const ve = {
|
|
|
29
29
|
readonly: { type: Boolean }
|
|
30
30
|
},
|
|
31
31
|
setup(U) {
|
|
32
|
-
const i = U, { t: g } = Q(), { catalogue: a } =
|
|
32
|
+
const i = U, { t: g } = Q(), { catalogue: a } = G(), m = J(), r = h(() => ne(a)), b = M(r.value[0]?.key ?? ""), f = h(() => r.value.find((e) => e.key === b.value) ?? r.value[0]), j = (e) => Object.entries(a).filter(([, s]) => re(s) === e).map(([s]) => s), O = (e) => {
|
|
33
33
|
const s = j(e);
|
|
34
34
|
return { granted: s.filter((o) => o in i.grants).length, total: s.length };
|
|
35
|
-
}, k = (e) => `${O(e).granted} / ${O(e).total}`, T =
|
|
36
|
-
function
|
|
35
|
+
}, k = (e) => `${O(e).granted} / ${O(e).total}`, T = h(() => r.value.map((e) => ({ value: e.key, label: m.groupLabel(e.key), badge: k(e.key) }))), u = h(() => f.value !== void 0 && O(f.value.key).granted === O(f.value.key).total);
|
|
36
|
+
function C() {
|
|
37
37
|
if (f.value)
|
|
38
38
|
for (const e of j(f.value.key))
|
|
39
39
|
u.value ? D(a, i.grants, e) : H(a, i.grants, e);
|
|
40
40
|
}
|
|
41
|
-
const z = (e) => [...new Set(e.permissions.map((s) => s.ownable).filter((s) => s !== null))], x =
|
|
41
|
+
const z = (e) => [...new Set(e.permissions.map((s) => s.ownable).filter((s) => s !== null))], x = h(() => ["own", "own_location", "all"].map((e) => ({ value: e, label: m.qualifierLabel(e) })));
|
|
42
42
|
function A(e, s) {
|
|
43
43
|
const o = R(a, i.grants, s) ?? "own", n = e.permissions.some((L) => L.ownable === s && L.unownedIsOwn);
|
|
44
44
|
return [m.qualifierHint(o), o === "own" && n ? g("core.access.unowned") : ""].filter(Boolean).join(" · ");
|
|
45
45
|
}
|
|
46
|
-
function
|
|
46
|
+
function q(e) {
|
|
47
47
|
const s = e.requires.map((o) => m.permissionLabel(o)).join(", ");
|
|
48
48
|
return [m.permissionDescription(e.id), s ? g("core.access.requires", { names: s }) : ""].filter(Boolean).join(" ");
|
|
49
49
|
}
|
|
@@ -62,12 +62,12 @@ const ve = {
|
|
|
62
62
|
class: K(["flex h-9 items-center justify-between gap-3 rounded-control px-3 text-left text-body transition-colors duration-motion-fast hover:bg-fill focus-visible:outline-2 focus-visible:outline-border-focus", b.value === o.key ? "bg-tint-soft font-semibold text-content-strong" : "text-content"]),
|
|
63
63
|
onClick: (n) => b.value = o.key
|
|
64
64
|
}, [
|
|
65
|
-
w("span",
|
|
65
|
+
w("span", ye, d(t(m).groupLabel(o.key)), 1),
|
|
66
66
|
w("span", {
|
|
67
67
|
class: "text-footnote tabular-nums text-content-muted",
|
|
68
68
|
"data-test": `tree-count-${o.key}`
|
|
69
69
|
}, d(k(o.key)), 9, ke)
|
|
70
|
-
], 10,
|
|
70
|
+
], 10, he))), 128))
|
|
71
71
|
], 8, be),
|
|
72
72
|
V(t(fe), {
|
|
73
73
|
modelValue: b.value,
|
|
@@ -88,16 +88,16 @@ const ve = {
|
|
|
88
88
|
V(t(me), {
|
|
89
89
|
prominence: "secondary",
|
|
90
90
|
size: "sm",
|
|
91
|
-
onClick:
|
|
91
|
+
onClick: C
|
|
92
92
|
}, {
|
|
93
93
|
default: p(() => [
|
|
94
|
-
|
|
94
|
+
y(d(u.value ? t(g)("core.access.turn_off_all") : t(g)("core.access.turn_on_all")), 1)
|
|
95
95
|
]),
|
|
96
96
|
_: 1
|
|
97
97
|
})
|
|
98
98
|
]))
|
|
99
99
|
]),
|
|
100
|
-
(l(!0), v(B, null, N(f.value.screens, (o) => (l(), _(t(
|
|
100
|
+
(l(!0), v(B, null, N(f.value.screens, (o) => (l(), _(t(W), {
|
|
101
101
|
key: o.key,
|
|
102
102
|
header: t(m).screenLabel(o.key)
|
|
103
103
|
}, {
|
|
@@ -114,7 +114,7 @@ const ve = {
|
|
|
114
114
|
(l(!0), v(B, null, N(o.permissions, (n) => (l(), _(t(_e), {
|
|
115
115
|
key: n.id,
|
|
116
116
|
label: t(m).permissionLabel(n.id),
|
|
117
|
-
hint:
|
|
117
|
+
hint: q(n),
|
|
118
118
|
"model-value": n.id in i.grants,
|
|
119
119
|
disabled: i.readonly,
|
|
120
120
|
"onUpdate:modelValue": (L) => c(n.id, !!L)
|
|
@@ -127,7 +127,7 @@ const ve = {
|
|
|
127
127
|
tone: "warning"
|
|
128
128
|
}, {
|
|
129
129
|
default: p(() => [
|
|
130
|
-
|
|
130
|
+
y(d(t(g)("core.access.sensitive")), 1)
|
|
131
131
|
]),
|
|
132
132
|
_: 1
|
|
133
133
|
})) : $("", !0),
|
|
@@ -136,7 +136,7 @@ const ve = {
|
|
|
136
136
|
tone: "neutral"
|
|
137
137
|
}, {
|
|
138
138
|
default: p(() => [
|
|
139
|
-
|
|
139
|
+
y(d(t(g)("core.access.system")), 1)
|
|
140
140
|
]),
|
|
141
141
|
_: 1
|
|
142
142
|
})) : n.organizationOnly ? (l(), _(t(S), {
|
|
@@ -144,7 +144,7 @@ const ve = {
|
|
|
144
144
|
tone: "info"
|
|
145
145
|
}, {
|
|
146
146
|
default: p(() => [
|
|
147
|
-
|
|
147
|
+
y(d(t(g)("core.access.organization_only")), 1)
|
|
148
148
|
]),
|
|
149
149
|
_: 1
|
|
150
150
|
})) : $("", !0)
|
|
@@ -161,11 +161,11 @@ const ve = {
|
|
|
161
161
|
}), je = {
|
|
162
162
|
class: "flex min-w-0 flex-col gap-group-gap",
|
|
163
163
|
"data-test": "role-editor"
|
|
164
|
-
},
|
|
164
|
+
}, Ce = {
|
|
165
165
|
key: 0,
|
|
166
166
|
class: "flex flex-wrap gap-1.5 px-row-inset py-2",
|
|
167
167
|
"data-test": "role-attrs"
|
|
168
|
-
},
|
|
168
|
+
}, We = /* @__PURE__ */ I({
|
|
169
169
|
__name: "RoleEditor",
|
|
170
170
|
props: {
|
|
171
171
|
role: {},
|
|
@@ -173,7 +173,7 @@ const ve = {
|
|
|
173
173
|
},
|
|
174
174
|
emits: ["saved"],
|
|
175
175
|
setup(U, { expose: i, emit: g }) {
|
|
176
|
-
const a = U, m = g, { t: r } = Q(), b = J(), { catalogue: f } =
|
|
176
|
+
const a = U, m = g, { t: r } = Q(), b = J(), { catalogue: f } = G(), j = ie(), { access: O } = ge(), k = (c, e) => {
|
|
177
177
|
const s = c ?? e ?? null;
|
|
178
178
|
return {
|
|
179
179
|
name: c ? c.name : e ? r("core.access.copy_name", { name: b.roleName(e) }) : "",
|
|
@@ -193,15 +193,15 @@ const ve = {
|
|
|
193
193
|
}
|
|
194
194
|
},
|
|
195
195
|
failureMessage: ce()
|
|
196
|
-
}),
|
|
196
|
+
}), C = M([]);
|
|
197
197
|
function z() {
|
|
198
|
-
u.hydrate(k(a.role, a.source)),
|
|
198
|
+
u.hydrate(k(a.role, a.source)), C.value = de(f, u.values.grants);
|
|
199
199
|
}
|
|
200
200
|
z(), Y(() => [a.role, a.source], z);
|
|
201
|
-
const x =
|
|
202
|
-
() =>
|
|
201
|
+
const x = h(() => a.role !== null && (a.role.predefined || a.role.computed) || !O.can(ue.manageRoles)), A = h(
|
|
202
|
+
() => C.value.length === 0 || x.value ? "" : r("core.access.completed", { names: C.value.map((c) => b.permissionLabel(c)).join(", ") })
|
|
203
203
|
);
|
|
204
|
-
async function
|
|
204
|
+
async function q() {
|
|
205
205
|
if (x.value) return;
|
|
206
206
|
const c = await u.submit(
|
|
207
207
|
(e) => {
|
|
@@ -218,11 +218,11 @@ const ve = {
|
|
|
218
218
|
);
|
|
219
219
|
(c.status === "saved" || c.status === "saved-refresh-failed") && (oe.success(r("core.access.saved")), m("saved", c.value));
|
|
220
220
|
}
|
|
221
|
-
ae({ form: u, label: () => r("core.access.save"), allowed: () => !x.value, save: () => void
|
|
222
|
-
const P =
|
|
223
|
-
return i({ form: u, save:
|
|
221
|
+
ae({ form: u, label: () => r("core.access.save"), allowed: () => !x.value, disabledWhileClean: () => a.role !== null, save: () => void q(), cancel: () => u.reset() });
|
|
222
|
+
const P = h(() => (a.role ?? a.source)?.attrs ?? []);
|
|
223
|
+
return i({ form: u, save: q }), (c, e) => (l(), _(t(ee), {
|
|
224
224
|
form: t(u),
|
|
225
|
-
onSubmit:
|
|
225
|
+
onSubmit: q
|
|
226
226
|
}, {
|
|
227
227
|
default: p(() => [
|
|
228
228
|
w("div", je, [
|
|
@@ -232,7 +232,7 @@ const ve = {
|
|
|
232
232
|
"data-test": "role-computed-note"
|
|
233
233
|
}, {
|
|
234
234
|
default: p(() => [
|
|
235
|
-
|
|
235
|
+
y(d(t(r)("core.access.notes.computed")), 1)
|
|
236
236
|
]),
|
|
237
237
|
_: 1
|
|
238
238
|
})) : a.role?.predefined ? (l(), _(t(E), {
|
|
@@ -241,7 +241,7 @@ const ve = {
|
|
|
241
241
|
"data-test": "role-predefined-note"
|
|
242
242
|
}, {
|
|
243
243
|
default: p(() => [
|
|
244
|
-
|
|
244
|
+
y(d(t(r)("core.access.notes.predefined")), 1)
|
|
245
245
|
]),
|
|
246
246
|
_: 1
|
|
247
247
|
})) : $("", !0),
|
|
@@ -251,11 +251,11 @@ const ve = {
|
|
|
251
251
|
"data-test": "role-completed-note"
|
|
252
252
|
}, {
|
|
253
253
|
default: p(() => [
|
|
254
|
-
|
|
254
|
+
y(d(A.value), 1)
|
|
255
255
|
]),
|
|
256
256
|
_: 1
|
|
257
257
|
})) : $("", !0),
|
|
258
|
-
V(t(
|
|
258
|
+
V(t(W), {
|
|
259
259
|
header: t(r)("core.access.groups.role"),
|
|
260
260
|
editable: !x.value,
|
|
261
261
|
"label-width": "12rem"
|
|
@@ -271,13 +271,13 @@ const ve = {
|
|
|
271
271
|
rows: 2,
|
|
272
272
|
"max-length": 255
|
|
273
273
|
}), null, 16, ["label"]),
|
|
274
|
-
P.value.length ? (l(), v("div",
|
|
274
|
+
P.value.length ? (l(), v("div", Ce, [
|
|
275
275
|
(l(!0), v(B, null, N(P.value, (s) => (l(), _(t(S), {
|
|
276
276
|
key: s.attribute,
|
|
277
277
|
tone: "neutral"
|
|
278
278
|
}, {
|
|
279
279
|
default: p(() => [
|
|
280
|
-
|
|
280
|
+
y(d(s.attribute) + ": " + d(s.values.join(", ")), 1)
|
|
281
281
|
]),
|
|
282
282
|
_: 2
|
|
283
283
|
}, 1024))), 128))
|
|
@@ -296,5 +296,5 @@ const ve = {
|
|
|
296
296
|
}
|
|
297
297
|
});
|
|
298
298
|
export {
|
|
299
|
-
|
|
299
|
+
We as _
|
|
300
300
|
};
|