@wssto2/vue-core 0.13.1 → 0.14.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 (63) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/dist/{Activity-ChfxdvXf.js → Activity-C0HUEDUz.js} +3 -3
  3. package/dist/{AdaptivePageShell.vue_vue_type_script_setup_true_lang-lPj9hPqV.js → AdaptivePageShell.vue_vue_type_script_setup_true_lang-Bsv5j5Z8.js} +1 -1
  4. package/dist/{Changes-BCa43_mO.js → Changes-CSaHgVuz.js} +1 -1
  5. package/dist/{CollectionPage.vue_vue_type_script_setup_true_lang-C1GCvyZx.js → CollectionPage.vue_vue_type_script_setup_true_lang-dIrdS_Gn.js} +4 -4
  6. package/dist/{DataTable.vue_vue_type_script_setup_true_lang-B9r9M5Gt.js → DataTable.vue_vue_type_script_setup_true_lang-J3PhyJAS.js} +1 -1
  7. package/dist/{DateField.vue_vue_type_script_setup_true_lang-B5UUY1OO.js → DateField.vue_vue_type_script_setup_true_lang-CKKG4JEg.js} +2 -2
  8. package/dist/{DeadLetters-wFTqhISU.js → DeadLetters-CHX4Ypgy.js} +3 -3
  9. package/dist/{General-jW7u4MjH.js → General-v_24-zZw.js} +3 -3
  10. package/dist/IncidentRecord-BwSBNE37.js +522 -0
  11. package/dist/{IncidentsList-yu0xSMrH.js → IncidentsList-BqzRU5cZ.js} +5 -5
  12. package/dist/{NewRolePage-CQ5UVaHs.js → NewRolePage-Dt0O0VSI.js} +1 -1
  13. package/dist/{NumberField.vue_vue_type_script_setup_true_lang-YVgf5CP6.js → NumberField.vue_vue_type_script_setup_true_lang-U-_kcnGr.js} +1 -1
  14. package/dist/{ProfilePage-Ca3x3UAH.js → ProfilePage-DApTxq8C.js} +4 -4
  15. package/dist/{RecordHeader.vue_vue_type_script_setup_true_lang-Do_ATJwT.js → RecordHeader.vue_vue_type_script_setup_true_lang-SDgLjwEI.js} +1 -1
  16. package/dist/{ResourcePage.vue_vue_type_script_setup_true_lang-Coz91xht.js → ResourcePage.vue_vue_type_script_setup_true_lang-DRC3h71-.js} +1 -1
  17. package/dist/{RolePage-BUj1w1m1.js → RolePage-noy-wmNc.js} +2 -2
  18. package/dist/{RolesPage-NKzBUsrM.js → RolesPage-NRRainCw.js} +1 -1
  19. package/dist/{SectionNavigator.vue_vue_type_script_setup_true_lang-DfKEhTFv.js → SectionNavigator.vue_vue_type_script_setup_true_lang-D_08MS1-.js} +1 -1
  20. package/dist/{ServiceAccountDialog.vue_vue_type_script_setup_true_lang-4nbhEpv_.js → ServiceAccountDialog.vue_vue_type_script_setup_true_lang-DDcaju7L.js} +2 -2
  21. package/dist/{ServiceAccountRecord-ClbyeLhL.js → ServiceAccountRecord-D_HduQoK.js} +6 -6
  22. package/dist/{ServiceAccountsList-B2VDnYxD.js → ServiceAccountsList-CdSsqTGt.js} +4 -4
  23. package/dist/{Sessions-BjkciyHH.js → Sessions-CTjzMfNg.js} +1 -1
  24. package/dist/{SettingsPage-Csb14qsx.js → SettingsPage-CpqASf_D.js} +6 -6
  25. package/dist/{SignIn-DPFMv4C7.js → SignIn-D6tWsKf0.js} +2 -2
  26. package/dist/{SignInPage-DukoFqkt.js → SignInPage-BCNGI871.js} +1 -1
  27. package/dist/{SignIns-DvdpNkiS.js → SignIns-BxGGA99u.js} +1 -1
  28. package/dist/{TimeField.vue_vue_type_script_setup_true_lang-DpDXHH7u.js → TimeField.vue_vue_type_script_setup_true_lang-BDlTAMsh.js} +2 -2
  29. package/dist/{Timestamp.vue_vue_type_script_setup_true_lang-DlEUKWra.js → Timestamp.vue_vue_type_script_setup_true_lang-jCXYFLtq.js} +1 -1
  30. package/dist/{UserRecord-B9SeSWQh.js → UserRecord-B0kG0-Tm.js} +4 -4
  31. package/dist/{UsersList-CREG8q3l.js → UsersList-KMgImERy.js} +3 -3
  32. package/dist/access/index.js +3 -3
  33. package/dist/app/index.js +1 -1
  34. package/dist/{application-DomS6sbx.js → application-CrXtiGdw.js} +1 -1
  35. package/dist/collection/index.js +3 -3
  36. package/dist/content/index.js +2 -2
  37. package/dist/form/index.js +8 -8
  38. package/dist/format/format.d.ts +5 -2
  39. package/dist/format/index.js +1 -1
  40. package/dist/format-Cp1h0vsC.js +125 -0
  41. package/dist/i18n/index.js +13 -13
  42. package/dist/identity/index.js +1 -1
  43. package/dist/incidents/Occurrences.vue.d.ts +9 -0
  44. package/dist/incidents/api.d.ts +11 -2
  45. package/dist/incidents/index.js +1 -1
  46. package/dist/{index-Be9Q1PB_.js → index-Crz-j_Hu.js} +112 -106
  47. package/dist/{index-DZikGJ8L.js → index-D-2NNye6.js} +15 -15
  48. package/dist/{index-D_yyd4C2.js → index-DNeIZpXo.js} +3 -3
  49. package/dist/index.d.ts +1 -1
  50. package/dist/index.js +1 -1
  51. package/dist/modules/incident/entities.d.ts +19 -0
  52. package/dist/modules/incident/routes.d.ts +4 -1
  53. package/dist/notifications/index.js +1 -1
  54. package/dist/page/index.js +3 -3
  55. package/dist/phone/index.js +1 -1
  56. package/dist/resource/index.js +1 -1
  57. package/dist/{rowLayout-y1IB_h2r.js → rowLayout-Ohh5ng1u.js} +2 -2
  58. package/dist/{serverMessages-Ddghrewh.js → serverMessages-DnTqVS3h.js} +1 -1
  59. package/dist/testing/index.js +2 -2
  60. package/dist/{useTypedEntry-DKs8I1yP.js → useTypedEntry-tttjrClq.js} +1 -1
  61. package/package.json +2 -2
  62. package/dist/IncidentRecord-zTemLz2R.js +0 -404
  63. package/dist/format-DoKs29bZ.js +0 -118
