@plumile/backoffice-react 0.1.196 → 0.1.198

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 (51) hide show
  1. package/README.md +7 -0
  2. package/lib/esm/components/backoffice/filters/BackofficeFilterAction.js +23 -20
  3. package/lib/esm/components/backoffice/filters/BackofficeFilterAction.js.map +1 -1
  4. package/lib/esm/components/backoffice/layout/breadcrumb/buildBreadcrumbs.js.map +1 -1
  5. package/lib/esm/components/backoffice/links/BackofficeInlineLink.js +19 -9
  6. package/lib/esm/components/backoffice/links/BackofficeInlineLink.js.map +1 -1
  7. package/lib/esm/components/backoffice/links/BackofficeLink.js +12 -8
  8. package/lib/esm/components/backoffice/links/BackofficeLink.js.map +1 -1
  9. package/lib/esm/components/backoffice/links/resolveBackofficeLink.js +64 -45
  10. package/lib/esm/components/backoffice/links/resolveBackofficeLink.js.map +1 -1
  11. package/lib/esm/components/backoffice/refs/BackofficeRelatedCountLink.js +30 -61
  12. package/lib/esm/components/backoffice/refs/BackofficeRelatedCountLink.js.map +1 -1
  13. package/lib/esm/components/backoffice/scaffolds/BackofficeEntityListScaffold.js +1 -4
  14. package/lib/esm/components/backoffice/scaffolds/BackofficeEntityListScaffold.js.map +1 -1
  15. package/lib/esm/components/backoffice/scaffolds/BackofficeListFilterContext.js +18 -27
  16. package/lib/esm/components/backoffice/scaffolds/BackofficeListFilterContext.js.map +1 -1
  17. package/lib/esm/hooks/useBackofficeListUrlState.js +27 -24
  18. package/lib/esm/hooks/useBackofficeListUrlState.js.map +1 -1
  19. package/lib/esm/pages/BackofficeDashboardWidgetContent.js +194 -227
  20. package/lib/esm/pages/BackofficeDashboardWidgetContent.js.map +1 -1
  21. package/lib/esm/pages/BackofficeEntityDetailLayoutPage.js +107 -120
  22. package/lib/esm/pages/BackofficeEntityDetailLayoutPage.js.map +1 -1
  23. package/lib/esm/pages/BackofficeEntityListDataPage.js +2 -8
  24. package/lib/esm/pages/BackofficeEntityListDataPage.js.map +1 -1
  25. package/lib/esm/pages/resolveDashboardTargetDestination.js +17 -0
  26. package/lib/esm/pages/resolveDashboardTargetDestination.js.map +1 -0
  27. package/lib/esm/router/createBackofficeRoutes.js +88 -99
  28. package/lib/esm/router/createBackofficeRoutes.js.map +1 -1
  29. package/lib/types/components/backoffice/filters/BackofficeFilterAction.d.ts.map +1 -1
  30. package/lib/types/components/backoffice/layout/breadcrumb/buildBreadcrumbs.d.ts +3 -3
  31. package/lib/types/components/backoffice/layout/breadcrumb/buildBreadcrumbs.d.ts.map +1 -1
  32. package/lib/types/components/backoffice/links/BackofficeInlineLink.d.ts.map +1 -1
  33. package/lib/types/components/backoffice/links/BackofficeLink.d.ts.map +1 -1
  34. package/lib/types/components/backoffice/links/resolveBackofficeLink.d.ts.map +1 -1
  35. package/lib/types/components/backoffice/links/types.d.ts +19 -15
  36. package/lib/types/components/backoffice/links/types.d.ts.map +1 -1
  37. package/lib/types/components/backoffice/refs/BackofficeRelatedCountLink.d.ts.map +1 -1
  38. package/lib/types/components/backoffice/scaffolds/BackofficeEntityListScaffold.d.ts.map +1 -1
  39. package/lib/types/components/backoffice/scaffolds/BackofficeListFilterContext.d.ts +0 -4
  40. package/lib/types/components/backoffice/scaffolds/BackofficeListFilterContext.d.ts.map +1 -1
  41. package/lib/types/hooks/useBackofficeListUrlState.d.ts.map +1 -1
  42. package/lib/types/index.d.ts +1 -1
  43. package/lib/types/index.d.ts.map +1 -1
  44. package/lib/types/pages/BackofficeDashboardWidgetContent.d.ts.map +1 -1
  45. package/lib/types/pages/BackofficeEntityDetailLayoutPage.d.ts.map +1 -1
  46. package/lib/types/pages/BackofficeEntityListDataPage.d.ts.map +1 -1
  47. package/lib/types/pages/resolveDashboardTargetDestination.d.ts +5 -0
  48. package/lib/types/pages/resolveDashboardTargetDestination.d.ts.map +1 -0
  49. package/lib/types/router/createBackofficeRoutes.d.ts +0 -2
  50. package/lib/types/router/createBackofficeRoutes.d.ts.map +1 -1
  51. package/package.json +7 -7
