@wssto2/vue-core 0.9.4 → 0.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (169) hide show
  1. package/CHANGELOG.md +39 -0
  2. package/dist/ActionRow.vue_vue_type_script_setup_true_lang-DybAIOHS.js +64 -0
  3. package/dist/Activity-CdkJW68R.js +169 -0
  4. package/dist/{AdaptivePageShell.vue_vue_type_script_setup_true_lang-DdJOodn8.js → AdaptivePageShell.vue_vue_type_script_setup_true_lang-D5i77H6S.js} +147 -159
  5. package/dist/{AsyncSection.vue_vue_type_script_setup_true_lang-BdeOKqz_.js → AsyncSection.vue_vue_type_script_setup_true_lang-DGzQ-Snp.js} +1 -1
  6. package/dist/BottomDockPortal.vue_vue_type_script_setup_true_lang-DmwR-2SP.js +17 -0
  7. package/dist/Button.vue_vue_type_script_setup_true_lang-C74hcb0N.js +123 -0
  8. package/dist/Changes-DxK_QfiB.js +69 -0
  9. package/dist/{CollectionPage.vue_vue_type_script_setup_true_lang-DHcekGNn.js → CollectionPage.vue_vue_type_script_setup_true_lang-x0jyJ01f.js} +19 -18
  10. package/dist/{DataTable.vue_vue_type_script_setup_true_lang-8kBsNRuq.js → DataTable.vue_vue_type_script_setup_true_lang-C_ZytnW-.js} +1 -1
  11. package/dist/{DateField.vue_vue_type_script_setup_true_lang-BhKdCVFn.js → DateField.vue_vue_type_script_setup_true_lang-CeNwBbJT.js} +1 -1
  12. package/dist/{DeadLetters-Bb5pPlOY.js → DeadLetters-DnA7LP1w.js} +5 -6
  13. package/dist/DrawnCheck.vue_vue_type_script_setup_true_lang-9DzDJlIA.js +38 -0
  14. package/dist/FormGroup.vue_vue_type_script_setup_true_lang-D6jYfNjW.js +427 -0
  15. package/dist/{FormView.vue_vue_type_script_setup_true_lang-aaNnMIOi.js → FormView.vue_vue_type_script_setup_true_lang-DvbPEiNQ.js} +2 -2
  16. package/dist/{General-BAG7S6wV.js → General-2matxl2Y.js} +23 -24
  17. package/dist/Highlight.vue_vue_type_script_setup_true_lang-DZGBmwcX.js +29 -0
  18. package/dist/{IncidentRecord-D8aOpNHo.js → IncidentRecord-Bt3G4HlX.js} +14 -15
  19. package/dist/{IncidentsList-C0cFl0Db.js → IncidentsList-2iwgqp9J.js} +3 -3
  20. package/dist/{Modal.vue_vue_type_script_setup_true_lang-BlHhdmMy.js → Modal.vue_vue_type_script_setup_true_lang-DDS0iEnn.js} +9 -8
  21. package/dist/{NewRolePage-C6Iu-EQJ.js → NewRolePage-DhGFwvk3.js} +4 -4
  22. package/dist/{NumberField.vue_vue_type_script_setup_true_lang-TGGAq8J-.js → NumberField.vue_vue_type_script_setup_true_lang-B3UrXNqH.js} +1 -1
  23. package/dist/{PersonAccess.vue_vue_type_script_setup_true_lang-qz1tmYpF.js → PersonAccess.vue_vue_type_script_setup_true_lang-DbGZSNQc.js} +56 -56
  24. package/dist/ProfilePage-CpuyDBAv.js +685 -0
  25. package/dist/ProgressTrack.vue_vue_type_script_setup_true_lang-DrOm8k--.js +30 -0
  26. package/dist/{RecordHeader.vue_vue_type_script_setup_true_lang-B9mN7UxZ.js → RecordHeader.vue_vue_type_script_setup_true_lang-DqGc3Jyo.js} +1 -1
  27. package/dist/{ResourcePage.vue_vue_type_script_setup_true_lang-Cw8mGf_B.js → ResourcePage.vue_vue_type_script_setup_true_lang-DljhsTU4.js} +3 -3
  28. package/dist/{RoleEditor.vue_vue_type_script_setup_true_lang-CJPvOVDV.js → RoleEditor.vue_vue_type_script_setup_true_lang-C0FIotFA.js} +11 -12
  29. package/dist/{RolePage-Dj_ocMnM.js → RolePage-DaNv049g.js} +10 -10
  30. package/dist/{RolesPage-PXrs4O-1.js → RolesPage-6hlzJes_.js} +6 -6
  31. package/dist/SearchInput.vue_vue_type_script_setup_true_lang-w4eAqyZ9.js +32 -0
  32. package/dist/{SectionList.vue_vue_type_script_setup_true_lang-CtdF1zuv.js → SectionList.vue_vue_type_script_setup_true_lang-DR0_NsqC.js} +1 -1
  33. package/dist/{SectionNavigator.vue_vue_type_script_setup_true_lang-B5ove3rM.js → SectionNavigator.vue_vue_type_script_setup_true_lang-Dh3sXUt_.js} +2 -2
  34. package/dist/{SegmentedField.vue_vue_type_script_setup_true_lang-ChfDFAA2.js → SegmentedField.vue_vue_type_script_setup_true_lang-zv_AxpBn.js} +1 -1
  35. package/dist/{SelectField.vue_vue_type_script_setup_true_lang-BP8nAQwo.js → SelectField.vue_vue_type_script_setup_true_lang-BZwdANL3.js} +3 -3
  36. package/dist/{ServiceAccountDialog.vue_vue_type_script_setup_true_lang-aWkKwxNe.js → ServiceAccountDialog.vue_vue_type_script_setup_true_lang-FJbWxME_.js} +20 -20
  37. package/dist/{ServiceAccountRecord-bxX9yQkC.js → ServiceAccountRecord-0-JF5lRx.js} +24 -24
  38. package/dist/{ServiceAccountsList-BXE6htxk.js → ServiceAccountsList-DcsnOcf-.js} +32 -32
  39. package/dist/{Sessions--Gvc0kxw.js → Sessions-DgWhpk-i.js} +23 -24
  40. package/dist/{SettingsPage-DzDC7gD-.js → SettingsPage-BXPWATYU.js} +28 -30
  41. package/dist/{SignIn-CTI_699e.js → SignIn-DPoUwHZd.js} +9 -10
  42. package/dist/{SignInPage-HKC1bm2E.js → SignInPage-OyrVemro.js} +4 -4
  43. package/dist/SignIns-BMDrZVVp.js +64 -0
  44. package/dist/StatusLine.vue_vue_type_script_setup_true_lang-DsdQmLq6.js +56 -0
  45. package/dist/{SwitchField.vue_vue_type_script_setup_true_lang-BMA2YXTZ.js → SwitchField.vue_vue_type_script_setup_true_lang-Ds4q0bbl.js} +1 -1
  46. package/dist/{TextField.vue_vue_type_script_setup_true_lang-BFVsqcBX.js → TextField.vue_vue_type_script_setup_true_lang-CWIeeZRE.js} +2 -2
  47. package/dist/{TextareaField.vue_vue_type_script_setup_true_lang-Dyh4Hhyl.js → TextareaField.vue_vue_type_script_setup_true_lang-D2j4s96s.js} +1 -1
  48. package/dist/{TimeField.vue_vue_type_script_setup_true_lang-gGFfQLuK.js → TimeField.vue_vue_type_script_setup_true_lang-D-Em4glH.js} +1 -1
  49. package/dist/UserRecord-BW-gdCqi.js +202 -0
  50. package/dist/UsersList-B3ZF_1Dj.js +74 -0
  51. package/dist/access/index.js +4 -4
  52. package/dist/app/index.d.ts +1 -0
  53. package/dist/app/index.js +11 -10
  54. package/dist/app/languages.d.ts +8 -0
  55. package/dist/{application-BmXW6iW_.js → application-CuzT-0vW.js} +1 -1
  56. package/dist/button/index.js +6 -5
  57. package/dist/collection/Highlight.vue.d.ts +12 -0
  58. package/dist/collection/PickerModal.vue.d.ts +26 -0
  59. package/dist/collection/definition.d.ts +6 -6
  60. package/dist/collection/http.d.ts +6 -6
  61. package/dist/collection/index.d.ts +6 -1
  62. package/dist/collection/index.js +145 -85
  63. package/dist/collection/picker.d.ts +39 -0
  64. package/dist/collection/types.d.ts +9 -4
  65. package/dist/collection/useCollection.d.ts +5 -5
  66. package/dist/content/ActivityStream.vue.d.ts +62 -0
  67. package/dist/content/CommentThread.vue.d.ts +52 -0
  68. package/dist/content/Composer.vue.d.ts +36 -0
  69. package/dist/content/index.d.ts +3 -0
  70. package/dist/content/index.js +321 -56
  71. package/dist/controls/index.js +28 -54
  72. package/dist/form/index.js +132 -134
  73. package/dist/format/index.d.ts +1 -0
  74. package/dist/format/index.js +10 -6
  75. package/dist/format/slug.d.ts +8 -0
  76. package/dist/http-Dm0uXY9O.js +95 -0
  77. package/dist/i18n/index.d.ts +15 -0
  78. package/dist/i18n/index.js +89 -63
  79. package/dist/i18n/plural.d.ts +23 -0
  80. package/dist/i18n/serverMessages.d.ts +16 -0
  81. package/dist/identity/embed.d.ts +39 -0
  82. package/dist/identity/index.d.ts +22 -1
  83. package/dist/identity/index.js +40 -21
  84. package/dist/identity/session.d.ts +9 -1
  85. package/dist/identity/shared/ChangeFeed.vue.d.ts +6 -3
  86. package/dist/identity/users/context.d.ts +11 -0
  87. package/dist/identity/users/dialogs.d.ts +10 -0
  88. package/dist/identity/users/ext.d.ts +8 -0
  89. package/dist/identity/users/feature.d.ts +22 -1
  90. package/dist/identity/users/list.d.ts +12 -1
  91. package/dist/identity/users/personSections.d.ts +15 -6
  92. package/dist/identity/users/replace.d.ts +45 -0
  93. package/dist/identity/users/words.d.ts +28 -0
  94. package/dist/incidents/api.d.ts +1 -1
  95. package/dist/incidents/index.js +1 -1
  96. package/dist/{index-Dz0LkLM8.js → index-ClJeyW3F.js} +4 -4
  97. package/dist/index-Cq9TuOqH.js +1264 -0
  98. package/dist/{index-Dm-sdJJr.js → index-kEHY7hcG.js} +31 -32
  99. package/dist/index.d.ts +1 -1
  100. package/dist/index.js +1 -1
  101. package/dist/keepAlive-ClGnsIzT.js +55 -0
  102. package/dist/modal/index.js +3 -3
  103. package/dist/modules/identity/entities.d.ts +7 -0
  104. package/dist/modules/identity/routes.d.ts +8 -4
  105. package/dist/modules/identity/schemas.d.ts +16 -0
  106. package/dist/{neighbors-DVfU9T0o.js → neighbors-OyvGi233.js} +2 -2
  107. package/dist/notifications/deadletters/list.d.ts +1 -1
  108. package/dist/notifications/index.js +1 -1
  109. package/dist/{options-QuOkMKVZ.js → options-B48UiYsG.js} +2 -2
  110. package/dist/page/index.js +11 -11
  111. package/dist/phone/index.js +1 -1
  112. package/dist/pwa/AndroidInstallBanner.vue.d.ts +18 -0
  113. package/dist/pwa/InstallQrSheet.vue.d.ts +21 -0
  114. package/dist/pwa/IosInstallGuide.vue.d.ts +19 -0
  115. package/dist/pwa/QrCode.vue.d.ts +16 -0
  116. package/dist/pwa/index.d.ts +4 -0
  117. package/dist/pwa/index.js +244 -24
  118. package/dist/resource/index.js +1 -1
  119. package/dist/rowLayout-BsKEzEME.js +650 -0
  120. package/dist/shell/DarkModeRow.vue.d.ts +15 -0
  121. package/dist/shell/OfflineNotice.vue.d.ts +2 -0
  122. package/dist/shell/QuickSearchButton.vue.d.ts +2 -0
  123. package/dist/shell/QuickSearchPalette.vue.d.ts +12 -0
  124. package/dist/shell/darkMode.d.ts +26 -0
  125. package/dist/shell/index.d.ts +10 -0
  126. package/dist/shell/index.js +954 -579
  127. package/dist/shell/offlineNotice.d.ts +3 -0
  128. package/dist/shell/quickSearch.d.ts +14 -0
  129. package/dist/shell/quickSearchControl.d.ts +69 -0
  130. package/dist/shortcut-DUR6yPWA.js +93 -0
  131. package/dist/state/BackgroundTaskCapsule.vue.d.ts +18 -0
  132. package/dist/state/backgroundTasks.d.ts +58 -0
  133. package/dist/state/index.d.ts +4 -0
  134. package/dist/state/index.js +194 -80
  135. package/dist/state/useCountUp.d.ts +9 -0
  136. package/dist/styles.css +1 -1
  137. package/dist/{suggestions-BVQhoXzS.js → suggestions-q_v3M7G6.js} +1 -1
  138. package/dist/testing/collection.d.ts +1 -1
  139. package/dist/{useCommand-Dc8Lgs9h.js → useCommand-Ch_nx1AQ.js} +4 -4
  140. package/dist/{useGroupSheet-DQ6cVG-z.js → useGroupSheet-CPjHydQV.js} +14 -15
  141. package/dist/{useRecordDialog-BTsbHY38.js → useRecordDialog-DdkauXnU.js} +1 -1
  142. package/dist/{useResourceForm-DJ4Q75pq.js → useResourceForm-Dl6YFYyz.js} +1 -1
  143. package/package.json +3 -2
  144. package/dist/ActionRow.vue_vue_type_script_setup_true_lang-Cg1lhpcA.js +0 -45
  145. package/dist/Activity-29hsZ28j.js +0 -156
  146. package/dist/Button.vue_vue_type_script_setup_true_lang-Dp7OB-eF.js +0 -192
  147. package/dist/Changes-Dxjdkd_5.js +0 -129
  148. package/dist/FormErrors.vue_vue_type_script_setup_true_lang-CIggKPtq.js +0 -295
  149. package/dist/FormGroup.vue_vue_type_script_setup_true_lang-B37dixvJ.js +0 -137
  150. package/dist/PageBar.vue_vue_type_script_setup_true_lang-qI94fjJv.js +0 -47
  151. package/dist/ProfilePage-BnohZIEg.js +0 -764
  152. package/dist/ProgressTrack.vue_vue_type_script_setup_true_lang-B6Prw9hi.js +0 -64
  153. package/dist/SectionIntro.vue_vue_type_script_setup_true_lang-CZtPrmXD.js +0 -23
  154. package/dist/SessionList.vue_vue_type_script_setup_true_lang-Cnyt5V8T.js +0 -133
  155. package/dist/SignIns-BcqBgWgN.js +0 -121
  156. package/dist/UserRecord-CtUPpbCt.js +0 -267
  157. package/dist/UsersList-BMkIgIg8.js +0 -155
  158. package/dist/definition-C7QuyV3i.js +0 -54
  159. package/dist/http-nz92KjdS.js +0 -42
  160. package/dist/identity/fieldMessages.d.ts +0 -15
  161. package/dist/identity/users/languages.d.ts +0 -4
  162. package/dist/index-CdtofdcJ.js +0 -501
  163. package/dist/keepAlive-z3IRFkQq.js +0 -46
  164. package/dist/languages-BShG9LpE.js +0 -10
  165. package/dist/rowLayout-CT8vWYgI.js +0 -663
  166. package/dist/signInEvents-DWShrJox.js +0 -30
  167. package/dist/status-BRA14qwX.js +0 -34
  168. package/dist/useWaitStatus-fsacMl4W.js +0 -24
  169. /package/dist/{fieldMessages-B6GHgi40.js → serverMessages-B6GHgi40.js} +0 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,44 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.11.0 — 2026-10-17
