@wssto2/vue-core 0.9.4 → 0.11.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 (169) hide show
  1. package/CHANGELOG.md +39 -0
  2. package/dist/ActionRow.vue_vue_type_script_setup_true_lang-DybAIOHS.js +64 -0
  3. package/dist/Activity-CdkJW68R.js +169 -0
  4. package/dist/{AdaptivePageShell.vue_vue_type_script_setup_true_lang-DdJOodn8.js → AdaptivePageShell.vue_vue_type_script_setup_true_lang-D5i77H6S.js} +147 -159
  5. package/dist/{AsyncSection.vue_vue_type_script_setup_true_lang-BdeOKqz_.js → AsyncSection.vue_vue_type_script_setup_true_lang-DGzQ-Snp.js} +1 -1
  6. package/dist/BottomDockPortal.vue_vue_type_script_setup_true_lang-DmwR-2SP.js +17 -0
  7. package/dist/Button.vue_vue_type_script_setup_true_lang-C74hcb0N.js +123 -0
  8. package/dist/Changes-DxK_QfiB.js +69 -0
  9. package/dist/{CollectionPage.vue_vue_type_script_setup_true_lang-DHcekGNn.js → CollectionPage.vue_vue_type_script_setup_true_lang-x0jyJ01f.js} +19 -18
  10. package/dist/{DataTable.vue_vue_type_script_setup_true_lang-8kBsNRuq.js → DataTable.vue_vue_type_script_setup_true_lang-C_ZytnW-.js} +1 -1
  11. package/dist/{DateField.vue_vue_type_script_setup_true_lang-BhKdCVFn.js → DateField.vue_vue_type_script_setup_true_lang-CeNwBbJT.js} +1 -1
  12. package/dist/{DeadLetters-Bb5pPlOY.js → DeadLetters-DnA7LP1w.js} +5 -6
  13. package/dist/DrawnCheck.vue_vue_type_script_setup_true_lang-9DzDJlIA.js +38 -0
  14. package/dist/FormGroup.vue_vue_type_script_setup_true_lang-D6jYfNjW.js +427 -0
  15. package/dist/{FormView.vue_vue_type_script_setup_true_lang-aaNnMIOi.js → FormView.vue_vue_type_script_setup_true_lang-DvbPEiNQ.js} +2 -2
  16. package/dist/{General-BAG7S6wV.js → General-2matxl2Y.js} +23 -24
  17. package/dist/Highlight.vue_vue_type_script_setup_true_lang-DZGBmwcX.js +29 -0
  18. package/dist/{IncidentRecord-D8aOpNHo.js → IncidentRecord-Bt3G4HlX.js} +14 -15
  19. package/dist/{IncidentsList-C0cFl0Db.js → IncidentsList-2iwgqp9J.js} +3 -3
  20. package/dist/{Modal.vue_vue_type_script_setup_true_lang-BlHhdmMy.js → Modal.vue_vue_type_script_setup_true_lang-DDS0iEnn.js} +9 -8
  21. package/dist/{NewRolePage-C6Iu-EQJ.js → NewRolePage-DhGFwvk3.js} +4 -4
  22. package/dist/{NumberField.vue_vue_type_script_setup_true_lang-TGGAq8J-.js → NumberField.vue_vue_type_script_setup_true_lang-B3UrXNqH.js} +1 -1
  23. package/dist/{PersonAccess.vue_vue_type_script_setup_true_lang-qz1tmYpF.js → PersonAccess.vue_vue_type_script_setup_true_lang-DbGZSNQc.js} +56 -56
  24. package/dist/ProfilePage-CpuyDBAv.js +685 -0
  25. package/dist/ProgressTrack.vue_vue_type_script_setup_true_lang-DrOm8k--.js +30 -0
  26. package/dist/{RecordHeader.vue_vue_type_script_setup_true_lang-B9mN7UxZ.js → RecordHeader.vue_vue_type_script_setup_true_lang-DqGc3Jyo.js} +1 -1
  27. package/dist/{ResourcePage.vue_vue_type_script_setup_true_lang-Cw8mGf_B.js → ResourcePage.vue_vue_type_script_setup_true_lang-DljhsTU4.js} +3 -3
  28. package/dist/{RoleEditor.vue_vue_type_script_setup_true_lang-CJPvOVDV.js → RoleEditor.vue_vue_type_script_setup_true_lang-C0FIotFA.js} +11 -12
  29. package/dist/{RolePage-Dj_ocMnM.js → RolePage-DaNv049g.js} +10 -10
  30. package/dist/{RolesPage-PXrs4O-1.js → RolesPage-6hlzJes_.js} +6 -6
  31. package/dist/SearchInput.vue_vue_type_script_setup_true_lang-w4eAqyZ9.js +32 -0
  32. package/dist/{SectionList.vue_vue_type_script_setup_true_lang-CtdF1zuv.js → SectionList.vue_vue_type_script_setup_true_lang-DR0_NsqC.js} +1 -1
  33. package/dist/{SectionNavigator.vue_vue_type_script_setup_true_lang-B5ove3rM.js → SectionNavigator.vue_vue_type_script_setup_true_lang-Dh3sXUt_.js} +2 -2
  34. package/dist/{SegmentedField.vue_vue_type_script_setup_true_lang-ChfDFAA2.js → SegmentedField.vue_vue_type_script_setup_true_lang-zv_AxpBn.js} +1 -1
  35. package/dist/{SelectField.vue_vue_type_script_setup_true_lang-BP8nAQwo.js → SelectField.vue_vue_type_script_setup_true_lang-BZwdANL3.js} +3 -3
  36. package/dist/{ServiceAccountDialog.vue_vue_type_script_setup_true_lang-aWkKwxNe.js → ServiceAccountDialog.vue_vue_type_script_setup_true_lang-FJbWxME_.js} +20 -20
  37. package/dist/{ServiceAccountRecord-bxX9yQkC.js → ServiceAccountRecord-0-JF5lRx.js} +24 -24
  38. package/dist/{ServiceAccountsList-BXE6htxk.js → ServiceAccountsList-DcsnOcf-.js} +32 -32
  39. package/dist/{Sessions--Gvc0kxw.js → Sessions-DgWhpk-i.js} +23 -24
  40. package/dist/{SettingsPage-DzDC7gD-.js → SettingsPage-BXPWATYU.js} +28 -30
  41. package/dist/{SignIn-CTI_699e.js → SignIn-DPoUwHZd.js} +9 -10
  42. package/dist/{SignInPage-HKC1bm2E.js → SignInPage-OyrVemro.js} +4 -4
  43. package/dist/SignIns-BMDrZVVp.js +64 -0
  44. package/dist/StatusLine.vue_vue_type_script_setup_true_lang-DsdQmLq6.js +56 -0
  45. package/dist/{SwitchField.vue_vue_type_script_setup_true_lang-BMA2YXTZ.js → SwitchField.vue_vue_type_script_setup_true_lang-Ds4q0bbl.js} +1 -1
  46. package/dist/{TextField.vue_vue_type_script_setup_true_lang-BFVsqcBX.js → TextField.vue_vue_type_script_setup_true_lang-CWIeeZRE.js} +2 -2
  47. package/dist/{TextareaField.vue_vue_type_script_setup_true_lang-Dyh4Hhyl.js → TextareaField.vue_vue_type_script_setup_true_lang-D2j4s96s.js} +1 -1
  48. package/dist/{TimeField.vue_vue_type_script_setup_true_lang-gGFfQLuK.js → TimeField.vue_vue_type_script_setup_true_lang-D-Em4glH.js} +1 -1
  49. package/dist/UserRecord-BW-gdCqi.js +202 -0
  50. package/dist/UsersList-B3ZF_1Dj.js +74 -0
  51. package/dist/access/index.js +4 -4
  52. package/dist/app/index.d.ts +1 -0
  53. package/dist/app/index.js +11 -10
  54. package/dist/app/languages.d.ts +8 -0
  55. package/dist/{application-BmXW6iW_.js → application-CuzT-0vW.js} +1 -1
  56. package/dist/button/index.js +6 -5
  57. package/dist/collection/Highlight.vue.d.ts +12 -0
  58. package/dist/collection/PickerModal.vue.d.ts +26 -0
  59. package/dist/collection/definition.d.ts +6 -6
  60. package/dist/collection/http.d.ts +6 -6
  61. package/dist/collection/index.d.ts +6 -1
  62. package/dist/collection/index.js +145 -85
  63. package/dist/collection/picker.d.ts +39 -0
  64. package/dist/collection/types.d.ts +9 -4
  65. package/dist/collection/useCollection.d.ts +5 -5
  66. package/dist/content/ActivityStream.vue.d.ts +62 -0
  67. package/dist/content/CommentThread.vue.d.ts +52 -0
  68. package/dist/content/Composer.vue.d.ts +36 -0
  69. package/dist/content/index.d.ts +3 -0
  70. package/dist/content/index.js +321 -56
  71. package/dist/controls/index.js +28 -54
  72. package/dist/form/index.js +132 -134
  73. package/dist/format/index.d.ts +1 -0
  74. package/dist/format/index.js +10 -6
  75. package/dist/format/slug.d.ts +8 -0
  76. package/dist/http-Dm0uXY9O.js +95 -0
  77. package/dist/i18n/index.d.ts +15 -0
  78. package/dist/i18n/index.js +89 -63
  79. package/dist/i18n/plural.d.ts +23 -0
  80. package/dist/i18n/serverMessages.d.ts +16 -0
  81. package/dist/identity/embed.d.ts +39 -0
  82. package/dist/identity/index.d.ts +22 -1
  83. package/dist/identity/index.js +40 -21
  84. package/dist/identity/session.d.ts +9 -1
  85. package/dist/identity/shared/ChangeFeed.vue.d.ts +6 -3
  86. package/dist/identity/users/context.d.ts +11 -0
  87. package/dist/identity/users/dialogs.d.ts +10 -0
  88. package/dist/identity/users/ext.d.ts +8 -0
  89. package/dist/identity/users/feature.d.ts +22 -1
  90. package/dist/identity/users/list.d.ts +12 -1
  91. package/dist/identity/users/personSections.d.ts +15 -6
  92. package/dist/identity/users/replace.d.ts +45 -0
  93. package/dist/identity/users/words.d.ts +28 -0
  94. package/dist/incidents/api.d.ts +1 -1
  95. package/dist/incidents/index.js +1 -1
  96. package/dist/{index-Dz0LkLM8.js → index-ClJeyW3F.js} +4 -4
  97. package/dist/index-Cq9TuOqH.js +1264 -0
  98. package/dist/{index-Dm-sdJJr.js → index-kEHY7hcG.js} +31 -32
  99. package/dist/index.d.ts +1 -1
  100. package/dist/index.js +1 -1
  101. package/dist/keepAlive-ClGnsIzT.js +55 -0
  102. package/dist/modal/index.js +3 -3
  103. package/dist/modules/identity/entities.d.ts +7 -0
  104. package/dist/modules/identity/routes.d.ts +8 -4
  105. package/dist/modules/identity/schemas.d.ts +16 -0
  106. package/dist/{neighbors-DVfU9T0o.js → neighbors-OyvGi233.js} +2 -2
  107. package/dist/notifications/deadletters/list.d.ts +1 -1
  108. package/dist/notifications/index.js +1 -1
  109. package/dist/{options-QuOkMKVZ.js → options-B48UiYsG.js} +2 -2
  110. package/dist/page/index.js +11 -11
  111. package/dist/phone/index.js +1 -1
  112. package/dist/pwa/AndroidInstallBanner.vue.d.ts +18 -0
  113. package/dist/pwa/InstallQrSheet.vue.d.ts +21 -0
  114. package/dist/pwa/IosInstallGuide.vue.d.ts +19 -0
  115. package/dist/pwa/QrCode.vue.d.ts +16 -0
  116. package/dist/pwa/index.d.ts +4 -0
  117. package/dist/pwa/index.js +244 -24
  118. package/dist/resource/index.js +1 -1
  119. package/dist/rowLayout-BsKEzEME.js +650 -0
  120. package/dist/shell/DarkModeRow.vue.d.ts +15 -0
  121. package/dist/shell/OfflineNotice.vue.d.ts +2 -0
  122. package/dist/shell/QuickSearchButton.vue.d.ts +2 -0
  123. package/dist/shell/QuickSearchPalette.vue.d.ts +12 -0
  124. package/dist/shell/darkMode.d.ts +26 -0
  125. package/dist/shell/index.d.ts +10 -0
  126. package/dist/shell/index.js +954 -579
  127. package/dist/shell/offlineNotice.d.ts +3 -0
  128. package/dist/shell/quickSearch.d.ts +14 -0
  129. package/dist/shell/quickSearchControl.d.ts +69 -0
  130. package/dist/shortcut-DUR6yPWA.js +93 -0
  131. package/dist/state/BackgroundTaskCapsule.vue.d.ts +18 -0
  132. package/dist/state/backgroundTasks.d.ts +58 -0
  133. package/dist/state/index.d.ts +4 -0
  134. package/dist/state/index.js +194 -80
  135. package/dist/state/useCountUp.d.ts +9 -0
  136. package/dist/styles.css +1 -1
  137. package/dist/{suggestions-BVQhoXzS.js → suggestions-q_v3M7G6.js} +1 -1
  138. package/dist/testing/collection.d.ts +1 -1
  139. package/dist/{useCommand-Dc8Lgs9h.js → useCommand-Ch_nx1AQ.js} +4 -4
  140. package/dist/{useGroupSheet-DQ6cVG-z.js → useGroupSheet-CPjHydQV.js} +14 -15
  141. package/dist/{useRecordDialog-BTsbHY38.js → useRecordDialog-DdkauXnU.js} +1 -1
  142. package/dist/{useResourceForm-DJ4Q75pq.js → useResourceForm-Dl6YFYyz.js} +1 -1
  143. package/package.json +3 -2
  144. package/dist/ActionRow.vue_vue_type_script_setup_true_lang-Cg1lhpcA.js +0 -45
  145. package/dist/Activity-29hsZ28j.js +0 -156
  146. package/dist/Button.vue_vue_type_script_setup_true_lang-Dp7OB-eF.js +0 -192
  147. package/dist/Changes-Dxjdkd_5.js +0 -129
  148. package/dist/FormErrors.vue_vue_type_script_setup_true_lang-CIggKPtq.js +0 -295
  149. package/dist/FormGroup.vue_vue_type_script_setup_true_lang-B37dixvJ.js +0 -137
  150. package/dist/PageBar.vue_vue_type_script_setup_true_lang-qI94fjJv.js +0 -47
  151. package/dist/ProfilePage-BnohZIEg.js +0 -764
  152. package/dist/ProgressTrack.vue_vue_type_script_setup_true_lang-B6Prw9hi.js +0 -64
  153. package/dist/SectionIntro.vue_vue_type_script_setup_true_lang-CZtPrmXD.js +0 -23
  154. package/dist/SessionList.vue_vue_type_script_setup_true_lang-Cnyt5V8T.js +0 -133
  155. package/dist/SignIns-BcqBgWgN.js +0 -121
  156. package/dist/UserRecord-CtUPpbCt.js +0 -267
  157. package/dist/UsersList-BMkIgIg8.js +0 -155
  158. package/dist/definition-C7QuyV3i.js +0 -54
  159. package/dist/http-nz92KjdS.js +0 -42
  160. package/dist/identity/fieldMessages.d.ts +0 -15
  161. package/dist/identity/users/languages.d.ts +0 -4
  162. package/dist/index-CdtofdcJ.js +0 -501
  163. package/dist/keepAlive-z3IRFkQq.js +0 -46
  164. package/dist/languages-BShG9LpE.js +0 -10
  165. package/dist/rowLayout-CT8vWYgI.js +0 -663
  166. package/dist/signInEvents-DWShrJox.js +0 -30
  167. package/dist/status-BRA14qwX.js +0 -34
  168. package/dist/useWaitStatus-fsacMl4W.js +0 -24
  169. /package/dist/{fieldMessages-B6GHgi40.js → serverMessages-B6GHgi40.js} +0 -0
