@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
|
@@ -2,18 +2,18 @@ import { defineComponent as R, computed as N, openBlock as i, createElementBlock
|
|
|
2
2
|
import { useI18n as V } from "vue-i18n";
|
|
3
3
|
import { RouterLink as B } from "vue-router";
|
|
4
4
|
import { u as E } from "./format-B8mJm946.js";
|
|
5
|
-
import { u as T } from "./useResourceForm-
|
|
6
|
-
import { _ as h } from "./FormGroup.vue_vue_type_script_setup_true_lang-
|
|
7
|
-
import { _ as F } from "./FormView.vue_vue_type_script_setup_true_lang-
|
|
8
|
-
import { _ as L } from "./SelectField.vue_vue_type_script_setup_true_lang-
|
|
9
|
-
import { _ as f } from "./TextField.vue_vue_type_script_setup_true_lang-
|
|
10
|
-
import { u as A } from "./useSaveChrome-
|
|
11
|
-
import { P as D, b as G, i as I } from "./index-
|
|
5
|
+
import { u as T } from "./useResourceForm-CP2lCwmD.js";
|
|
6
|
+
import { _ as h } from "./FormGroup.vue_vue_type_script_setup_true_lang-BokxZ7LU.js";
|
|
7
|
+
import { _ as F } from "./FormView.vue_vue_type_script_setup_true_lang-Dz5TZt92.js";
|
|
8
|
+
import { _ as L } from "./SelectField.vue_vue_type_script_setup_true_lang-C1Flb1hA.js";
|
|
9
|
+
import { _ as f } from "./TextField.vue_vue_type_script_setup_true_lang-D3-R5XXG.js";
|
|
10
|
+
import { u as A } from "./useSaveChrome-7huA3FzR.js";
|
|
11
|
+
import { P as D, b as G, i as I } from "./index-Bq96L43f.js";
|
|
12
12
|
import { t as M } from "./toast-CqSDTWRX.js";
|
|
13
13
|
import { u as O } from "./platform-q3cjODLx.js";
|
|
14
|
-
import { b as U } from "./routeResource-
|
|
15
|
-
import { u as j } from "./fieldMessages-
|
|
16
|
-
import { _ as $ } from "./ActionRow.vue_vue_type_script_setup_true_lang-
|
|
14
|
+
import { b as U } from "./routeResource-DlTsGTg_.js";
|
|
15
|
+
import { u as j } from "./fieldMessages-DV6sESpn.js";
|
|
16
|
+
import { _ as $ } from "./ActionRow.vue_vue_type_script_setup_true_lang-DOjn7fqy.js";
|
|
17
17
|
import { _ as z } from "./SectionIntro.vue_vue_type_script_setup_true_lang-CZtPrmXD.js";
|
|
18
18
|
import { u as H } from "./languages-BShG9LpE.js";
|
|
19
19
|
const J = {
|
|
@@ -3,9 +3,9 @@ import { useI18n as v } from "vue-i18n";
|
|
|
3
3
|
import { useRoute as k, useRouter as R } from "vue-router";
|
|
4
4
|
import { a as $ } from "./AdaptivePageShell.vue_vue_type_script_setup_true_lang-B7qSUiee.js";
|
|
5
5
|
import { _ as b } from "./AsyncSection.vue_vue_type_script_setup_true_lang-Blj6KgCr.js";
|
|
6
|
-
import { u as g } from "./useLoad-
|
|
7
|
-
import { a as x, c as u } from "./index-
|
|
8
|
-
import { _ as P } from "./RoleEditor.vue_vue_type_script_setup_true_lang-
|
|
6
|
+
import { u as g } from "./useLoad-M7V-AVwR.js";
|
|
7
|
+
import { a as x, c as u } from "./index-yKIOaisE.js";
|
|
8
|
+
import { _ as P } from "./RoleEditor.vue_vue_type_script_setup_true_lang-Ce6wjptT.js";
|
|
9
9
|
const V = /* @__PURE__ */ _({
|
|
10
10
|
__name: "NewRolePage",
|
|
11
11
|
setup(h) {
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
import { defineComponent as W, useModel as A, useTemplateRef as E, computed as B, ref as $, watch as M, openBlock as F, createBlock as O, mergeProps as P, unref as q, createSlots as j, withCtx as k, createElementVNode as N, normalizeClass as S, createElementBlock as C, toDisplayString as V, createCommentVNode as R, renderSlot as _, mergeModels as z, mergeDefaults as H } from "vue";
|
|
2
|
+
import { b as J } from "./controlSurface-t7OEFESJ.js";
|
|
3
|
+
import { u as K } from "./format-B8mJm946.js";
|
|
4
|
+
import { a as L, c as Q, _ as U, f as X, b as Y } from "./control-B_Nwtmag.js";
|
|
5
|
+
function Z(s) {
|
|
6
|
+
const n = s.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 ee(s, n) {
|
|
10
|
+
const e = s.trim().startsWith("-"), t = s.replace(/[^\d.,]/g, "");
|
|
11
|
+
if (t === "") return e ? void 0 : null;
|
|
12
|
+
const m = [...t].filter((o) => o === "." || o === ",");
|
|
13
|
+
let f = t, v = "";
|
|
14
|
+
if (n.decimals > 0 && m.length > 0) {
|
|
15
|
+
const o = Math.max(t.lastIndexOf("."), t.lastIndexOf(",")), r = t.charAt(o), p = t.slice(o + 1), g = t.includes(".") && t.includes(","), c = m.filter((D) => D === r).length > 1, a = !g && r === n.group && p.length === 3;
|
|
16
|
+
(g || !c && !a) && (f = t.slice(0, o), v = p);
|
|
17
|
+
}
|
|
18
|
+
const x = (o) => o.replace(/\D/g, ""), h = +`${x(f) || "0"}.${x(v) || "0"}`;
|
|
19
|
+
if (!Number.isFinite(h)) return;
|
|
20
|
+
const d = Number(h.toFixed(n.decimals));
|
|
21
|
+
return e ? -d || 0 : d;
|
|
22
|
+
}
|
|
23
|
+
const te = {
|
|
24
|
+
key: 0,
|
|
25
|
+
class: "shrink-0 text-footnote text-content-muted"
|
|
26
|
+
}, ie = ["id", "value", "name", "placeholder", "disabled", "required", "aria-required", "aria-invalid", "aria-describedby"], le = {
|
|
27
|
+
key: 1,
|
|
28
|
+
class: "shrink-0 text-footnote text-content-muted"
|
|
29
|
+
}, se = /* @__PURE__ */ W({
|
|
30
|
+
__name: "NumberField",
|
|
31
|
+
props: /* @__PURE__ */ z(/* @__PURE__ */ H({
|
|
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
|
+
minDecimals: {},
|
|
44
|
+
negative: { type: Boolean },
|
|
45
|
+
grouping: { type: Boolean },
|
|
46
|
+
maxDigits: {},
|
|
47
|
+
mono: { type: Boolean },
|
|
48
|
+
placeholder: {},
|
|
49
|
+
prefix: {},
|
|
50
|
+
suffix: {},
|
|
51
|
+
width: {}
|
|
52
|
+
}, { ...Y, decimals: 0, minDecimals: void 0, negative: !1, grouping: !0, maxDigits: void 0, mono: !1, placeholder: void 0, prefix: void 0, suffix: void 0, width: "sm" }), {
|
|
53
|
+
modelValue: { default: null },
|
|
54
|
+
modelModifiers: {}
|
|
55
|
+
}),
|
|
56
|
+
emits: ["update:modelValue"],
|
|
57
|
+
setup(s, { expose: n }) {
|
|
58
|
+
const e = s, t = A(s, "modelValue"), m = K(), f = E("input"), v = !!L(), x = Q("text", () => e.error ? "error" : e.disabled ? "locked" : "rest"), h = B(() => v ? J(e.width) : "w-full"), d = B(() => Z(m)), o = B(() => Math.min(e.minDecimals ?? e.decimals, e.decimals)), r = (i) => i === null ? "" : m.number(i, { minimumFractionDigits: o.value, maximumFractionDigits: e.decimals, useGrouping: e.grouping }), p = (i) => i === null ? "" : String(i).replace(".", d.value.decimal), g = (i) => ee(i, { decimals: e.decimals, group: e.grouping ? d.value.group : "" }), c = $(!1), a = $(r(t.value));
|
|
59
|
+
M(t, (i) => {
|
|
60
|
+
c.value ? g(a.value) !== i && (a.value = p(i)) : a.value = r(i);
|
|
61
|
+
}), M(() => [e.decimals, o.value, e.grouping, d.value.decimal], () => {
|
|
62
|
+
c.value || (a.value = r(t.value));
|
|
63
|
+
});
|
|
64
|
+
function D(i) {
|
|
65
|
+
const u = i.target;
|
|
66
|
+
let l = u.value.replace(/[^\d.,\-\s]/g, "");
|
|
67
|
+
e.negative ? l = l.replace(/(?!^)-/g, "") : l = l.replace(/-/g, "");
|
|
68
|
+
const w = l.replace(/\D/g, "").length;
|
|
69
|
+
if (e.maxDigits !== void 0 && w > e.maxDigits) {
|
|
70
|
+
if (l.length === a.value.length + 1) {
|
|
71
|
+
const y = Math.max(0, (u.selectionStart ?? l.length) - 1);
|
|
72
|
+
u.value = a.value, u.setSelectionRange(y, y);
|
|
73
|
+
return;
|
|
74
|
+
}
|
|
75
|
+
let I = 0;
|
|
76
|
+
l = [...l].filter((y) => !/\d/.test(y) || ++I <= e.maxDigits).join("");
|
|
77
|
+
}
|
|
78
|
+
l !== u.value && (u.value = l), a.value = l;
|
|
79
|
+
const b = g(l);
|
|
80
|
+
b !== void 0 ? t.value = b : t.value = null;
|
|
81
|
+
}
|
|
82
|
+
function T() {
|
|
83
|
+
c.value = !0, a.value = p(t.value);
|
|
84
|
+
}
|
|
85
|
+
function G() {
|
|
86
|
+
c.value = !1, a.value = r(t.value);
|
|
87
|
+
}
|
|
88
|
+
return n({ focus: () => f.value?.focus() }), (i, u) => (F(), O(U, P(q(X)(e), {
|
|
89
|
+
value: t.value === null ? null : r(t.value),
|
|
90
|
+
prefix: e.prefix,
|
|
91
|
+
suffix: e.suffix,
|
|
92
|
+
"value-style": e.mono ? "mono" : "numeric"
|
|
93
|
+
}), j({
|
|
94
|
+
default: k(({ id: l, describedby: w, invalid: b }) => [
|
|
95
|
+
N("div", {
|
|
96
|
+
class: S(["flex items-center gap-1.5", [q(x), h.value]])
|
|
97
|
+
}, [
|
|
98
|
+
e.prefix ? (F(), C("span", te, V(e.prefix), 1)) : R("", !0),
|
|
99
|
+
N("input", {
|
|
100
|
+
id: l,
|
|
101
|
+
ref_key: "input",
|
|
102
|
+
ref: f,
|
|
103
|
+
value: a.value,
|
|
104
|
+
type: "text",
|
|
105
|
+
inputmode: "decimal",
|
|
106
|
+
autocomplete: "off",
|
|
107
|
+
name: e.name,
|
|
108
|
+
placeholder: e.placeholder,
|
|
109
|
+
disabled: e.disabled,
|
|
110
|
+
required: e.required,
|
|
111
|
+
"aria-required": e.required || void 0,
|
|
112
|
+
"aria-invalid": b || void 0,
|
|
113
|
+
"aria-describedby": w,
|
|
114
|
+
class: S(["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", e.mono ? "font-mono" : ""]),
|
|
115
|
+
onInput: D,
|
|
116
|
+
onFocus: T,
|
|
117
|
+
onBlur: G
|
|
118
|
+
}, null, 42, ie),
|
|
119
|
+
e.suffix ? (F(), C("span", le, V(e.suffix), 1)) : R("", !0)
|
|
120
|
+
], 2)
|
|
121
|
+
]),
|
|
122
|
+
_: 2
|
|
123
|
+
}, [
|
|
124
|
+
i.$slots.trailing ? {
|
|
125
|
+
name: "trailing",
|
|
126
|
+
fn: k(() => [
|
|
127
|
+
_(i.$slots, "trailing")
|
|
128
|
+
]),
|
|
129
|
+
key: "0"
|
|
130
|
+
} : void 0,
|
|
131
|
+
i.$slots.labelTrailing ? {
|
|
132
|
+
name: "labelTrailing",
|
|
133
|
+
fn: k(() => [
|
|
134
|
+
_(i.$slots, "labelTrailing")
|
|
135
|
+
]),
|
|
136
|
+
key: "1"
|
|
137
|
+
} : void 0,
|
|
138
|
+
i.$slots.readonly ? {
|
|
139
|
+
name: "readonly",
|
|
140
|
+
fn: k(() => [
|
|
141
|
+
_(i.$slots, "readonly")
|
|
142
|
+
]),
|
|
143
|
+
key: "2"
|
|
144
|
+
} : void 0
|
|
145
|
+
]), 1040, ["value", "prefix", "suffix", "value-style"]));
|
|
146
|
+
}
|
|
147
|
+
});
|
|
148
|
+
export {
|
|
149
|
+
se as _
|
|
150
|
+
};
|
|
@@ -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-Bq96L43f.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-Dz5TZt92.js";
|
|
10
|
+
import { _ as U } from "./TextField.vue_vue_type_script_setup_true_lang-D3-R5XXG.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-DoUo68xE.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"));
|