@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
@@ -0,0 +1,202 @@
1
+ import { defineComponent as E, openBlock as N, createBlock as L, unref as e, withCtx as p, createVNode as n, mergeProps as R, provide as C, computed as _, useTemplateRef as D, createElementVNode as h, toDisplayString as S, createTextVNode as K } from "vue";
2
+ import { useI18n as U } from "vue-i18n";
3
+ import { u as z } from "./neighbors-OyvGi233.js";
4
+ import { _ as G } from "./Avatar.vue_vue_type_script_setup_true_lang-BPj_fkJR.js";
5
+ import { u as I } from "./describeError-B-NMa--w.js";
6
+ import { i as k, P as O, q as j, c as F, d as H, b as J, M as Q, r as W, s as X, g as Y } from "./index-Cq9TuOqH.js";
7
+ import { _ as Z } from "./AlertDialog.vue_vue_type_script_setup_true_lang-CrFhR9rJ.js";
8
+ import { t as $ } from "./toast-CqSDTWRX.js";
9
+ import { _ as ee } from "./SectionNavigator.vue_vue_type_script_setup_true_lang-Dh3sXUt_.js";
10
+ import { u as V } from "./platform-BQOX_Ntw.js";
11
+ import { a as se } from "./routeResource-DlTsGTg_.js";
12
+ import { a as ae } from "./ResourcePage.vue_vue_type_script_setup_true_lang-DljhsTU4.js";
13
+ import { A as te } from "./access-DmAceEo5.js";
14
+ import { _ as oe } from "./Badge.vue_vue_type_script_setup_true_lang-DJyZc0C7.js";
15
+ import { u as re } from "./useLoad-M7V-AVwR.js";
16
+ import { a as ne } from "./FormGroup.vue_vue_type_script_setup_true_lang-D6jYfNjW.js";
17
+ import { _ as A } from "./TextField.vue_vue_type_script_setup_true_lang-CWIeeZRE.js";
18
+ import { u as ce, _ as ie } from "./useCommand-Ch_nx1AQ.js";
19
+ import { u as le } from "./serverMessages-B6GHgi40.js";
20
+ const ue = /* @__PURE__ */ E({
21
+ __name: "SetPasswordDialog",
22
+ props: {
23
+ id: {},
24
+ name: {}
25
+ },
26
+ emits: ["saved"],
27
+ setup(q, { expose: s, emit: f }) {
28
+ const v = q, w = f, { t: o } = U(), { http: c } = V(), u = {
29
+ safeParse(a) {
30
+ const { password: i, repeat: d } = a, g = [
31
+ ...i === "" ? [{ path: ["password"], message: o("core.account.validation.required") }] : [],
32
+ ...i !== "" && d !== i ? [{ path: ["repeat"], message: o(d === "" ? "core.account.validation.required" : "core.account.validation.mismatch") }] : []
33
+ ];
34
+ return g.length > 0 ? { success: !1, error: { issues: g } } : { success: !0, data: { password: i } };
35
+ }
36
+ }, m = ce({
37
+ ...le(),
38
+ defaults: () => ({ password: "", repeat: "" }),
39
+ validator: u,
40
+ run: (a) => c.request(k.usersSetPassword, { id: v.id, password: a.password }),
41
+ done: () => {
42
+ $.success(o("core.users.password.done", { name: v.name })), w("saved");
43
+ }
44
+ });
45
+ return s({ open: () => m.present() }), (a, i) => (N(), L(e(ie), {
46
+ command: e(m),
47
+ title: e(o)("core.users.password.title"),
48
+ subtitle: v.name,
49
+ "confirm-label": e(o)("core.users.password.action")
50
+ }, {
51
+ default: p(() => [
52
+ n(e(ne), {
53
+ footer: e(o)("core.users.password.footer"),
54
+ "data-set-password-dialog": ""
55
+ }, {
56
+ default: p(() => [
57
+ n(e(A), R(e(m).form.bind("password"), {
58
+ label: e(o)("core.users.fields.password"),
59
+ type: "password",
60
+ required: "",
61
+ autocomplete: "new-password"
62
+ }), null, 16, ["label"]),
63
+ n(e(A), R(e(m).form.bind("repeat"), {
64
+ label: e(o)("core.users.fields.password_repeat"),
65
+ type: "password",
66
+ required: "",
67
+ autocomplete: "new-password"
68
+ }), null, 16, ["label"])
69
+ ]),
70
+ _: 1
71
+ }, 8, ["footer"])
72
+ ]),
73
+ _: 1
74
+ }, 8, ["command", "title", "subtitle", "confirm-label"]));
75
+ }
76
+ }), me = {
77
+ class: "flex items-center gap-3 px-1.5",
78
+ "data-person-identity": ""
79
+ }, de = { class: "flex min-w-0 flex-col items-start gap-0.5" }, pe = { class: "max-w-full truncate text-headline font-semibold text-content-strong" }, fe = { class: "max-w-full truncate text-footnote text-content-muted" }, Le = /* @__PURE__ */ E({
80
+ __name: "UserRecord",
81
+ setup(q) {
82
+ const { t: s } = U(), { http: f, access: v, session: w } = V(), o = I(), c = se({
83
+ key: O,
84
+ param: "id",
85
+ load: async (t, { signal: l }) => (await f.request(k.usersShow, { id: t }, { signal: l })).data
86
+ }), u = re(
87
+ async ({ signal: t }) => {
88
+ const l = c.data.value?.id;
89
+ return l === void 0 ? { sessions: [] } : (await f.request(k.usersSessions, { id: l }, { signal: t })).data;
90
+ },
91
+ { watch: () => c.data.value?.id }
92
+ );
93
+ C(j, u);
94
+ const m = z(H(), { current: () => c.id.value, list: F.index, param: "id", backLabel: () => s("core.users.title") }), a = _(() => c.data.value), i = _(() => a.value !== null && w.state.value.status === "authenticated" && w.state.value.user.id === a.value.id), d = D("deactivateDialog"), { deactivate: g } = J(), P = D("passwordDialog"), x = D("activateDialog");
95
+ async function b() {
96
+ await Promise.all([c.reload(), u.reload()]);
97
+ }
98
+ async function M() {
99
+ const t = c.id.value;
100
+ if (t !== null) {
101
+ try {
102
+ await f.request(k.usersActivate, { id: t }), $.success(s("core.users.activate.done", { name: a.value?.name ?? "" }));
103
+ } catch (l) {
104
+ Y(l) || $.error(o(l, { fallback: s("core.users.activate.failed") }));
105
+ }
106
+ await b();
107
+ }
108
+ }
109
+ const y = _(() => {
110
+ const t = v.can(Q);
111
+ return { manage: t, deactivate: t && !!a.value?.active && !i.value, activate: t && a.value !== null && !a.value.active, endSessions: t && !i.value };
112
+ });
113
+ C(W, {
114
+ get can() {
115
+ return y.value;
116
+ },
117
+ deactivate: () => d.value?.open(),
118
+ activate: () => x.value?.present(),
119
+ setPassword: () => P.value?.open(),
120
+ refresh: b
121
+ });
122
+ const T = _(() => [
123
+ ...y.value.deactivate ? [{ id: "deactivate", label: s("core.users.actions.deactivate"), icon: "lockLine", placement: "overflow", tone: "critical", onClick: () => d.value?.open() }] : [],
124
+ ...y.value.activate ? [{ id: "activate", label: s("core.users.actions.activate"), icon: "checkCircle", placement: "overflow", onClick: () => x.value?.present() }] : []
125
+ ]), B = _(() => ({
126
+ ...u.data.value ? { "users.record.sessions": u.data.value.sessions.length } : {},
127
+ ...a.value?.status === "locked" ? { "users.record.signin": s("core.users.status.locked") } : {}
128
+ }));
129
+ return (t, l) => (N(), L(e(ae), {
130
+ resource: e(c),
131
+ title: a.value?.name ?? e(s)("core.users.record"),
132
+ list: e(m).context,
133
+ actions: T.value
134
+ }, {
135
+ default: p(({ record: r }) => [
136
+ n(e(ee), {
137
+ label: e(s)("core.users.sections_label"),
138
+ desktop: "sidebar",
139
+ compact: "rows",
140
+ "back-label": r.name,
141
+ counts: B.value
142
+ }, {
143
+ summary: p(() => [
144
+ h("div", me, [
145
+ n(e(G), {
146
+ name: r.name,
147
+ size: "lg",
148
+ tone: "anchor"
149
+ }, null, 8, ["name"]),
150
+ h("div", de, [
151
+ h("span", pe, S(r.name), 1),
152
+ h("span", fe, S(r.email), 1),
153
+ n(e(oe), {
154
+ tone: e(X)(r.status),
155
+ dot: "",
156
+ "data-person-status": ""
157
+ }, {
158
+ default: p(() => [
159
+ K(S(e(s)(`core.users.status.${r.status}`)), 1)
160
+ ]),
161
+ _: 2
162
+ }, 1032, ["tone"])
163
+ ])
164
+ ])
165
+ ]),
166
+ default: p(() => [
167
+ n(e(te))
168
+ ]),
169
+ _: 2
170
+ }, 1032, ["label", "back-label", "counts"]),
171
+ n(e(g), {
172
+ ref_key: "deactivateDialog",
173
+ ref: d,
174
+ id: r.id,
175
+ name: r.name,
176
+ "session-count": e(u).data.value?.sessions.length ?? null,
177
+ onDone: b
178
+ }, null, 8, ["id", "name", "session-count"]),
179
+ n(ue, {
180
+ ref_key: "passwordDialog",
181
+ ref: P,
182
+ id: r.id,
183
+ name: r.name,
184
+ onSaved: b
185
+ }, null, 8, ["id", "name"]),
186
+ n(e(Z), {
187
+ ref_key: "activateDialog",
188
+ ref: x,
189
+ icon: "checkCircle",
190
+ title: e(s)("core.users.activate.title"),
191
+ message: e(s)("core.users.activate.body", { name: r.name }),
192
+ "confirm-label": e(s)("core.users.actions.activate"),
193
+ action: M
194
+ }, null, 8, ["title", "message", "confirm-label"])
195
+ ]),
196
+ _: 1
197
+ }, 8, ["resource", "title", "list", "actions"]));
198
+ }
199
+ });
200
+ export {
201
+ Le as default
202
+ };
@@ -0,0 +1,74 @@
1
+ import { defineComponent as C, useTemplateRef as N, computed as a, openBlock as i, createBlock as m, unref as s, withCtx as r, createVNode as d, createTextVNode as R, toDisplayString as l, createCommentVNode as S, createElementBlock as _, normalizeClass as p } from "vue";
2
+ import { useI18n as E } from "vue-i18n";
3
+ import { useRouter as $ } from "vue-router";
4
+ import { u as B, _ as T } from "./CollectionPage.vue_vue_type_script_setup_true_lang-x0jyJ01f.js";
5
+ import { _ as V } from "./Avatar.vue_vue_type_script_setup_true_lang-BPj_fkJR.js";
6
+ import { u as L } from "./format-D8KUBmbS.js";
7
+ import { u as z } from "./platform-BQOX_Ntw.js";
8
+ import { _ as A } from "./Badge.vue_vue_type_script_setup_true_lang-DJyZc0C7.js";
9
+ import { b as D, U as I, c as f, d as M, M as q, s as F } from "./index-Cq9TuOqH.js";
10
+ const G = ["datetime"], Z = /* @__PURE__ */ C({
11
+ __name: "UsersList",
12
+ setup(K) {
13
+ const { t: e } = E(), { access: b } = z(), y = L(), g = $(), c = N("dialog"), { newUser: k } = D(), w = a(() => [
14
+ { key: "name", label: e("core.users.columns.person"), kind: "identity", subtitle: (o) => o.email, sort: "name", mobile: "primary" },
15
+ { key: "login", label: e("core.users.columns.login"), sort: "login", hideBelow: "md", width: 180, mobile: "hidden" },
16
+ { key: "last_sign_in", label: e("core.users.columns.last_sign_in"), width: 170, mobile: "meta" },
17
+ { key: "status", label: e("core.users.columns.status"), width: 130, mobile: "accessory" }
18
+ ]), x = a(() => [
19
+ { key: "last_sign_in", label: e("core.users.filters.last_sign_in"), type: "select", options: [{ value: "never", label: e("core.users.filters.never") }, { value: "idle", label: e("core.users.filters.idle") }] }
20
+ ]), h = a(() => I.map((o) => ({ key: o, label: e(`core.users.views.${o}`) }))), v = B(M(), { columns: w, filters: x, views: h, state: { kind: "url", key: "query" }, recordRoute: (o) => f.record({ id: o.id }) }), U = a(
21
+ () => b.can(q) ? [{ id: "create", label: e("core.users.create.title"), icon: "addLine", placement: "primary", compact: "icon", keyboardShortcut: { key: "N", ctrlKey: !0 }, onClick: () => c.value?.create() }] : []
22
+ );
23
+ return (o, u) => (i(), m(s(T), {
24
+ collection: s(v),
25
+ title: s(e)("core.users.title"),
26
+ description: s(e)("core.users.description"),
27
+ actions: U.value,
28
+ "row-height": 64,
29
+ "row-label": (t) => t.name,
30
+ "views-presentation": "scope"
31
+ }, {
32
+ leading: r(({ item: t }) => [
33
+ d(s(V), {
34
+ name: t.name,
35
+ size: "md",
36
+ tone: "anchor"
37
+ }, null, 8, ["name"])
38
+ ]),
39
+ "cell-last_sign_in": r(({ item: t, compact: n }) => [
40
+ t.last_sign_in ? (i(), _("time", {
41
+ key: 0,
42
+ datetime: t.last_sign_in,
43
+ class: p(["text-content", n ? "text-footnote text-content-muted" : "text-body"])
44
+ }, l(s(y).dateTime(t.last_sign_in)), 11, G)) : (i(), _("span", {
45
+ key: 1,
46
+ class: p(n ? "text-footnote text-content-disabled" : "text-body text-content-disabled")
47
+ }, l(s(e)("core.users.never")), 3))
48
+ ]),
49
+ "cell-status": r(({ item: t, compact: n }) => [
50
+ !n || t.status !== "active" ? (i(), m(s(A), {
51
+ key: 0,
52
+ tone: s(F)(t.status),
53
+ dot: ""
54
+ }, {
55
+ default: r(() => [
56
+ R(l(s(e)(`core.users.status.${t.status}`)), 1)
57
+ ]),
58
+ _: 2
59
+ }, 1032, ["tone"])) : S("", !0)
60
+ ]),
61
+ default: r(() => [
62
+ d(s(k), {
63
+ ref_key: "dialog",
64
+ ref: c,
65
+ onCreated: u[0] || (u[0] = (t) => s(g).push(s(f).record({ id: t.id })))
66
+ }, null, 512)
67
+ ]),
68
+ _: 1
69
+ }, 8, ["collection", "title", "description", "actions", "row-label"]));
70
+ }
71
+ });
72
+ export {
73
+ Z as default
74
+ };
@@ -1,15 +1,15 @@
1
- import { _ as f, a as R, b } from "../PersonAccess.vue_vue_type_script_setup_true_lang-qz1tmYpF.js";
1
+ import { _ as f, a as R, b } from "../PersonAccess.vue_vue_type_script_setup_true_lang-DbGZSNQc.js";
2
2
  import { d as o, p as c } from "../feature-DdUAfyi4.js";