@@ -4,113 +4,80 @@ import { BackofficeBillingUsageChart as n } from "../components/backoffice/billi
4
4
  import { buildDataTableColumns as r } from "../components/backoffice/columns/buildDataTableColumns.js";
5
5
  import { resolveLabel as i } from "./BackofficeDashboardPage.helpers.js";
6
6
  import { tileBody as a, tileCount as o } from "./backofficeDashboardPage.css.js";
7
- import { useEffect as s, useMemo as c, useState as l } from "react";
8
- import { jsx as u, jsxs as d } from "react/jsx-runtime";
9
- import { useTranslation as f } from "react-i18next";
10
- import * as p from "react-relay";
11
- import { BackofficeEmptyState as m } from "@plumile/ui/backoffice/molecules/backoffice_empty_state/BackofficeEmptyState.js";
12
- import { buildBackofficeFallbackListHref as h, buildBackofficeListHref as g } from "@plumile/backoffice-core/state/buildListHref.js";
13
- import { DashboardPanel as _ } from "@plumile/ui/components/dashboard/dashboard_panel/DashboardPanel.js";
14
- import { DashboardQuickActions as v } from "@plumile/ui/components/dashboard/dashboard_quick_actions/DashboardQuickActions.js";
15
- import { DashboardMetricGroup as y } from "@plumile/ui/components/dashboard/dashboard_metric_group/DashboardMetricGroup.js";
16
- import { DashboardStatusList as b } from "@plumile/ui/components/dashboard/dashboard_status_list/DashboardStatusList.js";
17
- import { DashboardBreakdownList as x } from "@plumile/ui/components/dashboard/dashboard_operational/DashboardBreakdownList.js";
18
- import { DashboardEntitySpotlight as S } from "@plumile/ui/components/dashboard/dashboard_operational/DashboardEntitySpotlight.js";
19
- import { DashboardHealthMatrix as C } from "@plumile/ui/components/dashboard/dashboard_operational/DashboardHealthMatrix.js";
20
- import { DashboardRiskQueue as w } from "@plumile/ui/components/dashboard/dashboard_operational/DashboardRiskQueue.js";
21
- import { DashboardSlaGauge as T } from "@plumile/ui/components/dashboard/dashboard_operational/DashboardSlaGauge.js";
22
- import { DashboardTimelineChart as E } from "@plumile/ui/components/dashboard/dashboard_operational/DashboardTimelineChart.js";
23
- import { DashboardTrendMetric as D } from "@plumile/ui/components/dashboard/dashboard_operational/DashboardTrendMetric.js";
24
- import { DashboardWindowControl as O } from "@plumile/ui/components/dashboard/dashboard_operational/DashboardWindowControl.js";
25
- import { DataTable as k } from "@plumile/ui/components/data-table/DataTable.js";
7
+ import s from "./resolveDashboardTargetDestination.js";
8
+ import { jsx as c, jsxs as l } from "react/jsx-runtime";
9
+ import { useTranslation as u } from "react-i18next";
10
+ import * as d from "react-relay";
11
+ import { BackofficeEmptyState as f } from "@plumile/ui/backoffice/molecules/backoffice_empty_state/BackofficeEmptyState.js";
12
+ import { DashboardPanel as p } from "@plumile/ui/components/dashboard/dashboard_panel/DashboardPanel.js";
13
+ import { DashboardQuickActions as m } from "@plumile/ui/components/dashboard/dashboard_quick_actions/DashboardQuickActions.js";
14
+ import { DashboardMetricGroup as h } from "@plumile/ui/components/dashboard/dashboard_metric_group/DashboardMetricGroup.js";
15
+ import { DashboardStatusList as g } from "@plumile/ui/components/dashboard/dashboard_status_list/DashboardStatusList.js";
16
+ import { DashboardBreakdownList as _ } from "@plumile/ui/components/dashboard/dashboard_operational/DashboardBreakdownList.js";
17
+ import { DashboardEntitySpotlight as v } from "@plumile/ui/components/dashboard/dashboard_operational/DashboardEntitySpotlight.js";
18
+ import { DashboardHealthMatrix as y } from "@plumile/ui/components/dashboard/dashboard_operational/DashboardHealthMatrix.js";
19
+ import { DashboardRiskQueue as b } from "@plumile/ui/components/dashboard/dashboard_operational/DashboardRiskQueue.js";
20
+ import { DashboardSlaGauge as x } from "@plumile/ui/components/dashboard/dashboard_operational/DashboardSlaGauge.js";
21
+ import { DashboardTimelineChart as S } from "@plumile/ui/components/dashboard/dashboard_operational/DashboardTimelineChart.js";
22
+ import { DashboardTrendMetric as C } from "@plumile/ui/components/dashboard/dashboard_operational/DashboardTrendMetric.js";
23
+ import { DashboardWindowControl as w } from "@plumile/ui/components/dashboard/dashboard_operational/DashboardWindowControl.js";
24
+ import { DataTable as T } from "@plumile/ui/components/data-table/DataTable.js";
26
25
  //#region src/pages/BackofficeDashboardWidgetContent.tsx