4
+
5
+ The five gaps an application met adopting 0.10.0's users screens and quick search. go-core is unchanged (`v1.15.0`).
6
+
7
+ ### New
8
+ - **identity:** `PersonSection.after` (`general`, `signin`, `sessions`, `signins`, `changes` or `activity`, typed as `BuiltInPersonSection`) places an application's section right behind that built-in one, in its group (the section's own `groupKey` is replaced by the group's). Without it the section stays at the end. Another name is a start-up error that lists the valid ones.
9
+ - **identity:** `usersFeature({ collection })` is the one definition of the people list, used by the list page and by the previous / next of a person's record. Default `userList`. An application whose list filters by more than the library knows passes its own (`UsersCollection`), the one its `replace.list` page uses, and the record's pager then asks the server with those filters too.
10
+ - **i18n:** `useServerMessages` is exported from `@wssto2/vue-core/i18n` (moved from identity): `describeFieldError`, `failureMessage(kind, error)` and `sentence(error)` for any go-core refusal, in the app's `errors.<reason>` or the library's `core.errors.<reason>`.
11
+ - **app:** `useLanguages` is exported from `@wssto2/vue-core/app`: the application's locales as select options, each named in itself.
12
+ - **collection:** `<Highlight :text :search />`, the text with the words of the search in `<mark>`, over `highlightParts`. `RecordIdentity` and the quick-search palette use it, so the library has one highlight.
13
+
14
+ ### Changed
15
+ - **shell:** `quickSearch` `placeholder`, `hint` and `noneHint` are `MaybeRefOrGetter<string>`, read when the palette renders, so an application whose messages load lazily passes `() => t("…")`. A plain string still works.
16
+ - **shell:** the quick-search palette marks matched words with the look `RecordIdentity` uses (the warning tone), not the tint it had.
17
+
18
+ ## 0.10.0 — 2026-10-16
19
+
20
+ 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).
21
+
22
+ ### New
23
+ - **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.
24
+ - **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`.
25
+ - **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`.
26
+ - **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).
27
+ - **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.*`.
28
+ - **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.
29
+ - **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.
30
+ - **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.
31
+ - **collection:** `highlightParts` and `HighlightPart` are exported.
32
+ - **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`.
33
+ - **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.
34
+ - **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`.
35
+ - **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).
36
+ - **format:** `slugify`, a URL-fragment slug that folds diacritics.
37
+ - **i18n:** `core.actions.open` in every locale.
38
+
39
+ ### Changed
40
+ - **identity:** deactivating a person answers go-core's `DeactivateResult` (`{ ext? }`), as go-core v1.15.0 answers 200 instead of 204.
41
+
3
42
  ## 0.9.4 — 2026-10-16
4
43
 
5
44
  ### New
@@ -0,0 +1,64 @@
1
+ import { defineComponent as r, openBlock as o, createElementBlock as l, createElementVNode as s, toDisplayString as n, createCommentVNode as d, renderSlot as f, createBlock as u, unref as c, withCtx as p, normalizeClass as _, createVNode as x } from "vue";
2
+ import { g as b } from "./options-B48UiYsG.js";
3
+ import { _ as h } from "./Icon.vue_vue_type_script_lang-BhhsFYwp.js";
4
+ const k = { class: "flex flex-wrap items-end gap-3 px-row-inset" }, g = { class: "flex min-w-0 grow basis-56 flex-col gap-1" }, w = { class: "text-title font-semibold tracking-tight text-content-strong" }, y = {
5
+ key: 0,
6
+ class: "max-w-readable text-subheadline text-content-muted"
7
+ }, E = /* @__PURE__ */ r({
8
+ __name: "SectionIntro",
9
+ props: {
10
+ title: {},
11
+ description: {}
12
+ },
13
+ setup(e) {
14
+ return (i, t) => (o(), l("div", k, [
15
+ s("div", g, [
16
+ s("h2", w, n(e.title), 1),
17
+ e.description ? (o(), l("p", y, n(e.description), 1)) : d("", !0)
18
+ ]),
19
+ f(i.$slots, "actions")
20
+ ]));
21
+ }
22
+ }), $ = ["disabled"], v = { class: "flex min-w-0 flex-1 flex-col" }, C = {
23
+ key: 0,
24
+ class: "text-footnote text-content-muted"
25
+ }, R = /* @__PURE__ */ r({
26
+ __name: "ActionRow",
27
+ props: {
28
+ label: {},
29
+ sub: { default: void 0 },
30
+ tone: { default: "link" },
31
+ disabled: { type: Boolean, default: !1 }
32
+ },
33
+ emits: ["click"],
34
+ setup(e, { emit: i }) {
35
+ const t = e, m = i;
36
+ return (B, a) => (o(), u(c(b), { layout: "stacked" }, {
37
+ default: p(() => [
38
+ s("button", {
39
+ type: "button",
40
+ disabled: t.disabled,
41
+ 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",
42
+ onClick: a[0] || (a[0] = (S) => m("click"))
43
+ }, [
44
+ s("span", v, [
45
+ s("span", {
46
+ class: _(["text-body", t.tone === "critical" ? "text-content-destructive" : "text-content-link"])
47
+ }, n(t.label), 3),
48
+ t.sub ? (o(), l("span", C, n(t.sub), 1)) : d("", !0)
49
+ ]),
50
+ x(c(h), {
51
+ name: "arrowRightSLine",
52
+ size: 18,
53
+ class: "shrink-0 text-content-disabled"
54
+ })
55
+ ], 8, $)
56
+ ]),
57
+ _: 1
58
+ }));
59
+ }
60
+ });
61
+ export {
62
+ E as _,
63
+ R as a
64
+ };
@@ -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, f as Q, i as W, l as X } from "./index-Cq9TuOqH.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-DybAIOHS.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
+ };