3
3
  import { a as s, b as t } from "../refusals-DfPzVNNY.js";
4
4
  import { d as g, p as x, r as h, c as v, u as y, e as C, f as K } from "../refusals-DfPzVNNY.js";
5
5
  import { d as r } from "../defineRoutes-BGAdiIrt.js";
6
6
  const a = r({
7
- roles: { name: "access.roles", path: "/iam/roles", component: () => import("../RolesPage-PXrs4O-1.js"), meta: { access: s.viewRoles, titleKey: "core.access.title" } },
8
- newRole: { name: "access.roles.new", path: "/iam/roles/new", component: () => import("../NewRolePage-C6Iu-EQJ.js"), meta: { access: s.manageRoles, titleKey: "core.access.new_title" } },
7
+ roles: { name: "access.roles", path: "/iam/roles", component: () => import("../RolesPage-6hlzJes_.js"), meta: { access: s.viewRoles, titleKey: "core.access.title" } },
8
+ newRole: { name: "access.roles.new", path: "/iam/roles/new", component: () => import("../NewRolePage-DhGFwvk3.js"), meta: { access: s.manageRoles, titleKey: "core.access.new_title" } },
9
9
  role: {
10
10
  name: "access.role",
11
11
  path: "/iam/roles/:ref",
12
- component: () => import("../RolePage-Dj_ocMnM.js"),
12
+ component: () => import("../RolePage-DaNv049g.js"),
13
13
  // A role's ref (its key, or the id of a custom one) swaps in place when a link leads to another role.
14
14
  meta: { access: s.viewRoles, titleKey: "core.access.title", remountOnParam: "ref" }
15
15
  }
@@ -5,6 +5,7 @@ export { applicationKey, useApplication } from "./environment";
5
5
  export type { ApplicationEnvironment, ApplicationState } from "./environment";
6
6
  export { defineFeature, provideContext } from "./feature";
7
7
  export type { AppEffect, AppEffectContext, ContextProvision, EffectStop, Feature, FeatureDefinition, FeatureEffect, FeatureReference, SessionEffect, SessionEffectContext, ShellContribution, ShellSlot, ShellSlots, } from "./feature";
8
+ export { useLanguages } from "./languages";
8
9
  export { keepSessionAlive } from "./keepAlive";
9
10
  export type { KeepSessionAliveOptions } from "./keepAlive";
10
11
  export { ApplicationError } from "./validate";
package/dist/app/index.js CHANGED
@@ -1,15 +1,16 @@
1
- import { A as a, c as p } from "../application-BmXW6iW_.js";
1
+ import { A as o, c as p } from "../application-CuzT-0vW.js";
2
2
  import { S as t } from "../contributions-CeG4bszd.js";
3
- import { a as s, u as l } from "../environment-Dva-SG8D.js";
4
- import { d as c, p as f } from "../feature-DdUAfyi4.js";
5
- import { k as m } from "../keepAlive-z3IRFkQq.js";
3
+ import { a as i, u as l } from "../environment-Dva-SG8D.js";
4
+ import { d as u, p as c } from "../feature-DdUAfyi4.js";
5
+ import { k as x, u as m } from "../keepAlive-ClGnsIzT.js";
6
6
  export {
7
- a as ApplicationError,
7
+ o as ApplicationError,
8
8
  t as ShellOutlet,
9
- s as applicationKey,
9
+ i as applicationKey,
10
10
  p as createApplication,
11
- c as defineFeature,
12
- m as keepSessionAlive,
13
- f as provideContext,
14
- l as useApplication
11
+ u as defineFeature,
12
+ x as keepSessionAlive,
13
+ c as provideContext,
14
+ l as useApplication,
15
+ m as useLanguages
15
16
  };
@@ -0,0 +1,8 @@
1
+ import { type ComputedRef } from "vue";
2
+ import type { SelectOption } from "../form";
3
+ /**
4
+ * The languages the application offers (`createApplication({ locale: { supported } })`), as the options of a select, each named in itself.
5
+ *
6
+ * const languages = useLanguages(); // <Select v-model="locale" :options="languages" />
7
+ */
8
+ export declare function useLanguages(): ComputedRef<readonly SelectOption<string>[]>;
@@ -18,7 +18,7 @@ import { b as rt, c as at, n as ne } from "./navigation-TnVFYRaX.js";
18
18
  import { c as nt, s as ie } from "./contributions-CeG4bszd.js";
19
19
  import { a as ce } from "./environment-Dva-SG8D.js";
20
20
  import { b as le, c as ue } from "./describeError-B-NMa--w.js";
21
- import { _ as it } from "./Button.vue_vue_type_script_setup_true_lang-Dp7OB-eF.js";
21
+ import { _ as it } from "./Button.vue_vue_type_script_setup_true_lang-C74hcb0N.js";
22
22
  import { _ as ct } from "./EmptyState.vue_vue_type_script_setup_true_lang-DbZiO2RF.js";
23
23
  import { i as lt } from "./feature-DdUAfyi4.js";
24
24
  function ut(e) {
@@ -1,8 +1,9 @@
1
- import { _ as a, m as o, s as r, u, a as e } from "../Button.vue_vue_type_script_setup_true_lang-Dp7OB-eF.js";
1
+ import { _ as o } from "../Button.vue_vue_type_script_setup_true_lang-C74hcb0N.js";
2
+ import { m as a, s as e, u, a as c } from "../shortcut-DUR6yPWA.js";
2
3
  export {
3
- a as Button,
4
- o as matchesShortcut,
5
- r as shortcutKeys,
4
+ o as Button,
5
+ a as matchesShortcut,
6
+ e as shortcutKeys,
6
7
  u as useKeyboardShortcut,
7
- e as useShortcutRegistry
8
+ c as useShortcutRegistry
8
9
  };
@@ -0,0 +1,12 @@
1
+ /**
2
+ * A text with the words of `search` marked in `<mark>` (whitespace-separated, any case, as `highlightParts` reads them): what
3
+ * found a row is visible. It renders no element of its own, only the text and the marks, so it sits inside any line.
4
+ *
5
+ * <Highlight :text="vehicle.name" :search="collection.search.value" />
6
+ */
7
+ type __VLS_Props = {
8
+ text: string;
9
+ search?: string | null;
10
+ };
11
+ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
12
+ export default _default;
@@ -0,0 +1,26 @@
1
+ import type { Picker, PickerOptions } from "./picker";
2
+ declare const _default: <Row, Options extends PickerOptions>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
3
+ props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, never> & {
4
+ picker: Picker<Row, Options>;
5
+ /** The dialog's title. Default "Choose one". */
6
+ title?: string;
7
+ description?: string;
8
+ size?: "sm" | "md" | "lg" | "xl";
9
+ } & Partial<{}>> & import("vue").PublicProps;
10
+ expose(exposed: import("vue").ShallowUnwrapRef<{}>): void;
11
+ attrs: any;
12
+ slots: {
13
+ /** The list to choose from. */
14
+ default?: (scope: {
15
+ options: Options;
16
+ select: (row: Row) => void;
17
+ }) => unknown;
18
+ };
19
+ emit: {};
20
+ }>) => import("vue").VNode & {
21
+ __ctx?: Awaited<typeof __VLS_setup>;
22
+ };
23
+ export default _default;
24
+ type __VLS_PrettifyLocal<T> = {
25
+ [K in keyof T]: T[K];
26
+ } & {};
@@ -1,4 +1,4 @@
1
- import type { CollectionLoader, CollectionQuery } from "./types";
1
+ import type { CollectionLoader, CollectionQuery, ListMeta } from "./types";
2
2
  /** The page sizes ARV's lists offer; a definition may narrow or replace them. */
3
3
  export declare const DEFAULT_PAGE_SIZES: readonly number[];
4
4
  /**
@@ -27,13 +27,13 @@ export interface QueryContract<Sort extends string, Filter extends string, View
27
27
  export type CollectionDefaults<Sort extends string, Filter extends string, View extends string> = Partial<CollectionQuery<Sort, Filter, View>>;
28
28
  /** The state a stored version of a list's state (a link, a saved view) is migrated from. */
29
29
  export type StoredState = Readonly<Record<string, unknown>>;
30
- export interface CollectionDefinitionInput<Row, Sort extends string, Filter extends string, View extends string> {
30
+ export interface CollectionDefinitionInput<Row, Sort extends string, Filter extends string, View extends string, Meta extends ListMeta = ListMeta> {
31
31
  /** Stable identity of the list: saved views and logs use it. It is not the URL key (two lists on a page each have their own). */
32
32
  readonly id: string;
33
33
  /** Bump it when the meaning of stored state changes (a renamed sort key); see `migrate`. */
34
34
  readonly stateVersion: number;
35
35
  /** The feature API's list function. */
36
- readonly load: CollectionLoader<Row, NoInfer<Sort>, NoInfer<Filter>, NoInfer<View>>;
36
+ readonly load: CollectionLoader<Row, NoInfer<Sort>, NoInfer<Filter>, NoInfer<View>, Meta>;
37
37
  /** The record's identity: neighbors find the current record by it. */
38
38
  readonly key: (row: Row) => string | number;
39
39
  readonly defaults?: CollectionDefaults<NoInfer<Sort>, NoInfer<Filter>, NoInfer<View>>;
@@ -45,10 +45,10 @@ export interface CollectionDefinitionInput<Row, Sort extends string, Filter exte
45
45
  readonly migrate?: (stored: StoredState, version: number) => StoredState | null;
46
46
  }
47
47
  /** A collection's definition: pure data and a loader. Nothing runs until `useCollection` or `useCollectionNeighbors` uses it. */
48
- export interface CollectionDefinition<Row, Sort extends string = string, Filter extends string = string, View extends string = string> {
48
+ export interface CollectionDefinition<Row, Sort extends string = string, Filter extends string = string, View extends string = string, Meta extends ListMeta = ListMeta> {
49
49
  readonly id: string;
50
50
  readonly stateVersion: number;
51
- readonly load: CollectionLoader<Row, Sort, Filter, View>;
51
+ readonly load: CollectionLoader<Row, Sort, Filter, View, Meta>;
52
52
  readonly key: (row: Row) => string | number;
53
53
  /** Complete: every field of the query has a value. */
54
54
  readonly defaults: CollectionQuery<Sort, Filter, View>;
@@ -79,7 +79,7 @@ export interface CollectionDefinition<Row, Sort extends string = string, Filter
79
79
  * Pure: it validates its input (and throws a descriptive error on a contradiction, e.g. a default
80
80
  * sort the contract does not list) but starts nothing.
81
81
  */
82
- export declare function defineCollection<Row, Sort extends string = string, Filter extends string = string, View extends string = string>(input: CollectionDefinitionInput<Row, Sort, Filter, View>): CollectionDefinition<Row, Sort, Filter, View>;
82
+ export declare function defineCollection<Row, Sort extends string = string, Filter extends string = string, View extends string = string, Meta extends ListMeta = ListMeta>(input: CollectionDefinitionInput<Row, Sort, Filter, View, Meta>): CollectionDefinition<Row, Sort, Filter, View, Meta>;
83
83
  /** The row, sort keys, filter keys and views of a definition, for typing code written against it. */
84
84
  export type RowOf<D> = D extends CollectionDefinition<infer Row, string, string, string> ? Row : never;
85
85
  export type SortOf<D> = D extends CollectionDefinition<never, infer Sort, string, string> ? Sort : never;
@@ -1,5 +1,5 @@
1
1
  import type { ApiResult, HttpClient, ListResult, PageMeta, QueryValue } from "../client";
2
- import type { CollectionLoader, ListPage, CollectionQuery } from "./types";
2
+ import type { CollectionLoader, ListMeta, ListPage, CollectionQuery } from "./types";
3
3
  /**
4
4
  * The query parameters go-core's datatable reads: `page`, `per_page`, `order_col`, `order_dir`,
5
5
  * `search`, `view`, and every filter under its own key. Empty values are left out (the client drops them).
@@ -12,9 +12,9 @@ export declare function listParams(query: CollectionQuery): Record<string, Query
12
12
  * route's result (`client.request(route, input)`) and `Row` is inferred. Missing numbers are derived
13
13
  * from what is there rather than becoming 0; `query` supplies the page and size that were asked for.
14
14
  */
15
- export declare function readListPage<Row>(result: ApiResult<readonly Row[], PageMeta>, query: Pick<CollectionQuery, "page" | "pageSize">): ListPage<Row>;
16
- export declare function readListPage<Row>(result: ApiResult<ListResult<Row>, unknown>, query: Pick<CollectionQuery, "page" | "pageSize">): ListPage<Row>;
17
- export declare function readListPage<Row>(result: ApiResult<unknown, unknown>, query: Pick<CollectionQuery, "page" | "pageSize">): ListPage<Row>;
15
+ export declare function readListPage<Row, Meta extends ListMeta = ListMeta>(result: ApiResult<readonly Row[], PageMeta>, query: Pick<CollectionQuery, "page" | "pageSize">): ListPage<Row, Meta>;
16
+ export declare function readListPage<Row, Meta extends ListMeta = ListMeta>(result: ApiResult<ListResult<Row>, unknown>, query: Pick<CollectionQuery, "page" | "pageSize">): ListPage<Row, Meta>;
17
+ export declare function readListPage<Row, Meta extends ListMeta = ListMeta>(result: ApiResult<unknown, unknown>, query: Pick<CollectionQuery, "page" | "pageSize">): ListPage<Row, Meta>;
18
18
  /**
19
19
  * The loader of a go-core list endpoint: the common case of a feature's `api.list`.
20
20
  *
@@ -22,6 +22,6 @@ export declare function readListPage<Row>(result: ApiResult<unknown, unknown>, q
22
22
  *
23
23
  * `params` adds or renames parameters when the endpoint deviates from the datatable convention.
24
24
  */
25
- export declare function httpList<Row, Sort extends string = string, Filter extends string = string, View extends string = string>(http: HttpClient, path: string, options?: {
25
+ export declare function httpList<Row, Sort extends string = string, Filter extends string = string, View extends string = string, Meta extends ListMeta = ListMeta>(http: HttpClient, path: string, options?: {
26
26
  params?: (query: CollectionQuery<Sort, Filter, View>) => Record<string, QueryValue>;
27
- }): CollectionLoader<Row, Sort, Filter, View>;
27
+ }): CollectionLoader<Row, Sort, Filter, View, Meta>;
@@ -2,7 +2,7 @@ export { defineCollection, DEFAULT_PAGE_SIZES } from "./definition";
2
2
  export type { CollectionDefaults, CollectionDefinition, CollectionDefinitionInput, FilterOf, QueryContract, RowOf, SortOf, StoredState, ViewOf } from "./definition";
3
3
  export { useCollection } from "./useCollection";
4
4
  export type { Collection, CollectionDisplay, LinkedQuery, SavedViewsHandle, UseCollectionOptions } from "./useCollection";
5
- export type { CollectionLoader, ListPage, CollectionQuery, CollectionStateSource, LoadContext, SortDirection } from "./types";
5
+ export type { CollectionLoader, ListMeta, ListPage, CollectionQuery, CollectionStateSource, LoadContext, SortDirection } from "./types";
6
6
  export { httpList, listParams, readListPage } from "./http";
7
7
  export { LIST_CONTEXT_PARAM } from "./location";
8
8
  export type { CollectionColumns, Column, ColumnKey, ColumnKind, ColumnValue, MobileRole, RowAction, SlotKey, TableColumns } from "./columns";
@@ -20,4 +20,9 @@ export { default as DataTable } from "./DataTable.vue";
20
20
  export { default as RowActions } from "./RowActions.vue";
21
21
  export { default as RecordIdentity } from "./RecordIdentity.vue";
22
22
  export { DATE_PRESETS, useDatePresetFilter } from "./datePresets";
23
+ export { default as Highlight } from "./Highlight.vue";
24
+ export { highlightParts, type HighlightPart } from "./highlight";
23
25
  export type { CellSlots, CollectionSlots, RowsSlots } from "./slots";
26
+ export { createPicker } from "./picker";
27
+ export type { Picker, PickerOptions } from "./picker";
28
+ export { default as PickerModal } from "./PickerModal.vue";