@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
package/CHANGELOG.md CHANGED
@@ -1,5 +1,29 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.10.0 — 2026-10-16
4
+
5
+ The last generic pieces an application kept to itself, and an identity whose users screens an application can shape. Needs go-core v1.15.0 (`goCore`, `src/modules` synced).
6
+
7
+ ### New
8
+ - **identity:** `usersFeature` can be shaped by the application: `path` moves the users list (a record is `<path>/:id`; the route names `users.index` / `users.record` stay), `replace: { list, general, newUser, deactivate }` swaps a whole screen for the application's own under a documented contract (`UsersReplace`, `NewUserDialogHandle`, `DeactivateDialogProps`, `DeactivateDialogHandle`), `activityRecords` names and links the kinds of record in a person's Activity, and `changeWords(row, t)` words changes the library has no sentence for (with links in the details). `OpenChangeRow` is go-core's `ChangeRow` with an open `action`, for the actions only the application's change log writes.
9
+ - **identity:** the users list has a Last sign-in filter (never signed in, or not for a long time), sent as go-core's `last_sign_in`.
10
+ - **identity:** the pieces a replaced screen reuses are exported: `PageBar`, `SectionIntro`, `SessionList`, `SignInList`, `SignInTable`, `ChangeFeed`, `NewUserDialog`, `DeactivateDialog`, `statusTone`, `USER_VIEWS`, `userList`, `PERSON`, `usePersonActions`, `usePersonSessions`, `useUsersContext` and `useUserDialogs`. A replacement reads the server's `ext` from the person (`ext?: unknown` in go-core 1.15's generated types) and calls `identityRoutes.usersCreate`, `usersUpdate` and `usersDeactivate` (`details` on the deactivation) with it. `PersonSection.props` receives the person with its `ext`.
11
+ - **identity:** `identityPlatform({ embed })` with `embedSession()`: the client half of a bearer session for a page in a cross-origin iframe (token in `sessionStorage`, `Authorization: Bearer`, not renewable, cleared when it is refused, runs out or the person signs out).
12
+ - **content:** `ActivityStream` (events and comments in one chronological stream, day separators, oldest first), `Composer` (a capsule text area that grows, sends on Ctrl or ⌘ + Enter) and `CommentThread` (the two together: `comments`, `canAdd`, `canRemove`, `onAdd`, `@remove`; the draft clears unless `onAdd` resolves to `false`). Texts are `core.activity.*` and `core.comments.*`.
13
+ - **shell:** `quickSearch({ search, suggest?, recent?, onChoose?, placeholder?, hint?, noneHint?, minLength?, delayMs? })`, a feature with a search field in the `search` slot and a palette in `host`, opened by Ctrl or ⌘ + K (listed in the shortcut help, silent while a dialog is open). The app returns groups of rows (`QuickSearchGroup`, `QuickSearchRow`); typing is debounced, an older answer is dropped, words are highlighted, Ctrl or ⌘ + Enter opens a row in a new tab. `useQuickSearch()` opens it from a trigger of your own; `QuickSearchPalette` and `QuickSearchButton` are exported for custom shells.
14
+ - **shell:** `darkMode({ dark, set, themeColor? })` puts the mode on the page (the `dark` class and `<meta name="theme-color">`) and adds the switch to the account menu; the preference lives where the app keeps it. `DarkModeRow` and `applyDarkMode` are exported. `offlineNotice()` (and `OfflineNotice`) shows a status in the bottom dock while the browser is offline.
15
+ - **collection:** `createPicker<Row, Options>()` and `PickerModal`: the open, choose and cancel plumbing of a choose-one dialog. `await picker.pick(options)` resolves with the row or `null`; the dialog's body is a `CollectionTable` with `pick`, mounted afresh each time it opens.
16
+ - **collection:** `highlightParts` and `HighlightPart` are exported.
17
+ - **collection:** `ListPage<Row, Meta>` takes the shape of the backend's `meta` as a second type parameter, carried through `CollectionLoader`, `defineCollection`, `useCollection`, `Collection`, `httpList` and `readListPage`, so an app reads it without a cast. The default is today's type, now exported as `ListMeta`. Declare the shape with `type`, not `interface`.
18
+ - **pwa:** `AndroidInstallBanner`, `IosInstallGuide`, `InstallQrSheet` and `QrCode`, the install guides of an installable app, generic over `app-name` (texts under `core.pwa`). The QR code needs `uqr`, a new dependency used by this entry only.
19
+ - **i18n:** `slavicPluralRule` (hr, bs, sr-Latn), `slovenianPluralRule` (with the dual) and `slavicPluralRules`, to pass as `pluralRules`. Counts such as 111–114 take the "other" form; a two-form message reads `one | other`.
20
+ - **state:** `installBackgroundTasks`, `createBackgroundTasks`, `useBackgroundTasks` and `BackgroundTaskCapsule`, for work that outlives the page (provided per application, no store library); `useCountUp`, a number that counts up when its value arrives (instant under reduced motion).
21
+ - **format:** `slugify`, a URL-fragment slug that folds diacritics.
22
+ - **i18n:** `core.actions.open` in every locale.
23
+
24
+ ### Changed
25
+ - **identity:** deactivating a person answers go-core's `DeactivateResult` (`{ ext? }`), as go-core v1.15.0 answers 200 instead of 204.
26
+
3
27
  ## 0.9.4 — 2026-10-16