27
- var { useLazyLoadQuery: A } = p, j = { window: {
26
+ var { useLazyLoadQuery: E } = d, D = { window: {
28
27
  id: "24h",
29
28
  label: (e) => e("common.time.lastDay", "24 h"),
30
29
  from: (/* @__PURE__ */ new Date(0)).toISOString(),
31
30
  to: (/* @__PURE__ */ new Date(0)).toISOString()
32
- } }, M = (e, t) => typeof e.variables == "function" ? e.variables(t) : e.variables, N = () => {
31
+ } }, O = (e, t) => typeof e.variables == "function" ? e.variables(t) : e.variables, k = () => {
33
32
  let { t } = e();
34
- return /* @__PURE__ */ u(m, { title: t("common.notAvailable") });
35
- }, P = (e) => e == null ? "" : e.kind === "href" ? `href:${e.href}` : `entity-list:${e.entityId}:${JSON.stringify(e.state ?? null)}`, F = (e) => {
36
- let { entities: n, entityRegistry: r } = t(), [, i] = l(0), a = e.map(P).join("|");
37
- return s(() => {
38
- let t = /* @__PURE__ */ new Set();
39
- for (let i of e) i?.kind === "entity-list" && n[i.entityId] != null && r.getLoadedListEntity(i.entityId) == null && t.add(i.entityId);
40
- if (t.size === 0) return;
41
- let a = !1;
42
- return Promise.all(Array.from(t).map(async (e) => {
43
- try {
44
- await r.loadListEntity(e);
45
- } catch {
46
- return null;
47
- }
48
- return e;
49
- })).then(() => {
50
- a || i((e) => e + 1);
51
- }, () => {}), () => {
52
- a = !0;
53
- };
54
- }, [
55
- n,
56
- r,
57
- a,
58
- e
59
- ]), c(() => (e, t) => {
60
- if (e == null) return t;
61
- if (e.kind === "href") return e.href;
62
- let i = n[e.entityId];
63
- if (i == null) return t;
64
- let a = r.getLoadedListEntity(e.entityId);
65
- return a == null ? h(i.routes.list, e.state?.where ?? null, e.state?.filters) : g(a.config, {
66
- where: e.state?.where,
67
- sort: e.state?.sort
68
- });
69
- }, [n, r]);
70
- }, I = ({ metrics: t }) => {
71
- let { t: n } = f(), { t: r } = e(), a = F(t.map((e) => e.target));
72
- return /* @__PURE__ */ u(y, {
73
- emptyState: /* @__PURE__ */ u(N, {}),
33
+ return /* @__PURE__ */ c(f, { title: t("common.notAvailable") });
34
+ }, A = () => {
35
+ let { entities: e } = t();
36
+ return (t, n) => s(t, e, n);
37
+ }, j = ({ metrics: t }) => {
38
+ let { t: n } = u(), { t: r } = e(), a = A();
39
+ return /* @__PURE__ */ c(h, {
40
+ emptyState: /* @__PURE__ */ c(k, {}),
74
41
  metrics: t.map((e) => ({
75
42
  id: e.id,
76
- href: a(e.target, e.href),
43
+ destination: a(e.target, e.href),
77
44
  label: i(e.label, n),
78
45
  value: e.value ?? r("common.notAvailable"),
79
46
  hint: e.meta == null ? void 0 : i(e.meta, n)
80
47
  }))
81
48
  });
82
- }, L = ({ items: t }) => {
83
- let { t: n } = f(), { t: r } = e(), a = F(t.map((e) => e.target));
84
- return /* @__PURE__ */ u(b, {
85
- emptyState: /* @__PURE__ */ u(N, {}),
49
+ }, M = ({ items: t }) => {
50
+ let { t: n } = u(), { t: r } = e(), a = A();
51
+ return /* @__PURE__ */ c(g, {
52
+ emptyState: /* @__PURE__ */ c(k, {}),
86
53
  items: t.map((e) => ({
87
54
  id: e.id,
88
- href: a(e.target, e.href),
55
+ destination: a(e.target, e.href),
89
56
  label: i(e.label, n),
90
57
  value: e.value ?? r("common.notAvailable")
91
58
  }))
92
59
  });
93
- }, R = ({ actions: e, layout: t }) => {
94
- let { t: n } = f(), r = F(e.map((e) => e.target));
95
- return /* @__PURE__ */ u(v, {
60
+ }, N = ({ actions: e, layout: t }) => {
61
+ let { t: n } = u(), r = A();
62
+ return /* @__PURE__ */ c(m, {
96
63
  layout: t,
97
- emptyState: /* @__PURE__ */ u(N, {}),
64
+ emptyState: /* @__PURE__ */ c(k, {}),
98
65
  actions: e.map((e) => {
99
66
  let t;
100
67
  return t = typeof e.label == "string" ? e.label : i(e.label, n), {
101
68
  id: e.id,
102
- href: r(e.target, e.href) ?? "#",
69
+ destination: r(e.target, e.href) ?? { pathname: "#" },
103
70
  label: t
104
71
  };
105
72
  })
106
73
  });
107
- }, z = (e) => e.map((e) => e.target), B = ({ metric: t }) => {
108
- let { t: n } = f(), { t: r } = e(), a = F([t.target]);
109
- return /* @__PURE__ */ u(D, {
74
+ }, P = ({ metric: t }) => {
75
+ let { t: n } = u(), { t: r } = e(), a = A();
76
+ return /* @__PURE__ */ c(C, {
110
77
  label: i(t.label, n),
111
78
  value: t.value ?? r("common.notAvailable"),
112
79
  unit: t.unit,
113
- href: a(t.target, t.href),
80
+ destination: a(t.target, t.href),
114
81
  tone: t.tone,
115
82
  delta: t.delta == null ? void 0 : {
116
83
  ...t.delta,
@@ -119,33 +86,33 @@ var { useLazyLoadQuery: A } = p, j = { window: {
119
86
  sparkline: t.sparkline,
120
87
  sparklineLabel: i(t.label, n)
121
88
  });
122
- }, V = ({ gauge: t }) => {
123
- let { t: n } = f(), { t: r } = e(), a = F([t.target]);
124
- return t.value == null ? /* @__PURE__ */ u(m, { title: r("common.notAvailable") }) : /* @__PURE__ */ u(T, {
89
+ }, F = ({ gauge: t }) => {
90
+ let { t: n } = u(), { t: r } = e(), a = A();
91
+ return t.value == null ? /* @__PURE__ */ c(f, { title: r("common.notAvailable") }) : /* @__PURE__ */ c(x, {
125
92
  label: i(t.label, n),
126
93
  value: t.value,
127
94
  max: t.max,
128
95
  threshold: t.threshold,
129
96
  unit: t.unit,
130
97
  tone: t.tone,
131
- href: a(t.target, t.href)
98
+ destination: a(t.target, t.href)
132
99
  });
133
- }, H = ({ items: t }) => {
134
- let { t: n } = f(), { t: r } = e(), a = F(z(t));
135
- return /* @__PURE__ */ u(x, {
136
- emptyState: /* @__PURE__ */ u(N, {}),
100
+ }, I = ({ items: t }) => {
101
+ let { t: n } = u(), { t: r } = e(), a = A();
102
+ return /* @__PURE__ */ c(_, {
103
+ emptyState: /* @__PURE__ */ c(k, {}),
137
104
  items: t.map((e) => ({
138
105
  id: e.id,
139
- href: a(e.target, e.href),
106
+ destination: a(e.target, e.href),
140
107
  label: i(e.label, n),
141
108
  meta: e.meta == null ? void 0 : i(e.meta, n),
142
109
  tone: e.tone,
143
110
  value: e.value ?? r("common.notAvailable")
144
111
  }))
145
112
  });
146
- }, U = ({ ariaLabel: e, chart: t, result: n }) => {
147
- let { t: r } = f();
148
- return /* @__PURE__ */ u(E, {
113
+ }, L = ({ ariaLabel: e, chart: t, result: n }) => {
114
+ let { t: r } = u();
115
+ return /* @__PURE__ */ c(S, {
149
116
  ariaLabel: i(e, r),
150
117
  chart: t,
151
118
  emptyMessage: n.emptyLabel == null ? "" : i(n.emptyLabel, r),
@@ -154,23 +121,23 @@ var { useLazyLoadQuery: A } = p, j = { window: {
154
121
  label: i(e.label, r)
155
122
  }))
156
123
  });
157
- }, W = ({ items: t }) => {
158
- let { t: n } = f(), { t: r } = e(), a = F(z(t));
159
- return /* @__PURE__ */ u(w, {
160
- emptyState: /* @__PURE__ */ u(N, {}),
124
+ }, R = ({ items: t }) => {
125
+ let { t: n } = u(), { t: r } = e(), a = A();
126
+ return /* @__PURE__ */ c(b, {
127
+ emptyState: /* @__PURE__ */ c(k, {}),
161
128
  items: t.map((e) => ({
162
129
  id: e.id,
163
- href: a(e.target, e.href),
130
+ destination: a(e.target, e.href),
164
131
  label: i(e.label, n),
165
132
  meta: e.meta == null ? void 0 : i(e.meta, n),
166
133
  severity: e.severity,
167
134
  value: e.value ?? r("common.notAvailable")
168
135
  }))
169
136
  });
170
- }, G = ({ item: e }) => {
171
- let { t } = f(), n = F([e?.target]);
172
- return e == null ? /* @__PURE__ */ u(N, {}) : /* @__PURE__ */ u(S, {
173
- href: n(e.target, e.href),
137
+ }, z = ({ item: e }) => {
138
+ let { t } = u(), n = A();
139
+ return e == null ? /* @__PURE__ */ c(k, {}) : /* @__PURE__ */ c(v, {
140
+ destination: n(e.target, e.href),
174
141
  label: i(e.label, t),
175
142
  title: i(e.title, t),
176
143
  tone: e.tone,
@@ -180,74 +147,74 @@ var { useLazyLoadQuery: A } = p, j = { window: {
180
147
  value: e.value
181
148
  }))
182
149
  });
183
- }, K = ({ rows: t }) => {
184
- let { t: n } = f(), { t: r } = e(), a = F(t.flatMap((e) => e.cells.map((e) => e.target)));
185
- return /* @__PURE__ */ u(C, {
186
- emptyState: /* @__PURE__ */ u(N, {}),
150
+ }, B = ({ rows: t }) => {
151
+ let { t: n } = u(), { t: r } = e(), a = A();
152
+ return /* @__PURE__ */ c(y, {
153
+ emptyState: /* @__PURE__ */ c(k, {}),
187
154
  rows: t.map((e) => ({
188
155
  id: e.id,
189
156
  label: i(e.label, n),
190
157
  cells: e.cells.map((e) => ({
191
158
  id: e.id,
192
- href: a(e.target, e.href),
159
+ destination: a(e.target, e.href),
193
160
  label: i(e.label, n),
194
161
  tone: e.tone,
195
162
  value: e.value ?? r("common.notAvailable")
196
163
  }))
197
164
  }))
198
165
  });
199
- }, q = ({ activeWindowPresetId: s, context: c = j, widget: l, data: p, onWindowPresetChange: m, windowPresets: h = [] }) => {
200
- let { t: g } = f(), { t: y } = e(), { entities: b } = t(), x = l.description == null ? void 0 : i(l.description, g), S = () => l.dataSource === "query" && p != null ? l.resolve(p, c) : null;
201
- if (l.kind === "textBlock") {
202
- let e = i(l.title, g), t = i(l.body, g);
203
- return /* @__PURE__ */ u(_, {
166
+ }, V = ({ activeWindowPresetId: s, context: d = D, widget: f, data: h, onWindowPresetChange: g, windowPresets: _ = [] }) => {
167
+ let { t: v } = u(), { t: y } = e(), { entities: b } = t(), x = f.description == null ? void 0 : i(f.description, v), S = () => f.dataSource === "query" && h != null ? f.resolve(h, d) : null;
168
+ if (f.kind === "textBlock") {
169
+ let e = i(f.title, v), t = i(f.body, v);
170
+ return /* @__PURE__ */ c(p, {
204
171
  title: e,
205
172
  subtitle: x,
206
- children: /* @__PURE__ */ u("div", {
173
+ children: /* @__PURE__ */ c("div", {
207
174
  className: a,
208
175
  children: t
209
176
  })
210
177
  });
211
178
  }
212
- if (l.kind === "shortcut") {
213
- let e = b[l.entityId], t = i(l.label, g);
214
- return e == null ? /* @__PURE__ */ u(_, {
179
+ if (f.kind === "shortcut") {
180
+ let e = b[f.entityId], t = i(f.label, v);
181
+ return e == null ? /* @__PURE__ */ c(p, {
215
182
  title: t,
216
183
  subtitle: x,
217
- children: /* @__PURE__ */ u(N, {})
218
- }) : e.kind === "tool" ? /* @__PURE__ */ u(_, {
184
+ children: /* @__PURE__ */ c(k, {})
185
+ }) : e.kind === "tool" ? /* @__PURE__ */ c(p, {
219
186
  title: t,
220
187
  subtitle: x,
221
- children: /* @__PURE__ */ u(v, { actions: [{
188
+ children: /* @__PURE__ */ c(m, { actions: [{
222
189
  id: e.id,
223
- href: e.routes.list,
190
+ destination: { pathname: e.routes.list },
224
191
  label: y("dashboard.actions.openTool")
225
192
  }] })
226
- }) : /* @__PURE__ */ u(_, {
193
+ }) : /* @__PURE__ */ c(p, {
227
194
  title: t,
228
195
  subtitle: x,
229
- children: /* @__PURE__ */ u(v, { actions: [{
196
+ children: /* @__PURE__ */ c(m, { actions: [{
230
197
  id: e.id,
231
- href: e.routes.list,
198
+ destination: { pathname: e.routes.list },
232
199
  label: y("dashboard.actions.openList")
233
200
  }] })
234
201
  });
235
202
  }
236
- if (l.kind === "tablePreview") {
203
+ if (f.kind === "tablePreview") {
237
204
  let e = S();
238
- if (e == null) return /* @__PURE__ */ u(_, {
239
- title: i(l.title, g),
205
+ if (e == null) return /* @__PURE__ */ c(p, {
206
+ title: i(f.title, v),
240
207
  subtitle: x,
241
- children: /* @__PURE__ */ u(N, {})
208
+ children: /* @__PURE__ */ c(k, {})
242
209
  });
243
210
  let t = r(e.columns, {
244
- tApp: g,
211
+ tApp: v,
245
212
  t: y
246
- }), n = i(l.title, g);
247
- return /* @__PURE__ */ u(_, {
213
+ }), n = i(f.title, v);
214
+ return /* @__PURE__ */ c(p, {
248
215
  title: n,
249
216
  subtitle: x,
250
- children: /* @__PURE__ */ u(k, {
217
+ children: /* @__PURE__ */ c(T, {
251
218
  columns: t,
252
219
  rows: e.rows,
253
220
  getRowId: (e, t) => {
@@ -260,198 +227,198 @@ var { useLazyLoadQuery: A } = p, j = { window: {
260
227
  })
261
228
  });
262
229
  }
263
- if (l.kind === "metricGroup") {
230
+ if (f.kind === "metricGroup") {
264
231
  let e = S();
265
- return e == null ? /* @__PURE__ */ u(N, {}) : /* @__PURE__ */ u(I, { metrics: e });
232
+ return e == null ? /* @__PURE__ */ c(k, {}) : /* @__PURE__ */ c(j, { metrics: e });
266
233
  }
267
- if (l.kind === "trendMetric") {
268
- let e = S(), t = l.title == null ? void 0 : i(l.title, g);
269
- return e == null ? /* @__PURE__ */ u(_, {
234
+ if (f.kind === "trendMetric") {
235
+ let e = S(), t = f.title == null ? void 0 : i(f.title, v);
236
+ return e == null ? /* @__PURE__ */ c(p, {
270
237
  title: t,
271
238
  subtitle: x,
272
- children: /* @__PURE__ */ u(N, {})
273
- }) : /* @__PURE__ */ u(_, {
239
+ children: /* @__PURE__ */ c(k, {})
240
+ }) : /* @__PURE__ */ c(p, {
274
241
  title: t,
275
242
  subtitle: x,
276
- children: /* @__PURE__ */ u(B, { metric: e })
243
+ children: /* @__PURE__ */ c(P, { metric: e })
277
244
  });
278
245
  }
279
- if (l.kind === "slaGauge") {
280
- let e = S(), t = l.title == null ? void 0 : i(l.title, g);
281
- return e == null ? /* @__PURE__ */ u(_, {
246
+ if (f.kind === "slaGauge") {
247
+ let e = S(), t = f.title == null ? void 0 : i(f.title, v);
248
+ return e == null ? /* @__PURE__ */ c(p, {
282
249
  title: t,
283
250
  subtitle: x,
284
- children: /* @__PURE__ */ u(N, {})
285
- }) : /* @__PURE__ */ u(_, {
251
+ children: /* @__PURE__ */ c(k, {})
252
+ }) : /* @__PURE__ */ c(p, {
286
253
  title: t,
287
254
  subtitle: x,
288
- children: /* @__PURE__ */ u(V, { gauge: e })
255
+ children: /* @__PURE__ */ c(F, { gauge: e })
289
256
  });
290
257
  }
291
- if (l.kind === "breakdownList") {
292
- let e = S(), t = l.title == null ? void 0 : i(l.title, g);
293
- return e == null ? /* @__PURE__ */ u(_, {
258
+ if (f.kind === "breakdownList") {
259
+ let e = S(), t = f.title == null ? void 0 : i(f.title, v);
260
+ return e == null ? /* @__PURE__ */ c(p, {
294
261
  title: t,
295
262
  subtitle: x,
296
- children: /* @__PURE__ */ u(N, {})
297
- }) : /* @__PURE__ */ u(_, {
263
+ children: /* @__PURE__ */ c(k, {})
264
+ }) : /* @__PURE__ */ c(p, {
298
265
  title: t,
299
266
  subtitle: x,
300
- children: /* @__PURE__ */ u(H, { items: e })
267
+ children: /* @__PURE__ */ c(I, { items: e })
301
268
  });
302
269
  }
303
- if (l.kind === "timelineChart") {
304
- let e = S(), t = l.title == null ? void 0 : i(l.title, g);
305
- return e == null ? /* @__PURE__ */ u(_, {
270
+ if (f.kind === "timelineChart") {
271
+ let e = S(), t = f.title == null ? void 0 : i(f.title, v);
272
+ return e == null ? /* @__PURE__ */ c(p, {
306
273
  title: t,
307
274
  subtitle: x,
308
- children: /* @__PURE__ */ u(N, {})
309
- }) : /* @__PURE__ */ u(_, {
275
+ children: /* @__PURE__ */ c(k, {})
276
+ }) : /* @__PURE__ */ c(p, {
310
277
  title: t,
311
278
  subtitle: x,
312
- children: /* @__PURE__ */ u(U, {
313
- ariaLabel: l.ariaLabel,
314
- chart: l.chart,
279
+ children: /* @__PURE__ */ c(L, {
280
+ ariaLabel: f.ariaLabel,
281
+ chart: f.chart,
315
282
  result: e
316
283
  })
317
284
  });
318
285
  }
319
- if (l.kind === "riskQueue") {
320
- let e = S(), t = l.title == null ? void 0 : i(l.title, g);
321
- return e == null ? /* @__PURE__ */ u(_, {
286
+ if (f.kind === "riskQueue") {
287
+ let e = S(), t = f.title == null ? void 0 : i(f.title, v);
288
+ return e == null ? /* @__PURE__ */ c(p, {
322
289
  title: t,
323
290
  subtitle: x,
324
- children: /* @__PURE__ */ u(N, {})
325
- }) : /* @__PURE__ */ u(_, {
291
+ children: /* @__PURE__ */ c(k, {})
292
+ }) : /* @__PURE__ */ c(p, {
326
293
  title: t,
327
294
  subtitle: x,
328
- children: /* @__PURE__ */ u(W, { items: e })
295
+ children: /* @__PURE__ */ c(R, { items: e })
329
296
  });
330
297
  }
331
- if (l.kind === "entitySpotlight") {
332
- let e = S(), t = l.title == null ? void 0 : i(l.title, g);
333
- return /* @__PURE__ */ u(_, {
298
+ if (f.kind === "entitySpotlight") {
299
+ let e = S(), t = f.title == null ? void 0 : i(f.title, v);
300
+ return /* @__PURE__ */ c(p, {
334
301
  title: t,
335
302
  subtitle: x,
336
- children: /* @__PURE__ */ u(G, { item: e })
303
+ children: /* @__PURE__ */ c(z, { item: e })
337
304
  });
338
305
  }
339
- if (l.kind === "healthMatrix") {
340
- let e = S(), t = l.title == null ? void 0 : i(l.title, g);
341
- return e == null ? /* @__PURE__ */ u(_, {
306
+ if (f.kind === "healthMatrix") {
307
+ let e = S(), t = f.title == null ? void 0 : i(f.title, v);
308
+ return e == null ? /* @__PURE__ */ c(p, {
342
309
  title: t,
343
310
  subtitle: x,
344
- children: /* @__PURE__ */ u(N, {})
345
- }) : /* @__PURE__ */ u(_, {
311
+ children: /* @__PURE__ */ c(k, {})
312
+ }) : /* @__PURE__ */ c(p, {
346
313
  title: t,
347
314
  subtitle: x,
348
- children: /* @__PURE__ */ u(K, { rows: e })
315
+ children: /* @__PURE__ */ c(B, { rows: e })
349
316
  });
350
317
  }
351
- if (l.kind === "billingUsageChart") {
352
- let e = S(), t = i(l.title, g);
353
- return e == null ? /* @__PURE__ */ u(_, {
318
+ if (f.kind === "billingUsageChart") {
319
+ let e = S(), t = i(f.title, v);
320
+ return e == null ? /* @__PURE__ */ c(p, {
354
321
  title: t,
355
322
  subtitle: x,
356
- children: /* @__PURE__ */ u(N, {})
357
- }) : /* @__PURE__ */ u(_, {
323
+ children: /* @__PURE__ */ c(k, {})
324
+ }) : /* @__PURE__ */ c(p, {
358
325
  title: t,
359
326
  subtitle: x,
360
- children: /* @__PURE__ */ u(n, {
361
- ariaLabel: i(l.ariaLabel, g),
327
+ children: /* @__PURE__ */ c(n, {
328
+ ariaLabel: i(f.ariaLabel, v),
362
329
  buckets: e.buckets,
363
- categories: l.categories.map((e) => ({
330
+ categories: f.categories.map((e) => ({
364
331
  id: e.id,
365
- label: i(e.label, g),
332
+ label: i(e.label, v),
366
333
  color: e.color
367
334
  })),
368
335
  currency: e.currency,
369
- emptyLabel: i(l.emptyLabel, g),
336
+ emptyLabel: i(f.emptyLabel, v),
370
337
  from: e.from,
371
- rangePrefix: i(l.rangePrefix, g),
338
+ rangePrefix: i(f.rangePrefix, v),
372
339
  to: e.to,
373
340
  totalAmount: e.totalAmount
374
341
  })
375
342
  });
376
343
  }
377
- if (l.kind === "quickActions") {
378
- let e = l.title == null ? y("dashboard.actions.openTool") : i(l.title, g);
379
- return /* @__PURE__ */ u(_, {
344
+ if (f.kind === "quickActions") {
345
+ let e = f.title == null ? y("dashboard.actions.openTool") : i(f.title, v);
346
+ return /* @__PURE__ */ c(p, {
380
347
  title: e,
381
348
  subtitle: x,
382
- children: /* @__PURE__ */ u(R, {
383
- layout: l.layout?.zone === "aside" ? "stack" : "grid",
384
- actions: l.actions
349
+ children: /* @__PURE__ */ c(N, {
350
+ layout: f.layout?.zone === "aside" ? "stack" : "grid",
351
+ actions: f.actions
385
352
  })
386
353
  });
387
354
  }
388
- if (l.kind === "windowControl") return /* @__PURE__ */ u(_, {
389
- title: i(l.title, g),
355
+ if (f.kind === "windowControl") return /* @__PURE__ */ c(p, {
356
+ title: i(f.title, v),
390
357
  subtitle: x,
391
- children: /* @__PURE__ */ u(O, {
392
- activePresetId: s ?? c.window.id,
358
+ children: /* @__PURE__ */ c(w, {
359
+ activePresetId: s ?? d.window.id,
393
360
  onChange: (e) => {
394
- m?.(e);
361
+ g?.(e);
395
362
  },
396
- presets: h.map((e) => ({
363
+ presets: _.map((e) => ({
397
364
  id: e.id,
398
- label: i(e.label, g)
365
+ label: i(e.label, v)
399
366
  }))
400
367
  })
401
368
  });
402
- if (l.kind === "statusSummary") {
369
+ if (f.kind === "statusSummary") {
403
370
  let e = S();
404
371
  if (e == null) {
405
- let e = l.title == null ? void 0 : i(l.title, g);
406
- return /* @__PURE__ */ u(_, {
372
+ let e = f.title == null ? void 0 : i(f.title, v);
373
+ return /* @__PURE__ */ c(p, {
407
374
  title: e,
408
375
  subtitle: x,
409
- children: /* @__PURE__ */ u(N, {})
376
+ children: /* @__PURE__ */ c(k, {})
410
377
  });
411
378
  }
412
- let t = l.title == null ? void 0 : i(l.title, g);
413
- return /* @__PURE__ */ u(_, {
379
+ let t = f.title == null ? void 0 : i(f.title, v);
380
+ return /* @__PURE__ */ c(p, {
414
381
  title: t,
415
382
  subtitle: x,
416
- children: /* @__PURE__ */ u(L, { items: e })
383
+ children: /* @__PURE__ */ c(M, { items: e })
417
384
  });
418
385
  }
419
- if (l.kind === "recentItems") {
420
- let e = l.title == null ? y("dashboard.title") : i(l.title, g);
421
- return /* @__PURE__ */ u(_, {
386
+ if (f.kind === "recentItems") {
387
+ let e = f.title == null ? y("dashboard.title") : i(f.title, v);
388
+ return /* @__PURE__ */ c(p, {
422
389
  title: e,
423
390
  subtitle: x,
424
- children: /* @__PURE__ */ u(N, {})
391
+ children: /* @__PURE__ */ c(k, {})
425
392
  });
426
393
  }
427
- let C = b[l.entityId];
428
- if (C?.kind !== "list-detail") return /* @__PURE__ */ u(_, {
429
- title: i(l.label, g),
394
+ let C = b[f.entityId];
395
+ if (C?.kind !== "list-detail") return /* @__PURE__ */ c(p, {
396
+ title: i(f.label, v),
430
397
  subtitle: x,
431
- children: /* @__PURE__ */ u(N, {})
398
+ children: /* @__PURE__ */ c(k, {})
432
399
  });
433
- let w = S(), T = y("common.notAvailable");
434
- typeof w?.count == "number" && (T = w.count);
435
- let E = i(l.label, g);
436
- return /* @__PURE__ */ u(_, {
437
- title: E,
400
+ let E = S(), O = y("common.notAvailable");
401
+ typeof E?.count == "number" && (O = E.count);
402
+ let A = i(f.label, v);
403
+ return /* @__PURE__ */ c(p, {
404
+ title: A,
438
405
  subtitle: x,
439
- children: /* @__PURE__ */ d("div", {
406
+ children: /* @__PURE__ */ l("div", {
440
407
  className: a,
441
- children: [/* @__PURE__ */ u("div", {
408
+ children: [/* @__PURE__ */ c("div", {
442
409
  className: o,
443
- children: T
444
- }), /* @__PURE__ */ u(R, { actions: [{
410
+ children: O
411
+ }), /* @__PURE__ */ c(N, { actions: [{
445
412
  id: C.id,
446
- href: w?.href ?? C.routes.list,
447
- target: w?.target,
413
+ href: E?.href ?? C.routes.list,
414
+ target: E?.target,
448
415
  label: y("dashboard.actions.openList")
449
416
  }] })]
450
417
  })
451
418
  });
452
- }, J = ({ activeWindowPresetId: e, context: t = j, onWindowPresetChange: n, widget: r, windowPresets: i }) => {
453
- let a = A(r.query, M(r, t), { fetchPolicy: "store-or-network" });
454
- return /* @__PURE__ */ u(q, {
419
+ }, H = ({ activeWindowPresetId: e, context: t = D, onWindowPresetChange: n, widget: r, windowPresets: i }) => {
420
+ let a = E(r.query, O(r, t), { fetchPolicy: "store-or-network" });
421
+ return /* @__PURE__ */ c(V, {
455
422
  activeWindowPresetId: e,
456
423
  context: t,
457
424
  data: a,
@@ -459,14 +426,14 @@ var { useLazyLoadQuery: A } = p, j = { window: {
459
426
  widget: r,
460
427
  windowPresets: i
461
428
  });
462
- }, Y = (e) => {
429
+ }, U = (e) => {
463
430
  let { widget: t } = e;
464
- return t.dataSource === "query" ? /* @__PURE__ */ u(J, {
431
+ return t.dataSource === "query" ? /* @__PURE__ */ c(H, {
465
432
  ...e,
466
433
  widget: t
467
- }) : /* @__PURE__ */ u(q, { ...e });
434
+ }) : /* @__PURE__ */ c(V, { ...e });
468
435
  };
469
436
  //#endregion
470
- export { Y as BackofficeDashboardWidgetContent, Y as default };
437
+ export { U as BackofficeDashboardWidgetContent, U as default };
471
438
 
472
439
  //# sourceMappingURL=BackofficeDashboardWidgetContent.js.map