@wssto2/vue-core 0.13.1 → 0.15.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 (113) hide show
  1. package/CHANGELOG.md +35 -0
  2. package/README.md +2 -2
  3. package/bin/architecture/engine.mjs +11 -1
  4. package/bin/architecture/rules.mjs +95 -0
  5. package/bin/commands/check-architecture.mjs +8 -1
  6. package/bin/config.mjs +2 -0
  7. package/dist/{AccessGate.vue_vue_type_script_setup_true_lang-DEzXovsY.js → AccessGate.vue_vue_type_script_setup_true_lang-BH3f0hda.js} +1 -1
  8. package/dist/{Activity-ChfxdvXf.js → Activity-MOAIv6s4.js} +5 -5
  9. package/dist/{AdaptivePageShell.vue_vue_type_script_setup_true_lang-lPj9hPqV.js → AdaptivePageShell.vue_vue_type_script_setup_true_lang-Bsv5j5Z8.js} +1 -1
  10. package/dist/{Changes-BCa43_mO.js → Changes-Bu7D0dhY.js} +2 -2
  11. package/dist/{CollectionPage.vue_vue_type_script_setup_true_lang-C1GCvyZx.js → CollectionPage.vue_vue_type_script_setup_true_lang-D5HsYIck.js} +6 -6
  12. package/dist/{DataTable.vue_vue_type_script_setup_true_lang-B9r9M5Gt.js → DataTable.vue_vue_type_script_setup_true_lang-J3PhyJAS.js} +1 -1
  13. package/dist/{DateField.vue_vue_type_script_setup_true_lang-B5UUY1OO.js → DateField.vue_vue_type_script_setup_true_lang-CKKG4JEg.js} +2 -2
  14. package/dist/{DeadLetters-wFTqhISU.js → DeadLetters-DsujMnLG.js} +5 -5
  15. package/dist/FormGroup.vue_vue_type_script_setup_true_lang-CTVuhEbW.js +428 -0
  16. package/dist/{FormView.vue_vue_type_script_setup_true_lang-DvbPEiNQ.js → FormView.vue_vue_type_script_setup_true_lang-Cfvh7rF6.js} +1 -1
  17. package/dist/{General-jW7u4MjH.js → General-Dswj1oXt.js} +7 -7
  18. package/dist/IncidentRecord-DcmqpziF.js +522 -0
  19. package/dist/{IncidentsList-yu0xSMrH.js → IncidentsList-BRNqHZdU.js} +6 -6
  20. package/dist/{NewRolePage-CQ5UVaHs.js → NewRolePage-dFLznJGH.js} +3 -3
  21. 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
  22. package/dist/{PersonAccess.vue_vue_type_script_setup_true_lang-CWCt9_dM.js → PersonAccess.vue_vue_type_script_setup_true_lang-D3yp43o5.js} +4 -4
  23. package/dist/{ProfilePage-Ca3x3UAH.js → ProfilePage-BnHR3xGB.js} +10 -10
  24. 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
  25. package/dist/{ResourcePage.vue_vue_type_script_setup_true_lang-Coz91xht.js → ResourcePage.vue_vue_type_script_setup_true_lang-DRC3h71-.js} +1 -1
  26. package/dist/{RoleEditor.vue_vue_type_script_setup_true_lang-d_aaeXTT.js → RoleEditor.vue_vue_type_script_setup_true_lang-DNF9wzE9.js} +4 -4
  27. package/dist/{RolePage-BUj1w1m1.js → RolePage-BtM2rFLm.js} +7 -7
  28. package/dist/{RolesPage-NKzBUsrM.js → RolesPage-MO1gAfdT.js} +4 -4
  29. package/dist/{SectionNavigator.vue_vue_type_script_setup_true_lang-DfKEhTFv.js → SectionNavigator.vue_vue_type_script_setup_true_lang-TMdsmYAg.js} +2 -2
  30. package/dist/ServiceAccountDialog.vue_vue_type_script_setup_true_lang-Bo3phlqB.js +127 -0
  31. package/dist/{ServiceAccountRecord-ClbyeLhL.js → ServiceAccountRecord-C1M-dcju.js} +10 -10
  32. package/dist/{ServiceAccountsList-B2VDnYxD.js → ServiceAccountsList-zfyS2WJB.js} +6 -6
  33. package/dist/{Sessions-BjkciyHH.js → Sessions-BYBUSqHI.js} +3 -3
  34. package/dist/{SettingsPage-Csb14qsx.js → SettingsPage-C9Kp2ddX.js} +9 -9
  35. package/dist/{SignIn-DPFMv4C7.js → SignIn-HBYLSZ1M.js} +5 -5
  36. package/dist/{SignInPage-DukoFqkt.js → SignInPage-CEoz3fWE.js} +3 -3
  37. package/dist/{SignIns-DvdpNkiS.js → SignIns-BAz7V4vy.js} +2 -2
  38. package/dist/{TimeField.vue_vue_type_script_setup_true_lang-DpDXHH7u.js → TimeField.vue_vue_type_script_setup_true_lang-BDlTAMsh.js} +2 -2
  39. package/dist/{Timestamp.vue_vue_type_script_setup_true_lang-DlEUKWra.js → Timestamp.vue_vue_type_script_setup_true_lang-jCXYFLtq.js} +1 -1
  40. package/dist/{UserRecord-B9SeSWQh.js → UserRecord-DkyhGma-.js} +9 -9
  41. package/dist/{UsersList-CREG8q3l.js → UsersList-CsW-jU0m.js} +4 -4
  42. package/dist/access/RestrictedPanel.vue.d.ts +20 -0
  43. package/dist/access/index.d.ts +1 -0
  44. package/dist/access/index.js +91 -31
  45. package/dist/app/application.d.ts +2 -2
  46. package/dist/app/current.d.ts +6 -0
  47. package/dist/app/index.d.ts +1 -1
  48. package/dist/app/index.js +17 -16
  49. package/dist/{application-DomS6sbx.js → application-2gHiwAVy.js} +6 -6
  50. package/dist/client/client.d.ts +6 -0
  51. package/dist/client/index.js +1 -1
  52. package/dist/client-Do8v1I5l.js +193 -0
  53. package/dist/collection/index.js +6 -6
  54. package/dist/config/index.d.ts +21 -1
  55. package/dist/content/StatSummary.vue.d.ts +40 -0
  56. package/dist/content/index.d.ts +1 -0
  57. package/dist/content/index.js +245 -176
  58. package/dist/{contributions-obnyn03x.js → contributions-9CPT-Z5v.js} +1 -1
  59. package/dist/{current-B0lHKTWr.js → current-CslcEPXp.js} +8 -4
  60. package/dist/eslint/index.js +2 -2
  61. package/dist/form/index.js +16 -16
  62. package/dist/form/useForm.d.ts +1 -1
  63. package/dist/format/format.d.ts +5 -2
  64. package/dist/format/index.js +1 -1
  65. package/dist/format-Cp1h0vsC.js +125 -0
  66. package/dist/{guards-DGcSfTEh.js → guards-6fJxfUtk.js} +1 -1
  67. package/dist/{http-DOEfFCDA.js → http-D6qOS6xs.js} +1 -1
  68. package/dist/i18n/index.d.ts +5 -1
  69. package/dist/i18n/index.js +21 -20
  70. package/dist/i18n/serverMessages.d.ts +15 -1
  71. package/dist/identity/index.js +2 -2
  72. package/dist/incidents/Occurrences.vue.d.ts +9 -0
  73. package/dist/incidents/api.d.ts +11 -2
  74. package/dist/incidents/index.js +1 -1
  75. package/dist/{index-DZikGJ8L.js → index--AF_DNhE.js} +22 -22
  76. package/dist/{index-D_yyd4C2.js → index-DYva-K_4.js} +5 -5
  77. package/dist/{index-Be9Q1PB_.js → index-Dlu-PA4W.js} +104 -98
  78. package/dist/index.d.ts +1 -1
  79. package/dist/index.js +1 -1
  80. package/dist/modules/incident/entities.d.ts +19 -0
  81. package/dist/modules/incident/routes.d.ts +4 -1
  82. package/dist/{navigation-CctcxT51.js → navigation-DMJ6akat.js} +1 -1
  83. package/dist/{neighbors-Csfan8Ho.js → neighbors-DrEahe7B.js} +1 -1
  84. package/dist/notifications/index.js +1 -1
  85. package/dist/onboarding/index.js +1 -1
  86. package/dist/page/index.js +3 -3
  87. package/dist/phone/index.d.ts +1 -1
  88. package/dist/phone/index.js +154 -142
  89. package/dist/phone/phone.d.ts +6 -0
  90. package/dist/platform/index.js +3 -3
  91. package/dist/{platform-DtISOEt7.js → platform-ORzRR3Tw.js} +1 -1
  92. package/dist/resource/index.js +2 -2
  93. package/dist/router/index.js +3 -3
  94. package/dist/{rowLayout-y1IB_h2r.js → rowLayout-Ohh5ng1u.js} +2 -2
  95. package/dist/{sections-fkW_IJLc.js → sections-DI_JhgQG.js} +1 -1
  96. package/dist/serverMessages-Ce8-MK4e.js +30 -0
  97. package/dist/shell/index.js +4 -4
  98. package/dist/{state-CXMexi0l.js → state-QDaxntgR.js} +1 -1
  99. package/dist/styles.css +1 -1
  100. package/dist/testing/index.js +3 -3
  101. package/dist/{useCommand-Ch_nx1AQ.js → useCommand-BvcU3AlW.js} +1 -1
  102. package/dist/{useGroupSheet-CPjHydQV.js → useGroupSheet-BGIntPKD.js} +1 -1
  103. package/dist/{usePreferences-B8LIZp_f.js → usePreferences-BfMXVbSO.js} +1 -1
  104. package/dist/{useRecordDialog-DdkauXnU.js → useRecordDialog-q_BNXdb7.js} +1 -1
  105. package/dist/{useResourceForm-Dl6YFYyz.js → useResourceForm-C1S628UI.js} +1 -1
  106. package/dist/{useTypedEntry-DKs8I1yP.js → useTypedEntry-tttjrClq.js} +1 -1
  107. package/package.json +2 -2
  108. package/dist/FormGroup.vue_vue_type_script_setup_true_lang-D6jYfNjW.js +0 -427
  109. package/dist/IncidentRecord-zTemLz2R.js +0 -404
  110. package/dist/ServiceAccountDialog.vue_vue_type_script_setup_true_lang-4nbhEpv_.js +0 -127
  111. package/dist/client-Dg303Pmc.js +0 -193
  112. package/dist/format-DoKs29bZ.js +0 -118
  113. package/dist/serverMessages-Ddghrewh.js +0 -25
