@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
@@ -1,125 +1,184 @@
1
- import { D as q, d as z } from "../definition-C7QuyV3i.js";
2
- import { _ as j, a as G, u as U } from "../CollectionPage.vue_vue_type_script_setup_true_lang-DHcekGNn.js";
3
- import { h as X, l as Z, r as H } from "../http-nz92KjdS.js";
4
- import { L as Q } from "../state-6KSYsVw0.js";
5
- import { u as Y, a as ee } from "../neighbors-DVfU9T0o.js";
6
- import { r as f } from "../route-goWMxDUN.js";
7
- import { b as se, a as ae } from "../rowLayout-CT8vWYgI.js";
8
- import { _ as ne } from "../DataTable.vue_vue_type_script_setup_true_lang-8kBsNRuq.js";
9
- import { defineComponent as k, openBlock as d, createElementBlock as c, Fragment as C, renderList as g, createBlock as h, unref as m, withCtx as E, normalizeClass as p, createVNode as b, createCommentVNode as S } from "vue";
10
- import { _ } from "../Icon.vue_vue_type_script_lang-BhhsFYwp.js";
11
- import { _ as T } from "../Tooltip.vue_vue_type_script_setup_true_lang-Dtg5Y6pf.js";
12
- import { D as ie, u as le } from "../datePresets-DB13HHHd.js";
13
- const v = {
14
- index: f("GET", "/v1/saved-views"),
15
- store: f("POST", "/v1/saved-views"),
16
- delete: f("DELETE", "/v1/saved-views/:id")
17
- }, x = ({ id: o, name: t, state: a }) => ({ id: o, name: t, state: a });
18
- function I(o) {
1
+ import { D as K, d as Q, h as W, l as Y, r as ee } from "../http-Dm0uXY9O.js";
2
+ import { _ as se, a as oe, u as ie } from "../CollectionPage.vue_vue_type_script_setup_true_lang-Cn0YOWJF.js";
3
+ import { L as ne } from "../state-6KSYsVw0.js";
4
+ import { a as re, u as ce } from "../neighbors-OyvGi233.js";
5
+ import { r as p } from "../route-goWMxDUN.js";
6
+ import { b as ue, a as fe } from "../rowLayout-Il4psyXN.js";
7
+ import { _ as me } from "../DataTable.vue_vue_type_script_setup_true_lang-BQRG8bpH.js";
8
+ import { defineComponent as w, openBlock as c, createElementBlock as u, Fragment as P, renderList as E, createBlock as h, unref as d, withCtx as y, normalizeClass as v, createVNode as _, createCommentVNode as g, shallowRef as S, useTemplateRef as T, watch as D, renderSlot as R } from "vue";
9
+ import { _ as b } from "../Icon.vue_vue_type_script_lang-BhhsFYwp.js";
10
+ import { _ as z } from "../Tooltip.vue_vue_type_script_setup_true_lang-Dtg5Y6pf.js";
11
+ import { D as _e, u as be } from "../datePresets-DB13HHHd.js";
12
+ import { h as xe } from "../highlight-DnYhLXnu.js";
13
+ import { useI18n as A } from "vue-i18n";
14
+ import { _ as L } from "../Modal.vue_vue_type_script_setup_true_lang-DDS0iEnn.js";
15
+ const m = {
16
+ index: p("GET", "/v1/saved-views"),
17
+ store: p("POST", "/v1/saved-views"),
18
+ delete: p("DELETE", "/v1/saved-views/:id")
19
+ }, k = ({ id: a, name: e, state: i }) => ({ id: a, name: e, state: i });
20
+ function j(a) {
19
21
  return {
20
- async list(t, { signal: a }) {
21
- return (await o.request(v.index, { list: t }, { signal: a })).data.map(x);
22
+ async list(e, { signal: i }) {
23
+ return (await a.request(m.index, { list: e }, { signal: i })).data.map(k);
22
24
  },
23
- async save(t, a, n) {
24
- const s = JSON.stringify({ ...n, view: n.view || void 0 });
25
- return x((await o.request(v.store, { list_key: t, name: a, state: s })).data);
25
+ async save(e, i, o) {
26
+ const s = JSON.stringify({ ...o, view: o.view || void 0 });
27
+ return k((await a.request(m.store, { list_key: e, name: i, state: s })).data);
26
28
  },
27
- async remove(t, a) {
28
- await o.request(v.delete, { id: Number(a) });
29
+ async remove(e, i) {
30
+ await a.request(m.delete, { id: Number(i) });
29
31
  }
30
32
  };
31
33
  }
32
- function O(o = {}) {
33
- const t = new Map(Object.entries(o).map(([s, e]) => [s, [...e]]));
34
- let a = 1;
35
- const n = (s) => {
36
- let e = t.get(s);
37
- return e || t.set(s, e = []), e;
34
+ function G(a = {}) {
35
+ const e = new Map(Object.entries(a).map(([s, t]) => [s, [...t]]));
36
+ let i = 1;
37
+ const o = (s) => {
38
+ let t = e.get(s);
39
+ return t || e.set(s, t = []), t;
38
40
  };
39
41
  return {
40
42
  async list(s) {
41
- return [...n(s)];
43
+ return [...o(s)];
42
44
  },
43
- async save(s, e, l) {
44
- const r = n(s), i = r.findIndex((y) => y.name === e), u = { id: i === -1 ? `view-${a++}` : r[i].id, name: e, state: l };
45
- return i === -1 ? r.push(u) : r[i] = u, u;
45
+ async save(s, t, l) {
46
+ const n = o(s), r = n.findIndex((C) => C.name === t), f = { id: r === -1 ? `view-${i++}` : n[r].id, name: t, state: l };
47
+ return r === -1 ? n.push(f) : n[r] = f, f;
46
48
  },
47
- async remove(s, e) {
48
- const l = n(s), r = l.findIndex((i) => i.id === e);
49
- r !== -1 && l.splice(r, 1);
49
+ async remove(s, t) {
50
+ const l = o(s), n = l.findIndex((r) => r.id === t);
51
+ n !== -1 && l.splice(n, 1);
50
52
  }
51
53
  };
52
54
  }
53
- const P = {
55
+ const $ = {
54
56
  key: 0,
55
57
  class: "flex items-center justify-center gap-1",
56
58
  "data-test": "row-actions"
57
- }, A = ["href", "target", "rel", "aria-label", "data-action"], D = ["aria-label", "data-action", "disabled", "onClick"], w = "focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-border-focus", V = /* @__PURE__ */ k({
59
+ }, I = ["href", "target", "rel", "aria-label", "data-action"], N = ["aria-label", "data-action", "disabled", "onClick"], x = "focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-border-focus", U = /* @__PURE__ */ w({
58
60
  __name: "RowActions",
59
61
  props: {
60
62
  actions: {},
61
63
  disabled: { type: Boolean, default: !1 }
62
64
  },
63
- setup(o) {
64
- const t = o, a = (n) => n.tone === "critical" ? "text-status-danger-content hover:bg-status-danger-surface" : "text-content-link hover:bg-tint-soft";
65
- return (n, s) => t.actions.length > 0 ? (d(), c("div", P, [
66
- (d(!0), c(C, null, g(t.actions, (e) => (d(), h(m(T), {
67
- key: e.key,
68
- text: e.label,
65
+ setup(a) {
66
+ const e = a, i = (o) => o.tone === "critical" ? "text-status-danger-content hover:bg-status-danger-surface" : "text-content-link hover:bg-tint-soft";
67
+ return (o, s) => e.actions.length > 0 ? (c(), u("div", $, [
68
+ (c(!0), u(P, null, E(e.actions, (t) => (c(), h(d(z), {
69
+ key: t.key,
70
+ text: t.label,
69
71
  side: "left"
70
72
  }, {
71
- default: E(() => [
72
- e.href && !t.disabled ? (d(), c("a", {
73
+ default: y(() => [
74
+ t.href && !e.disabled ? (c(), u("a", {
73
75
  key: 0,
74
- href: e.href,
75
- target: e.external ? "_blank" : void 0,
76
- rel: e.external ? "noopener" : void 0,
77
- "aria-label": e.label,
78
- "data-action": e.key,
79
- class: p(["inline-flex rounded-md p-1.5 transition-colors", [a(e), w]])
76
+ href: t.href,
77
+ target: t.external ? "_blank" : void 0,
78
+ rel: t.external ? "noopener" : void 0,
79
+ "aria-label": t.label,
80
+ "data-action": t.key,
81
+ class: v(["inline-flex rounded-md p-1.5 transition-colors", [i(t), x]])
80
82
  }, [
81
- b(m(_), {
82
- name: e.icon,
83
+ _(d(b), {
84
+ name: t.icon,
83
85
  size: 18
84
86
  }, null, 8, ["name"])
85
- ], 10, A)) : (d(), c("button", {
87
+ ], 10, I)) : (c(), u("button", {
86
88
  key: 1,
87
89
  type: "button",
88
- "aria-label": e.label,
89
- "data-action": e.key,
90
- disabled: t.disabled,
91
- class: p(["inline-flex cursor-pointer rounded-md p-1.5 transition-colors disabled:pointer-events-none disabled:opacity-40", [a(e), w]]),
92
- onClick: (l) => e.onSelect?.()
90
+ "aria-label": t.label,
91
+ "data-action": t.key,
92
+ disabled: e.disabled,
93
+ class: v(["inline-flex cursor-pointer rounded-md p-1.5 transition-colors disabled:pointer-events-none disabled:opacity-40", [i(t), x]]),
94
+ onClick: (l) => t.onSelect?.()
93
95
  }, [
94
- b(m(_), {
95
- name: e.icon,
96
+ _(d(b), {
97
+ name: t.icon,
96
98
  size: 18
97
99
  }, null, 8, ["name"])
98
- ], 10, D))
100
+ ], 10, N))
99
101
  ]),
100
102
  _: 2
101
103
  }, 1032, ["text"]))), 128))
102
- ])) : S("", !0);
104
+ ])) : g("", !0);
105
+ }
106
+ });
107
+ function J() {
108
+ const a = S({ open: !1, options: null });
109
+ let e = null;
110
+ function i(o) {
111
+ const s = e;
112
+ e = null, a.value = { open: !1, options: a.value.options }, s?.(o);
113
+ }
114
+ return {
115
+ state: a,
116
+ pick(...[o]) {
117
+ return e?.(null), new Promise((s) => {
118
+ e = s, a.value = { open: !0, options: o ?? {} };
119
+ });
120
+ },
121
+ select: (o) => i(o),
122
+ cancel: () => i(null)
123
+ };
124
+ }
125
+ const X = /* @__PURE__ */ w({
126
+ __name: "PickerModal",
127
+ props: {
128
+ picker: {},
129
+ title: { default: void 0 },
130
+ description: { default: void 0 },
131
+ size: { default: "lg" }
132
+ },
133
+ setup(a) {
134
+ const e = a, { t: i } = A(), o = T("modal");
135
+ let s = !1, t = !1;
136
+ D(() => e.picker.state.value.open, (n) => {
137
+ n ? (s = !0, o.value?.present()) : s && (t = !0, o.value?.dismiss());
138
+ }, { flush: "post" });
139
+ function l() {
140
+ s = !1, t ? t = !1 : e.picker.cancel();
141
+ }
142
+ return (n, r) => (c(), h(d(L), {
143
+ ref_key: "modal",
144
+ ref: o,
145
+ title: e.picker.state.value.options?.title ?? e.title ?? d(i)("core.collection.pick_label"),
146
+ subtitle: e.picker.state.value.options?.description ?? e.description,
147
+ size: e.size,
148
+ grouped: "",
149
+ onDismissed: l
150
+ }, {
151
+ default: y(() => [
152
+ e.picker.state.value.options ? R(n.$slots, "default", {
153
+ options: e.picker.state.value.options,
154
+ select: e.picker.select
155
+ }, void 0, void 0, 0) : g("", !0)
156
+ ]),
157
+ _: 3
158
+ }, 8, ["title", "subtitle", "size"]));
103
159
  }
104
160
  });
105
161
  export {
106
- se as CollectionCell,
107
- j as CollectionPage,
108
- G as CollectionTable,
109
- ie as DATE_PRESETS,
110
- q as DEFAULT_PAGE_SIZES,
111
- ne as DataTable,
112
- Q as LIST_CONTEXT_PARAM,
113
- ae as RecordIdentity,
114
- V as RowActions,
115
- O as createMemorySavedViews,
116
- z as defineCollection,
117
- X as httpList,
118
- Z as listParams,
119
- H as readListPage,
120
- I as serverSavedViews,
121
- U as useCollection,
122
- Y as useCollectionBack,
123
- ee as useCollectionNeighbors,
124
- le as useDatePresetFilter
162
+ ue as CollectionCell,
163
+ se as CollectionPage,
164
+ oe as CollectionTable,
165
+ _e as DATE_PRESETS,
166
+ K as DEFAULT_PAGE_SIZES,
167
+ me as DataTable,
168
+ ne as LIST_CONTEXT_PARAM,
169
+ X as PickerModal,
170
+ fe as RecordIdentity,
171
+ U as RowActions,
172
+ G as createMemorySavedViews,
173
+ J as createPicker,
174
+ Q as defineCollection,
175
+ xe as highlightParts,
176
+ W as httpList,
177
+ Y as listParams,
178
+ ee as readListPage,
179
+ j as serverSavedViews,
180
+ ie as useCollection,
181
+ re as useCollectionBack,
182
+ ce as useCollectionNeighbors,
183
+ be as useDatePresetFilter
125
184
  };
@@ -0,0 +1,39 @@
1
+ import { type Ref } from "vue";
2
+ /** What every picker takes; add the fields your list needs (a record to exclude, a scope). */
3
+ export interface PickerOptions {
4
+ /** Overrides the dialog's title for this call. */
5
+ title?: string;
6
+ /** A second line under the title for this call. */
7
+ description?: string;
8
+ }
9
+ /** The arguments of `pick`: optional when every option is. */
10
+ type PickArguments<Options> = Partial<Options> extends Options ? [options?: Options] : [options: Options];
11
+ export interface Picker<Row, Options extends PickerOptions = PickerOptions> {
12
+ /** Whether the dialog is open and what it was opened with; read by `PickerModal`. */
13
+ readonly state: Readonly<Ref<{
14
+ readonly open: boolean;
15
+ readonly options: Options | null;
16
+ }>>;
17
+ /**
18
+ * Opens the dialog and resolves with the chosen row, or null when it is dismissed. Picking again
19
+ * while it is open resolves the earlier call with null.
20
+ */
21
+ pick(...options: PickArguments<Options>): Promise<Row | null>;
22
+ /** The choice: resolves `pick` with the row and closes the dialog. */
23
+ select(row: Row): void;
24
+ /** Resolves `pick` with null and closes the dialog. */
25
+ cancel(): void;
26
+ }
27
+ /**
28
+ * The open, choose and cancel plumbing of a "choose one record" dialog that any screen can ask for
29
+ * and `await`. One picker per kind of record, made once by the app; `PickerModal` is its dialog:
30
+ *
31
+ * export const userPicker = createPicker<User, { title?: string; locationId?: number }>();
32
+ *
33
+ * const user = await userPicker.pick({ locationId: 4 }); // User, or null when dismissed
34
+ *
35
+ * Mount `<PickerModal :picker="userPicker">` once where the app keeps its dialogs (a shell `host`
36
+ * contribution) and put a `CollectionTable` with `pick` inside it.
37
+ */
38
+ export declare function createPicker<Row, Options extends PickerOptions = PickerOptions>(): Picker<Row, Options>;
39
+ export {};
@@ -16,8 +16,13 @@ export interface CollectionQuery<Sort extends string = string, Filter extends st
16
16
  /** Filter values are what the URL and the backend carry: text. Empty filters are absent. */
17
17
  readonly filters: Readonly<Partial<Record<Filter, string>>>;
18
18
  }
19
- /** One page of a list, normalized: what `load` returns, whatever envelope the backend used. */
20
- export interface ListPage<Row> {
19
+ /** What the backend adds next to a list's rows, untouched: any object until the app says what it sends (`ListPage<Row, MyMeta>`). */
20
+ export type ListMeta = Readonly<Record<string, unknown>>;
21
+ /**
22
+ * One page of a list, normalized: what `load` returns, whatever envelope the backend used. `Meta` is the shape of `meta`
23
+ * for a list whose backend sends one, so the app reads it without a cast (declare it as a `type`, not an `interface`, which has no index signature).
24
+ */
25
+ export interface ListPage<Row, Meta extends ListMeta = ListMeta> {
21
26
  readonly rows: readonly Row[];
22
27
  /** Rows in the whole result set. */
23
28
  readonly total: number;
@@ -34,7 +39,7 @@ export interface ListPage<Row> {
34
39
  readonly count?: number;
35
40
  }[];
36
41
  /** Enrichment the backend adds next to the rows (authors, lookups), untouched. */
37
- readonly meta?: Readonly<Record<string, unknown>>;
42
+ readonly meta?: Meta;
38
43
  /** The `X-Request-ID` of the exchange, to quote in a bug report. */
39
44
  readonly requestId?: string | null;
40
45
  }
@@ -43,7 +48,7 @@ export interface LoadContext {
43
48
  readonly signal: AbortSignal;
44
49
  }
45
50
  /** The typed call a collection makes: the feature's API function. It never builds URLs in a view. */
46
- export type CollectionLoader<Row, Sort extends string, Filter extends string, View extends string> = (query: CollectionQuery<Sort, Filter, View>, context: LoadContext) => Promise<ListPage<Row>>;
51
+ export type CollectionLoader<Row, Sort extends string, Filter extends string, View extends string, Meta extends ListMeta = ListMeta> = (query: CollectionQuery<Sort, Filter, View>, context: LoadContext) => Promise<ListPage<Row, Meta>>;
47
52
  /** Where a list keeps its state between visits. */
48
53
  export type CollectionStateSource =
49
54
  /** In the URL's query under `key`: survives reloads and back/forward, and record links carry it (`?from=`). */
@@ -5,7 +5,7 @@ import type { Column } from "./columns";
5
5
  import { type CollectionDefinition } from "./definition";
6
6
  import { type FilterDescriptor, type ViewDescriptor } from "./filters";
7
7
  import type { SavedView, SavedViewState, SavedViews } from "./savedViews";
8
- import type { ListPage, CollectionQuery, CollectionStateSource, SortDirection } from "./types";
8
+ import type { ListMeta, ListPage, CollectionQuery, CollectionStateSource, SortDirection } from "./types";
9
9
  /**
10
10
  * A link into a list carries plain parameters (`?scope=long`, `?followup=overdue`): a count on the
11
11
  * home page that opens its list filtered the same way. They are applied once when the list is created
@@ -82,7 +82,7 @@ export interface SavedViewsHandle {
82
82
  * batch into one request (several calls in a tick load once), a newer request supersedes the older,
83
83
  * and a failure is never confused with an empty list.
84
84
  */
85
- export interface Collection<Row, Sort extends string = string, Filter extends string = string, View extends string = string, Col extends Column<Row> = Column<Row>> {
85
+ export interface Collection<Row, Sort extends string = string, Filter extends string = string, View extends string = string, Col extends Column<Row> = Column<Row>, Meta extends ListMeta = ListMeta> {
86
86
  /** The definition's id. */
87
87
  readonly id: string;
88
88
  /** The record's identity (the definition's `key`): what rows are keyed by. */
@@ -92,11 +92,11 @@ export interface Collection<Row, Sort extends string = string, Filter extends st
92
92
  /** Whether the list can be searched by text (the definition's `query.search`); the toolbar shows the search field only then. */
93
93
  readonly searchable: boolean;
94
94
  /** The request state: loading (nothing to show), loaded, refreshing (previous rows stay), stale (a refresh failed, previous rows stay) or failed. */
95
- readonly state: Readonly<Ref<AsyncState<ListPage<Row>>>>;
95
+ readonly state: Readonly<Ref<AsyncState<ListPage<Row, Meta>>>>;
96
96
  /** The query the list shows or is loading. */
97
97
  readonly query: Readonly<Ref<CollectionQuery<Sort, Filter, View>>>;
98
98
  /** The last page that loaded, kept while another loads, refreshes or fails (so the pager and the count stay); null before the first and after a session change. */
99
- readonly page: ComputedRef<ListPage<Row> | null>;
99
+ readonly page: ComputedRef<ListPage<Row, Meta> | null>;
100
100
  readonly rows: ComputedRef<readonly Row[]>;
101
101
  readonly total: ComputedRef<number>;
102
102
  readonly display: ComputedRef<CollectionDisplay>;
@@ -151,4 +151,4 @@ export interface Collection<Row, Sort extends string = string, Filter extends st
151
151
  * request only, treats a cancelled request as nothing happened, and follows the URL when the
152
152
  * user goes back or forward. It stops with the scope it was created in.
153
153
  */
154
- export declare function useCollection<Row, Sort extends string, Filter extends string, View extends string, const Col extends Column<Row> = Column<Row>>(definition: CollectionDefinition<Row, Sort, Filter, View>, options: UseCollectionOptions<Row, Filter, View, Col, Sort>): Collection<Row, Sort, Filter, View, Col>;
154
+ export declare function useCollection<Row, Sort extends string, Filter extends string, View extends string, const Col extends Column<Row> = Column<Row>, Meta extends ListMeta = ListMeta>(definition: CollectionDefinition<Row, Sort, Filter, View, Meta>, options: UseCollectionOptions<Row, Filter, View, Col, Sort>): Collection<Row, Sort, Filter, View, Col, Meta>;
@@ -0,0 +1,62 @@
1
+ import type { IconName } from "../icon";
2
+ import type { Tone } from "../state";
3
+ /** Something that happened to the record: an assignment, a phase change. */
4
+ export interface ActivityEvent {
5
+ kind: "event";
6
+ id: string | number;
7
+ at: string | null;
8
+ icon: IconName;
9
+ tone?: Tone;
10
+ /** Who did it (shown in the meta line). */
11
+ actor?: string | null;
12
+ /** Plain text; use the `#event` slot for badges or details. */
13
+ text?: string;
14
+ }
15
+ /** A comment someone wrote. `mine` puts it on the trailing side. */
16
+ export interface ActivityComment {
17
+ kind: "comment";
18
+ id: string | number;
19
+ at: string | null;
20
+ body: string;
21
+ author?: string | null;
22
+ /** The photo's full URL, built by the app; initials show until it loads or without it. */
23
+ avatarUrl?: string | null;
24
+ mine?: boolean;
25
+ }
26
+ export type ActivityItem = ActivityEvent | ActivityComment;
27
+ declare const _default: <T extends ActivityItem>(__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<{
28
+ props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, never> & {
29
+ items: T[];
30
+ /** Label of the list for assistive technology. */
31
+ label?: string;
32
+ } & Partial<{}>> & import("vue").PublicProps;
33
+ expose(exposed: import("vue").ShallowUnwrapRef<{}>): void;
34
+ attrs: any;
35
+ slots: {
36
+ /** Event content (defaults to `item.text`). */
37
+ event?: (props: {
38
+ item: Extract<T, {
39
+ kind: "event";
40
+ }>;
41
+ }) => unknown;
42
+ /** Extra context in a comment's meta line (the phase it was written in). */
43
+ "comment-meta"?: (props: {
44
+ item: Extract<T, {
45
+ kind: "comment";
46
+ }>;
47
+ }) => unknown;
48
+ /** Extra controls in a comment's meta line (delete). */
49
+ "comment-actions"?: (props: {
50
+ item: Extract<T, {
51
+ kind: "comment";
52
+ }>;
53
+ }) => unknown;
54
+ };
55
+ emit: {};
56
+ }>) => import("vue").VNode & {
57
+ __ctx?: Awaited<typeof __VLS_setup>;
58
+ };
59
+ export default _default;
60
+ type __VLS_PrettifyLocal<T> = {
61
+ [K in keyof T]: T[K];
62
+ } & {};
@@ -0,0 +1,52 @@
1
+ export interface CommentItem {
2
+ id: number | string;
3
+ body: string;
4
+ author?: string;
5
+ /** The photo's full URL, built by the app. */
6
+ avatarUrl?: string | null;
7
+ createdAt?: string | null;
8
+ /** Written by the signed-in user: shown on the trailing side. */
9
+ mine?: boolean;
10
+ }
11
+ declare const _default: import("vue").DefineComponent<{
12
+ comments: CommentItem[];
13
+ /** Shows the compose box. */
14
+ canAdd?: boolean;
15
+ /** Shows each comment's delete control. */
16
+ canRemove?: boolean;
17
+ /** Greys out compose and delete while the record cannot change. */
18
+ disabled?: boolean;
19
+ title?: string;
20
+ /** Leave the heading out when the container already names the thread (a sheet titled "Notes"). */
21
+ hideTitle?: boolean;
22
+ maxLength?: number;
23
+ /** Saves a new comment with the trimmed text. */
24
+ onAdd?: (text: string) => unknown;
25
+ }, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
26
+ remove: (comment: CommentItem) => any;
27
+ }, string, import("vue").PublicProps, Readonly<{
28
+ comments: CommentItem[];
29
+ /** Shows the compose box. */
30
+ canAdd?: boolean;
31
+ /** Shows each comment's delete control. */
32
+ canRemove?: boolean;
33
+ /** Greys out compose and delete while the record cannot change. */
34
+ disabled?: boolean;
35
+ title?: string;
36
+ /** Leave the heading out when the container already names the thread (a sheet titled "Notes"). */
37
+ hideTitle?: boolean;
38
+ maxLength?: number;
39
+ /** Saves a new comment with the trimmed text. */
40
+ onAdd?: (text: string) => unknown;
41
+ }> & Readonly<{
42
+ onRemove?: ((comment: CommentItem) => any) | undefined;
43
+ }>, {
44
+ disabled: boolean;
45
+ title: string;
46
+ maxLength: number;
47
+ canAdd: boolean;
48
+ canRemove: boolean;
49
+ hideTitle: boolean;
50
+ onAdd: (text: string) => unknown;
51
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
52
+ export default _default;
@@ -0,0 +1,36 @@
1
+ /**
2
+ * The message field under an activity stream: a capsule text area that grows with its text and a
3
+ * round send button that turns tinted once there is something to send.
4
+ *
5
+ * <Composer v-model="draft" :processing="posting" @submit="post" />
6
+ *
7
+ * Enter adds a line (comments are prose); Ctrl or ⌘ + Enter sends. `submit` carries the trimmed
8
+ * text; the owner clears the draft once it is saved, so a failed request keeps what was typed.
9
+ */
10
+ type __VLS_Props = {
11
+ placeholder?: string;
12
+ /** Accessible name of the field; defaults to the placeholder. */
13
+ label?: string;
14
+ maxLength?: number;
15
+ disabled?: boolean;
16
+ processing?: boolean;
17
+ };
18
+ type __VLS_PublicProps = __VLS_Props & {
19
+ modelValue?: string;
20
+ };
21
+ declare const _default: import("vue").DefineComponent<__VLS_PublicProps, {
22
+ focus: () => void | undefined;
23
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
24
+ submit: (text: string) => any;
25
+ "update:modelValue": (value: string) => any;
26
+ }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
27
+ onSubmit?: ((text: string) => any) | undefined;
28
+ "onUpdate:modelValue"?: ((value: string) => any) | undefined;
29
+ }>, {
30
+ disabled: boolean;
31
+ placeholder: string;
32
+ label: string;
33
+ processing: boolean;
34
+ maxLength: number;
35
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
36
+ export default _default;
@@ -1,4 +1,7 @@
1
+ export { default as ActivityStream, type ActivityComment, type ActivityEvent, type ActivityItem } from "./ActivityStream.vue";
1
2
  export { default as Avatar } from "./Avatar.vue";
3
+ export { default as CommentThread, type CommentItem } from "./CommentThread.vue";
4
+ export { default as Composer } from "./Composer.vue";
2
5
  export { default as Divider } from "./Divider.vue";
3
6
  export { initialsFor } from "./initials";
4
7
  export { default as KeyValue } from "./KeyValue.vue";