@wssto2/vue-core 0.15.3 → 0.17.0

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 (153) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/README.md +4 -3
  3. package/bin/architecture/engine.mjs +3 -0
  4. package/bin/architecture/permissions.mjs +56 -0
  5. package/bin/architecture/rules.mjs +17 -0
  6. package/bin/commands/check-architecture.mjs +19 -0
  7. package/bin/config.mjs +2 -0
  8. package/dist/{AccessGate.vue_vue_type_script_setup_true_lang-BH3f0hda.js → AccessGate.vue_vue_type_script_setup_true_lang-Bg8JFAOT.js} +1 -1
  9. package/dist/{ActionRow.vue_vue_type_script_setup_true_lang-DybAIOHS.js → ActionRow.vue_vue_type_script_setup_true_lang-B5IMNnTf.js} +4 -4
  10. package/dist/{Activity-DM9t5d3D.js → Activity-CiYn5E6A.js} +7 -7
  11. package/dist/{AdaptivePageShell.vue_vue_type_script_setup_true_lang-uO4EAmBb.js → AdaptivePageShell.vue_vue_type_script_setup_true_lang-oXWQTfBs.js} +170 -168
  12. package/dist/{Changes-DYpysvfX.js → Changes-Cy8STpLX.js} +3 -3
  13. package/dist/{CollectionPage.vue_vue_type_script_setup_true_lang-qxeSTAKV.js → CollectionPage.vue_vue_type_script_setup_true_lang-Dr6nFNBB.js} +6 -6
  14. package/dist/{DataTable.vue_vue_type_script_setup_true_lang-DbRS37n3.js → DataTable.vue_vue_type_script_setup_true_lang-D372wlxR.js} +1 -1
  15. package/dist/{DateField.vue_vue_type_script_setup_true_lang-DzCvYHAf.js → DateField.vue_vue_type_script_setup_true_lang-D0KcfW8R.js} +17 -16
  16. package/dist/{DeadLetters-vt9vhJD7.js → DeadLetters-DhJkMpd_.js} +4 -4
  17. package/dist/{FormGroup.vue_vue_type_script_setup_true_lang-dsO1m9Mm.js → FormGroup.vue_vue_type_script_setup_true_lang-lvAuBG-0.js} +2 -2
  18. package/dist/FormRow.vue_vue_type_script_setup_true_lang-CpgNVQF4.js +160 -0
  19. package/dist/{FormView.vue_vue_type_script_setup_true_lang-Bq_Qa4py.js → FormView.vue_vue_type_script_setup_true_lang-D01Jr4UU.js} +5 -5
  20. package/dist/{General-oUI2MiwO.js → General-CwTPC5UP.js} +11 -11
  21. package/dist/{IncidentRecord-CQdv_bN5.js → IncidentRecord-hXEGuLGg.js} +14 -14
  22. package/dist/{IncidentsList-DwQ0wuM8.js → IncidentsList-C41VyDwK.js} +6 -6
  23. package/dist/{NewRolePage-C-wbA-uW.js → NewRolePage-BYYZJkK7.js} +3 -3
  24. package/dist/{NumberField.vue_vue_type_script_setup_true_lang-U-_kcnGr.js → NumberField.vue_vue_type_script_setup_true_lang-BhNZgEW6.js} +7 -6
  25. package/dist/{PersonAccess.vue_vue_type_script_setup_true_lang-BPDh9s2m.js → PersonAccess.vue_vue_type_script_setup_true_lang-mYFuG-Y3.js} +56 -56
  26. package/dist/{ProfilePage-Di77M2cX.js → ProfilePage-DGEsIycR.js} +13 -13
  27. package/dist/{RecordHeader.vue_vue_type_script_setup_true_lang-CZtvUH5L.js → RecordHeader.vue_vue_type_script_setup_true_lang-B3BnYg1x.js} +1 -1
  28. package/dist/{ResourcePage.vue_vue_type_script_setup_true_lang-uLrX13ab.js → ResourcePage.vue_vue_type_script_setup_true_lang-1iZtj3rh.js} +1 -1
  29. package/dist/{RoleEditor.vue_vue_type_script_setup_true_lang-V2D7fhR9.js → RoleEditor.vue_vue_type_script_setup_true_lang-BslSDDiM.js} +10 -10
  30. package/dist/{RolePage-Crp71rRb.js → RolePage-C08ZUqw1.js} +9 -9
  31. package/dist/{RolesPage-DKXXnnDV.js → RolesPage-FOuY1VKg.js} +10 -10
  32. package/dist/{SectionNavigator.vue_vue_type_script_setup_true_lang-5ogQCj8M.js → SectionNavigator.vue_vue_type_script_setup_true_lang-DCTFxfPB.js} +2 -2
  33. package/dist/{SegmentedField.vue_vue_type_script_setup_true_lang-zv_AxpBn.js → SegmentedField.vue_vue_type_script_setup_true_lang-CLR6EvzO.js} +13 -12
  34. package/dist/{SelectField.vue_vue_type_script_setup_true_lang-CLkoPbGm.js → SelectField.vue_vue_type_script_setup_true_lang-D5xYofdb.js} +10 -9
  35. package/dist/{ServiceAccountDialog.vue_vue_type_script_setup_true_lang-C7WKxJ9i.js → ServiceAccountDialog.vue_vue_type_script_setup_true_lang-CDr4WNIb.js} +9 -9
  36. package/dist/{ServiceAccountRecord-CTU10RWy.js → ServiceAccountRecord-kWwIQGZb.js} +12 -12
  37. package/dist/{ServiceAccountsList-BVRjoswH.js → ServiceAccountsList-CKy9_YHP.js} +8 -8
  38. package/dist/{Sessions-BHwMrF7c.js → Sessions-BDc8gdYH.js} +4 -4
  39. package/dist/{SettingsPage-lRWvsMYK.js → SettingsPage-t-8kmFVT.js} +13 -13
  40. package/dist/{SignIn-HnujOMRY.js → SignIn-CqtkvtCZ.js} +7 -7
  41. package/dist/{SignInPage-c886Fvd7.js → SignInPage-DcdNKZIb.js} +4 -4
  42. package/dist/{SignIns-BsTlN2Zc.js → SignIns-D4-nGu0B.js} +3 -3
  43. package/dist/{SwitchField.vue_vue_type_script_setup_true_lang-Ds4q0bbl.js → SwitchField.vue_vue_type_script_setup_true_lang-CLtcuofe.js} +15 -14
  44. package/dist/{TextField.vue_vue_type_script_setup_true_lang-CWIeeZRE.js → TextField.vue_vue_type_script_setup_true_lang-CVGh-p3J.js} +7 -6
  45. package/dist/{TextareaField.vue_vue_type_script_setup_true_lang-D2j4s96s.js → TextareaField.vue_vue_type_script_setup_true_lang-YxUlNHSk.js} +6 -5
  46. package/dist/{TimeField.vue_vue_type_script_setup_true_lang-C1mLvOkc.js → TimeField.vue_vue_type_script_setup_true_lang-DHNC_MLt.js} +30 -29
  47. package/dist/{Timestamp.vue_vue_type_script_setup_true_lang-jCXYFLtq.js → Timestamp.vue_vue_type_script_setup_true_lang-d_KuxWjH.js} +1 -1
  48. package/dist/{UserRecord-DrbpVHh9.js → UserRecord-CwZCr9Im.js} +10 -10
  49. package/dist/{UsersList-M5tBxrox.js → UsersList-Cn19sFgv.js} +4 -4
  50. package/dist/access/index.js +4 -4
  51. package/dist/app/application.d.ts +2 -0
  52. package/dist/app/index.js +2 -2
  53. package/dist/app/validate.d.ts +3 -1
  54. package/dist/{application-C900Wz0A.js → application-CDSweJb9.js} +144 -142
  55. package/dist/back-LcLlFodC.js +63 -0
  56. package/dist/{chrome-nUcmVu8G.js → chrome-kMBKIB1N.js} +2 -2
  57. package/dist/collection/authors.d.ts +27 -0
  58. package/dist/collection/index.d.ts +2 -0
  59. package/dist/collection/index.js +81 -76
  60. package/dist/config/index.d.ts +42 -0
  61. package/dist/config/index.js +12 -3
  62. package/dist/content/Panel.vue.d.ts +1 -1
  63. package/dist/content/index.js +2 -2
  64. package/dist/{contributions-9CPT-Z5v.js → contributions-B0x5x5xD.js} +1 -1
  65. package/dist/form/CommandDialog.vue.d.ts +1 -1
  66. package/dist/form/DateField.vue.d.ts +1 -1
  67. package/dist/form/DateTimeField.vue.d.ts +1 -1
  68. package/dist/form/FileField.vue.d.ts +1 -1
  69. package/dist/form/FormRow.vue.d.ts +2 -2
  70. package/dist/form/I18nField.vue.d.ts +2 -2
  71. package/dist/form/TextField.vue.d.ts +1 -1
  72. package/dist/form/TextareaField.vue.d.ts +2 -2
  73. package/dist/form/date/value.d.ts +21 -0
  74. package/dist/form/index.d.ts +1 -0
  75. package/dist/form/index.js +745 -715
  76. package/dist/format/format.d.ts +8 -2
  77. package/dist/format/index.js +1 -1
  78. package/dist/format-C_HXlOYQ.js +136 -0
  79. package/dist/{guards-6fJxfUtk.js → guards-CNJ0ATVC.js} +1 -1
  80. package/dist/i18n/index.d.ts +14 -2
  81. package/dist/i18n/index.js +84 -73
  82. package/dist/i18n/messages.d.ts +10 -1
  83. package/dist/i18n/runtime.d.ts +3 -1
  84. package/dist/identity/index.js +3 -3
  85. package/dist/identity/profile/EmailChangeDialog.vue.d.ts +2 -2
  86. package/dist/identity/users/list.d.ts +1 -1
  87. package/dist/incidents/index.js +1 -1
  88. package/dist/{index-_hDHxrt5.js → index-1HS7O2-e.js} +9 -9
  89. package/dist/{index-DM_nWOYf.js → index-BA2w8uwD.js} +86 -86
  90. package/dist/{index-vES_D5ls.js → index-SLJWm40T.js} +4 -4
  91. package/dist/index.d.ts +1 -1
  92. package/dist/index.js +1 -1
  93. package/dist/modal/DiscardChangesModal.vue.d.ts +2 -2
  94. package/dist/modal/Modal.vue.d.ts +2 -2
  95. package/dist/modal/Sheet.vue.d.ts +2 -2
  96. package/dist/modules/identity/routes.d.ts +1 -1
  97. package/dist/modules/identity/schemas.d.ts +2 -2
  98. package/dist/{navigation-DMJ6akat.js → navigation-d-JAPBGA.js} +1 -1
  99. package/dist/{neighbors-DrEahe7B.js → neighbors-Dg_LU9ry.js} +32 -31
  100. package/dist/notifications/index.js +1 -1
  101. package/dist/onboarding/index.js +1 -1
  102. package/dist/options-mOOX6JSS.js +214 -0
  103. package/dist/overlay/AlertDialog.vue.d.ts +3 -3
  104. package/dist/overlay/Menu.vue.d.ts +2 -2
  105. package/dist/overlay/PhotoViewer.vue.d.ts +2 -2
  106. package/dist/overlay/Popover.vue.d.ts +2 -2
  107. package/dist/page/SectionNavigator.vue.d.ts +1 -1
  108. package/dist/page/SectionPanel.vue.d.ts +1 -1
  109. package/dist/page/back.d.ts +37 -0
  110. package/dist/page/index.d.ts +1 -0
  111. package/dist/page/index.js +46 -42
  112. package/dist/phone/index.js +57 -56
  113. package/dist/platform/index.d.ts +10 -1
  114. package/dist/platform/index.js +16 -15
  115. package/dist/platform/platform.d.ts +4 -2
  116. package/dist/{platform-ORzRR3Tw.js → platform-DU9QFts8.js} +7 -6
  117. package/dist/playwright/config.d.ts +33 -0
  118. package/dist/playwright/index.d.ts +2 -0
  119. package/dist/playwright/index.js +192 -171
  120. package/dist/resource/index.js +1 -1
  121. package/dist/router/index.js +3 -3
  122. package/dist/router/sections.d.ts +1 -1
  123. package/dist/{rowLayout-QKfNHsML.js → rowLayout-PIuD7MGo.js} +2 -2
  124. package/dist/sections-BpiRLntE.js +54 -0
  125. package/dist/{serverMessages-Ce8-MK4e.js → serverMessages-C_KkDvpT.js} +1 -1
  126. package/dist/shell/index.js +5 -5
  127. package/dist/state/NextStepPanel.vue.d.ts +63 -0
  128. package/dist/state/PhaseTiles.vue.d.ts +20 -0
  129. package/dist/state/PhaseTrack.vue.d.ts +48 -0
  130. package/dist/state/RequirementList.vue.d.ts +10 -0
  131. package/dist/state/TodoRow.vue.d.ts +52 -0
  132. package/dist/state/index.d.ts +9 -0
  133. package/dist/state/index.js +731 -126
  134. package/dist/state/phaseStep.d.ts +7 -0
  135. package/dist/state/phaseTile.d.ts +10 -0
  136. package/dist/state/requirementItem.d.ts +16 -0
  137. package/dist/state/todoRow.d.ts +8 -0
  138. package/dist/{state-QDaxntgR.js → state-z1iPF1DT.js} +1 -1
  139. package/dist/styles.css +1 -1
  140. package/dist/{suggestions-q_v3M7G6.js → suggestions-DeMgs_ki.js} +1 -1
  141. package/dist/testing/format.d.ts +1 -1
  142. package/dist/testing/index.js +31 -31
  143. package/dist/{useCommand-DAMgQ5NE.js → useCommand-DQKvro1n.js} +2 -2
  144. package/dist/{useGroupSheet-B-Hs4gNO.js → useGroupSheet-CRw3MUmX.js} +3 -3
  145. package/dist/{usePreferences-BfMXVbSO.js → usePreferences-DB29UTFD.js} +1 -1
  146. package/dist/{useRecordDialog-QPKFH1Ww.js → useRecordDialog-0azHxxvm.js} +1 -1
  147. package/dist/{useResourceForm-Oa6bk3NI.js → useResourceForm-zVuWerSn.js} +1 -1
  148. package/dist/{useSaveChrome-7huA3FzR.js → useSaveChrome-DB9OwIjT.js} +1 -1
  149. package/dist/{useTypedEntry-CITij2C_.js → useTypedEntry-BsMV66Yc.js} +46 -45
  150. package/package.json +1 -1
  151. package/dist/format-Cp1h0vsC.js +0 -125
  152. package/dist/options-B48UiYsG.js +0 -368
  153. package/dist/sections-DI_JhgQG.js +0 -53
