@wssto2/vue-core 0.9.4 → 0.10.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 (160) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/dist/ActionRow.vue_vue_type_script_setup_true_lang-IpcP3Bjc.js +87 -0
  3. package/dist/Activity-CeAG0ZtJ.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-B9-zpDxG.js +69 -0
  9. package/dist/{CollectionPage.vue_vue_type_script_setup_true_lang-DHcekGNn.js → CollectionPage.vue_vue_type_script_setup_true_lang-Cn0YOWJF.js} +19 -18
  10. package/dist/{DataTable.vue_vue_type_script_setup_true_lang-8kBsNRuq.js → DataTable.vue_vue_type_script_setup_true_lang-BQRG8bpH.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-BP03yC4R.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-BDmCJr3H.js} +35 -38
  17. package/dist/{IncidentRecord-D8aOpNHo.js → IncidentRecord-DEhl6AyA.js} +14 -15
  18. package/dist/{IncidentsList-C0cFl0Db.js → IncidentsList-COgRPdk3.js} +3 -3
  19. package/dist/{Modal.vue_vue_type_script_setup_true_lang-BlHhdmMy.js → Modal.vue_vue_type_script_setup_true_lang-DDS0iEnn.js} +9 -8
  20. package/dist/{NewRolePage-C6Iu-EQJ.js → NewRolePage-DhGFwvk3.js} +4 -4
  21. package/dist/{NumberField.vue_vue_type_script_setup_true_lang-TGGAq8J-.js → NumberField.vue_vue_type_script_setup_true_lang-B3UrXNqH.js} +1 -1
  22. package/dist/{PersonAccess.vue_vue_type_script_setup_true_lang-qz1tmYpF.js → PersonAccess.vue_vue_type_script_setup_true_lang-DbGZSNQc.js} +56 -56
  23. package/dist/ProfilePage-BQCK2w8R.js +684 -0
  24. package/dist/ProgressTrack.vue_vue_type_script_setup_true_lang-DrOm8k--.js +30 -0
  25. package/dist/{RecordHeader.vue_vue_type_script_setup_true_lang-B9mN7UxZ.js → RecordHeader.vue_vue_type_script_setup_true_lang-DqGc3Jyo.js} +1 -1
  26. 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
  27. package/dist/{RoleEditor.vue_vue_type_script_setup_true_lang-CJPvOVDV.js → RoleEditor.vue_vue_type_script_setup_true_lang-C0FIotFA.js} +11 -12
  28. package/dist/{RolePage-Dj_ocMnM.js → RolePage-DaNv049g.js} +10 -10
  29. package/dist/{RolesPage-PXrs4O-1.js → RolesPage-6hlzJes_.js} +6 -6
  30. package/dist/SearchInput.vue_vue_type_script_setup_true_lang-w4eAqyZ9.js +32 -0
  31. 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
  32. package/dist/{SectionNavigator.vue_vue_type_script_setup_true_lang-B5ove3rM.js → SectionNavigator.vue_vue_type_script_setup_true_lang-Dh3sXUt_.js} +2 -2
  33. 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
  34. package/dist/{SelectField.vue_vue_type_script_setup_true_lang-BP8nAQwo.js → SelectField.vue_vue_type_script_setup_true_lang-BZwdANL3.js} +3 -3
  35. package/dist/{ServiceAccountDialog.vue_vue_type_script_setup_true_lang-aWkKwxNe.js → ServiceAccountDialog.vue_vue_type_script_setup_true_lang-C0OIBrSp.js} +20 -20
  36. package/dist/{ServiceAccountRecord-bxX9yQkC.js → ServiceAccountRecord-gtlhYaAz.js} +37 -37
  37. package/dist/{ServiceAccountsList-BXE6htxk.js → ServiceAccountsList-BM7GGcvw.js} +33 -33
  38. package/dist/{Sessions--Gvc0kxw.js → Sessions-BCDJYuV2.js} +23 -24
  39. package/dist/{SettingsPage-DzDC7gD-.js → SettingsPage-DUhMsYBf.js} +27 -30
  40. package/dist/{SignIn-CTI_699e.js → SignIn-4D7WohI8.js} +9 -10
  41. package/dist/{SignInPage-HKC1bm2E.js → SignInPage-B6B-34GG.js} +4 -4
  42. package/dist/SignIns-CFoe4hpX.js +64 -0
  43. package/dist/StatusLine.vue_vue_type_script_setup_true_lang-DsdQmLq6.js +56 -0
  44. package/dist/{SwitchField.vue_vue_type_script_setup_true_lang-BMA2YXTZ.js → SwitchField.vue_vue_type_script_setup_true_lang-Ds4q0bbl.js} +1 -1
  45. package/dist/{TextField.vue_vue_type_script_setup_true_lang-BFVsqcBX.js → TextField.vue_vue_type_script_setup_true_lang-CWIeeZRE.js} +2 -2
  46. package/dist/{TextareaField.vue_vue_type_script_setup_true_lang-Dyh4Hhyl.js → TextareaField.vue_vue_type_script_setup_true_lang-D2j4s96s.js} +1 -1
  47. 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
  48. package/dist/UserRecord-Cd1TCpJZ.js +202 -0
  49. package/dist/UsersList-GJU5-CTG.js +74 -0
  50. package/dist/access/index.js +4 -4
  51. package/dist/app/index.js +1 -1
  52. package/dist/{application-BmXW6iW_.js → application-CuzT-0vW.js} +1 -1
  53. package/dist/button/index.js +6 -5
  54. package/dist/collection/PickerModal.vue.d.ts +26 -0
  55. package/dist/collection/definition.d.ts +6 -6
  56. package/dist/collection/http.d.ts +6 -6
  57. package/dist/collection/index.d.ts +5 -1
  58. package/dist/collection/index.js +144 -85
  59. package/dist/collection/picker.d.ts +39 -0
  60. package/dist/collection/types.d.ts +9 -4
  61. package/dist/collection/useCollection.d.ts +5 -5
  62. package/dist/content/ActivityStream.vue.d.ts +62 -0
  63. package/dist/content/CommentThread.vue.d.ts +52 -0
  64. package/dist/content/Composer.vue.d.ts +36 -0
  65. package/dist/content/index.d.ts +3 -0
  66. package/dist/content/index.js +321 -56
  67. package/dist/controls/index.js +28 -54
  68. package/dist/form/index.js +132 -134
  69. package/dist/format/index.d.ts +1 -0
  70. package/dist/format/index.js +10 -6
  71. package/dist/format/slug.d.ts +8 -0
  72. package/dist/highlight-DnYhLXnu.js +9 -0
  73. package/dist/http-Dm0uXY9O.js +95 -0
  74. package/dist/i18n/index.d.ts +14 -0
  75. package/dist/i18n/index.js +87 -63
  76. package/dist/i18n/plural.d.ts +23 -0
  77. package/dist/identity/embed.d.ts +39 -0
  78. package/dist/identity/index.d.ts +20 -0
  79. package/dist/identity/index.js +40 -21
  80. package/dist/identity/session.d.ts +9 -1
  81. package/dist/identity/shared/ChangeFeed.vue.d.ts +6 -3
  82. package/dist/identity/users/context.d.ts +8 -0
  83. package/dist/identity/users/dialogs.d.ts +10 -0
  84. package/dist/identity/users/ext.d.ts +8 -0
  85. package/dist/identity/users/feature.d.ts +10 -0
  86. package/dist/identity/users/list.d.ts +1 -1
  87. package/dist/identity/users/personSections.d.ts +1 -1
  88. package/dist/identity/users/replace.d.ts +45 -0
  89. package/dist/identity/users/words.d.ts +28 -0
  90. package/dist/incidents/api.d.ts +1 -1
  91. package/dist/incidents/index.js +1 -1
  92. package/dist/{index-Dz0LkLM8.js → index-CTkG-acm.js} +4 -4
  93. package/dist/{index-Dm-sdJJr.js → index-DUs7WSz-.js} +31 -32
  94. package/dist/index-pJ_eRg80.js +1257 -0
  95. package/dist/index.d.ts +1 -1
  96. package/dist/index.js +1 -1
  97. package/dist/modal/index.js +3 -3
  98. package/dist/modules/identity/entities.d.ts +7 -0
  99. package/dist/modules/identity/routes.d.ts +8 -4
  100. package/dist/modules/identity/schemas.d.ts +16 -0
  101. package/dist/{neighbors-DVfU9T0o.js → neighbors-OyvGi233.js} +2 -2
  102. package/dist/notifications/deadletters/list.d.ts +1 -1
  103. package/dist/notifications/index.js +1 -1
  104. package/dist/{options-QuOkMKVZ.js → options-B48UiYsG.js} +2 -2
  105. package/dist/page/index.js +11 -11
  106. package/dist/phone/index.js +1 -1
  107. package/dist/pwa/AndroidInstallBanner.vue.d.ts +18 -0
  108. package/dist/pwa/InstallQrSheet.vue.d.ts +21 -0
  109. package/dist/pwa/IosInstallGuide.vue.d.ts +19 -0
  110. package/dist/pwa/QrCode.vue.d.ts +16 -0
  111. package/dist/pwa/index.d.ts +4 -0
  112. package/dist/pwa/index.js +244 -24
  113. package/dist/resource/index.js +1 -1
  114. package/dist/{rowLayout-CT8vWYgI.js → rowLayout-Il4psyXN.js} +183 -188
  115. package/dist/shell/DarkModeRow.vue.d.ts +15 -0
  116. package/dist/shell/OfflineNotice.vue.d.ts +2 -0
  117. package/dist/shell/QuickSearchButton.vue.d.ts +2 -0
  118. package/dist/shell/QuickSearchPalette.vue.d.ts +12 -0
  119. package/dist/shell/darkMode.d.ts +26 -0
  120. package/dist/shell/index.d.ts +10 -0
  121. package/dist/shell/index.js +963 -580
  122. package/dist/shell/offlineNotice.d.ts +3 -0
  123. package/dist/shell/quickSearch.d.ts +14 -0
  124. package/dist/shell/quickSearchControl.d.ts +66 -0
  125. package/dist/shortcut-DUR6yPWA.js +93 -0
  126. package/dist/state/BackgroundTaskCapsule.vue.d.ts +18 -0
  127. package/dist/state/backgroundTasks.d.ts +58 -0
  128. package/dist/state/index.d.ts +4 -0
  129. package/dist/state/index.js +194 -80
  130. package/dist/state/useCountUp.d.ts +9 -0
  131. package/dist/styles.css +1 -1
  132. package/dist/{suggestions-BVQhoXzS.js → suggestions-q_v3M7G6.js} +1 -1
  133. package/dist/testing/collection.d.ts +1 -1
  134. package/dist/{useCommand-Dc8Lgs9h.js → useCommand-Ch_nx1AQ.js} +4 -4
  135. package/dist/{useGroupSheet-DQ6cVG-z.js → useGroupSheet-CPjHydQV.js} +14 -15
  136. package/dist/{useRecordDialog-BTsbHY38.js → useRecordDialog-DdkauXnU.js} +1 -1
  137. package/dist/{useResourceForm-DJ4Q75pq.js → useResourceForm-Dl6YFYyz.js} +1 -1
  138. package/package.json +3 -2
  139. package/dist/ActionRow.vue_vue_type_script_setup_true_lang-Cg1lhpcA.js +0 -45
  140. package/dist/Activity-29hsZ28j.js +0 -156
  141. package/dist/Button.vue_vue_type_script_setup_true_lang-Dp7OB-eF.js +0 -192
  142. package/dist/Changes-Dxjdkd_5.js +0 -129
  143. package/dist/FormErrors.vue_vue_type_script_setup_true_lang-CIggKPtq.js +0 -295
  144. package/dist/FormGroup.vue_vue_type_script_setup_true_lang-B37dixvJ.js +0 -137
  145. package/dist/PageBar.vue_vue_type_script_setup_true_lang-qI94fjJv.js +0 -47
  146. package/dist/ProfilePage-BnohZIEg.js +0 -764
  147. package/dist/ProgressTrack.vue_vue_type_script_setup_true_lang-B6Prw9hi.js +0 -64
  148. package/dist/SectionIntro.vue_vue_type_script_setup_true_lang-CZtPrmXD.js +0 -23
  149. package/dist/SessionList.vue_vue_type_script_setup_true_lang-Cnyt5V8T.js +0 -133
  150. package/dist/SignIns-BcqBgWgN.js +0 -121
  151. package/dist/UserRecord-CtUPpbCt.js +0 -267
  152. package/dist/UsersList-BMkIgIg8.js +0 -155
  153. package/dist/definition-C7QuyV3i.js +0 -54
  154. package/dist/fieldMessages-B6GHgi40.js +0 -25
  155. package/dist/http-nz92KjdS.js +0 -42
  156. package/dist/index-CdtofdcJ.js +0 -501
  157. package/dist/languages-BShG9LpE.js +0 -10
  158. package/dist/signInEvents-DWShrJox.js +0 -30
  159. package/dist/status-BRA14qwX.js +0 -34
  160. package/dist/useWaitStatus-fsacMl4W.js +0 -24