@@ -1,14 +1,14 @@
1
- import { _ as W, a as X, b as Y, c as Z, p as ee, u as te, d as ae } from "../AdaptivePageShell.vue_vue_type_script_setup_true_lang-lPj9hPqV.js";
1
+ import { _ as W, a as X, b as Y, c as Z, p as ee, u as te, d as ae } from "../AdaptivePageShell.vue_vue_type_script_setup_true_lang-Bsv5j5Z8.js";
2
2
  import { _ as se } from "../BottomDock.vue_vue_type_script_setup_true_lang-CjN7xYEr.js";
3
3
  import { b as ne, i as re, u as ie } from "../bottomDock-BZEiOPYZ.js";
4
4
  import { _ as x } from "../BottomDockPortal.vue_vue_type_script_setup_true_lang-DmwR-2SP.js";
5
5
  import { defineComponent as v, openBlock as a, createBlock as b, withCtx as c, createElementVNode as s, normalizeStyle as k, createElementBlock as l, Fragment as y, renderList as B, normalizeClass as d, unref as _, createCommentVNode as p, toDisplayString as f, useModel as S, useId as C, useTemplateRef as P, computed as $, mergeProps as w, createSlots as T, renderSlot as m, mergeModels as D } from "vue";
6
6
  import { _ as L } from "../Icon.vue_vue_type_script_lang-BhhsFYwp.js";
7
- import { _ as ue } from "../RecordHeader.vue_vue_type_script_setup_true_lang-Do_ATJwT.js";
7
+ import { _ as ue } from "../RecordHeader.vue_vue_type_script_setup_true_lang-SDgLjwEI.js";
8
8
  import { c as pe, i as fe, p as me, a as be, u as ge, b as ve } from "../chrome-nUcmVu8G.js";
9
9
  import { s as z, u as I } from "../sectionIndex-BS0ic5W7.js";
10
10
  import { p as he, a as xe } from "../sectionIndex-BS0ic5W7.js";
11
- import { _ as ye } from "../SectionNavigator.vue_vue_type_script_setup_true_lang-DfKEhTFv.js";
11
+ import { _ as ye } from "../SectionNavigator.vue_vue_type_script_setup_true_lang-D_08MS1-.js";
12
12
  import { a as Se, _ as Ce } from "../SectionList.vue_vue_type_script_setup_true_lang-DR0_NsqC.js";
13
13
  import { _ as A } from "../Panel.vue_vue_type_script_setup_true_lang-D_Wg42hu.js";
14
14
  const K = ["aria-label"], M = ["aria-label"], N = ["aria-selected", "tabindex", "onClick"], R = { class: "relative" }, E = {
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as fe, useModel as me, useTemplateRef as F, ref as E, computed as g, watch as ne, nextTick as q, openBlock as w, createElementBlock as $, createElementVNode as f, normalizeClass as P, unref as i, createVNode as M, toDisplayString as T, normalizeStyle as xe, Fragment as ee, renderList as le, createCommentVNode as J, withModifiers as we, withDirectives as _e, vModelText as ke, mergeModels as ae, inject as Ce, shallowRef as $e, onBeforeUnmount as De, createBlock as Me, mergeProps as Te, createSlots as Se, withCtx as se, createTextVNode as Ne, renderSlot as Ie, mergeDefaults as Pe } from "vue";
2
2
  import { useI18n as pe } from "vue-i18n";
3
- import { u as ve } from "../format-DoKs29bZ.js";
3
+ import { u as ve } from "../format-Cp1h0vsC.js";
4
4
  import { b as Ve } from "../controlSurface-t7OEFESJ.js";
5
5
  import { c as ie, a as Oe, e as Re, _ as Be, f as Ee, b as Le } from "../options-B48UiYsG.js";
6
6
  import { _ as z } from "../Icon.vue_vue_type_script_lang-BhhsFYwp.js";
@@ -1,7 +1,7 @@
1
1
  import { p as g, u as m, a as l, b as R } from "../routeResource-DlTsGTg_.js";
2
2
  import { c as a } from "../current-B0lHKTWr.js";
3
3
  import { A as n } from "../error-CD7x0Jrz.js";
