@wssto2/vue-core 0.4.14 → 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.
Files changed (87) hide show
  1. package/dist/{ActionRow.vue_vue_type_script_setup_true_lang-LlfIPWsJ.js → ActionRow.vue_vue_type_script_setup_true_lang-CkvS5W6K.js} +1 -1
  2. package/dist/{Activity-BdSvn0GP.js → Activity-4q26REYj.js} +6 -6
  3. package/dist/{Changes-BQO--N9F.js → Changes-CKIuGF8O.js} +5 -5
  4. package/dist/{CollectionPage.vue_vue_type_script_setup_true_lang-DkpFEHUw.js → CollectionPage.vue_vue_type_script_setup_true_lang-B17cUOzj.js} +2 -2
  5. package/dist/{DateField.vue_vue_type_script_setup_true_lang-GVasv8ao.js → DateField.vue_vue_type_script_setup_true_lang-DehwWm78.js} +17 -16
  6. package/dist/{DeadLetters-OmeiADEi.js → DeadLetters-DPGcQOz1.js} +4 -4
  7. package/dist/FormErrors.vue_vue_type_script_setup_true_lang-DWcVKZM3.js +285 -0
  8. 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
  9. package/dist/{FormView.vue_vue_type_script_setup_true_lang-cr0xNDXP.js → FormView.vue_vue_type_script_setup_true_lang-BcIbTMHN.js} +2 -2
  10. package/dist/{General-CBwFLiKQ.js → General-CUA9b3ML.js} +10 -10
  11. package/dist/{NewRolePage-CblUW2gA.js → NewRolePage-DBfCvDWA.js} +3 -3
  12. package/dist/NumberField.vue_vue_type_script_setup_true_lang-Dm6FfJ2T.js +126 -0
  13. package/dist/{ProfilePage-BOoDDbmB.js → ProfilePage-On-eAiJ-.js} +41 -41
  14. package/dist/{RoleEditor.vue_vue_type_script_setup_true_lang-BCE5yrwy.js → RoleEditor.vue_vue_type_script_setup_true_lang-fvAf3rQm.js} +44 -44
  15. package/dist/{RolePage-xDsFL_eC.js → RolePage-B8oul55j.js} +8 -8
  16. package/dist/{RolesPage-C39wsF6X.js → RolesPage-DsXVivdj.js} +5 -5
  17. package/dist/{SegmentedField.vue_vue_type_script_setup_true_lang-BMqWlpsL.js → SegmentedField.vue_vue_type_script_setup_true_lang-B2d55hrh.js} +7 -6
  18. package/dist/SelectField.vue_vue_type_script_setup_true_lang-DedKLLQK.js +443 -0
  19. package/dist/{SessionList.vue_vue_type_script_setup_true_lang-D4k5QeWS.js → SessionList.vue_vue_type_script_setup_true_lang-CirlMdHb.js} +2 -2
  20. package/dist/{Sessions-m_i4aTfw.js → Sessions-BTyXDEuY.js} +4 -4
  21. package/dist/{SettingsPage-ktKvQQnE.js → SettingsPage-DHTmMgif.js} +9 -9
  22. package/dist/{SignIn-CkoEixY4.js → SignIn-DU4DE2wj.js} +6 -6
  23. package/dist/{SignInPage-DVcpFz3G.js → SignInPage-BA22kyOp.js} +3 -3
  24. package/dist/{SignIns-BnVAtncZ.js → SignIns-C8QAZBaL.js} +3 -3
  25. 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
  26. package/dist/{TextField.vue_vue_type_script_setup_true_lang-B9dwVASU.js → TextField.vue_vue_type_script_setup_true_lang-nqnGG7Zc.js} +27 -26
  27. package/dist/{TextareaField.vue_vue_type_script_setup_true_lang-CqAWfABZ.js → TextareaField.vue_vue_type_script_setup_true_lang-BgIQyYtf.js} +9 -8
  28. 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
  29. package/dist/{UserRecord-Cg69_mbU.js → UserRecord-D1BNmYp9.js} +10 -10
  30. package/dist/{UsersList-BFmBDGs7.js → UsersList-ltx3G23-.js} +8 -8
  31. package/dist/access/index.js +1 -1
  32. package/dist/app/application.d.ts +7 -1
  33. package/dist/app/index.js +93 -93
  34. package/dist/collection/index.js +1 -1
  35. package/dist/control-CX9BG2UB.js +320 -0
  36. package/dist/{describeError-CvGmajU0.js → describeError-B-NMa--w.js} +12 -7
  37. package/dist/fieldMessages-DV6sESpn.js +25 -0
  38. package/dist/form/DateField.vue.d.ts +1 -0
  39. package/dist/form/DateTimeField.vue.d.ts +1 -0
  40. package/dist/form/Field.vue.d.ts +1 -0
  41. package/dist/form/FileField.vue.d.ts +1 -0
  42. package/dist/form/FormErrors.vue.d.ts +1 -1
  43. package/dist/form/FormRow.vue.d.ts +3 -0
  44. package/dist/form/I18nField.vue.d.ts +1 -0
  45. package/dist/form/MoneyField.vue.d.ts +1 -0
  46. package/dist/form/MonthYearField.vue.d.ts +1 -0
  47. package/dist/form/NumberField.vue.d.ts +5 -0
  48. package/dist/form/PhotoField.vue.d.ts +1 -0
  49. package/dist/form/SelectField.vue.d.ts +5 -6
  50. package/dist/form/SwitchField.vue.d.ts +1 -0
  51. package/dist/form/TextField.vue.d.ts +1 -0
  52. package/dist/form/TextareaField.vue.d.ts +1 -0
  53. package/dist/form/TimeField.vue.d.ts +1 -0
  54. package/dist/form/field.d.ts +3 -0
  55. package/dist/form/index.d.ts +2 -0
  56. package/dist/form/index.js +469 -456
  57. package/dist/form/useForm.d.ts +2 -2
  58. package/dist/form/useHiddenFieldErrors.d.ts +23 -0
  59. package/dist/form/useSaveChrome.d.ts +8 -3
  60. package/dist/i18n/describeError.d.ts +8 -0
  61. package/dist/i18n/index.d.ts +2 -2
  62. package/dist/i18n/index.js +3 -2
  63. package/dist/identity/fieldMessages.d.ts +1 -1
  64. package/dist/identity/index.js +1 -1
  65. package/dist/{index-B416VXmR.js → index-BCw_Ki6z.js} +2 -2
  66. package/dist/{index-KcCoCfr-.js → index-Chh4z9xW.js} +10 -10
  67. package/dist/{index-RNF5-9uf.js → index-DwdVrW6q.js} +15 -15
  68. package/dist/index.d.ts +1 -1
  69. package/dist/index.js +1 -1
  70. package/dist/notifications/index.js +1 -1
  71. package/dist/phone/PhoneField.vue.d.ts +1 -0
  72. package/dist/phone/index.js +66 -65
  73. package/dist/resource/index.js +1 -1
  74. package/dist/{routeResource-BwEFXzIX.js → routeResource-DlTsGTg_.js} +1 -1
  75. package/dist/state/index.js +1 -1
  76. package/dist/{status-OZUHZpWl.js → status-cWCAMAmW.js} +1 -1
  77. package/dist/{useCommand-BkONMn3X.js → useCommand-B-N6HJOz.js} +1 -1
  78. package/dist/{useLoad-DuEsLECT.js → useLoad-M7V-AVwR.js} +1 -1
  79. package/dist/{useResourceForm-D1hIpwW5.js → useResourceForm-CP2lCwmD.js} +1 -1
  80. package/dist/useSaveChrome-7huA3FzR.js +26 -0
  81. package/package.json +1 -1
  82. package/dist/FormErrors.vue_vue_type_script_setup_true_lang-BQb7wLT0.js +0 -276
  83. package/dist/NumberField.vue_vue_type_script_setup_true_lang-C7N5nq0P.js +0 -113
  84. package/dist/SelectField.vue_vue_type_script_setup_true_lang-BJoAkBo2.js +0 -437
  85. package/dist/control-7EP4tjYy.js +0 -313
  86. package/dist/fieldMessages-D_dpSe19.js +0 -25
  87. package/dist/useSaveChrome-DuWm0Czf.js +0 -25