@@ -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,127 +0,0 @@
1
- import { defineComponent as I, computed as K, ref as V, openBlock as A, createBlock as k, unref as e, withCtx as b, createElementVNode as B, createVNode as p, mergeProps as f, createCommentVNode as D } from "vue";
2
- import { useI18n as G } from "vue-i18n";
3
- import { f as T, u as U } from "./refusals-DfPzVNNY.js";
4
- import { a as x } from "./FormGroup.vue_vue_type_script_setup_true_lang-D6jYfNjW.js";
5
- import { u as N, _ as O } from "./SelectField.vue_vue_type_script_setup_true_lang-BZwdANL3.js";
6
- import { _ as Z } from "./TextareaField.vue_vue_type_script_setup_true_lang-D2j4s96s.js";
7
- import { _ as j } from "./TextField.vue_vue_type_script_setup_true_lang-CWIeeZRE.js";
8
- import { _ as F } from "./useCommand-Ch_nx1AQ.js";
9
- import { u as H } from "./useRecordDialog-DdkauXnU.js";
10
- import { t as J } from "./toast-CqSDTWRX.js";
11
- import { u as C } from "./platform-DtISOEt7.js";
12
- import { l as Q, m as W } from "./index-DZikGJ8L.js";
13
- import { r as X } from "./http-DOEfFCDA.js";
14
- import { i as Y } from "./preferences-hYhrw8Uy.js";
15
- import { s as l } from "./routes-Beyr5NQo.js";
16
- import { u as ee } from "./serverMessages-Ddghrewh.js";
17
- const y = (o) => ({ headers: { "Idempotency-Key": o } }), S = 500;
18
- function ae(o) {
19
- return {
20
- list: async (s) => (await o.request(l.index, void 0, s)).data.service_accounts,
21
- show: async (s, t) => (await o.request(l.show, { id: s }, t)).data,
22
- create: async (s, t) => (await o.request(l.create, s, y(t))).data,
23
- update: async (s, t, c) => (await o.request(l.update, { ...t, id: s }, y(c))).data,
24
- deactivate: async (s) => (await o.request(l.deactivate, { id: s })).data,
25
- keys: async (s, t) => (await o.request(l.keys, { id: s }, t)).data.keys,
26
- /** The secret is in the answer, and only there. */
27
- createKey: async (s, t, c) => (await o.request(l.createkey, { ...t, id: s }, y(c))).data,
28
- revokeKey: async (s, t) => void await o.request(l.revokekey, { id: s, keyID: t }),
29
- /** The people who can answer for an account: the active ones of the users list (its largest page). */
30
- people: async (s) => X(await o.request(Y.usersList, { view: "active", order_col: "name", order_dir: "asc", page: 1, per_page: S }, s), { page: 1, pageSize: S }).rows.map((t) => ({ id: t.id, name: t.name }))
31
- };
32
- }
33
- const se = () => ae(C().http);
34
- function te() {
35
- const o = ee(), s = T();
36
- return { ...o, failureMessage: (t, c) => s(t, c) ?? o.failureMessage(t, c) };
37
- }
38
- const ne = {
39
- class: "flex min-w-0 flex-col gap-group-gap",
40
- "data-test": "service-account-form"
41
- }, h = 0, qe = /* @__PURE__ */ I({
42
- __name: "ServiceAccountDialog",
43
- emits: ["saved"],
44
- setup(o, { expose: s, emit: t }) {
45
- const c = t, { t: r } = G(), { access: L } = C(), M = U(), _ = se(), { tenants: u } = Q(), P = te(), v = K(() => {
46
- const a = L.held(W);
47
- return a !== null && a.scope.id === void 0;
48
- }), R = (a) => a.trim() === "", d = H({
49
- ...P,
50
- defaults: () => ({ name: "", description: "", tenant_id: u !== null && v.value ? h : null, owner_id: null }),
51
- validator: {
52
- safeParse(a) {
53
- const n = a, i = [], w = r("core.account.validation.required"), q = r("core.serviceaccounts.errors.too_long");
54
- return R(n.name) ? i.push({ path: ["name"], message: w }) : n.name.trim().length > 100 && i.push({ path: ["name"], message: q }), n.description.length > 500 && i.push({ path: ["description"], message: q }), n.owner_id === null && i.push({ path: ["owner_id"], message: w }), u !== null && n.tenant_id === null && i.push({ path: ["tenant_id"], message: w }), i.length > 0 || n.owner_id === null ? { success: !1, error: { issues: i } } : { success: !0, data: { name: n.name.trim(), description: n.description, tenant_id: u === null ? null : n.tenant_id || null, owner_id: n.owner_id } };
55
- }
56
- },
57
- toValues: (a) => ({ name: a.name, description: a.description, tenant_id: a.tenant?.id ?? (v.value ? h : null), owner_id: a.owner.id }),
58
- create: (a, { idempotencyKey: n }) => _.create(a, n),
59
- update: (a, n, { idempotencyKey: i }) => _.update(a.id, n, i),
60
- done: (a) => {
61
- J.success(r("core.serviceaccounts.toasts.saved")), c("saved", a);
62
- }
63
- }), m = d.form, g = V(!1), $ = N({
64
- for: () => g.value && u !== null ? !0 : null,
65
- load: async (a, { signal: n }) => [
66
- ...v.value ? [{ value: h, label: M.levelLabel("organization") }] : [],
67
- ...(await (u?.options(n) ?? [])).map((i) => ({ value: i.id, label: i.name }))
68
- ]
69
- }), z = N({
70
- for: () => g.value ? !0 : null,
71
- load: async (a, { signal: n }) => (await _.people({ signal: n })).map((i) => ({ value: i.id, label: i.name }))
72
- });
73
- function E(a) {
74
- g.value = !0, a ? d.edit(a) : d.create();
75
- }
76
- return s({ show: E, form: m }), (a, n) => (A(), k(e(F), {
77
- command: e(d).command,
78
- size: "md",
79
- title: e(d).editing.value ? e(r)("core.serviceaccounts.edit_title") : e(r)("core.serviceaccounts.create_title"),
80
- subtitle: e(r)("core.serviceaccounts.no_password"),
81
- "confirm-label": e(r)("core.serviceaccounts.save")
82
- }, {
83
- default: b(() => [
84
- B("div", ne, [
85
- p(e(x), null, {
86
- default: b(() => [
87
- p(e(j), f(e(m).bind("name"), {
88
- label: e(r)("core.serviceaccounts.fields.name"),
89
- "max-length": 100,
90
- required: ""
91
- }), null, 16, ["label"]),
92
- p(e(Z), f(e(m).bind("description"), {
93
- label: e(r)("core.serviceaccounts.fields.description"),
94
- rows: 2,
95
- "max-length": 500
96
- }), null, 16, ["label"])
97
- ]),
98
- _: 1
99
- }),
100
- p(e(x), {
101
- footer: e(r)("core.serviceaccounts.fields.owner_hint")
102
- }, {
103
- default: b(() => [
104
- e(u) ? (A(), k(e(O), f({ key: 0 }, e(m).bind("tenant_id"), {
105
- label: e(r)(e(u).labelKey),
106
- options: e($),
107
- required: ""
108
- }), null, 16, ["label", "options"])) : D("", !0),
109
- p(e(O), f(e(m).bind("owner_id"), {
110
- label: e(r)("core.serviceaccounts.fields.owner"),
111
- options: e(z),
112
- required: ""
113
- }), null, 16, ["label", "options"])
114
- ]),
115
- _: 1
116
- }, 8, ["footer"])
117
- ])
118
- ]),
119
- _: 1
120
- }, 8, ["command", "title", "subtitle", "confirm-label"]));
121
- }
122
- });
123
- export {
124
- qe as _,
125
- te as a,
126
- se as u
127
- };