@@ -1,14 +1,14 @@
1
1
  import { nextTick as A, createApp as E, defineComponent as m, h as u } from "vue";
2
2
  import { createMemoryHistory as w, createRouter as $, RouterView as O } from "vue-router";
3
- import { c as k } from "../application-C900Wz0A.js";
4
- import { a as M, i as R } from "../platform-ORzRR3Tw.js";
3
+ import { c as k } from "../application-CDSweJb9.js";
4
+ import { a as M, i as R } from "../platform-DU9QFts8.js";
5
5
  import { createI18n as S } from "vue-i18n";
6
6
  import { coreMessages as x } from "../i18n/index.js";
7
- import { i as L, c as C } from "../format-Cp1h0vsC.js";
7
+ import { i as L, c as C } from "../format-C_HXlOYQ.js";
8
8
  function X() {
9
9
  let e, t;
10
- return { promise: new Promise((s, o) => {
11
- e = s, t = o;
10
+ return { promise: new Promise((s, r) => {
11
+ e = s, t = r;
12
12
  }), resolve: e, reject: t };
13
13
  }
14
14
  async function Y(e = 5) {
@@ -18,9 +18,9 @@ async function Y(e = 5) {
18
18
  const h = (e) => typeof e == "object" && e !== null && !Array.isArray(e);
19
19
  function v(e, t) {
20
20
  const n = { ...e };
21
- for (const [s, o] of Object.entries(t)) {
21
+ for (const [s, r] of Object.entries(t)) {
22
22
  const a = n[s];
23
- n[s] = h(o) && h(a) ? v(a, o) : o;
23
+ n[s] = h(r) && h(a) ? v(a, r) : r;
24
24
  }
25
25
  return n;
26
26
  }
@@ -30,15 +30,15 @@ function B(e = {}) {
30
30
  return S({ legacy: !1, locale: e.locale ?? "en", fallbackLocale: "en", messages: t });
31
31
  }
32
32
  function F(e, t = {}) {
33
- const n = e.global.t && ((s) => e.global.t(s));
33
+ const n = e.global.t && ((s, r) => e.global.t(s, r ?? {}));
34
34
  return { install: (s) => L(s, C({ locale: () => e.global.locale.value, translate: n, ...t })) };
35
35
  }
36
36
  function U(e, t, n = "all", s) {
37
- const o = t === void 0 ? { level: e } : { level: e, id: t };
38
- return { scope: o, qualifier: n, clauses: s ?? [{ scope: o, qualifier: n }] };
37
+ const r = t === void 0 ? { level: e } : { level: e, id: t };
38
+ return { scope: r, qualifier: n, clauses: s ?? [{ scope: r, qualifier: n }] };
39
39
  }
40
40
  function z(e = {}) {
41
- const { permissions: t = [] } = e, n = Array.isArray(t) ? Object.fromEntries(t.map((o) => [o, U("organization")])) : { ...t }, s = { root: e.root ?? !1, permissions: n, unavailable: e.unavailable ?? [] };
41
+ const { permissions: t = [] } = e, n = Array.isArray(t) ? Object.fromEntries(t.map((r) => [r, U("organization")])) : { ...t }, s = { root: e.root ?? !1, permissions: n, unavailable: e.unavailable ?? [] };
42
42
  return {
43
43
  user: e.user ?? { id: 1 },
44
44
  expiresAt: e.expiresAt ?? null,
@@ -51,7 +51,7 @@ const G = async (e, t) => {
51
51
  throw new Error(`createTestPlatform: an unexpected request ${(t.method ?? "GET").toUpperCase()} ${e}. Pass a \`transport\` that answers it (scriptedTransport or routedTransport).`);
52
52
  };
53
53
  function T(e = {}) {
54
- const { user: t, permissions: n, unavailable: s, root: o, navigation: a, expiresAt: r, preferences: c, transport: i, config: l, session: f, ...j } = e, p = t === null ? null : z({ user: t, permissions: n, unavailable: s, root: o, navigation: a, expiresAt: r, preferences: c }), P = f ?? { load: async () => p, signOut: async () => {
54
+ const { user: t, permissions: n, unavailable: s, root: r, navigation: a, expiresAt: o, preferences: c, transport: i, config: l, session: f, ...j } = e, p = t === null ? null : z({ user: t, permissions: n, unavailable: s, root: r, navigation: a, expiresAt: o, preferences: c }), P = f ?? { load: async () => p, signOut: async () => {
55
55
  } }, d = M({
56
56
  ...j,
57
57
  config: { apiBase: "", locale: "en", appName: "Test app", capabilities: [], ...l },
@@ -63,8 +63,8 @@ function T(e = {}) {
63
63
  const H = m({ name: "TestBlankPage", render: () => u("div") }), g = m({ name: "TestRouteStub", render: () => u("div", [u(O)]) });
64
64
  function I(e) {
65
65
  return e.map((t) => {
66
- const { component: n, components: s, children: o, ...a } = t, r = { ...a };
67
- return o && (r.children = I(o)), s ? r.components = Object.fromEntries(Object.keys(s).map((c) => [c, g])) : n !== void 0 && (r.component = g), r;
66
+ const { component: n, components: s, children: r, ...a } = t, o = { ...a };
67
+ return r && (o.children = I(r)), s ? o.components = Object.fromEntries(Object.keys(s).map((c) => [c, g])) : n !== void 0 && (o.component = g), o;
68
68
  });
69
69
  }
70
70
  function N(e = {}) {
@@ -86,7 +86,7 @@ function Z(e, t = N()) {
86
86
  }
87
87
  })
88
88
  );
89
- for (const o of t.plugins) s.use(o);
89
+ for (const r of t.plugins) s.use(r);
90
90
  return s.mount(document.createElement("div")), { result: n, app: s, unmount: () => s.unmount() };
91
91
  }
92
92
  function q(e = {}) {
@@ -106,24 +106,24 @@ function ee(e, t = {}) {
106
106
  }
107
107
  function te(e) {
108
108
  const t = [];
109
- return { load: (s, o) => (t.push({ query: s, signal: o.signal }), Promise.resolve(e(s, o, t.length))), calls: t };
109
+ return { load: (s, r) => (t.push({ query: s, signal: r.signal }), Promise.resolve(e(s, r, t.length))), calls: t };
110
110
  }
111
111
  function ne(e = {}) {
112
- const t = { compact: !1, narrow: !1, reducedMotion: !1, standalone: !1, ...e }, n = window.matchMedia, s = /* @__PURE__ */ new Set(), o = (r) => r.includes("prefers-reduced-motion") ? t.reducedMotion : r.includes("display-mode: standalone") ? t.standalone : r.includes("min-width: 48rem") ? !t.compact : r.includes("max-width: 1023px") ? t.narrow || t.compact : r.includes("pointer: coarse") || r.includes("max-width: 47.999rem") ? t.compact : !1, a = (r) => r.split(",").some(o);
113
- return window.matchMedia = ((r) => {
114
- const c = { query: r, last: a(r), listeners: /* @__PURE__ */ new Set() };
112
+ const t = { compact: !1, narrow: !1, reducedMotion: !1, standalone: !1, ...e }, n = window.matchMedia, s = /* @__PURE__ */ new Set(), r = (o) => o.includes("prefers-reduced-motion") ? t.reducedMotion : o.includes("display-mode: standalone") ? t.standalone : o.includes("min-width: 48rem") ? !t.compact : o.includes("max-width: 1023px") ? t.narrow || t.compact : o.includes("pointer: coarse") || o.includes("max-width: 47.999rem") ? t.compact : !1, a = (o) => o.split(",").some(r);
113
+ return window.matchMedia = ((o) => {
114
+ const c = { query: o, last: a(o), listeners: /* @__PURE__ */ new Set() };
115
115
  return s.add(c), {
116
- media: r,
116
+ media: o,
117
117
  get matches() {
118
- return a(r);
118
+ return a(o);
119
119
  },
120
120
  addEventListener: (i, l) => c.listeners.add(l),
121
121
  removeEventListener: (i, l) => c.listeners.delete(l)
122
122
  };
123
123
  }), {
124
124
  state: t,
125
- set(r) {
126
- Object.assign(t, r);
125
+ set(o) {
126
+ Object.assign(t, o);
127
127
  for (const c of s) {
128
128
  const i = a(c.query);
129
129
  i !== c.last && (c.last = i, c.listeners.forEach((l) => l()));
@@ -146,21 +146,21 @@ async function y(e, t) {
146
146
  }
147
147
  function re(...e) {
148
148
  const t = [], n = [...e];
149
- return { transport: async (o, a) => {
150
- const r = b(o, a);
151
- t.push(r);
149
+ return { transport: async (r, a) => {
150
+ const o = b(r, a);
151
+ t.push(o);
152
152
  const c = n.length > 1 ? n.shift() : n[0];
153
153
  if (c === void 0) throw new Error("scriptedTransport: no answer left");
154
- return y(c, r);
154
+ return y(c, o);
155
155
  }, calls: t };
156
156
  }
157
157
  function oe(e) {
158
158
  const t = [];
159
- return { transport: async (s, o) => {
160
- const a = b(s, o);
159
+ return { transport: async (s, r) => {
160
+ const a = b(s, r);
161
161
  t.push(a);
162
- const { pathname: r, search: c } = new URL(s, "http://test.invalid"), i = e[`${a.method} ${r}${c}`] ?? e[`${a.method} ${r}`];
163
- if (i === void 0) throw new Error(`routedTransport: no route for ${a.method} ${r}${c}; it has ${Object.keys(e).join(", ") || "none"}`);
162
+ const { pathname: o, search: c } = new URL(s, "http://test.invalid"), i = e[`${a.method} ${o}${c}`] ?? e[`${a.method} ${o}`];
163
+ if (i === void 0) throw new Error(`routedTransport: no route for ${a.method} ${o}${c}; it has ${Object.keys(e).join(", ") || "none"}`);
164
164
  return y(i, a);
165
165
  }, calls: t };
166
166
  }
@@ -4,8 +4,8 @@ import { f as R } from "./useDialog-B4_MpX2v.js";
4
4
  import { _ as U } from "./Modal.vue_vue_type_script_setup_true_lang-CZ7WrDwu.js";
5
5
  import { _ as G } from "./AlertDialog.vue_vue_type_script_setup_true_lang-WuGvAOrj.js";
6
6
  import { D as M } from "./shortcut-oixX55SZ.js";
7
- import { d as P } from "./options-B48UiYsG.js";
8
- import { _ as W, u as Y } from "./FormGroup.vue_vue_type_script_setup_true_lang-dsO1m9Mm.js";
7
+ import { c as P } from "./FormRow.vue_vue_type_script_setup_true_lang-CpgNVQF4.js";
8
+ import { _ as W, u as Y } from "./FormGroup.vue_vue_type_script_setup_true_lang-lvAuBG-0.js";
9
9
  import { a as j } from "./leaveGuard-Cc8yeLxM.js";
10
10
  const c = "input:not([type=hidden]):not([disabled]), textarea:not([disabled]), select:not([disabled]), button:not([disabled]), [tabindex]:not([tabindex='-1'])";
11
11
  async function H(t = document, r) {
@@ -3,9 +3,9 @@ import { useI18n as Q } from "vue-i18n";
3
3
  import { _ as oe } from "./Modal.vue_vue_type_script_setup_true_lang-CZ7WrDwu.js";
4
4
  import { _ as q } from "./Banner.vue_vue_type_script_setup_true_lang-sv0phngk.js";
5
5
  import { D as ne } from "./shortcut-oixX55SZ.js";
6
- import { _ as re, r as ie, s as U, c as B, f as ue } from "./FormGroup.vue_vue_type_script_setup_true_lang-dsO1m9Mm.js";
7
- import { f as ce } from "./useCommand-DAMgQ5NE.js";
8
- import { d as de } from "./options-B48UiYsG.js";
6
+ import { _ as re, r as ie, s as U, c as B, f as ue } from "./FormGroup.vue_vue_type_script_setup_true_lang-lvAuBG-0.js";
7
+ import { f as ce } from "./useCommand-DQKvro1n.js";
8
+ import { c as de } from "./FormRow.vue_vue_type_script_setup_true_lang-CpgNVQF4.js";
9
9
  import { t as fe } from "./toast-CqSDTWRX.js";
10
10
  import { a as ve } from "./leaveGuard-Cc8yeLxM.js";
11
11
  const me = ["id", "value", "name", "disabled", "aria-label", "aria-invalid", "aria-describedby"], pe = {
@@ -1,7 +1,7 @@
1
1
  import { useI18n as u } from "vue-i18n";
2
2
  import { u as c } from "./describeError-B-NMa--w.js";
3
3
  import { t as f } from "./toast-CqSDTWRX.js";
4
- import { u as l } from "./platform-ORzRR3Tw.js";
4
+ import { u as l } from "./platform-DU9QFts8.js";
5
5
  import { i as r, p as d } from "./preferences-hYhrw8Uy.js";
6
6
  import { a as i } from "./error-CD7x0Jrz.js";
7
7
  const p = (e) => i(e) && e.kind === "unauthorized";
@@ -1,5 +1,5 @@
1
1
  import { shallowRef as t } from "vue";
2
- import { u as o } from "./useCommand-DAMgQ5NE.js";
2
+ import { u as o } from "./useCommand-DQKvro1n.js";
3
3
  function f(r) {
4
4
  const u = t(null);
5
5
  let n = null;
@@ -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 "./FormGroup.vue_vue_type_script_setup_true_lang-dsO1m9Mm.js";
2
+ import { u as i, c as h } from "./FormGroup.vue_vue_type_script_setup_true_lang-lvAuBG-0.js";
3
3
  function b(u) {
4
4
  const t = i(u), r = v(null), s = v(!1);
5
5
  let n = null;
@@ -1,6 +1,6 @@
1
1
  import { computed as u, toValue as l } from "vue";
2
2
  import { useI18n as m } from "vue-i18n";
3
- import { u as i } from "./chrome-nUcmVu8G.js";
3
+ import { a as i } from "./chrome-kMBKIB1N.js";
4
4
  import { a as n } from "./leaveGuard-Cc8yeLxM.js";
5
5
  function o(e) {
6
6
  const { t: a } = m(), r = u(() => (l(e.ready) ?? !0) && (l(e.allowed) ?? !0)), c = u(() => r.value && e.form.dirty.value);
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as B, ref as I, watch as oe, computed as _, openBlock as f, createElementBlock as b, Fragment as A, createElementVNode as h, normalizeClass as $, unref as y, createVNode as N, createTextVNode as Pe, toDisplayString as M, renderList as j, useModel as de, useId as De, useTemplateRef as ce, createCommentVNode as G, createBlock as ie, mergeModels as me, nextTick as Te, onMounted as Ee, onBeforeUnmount as Fe, normalizeStyle as X, withCtx as he } from "vue";
2
2
  import { useI18n as J } from "vue-i18n";
3
- import { u as Ce } from "./format-Cp1h0vsC.js";
3
+ import { u as Ce } from "./format-C_HXlOYQ.js";
4
4
  import { _ as je } from "./Sheet.vue_vue_type_script_setup_true_lang-BG8HUNfs.js";
5
5
  import { _ as F } from "./Icon.vue_vue_type_script_lang-BhhsFYwp.js";
6
6
  import { a as Oe } from "./mediaQuery-CygcXmFW.js";
@@ -427,45 +427,16 @@ const et = {
427
427
  ], 42, xt))
428
428
  ], 2));
429
429
  }
430
- }), wt = ["aria-label"], $t = ["disabled", "aria-pressed", "onClick"], Dt = /* @__PURE__ */ B({
431
- __name: "QuickChips",
432
- props: {
433
- items: {},
434
- selected: { default: null },
435
- variant: { default: "popover" }
436
- },
437
- emits: ["pick"],
438
- setup(e, { emit: t }) {
439
- const a = e, n = t, { t: u } = J();
440
- return (m, r) => (f(), b("div", {
441
- role: "group",
442
- "aria-label": y(u)("core.form.date.quick"),
443
- class: "flex flex-wrap gap-1.5",
444
- "data-test": "quick-picks"
445
- }, [
446
- (f(!0), b(A, null, j(a.items, (d) => (f(), b("button", {
447
- key: d.key,
448
- type: "button",
449
- disabled: d.disabled,
450
- "aria-pressed": d.value === a.selected,
451
- class: $(["cursor-pointer whitespace-nowrap rounded-full font-medium transition-colors duration-motion-fast focus-visible:outline-2 focus-visible:outline-border-focus disabled:cursor-default disabled:opacity-45", [
452
- a.variant === "sheet" ? "px-3 py-2 text-subheadline" : "px-2.5 py-1.5 text-footnote",
453
- d.value === a.selected ? a.variant === "sheet" ? "bg-tint text-content-on-tint" : "bg-tint-soft text-content-link" : a.variant === "sheet" ? "bg-surface-cell text-content-strong shadow-group" : "bg-fill text-content-strong hover:bg-fill-strong"
454
- ]]),
455
- onClick: (o) => n("pick", d.value)
456
- }, M(d.label), 11, $t))), 128))
457
- ], 8, wt));
458
- }
459
- }), Tt = /^(\d{2}):(\d{2})$/, ke = (e) => String(e).padStart(2, "0");
430
+ }), wt = /^(\d{2}):(\d{2})$/, ke = (e) => String(e).padStart(2, "0");
460
431
  function Z(e, t) {
461
432
  return !Number.isInteger(e) || !Number.isInteger(t) || e < 0 || e > 23 || t < 0 || t > 59 ? null : `${ke(e)}:${ke(t)}`;
462
433
  }
463
434
  function Le(e) {
464
- const t = e ? Tt.exec(e) : null;
435
+ const t = e ? wt.exec(e) : null;
465
436
  return t && Z(Number(t[1]), Number(t[2])) ? { hour: Number(t[1]), minute: Number(t[2]) } : null;
466
437
  }
467
438
  const ea = (e) => Le(e) !== null;
468
- function Ct(e) {
439
+ function $t(e) {
469
440
  const t = Number.isInteger(e) && e >= 1 && e <= 30 ? e : 1;
470
441
  return Array.from({ length: Math.ceil(60 / t) }, (a, n) => n * t);
471
442
  }
@@ -488,12 +459,41 @@ function ta(e, t = 1) {
488
459
  const r = Z(n, u);
489
460
  return r ? t > 1 && u % t !== 0 ? { error: "step" } : { time: r } : { error: "invalid" };
490
461
  }
491
- const Mt = (e, t) => `${e}T${t}`;
492
- function Vt(e) {
462
+ const Dt = (e, t) => `${e}T${t}`;
463
+ function Tt(e) {
493
464
  const t = e ? /^(\d{4}-\d{2}-\d{2})(?:[T ](\d{2}:\d{2}))?/.exec(e) : null;
494
465
  return { day: t?.[1] ?? null, time: t?.[2] ?? null };
495
466
  }
496
- const Nt = ["aria-label", "aria-activedescendant"], St = ["id", "aria-selected", "data-value", "onClick"], Lt = ["aria-label", "aria-activedescendant"], Ut = ["id", "aria-selected", "data-value", "onClick"], q = 30, $e = 150, ae = /* @__PURE__ */ B({
467
+ const Ct = ["aria-label"], Mt = ["disabled", "aria-pressed", "onClick"], Vt = /* @__PURE__ */ B({
468
+ __name: "QuickChips",
469
+ props: {
470
+ items: {},
471
+ selected: { default: null },
472
+ variant: { default: "popover" }
473
+ },
474
+ emits: ["pick"],
475
+ setup(e, { emit: t }) {
476
+ const a = e, n = t, { t: u } = J();
477
+ return (m, r) => (f(), b("div", {
478
+ role: "group",
479
+ "aria-label": y(u)("core.form.date.quick"),
480
+ class: "flex flex-wrap gap-1.5",
481
+ "data-test": "quick-picks"
482
+ }, [
483
+ (f(!0), b(A, null, j(a.items, (d) => (f(), b("button", {
484
+ key: d.key,
485
+ type: "button",
486
+ disabled: d.disabled,
487
+ "aria-pressed": d.value === a.selected,
488
+ class: $(["cursor-pointer whitespace-nowrap rounded-full font-medium transition-colors duration-motion-fast focus-visible:outline-2 focus-visible:outline-border-focus disabled:cursor-default disabled:opacity-45", [
489
+ a.variant === "sheet" ? "px-3 py-2 text-subheadline" : "px-2.5 py-1.5 text-footnote",
490
+ d.value === a.selected ? a.variant === "sheet" ? "bg-tint text-content-on-tint" : "bg-tint-soft text-content-link" : a.variant === "sheet" ? "bg-surface-cell text-content-strong shadow-group" : "bg-fill text-content-strong hover:bg-fill-strong"
491
+ ]]),
492
+ onClick: (o) => n("pick", d.value)
493
+ }, M(d.label), 11, Mt))), 128))
494
+ ], 8, Ct));
495
+ }
496
+ }), Nt = ["aria-label", "aria-activedescendant"], St = ["id", "aria-selected", "data-value", "onClick"], Lt = ["aria-label", "aria-activedescendant"], Ut = ["id", "aria-selected", "data-value", "onClick"], q = 30, $e = 150, ae = /* @__PURE__ */ B({
497
497
  __name: "ValueColumn",
498
498
  props: /* @__PURE__ */ me({
499
499
  values: {},
@@ -621,7 +621,7 @@ const Nt = ["aria-label", "aria-activedescendant"], St = ["id", "aria-selected",
621
621
  }),
622
622
  emits: ["update:modelValue"],
623
623
  setup(e) {
624
- const t = e, a = de(e, "modelValue"), { t: n } = J(), u = _(() => Le(a.value)), m = _(() => Ct(t.step)), r = _({
624
+ const t = e, a = de(e, "modelValue"), { t: n } = J(), u = _(() => Le(a.value)), m = _(() => $t(t.step)), r = _({
625
625
  get: () => u.value?.hour ?? null,
626
626
  set: (o) => {
627
627
  o !== null && (a.value = Z(o, u.value?.minute ?? 0));
@@ -705,11 +705,11 @@ const Nt = ["aria-label", "aria-activedescendant"], St = ["id", "aria-selected",
705
705
  setup(e, { expose: t, emit: a }) {
706
706
  const n = e, u = a, { t: m } = J(), r = Ce(), d = ce("sheet"), o = _(() => n.mode !== "time"), c = _(() => n.mode !== "date"), v = I(null), w = I(null);
707
707
  function D() {
708
- const l = n.mode === "time" ? { day: null, time: n.modelValue } : n.mode === "date" ? { day: n.modelValue, time: null } : Vt(n.modelValue);
708
+ const l = n.mode === "time" ? { day: null, time: n.modelValue } : n.mode === "date" ? { day: n.modelValue, time: null } : Tt(n.modelValue);
709
709
  v.value = ne(l.day) ? l.day : null, w.value = c.value ? l.time ?? we(n.step) : null, d.value?.present();
710
710
  }
711
711
  function Y() {
712
- return n.mode === "time" ? w.value : v.value ? n.mode === "date" ? v.value : Mt(v.value, w.value ?? we(n.step)) : null;
712
+ return n.mode === "time" ? w.value : v.value ? n.mode === "date" ? v.value : Dt(v.value, w.value ?? we(n.step)) : null;
713
713
  }
714
714
  function S() {
715
715
  u("update:modelValue", Y()), d.value?.dismiss();
@@ -757,7 +757,7 @@ const Nt = ["aria-label", "aria-activedescendant"], St = ["id", "aria-selected",
757
757
  ]),
758
758
  default: he(() => [
759
759
  h("div", Ft, [
760
- n.shortcuts.length > 0 ? (f(), ie(Dt, {
760
+ n.shortcuts.length > 0 ? (f(), ie(Vt, {
761
761
  key: 0,
762
762
  variant: "sheet",
763
763
  items: n.shortcuts,
@@ -835,7 +835,7 @@ export {
835
835
  aa as _,
836
836
  Le as a,
837
837
  At as b,
838
- Dt as c,
838
+ Vt as c,
839
839
  la as d,
840
840
  ue as e,
841
841
  U as f,
@@ -847,11 +847,12 @@ export {
847
847
  _t as l,
848
848
  O as m,
849
849
  Z as n,
850
- Mt as o,
850
+ Dt as o,
851
851
  ta as p,
852
- ft as q,
852
+ R as q,
853
853
  ra as r,
854
- Vt as s,
854
+ Tt as s,
855
855
  we as t,
856
- sa as u
856
+ sa as u,
857
+ ft as v
857
858
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wssto2/vue-core",
3
- "version": "0.15.3",
3
+ "version": "0.17.0",
4
4
  "goCore": "v1.19.0",
5
5
  "description": "Shared Vue 3 library for go-core applications: app shell, list / record / form pages and their controls.",
6
6
  "keywords": [
@@ -1,125 +0,0 @@
1
- import { d as x } from "./context-Ch1r4fdN.js";
2
- const E = { bs: "sr-Latn-BA" }, M = (e, r = {}) => r[e] ?? E[e] ?? e, L = /^(\d{4})-(\d{2})-(\d{2})$/, S = /^\d{4}-\d{2}-\d{2} \d{2}:\d{2}/, A = ["0000-00-00", "0001-01-01", "1970-01-01"];
3
- function b(e) {
4
- if (e == null || e === "") return null;
5
- let r;
6
- if (e instanceof Date) r = e;
7
- else if (typeof e == "number") r = new Date(e);
8
- else {
9
- if (A.some((o) => e.startsWith(o))) return null;
10
- const c = L.exec(e);
11
- c ? r = new Date(Number(c[1]), Number(c[2]) - 1, Number(c[3])) : r = new Date(S.test(e) ? e.replace(" ", "T") : e);
12
- }
13
- return Number.isNaN(r.getTime()) || r.getTime() <= 0 ? null : r;
14
- }
15
- const F = { year: "numeric", month: "2-digit", day: "2-digit" }, T = { hour: "2-digit", minute: "2-digit" }, h = [
16
- ["year", 31536e3],
17
- ["month", 2592e3],
18
- ["week", 604800],
19
- ["day", 86400],
20
- ["hour", 3600],
21
- ["minute", 60],
22
- ["second", 1]
23
- ], Y = "sr-Latn-BA", N = ["januar", "februar", "mart", "april", "maj", "juni", "juli", "august", "septembar", "oktobar", "novembar", "decembar"], j = ["januara", "februara", "marta", "aprila", "maja", "juna", "jula", "augusta", "septembra", "oktobra", "novembra", "decembra"];
24
- function O(e, r, c) {
25
- const o = new Intl.DateTimeFormat(r, c);
26
- if (r !== Y || c.month !== "long" && c.month !== "short") return o.format(e);
27
- const d = e.getMonth();
28
- return o.formatToParts(e).map((l) => l.type !== "month" ? l.value : c.month === "short" ? N[d].slice(0, 3) : (c.day === void 0 ? N : j)[d]).join("");
29
- }
30
- const D = (e, r = 2) => String(e).padStart(r, "0");
31
- function $(e, r, { group: c, decimal: o }) {
32
- const d = r?.minimumFractionDigits ?? 0, l = Math.max(d, r?.maximumFractionDigits ?? 3), [g = "", a = ""] = e.toFixed(l).split(".");
33
- let i = a;
34
- for (; i.length > d && i.endsWith("0"); ) i = i.slice(0, -1);
35
- const t = r?.useGrouping === !1 ? g : g.replace(/\B(?=(\d{3})+(?!\d))/g, c);
36
- return i ? `${t}${o}${i}` : t;
37
- }
38
- function H(e = {}) {
39
- const r = /* @__PURE__ */ new Map(), c = (t, n) => {
40
- let m = r.get(t);
41
- return m || (m = n(), r.set(t, m)), m;
42
- }, o = (t) => M(t, e.intlLocale), d = (t, n) => c(`d|${t}|${JSON.stringify(n)}`, () => new Intl.DateTimeFormat(o(t), n)), l = (t, n) => c(`n|${t}|${JSON.stringify(n ?? {})}`, () => new Intl.NumberFormat(o(t), n)), { datePattern: g, numberSymbols: a } = e, i = (t, n) => n.replace(
43
- /YYYY|MM|DD|HH|mm/g,
44
- (m) => m === "YYYY" ? D(t.getFullYear(), 4) : D(m === "MM" ? t.getMonth() + 1 : m === "DD" ? t.getDate() : m === "HH" ? t.getHours() : t.getMinutes())
45
- );
46
- return {
47
- date: (t, n) => g?.[n] ? i(t, g[n]) : d(n, F).format(t),
48
- dateTime: (t, n) => g?.[n] ? i(t, `${g[n]} HH:mm`) : d(n, { ...F, ...T }).format(t),
49
- time: (t, n) => d(n, T).format(t),
50
- number: (t, n, m) => a && (m?.style ?? "decimal") === "decimal" ? $(t, m, a) : l(n, m).format(t),
51
- money(t, n, m, s) {
52
- const u = c(`m|${m}|${n}|${JSON.stringify(s ?? {})}`, () => new Intl.NumberFormat(o(m), { ...s, style: "currency", currency: n }));
53
- if (!a) return u.format(t);
54
- const y = u.formatToParts(t).find((w) => w.type === "currency")?.value ?? n, f = s?.maximumFractionDigits ?? u.resolvedOptions().maximumFractionDigits ?? 2;
55
- return `${$(t, { minimumFractionDigits: f, maximumFractionDigits: f }, a)} ${y}`;
56
- },
57
- relative(t, n, m) {
58
- const s = Math.trunc((t.getTime() - m.getTime()) / 1e3), [u, y] = h.find(([, f]) => Math.abs(s) >= f) ?? h[h.length - 1];
59
- return c(`r|${n}`, () => new Intl.RelativeTimeFormat(o(n), { numeric: "auto" })).format(Math.trunc(s / y), u);
60
- }
61
- };
62
- }
63
- const I = (e, r) => e.getFullYear() === r.getFullYear() && e.getMonth() === r.getMonth() && e.getDate() === r.getDate();
64
- function B(e) {
65
- const r = { ...H(e), ...e.formatters }, c = (a) => typeof a == "number" && Number.isFinite(a), o = () => M(e.locale(), e.intlLocale), d = (a) => {
66
- const i = b(a);
67
- return i ? r.time(i, e.locale()) : "";
68
- }, l = (a, i) => {
69
- const t = b(a);
70
- return t ? i ? O(t, o(), i) : r.date(t, e.locale()) : "";
71
- }, g = (a, { inSentence: i = !1, now: t = /* @__PURE__ */ new Date() } = {}) => {
72
- const n = b(a);
73
- if (!n || !e.translate) return l(a);
74
- const m = new Date(t.getFullYear(), t.getMonth(), t.getDate() - 1), s = I(n, t) ? "core.activity.today" : I(n, m) ? "core.activity.yesterday" : null;
75
- if (!s) return l(a);
76
- const u = e.translate(s);
77
- return i ? u.toLocaleLowerCase(o()) : u.charAt(0).toLocaleUpperCase(o()) + u.slice(1);
78
- };
79
- return {
80
- get locale() {
81
- return e.locale();
82
- },
83
- get intlLocale() {
84
- return o();
85
- },
86
- date: l,
87
- dateTime: (a) => {
88
- const i = b(a);
89
- return i ? r.dateTime(i, e.locale()) : "";
90
- },
91
- time: d,
92
- number: (a, i) => c(a) ? r.number(a, e.locale(), i) : e.emptyNumber ?? "",
93
- get currencySymbol() {
94
- return e.currencySymbol ?? "";
95
- },
96
- money: (a, { currency: i, decimals: t, whole: n, symbol: m = !0 } = {}) => {
97
- if (!c(a)) return "";
98
- const s = a, u = n && Number.isInteger(s) ? 0 : t, y = u === void 0 ? void 0 : { minimumFractionDigits: u, maximumFractionDigits: u };
99
- if (i && m) return r.money(s, i, e.locale(), y);
100
- const f = r.number(s, e.locale(), y ?? { minimumFractionDigits: 2, maximumFractionDigits: 2 });
101
- return m && !i && e.currencySymbol ? `${f} ${e.currencySymbol}` : f;
102
- },
103
- relative: (a, i = /* @__PURE__ */ new Date()) => {
104
- const t = b(a);
105
- return t ? r.relative(t, e.locale(), i) : "";
106
- },
107
- day: g,
108
- dayTime: (a, i) => {
109
- const t = g(a, i);
110
- return t ? `${t} · ${d(a)}` : "";
111
- }
112
- };
113
- }
114
- const [_, P] = x("vue-core.formatting");
115
- function V(e, r) {
116
- e.provide(_, r);
117
- }
118
- export {
119
- H as a,
120
- B as c,
121
- _ as f,
122
- V as i,
123
- b as t,
124
- P as u
125
- };