@@ -1,7 +1,7 @@
1
- import { defineComponent as fe, useModel as me, useTemplateRef as F, ref as B, computed as g, watch as ne, nextTick as A, openBlock as w, createElementBlock as $, createElementVNode as f, normalizeClass as P, unref as i, createVNode as M, toDisplayString as T, normalizeStyle as ge, Fragment as ee, renderList as le, createCommentVNode as J, withModifiers as xe, withDirectives as we, vModelText as _e, mergeModels as re, inject as ke, shallowRef as Ce, onBeforeUnmount as $e, createBlock as De, mergeProps as Me, createSlots as Te, withCtx as se, createTextVNode as Se, renderSlot as Ne, mergeDefaults as Ie } from "vue";
1
+ import { defineComponent as fe, useModel as me, useTemplateRef as F, ref as E, computed as g, watch as ne, nextTick as A, openBlock as w, createElementBlock as $, createElementVNode as f, normalizeClass as P, unref as i, createVNode as M, toDisplayString as T, normalizeStyle as ge, Fragment as ee, renderList as le, createCommentVNode as J, withModifiers as xe, withDirectives as we, vModelText as _e, mergeModels as ae, inject as ke, shallowRef as Ce, onBeforeUnmount as $e, createBlock as De, mergeProps as Me, createSlots as Te, withCtx as se, createTextVNode as Se, renderSlot as Ne, mergeDefaults as Ie } from "vue";
2
2
  import { useI18n as pe } from "vue-i18n";