4
- import { _ as w, a as x } from "../ResourcePage.vue_vue_type_script_setup_true_lang-Coz91xht.js";
4
+ import { _ as w, a as x } from "../ResourcePage.vue_vue_type_script_setup_true_lang-DRC3h71-.js";
5
5
  async function i(t, e) {
6
6
  return (await a().platform.http.get(t, { signal: e.signal })).data;
7
7
  }
@@ -6,9 +6,9 @@ import { _ as J } from "./Icon.vue_vue_type_script_lang-BhhsFYwp.js";
6
6
  import { _ as Ne } from "./Menu.vue_vue_type_script_setup_true_lang-wKc9gdCn.js";
7
7
  import { _ as ze } from "./Tooltip.vue_vue_type_script_setup_true_lang-Dtg5Y6pf.js";
8
8
  import { _ as he } from "./EmptyState.vue_vue_type_script_setup_true_lang-DbZiO2RF.js";
9
- import { u as Fe } from "./format-DoKs29bZ.js";
9
+ import { u as Fe } from "./format-Cp1h0vsC.js";
10
10
  import { _ as Ve } from "./Badge.vue_vue_type_script_setup_true_lang-DJyZc0C7.js";
11
- import { _ as Oe } from "./Timestamp.vue_vue_type_script_setup_true_lang-DlEUKWra.js";
11
+ import { _ as Oe } from "./Timestamp.vue_vue_type_script_setup_true_lang-jCXYFLtq.js";
12
12
  import { _ as me } from "./Highlight.vue_vue_type_script_setup_true_lang-DZGBmwcX.js";
13
13
  import { a as je } from "./mediaQuery-CygcXmFW.js";