@@ -1,295 +0,0 @@
1
- var K = Object.defineProperty;
2
- var ee = (n, e, r) => e in n ? K(n, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : n[e] = r;
3
- var M = (n, e, r) => ee(n, typeof e != "symbol" ? e + "" : e, r);
4
- import { shallowRef as S, computed as A, toRaw as te, reactive as re, ref as G, watch as se, nextTick as ne, toValue as ae, defineComponent as le, unref as w, openBlock as y, createBlock as ie, withCtx as ue, createElementBlock as k, toDisplayString as _, createCommentVNode as E, Fragment as U, createElementVNode as H, normalizeClass as oe, renderList as ce, createTextVNode as q } from "vue";
5
- import { useI18n as J } from "vue-i18n";
6
- import { i as fe, a as F } from "./error-CD7x0Jrz.js";
7
- import { d as de, u as me, a as ve } from "./describeError-B-NMa--w.js";
8
- import { _ as he } from "./Banner.vue_vue_type_script_setup_true_lang-sv0phngk.js";
9
- class ge {
10
- constructor() {
11
- M(this, "messages", S({}));
12
- /** How many fields have a message. */
13
- M(this, "count", A(() => Object.keys(this.messages.value).length));
14
- }
15
- /** Replaces everything. Empty lists are dropped. */
16
- set(e) {
17
- this.messages.value = Object.fromEntries(Object.entries(e).filter(([, r]) => r.length > 0).map(([r, a]) => [r, [...a]]));
18
- }
19
- add(e, r) {
20
- this.messages.value = { ...this.messages.value, [e]: [...this.messages.value[e] ?? [], r] };
21
- }
22
- /** Clears one field (and its nested paths), or everything. */
23
- clear(e) {
24
- if (e === void 0) {
25
- this.count.value > 0 && (this.messages.value = {});
26
- return;
27
- }
28
- const r = Object.fromEntries(Object.entries(this.messages.value).filter(([a]) => a !== e && !a.startsWith(`${e}.`)));
29
- Object.keys(r).length !== this.count.value && (this.messages.value = r);
30
- }
31
- /** Whether the field, or a value inside it (`items.0.quantity` for `items`), has a message. */
32
- has(e) {
33
- return this.first(e) !== void 0 || Object.keys(this.messages.value).some((r) => r.startsWith(`${e}.`));
34
- }
35
- first(e) {
36
- return this.messages.value[e]?.[0];
37
- }
38
- all() {
39
- return this.messages.value;
40
- }
41
- }
42
- function d(n) {
43
- const e = te(n);
44
- return e === null || typeof e != "object" ? e : e instanceof Date ? new Date(e.getTime()) : typeof Blob < "u" && e instanceof Blob ? e : Array.isArray(e) ? e.map(d) : Object.fromEntries(Object.entries(e).map(([r, a]) => [r, d(a)]));
45
- }
46
- function T(n, e) {
47
- const r = n, a = e;
48
- if (Object.is(r, a)) return !0;
49
- if (r === null || a === null || typeof r != "object" || typeof a != "object") return !1;
50
- if (r instanceof Date || a instanceof Date) return r instanceof Date && a instanceof Date && r.getTime() === a.getTime();
51
- if (Array.isArray(r) || Array.isArray(a))
52
- return Array.isArray(r) && Array.isArray(a) && r.length === a.length && r.every((l, c) => T(l, a[c]));
53
- if (typeof Blob < "u" && (r instanceof Blob || a instanceof Blob)) return !1;
54
- const f = (l) => Object.keys(l).filter((c) => l[c] !== void 0), g = f(r);
55
- return g.length === f(a).length && g.every((l) => T(r[l], a[l]));
56
- }
57
- function L(n) {
58
- const e = {};
59
- for (const r of n) {
60
- const a = r.path.map(String).join(".");
61
- (e[a] ?? (e[a] = [])).push(r.message);
62
- }
63
- return e;
64
- }
65
- const be = (n) => n.split(".")[0] ?? n, Y = () => typeof crypto < "u" && typeof crypto.randomUUID == "function" ? crypto.randomUUID() : `${Date.now()}-${Math.random().toString(36).slice(2)}`;
66
- function Fe(n) {
67
- const { t: e } = J(), r = n.describeFieldError ?? de(), a = me(), f = ve(), l = re(d(typeof n.defaults == "function" ? n.defaults() : n.defaults)), c = S(d(l)), o = new ge(), j = G(!1), b = S(null), Q = A(() => !T(l, c.value));
68
- let D = null, C = Y();
69
- function x(t) {
70
- const s = l;
71
- for (const i of Object.keys(s)) i in t || delete s[i];
72
- Object.assign(s, d(t));
73
- }
74
- function z() {
75
- o.clear(), b.value = null;
76
- }
77
- function X(t, s) {
78
- const i = e(`core.form.failure.${t}`);
79
- if (t === "refresh") return i;
80
- const u = f?.(s);
81
- if (u !== void 0) return u;
82
- if (!F(s) || t === "invalid" && Object.keys(s.fields).length > 0) return i;
83
- const p = t === "invalid" || t === "failed" && s.status !== null && s.status < 500;
84
- return s.code ? a(s, { fallback: i }) : p && s.message ? a(s) : i;
85
- }
86
- function B(t, s) {
87
- const i = F(s) ? s.requestId : null, u = n.failureMessage?.(t, s) ?? X(t, s);
88
- return b.value = { kind: t, message: u, requestId: i, error: s };
89
- }
90
- function V(t, s = !1) {
91
- const { serverField: i } = n, u = r, p = s && i ? Object.entries(t).map(([m, v]) => [i(m), v]) : Object.entries(t);
92
- o.set(Object.fromEntries(u ? p.map(([m, v]) => [m, v.map(($) => u($, m))]) : p));
93
- }
94
- function N() {
95
- if (o.clear(), !n.validator)
96
- return b.value = null, d(l);
97
- const t = n.validator.safeParse(d(l));
98
- return t.success ? (b.value = null, t.data) : (V(L(t.error.issues)), null);
99
- }
100
- function P(t) {
101
- if (o.clear(), !n.validator) return !0;
102
- const s = n.validator.safeParse(d(l));
103
- if (s.success) return !0;
104
- const i = Object.fromEntries(Object.entries(L(s.error.issues)).filter(([u]) => t.includes(be(u))));
105
- return V(i), Object.keys(i).length === 0;
106
- }
107
- function Z(t) {
108
- if (!F(t)) return "failed";
109
- switch (t.kind) {
110
- case "validation":
111
- return "invalid";
112
- case "conflict":
113
- return "conflict";
114
- case "forbidden":
115
- return "forbidden";
116
- case "unauthorized":
117
- return "unauthorized";
118
- case "network":
119
- return "offline";
120
- default:
121
- return "failed";
122
- }
123
- }
124
- async function R(t, s, i, u) {
125
- if (D) return D;
126
- const m = (async () => {
127
- b.value = null;
128
- const v = t();
129
- if (v === null) return { status: "failed", failure: B("invalid", null) };
130
- const $ = d(l);
131
- let O;
132
- j.value = !0;
133
- try {
134
- O = await s(v, { idempotencyKey: C });
135
- } catch (h) {
136
- if (j.value = !1, fe(h)) return { status: "aborted" };
137
- const W = Z(h);
138
- return W === "invalid" && F(h) && V(h.fields, !0), { status: "failed", failure: B(W, h) };
139
- }
140
- const I = u?.hydrateFrom?.(O) ?? null;
141
- I ? (x(I), c.value = d(I), o.clear()) : i(O, $);
142
- try {
143
- await u?.refresh?.(O);
144
- } catch (h) {
145
- return B("refresh", h), { status: "saved-refresh-failed", value: O, error: h };
146
- } finally {
147
- j.value = !1;
148
- }
149
- return { status: "saved", value: O };
150
- })().finally(() => {
151
- D = null, C = Y();
152
- });
153
- return D = m, m;
154
- }
155
- return {
156
- values: l,
157
- errors: o,
158
- dirty: Q,
159
- submitting: j,
160
- failure: b,
161
- bind(t) {
162
- return {
163
- get modelValue() {
164
- return l[t];
165
- },
166
- "onUpdate:modelValue"(s) {
167
- l[t] = s, o.clear(t);
168
- },
169
- get error() {
170
- return o.first(t);
171
- },
172
- "data-field-key": t
173
- };
174
- },
175
- bindMonthYear(t, s) {
176
- const i = l;
177
- return {
178
- get month() {
179
- return i[t] ?? null;
180
- },
181
- get year() {
182
- return i[s] ?? null;
183
- },
184
- "onUpdate:month"(u) {
185
- i[t] = u, o.clear(t);
186
- },
187
- "onUpdate:year"(u) {
188
- i[s] = u, o.clear(s);
189
- },
190
- get error() {
191
- return o.first(t) ?? o.first(s);
192
- },
193
- "data-field-key": `${t} ${s}`
194
- };
195
- },
196
- hydrate(t) {
197
- x(t), c.value = d(t), z();
198
- },
199
- reset() {
200
- x(c.value), z();
201
- },
202
- markClean() {
203
- c.value = d(l);
204
- },
205
- validate: N,
206
- check: P,
207
- submit: (t, s) => R(N, t, (i, u) => c.value = u, s),
208
- submitFields: (t, s, i) => R(
209
- () => P(t) ? Object.fromEntries(t.map((u) => [u, d(l[u])])) : null,
210
- s,
211
- (u, p) => {
212
- const m = d(c.value);
213
- for (const v of t) m[v] = d(p[v]);
214
- c.value = m;
215
- },
216
- i
217
- ),
218
- dismissFailure() {
219
- b.value = null;
220
- }
221
- };
222
- }
223
- function pe(n) {
224
- const e = G([]);
225
- return se(
226
- () => n.form.errors.all(),
227
- async (r) => {
228
- await ne();
229
- const a = ae(n.root) ?? document, f = new Set([...a.querySelectorAll("[data-field-key]")].flatMap((l) => (l.getAttribute("data-field-key") ?? "").split(/\s+/))), g = (l) => l.split(".").some((c, o, j) => f.has(j.slice(0, o + 1).join(".")));
230
- e.value = Object.entries(r).flatMap(([l, c]) => c[0] && !g(l) ? [{ field: l, message: c[0] }] : []);
231
- },
232
- { immediate: !0 }
233
- ), A(() => e.value);
234
- }
235
- const ye = {
236
- key: 0,
237
- class: "text-footnote font-medium"
238
- }, je = {
239
- class: "mt-1 list-inside list-disc text-footnote",
240
- "data-test": "form-errors-hidden"
241
- }, Oe = {
242
- key: 2,
243
- class: "mt-1 text-caption text-content-muted"
244
- }, xe = /* @__PURE__ */ le({
245
- __name: "FormErrors",
246
- props: {
247
- form: {},
248
- label: { type: Function, default: (n) => n },
249
- scope: { default: null }
250
- },
251
- setup(n) {
252
- const e = n, { t: r } = J(), a = pe({
253
- get form() {
254
- return e.form;
255
- },
256
- root: () => e.scope
257
- }), f = A(() => e.form.failure.value), g = A(() => f.value?.kind === "conflict" || f.value?.kind === "refresh" ? "warning" : "critical");
258
- return (l, c) => f.value || w(a).length ? (y(), ie(he, {
259
- key: 0,
260
- tone: f.value ? g.value : "warning",
261
- "data-test": "form-errors"
262
- }, {
263
- default: ue(() => [
264
- f.value ? (y(), k("p", ye, _(f.value.message), 1)) : E("", !0),
265
- w(a).length ? (y(), k(U, { key: 1 }, [
266
- H("p", {
267
- class: oe(["text-footnote", f.value ? "mt-1" : "font-medium"])
268
- }, _(w(r)("core.form.errors.hidden_title")), 3),
269
- H("ul", je, [
270
- (y(!0), k(U, null, ce(w(a), (o) => (y(), k("li", {
271
- key: o.field
272
- }, [
273
- q(_(o.field ? e.label(o.field) : ""), 1),
274
- o.field ? (y(), k(U, { key: 0 }, [
275
- q(": ")
276
- ], 64)) : E("", !0),
277
- q(_(o.message), 1)
278
- ]))), 128))
279
- ])
280
- ], 64)) : E("", !0),
281
- f.value?.requestId ? (y(), k("p", Oe, _(w(r)("core.form.errors.request", { id: f.value.requestId })), 1)) : E("", !0)
282
- ]),
283
- _: 1
284
- }, 8, ["tone"])) : E("", !0);
285
- }
286
- });
287
- export {
288
- ge as E,
289
- xe as _,
290
- pe as a,
291
- d as c,
292
- be as f,
293
- T as s,
294
- Fe as u
295
- };
@@ -1,137 +0,0 @@
1
- import { defineComponent as B, openBlock as d, createBlock as L, withCtx as N, createTextVNode as v, toDisplayString as m, unref as h, createCommentVNode as i, inject as C, provide as y, ref as R, useSlots as O, computed as n, shallowReactive as E, useTemplateRef as V, useId as A, createElementBlock as p, normalizeStyle as M, normalizeClass as G, createElementVNode as S, renderSlot as f } from "vue";
2
- import { s as T, u as W } from "./sectionIndex-BS0ic5W7.js";
3
- import { d as $, h as j } from "./options-QuOkMKVZ.js";
4
- import { useI18n as D } from "vue-i18n";
5
- import { _ as q } from "./Button.vue_vue_type_script_setup_true_lang-Dp7OB-eF.js";
6
- const H = /* @__PURE__ */ B({
7
- __name: "GroupEditAction",
8
- props: {
9
- allowed: { type: Boolean, default: !0 },
10
- locked: { type: Boolean, default: !1 },
11
- label: { default: void 0 }
12
- },
13
- emits: ["click"],
14
- setup(s, { emit: e }) {
15
- const t = s, o = e, { t: a } = D();
16
- return (k, l) => t.allowed && !t.locked ? (d(), L(q, {
17
- key: 0,
18
- prominence: "plain",
19
- size: "sm",
20
- "data-test": "group-edit",
21
- onClick: l[0] || (l[0] = (c) => o("click"))
22
- }, {
23
- default: N(() => [
24
- v(m(t.label ?? h(a)("core.actions.edit")), 1)
25
- ]),
26
- _: 1
27
- })) : i("", !0);
28
- }
29
- }), F = Symbol("vue-core.recordGroups"), J = () => C(F, null);
30
- function P() {
31
- const s = /* @__PURE__ */ new Map();
32
- return {
33
- register(e, t) {
34
- const o = s.get(t) ?? /* @__PURE__ */ new Map();
35
- return o.set(e, (o.get(e) ?? 0) + 1), s.set(t, o), () => {
36
- const a = (o.get(e) ?? 1) - 1;
37
- a <= 0 ? o.delete(e) : o.set(e, a);
38
- };
39
- },
40
- groupOf: (e) => s.get(e)?.keys().next().value,
41
- fieldsOf: (e) => [...s.entries()].filter(([, t]) => t.has(e)).map(([t]) => t)
42
- };
43
- }
44
- function le(s) {
45
- const e = P();
46
- return y(F, {
47
- only: R(null),
48
- edit: (t, o) => s.edit(t, o),
49
- editLabel: s.editLabel ? (t) => s.editLabel?.(t) : void 0,
50
- register: (t, o) => e.register(t, o)
51
- }), e;
52
- }
53
- const Q = ["id", "data-group"], U = {
54
- key: 0,
55
- class: "flex min-w-0 items-baseline gap-2 px-row-inset pb-2"
56
- }, X = { class: "min-w-0 flex-1 text-subheadline font-semibold text-content-strong compact:text-footnote compact:font-normal compact:uppercase compact:tracking-wide compact:text-content-muted" }, Y = { class: "form-group-cell rounded-group bg-surface-cell shadow-group" }, Z = {
57
- key: 1,
58
- class: "px-row-inset pt-2 text-footnote text-content-muted text-pretty"
59
- }, ae = /* @__PURE__ */ B({
60
- __name: "FormGroup",
61
- props: {
62
- header: { default: void 0 },
63
- footer: { default: void 0 },
64
- hideEmpty: { type: Boolean, default: !0 },
65
- labelWidth: { default: "11rem" },
66
- section: { type: Boolean, default: !1 },
67
- anchor: { default: void 0 },
68
- editable: { type: Boolean, default: void 0 },
69
- lockedFooter: { default: void 0 },
70
- group: { default: void 0 }
71
- },
72
- setup(s) {
73
- const e = s, t = O(), o = C($, R(!0));
74
- y($, n(() => o.value && e.editable !== !1));
75
- const a = E(/* @__PURE__ */ new Set()), k = n(() => [...a].some((r) => r.value)), l = J(), c = E(/* @__PURE__ */ new Set()), z = n(() => c.size > 0 && [...c].every((r) => r.value)), I = n(() => !l?.only.value || l.only.value === e.group), g = n(() => e.group && l?.edit && !z.value ? l.edit(e.group, e.header ?? "") : null), K = n(() => !!e.group && l?.only.value === e.group);
76
- y(j, {
77
- hideEmpty: n(() => e.hideEmpty),
78
- registerLocked(r) {
79
- return a.add(r), () => a.delete(r);
80
- },
81
- registerField(r, u) {
82
- c.add(u);
83
- const x = e.group && r && l?.register ? l.register(e.group, r) : null;
84
- return () => {
85
- c.delete(u), x?.();
86
- };
87
- }
88
- });
89
- const b = n(() => k.value ? e.lockedFooter : void 0), _ = V("root"), w = e.anchor ?? (T(e.header ?? "") || `group-${A()}`);
90
- return e.section && W(w, () => e.header ?? "", _), (r, u) => I.value ? (d(), p("section", {
91
- key: 0,
92
- ref_key: "root",
93
- ref: _,
94
- id: e.section ? h(w) : void 0,
95
- "data-test": "form-group",
96
- "data-group": e.group,
97
- class: G(["form-group flex min-w-0 flex-col has-[>.form-group-cell:empty]:hidden", { "scroll-mt-4": e.section }]),
98
- style: M({ "--form-label-width": e.labelWidth })
99
- }, [
100
- !K.value && (e.header || t.header || t["header-trailing"] || g.value) ? (d(), p("header", U, [
101
- S("h3", X, [
102
- f(r.$slots, "header", {}, () => [
103
- v(m(e.header), 1)
104
- ])
105
- ]),
106
- f(r.$slots, "header-trailing", {}, () => [
107
- g.value ? (d(), L(H, {
108
- key: 0,
109
- label: e.group ? h(l)?.editLabel?.(e.group) : void 0,
110
- onClick: u[0] || (u[0] = (x) => g.value())
111
- }, null, 8, ["label"])) : i("", !0)
112
- ])
113
- ])) : i("", !0),
114
- S("div", Y, [
115
- f(r.$slots, "default")
116
- ]),
117
- e.footer || t.footer ? (d(), p("p", Z, [
118
- f(r.$slots, "footer", {}, () => [
119
- v(m(e.footer), 1)
120
- ])
121
- ])) : i("", !0),
122
- b.value ? (d(), p("p", {
123
- key: 2,
124
- "data-test": "form-group-locked-footer",
125
- class: G(["px-row-inset text-footnote text-content-muted text-pretty", e.footer || t.footer ? "pt-1" : "pt-2"])
126
- }, m(b.value), 3)) : i("", !0)
127
- ], 14, Q)) : i("", !0);
128
- }
129
- });
130
- export {
131
- ae as _,
132
- H as a,
133
- P as c,
134
- le as p,
135
- F as r,
136
- J as u
137
- };
@@ -1,47 +0,0 @@
1
- import { defineComponent as u, openBlock as f, createElementBlock as _, createElementVNode as p, toDisplayString as o, unref as t, createVNode as l, withCtx as r, createTextVNode as i, createCommentVNode as x } from "vue";
2
- import { useI18n as b } from "vue-i18n";
3
- import { _ as c } from "./Button.vue_vue_type_script_setup_true_lang-Dp7OB-eF.js";
4
- const k = {
5
- key: 0,
6
- class: "flex items-center justify-between gap-3 px-row-inset text-footnote text-content-muted",
7
- "data-page-bar": ""
8
- }, C = { class: "flex gap-2" }, w = /* @__PURE__ */ u({
9
- __name: "PageBar",
10
- props: {
11
- page: {},
12
- lastPage: {},
13
- total: {}
14
- },
15
- emits: ["update:page"],
16
- setup(d, { emit: g }) {
17
- const e = d, n = g, { t: s } = b();
18
- return (P, a) => e.lastPage > 1 ? (f(), _("div", k, [
19
- p("span", null, o(t(s)("core.collection.page.page_of", { current: e.page, total: e.lastPage })) + " · " + o(e.total), 1),
20
- p("span", C, [
21
- l(t(c), {
22
- size: "sm",
23
- disabled: e.page <= 1,
24
- onClick: a[0] || (a[0] = (m) => n("update:page", e.page - 1))
25
- }, {
26
- default: r(() => [
27
- i(o(t(s)("core.collection.page.previous")), 1)
28
- ]),
29
- _: 1
30
- }, 8, ["disabled"]),
31
- l(t(c), {
32
- size: "sm",
33
- disabled: e.page >= e.lastPage,
34
- onClick: a[1] || (a[1] = (m) => n("update:page", e.page + 1))
35
- }, {
36
- default: r(() => [
37
- i(o(t(s)("core.collection.page.next")), 1)
38
- ]),
39
- _: 1
40
- }, 8, ["disabled"])
41
- ])
42
- ])) : x("", !0);
43
- }
44
- });
45
- export {
46
- w as _
47
- };