@@ -0,0 +1,202 @@
1
+ import { defineComponent as E, openBlock as N, createBlock as L, unref as e, withCtx as f, createVNode as n, mergeProps as q, provide as C, computed as _, useTemplateRef as D, createElementVNode as h, toDisplayString as S, createTextVNode as K } from "vue";
2
+ import { useI18n as V } 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, r as j, c as F, d as H, b as J, M as Q, t as W, s as X, h as Y } from "./index-pJ_eRg80.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 M } 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 "./ActionRow.vue_vue_type_script_setup_true_lang-IpcP3Bjc.js";
20
+ const ue = /* @__PURE__ */ E({
21
+ __name: "SetPasswordDialog",
22
+ props: {
23
+ id: {},
24
+ name: {}
25
+ },
26
+ emits: ["saved"],
27
+ setup(P, { expose: s, emit: m }) {
28
+ const v = P, w = m, { t: o } = V(), { http: c } = M(), u = {
29
+ safeParse(a) {
30
+ const { password: i, repeat: p } = a, b = [
31
+ ...i === "" ? [{ path: ["password"], message: o("core.account.validation.required") }] : [],
32
+ ...i !== "" && p !== i ? [{ path: ["repeat"], message: o(p === "" ? "core.account.validation.required" : "core.account.validation.mismatch") }] : []
33
+ ];
34
+ return b.length > 0 ? { success: !1, error: { issues: b } } : { success: !0, data: { password: i } };
35
+ }
36
+ }, d = 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: () => d.present() }), (a, i) => (N(), L(e(ie), {
46
+ command: e(d),
47
+ title: e(o)("core.users.password.title"),
48
+ subtitle: v.name,
49
+ "confirm-label": e(o)("core.users.password.action")
50
+ }, {
51
+ default: f(() => [
52
+ n(e(ne), {
53
+ footer: e(o)("core.users.password.footer"),
54
+ "data-set-password-dialog": ""
55
+ }, {
56
+ default: f(() => [
57
+ n(e(A), q(e(d).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), q(e(d).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(P) {
82
+ const { t: s } = V(), { http: m, access: v, session: w } = M(), o = I(), c = se({
83
+ key: O,
84
+ param: "id",
85
+ load: async (t, { signal: l }) => (await m.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 m.request(k.usersSessions, { id: l }, { signal: t })).data;
90
+ },
91
+ { watch: () => c.data.value?.id }
92
+ );
93
+ C(j, u);
94
+ const d = z(H(m), { 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), p = D("deactivateDialog"), { deactivate: b } = J(), R = D("passwordDialog"), x = D("activateDialog");
95
+ async function g() {
96
+ await Promise.all([c.reload(), u.reload()]);
97
+ }
98
+ async function T() {
99
+ const t = c.id.value;
100
+ if (t !== null) {
101
+ try {
102
+ await m.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 g();
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: () => p.value?.open(),
118
+ activate: () => x.value?.present(),
119
+ setPassword: () => R.value?.open(),
120
+ refresh: g
121
+ });
122
+ const U = _(() => [
123
+ ...y.value.deactivate ? [{ id: "deactivate", label: s("core.users.actions.deactivate"), icon: "lockLine", placement: "overflow", tone: "critical", onClick: () => p.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(d).context,
133
+ actions: U.value
134
+ }, {
135
+ default: f(({ 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: f(() => [
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: f(() => [
159
+ K(S(e(s)(`core.users.status.${r.status}`)), 1)
160
+ ]),
161
+ _: 2
162
+ }, 1032, ["tone"])
163
+ ])
164
+ ])
165
+ ]),
166
+ default: f(() => [
167
+ n(e(te))
168
+ ]),
169
+ _: 2
170
+ }, 1032, ["label", "back-label", "counts"]),
171
+ n(e(b), {
172
+ ref_key: "deactivateDialog",
173
+ ref: p,
174
+ id: r.id,
175
+ name: r.name,
176
+ "session-count": e(u).data.value?.sessions.length ?? null,
177
+ onDone: g
178
+ }, null, 8, ["id", "name", "session-count"]),
179
+ n(ue, {
180
+ ref_key: "passwordDialog",
181
+ ref: R,
182
+ id: r.id,
183
+ name: r.name,
184
+ onSaved: g
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: T
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 N, useTemplateRef as R, computed as a, openBlock as i, createBlock as m, unref as s, withCtx as r, createVNode as d, createTextVNode as S, toDisplayString as l, createCommentVNode as E, createElementBlock as _, normalizeClass as p } from "vue";
2
+ import { useI18n as $ } from "vue-i18n";
3
+ import { useRouter as B } from "vue-router";
4
+ import { u as T, _ as V } from "./CollectionPage.vue_vue_type_script_setup_true_lang-Cn0YOWJF.js";
5
+ import { _ as L } from "./Avatar.vue_vue_type_script_setup_true_lang-BPj_fkJR.js";
6
+ import { u as z } from "./format-D8KUBmbS.js";
7
+ import { u as A } from "./platform-BQOX_Ntw.js";
8
+ import { _ as D } from "./Badge.vue_vue_type_script_setup_true_lang-DJyZc0C7.js";
9
+ import { b as I, U as M, c as f, d as q, M as F, s as G } from "./index-pJ_eRg80.js";
10
+ const K = ["datetime"], ee = /* @__PURE__ */ N({
11
+ __name: "UsersList",
12
+ setup(P) {
13
+ const { t: e } = $(), { http: b, access: y } = A(), g = z(), k = B(), c = R("dialog"), { newUser: w } = I(), h = 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
+ ]), v = a(() => M.map((o) => ({ key: o, label: e(`core.users.views.${o}`) }))), C = T(q(b), { columns: h, filters: x, views: v, state: { kind: "url", key: "query" }, recordRoute: (o) => f.record({ id: o.id }) }), U = a(
21
+ () => y.can(F) ? [{ 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(V), {
24
+ collection: s(C),
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(L), {
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(g).dateTime(t.last_sign_in)), 11, K)) : (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(D), {
51
+ key: 0,
52
+ tone: s(G)(t.status),
53
+ dot: ""
54
+ }, {
55
+ default: r(() => [
56
+ S(l(s(e)(`core.users.status.${t.status}`)), 1)
57
+ ]),
58
+ _: 2
59
+ }, 1032, ["tone"])) : E("", !0)
60
+ ]),
61
+ default: r(() => [
62
+ d(s(w), {
63
+ ref_key: "dialog",
64
+ ref: c,
65
+ onCreated: u[0] || (u[0] = (t) => s(k).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
+ ee 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
  }
package/dist/app/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { A as a, c as p } from "../application-BmXW6iW_.js";
1
+ import { A as a, c as p } from "../application-CuzT-0vW.js";
2
2
  import { S as t } from "../contributions-CeG4bszd.js";
3
3
  import { a as s, u as l } from "../environment-Dva-SG8D.js";
4
4
  import { d as c, p as f } from "../feature-DdUAfyi4.js";
@@ -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,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,8 @@ 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 { highlightParts, type HighlightPart } from "./highlight";
23
24
  export type { CellSlots, CollectionSlots, RowsSlots } from "./slots";
25
+ export { createPicker } from "./picker";
26
+ export type { Picker, PickerOptions } from "./picker";
27
+ export { default as PickerModal } from "./PickerModal.vue";