14
14
  const Ue = ["data-row-click-ignore"], be = "col-start-1 row-start-1", Ye = "col-span-full row-start-2 max-w-full", ke = /* @__PURE__ */ oe({
@@ -1,6 +1,6 @@
1
1
  import { useI18n as f } from "vue-i18n";
2
2
  import { a as c } from "./error-CD7x0Jrz.js";
3
- import { u as m } from "./format-DoKs29bZ.js";
3
+ import { u as m } from "./format-Cp1h0vsC.js";
4
4
  import { u as l } from "./describeError-B-NMa--w.js";
5
5
  function E() {
6
6
  const { t: i, te: u } = f(), a = m(), d = l(), s = (e) => [`errors.${e}`, `core.errors.${e}`].find((t) => u(t));
@@ -1,10 +1,10 @@
1
1
  import { nextTick as A, createApp as E, defineComponent as m, h as u } from "vue";
2
2
  import { createMemoryHistory as w, createRouter as $, RouterView as O } from "vue-router";
3
- import { c as k } from "../application-DomS6sbx.js";
3
+ import { c as k } from "../application-CrXtiGdw.js";
4
4
  import { a as M, i as R } from "../platform-DtISOEt7.js";
5
5
  import { createI18n as S } from "vue-i18n";
6
6
  import { coreMessages as x } from "../i18n/index.js";
7
- import { i as L, c as C } from "../format-DoKs29bZ.js";
7
+ import { i as L, c as C } from "../format-Cp1h0vsC.js";
8
8
  function X() {
9
9
  let e, t;
10
10
  return { promise: new Promise((s, o) => {
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as B, ref as I, watch as oe, computed as _, openBlock as f, createElementBlock as b, Fragment as A, createElementVNode as h, normalizeClass as $, unref as y, createVNode as N, createTextVNode as Pe, toDisplayString as M, renderList as j, useModel as de, useId as De, useTemplateRef as ce, createCommentVNode as G, createBlock as ie, mergeModels as me, nextTick as Te, onMounted as Ee, onBeforeUnmount as Fe, normalizeStyle as X, withCtx as he } from "vue";
2
2
  import { useI18n as J } from "vue-i18n";
3
- import { u as Ce } from "./format-DoKs29bZ.js";
3
+ import { u as Ce } from "./format-Cp1h0vsC.js";
4
4
  import { _ as je } from "./Sheet.vue_vue_type_script_setup_true_lang-B91aRD_y.js";
5
5
  import { _ as F } from "./Icon.vue_vue_type_script_lang-BhhsFYwp.js";
6
6
  import { a as Oe } from "./mediaQuery-CygcXmFW.js";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@wssto2/vue-core",
3
- "version": "0.13.1",
4
- "goCore": "v1.18.1",
3
+ "version": "0.14.0",
4
+ "goCore": "v1.19.0",
5
5
  "description": "Shared Vue 3 library for go-core applications: app shell, list / record / form pages and their controls.",
6
6
  "keywords": [
7
7
  "vue",
@@ -1,404 +0,0 @@
1
- import { defineComponent as G, openBlock as a, createElementBlock as p, createVNode as l, unref as e, createElementVNode as n, toDisplayString as o, createCommentVNode as c, computed as h, createBlock as d, withCtx as r, Fragment as U, renderList as F, createTextVNode as S, mergeProps as b } from "vue";
2
- import { useI18n as ee } from "vue-i18n";
3
- import { useRoute as te } from "vue-router";
4
- import { _ as se } from "./Button.vue_vue_type_script_setup_true_lang-C74hcb0N.js";
5
- import { u as ne } from "./neighbors-Csfan8Ho.js";
6
- import { _ as m } from "./KeyValue.vue_vue_type_script_setup_true_lang-wcZcvnow.js";
7
- import { _ as T } from "./Panel.vue_vue_type_script_setup_true_lang-D_Wg42hu.js";
8
- import { _ as ie } from "./IconTile.vue_vue_type_script_setup_true_lang-BmxCuUZ9.js";
9
- import { a as ae } from "./leaveGuard-Cc8yeLxM.js";
10
- import { u as le } from "./useResourceForm-Dl6YFYyz.js";
11
- import { _ as oe, a as re } from "./FormGroup.vue_vue_type_script_setup_true_lang-D6jYfNjW.js";
12
- import { _ as ce } from "./FormView.vue_vue_type_script_setup_true_lang-DvbPEiNQ.js";
13
- import { _ as w } from "./SelectField.vue_vue_type_script_setup_true_lang-BZwdANL3.js";
14
- import { _ as P } from "./TextareaField.vue_vue_type_script_setup_true_lang-D2j4s96s.js";
15
- import { _ as M } from "./TextField.vue_vue_type_script_setup_true_lang-CWIeeZRE.js";
16
- import { u as de } from "./useSaveChrome-7huA3FzR.js";
17
- import { u as ue } from "./useCommand-Ch_nx1AQ.js";
18
- import { u as _e } from "./format-DoKs29bZ.js";
19
- import { t as me } from "./toast-CqSDTWRX.js";
20
- import { _ as fe } from "./RecordHeader.vue_vue_type_script_setup_true_lang-Do_ATJwT.js";
21
- import { u as pe } from "./platform-DtISOEt7.js";
22
- import { a as be } from "./routeResource-DlTsGTg_.js";
23
- import { a as ve } from "./ResourcePage.vue_vue_type_script_setup_true_lang-Coz91xht.js";
24
- import { _ as N } from "./Badge.vue_vue_type_script_setup_true_lang-DJyZc0C7.js";
25
- import { _ as q } from "./EmptyState.vue_vue_type_script_setup_true_lang-DbZiO2RF.js";
26
- import { u as xe, i as he, a as ye, M as ge, U as ke, m as we, f as $e, g as z, r as Se, S as Te, e as D, c as L, d as Ee, b as Ie } from "./index-Be9Q1PB_.js";
27
- import { _ as Ne } from "./Avatar.vue_vue_type_script_setup_true_lang-BPj_fkJR.js";
28
- const De = { class: "flex min-w-0 items-center gap-2" }, Le = { class: "flex min-w-0 flex-col items-start" }, Ce = { class: "max-w-full truncate text-xs font-semibold text-content-strong" }, Ae = {
29
- key: 0,
30
- class: "max-w-full truncate text-footnote text-content-muted"
31
- }, E = /* @__PURE__ */ G({
32
- __name: "Person",
33
- props: {
34
- person: {}
35
- },
36
- setup(y) {
37
- return (t, C) => (a(), p("div", De, [
38
- l(e(Ne), {
39
- name: y.person.name,
40
- size: "xs"
41
- }, null, 8, ["name"]),
42
- n("div", Le, [
43
- n("span", Ce, o(y.person.name), 1),
44
- y.person.email ? (a(), p("span", Ae, o(y.person.email), 1)) : c("", !0)
45
- ])
46
- ]));
47
- }
48
- }), Oe = { class: "tabular-nums" }, Re = {
49
- class: "grid grid-cols-1 gap-6 lg:grid-cols-[1fr_300px]",
50
- "data-test": "incident"
51
- }, Ve = { class: "flex min-w-0 flex-col gap-6" }, je = { class: "flex flex-col gap-3 text-sm" }, Be = { class: "whitespace-pre-line text-content" }, Ue = { class: "grid grid-cols-2 gap-x-6 gap-y-3" }, Fe = { class: "font-mono" }, Pe = { class: "font-mono" }, Me = { class: "flex flex-col gap-3" }, qe = { class: "whitespace-pre-line font-mono" }, ze = { class: "mt-1 overflow-x-auto whitespace-pre-wrap rounded-control bg-fill p-3 font-mono text-xs font-normal" }, Ge = { class: "mb-2 flex items-center justify-between gap-3" }, Ye = { class: "text-xs text-content-muted" }, He = { class: "text-sm font-semibold text-content-strong" }, Je = { class: "whitespace-pre-line text-sm text-content" }, Ke = { class: "mt-3 flex flex-col gap-2" }, Qe = { class: "whitespace-pre-line font-normal" }, We = { class: "whitespace-pre-line font-normal" }, Xe = { class: "whitespace-pre-line font-normal" }, Ze = { class: "mb-2 flex items-center justify-between gap-3" }, et = { class: "text-xs text-content-muted" }, tt = { class: "whitespace-pre-line text-sm text-content-strong" }, st = {
52
- key: 0,
53
- class: "mt-2 inline-flex"
54
- }, nt = {
55
- class: "flex flex-col gap-3 border-t border-border-separator p-4",
56
- "data-test": "incident-comment"
57
- }, it = { class: "flex min-w-0 flex-col gap-4" }, at = { class: "flex flex-col gap-3 text-xs" }, lt = { key: 0 }, ot = { class: "mb-1 font-semibold uppercase text-content-muted" }, rt = { key: 1 }, ct = { class: "mb-1 font-semibold uppercase text-content-muted" }, dt = { key: 2 }, ut = { class: "mb-1 font-semibold uppercase text-content-muted" }, _t = ["href"], Ft = /* @__PURE__ */ G({
58
- __name: "IncidentRecord",
59
- setup(y) {
60
- const { t } = ee(), C = te(), { http: Y, access: A } = pe(), $ = _e(), I = xe(), v = be({ param: "incidentID", load: (u, { signal: _ }) => I.show(u, { signal: _ }), identify: (u) => u.incident.id }), H = ne(ye(Y), { current: () => v.id.value, list: he.index, param: "incidentID", backLabel: () => t("core.incidents.title") }), O = Number(C.params.incidentID), J = h(() => A.can(ge)), R = h(() => A.can(ke)), i = h(() => v.data.value?.incident ?? null), V = h(() => v.data.value?.reports ?? []), j = h(() => v.data.value?.comments ?? []), f = le({
61
- source: v,
62
- defaults: $e,
63
- toValues: we,
64
- save: async (u, _, { idempotencyKey: s }) => ({ ..._, incident: await I.update(O, u, s) })
65
- });
66
- async function B() {
67
- (await f.save({ refresh: () => v.reload() })).status === "saved" && me.success(t("core.actions.saved"));
68
- }
69
- de({ form: f, label: () => t("core.incidents.actions.save"), allowed: R, ready: () => !!i.value, save: () => void B() });
70
- const x = ue({
71
- defaults: z,
72
- validator: Se(["body"], t("core.account.validation.required")),
73
- run: (u, { idempotencyKey: _ }) => I.comment(O, u, _),
74
- done: async () => {
75
- x.form.hydrate(z()), await v.reload();
76
- }
77
- });
78
- ae(() => x.form.values.body.trim() !== "");
79
- const g = (u) => h(() => Object.entries(u).map(([_, s]) => ({ value: _, label: t(s) }))), K = g(L), Q = g(D), W = g({ reporter_and_staff: "core.incidents.visibilities.reporter_and_staff", staff_only: "core.incidents.visibilities.staff_only" }), X = g({ public: "core.incidents.comment_visibilities.public", internal: "core.incidents.comment_visibilities.internal" }), Z = g({ none: "core.incidents.ticket_providers.none", github: "core.incidents.ticket_providers.github", jira: "core.incidents.ticket_providers.jira" }), k = (u, _) => t(u[_] ?? _);
80
- return (u, _) => (a(), d(e(ve), {
81
- resource: e(v),
82
- title: i.value?.title ?? e(t)("core.incidents.title"),
83
- list: e(H).context
84
- }, {
85
- header: r(({ record: s }) => [
86
- l(e(fe), {
87
- title: s.incident.title,
88
- subtitle: [s.incident.public_code, k(e(D), s.incident.severity), k(e(L), s.incident.status)].join(" · ")
89
- }, {
90
- leading: r(() => [
91
- l(e(ie), {
92
- tone: "neutral",
93
- icon: "alertTriangle",
94
- size: "lg"
95
- })
96
- ]),
97
- meta: r(() => [
98
- n("span", Oe, o(s.incident.public_code), 1),
99
- l(e(N), {
100
- tone: e(Ee)[s.incident.severity] ?? "neutral"
101
- }, {
102
- default: r(() => [
103
- S(o(k(e(D), s.incident.severity)), 1)
104
- ]),
105
- _: 2
106
- }, 1032, ["tone"]),
107
- l(e(N), {
108
- tone: e(Ie)[s.incident.status] ?? "neutral",
109
- dot: ""
110
- }, {
111
- default: r(() => [
112
- S(o(k(e(L), s.incident.status)), 1)
113
- ]),
114
- _: 2
115
- }, 1032, ["tone"])
116
- ]),
117
- _: 2
118
- }, 1032, ["title", "subtitle"])
119
- ]),
120
- default: r(() => [
121
- n("div", Re, [
122
- n("div", Ve, [
123
- i.value ? (a(), d(e(T), {
124
- key: 0,
125
- title: e(t)("core.incidents.details.overview")
126
- }, {
127
- default: r(() => [
128
- n("div", je, [
129
- n("p", Be, o(i.value.description), 1),
130
- n("dl", Ue, [
131
- i.value.affected_module ? (a(), d(e(m), {
132
- key: 0,
133
- label: e(t)("core.incidents.fields.affected_module"),
134
- value: i.value.affected_module
135
- }, null, 8, ["label", "value"])) : c("", !0),
136
- i.value.affected_route ? (a(), d(e(m), {
137
- key: 1,
138
- label: e(t)("core.incidents.fields.affected_route")
139
- }, {
140
- default: r(() => [
141
- n("span", Fe, o(i.value.affected_route), 1)
142
- ]),
143
- _: 1
144
- }, 8, ["label"])) : c("", !0),
145
- i.value.environment ? (a(), d(e(m), {
146
- key: 2,
147
- label: e(t)("core.incidents.fields.environment"),
148
- value: i.value.environment
149
- }, null, 8, ["label", "value"])) : c("", !0),
150
- i.value.error_class ? (a(), d(e(m), {
151
- key: 3,
152
- label: e(t)("core.incidents.fields.error_class")
153
- }, {
154
- default: r(() => [
155
- n("span", Pe, o(i.value.error_class), 1)
156
- ]),
157
- _: 1
158
- }, 8, ["label"])) : c("", !0)
159
- ]),
160
- n("dl", Me, [
161
- i.value.error_message_sample ? (a(), d(e(m), {
162
- key: 0,
163
- label: e(t)("core.incidents.fields.error_message_sample")
164
- }, {
165
- default: r(() => [
166
- n("span", qe, o(i.value.error_message_sample), 1)
167
- ]),
168
- _: 1
169
- }, 8, ["label"])) : c("", !0),
170
- i.value.stacktrace_sample ? (a(), d(e(m), {
171
- key: 1,
172
- label: e(t)("core.incidents.fields.stacktrace_sample")
173
- }, {
174
- default: r(() => [
175
- n("pre", ze, o(i.value.stacktrace_sample), 1)
176
- ]),
177
- _: 1
178
- }, 8, ["label"])) : c("", !0)
179
- ])
180
- ])
181
- ]),
182
- _: 1
183
- }, 8, ["title"])) : c("", !0),
184
- l(e(T), {
185
- title: e(t)("core.incidents.details.user_reports"),
186
- flush: ""
187
- }, {
188
- default: r(() => [
189
- V.value.length === 0 ? (a(), d(e(q), {
190
- key: 0,
191
- title: e(t)("core.incidents.details.no_reports"),
192
- icon: "fileTextLine"
193
- }, null, 8, ["title"])) : (a(!0), p(U, { key: 1 }, F(V.value, (s) => (a(), p("div", {
194
- key: s.id,
195
- class: "p-4 not-last:border-b not-last:border-border-separator",
196
- "data-test": "incident-report-item"
197
- }, [
198
- n("div", Ge, [
199
- s.reporter ? (a(), d(E, {
200
- key: 0,
201
- person: s.reporter
202
- }, null, 8, ["person"])) : c("", !0),
203
- n("span", Ye, o(e($).dateTime(s.created_at)), 1)
204
- ]),
205
- n("p", He, o(s.title), 1),
206
- n("p", Je, o(s.description), 1),
207
- n("dl", Ke, [
208
- s.steps_to_reproduce ? (a(), d(e(m), {
209
- key: 0,
210
- label: e(t)("core.incidents.fields.steps_to_reproduce")
211
- }, {
212
- default: r(() => [
213
- n("span", Qe, o(s.steps_to_reproduce), 1)
214
- ]),
215
- _: 2
216
- }, 1032, ["label"])) : c("", !0),
217
- s.expected_result ? (a(), d(e(m), {
218
- key: 1,
219
- label: e(t)("core.incidents.fields.expected_result")
220
- }, {
221
- default: r(() => [
222
- n("span", We, o(s.expected_result), 1)
223
- ]),
224
- _: 2
225
- }, 1032, ["label"])) : c("", !0),
226
- s.actual_result ? (a(), d(e(m), {
227
- key: 2,
228
- label: e(t)("core.incidents.fields.actual_result")
229
- }, {
230
- default: r(() => [
231
- n("span", Xe, o(s.actual_result), 1)
232
- ]),
233
- _: 2
234
- }, 1032, ["label"])) : c("", !0)
235
- ])
236
- ]))), 128))
237
- ]),
238
- _: 1
239
- }, 8, ["title"]),
240
- l(e(T), {
241
- title: e(t)("core.incidents.details.comments"),
242
- flush: ""
243
- }, {
244
- default: r(() => [
245
- j.value.length === 0 ? (a(), d(e(q), {
246
- key: 0,
247
- title: e(t)("core.incidents.details.no_comments"),
248
- icon: "chat4Fill"
249
- }, null, 8, ["title"])) : (a(!0), p(U, { key: 1 }, F(j.value, (s) => (a(), p("div", {
250
- key: s.id,
251
- class: "p-4 not-last:border-b not-last:border-border-separator",
252
- "data-test": "incident-comment-item"
253
- }, [
254
- n("div", Ze, [
255
- s.author ? (a(), d(E, {
256
- key: 0,
257
- person: s.author
258
- }, null, 8, ["person"])) : c("", !0),
259
- n("span", et, o(e($).dateTime(s.created_at)), 1)
260
- ]),
261
- n("p", tt, o(s.body), 1),
262
- s.visibility === "internal" ? (a(), p("span", st, [
263
- l(e(N), { tone: "neutral" }, {
264
- default: r(() => [
265
- S(o(e(t)("core.incidents.comment_visibilities.internal")), 1)
266
- ]),
267
- _: 1
268
- })
269
- ])) : c("", !0)
270
- ]))), 128)),
271
- n("div", nt, [
272
- l(e(oe), {
273
- form: e(x).form
274
- }, null, 8, ["form"]),
275
- l(e(P), b(e(x).form.bind("body"), {
276
- label: e(t)("core.incidents.fields.comment_body"),
277
- rows: 3,
278
- stacked: ""
279
- }), null, 16, ["label"]),
280
- J.value ? (a(), d(e(w), b({ key: 0 }, e(x).form.bind("visibility"), {
281
- label: e(t)("core.incidents.fields.comment_visibility"),
282
- options: e(X)
283
- }), null, 16, ["label", "options"])) : c("", !0),
284
- l(e(se), {
285
- prominence: "primary",
286
- processing: e(x).form.submitting.value,
287
- onClick: _[0] || (_[0] = (s) => e(x).run())
288
- }, {
289
- default: r(() => [
290
- S(o(e(t)("core.incidents.actions.add_comment")), 1)
291
- ]),
292
- _: 1
293
- }, 8, ["processing"])
294
- ])
295
- ]),
296
- _: 1
297
- }, 8, ["title"])
298
- ]),
299
- n("div", it, [
300
- i.value ? (a(), d(e(T), {
301
- key: 0,
302
- title: e(t)("core.incidents.details.summary")
303
- }, {
304
- default: r(() => [
305
- n("div", at, [
306
- l(e(m), {
307
- label: e(t)("core.incidents.fields.source"),
308
- value: k(e(Te), i.value.source)
309
- }, null, 8, ["label", "value"]),
310
- l(e(m), {
311
- label: e(t)("core.incidents.fields.first_seen_at"),
312
- value: e($).dateTime(i.value.first_seen_at)
313
- }, null, 8, ["label", "value"]),
314
- l(e(m), {
315
- label: e(t)("core.incidents.fields.last_seen_at"),
316
- value: e($).dateTime(i.value.last_seen_at)
317
- }, null, 8, ["label", "value"]),
318
- l(e(m), {
319
- label: e(t)("core.incidents.fields.occurrence_count"),
320
- value: i.value.occurrence_count
321
- }, null, 8, ["label", "value"]),
322
- i.value.reporter ? (a(), p("div", lt, [
323
- n("h6", ot, o(e(t)("core.incidents.fields.reporter")), 1),
324
- l(E, {
325
- person: i.value.reporter
326
- }, null, 8, ["person"])
327
- ])) : c("", !0),
328
- i.value.assignee ? (a(), p("div", rt, [
329
- n("h6", ct, o(e(t)("core.incidents.fields.assignee")), 1),
330
- l(E, {
331
- person: i.value.assignee
332
- }, null, 8, ["person"])
333
- ])) : c("", !0),
334
- i.value.external_ticket_url ? (a(), p("div", dt, [
335
- n("h6", ut, o(e(t)("core.incidents.fields.external_ticket")), 1),
336
- n("a", {
337
- href: i.value.external_ticket_url,
338
- target: "_blank",
339
- rel: "noopener",
340
- class: "text-content-link hover:underline"
341
- }, o(i.value.external_ticket_id || i.value.external_ticket_url), 9, _t)
342
- ])) : c("", !0)
343
- ])
344
- ]),
345
- _: 1
346
- }, 8, ["title"])) : c("", !0),
347
- R.value ? (a(), d(e(ce), {
348
- key: 1,
349
- form: e(f),
350
- onSubmit: B
351
- }, {
352
- default: r(() => [
353
- l(e(re), {
354
- header: e(t)("core.incidents.details.management"),
355
- "label-width": "7rem",
356
- "data-test": "incident-management"
357
- }, {
358
- default: r(() => [
359
- l(e(w), b(e(f).bind("status"), {
360
- label: e(t)("core.incidents.fields.status"),
361
- options: e(K)
362
- }), null, 16, ["label", "options"]),
363
- l(e(w), b(e(f).bind("severity"), {
364
- label: e(t)("core.incidents.fields.severity"),
365
- options: e(Q)
366
- }), null, 16, ["label", "options"]),
367
- l(e(w), b(e(f).bind("visibility"), {
368
- label: e(t)("core.incidents.fields.visibility"),
369
- options: e(W)
370
- }), null, 16, ["label", "options"]),
371
- l(e(P), b(e(f).bind("resolution_summary"), {
372
- label: e(t)("core.incidents.fields.resolution_summary"),
373
- rows: 3,
374
- "max-length": 2e3,
375
- stacked: ""
376
- }), null, 16, ["label"]),
377
- l(e(w), b(e(f).bind("external_ticket_provider"), {
378
- label: e(t)("core.incidents.fields.external_ticket_provider"),
379
- options: e(Z)
380
- }), null, 16, ["label", "options"]),
381
- l(e(M), b(e(f).bind("external_ticket_id"), {
382
- label: e(t)("core.incidents.fields.external_ticket_id"),
383
- "max-length": 100
384
- }), null, 16, ["label"]),
385
- l(e(M), b(e(f).bind("external_ticket_url"), {
386
- label: e(t)("core.incidents.fields.external_ticket_url"),
387
- "max-length": 500
388
- }), null, 16, ["label"])
389
- ]),
390
- _: 1
391
- }, 8, ["header"])
392
- ]),
393
- _: 1
394
- }, 8, ["form"])) : c("", !0)
395
- ])
396
- ])
397
- ]),
398
- _: 1
399
- }, 8, ["resource", "title", "list"]));
400
- }
401
- });
402
- export {
403
- Ft as default
404
- };
@@ -1,118 +0,0 @@
1
- import { d as x } from "./context-Ch1r4fdN.js";
2
- const L = { bs: "sr-Latn-BA" }, M = (e, n = {}) => n[e] ?? L[e] ?? e, S = /^(\d{4})-(\d{2})-(\d{2})$/, I = /^\d{4}-\d{2}-\d{2} \d{2}:\d{2}/, Y = ["0000-00-00", "0001-01-01", "1970-01-01"];
3
- function D(e) {
4
- if (e == null || e === "") return null;
5
- let n;
6
- if (e instanceof Date) n = e;
7
- else if (typeof e == "number") n = new Date(e);
8
- else {
9
- if (Y.some((u) => e.startsWith(u))) return null;
10
- const c = S.exec(e);
11
- c ? n = new Date(Number(c[1]), Number(c[2]) - 1, Number(c[3])) : n = new Date(I.test(e) ? e.replace(" ", "T") : e);
12
- }
13
- return Number.isNaN(n.getTime()) || n.getTime() <= 0 ? null : n;
14
- }
15
- const h = { year: "numeric", month: "2-digit", day: "2-digit" }, T = { hour: "2-digit", minute: "2-digit" }, b = [
16
- ["year", 31536e3],
17
- ["month", 2592e3],
18
- ["week", 604800],
19
- ["day", 86400],
20
- ["hour", 3600],
21
- ["minute", 60],
22
- ["second", 1]
23
- ], F = (e, n = 2) => String(e).padStart(n, "0");
24
- function $(e, n, { group: c, decimal: u }) {
25
- const g = n?.minimumFractionDigits ?? 0, l = Math.max(g, n?.maximumFractionDigits ?? 3), [d = "", i = ""] = e.toFixed(l).split(".");
26
- let a = i;
27
- for (; a.length > g && a.endsWith("0"); ) a = a.slice(0, -1);
28
- const t = n?.useGrouping === !1 ? d : d.replace(/\B(?=(\d{3})+(?!\d))/g, c);
29
- return a ? `${t}${u}${a}` : t;
30
- }
31
- function E(e = {}) {
32
- const n = /* @__PURE__ */ new Map(), c = (t, r) => {
33
- let m = n.get(t);
34
- return m || (m = r(), n.set(t, m)), m;
35
- }, u = (t) => M(t, e.intlLocale), g = (t, r) => c(`d|${t}|${JSON.stringify(r)}`, () => new Intl.DateTimeFormat(u(t), r)), l = (t, r) => c(`n|${t}|${JSON.stringify(r ?? {})}`, () => new Intl.NumberFormat(u(t), r)), { datePattern: d, numberSymbols: i } = e, a = (t, r) => r.replace(
36
- /YYYY|MM|DD|HH|mm/g,
37
- (m) => m === "YYYY" ? F(t.getFullYear(), 4) : F(m === "MM" ? t.getMonth() + 1 : m === "DD" ? t.getDate() : m === "HH" ? t.getHours() : t.getMinutes())
38
- );
39
- return {
40
- date: (t, r) => d?.[r] ? a(t, d[r]) : g(r, h).format(t),
41
- dateTime: (t, r) => d?.[r] ? a(t, `${d[r]} HH:mm`) : g(r, { ...h, ...T }).format(t),
42
- time: (t, r) => g(r, T).format(t),
43
- number: (t, r, m) => i && (m?.style ?? "decimal") === "decimal" ? $(t, m, i) : l(r, m).format(t),
44
- money(t, r, m, s) {
45
- const o = c(`m|${m}|${r}|${JSON.stringify(s ?? {})}`, () => new Intl.NumberFormat(u(m), { ...s, style: "currency", currency: r }));
46
- if (!i) return o.format(t);
47
- const y = o.formatToParts(t).find((w) => w.type === "currency")?.value ?? r, f = s?.maximumFractionDigits ?? o.resolvedOptions().maximumFractionDigits ?? 2;
48
- return `${$(t, { minimumFractionDigits: f, maximumFractionDigits: f }, i)} ${y}`;
49
- },
50
- relative(t, r, m) {
51
- const s = Math.trunc((t.getTime() - m.getTime()) / 1e3), [o, y] = b.find(([, f]) => Math.abs(s) >= f) ?? b[b.length - 1];
52
- return c(`r|${r}`, () => new Intl.RelativeTimeFormat(u(r), { numeric: "auto" })).format(Math.trunc(s / y), o);
53
- }
54
- };
55
- }
56
- const N = (e, n) => e.getFullYear() === n.getFullYear() && e.getMonth() === n.getMonth() && e.getDate() === n.getDate();
57
- function C(e) {
58
- const n = { ...E(e), ...e.formatters }, c = (i) => typeof i == "number" && Number.isFinite(i), u = () => M(e.locale(), e.intlLocale), g = (i) => {
59
- const a = D(i);
60
- return a ? n.time(a, e.locale()) : "";
61
- }, l = (i) => {
62
- const a = D(i);
63
- return a ? n.date(a, e.locale()) : "";
64
- }, d = (i, { inSentence: a = !1, now: t = /* @__PURE__ */ new Date() } = {}) => {
65
- const r = D(i);
66
- if (!r || !e.translate) return l(i);
67
- const m = new Date(t.getFullYear(), t.getMonth(), t.getDate() - 1), s = N(r, t) ? "core.activity.today" : N(r, m) ? "core.activity.yesterday" : null;
68
- if (!s) return l(i);
69
- const o = e.translate(s);
70
- return a ? o.toLocaleLowerCase(u()) : o.charAt(0).toLocaleUpperCase(u()) + o.slice(1);
71
- };
72
- return {
73
- get locale() {
74
- return e.locale();
75
- },
76
- get intlLocale() {
77
- return u();
78
- },
79
- date: l,
80
- dateTime: (i) => {
81
- const a = D(i);
82
- return a ? n.dateTime(a, e.locale()) : "";
83
- },
84
- time: g,
85
- number: (i, a) => c(i) ? n.number(i, e.locale(), a) : e.emptyNumber ?? "",
86
- get currencySymbol() {
87
- return e.currencySymbol ?? "";
88
- },
89
- money: (i, { currency: a, decimals: t, whole: r, symbol: m = !0 } = {}) => {
90
- if (!c(i)) return "";
91
- const s = i, o = r && Number.isInteger(s) ? 0 : t, y = o === void 0 ? void 0 : { minimumFractionDigits: o, maximumFractionDigits: o };
92
- if (a && m) return n.money(s, a, e.locale(), y);
93
- const f = n.number(s, e.locale(), y ?? { minimumFractionDigits: 2, maximumFractionDigits: 2 });
94
- return m && !a && e.currencySymbol ? `${f} ${e.currencySymbol}` : f;
95
- },
96
- relative: (i, a = /* @__PURE__ */ new Date()) => {
97
- const t = D(i);
98
- return t ? n.relative(t, e.locale(), a) : "";
99
- },
100
- day: d,
101
- dayTime: (i, a) => {
102
- const t = d(i, a);
103
- return t ? `${t} · ${g(i)}` : "";
104
- }
105
- };
106
- }
107
- const [A, O] = x("vue-core.formatting");
108
- function _(e, n) {
109
- e.provide(A, n);
110
- }
111
- export {
112
- E as a,
113
- C as c,
114
- A as f,
115
- _ as i,
116
- D as t,
117
- O as u
118
- };