@wssto2/vue-core 0.12.0 → 0.13.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 (122) hide show
  1. package/CHANGELOG.md +33 -0
  2. package/README.md +4 -2
  3. package/dist/{AccessGate.vue_vue_type_script_setup_true_lang-CzQbD2Pc.js → AccessGate.vue_vue_type_script_setup_true_lang-DEzXovsY.js} +1 -1
  4. package/dist/{Activity-CdkJW68R.js → Activity-ChfxdvXf.js} +24 -23
  5. package/dist/{AdaptivePageShell.vue_vue_type_script_setup_true_lang-D5i77H6S.js → AdaptivePageShell.vue_vue_type_script_setup_true_lang-lPj9hPqV.js} +33 -33
  6. package/dist/{Changes-DxK_QfiB.js → Changes-BCa43_mO.js} +18 -17
  7. package/dist/{CollectionPage.vue_vue_type_script_setup_true_lang-x0jyJ01f.js → CollectionPage.vue_vue_type_script_setup_true_lang-C1GCvyZx.js} +6 -6
  8. package/dist/{DataTable.vue_vue_type_script_setup_true_lang-C_ZytnW-.js → DataTable.vue_vue_type_script_setup_true_lang-B9r9M5Gt.js} +1 -1
  9. package/dist/{DateField.vue_vue_type_script_setup_true_lang-CeNwBbJT.js → DateField.vue_vue_type_script_setup_true_lang-B5UUY1OO.js} +2 -2
  10. package/dist/{DeadLetters-DnA7LP1w.js → DeadLetters-wFTqhISU.js} +5 -5
  11. package/dist/{General-2matxl2Y.js → General-jW7u4MjH.js} +16 -15
  12. package/dist/{IncidentRecord-Bt3G4HlX.js → IncidentRecord-CXzgLKqI.js} +6 -6
  13. package/dist/{IncidentsList-2iwgqp9J.js → IncidentsList-D1MySyXb.js} +6 -6
  14. package/dist/{NewRolePage-DhGFwvk3.js → NewRolePage-CQ5UVaHs.js} +3 -3
  15. package/dist/{NumberField.vue_vue_type_script_setup_true_lang-B3UrXNqH.js → NumberField.vue_vue_type_script_setup_true_lang-YVgf5CP6.js} +1 -1
  16. package/dist/{PersonAccess.vue_vue_type_script_setup_true_lang-DbGZSNQc.js → PersonAccess.vue_vue_type_script_setup_true_lang-CWCt9_dM.js} +2 -2
  17. package/dist/{ProfilePage-CpuyDBAv.js → ProfilePage-Ca3x3UAH.js} +79 -77
  18. package/dist/{RecordHeader.vue_vue_type_script_setup_true_lang-DqGc3Jyo.js → RecordHeader.vue_vue_type_script_setup_true_lang-Do_ATJwT.js} +1 -1
  19. package/dist/{ResourcePage.vue_vue_type_script_setup_true_lang-DljhsTU4.js → ResourcePage.vue_vue_type_script_setup_true_lang-Coz91xht.js} +1 -1
  20. package/dist/{RoleEditor.vue_vue_type_script_setup_true_lang-C0FIotFA.js → RoleEditor.vue_vue_type_script_setup_true_lang-d_aaeXTT.js} +2 -2
  21. package/dist/{RolePage-DaNv049g.js → RolePage-BUj1w1m1.js} +5 -5
  22. package/dist/{RolesPage-6hlzJes_.js → RolesPage-NKzBUsrM.js} +3 -3
  23. package/dist/{SectionNavigator.vue_vue_type_script_setup_true_lang-Dh3sXUt_.js → SectionNavigator.vue_vue_type_script_setup_true_lang-DfKEhTFv.js} +2 -2
  24. package/dist/{ServiceAccountDialog.vue_vue_type_script_setup_true_lang-FJbWxME_.js → ServiceAccountDialog.vue_vue_type_script_setup_true_lang-4nbhEpv_.js} +10 -9
  25. package/dist/{ServiceAccountRecord-0-JF5lRx.js → ServiceAccountRecord-ClbyeLhL.js} +8 -8
  26. package/dist/{ServiceAccountsList-DcsnOcf-.js → ServiceAccountsList-B2VDnYxD.js} +5 -5
  27. package/dist/{Sessions-DgWhpk-i.js → Sessions-BjkciyHH.js} +23 -21
  28. package/dist/{SettingsPage-BXPWATYU.js → SettingsPage-Csb14qsx.js} +7 -7
  29. package/dist/{SignIn-DPoUwHZd.js → SignIn-DPFMv4C7.js} +14 -12
  30. package/dist/{SignInPage-OyrVemro.js → SignInPage-DukoFqkt.js} +2 -2
  31. package/dist/{SignIns-BMDrZVVp.js → SignIns-DvdpNkiS.js} +23 -22
  32. package/dist/{TimeField.vue_vue_type_script_setup_true_lang-D-Em4glH.js → TimeField.vue_vue_type_script_setup_true_lang-DpDXHH7u.js} +2 -2
  33. package/dist/{Timestamp.vue_vue_type_script_setup_true_lang-ClZAAUMd.js → Timestamp.vue_vue_type_script_setup_true_lang-DlEUKWra.js} +1 -1
  34. package/dist/{UserRecord-BW-gdCqi.js → UserRecord-B9SeSWQh.js} +57 -55
  35. package/dist/{UsersList-B3ZF_1Dj.js → UsersList-CREG8q3l.js} +4 -4
  36. package/dist/access/index.js +4 -4
  37. package/dist/app/application.d.ts +14 -6
  38. package/dist/app/current.d.ts +11 -0
  39. package/dist/app/environment.d.ts +8 -0
  40. package/dist/app/index.d.ts +1 -0
  41. package/dist/app/index.js +14 -12
  42. package/dist/application-DomS6sbx.js +435 -0
  43. package/dist/collection/http.d.ts +16 -1
  44. package/dist/collection/index.d.ts +1 -1
  45. package/dist/collection/index.js +34 -32
  46. package/dist/content/Money.vue.d.ts +1 -1
  47. package/dist/content/index.js +151 -158
  48. package/dist/{contributions-CeG4bszd.js → contributions-obnyn03x.js} +1 -1
  49. package/dist/current-B0lHKTWr.js +17 -0
  50. package/dist/form/DateField.vue.d.ts +2 -2
  51. package/dist/form/DateTimeField.vue.d.ts +2 -2
  52. package/dist/form/MoneyField.vue.d.ts +1 -1
  53. package/dist/form/NumberField.vue.d.ts +1 -1
  54. package/dist/form/date/MonthYearPanel.vue.d.ts +1 -1
  55. package/dist/form/date/days.d.ts +3 -3
  56. package/dist/form/index.d.ts +2 -0
  57. package/dist/form/index.js +1111 -1081
  58. package/dist/form/zodErrorMap.d.ts +35 -0
  59. package/dist/format/format.d.ts +51 -6
  60. package/dist/format/index.d.ts +1 -1
  61. package/dist/format/index.js +1 -1
  62. package/dist/format-DoKs29bZ.js +118 -0
  63. package/dist/{guards-Biv_SlGn.js → guards-DGcSfTEh.js} +1 -1
  64. package/dist/http-DOEfFCDA.js +107 -0
  65. package/dist/i18n/index.js +15 -15
  66. package/dist/identity/index.d.ts +2 -0
  67. package/dist/identity/index.js +43 -40
  68. package/dist/identity/usePreferences.d.ts +19 -0
  69. package/dist/incidents/clientErrorReporter.d.ts +2 -1
  70. package/dist/incidents/index.js +1 -1
  71. package/dist/{index-kEHY7hcG.js → index-CRxU_Wh2.js} +61 -61
  72. package/dist/{index-Cq9TuOqH.js → index-DZikGJ8L.js} +457 -511
  73. package/dist/{index-ClJeyW3F.js → index-D_yyd4C2.js} +4 -4
  74. package/dist/index.d.ts +1 -1
  75. package/dist/index.js +1 -1
  76. package/dist/internal/intlLocale.d.ts +5 -2
  77. package/dist/modules/identity/entities.d.ts +7 -2
  78. package/dist/modules/identity/routes.d.ts +5 -2
  79. package/dist/modules/identity/schemas.d.ts +6 -2
  80. package/dist/{navigation-TnVFYRaX.js → navigation-CctcxT51.js} +1 -1
  81. package/dist/{neighbors-OyvGi233.js → neighbors-Csfan8Ho.js} +1 -1
  82. package/dist/notifications/index.js +1 -1
  83. package/dist/onboarding/Tip.vue.d.ts +41 -0
  84. package/dist/onboarding/index.d.ts +1 -0
  85. package/dist/onboarding/index.js +145 -0
  86. package/dist/onboarding/tips.d.ts +5 -0
  87. package/dist/page/index.js +3 -3
  88. package/dist/phone/index.js +74 -74
  89. package/dist/phone/phone.d.ts +3 -3
  90. package/dist/platform/httpSession.d.ts +1 -1
  91. package/dist/platform/index.d.ts +2 -0
  92. package/dist/platform/index.js +16 -13
  93. package/dist/platform/preferences.d.ts +35 -0
  94. package/dist/platform/session.d.ts +6 -1
  95. package/dist/platform-DtISOEt7.js +284 -0
  96. package/dist/playwright/session.d.ts +7 -11
  97. package/dist/preferences-hYhrw8Uy.js +91 -0
  98. package/dist/resource/index.d.ts +1 -0
  99. package/dist/resource/index.js +24 -8
  100. package/dist/resource/read.d.ts +16 -0
  101. package/dist/router/index.js +3 -3
  102. package/dist/{rowLayout-BsKEzEME.js → rowLayout-y1IB_h2r.js} +2 -2
  103. package/dist/{sections-CvUwZ-S1.js → sections-fkW_IJLc.js} +1 -1
  104. package/dist/{serverMessages-B6GHgi40.js → serverMessages-Ddghrewh.js} +1 -1
  105. package/dist/shell/darkMode.d.ts +13 -8
  106. package/dist/shell/index.js +396 -384
  107. package/dist/{state-6KSYsVw0.js → state-CXMexi0l.js} +1 -1
  108. package/dist/styles.css +1 -1
  109. package/dist/testing/app.d.ts +11 -0
  110. package/dist/testing/format.d.ts +4 -2
  111. package/dist/testing/index.d.ts +1 -1
  112. package/dist/testing/index.js +96 -89
  113. package/dist/testing/platform.d.ts +2 -0
  114. package/dist/usePreferences-B8LIZp_f.js +47 -0
  115. package/dist/{useTypedEntry-C_Bk4sI0.js → useTypedEntry-DKs8I1yP.js} +279 -280
  116. package/package.json +6 -2
  117. package/src/styles/components.css +17 -0
  118. package/dist/application-CuzT-0vW.js +0 -420
  119. package/dist/format-D8KUBmbS.js +0 -87
  120. package/dist/http-Dm0uXY9O.js +0 -95
  121. package/dist/intlLocale-CeRU44qJ.js +0 -4
  122. package/dist/platform-BQOX_Ntw.js +0 -283