4
28
 
5
29
  ### New
@@ -0,0 +1,87 @@
1
+ import { useI18n as k } from "vue-i18n";
2
+ import { a as p } from "./error-CD7x0Jrz.js";
3
+ import { u as g } from "./format-D8KUBmbS.js";
4
+ import { u as h } from "./describeError-B-NMa--w.js";
5
+ import { defineComponent as b, openBlock as a, createElementBlock as m, createElementVNode as c, toDisplayString as l, createCommentVNode as x, renderSlot as y, createBlock as v, unref as _, withCtx as w, normalizeClass as $, createVNode as E } from "vue";
6
+ import { g as N } from "./options-B48UiYsG.js";
7
+ import { _ as C } from "./Icon.vue_vue_type_script_lang-BhhsFYwp.js";
8
+ function q() {
9
+ const { t: s, te: n } = k(), o = g(), r = h(), d = (t) => [`errors.${t}`, `core.errors.${t}`].find((e) => n(e));
10
+ function i(t, e) {
11
+ if (p(t) && t.code) {
12
+ const f = d(t.code), u = typeof t.params?.locked_until == "string" ? new Date(t.params.locked_until) : null;
13
+ if (f && u && !Number.isNaN(u.getTime())) return s(f, { ...t.params, locked_until: o.time(u) });
14
+ }
15
+ return r(t, e === void 0 ? void 0 : { fallback: e });
16
+ }
17
+ return {
18
+ sentence: i,
19
+ describeFieldError: (t) => {
20
+ const e = d(t);
21
+ return e === void 0 ? t : s(e);
22
+ },
23
+ failureMessage: (t, e) => p(e) && e.code && (t === "failed" || t === "forbidden" || t === "conflict") ? i(e) : void 0
24
+ };
25
+ }
26
+ const S = { class: "flex flex-wrap items-end gap-3 px-row-inset" }, B = { class: "flex min-w-0 grow basis-56 flex-col gap-1" }, D = { class: "text-title font-semibold tracking-tight text-content-strong" }, V = {
27
+ key: 0,
28
+ class: "max-w-readable text-subheadline text-content-muted"
29
+ }, G = /* @__PURE__ */ b({
30
+ __name: "SectionIntro",
31
+ props: {
32
+ title: {},
33
+ description: {}
34
+ },
35
+ setup(s) {
36
+ return (n, o) => (a(), m("div", S, [
37
+ c("div", B, [
38
+ c("h2", D, l(s.title), 1),
39
+ s.description ? (a(), m("p", V, l(s.description), 1)) : x("", !0)
40
+ ]),
41
+ y(n.$slots, "actions")
42
+ ]));
43
+ }
44
+ }), z = ["disabled"], A = { class: "flex min-w-0 flex-1 flex-col" }, F = {
45
+ key: 0,
46
+ class: "text-footnote text-content-muted"
47
+ }, H = /* @__PURE__ */ b({
48
+ __name: "ActionRow",
49
+ props: {
50
+ label: {},
51
+ sub: { default: void 0 },
52
+ tone: { default: "link" },
53
+ disabled: { type: Boolean, default: !1 }
54
+ },
55
+ emits: ["click"],
56
+ setup(s, { emit: n }) {
57
+ const o = s, r = n;
58
+ return (d, i) => (a(), v(_(N), { layout: "stacked" }, {
59
+ default: w(() => [
60
+ c("button", {
61
+ type: "button",
62
+ disabled: o.disabled,
63
+ class: "flex w-full items-center gap-3 py-0.5 text-left focus-visible:outline-2 focus-visible:outline-border-focus disabled:opacity-50",
64
+ onClick: i[0] || (i[0] = (t) => r("click"))
65
+ }, [
66
+ c("span", A, [
67
+ c("span", {
68
+ class: $(["text-body", o.tone === "critical" ? "text-content-destructive" : "text-content-link"])
69
+ }, l(o.label), 3),
70
+ o.sub ? (a(), m("span", F, l(o.sub), 1)) : x("", !0)
71
+ ]),
72
+ E(_(C), {
73
+ name: "arrowRightSLine",
74
+ size: 18,
75
+ class: "shrink-0 text-content-disabled"
76
+ })
77
+ ], 8, z)
78
+ ]),
79
+ _: 1
80
+ }));
81
+ }
82
+ });
83
+ export {
84
+ G as _,
85
+ H as a,
86
+ q as u
87
+ };
@@ -0,0 +1,169 @@
1
+ import { defineComponent as q, ref as b, watch as R, computed as V, openBlock as l, createElementBlock as f, createVNode as v, unref as s, createElementVNode as r, withCtx as u, toDisplayString as c, Fragment as C, renderList as N, createBlock as g, createTextVNode as U, createCommentVNode as A } from "vue";
2
+ import { useI18n as D } from "vue-i18n";
3
+ import { RouterLink as I } from "vue-router";
4
+ import { _ as T } from "./IconTile.vue_vue_type_script_setup_true_lang-BmxCuUZ9.js";
5
+ import { _ as z } from "./Tabs.vue_vue_type_script_setup_true_lang-tpkGp98F.js";
6
+ import { u as G } from "./format-D8KUBmbS.js";
7
+ import { _ as B } from "./DateField.vue_vue_type_script_setup_true_lang-CeNwBbJT.js";
8
+ import { a as H } from "./FormGroup.vue_vue_type_script_setup_true_lang-D6jYfNjW.js";
9
+ import { g as J } from "./options-B48UiYsG.js";
10
+ import { P as M, g as Q, i as W, m as X } from "./index-pJ_eRg80.js";
11
+ import { u as Y } from "./platform-BQOX_Ntw.js";
12
+ import { b as Z } from "./routeResource-DlTsGTg_.js";
13
+ import { _ as tt } from "./AsyncSection.vue_vue_type_script_setup_true_lang-DGzQ-Snp.js";
14
+ import { _ as et } from "./Badge.vue_vue_type_script_setup_true_lang-DJyZc0C7.js";
15
+ import { u as at } from "./useLoad-M7V-AVwR.js";
16
+ import { _ as st } from "./ActionRow.vue_vue_type_script_setup_true_lang-IpcP3Bjc.js";
17
+ const ot = {
18
+ class: "flex min-w-0 flex-col gap-group-gap",
19
+ "data-person-activity": ""
20
+ }, nt = { class: "flex flex-wrap items-end justify-between gap-3" }, lt = {
21
+ class: "flex items-end gap-2",
22
+ "data-activity-range": ""
23
+ }, it = {
24
+ key: 0,
25
+ class: "px-row-inset py-4 text-body text-content-muted",
26
+ "data-activity-empty": ""
27
+ }, rt = {
28
+ key: 1,
29
+ class: "flex min-w-0 flex-col gap-group-gap",
30
+ "data-activity-feed": ""
31
+ }, ut = { class: "flex flex-wrap items-center gap-x-1.5" }, ct = { key: 1 }, dt = { class: "text-body tabular-nums text-content-muted" }, mt = { class: "px-row-inset text-footnote text-content-muted" }, At = /* @__PURE__ */ q({
32
+ __name: "Activity",
33
+ setup(pt) {
34
+ const { t: o, te: k } = D(), { http: E } = Y(), w = G(), h = Z(M), { activityAreas: L, activityRecords: P } = Q(), d = b("all"), m = b(null), p = b(null), y = b(1), _ = at(
35
+ async ({ signal: e }) => {
36
+ const t = h.id.value;
37
+ if (t === null) return null;
38
+ const a = { id: t, page: y.value, per_page: 20, ...d.value === "all" ? {} : { area: d.value }, ...m.value ? { from: m.value } : {}, ...p.value ? { to: p.value } : {} };
39
+ return (await E.request(W.usersActivity, a, { signal: e })).data;
40
+ },
41
+ { watch: () => h.id.value }
42
+ );
43
+ R([d, m, p], () => {
44
+ y.value = 1, _.reload();
45
+ }), R(y, () => void _.reload());
46
+ const $ = (e) => {
47
+ if (e === "all" || e === "identity" || e === "other") return o(`core.users.activity.areas.${e}`);
48
+ const t = L[e];
49
+ return t && k(t) ? o(t) : o("core.users.activity.areas.other");
50
+ }, F = V(() => _.data.value?.meta?.views ?? []), K = V(() => {
51
+ const e = F.value.filter((t) => t.key === "all" || t.key === d.value || t.count > 0).map((t) => ({ value: t.key, label: $(t.key), badge: t.count }));
52
+ return e.length > 0 ? e : [{ value: "all", label: $("all") }];
53
+ }), O = (e, t) => {
54
+ const a = P[e];
55
+ return a && k(a.labelKey) ? { text: `${o(a.labelKey)} #${t}`, to: a.to?.(t) } : { text: `${e} #${t}`, to: void 0 };
56
+ }, S = (e) => k(`core.users.activity.actions.${e}`) ? o(`core.users.activity.actions.${e}`) : o("core.users.activity.actions.other"), j = V(() => {
57
+ const e = [];
58
+ for (const t of _.data.value?.data ?? []) {
59
+ const a = { row: t, record: O(t.record_type, t.record_id) }, i = t.created_at.slice(0, 10), n = e[e.length - 1];
60
+ n && n.key === i ? n.rows.push(a) : e.push({ key: i, header: w.date(t.created_at), rows: [a] });
61
+ }
62
+ return e;
63
+ });
64
+ return (e, t) => (l(), f("div", ot, [
65
+ v(st, {
66
+ title: s(o)("core.users.sections.activity"),
67
+ description: s(o)("core.users.intro.activity", { name: s(h).data.value?.name ?? "" })
68
+ }, null, 8, ["title", "description"]),
69
+ r("div", nt, [
70
+ v(s(z), {
71
+ modelValue: d.value,
72
+ "onUpdate:modelValue": t[0] || (t[0] = (a) => d.value = a),
73
+ tabs: K.value,
74
+ presentation: "scope",
75
+ label: s(o)("core.users.activity.areas_label")
76
+ }, null, 8, ["modelValue", "tabs", "label"]),
77
+ r("div", lt, [
78
+ v(s(B), {
79
+ modelValue: m.value,
80
+ "onUpdate:modelValue": t[1] || (t[1] = (a) => m.value = a),
81
+ label: s(o)("core.users.activity.since"),
82
+ max: p.value ?? void 0
83
+ }, null, 8, ["modelValue", "label", "max"]),
84
+ v(s(B), {
85
+ modelValue: p.value,
86
+ "onUpdate:modelValue": t[2] || (t[2] = (a) => p.value = a),
87
+ label: s(o)("core.users.activity.until"),
88
+ min: m.value ?? void 0
89
+ }, null, 8, ["modelValue", "label", "min"])
90
+ ])
91
+ ]),
92
+ v(s(tt), {
93
+ state: s(_).state.value,
94
+ "skeleton-rows": 5,
95
+ "is-empty": () => !1,
96
+ onRetry: t[4] || (t[4] = (a) => s(_).reload())
97
+ }, {
98
+ default: u(({ value: a }) => [
99
+ !a || a.data.length === 0 ? (l(), f("p", it, c(s(o)("core.users.activity.empty")), 1)) : (l(), f("div", rt, [
100
+ (l(!0), f(C, null, N(j.value, (i) => (l(), g(s(H), {
101
+ key: i.key,
102
+ header: i.header
103
+ }, {
104
+ default: u(() => [
105
+ (l(!0), f(C, null, N(i.rows, ({ row: n, record: x }) => (l(), g(s(J), {
106
+ key: n.id,
107
+ layout: "setting",
108
+ label: S(n.action),
109
+ "data-activity-row": ""
110
+ }, {
111
+ leading: u(() => [
112
+ v(s(T), {
113
+ tone: "anchor",
114
+ icon: "listCheck"
115
+ })
116
+ ]),
117
+ sub: u(() => [
118
+ r("span", ut, [
119
+ r("span", null, c($(n.area)), 1),
120
+ t[5] || (t[5] = r("span", { "aria-hidden": "true" }, "·", -1)),
121
+ x.to ? (l(), g(s(I), {
122
+ key: 0,
123
+ to: x.to,
124
+ class: "text-content-link",
125
+ "data-activity-link": ""
126
+ }, {
127
+ default: u(() => [
128
+ U(c(x.text), 1)
129
+ ]),
130
+ _: 2
131
+ }, 1032, ["to"])) : (l(), f("span", ct, c(x.text), 1))
132
+ ])
133
+ ]),
134
+ default: u(() => [
135
+ n.signed_in_as ? (l(), g(s(et), {
136
+ key: 0,
137
+ tone: "warning",
138
+ "data-activity-signed-in-as": ""
139
+ }, {
140
+ default: u(() => [
141
+ U(c(n.signed_in_as.name ? s(o)("core.users.activity.signed_in_as", { name: n.signed_in_as.name }) : s(o)("core.users.activity.signed_in_as_other")), 1)
142
+ ]),
143
+ _: 2
144
+ }, 1024)) : A("", !0),
145
+ r("span", dt, c(s(w).time(n.created_at)), 1)
146
+ ]),
147
+ _: 2
148
+ }, 1032, ["label"]))), 128))
149
+ ]),
150
+ _: 2
151
+ }, 1032, ["header"]))), 128))
152
+ ])),
153
+ a ? (l(), g(X, {
154
+ key: 2,
155
+ page: y.value,
156
+ "onUpdate:page": t[3] || (t[3] = (i) => y.value = i),
157
+ "last-page": a.last_page,
158
+ total: a.total
159
+ }, null, 8, ["page", "last-page", "total"])) : A("", !0),
160
+ r("p", mt, c(s(o)("core.users.activity.footer")), 1)
161
+ ]),
162
+ _: 1
163
+ }, 8, ["state"])
164
+ ]));
165
+ }
166
+ });
167
+ export {
168
+ At as default
169
+ };