3
3
  import { b as Pe } from "../controlSurface-t7OEFESJ.js";
4
- import { a as Ve, c as Oe, _ as Re, f as Ee, b as Be } from "../control-7EP4tjYy.js";
4
+ import { a as Ve, c as Oe, _ as Re, f as Be, b as Ee } from "../control-CX9BG2UB.js";
5
5
  import { _ as q } from "../Icon.vue_vue_type_script_lang-D7oC-d-S.js";
6
6
  import { _ as ie } from "../CountryFlag.vue_vue_type_script_setup_true_lang-Kry_vPPZ.js";
7
7
  import { u as ze } from "../anchored-Cj4--8dT.js";
@@ -13,62 +13,62 @@ function he(t) {
13
13
  return Le.country_calling_codes[t]?.[0];
14
14
  }
15
15
  const W = (t) => Ae(t), de = (t) => `+${W(t)}`, te = () => qe();
16
- function Ke(t, r) {
16
+ function Ke(t, a) {
17
17
  const o = `+${t}`;
18
- return new L().input(`${o}${r}`).slice(o.length).trim();
18
+ return new L().input(`${o}${a}`).slice(o.length).trim();
19
19
  }
20
- function ae(t, r, o) {
21
- const a = o.slice(0, Math.max(0, We - r.length));
22
- return a === "" ? { country: t, e164: "", text: "" } : { country: t, e164: `+${r}${a}`, text: Ke(r, a) };
20
+ function re(t, a, o) {
21
+ const r = o.slice(0, Math.max(0, We - a.length));
22
+ return r === "" ? { country: t, e164: "", text: "" } : { country: t, e164: `+${a}${r}`, text: Ke(a, r) };
23
23
  }
24
- function oe(t, r) {
24
+ function oe(t, a) {
25
25
  const o = t.trim().replace(/^00(?=\d)/, "+");
26
26
  if (o.startsWith("+")) {
27
27
  const l = new L();
28
28
  l.input(o);
29
29
  const x = l.getCallingCode();
30
- if (!x) return { country: r, e164: "", text: o.replace(/[^\d+]/g, "") };
31
- const p = l.getCountry() ?? (W(r) === x ? r : he(x) ?? r);
32
- return ae(p, x, l.getNumber()?.nationalNumber ?? "");
30
+ if (!x) return { country: a, e164: "", text: o.replace(/[^\d+]/g, "") };
31
+ const p = l.getCountry() ?? (W(a) === x ? a : he(x) ?? a);
32
+ return re(p, x, l.getNumber()?.nationalNumber ?? "");
33
33
  }
34
- const a = new L(r);
35
- return a.input(o.replace(/\D/g, "")), ae(r, W(r), a.getNumber()?.nationalNumber ?? "");
34
+ const r = new L(a);
35
+ return r.input(o.replace(/\D/g, "")), re(a, W(a), r.getNumber()?.nationalNumber ?? "");
36
36
  }
37
- function Ue(t, r) {
38
- return ae(r, W(r), t.text.replace(/\D/g, ""));
37
+ function Ue(t, a) {
38
+ return re(a, W(a), t.text.replace(/\D/g, ""));
39
39
  }
40
40
  function je(t) {
41
41
  return t.startsWith("+") ? new L().input(t) : t;
42
42
  }
43
43
  const He = { MOBILE: "mobile", FIXED_LINE: "landline", TOLL_FREE: "toll_free", PREMIUM_RATE: "premium_rate", VOIP: "voip" };
44
44
  function Ge(t) {
45
- const r = t ? ve(t) : void 0, o = r?.isValid() ? r.getType() : void 0;
45
+ const a = t ? ve(t) : void 0, o = a?.isValid() ? a.getType() : void 0;
46
46
  return o ? He[o] : void 0;
47
47
  }
48
48
  function Xe(t) {
49
- const r = new L();
50
- r.input(t);
51
- const o = r.getCallingCode();
52
- return r.getCountry() ?? (o ? he(o) : void 0);
49
+ const a = new L();
50
+ a.input(t);
51
+ const o = a.getCallingCode();
52
+ return a.getCountry() ?? (o ? he(o) : void 0);
53
53
  }
54
54
  function ye(t) {
55
55
  if (t === "") return null;
56
- const r = Xe(t), o = Fe(t);
57
- return o === "TOO_SHORT" ? { kind: "too_short", country: r } : o === "TOO_LONG" ? { kind: "too_long", country: r } : o !== void 0 ? { kind: "invalid", country: r } : ve(t)?.isValid() ? null : { kind: "invalid", country: r };
56
+ const a = Xe(t), o = Fe(t);
57
+ return o === "TOO_SHORT" ? { kind: "too_short", country: a } : o === "TOO_LONG" ? { kind: "too_long", country: a } : o !== void 0 ? { kind: "invalid", country: a } : ve(t)?.isValid() ? null : { kind: "invalid", country: a };
58
58
  }
59
59
  const $t = (t) => ye(t) === null;
60
- function be(t, r) {
60
+ function be(t, a) {
61
61
  try {
62
- return new Intl.DisplayNames([r], { type: "region" }).of(t) ?? t;
62
+ return new Intl.DisplayNames([a], { type: "region" }).of(t) ?? t;
63
63
  } catch {
64
64
  return t;
65
65
  }
66
66
  }
67
- function Ye(t, r, o) {
68
- const a = ue(t.trim());
69
- if (a === "") return o;
70
- const l = a.replace(/\D/g, ""), x = new Intl.DisplayNames([r], { type: "region" }), p = (h) => ue(x.of(h) ?? h), _ = a.startsWith("+") || /^\d+$/.test(a);
71
- return o.filter((h) => _ ? W(h).startsWith(l) : p(h).includes(a) || h.toLowerCase() === a);
67
+ function Ye(t, a, o) {
68
+ const r = ue(t.trim());
69
+ if (r === "") return o;
70
+ const l = r.replace(/\D/g, ""), x = new Intl.DisplayNames([a], { type: "region" }), p = (h) => ue(x.of(h) ?? h), _ = r.startsWith("+") || /^\d+$/.test(r);
71
+ return o.filter((h) => _ ? W(h).startsWith(l) : p(h).includes(r) || h.toLowerCase() === r);
72
72
  }
73
73
  const Je = ["id", "disabled", "aria-label", "aria-expanded"], Qe = { class: "tabular-nums" }, Ze = ["id", "aria-label"], et = {
74
74
  key: 0,
@@ -78,9 +78,9 @@ const Je = ["id", "disabled", "aria-label", "aria-expanded"], Qe = { class: "tab
78
78
  key: 0,
79
79
  class: "px-3 py-2 text-footnote text-content-muted",
80
80
  role: "status"
81
- }, rt = { class: "border-t border-border-separator px-3 py-2" }, at = ["aria-controls", "aria-activedescendant", "aria-label", "placeholder"], lt = /* @__PURE__ */ fe({
81
+ }, at = { class: "border-t border-border-separator px-3 py-2" }, rt = ["aria-controls", "aria-activedescendant", "aria-label", "placeholder"], lt = /* @__PURE__ */ fe({
82
82
  __name: "CountryPicker",
83
- props: /* @__PURE__ */ re({
83
+ props: /* @__PURE__ */ ae({
84
84
  id: {},
85
85
  common: {},
86
86
  disabled: { type: Boolean },
@@ -89,21 +89,21 @@ const Je = ["id", "disabled", "aria-label", "aria-expanded"], Qe = { class: "tab
89
89
  modelValue: { required: !0 },
90
90
  modelModifiers: {}
91
91
  }),
92
- emits: /* @__PURE__ */ re(["picked"], ["update:modelValue"]),
93
- setup(t, { expose: r, emit: o }) {
94
- const a = t, l = me(t, "modelValue"), x = o, { t: p, locale: _ } = pe(), h = F("root"), V = F("trigger"), k = F("panel"), K = F("search"), C = B(!1), v = B(""), d = B(0), O = g(() => {
92
+ emits: /* @__PURE__ */ ae(["picked"], ["update:modelValue"]),
93
+ setup(t, { expose: a, emit: o }) {
94
+ const r = t, l = me(t, "modelValue"), x = o, { t: p, locale: _ } = pe(), h = F("root"), V = F("trigger"), k = F("panel"), K = F("search"), C = E(!1), v = E(""), d = E(0), O = g(() => {
95
95
  const e = /* @__PURE__ */ new Map();
96
96
  for (const s of te()) e.set(s, be(s, _.value));
97
97
  return e;
98
98
  }), S = (e) => O.value.get(e) ?? e, D = g(() => {
99
- const e = a.common.filter((c) => O.value.has(c));
99
+ const e = r.common.filter((c) => O.value.has(c));
100
100
  if (v.value.trim() !== "") {
101
101
  const c = Ye(v.value, _.value, te());
102
102
  return [{ title: null, countries: [...c.filter((n) => e.includes(n)), ...c.filter((n) => !e.includes(n))] }];
103
103
  }
104
104
  const s = te().filter((c) => !e.includes(c)).sort((c, n) => S(c).localeCompare(S(n), _.value));
105
105
  return [{ title: p("core.form.phone.common"), countries: e }, { title: p("core.form.phone.all"), countries: s }].filter((c) => c.countries.length > 0);
106
- }), y = g(() => D.value.flatMap((e) => e.countries)), z = g(() => D.value.map((e, s) => D.value.slice(0, s).reduce((c, n) => c + n.countries.length, 0))), U = (e) => `${a.id}-country-${e}`, { style: Q } = ze(k, {
106
+ }), y = g(() => D.value.flatMap((e) => e.countries)), z = g(() => D.value.map((e, s) => D.value.slice(0, s).reduce((c, n) => c + n.countries.length, 0))), U = (e) => `${r.id}-country-${e}`, { style: Q } = ze(k, {
107
107
  reference: () => V.value,
108
108
  placement: () => "bottom-start",
109
109
  offset: 4,
@@ -113,7 +113,7 @@ const Je = ["id", "disabled", "aria-label", "aria-expanded"], Qe = { class: "tab
113
113
  }
114
114
  });
115
115
  async function j() {
116
- a.disabled || C.value || (v.value = "", d.value = Math.max(0, y.value.indexOf(l.value)), C.value = !0, await A(), K.value?.focus());
116
+ r.disabled || C.value || (v.value = "", d.value = Math.max(0, y.value.indexOf(l.value)), C.value = !0, await A(), K.value?.focus());
117
117
  }
118
118
  function N(e) {
119
119
  C.value = !1, e && V.value?.focus();
@@ -136,28 +136,28 @@ const Je = ["id", "disabled", "aria-label", "aria-expanded"], Qe = { class: "tab
136
136
  s && R(s);
137
137
  }
138
138
  }
139
- function E(e) {
139
+ function B(e) {
140
140
  (e.key === "ArrowDown" || e.key === "ArrowUp") && (e.preventDefault(), j());
141
141
  }
142
- return r({ focus: () => V.value?.focus() }), (e, s) => (w(), $("div", {
142
+ return a({ focus: () => V.value?.focus() }), (e, s) => (w(), $("div", {
143
143
  ref_key: "root",
144
144
  ref: h,
145
145
  class: "shrink-0",
146
146
  onFocusout: H
147
147
  }, [
148
148
  f("button", {
149
- id: `${a.id}-country`,
149
+ id: `${r.id}-country`,
150
150
  ref_key: "trigger",
151
151
  ref: V,
152
152
  type: "button",
153
- disabled: a.disabled,
153
+ disabled: r.disabled,
154
154
  "aria-label": i(p)("core.form.phone.country", { country: S(l.value) }),
155
155
  "aria-haspopup": "listbox",
156
156
  "aria-expanded": C.value,
157
157
  "data-test": "country-button",
158
- class: P(["flex h-full min-h-8 cursor-pointer items-center gap-1.5 whitespace-nowrap text-body font-medium text-content-strong focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-border-focus disabled:cursor-not-allowed compact:border-r compact:border-border-separator", a.surface]),
158
+ class: P(["flex h-full min-h-8 cursor-pointer items-center gap-1.5 whitespace-nowrap text-body font-medium text-content-strong focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-border-focus disabled:cursor-not-allowed compact:border-r compact:border-border-separator", r.surface]),
159
159
  onClick: s[0] || (s[0] = (c) => C.value ? N(!0) : j()),
160
- onKeydown: E
160
+ onKeydown: B
161
161
  }, [
162
162
  M(ie, { country: l.value }, null, 8, ["country"]),
163
163
  f("span", Qe, T(i(de)(l.value)), 1),
@@ -176,7 +176,7 @@ const Je = ["id", "disabled", "aria-label", "aria-expanded"], Qe = { class: "tab
176
176
  class: "z-1000 flex flex-col overflow-hidden rounded-menu bg-surface-overlay shadow-float"
177
177
  }, [
178
178
  f("div", {
179
- id: `${a.id}-countries`,
179
+ id: `${r.id}-countries`,
180
180
  role: "listbox",
181
181
  "aria-label": i(p)("core.form.phone.countries"),
182
182
  class: "min-h-0 flex-1 overflow-y-auto p-2"
@@ -207,7 +207,7 @@ const Je = ["id", "disabled", "aria-label", "aria-expanded"], Qe = { class: "tab
207
207
  ], 64))), 128)),
208
208
  y.value.length === 0 ? (w(), $("p", nt, T(i(p)("core.form.phone.no_match")), 1)) : J("", !0)
209
209
  ], 8, Ze),
210
- f("div", rt, [
210
+ f("div", at, [
211
211
  we(f("input", {
212
212
  ref_key: "search",
213
213
  ref: K,
@@ -217,14 +217,14 @@ const Je = ["id", "disabled", "aria-label", "aria-expanded"], Qe = { class: "tab
217
217
  autocomplete: "off",
218
218
  "aria-autocomplete": "list",
219
219
  "aria-expanded": "true",
220
- "aria-controls": `${a.id}-countries`,
220
+ "aria-controls": `${r.id}-countries`,
221
221
  "aria-activedescendant": y.value[d.value] ? U(y.value[d.value]) : void 0,
222
222
  "aria-label": i(p)("core.form.phone.search"),
223
223
  placeholder: i(p)("core.form.phone.search"),
224
224
  "data-test": "country-search",
225
225
  class: "block w-full border-0 bg-transparent p-0 text-body text-content-strong placeholder:text-content-muted focus:outline-none focus:ring-0",
226
226
  onKeydown: G
227
- }, null, 40, at), [
227
+ }, null, 40, rt), [
228
228
  [_e, v.value]
229
229
  ])
230
230
  ])
@@ -240,8 +240,9 @@ const Je = ["id", "disabled", "aria-label", "aria-expanded"], Qe = { class: "tab
240
240
  role: "status"
241
241
  }, Dt = /* @__PURE__ */ fe({
242
242
  __name: "PhoneField",
243
- props: /* @__PURE__ */ re(/* @__PURE__ */ Ie({
243
+ props: /* @__PURE__ */ ae(/* @__PURE__ */ Ie({
244
244
  label: {},
245
+ labelHidden: { type: Boolean },
245
246
  hint: {},
246
247
  error: {},
247
248
  required: { type: Boolean },
@@ -254,22 +255,22 @@ const Je = ["id", "disabled", "aria-label", "aria-expanded"], Qe = { class: "tab
254
255
  commonCountries: {},
255
256
  placeholder: {},
256
257
  width: {}
257
- }, { ...Be, defaultCountry: void 0, commonCountries: void 0, placeholder: void 0, width: "lg" }), {
258
+ }, { ...Ee, defaultCountry: void 0, commonCountries: void 0, placeholder: void 0, width: "lg" }), {
258
259
  modelValue: { default: "" },
259
260
  modelModifiers: {}
260
261
  }),
261
262
  emits: ["update:modelValue"],
262
- setup(t, { expose: r }) {
263
- const o = t, a = me(t, "modelValue"), { t: l, locale: x } = pe(), p = ke(st, {}), _ = !!Ve(), h = Oe("text", () => o.error || R.value ? "error" : o.disabled ? "locked" : "rest"), V = g(() => _ ? Pe(o.width) : "w-full"), k = F("input"), K = g(() => o.defaultCountry ?? p.defaultCountry ?? (o.commonCountries ?? p.commonCountries ?? ce)[0] ?? "HR"), C = g(() => o.commonCountries ?? p.commonCountries ?? ce), v = Ce(K.value), d = B("");
263
+ setup(t, { expose: a }) {
264
+ const o = t, r = me(t, "modelValue"), { t: l, locale: x } = pe(), p = ke(st, {}), _ = !!Ve(), h = Oe("text", () => o.error || R.value ? "error" : o.disabled ? "locked" : "rest"), V = g(() => _ ? Pe(o.width) : "w-full"), k = F("input"), K = g(() => o.defaultCountry ?? p.defaultCountry ?? (o.commonCountries ?? p.commonCountries ?? ce)[0] ?? "HR"), C = g(() => o.commonCountries ?? p.commonCountries ?? ce), v = Ce(K.value), d = E("");
264
265
  let O = null;
265
266
  function S(n) {
266
267
  v.value = n.country, d.value = n.text;
267
268
  }
268
- ne(() => a.value, (n) => {
269
+ ne(() => r.value, (n) => {
269
270
  n !== O && (O = null, S(oe(n, v.value)));
270
271
  }, { immediate: !0 });
271
272
  function D(n) {
272
- S(n), O = n.e164, a.value = n.e164;
273
+ S(n), O = n.e164, r.value = n.e164;
273
274
  }
274
275
  const y = (n) => n.replace(/\D/g, "").length;
275
276
  async function z(n) {
@@ -296,24 +297,24 @@ const Je = ["id", "disabled", "aria-label", "aria-expanded"], Qe = { class: "tab
296
297
  /^(\+|00)\d/.test(u) && (n.preventDefault(), D(oe(u, v.value)), A(() => k.value?.setSelectionRange(d.value.length, d.value.length)));
297
298
  }
298
299
  function j(n) {
299
- D(Ue({ country: v.value, e164: a.value, text: d.value }, n)), A(() => k.value?.focus());
300
+ D(Ue({ country: v.value, e164: r.value, text: d.value }, n)), A(() => k.value?.focus());
300
301
  }
301
- const N = B(!1), R = g(() => N.value && a.value !== "" ? ye(a.value) : null), H = g(() => {
302
+ const N = E(!1), R = g(() => N.value && r.value !== "" ? ye(r.value) : null), H = g(() => {
302
303
  const n = R.value;
303
304
  if (n)
304
305
  return n.country ? l(`core.form.phone.${n.kind}`, { country: be(n.country, x.value) }) : l("core.form.phone.invalid_any");
305
- }), G = g(() => a.value !== "" && !R.value ? Ge(a.value) : void 0), E = g(() => je(a.value)), e = B(!1);
306
+ }), G = g(() => r.value !== "" && !R.value ? Ge(r.value) : void 0), B = g(() => je(r.value)), e = E(!1);
306
307
  let s = null;
307
308
  async function c() {
308
309
  try {
309
- await navigator.clipboard.writeText(E.value);
310
+ await navigator.clipboard.writeText(B.value);
310
311
  } catch {
311
312
  return;
312
313
  }
313
314
  e.value = !0, s && clearTimeout(s), s = setTimeout(() => e.value = !1, 1800);
314
315
  }
315
- return $e(() => s && clearTimeout(s)), r({ focus: () => k.value?.focus() }), (n, u) => (w(), De(Re, Me({ ...i(Ee)(o), error: o.error ?? H.value }, {
316
- value: a.value === "" ? null : E.value,
316
+ return $e(() => s && clearTimeout(s)), a({ focus: () => k.value?.focus() }), (n, u) => (w(), De(Re, Me({ ...i(Be)(o), error: o.error ?? H.value }, {
317
+ value: r.value === "" ? null : B.value,
317
318
  "value-style": "numeric"
318
319
  }), Te({
319
320
  default: se(({ id: b, describedby: m, invalid: I }) => [
@@ -367,7 +368,7 @@ const Je = ["id", "disabled", "aria-label", "aria-expanded"], Qe = { class: "tab
367
368
  ]),
368
369
  _: 2
369
370
  }, [
370
- a.value !== "" ? {
371
+ r.value !== "" ? {
371
372
  name: "readonly",
372
373
  fn: se(() => [
373
374
  f("div", {
@@ -376,9 +377,9 @@ const Je = ["id", "disabled", "aria-label", "aria-expanded"], Qe = { class: "tab
376
377
  }, [
377
378
  f("span", {
378
379
  class: P(["flex-auto whitespace-nowrap text-body tabular-nums text-content-strong", _ ? "text-right" : ""])
379
- }, T(E.value), 3),
380
+ }, T(B.value), 3),
380
381
  f("a", {
381
- href: `tel:${a.value}`,
382
+ href: `tel:${r.value}`,
382
383
  "aria-label": i(l)("core.form.phone.call"),
383
384
  title: i(l)("core.form.phone.call"),
384
385
  "data-test": "phone-call",
@@ -390,7 +391,7 @@ const Je = ["id", "disabled", "aria-label", "aria-expanded"], Qe = { class: "tab
390
391
  })
391
392
  ], 8, dt),
392
393
  f("a", {
393
- href: `sms:${a.value}`,
394
+ href: `sms:${r.value}`,
394
395
  "aria-label": i(l)("core.form.phone.message"),
395
396
  title: i(l)("core.form.phone.message"),
396
397
  "data-test": "phone-message",
@@ -402,8 +403,8 @@ const Je = ["id", "disabled", "aria-label", "aria-expanded"], Qe = { class: "tab
402
403
  })
403
404
  ], 8, ft),
404
405
  Ne(n.$slots, "actions", {
405
- number: a.value,
406
- formatted: E.value
406
+ number: r.value,
407
+ formatted: B.value
407
408
  }),
408
409
  f("button", {
409
410
  type: "button",
@@ -1,4 +1,4 @@
1
- import { p as o, u as r, a, b as u } from "../routeResource-BwEFXzIX.js";
1
+ import { p as o, u as r, a, b as u } from "../routeResource-DlTsGTg_.js";
2
2
  import { _ as R, a as c } from "../ResourcePage.vue_vue_type_script_setup_true_lang-Da0M-hen.js";
3
3
  export {
4
4
  R as RecordPager,
@@ -3,7 +3,7 @@ import { useRoute as M } from "vue-router";
3
3
  import { M as h } from "./context-Ch1r4fdN.js";
4
4
  import { useI18n as S } from "vue-i18n";
5
5
  import { a as p } from "./error-CD7x0Jrz.js";
6
- import { a as _ } from "./describeError-CvGmajU0.js";
6
+ import { a as _ } from "./describeError-B-NMa--w.js";
7
7
  function D(e) {
8
8
  if (!/^\d+$/.test(e)) return null;
9
9
  const n = Number(e);
@@ -7,7 +7,7 @@ import { _ as q } from "../EmptyState.vue_vue_type_script_setup_true_lang-50p-Mp
7
7
  import { defineComponent as m, computed as k, openBlock as e, createElementBlock as n, normalizeClass as p, createVNode as d, unref as i, createElementVNode as u, renderSlot as f, createBlock as S, toDisplayString as l, createCommentVNode as c } from "vue";
8
8
  import { _ as x } from "../Icon.vue_vue_type_script_lang-D7oC-d-S.js";
9
9
  import { useI18n as g } from "vue-i18n";
10
- import { u as J } from "../useLoad-DuEsLECT.js";
10
+ import { u as J } from "../useLoad-M7V-AVwR.js";
11
11
  import { D as Q, W as X, u as Y } from "../useWaitStatus-fsacMl4W.js";
12
12
  const b = ["amber", "lime", "teal", "cyan", "blue", "indigo", "violet", "fuchsia", "pink"], V = /* @__PURE__ */ m({
13
13
  __name: "FieldNote",
@@ -1,5 +1,5 @@
1
1
  import { a, r as o } from "./http-D_D9YbLH.js";
2
- import { i as r } from "./index-RNF5-9uf.js";
2
+ import { i as r } from "./index-DwdVrW6q.js";
3
3
  const n = ["active", "locked", "inactive", "all"];
4
4
  function l(i) {
5
5
  return a({
@@ -3,7 +3,7 @@ import { useI18n as V } from "vue-i18n";
3
3
  import { f as q } from "./useDialog-CXR3hN0G.js";
4
4
  import { _ as A } from "./Modal.vue_vue_type_script_setup_true_lang-DpBb8ans.js";
5
5
  import { D as F } from "./useWaitStatus-fsacMl4W.js";
6
- import { _ as O, u as I } from "./FormErrors.vue_vue_type_script_setup_true_lang-BQb7wLT0.js";
6
+ import { _ as O, u as I } from "./FormErrors.vue_vue_type_script_setup_true_lang-DWcVKZM3.js";
7
7
  import { a as R } from "./leaveGuard-Cc8yeLxM.js";
8
8
  const d = "input:not([type=hidden]):not([disabled]), textarea:not([disabled]), select:not([disabled]), button:not([disabled]), [tabindex]:not([tabindex='-1'])";
9
9
  async function U(t = document, n) {
@@ -1,6 +1,6 @@
1
1
  import { shallowRef as S, watch as k, getCurrentScope as C, onScopeDispose as D, computed as v } from "vue";
2
2
  import { useI18n as E } from "vue-i18n";
3
- import { u as x } from "./describeError-CvGmajU0.js";
3
+ import { u as x } from "./describeError-B-NMa--w.js";
4
4
  const f = Symbol("vue-core.load.abandoned");
5
5
  function M(m, t = {}) {
6
6
  const { t: g } = E(), b = x(), p = t.errorMessage ?? ((a) => b(a, { fallback: g("core.resource.unavailable") })), e = S({ status: "loading" });
@@ -1,5 +1,5 @@
1
1
  import { shallowRef as v, watch as m, computed as f } from "vue";
2
- import { u as i, c as h } from "./FormErrors.vue_vue_type_script_setup_true_lang-BQb7wLT0.js";
2
+ import { u as i, c as h } from "./FormErrors.vue_vue_type_script_setup_true_lang-DWcVKZM3.js";
3
3
  function b(u) {
4
4
  const t = i(u), r = v(null), s = v(!1);
5
5
  let n = null;
@@ -0,0 +1,26 @@
1
+ import { computed as u, toValue as l } from "vue";
2
+ import { useI18n as m } from "vue-i18n";
3
+ import { u as i } from "./chrome-nUcmVu8G.js";
4
+ import { a as n } from "./leaveGuard-Cc8yeLxM.js";
5
+ function o(e) {
6
+ const { t: a } = m(), r = u(() => (l(e.ready) ?? !0) && (l(e.allowed) ?? !0)), c = u(() => r.value && e.form.dirty.value);
7
+ n(() => r.value && e.form.dirty.value), i({
8
+ actions: () => r.value ? [
9
+ {
10
+ id: e.id ?? "save",
11
+ label: l(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
+ disabled: (l(e.disabledWhileClean) ?? !0) && !e.form.dirty.value,
17
+ onClick: e.save
18
+ }
19
+ ] : [],
20
+ leading: () => c.value && e.cancel ? { id: `${e.id ?? "save"}-cancel`, label: a("core.actions.cancel"), prominence: "plain", onClick: e.cancel } : null,
21
+ status: () => c.value ? a("core.form.unsaved_changes") : null
22
+ });
23
+ }
24
+ export {
25
+ o as u
26
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wssto2/vue-core",
3
- "version": "0.4.14",
3
+ "version": "0.4.15",
4
4
  "goCore": "v1.7.0",
5
5
  "description": "Shared Vue 3 library for go-core applications: app shell, list / record / form pages and their controls.",
6
6
  "keywords": [