@@ -35,6 +35,8 @@ export { usersRoutes } from "./users/routes";
35
35
  export { default as ActionRow } from "./shared/ActionRow.vue";
36
36
  export { default as SignInAsButton } from "./SignInAsButton.vue";
37
37
  export { isSessionEnded, lockedUntil, returnToOwnAccount, signIn, signInAs } from "./signIn";
38
+ export { usePreferences } from "./usePreferences";
39
+ export type { UsedPreferences } from "./usePreferences";
38
40
  export { parseIdentityUser } from "./user";
39
41
  export type { IdentityUser } from "./user";
40
42
  export { serviceAccountsFeature } from "./serviceaccounts/feature";
@@ -1,42 +1,45 @@
1
- import { m as a, v as t, w as n, P as o, l as i, j as r, _ as u, t as c, k as d, U as S, x as g, y as A, z as l, A as I, i as p, B as R, g as m, C as y, D as U, r as f, E as P, F as v, G as x, p as D, H as E, I as F, s as b, e as w, h as B, b as C, f as L, J as T, K as _, c as h } from "../index-Cq9TuOqH.js";
2
- import { a as H, _ as K } from "../ActionRow.vue_vue_type_script_setup_true_lang-DybAIOHS.js";
3
- import { s as O } from "../routes-Beyr5NQo.js";
1
+ import { i as a } from "../preferences-hYhrw8Uy.js";
2
+ import { k as o, r as n, t as i, P as r, j as u, h as c, _ as d, q as S, i as g, U as A, v as f, w as l, x as p, y as m, z as I, A as R, o as x, B as y, C as P, n as U, s as v, e as D, g as E, b, f as w, D as F, E as B, c as C } from "../index-DZikGJ8L.js";
3
+ import { a as T, _ } from "../ActionRow.vue_vue_type_script_setup_true_lang-DybAIOHS.js";
4
+ import { i as k, l as N, r as O, s as j, a as q, u as z } from "../usePreferences-B8LIZp_f.js";
5
+ import { s as K } from "../routes-Beyr5NQo.js";
4
6
  export {
5
- H as ActionRow,
6
- a as ChangeFeed,
7
- t as DeactivateDialog,
8
- n as NewUserDialog,
9
- o as PERSON,
10
- i as PageBar,
11
- K as SectionIntro,
12
- r as SessionList,
13
- u as SignInAsButton,
14
- c as SignInList,
15
- d as SignInTable,
16
- S as USER_VIEWS,
17
- g as embedHeaders,
18
- A as embedSession,
19
- l as identityFeature,
20
- I as identityPlatform,
21
- p as identityRoutes,
22
- R as identitySessionAdapter,
23
- m as isSessionEnded,
24
- y as lockedUntil,
25
- U as parseIdentityUser,
26
- f as personActionsKey,
27
- P as profileRoutes,
28
- v as returnToOwnAccount,
29
- x as serviceAccountsFeature,
30
- D as serviceAccountsRoutes,
31
- O as serviceaccountRoutes,
32
- E as signIn,
33
- F as signInAs,
34
- b as statusTone,
35
- w as usePersonActions,
36
- B as usePersonSessions,
37
- C as useUserDialogs,
38
- L as useUsersContext,
39
- T as userList,
40
- _ as usersFeature,
41
- h as usersRoutes
7
+ T as ActionRow,
8
+ o as ChangeFeed,
9
+ n as DeactivateDialog,
10
+ i as NewUserDialog,
11
+ r as PERSON,
12
+ u as PageBar,
13
+ _ as SectionIntro,
14
+ c as SessionList,
15
+ d as SignInAsButton,
16
+ S as SignInList,
17
+ g as SignInTable,
18
+ A as USER_VIEWS,
19
+ f as embedHeaders,
20
+ l as embedSession,
21
+ p as identityFeature,
22
+ m as identityPlatform,
23
+ a as identityRoutes,
24
+ I as identitySessionAdapter,
25
+ k as isSessionEnded,
26
+ N as lockedUntil,
27
+ R as parseIdentityUser,
28
+ x as personActionsKey,
29
+ y as profileRoutes,
30
+ O as returnToOwnAccount,
31
+ P as serviceAccountsFeature,
32
+ U as serviceAccountsRoutes,
33
+ K as serviceaccountRoutes,
34
+ j as signIn,
35
+ q as signInAs,
36
+ v as statusTone,
37
+ D as usePersonActions,
38
+ E as usePersonSessions,
39
+ z as usePreferences,
40
+ b as useUserDialogs,
41
+ w as useUsersContext,
42
+ F as userList,
43
+ B as usersFeature,
44
+ C as usersRoutes
42
45
  };
@@ -0,0 +1,19 @@
1
+ import { type Preferences, type PreferencesPatch } from "../platform";
2
+ /** `Preferences` as a component uses them: `save` never rejects. */
3
+ export interface UsedPreferences<T extends object> {
4
+ readonly value: Preferences<T>["value"];
5
+ /** Applies the patch at once and saves it (see `Preferences.save`). A refusal is taken back and said in a toast; resolves whether it was saved. */
6
+ save(patch: PreferencesPatch<T>): Promise<boolean>;
7
+ }
8
+ /**
9
+ * The signed-in person's stored preferences (`preferences` of the session payload, saved through go-core identity's
10
+ * `PUT /v1/auth/preferences`), typed with the application's own shape:
11
+ *
12
+ * const preferences = usePreferences<{ dark_mode: boolean; onboarding: { tips_dismissed: string[] } }>();
13
+ * preferences.value.value.dark_mode; // reactive
14
+ * await preferences.save({ dark_mode: true }); // at once on screen, then the server's merged answer
15
+ *
16
+ * A patch merges as JSON Merge Patch: objects merge, `null` deletes a key, arrays replace. Saves are sent one after another.
17
+ * Call it in `setup`.
18
+ */
19
+ export declare function usePreferences<T extends object = Record<string, unknown>>(): UsedPreferences<T>;
@@ -28,7 +28,8 @@ export declare const MAX_REPORTS_PER_SESSION = 20;
28
28
  *
29
29
  * createApplication({ platform, features, onError: clientErrorReporter({ platform, appVersion: __APP_VERSION__ }) })
30
30
  *
31
- * Reported: component errors, unhandled rejections and window errors that carry a real `Error` whose stack has a frame of the
31
+ * Reported: component errors, unhandled rejections, window errors and errors the code handled itself (`report` of the application, as
32
+ * `[handled: detail] message`) that carry a real `Error` whose stack has a frame of the
32
33
  * application's own origin. Not reported: failed requests (`ApiError`, of any kind: the server captures its own 5xx),
33
34
  * `Script error.`, errors of extensions and other origins, failures of effects, loads and the router, and anything while nobody
34
35
  * is signed in. Each error (message plus top frame) goes once per page session, at most 20 distinct ones. A report sends the message,
@@ -1,4 +1,4 @@
1
- import { h as t, j as i, k as r, l as n, i as a } from "../index-kEHY7hcG.js";
1
+ import { h as t, j as i, k as r, l as n, i as a } from "../index-CRxU_Wh2.js";
2
2
  export {
3
3
  t as MAX_REPORTS_PER_SESSION,
4
4
  i as clientErrorReporter,
@@ -1,19 +1,19 @@
1
1
  import { r as p } from "./route-goWMxDUN.js";
2
2
  import { d as V, p as U } from "./feature-DdUAfyi4.js";
3
- import { defineComponent as A, computed as O, onMounted as L, watch as B, openBlock as S, createBlock as y, unref as e, withCtx as I, createElementVNode as X, createVNode as c, mergeProps as d, createCommentVNode as R, ref as F } from "vue";
3
+ import { defineComponent as R, computed as O, onMounted as L, watch as B, openBlock as y, createBlock as I, unref as e, withCtx as T, createElementVNode as X, createVNode as c, mergeProps as l, createCommentVNode as k, ref as F } from "vue";
4
4
  import { d as j } from "./context-Ch1r4fdN.js";
5
- import { useI18n as P } from "vue-i18n";
5
+ import { useI18n as M } from "vue-i18n";
6
6
  import { a as N } from "./FormGroup.vue_vue_type_script_setup_true_lang-D6jYfNjW.js";
7
7
  import { _ as G } from "./SelectField.vue_vue_type_script_setup_true_lang-BZwdANL3.js";
8
8
  import { _ as g } from "./TextareaField.vue_vue_type_script_setup_true_lang-D2j4s96s.js";
9
9
  import { _ as E } from "./TextField.vue_vue_type_script_setup_true_lang-CWIeeZRE.js";
10
10
  import { u as K, _ as z } from "./useCommand-Ch_nx1AQ.js";
11
11
  import { t as H } from "./toast-CqSDTWRX.js";
12
- import { u as k } from "./platform-BQOX_Ntw.js";
13
- import { d as Q, r as W, l as Y } from "./http-Dm0uXY9O.js";
12
+ import { u as C } from "./platform-DtISOEt7.js";
13
+ import { d as Q, r as W, a as Y } from "./http-DOEfFCDA.js";
14
14
  import { _ as J } from "./AccountMenuItem.vue_vue_type_script_setup_true_lang-BIYgaihv.js";
15
15
  import { d as Z } from "./defineRoutes-BGAdiIrt.js";
16
- import { d as ee } from "./application-CuzT-0vW.js";
16
+ import { d as ee } from "./application-DomS6sbx.js";
17
17
  import { R as te } from "./client-Dg303Pmc.js";
18
18
  import { a as ne } from "./error-CD7x0Jrz.js";
19
19
  const v = {
@@ -24,7 +24,7 @@ const v = {
24
24
  comment: p("POST", "/v1/incidents/:incidentID/comments", { permission: "incident:create" }),
25
25
  update: p("PATCH", "/v1/incidents/:incidentID", { permission: "incident:update" }),
26
26
  clientError: p("POST", "/v1/incidents/client-errors")
27
- }, [ie, C] = j("vue-core.incidents"), q = "incident:view", se = "incident:create", Fe = "incident:update", re = "incident:manage";
27
+ }, [ie, D] = j("vue-core.incidents"), $ = "incident:view", se = "incident:create", Fe = "incident:update", re = "incident:manage";
28
28
  function je(t) {
29
29
  return Q({
30
30
  id: "incidents",
@@ -35,7 +35,7 @@ function je(t) {
35
35
  defaults: { sort: "last_seen_at", direction: "desc" }
36
36
  });
37
37
  }
38
- const T = (t) => ({ headers: { "Idempotency-Key": t } });
38
+ const A = (t) => ({ headers: { "Idempotency-Key": t } });
39
39
  function oe(t) {
40
40
  return {
41
41
  show: async (n, s) => {
@@ -43,13 +43,13 @@ function oe(t) {
43
43
  return { incident: r, reports: o?.reports ?? [], comments: o?.comments ?? [] };
44
44
  },
45
45
  /** The whole management form; the answer is the stored incident (without its people: the page reads again for them). */
46
- update: async (n, s, r) => (await t.request(v.update, { ...s, incidentID: n }, T(r))).data,
46
+ update: async (n, s, r) => (await t.request(v.update, { ...s, incidentID: n }, A(r))).data,
47
47
  /** A report: the incident it opened or joined. */
48
- report: async (n, s) => (await t.request(v.report, n, T(s))).data.data,
49
- comment: async (n, s, r) => (await t.request(v.comment, { ...s, incidentID: n }, T(r))).data
48
+ report: async (n, s) => (await t.request(v.report, n, A(s))).data.data,
49
+ comment: async (n, s, r) => (await t.request(v.comment, { ...s, incidentID: n }, A(r))).data
50
50
  };
51
51
  }
52
- const ae = () => oe(k().http);
52
+ const ae = () => oe(C().http);
53
53
  function ce(t, n) {
54
54
  return {
55
55
  safeParse(s) {
@@ -135,184 +135,184 @@ const He = {
135
135
  }, ue = {
136
136
  class: "flex flex-col gap-group-gap",
137
137
  "data-test": "incident-report"
138
- }, me = /* @__PURE__ */ A({
138
+ }, me = /* @__PURE__ */ R({
139
139
  __name: "ReportDialog",
140
140
  props: {
141
141
  autoOpen: { type: Boolean }
142
142
  },
143
143
  emits: ["created", "close"],
144
144
  setup(t, { expose: n, emit: s }) {
145
- const r = t, o = s, { t: i } = P(), { access: l } = k(), u = ae(), { appVersion: h } = C(), x = O(() => l.can(re)), w = O(() => Object.entries(le).map(([m, f]) => ({ value: m, label: i(f) }))), _ = K({
145
+ const r = t, o = s, { t: i } = M(), { access: d } = C(), u = ae(), { appVersion: h } = D(), x = O(() => d.can(re)), w = O(() => Object.entries(le).map(([m, f]) => ({ value: m, label: i(f) }))), _ = K({
146
146
  defaults: () => de(h),
147
147
  validator: ce(["title", "description"], i("core.account.validation.required")),
148
148
  run: (m, { idempotencyKey: f }) => u.report(m, f),
149
149
  done: (m) => {
150
150
  H.success(i("core.incidents.toasts.report_success")), o("created", m);
151
151
  }
152
- }), a = _.form, D = () => _.present(), $ = () => _.dismiss();
152
+ }), a = _.form, S = () => _.present(), P = () => _.dismiss();
153
153
  return L(() => {
154
- r.autoOpen && D();
154
+ r.autoOpen && S();
155
155
  }), B(() => _.open.value, (m, f) => {
156
156
  f && !m && o("close");
157
- }), n({ show: D, hide: $ }), (m, f) => (S(), y(e(z), {
157
+ }), n({ show: S, hide: P }), (m, f) => (y(), I(e(z), {
158
158
  command: e(_),
159
159
  size: "md",
160
160
  title: e(i)("core.incidents.report_modal.title"),
161
161
  subtitle: e(i)("core.incidents.report_modal.description"),
162
162
  "confirm-label": e(i)("core.incidents.report_modal.submit")
163
163
  }, {
164
- default: I(() => [
164
+ default: T(() => [
165
165
  X("div", ue, [
166
166
  c(e(N), null, {
167
- default: I(() => [
168
- c(e(E), d(e(a).bind("title"), {
167
+ default: T(() => [
168
+ c(e(E), l(e(a).bind("title"), {
169
169
  label: e(i)("core.incidents.fields.title"),
170
170
  required: "",
171
171
  "max-length": 255
172
172
  }), null, 16, ["label"]),
173
- c(e(g), d(e(a).bind("description"), {
173
+ c(e(g), l(e(a).bind("description"), {
174
174
  label: e(i)("core.incidents.fields.description"),
175
175
  required: "",
176
176
  rows: 4,
177
177
  "max-length": 2e4
178
178
  }), null, 16, ["label"]),
179
- c(e(G), d(e(a).bind("severity"), {
179
+ c(e(G), l(e(a).bind("severity"), {
180
180
  label: e(i)("core.incidents.fields.severity"),
181
181
  options: w.value
182
182
  }), null, 16, ["label", "options"])
183
183
  ]),
184
184
  _: 1
185
185
  }),
186
- x.value ? (S(), y(e(N), {
186
+ x.value ? (y(), I(e(N), {
187
187
  key: 0,
188
188
  header: e(i)("core.incidents.report_modal.advanced_fields")
189
189
  }, {
190
- default: I(() => [
191
- c(e(E), d(e(a).bind("affected_module"), {
190
+ default: T(() => [
191
+ c(e(E), l(e(a).bind("affected_module"), {
192
192
  label: e(i)("core.incidents.fields.affected_module"),
193
193
  "max-length": 100
194
194
  }), null, 16, ["label"]),
195
- c(e(E), d(e(a).bind("page_url"), {
195
+ c(e(E), l(e(a).bind("page_url"), {
196
196
  label: e(i)("core.incidents.fields.page_url"),
197
197
  "max-length": 1e3
198
198
  }), null, 16, ["label"]),
199
- c(e(g), d(e(a).bind("steps_to_reproduce"), {
199
+ c(e(g), l(e(a).bind("steps_to_reproduce"), {
200
200
  label: e(i)("core.incidents.fields.steps_to_reproduce"),
201
201
  rows: 3,
202
202
  "max-length": 2e4
203
203
  }), null, 16, ["label"]),
204
- c(e(g), d(e(a).bind("expected_result"), {
204
+ c(e(g), l(e(a).bind("expected_result"), {
205
205
  label: e(i)("core.incidents.fields.expected_result"),
206
206
  rows: 2,
207
207
  "max-length": 2e4
208
208
  }), null, 16, ["label"]),
209
- c(e(g), d(e(a).bind("actual_result"), {
209
+ c(e(g), l(e(a).bind("actual_result"), {
210
210
  label: e(i)("core.incidents.fields.actual_result"),
211
211
  rows: 2,
212
212
  "max-length": 2e4
213
213
  }), null, 16, ["label"]),
214
- c(e(E), d(e(a).bind("browser_info"), {
214
+ c(e(E), l(e(a).bind("browser_info"), {
215
215
  label: e(i)("core.incidents.fields.browser_info"),
216
216
  "max-length": 500
217
217
  }), null, 16, ["label"]),
218
- c(e(E), d(e(a).bind("app_version"), {
218
+ c(e(E), l(e(a).bind("app_version"), {
219
219
  label: e(i)("core.incidents.fields.app_version"),
220
220
  "max-length": 100
221
221
  }), null, 16, ["label"]),
222
- c(e(g), d(e(a).bind("frontend_error_message"), {
222
+ c(e(g), l(e(a).bind("frontend_error_message"), {
223
223
  label: e(i)("core.incidents.fields.frontend_error_message"),
224
224
  rows: 2,
225
225
  "max-length": 2e3
226
226
  }), null, 16, ["label"]),
227
- c(e(g), d(e(a).bind("frontend_stacktrace"), {
227
+ c(e(g), l(e(a).bind("frontend_stacktrace"), {
228
228
  label: e(i)("core.incidents.fields.frontend_stacktrace"),
229
229
  rows: 4,
230
230
  "max-length": 2e4
231
231
  }), null, 16, ["label"])
232
232
  ]),
233
233
  _: 1
234
- }, 8, ["header"])) : R("", !0)
234
+ }, 8, ["header"])) : k("", !0)
235
235
  ])
236
236
  ]),
237
237
  _: 1
238
238
  }, 8, ["command", "title", "subtitle", "confirm-label"]));
239
239
  }
240
- }), _e = /* @__PURE__ */ A({
240
+ }), _e = /* @__PURE__ */ R({
241
241
  __name: "ReportHost",
242
242
  setup(t) {
243
- const { reporting: n } = C(), s = () => {
243
+ const { reporting: n } = D(), s = () => {
244
244
  n.value = !1;
245
245
  };
246
- return (r, o) => e(n) ? (S(), y(me, {
246
+ return (r, o) => e(n) ? (y(), I(me, {
247
247
  key: 0,
248
248
  "auto-open": "",
249
249
  onClose: s
250
- })) : R("", !0);
250
+ })) : k("", !0);
251
251
  }
252
- }), pe = /* @__PURE__ */ A({
252
+ }), pe = /* @__PURE__ */ R({
253
253
  __name: "ReportMenuItem",
254
254
  setup(t) {
255
- const { t: n } = P(), { access: s } = k(), r = C();
256
- return (o, i) => e(s).can(e(se)) ? (S(), y(J, {
255
+ const { t: n } = M(), { access: s } = C(), r = D();
256
+ return (o, i) => e(s).can(e(se)) ? (y(), I(J, {
257
257
  key: 0,
258
258
  label: e(n)("core.incidents.report_modal.menu"),
259
259
  icon: "alertTriangle",
260
260
  "data-incident-report-menu-item": "",
261
- onClick: i[0] || (i[0] = (l) => e(r).reporting.value = !0)
262
- }, null, 8, ["label"])) : R("", !0);
261
+ onClick: i[0] || (i[0] = (d) => e(r).reporting.value = !0)
262
+ }, null, 8, ["label"])) : k("", !0);
263
263
  }
264
- }), M = Z({
265
- index: { name: "incidents.index", path: "/incidents", component: () => import("./IncidentsList-2iwgqp9J.js"), meta: { access: q, titleKey: "core.incidents.title" } },
264
+ }), q = Z({
265
+ index: { name: "incidents.index", path: "/incidents", component: () => import("./IncidentsList-D1MySyXb.js"), meta: { access: $, titleKey: "core.incidents.title" } },
266
266
  details: {
267
267
  name: "incidents.details",
268
268
  path: "/incidents/:incidentID",
269
- component: () => import("./IncidentRecord-Bt3G4HlX.js"),
269
+ component: () => import("./IncidentRecord-CXzgLKqI.js"),
270
270
  // Previous / next record swaps the id in place.
271
- meta: { access: q, titleKey: "core.incidents.title", remountOnParam: "incidentID" }
271
+ meta: { access: $, titleKey: "core.incidents.title", remountOnParam: "incidentID" }
272
272
  }
273
273
  });
274
274
  function Je(t = {}) {
275
275
  return V({
276
276
  id: "incidents",
277
- routes: M.records,
277
+ routes: q.records,
278
278
  context: U(ie, { reporting: F(!1), appVersion: t.appVersion ?? "" }),
279
- navigation: t.destination ? [{ destination: t.destination, to: M.index, within: ["incidents.details"] }] : [],
279
+ navigation: t.destination ? [{ destination: t.destination, to: q.index, within: ["incidents.details"] }] : [],
280
280
  contributions: [
281
281
  { id: "incidents.report-menu", slot: "accountMenu", component: pe, scope: "authenticated", order: 40, optional: !0 },
282
282
  { id: "incidents.report-host", slot: "host", component: _e, scope: "authenticated", optional: !0 }
283
283
  ]
284
284
  });
285
285
  }
286
- const fe = 2e3, ge = 2e4, be = 255, ve = 500, he = 100, xe = 100, Ee = 20, we = /* @__PURE__ */ new Set(["vue", "unhandledrejection", "window"]), b = (t, n) => t.slice(0, n), Se = (t) => /^script error\.?$/i.test(t.trim()), ye = (t) => t.split(`
286
+ const fe = 2e3, ge = 2e4, be = 255, ve = 500, he = 100, xe = 100, Ee = 20, we = /* @__PURE__ */ new Set(["vue", "unhandledrejection", "window", "handled"]), b = (t, n) => t.slice(0, n), Se = (t) => /^script error\.?$/i.test(t.trim()), ye = (t) => t.split(`
287
287
  `).find((n) => /^\s*at\s|@\S/.test(n))?.trim() ?? "";
288
288
  function Ze(t) {
289
289
  const { platform: n, appVersion: s = "", onError: r = ee } = t, o = /* @__PURE__ */ new Set();
290
- function i(l) {
291
- const { error: u } = l;
292
- if (!we.has(l.source) || !(u instanceof Error) || ne(u) || u.message.trim() === "" || Se(u.message)) return;
290
+ function i(d) {
291
+ const { error: u } = d;
292
+ if (!we.has(d.source) || !(u instanceof Error) || ne(u) || u.message.trim() === "" || Se(u.message)) return;
293
293
  const h = t.origin ?? globalThis.location?.origin, x = u.stack ?? "";
294
294
  if (!h || h === "null" || !x.includes(`${h}/`) || n.session.state.value.status !== "authenticated") return;
295
295
  const w = `${u.message}
296
296
  ${ye(x)}`;
297
297
  if (o.has(w) || o.size >= Ee) return;
298
298
  o.add(w);
299
- const _ = {
300
- message: b(u.message, fe),
299
+ const _ = d.source === "handled" ? `[handled${d.detail ? `: ${d.detail}` : ""}] ` : "", a = {
300
+ message: b(_ + u.message, fe),
301
301
  stack: b(x, ge),
302
- route: b((l.route ?? "").split(/[?#]/)[0] ?? "", be),
302
+ route: b((d.route ?? "").split(/[?#]/)[0] ?? "", be),
303
303
  browser: b(globalThis.navigator?.userAgent ?? "", ve),
304
304
  app_version: b(s, he),
305
- request_ids: n.http.recentRequestIds().slice(-te).map((a) => b(a, xe))
305
+ request_ids: n.http.recentRequestIds().slice(-te).map((S) => b(S, xe))
306
306
  };
307
- n.http.request(v.clientError, _).catch(() => {
307
+ n.http.request(v.clientError, a).catch(() => {
308
308
  });
309
309
  }
310
- return (l) => {
310
+ return (d) => {
311
311
  try {
312
- i(l);
312
+ i(d);
313
313
  } catch {
314
314
  }
315
- r(l);
315
+ r(d);
316
316
  };
317
317
  }
318
318
  export {
@@ -329,7 +329,7 @@ export {
329
329
  Ke as f,
330
330
  Ge as g,
331
331
  Ee as h,
332
- M as i,
332
+ q as i,
333
333
  Ze as j,
334
334
  v as k,
335
335
  Je as l,