@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.
- package/README.md +7 -0
- package/lib/esm/components/backoffice/filters/BackofficeFilterAction.js +23 -20
- package/lib/esm/components/backoffice/filters/BackofficeFilterAction.js.map +1 -1
- package/lib/esm/components/backoffice/layout/breadcrumb/buildBreadcrumbs.js.map +1 -1
- package/lib/esm/components/backoffice/links/BackofficeInlineLink.js +19 -9
- package/lib/esm/components/backoffice/links/BackofficeInlineLink.js.map +1 -1
- package/lib/esm/components/backoffice/links/BackofficeLink.js +12 -8
- package/lib/esm/components/backoffice/links/BackofficeLink.js.map +1 -1
- package/lib/esm/components/backoffice/links/resolveBackofficeLink.js +64 -45
- package/lib/esm/components/backoffice/links/resolveBackofficeLink.js.map +1 -1
- package/lib/esm/components/backoffice/refs/BackofficeRelatedCountLink.js +30 -61
- package/lib/esm/components/backoffice/refs/BackofficeRelatedCountLink.js.map +1 -1
- package/lib/esm/components/backoffice/scaffolds/BackofficeEntityListScaffold.js +1 -4
- package/lib/esm/components/backoffice/scaffolds/BackofficeEntityListScaffold.js.map +1 -1
- package/lib/esm/components/backoffice/scaffolds/BackofficeListFilterContext.js +18 -27
- package/lib/esm/components/backoffice/scaffolds/BackofficeListFilterContext.js.map +1 -1
- package/lib/esm/hooks/useBackofficeListUrlState.js +27 -24
- package/lib/esm/hooks/useBackofficeListUrlState.js.map +1 -1
- package/lib/esm/pages/BackofficeDashboardWidgetContent.js +194 -227
- package/lib/esm/pages/BackofficeDashboardWidgetContent.js.map +1 -1
- package/lib/esm/pages/BackofficeEntityDetailLayoutPage.js +107 -120
- package/lib/esm/pages/BackofficeEntityDetailLayoutPage.js.map +1 -1
- package/lib/esm/pages/BackofficeEntityListDataPage.js +2 -8
- package/lib/esm/pages/BackofficeEntityListDataPage.js.map +1 -1
- package/lib/esm/pages/resolveDashboardTargetDestination.js +17 -0
- package/lib/esm/pages/resolveDashboardTargetDestination.js.map +1 -0
- package/lib/esm/router/createBackofficeRoutes.js +88 -99
- package/lib/esm/router/createBackofficeRoutes.js.map +1 -1
- package/lib/types/components/backoffice/filters/BackofficeFilterAction.d.ts.map +1 -1
- package/lib/types/components/backoffice/layout/breadcrumb/buildBreadcrumbs.d.ts +3 -3
- package/lib/types/components/backoffice/layout/breadcrumb/buildBreadcrumbs.d.ts.map +1 -1
- package/lib/types/components/backoffice/links/BackofficeInlineLink.d.ts.map +1 -1
- package/lib/types/components/backoffice/links/BackofficeLink.d.ts.map +1 -1
- package/lib/types/components/backoffice/links/resolveBackofficeLink.d.ts.map +1 -1
- package/lib/types/components/backoffice/links/types.d.ts +19 -15
- package/lib/types/components/backoffice/links/types.d.ts.map +1 -1
- package/lib/types/components/backoffice/refs/BackofficeRelatedCountLink.d.ts.map +1 -1
- package/lib/types/components/backoffice/scaffolds/BackofficeEntityListScaffold.d.ts.map +1 -1
- package/lib/types/components/backoffice/scaffolds/BackofficeListFilterContext.d.ts +0 -4
- package/lib/types/components/backoffice/scaffolds/BackofficeListFilterContext.d.ts.map +1 -1
- package/lib/types/hooks/useBackofficeListUrlState.d.ts.map +1 -1
- package/lib/types/index.d.ts +1 -1
- package/lib/types/index.d.ts.map +1 -1
- package/lib/types/pages/BackofficeDashboardWidgetContent.d.ts.map +1 -1
- package/lib/types/pages/BackofficeEntityDetailLayoutPage.d.ts.map +1 -1
- package/lib/types/pages/BackofficeEntityListDataPage.d.ts.map +1 -1
- package/lib/types/pages/resolveDashboardTargetDestination.d.ts +5 -0
- package/lib/types/pages/resolveDashboardTargetDestination.d.ts.map +1 -0
- package/lib/types/router/createBackofficeRoutes.d.ts +0 -2
- package/lib/types/router/createBackofficeRoutes.d.ts.map +1 -1
- 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
|
|
8
|
-
import { jsx as
|
|
9
|
-
import { useTranslation as
|
|
10
|
-
import * as
|
|
11
|
-
import { BackofficeEmptyState as
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
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:
|
|
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
|
-
} },
|
|
31
|
+
} }, O = (e, t) => typeof e.variables == "function" ? e.variables(t) : e.variables, k = () => {
|
|
33
32
|
let { t } = e();
|
|
34
|
-
return /* @__PURE__ */
|
|
35
|
-
},
|
|
36
|
-
let { entities:
|
|
37
|
-
return
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
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
|
-
|
|
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
|
-
},
|
|
83
|
-
let { t: n } =
|
|
84
|
-
return /* @__PURE__ */
|
|
85
|
-
emptyState: /* @__PURE__ */
|
|
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
|
-
|
|
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
|
-
},
|
|
94
|
-
let { t: n } =
|
|
95
|
-
return /* @__PURE__ */
|
|
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__ */
|
|
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
|
-
|
|
69
|
+
destination: r(e.target, e.href) ?? { pathname: "#" },
|
|
103
70
|
label: t
|
|
104
71
|
};
|
|
105
72
|
})
|
|
106
73
|
});
|
|
107
|
-
},
|
|
108
|
-
let { t: n } =
|
|
109
|
-
return /* @__PURE__ */
|
|
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
|
-
|
|
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
|
-
},
|
|
123
|
-
let { t: n } =
|
|
124
|
-
return t.value == null ? /* @__PURE__ */
|
|
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
|
-
|
|
98
|
+
destination: a(t.target, t.href)
|
|
132
99
|
});
|
|
133
|
-
},
|
|
134
|
-
let { t: n } =
|
|
135
|
-
return /* @__PURE__ */
|
|
136
|
-
emptyState: /* @__PURE__ */
|
|
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
|
-
|
|
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
|
-
},
|
|
147
|
-
let { t: r } =
|
|
148
|
-
return /* @__PURE__ */
|
|
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
|
-
},
|
|
158
|
-
let { t: n } =
|
|
159
|
-
return /* @__PURE__ */
|
|
160
|
-
emptyState: /* @__PURE__ */
|
|
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
|
-
|
|
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
|
-
},
|
|
171
|
-
let { t } =
|
|
172
|
-
return e == null ? /* @__PURE__ */
|
|
173
|
-
|
|
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
|
-
},
|
|
184
|
-
let { t: n } =
|
|
185
|
-
return /* @__PURE__ */
|
|
186
|
-
emptyState: /* @__PURE__ */
|
|
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
|
-
|
|
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
|
-
},
|
|
200
|
-
let { t:
|
|
201
|
-
if (
|
|
202
|
-
let e = i(
|
|
203
|
-
return /* @__PURE__ */
|
|
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__ */
|
|
173
|
+
children: /* @__PURE__ */ c("div", {
|
|
207
174
|
className: a,
|
|
208
175
|
children: t
|
|
209
176
|
})
|
|
210
177
|
});
|
|
211
178
|
}
|
|
212
|
-
if (
|
|
213
|
-
let e = b[
|
|
214
|
-
return e == null ? /* @__PURE__ */
|
|
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__ */
|
|
218
|
-
}) : e.kind === "tool" ? /* @__PURE__ */
|
|
184
|
+
children: /* @__PURE__ */ c(k, {})
|
|
185
|
+
}) : e.kind === "tool" ? /* @__PURE__ */ c(p, {
|
|
219
186
|
title: t,
|
|
220
187
|
subtitle: x,
|
|
221
|
-
children: /* @__PURE__ */
|
|
188
|
+
children: /* @__PURE__ */ c(m, { actions: [{
|
|
222
189
|
id: e.id,
|
|
223
|
-
|
|
190
|
+
destination: { pathname: e.routes.list },
|
|
224
191
|
label: y("dashboard.actions.openTool")
|
|
225
192
|
}] })
|
|
226
|
-
}) : /* @__PURE__ */
|
|
193
|
+
}) : /* @__PURE__ */ c(p, {
|
|
227
194
|
title: t,
|
|
228
195
|
subtitle: x,
|
|
229
|
-
children: /* @__PURE__ */
|
|
196
|
+
children: /* @__PURE__ */ c(m, { actions: [{
|
|
230
197
|
id: e.id,
|
|
231
|
-
|
|
198
|
+
destination: { pathname: e.routes.list },
|
|
232
199
|
label: y("dashboard.actions.openList")
|
|
233
200
|
}] })
|
|
234
201
|
});
|
|
235
202
|
}
|
|
236
|
-
if (
|
|
203
|
+
if (f.kind === "tablePreview") {
|
|
237
204
|
let e = S();
|
|
238
|
-
if (e == null) return /* @__PURE__ */
|
|
239
|
-
title: i(
|
|
205
|
+
if (e == null) return /* @__PURE__ */ c(p, {
|
|
206
|
+
title: i(f.title, v),
|
|
240
207
|
subtitle: x,
|
|
241
|
-
children: /* @__PURE__ */
|
|
208
|
+
children: /* @__PURE__ */ c(k, {})
|
|
242
209
|
});
|
|
243
210
|
let t = r(e.columns, {
|
|
244
|
-
tApp:
|
|
211
|
+
tApp: v,
|
|
245
212
|
t: y
|
|
246
|
-
}), n = i(
|
|
247
|
-
return /* @__PURE__ */
|
|
213
|
+
}), n = i(f.title, v);
|
|
214
|
+
return /* @__PURE__ */ c(p, {
|
|
248
215
|
title: n,
|
|
249
216
|
subtitle: x,
|
|
250
|
-
children: /* @__PURE__ */
|
|
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 (
|
|
230
|
+
if (f.kind === "metricGroup") {
|
|
264
231
|
let e = S();
|
|
265
|
-
return e == null ? /* @__PURE__ */
|
|
232
|
+
return e == null ? /* @__PURE__ */ c(k, {}) : /* @__PURE__ */ c(j, { metrics: e });
|
|
266
233
|
}
|
|
267
|
-
if (
|
|
268
|
-
let e = S(), t =
|
|
269
|
-
return e == null ? /* @__PURE__ */
|
|
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__ */
|
|
273
|
-
}) : /* @__PURE__ */
|
|
239
|
+
children: /* @__PURE__ */ c(k, {})
|
|
240
|
+
}) : /* @__PURE__ */ c(p, {
|
|
274
241
|
title: t,
|
|
275
242
|
subtitle: x,
|
|
276
|
-
children: /* @__PURE__ */
|
|
243
|
+
children: /* @__PURE__ */ c(P, { metric: e })
|
|
277
244
|
});
|
|
278
245
|
}
|
|
279
|
-
if (
|
|
280
|
-
let e = S(), t =
|
|
281
|
-
return e == null ? /* @__PURE__ */
|
|
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__ */
|
|
285
|
-
}) : /* @__PURE__ */
|
|
251
|
+
children: /* @__PURE__ */ c(k, {})
|
|
252
|
+
}) : /* @__PURE__ */ c(p, {
|
|
286
253
|
title: t,
|
|
287
254
|
subtitle: x,
|
|
288
|
-
children: /* @__PURE__ */
|
|
255
|
+
children: /* @__PURE__ */ c(F, { gauge: e })
|
|
289
256
|
});
|
|
290
257
|
}
|
|
291
|
-
if (
|
|
292
|
-
let e = S(), t =
|
|
293
|
-
return e == null ? /* @__PURE__ */
|
|
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__ */
|
|
297
|
-
}) : /* @__PURE__ */
|
|
263
|
+
children: /* @__PURE__ */ c(k, {})
|
|
264
|
+
}) : /* @__PURE__ */ c(p, {
|
|
298
265
|
title: t,
|
|
299
266
|
subtitle: x,
|
|
300
|
-
children: /* @__PURE__ */
|
|
267
|
+
children: /* @__PURE__ */ c(I, { items: e })
|
|
301
268
|
});
|
|
302
269
|
}
|
|
303
|
-
if (
|
|
304
|
-
let e = S(), t =
|
|
305
|
-
return e == null ? /* @__PURE__ */
|
|
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__ */
|
|
309
|
-
}) : /* @__PURE__ */
|
|
275
|
+
children: /* @__PURE__ */ c(k, {})
|
|
276
|
+
}) : /* @__PURE__ */ c(p, {
|
|
310
277
|
title: t,
|
|
311
278
|
subtitle: x,
|
|
312
|
-
children: /* @__PURE__ */
|
|
313
|
-
ariaLabel:
|
|
314
|
-
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 (
|
|
320
|
-
let e = S(), t =
|
|
321
|
-
return e == null ? /* @__PURE__ */
|
|
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__ */
|
|
325
|
-
}) : /* @__PURE__ */
|
|
291
|
+
children: /* @__PURE__ */ c(k, {})
|
|
292
|
+
}) : /* @__PURE__ */ c(p, {
|
|
326
293
|
title: t,
|
|
327
294
|
subtitle: x,
|
|
328
|
-
children: /* @__PURE__ */
|
|
295
|
+
children: /* @__PURE__ */ c(R, { items: e })
|
|
329
296
|
});
|
|
330
297
|
}
|
|
331
|
-
if (
|
|
332
|
-
let e = S(), t =
|
|
333
|
-
return /* @__PURE__ */
|
|
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__ */
|
|
303
|
+
children: /* @__PURE__ */ c(z, { item: e })
|
|
337
304
|
});
|
|
338
305
|
}
|
|
339
|
-
if (
|
|
340
|
-
let e = S(), t =
|
|
341
|
-
return e == null ? /* @__PURE__ */
|
|
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__ */
|
|
345
|
-
}) : /* @__PURE__ */
|
|
311
|
+
children: /* @__PURE__ */ c(k, {})
|
|
312
|
+
}) : /* @__PURE__ */ c(p, {
|
|
346
313
|
title: t,
|
|
347
314
|
subtitle: x,
|
|
348
|
-
children: /* @__PURE__ */
|
|
315
|
+
children: /* @__PURE__ */ c(B, { rows: e })
|
|
349
316
|
});
|
|
350
317
|
}
|
|
351
|
-
if (
|
|
352
|
-
let e = S(), t = i(
|
|
353
|
-
return e == null ? /* @__PURE__ */
|
|
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__ */
|
|
357
|
-
}) : /* @__PURE__ */
|
|
323
|
+
children: /* @__PURE__ */ c(k, {})
|
|
324
|
+
}) : /* @__PURE__ */ c(p, {
|
|
358
325
|
title: t,
|
|
359
326
|
subtitle: x,
|
|
360
|
-
children: /* @__PURE__ */
|
|
361
|
-
ariaLabel: i(
|
|
327
|
+
children: /* @__PURE__ */ c(n, {
|
|
328
|
+
ariaLabel: i(f.ariaLabel, v),
|
|
362
329
|
buckets: e.buckets,
|
|
363
|
-
categories:
|
|
330
|
+
categories: f.categories.map((e) => ({
|
|
364
331
|
id: e.id,
|
|
365
|
-
label: i(e.label,
|
|
332
|
+
label: i(e.label, v),
|
|
366
333
|
color: e.color
|
|
367
334
|
})),
|
|
368
335
|
currency: e.currency,
|
|
369
|
-
emptyLabel: i(
|
|
336
|
+
emptyLabel: i(f.emptyLabel, v),
|
|
370
337
|
from: e.from,
|
|
371
|
-
rangePrefix: i(
|
|
338
|
+
rangePrefix: i(f.rangePrefix, v),
|
|
372
339
|
to: e.to,
|
|
373
340
|
totalAmount: e.totalAmount
|
|
374
341
|
})
|
|
375
342
|
});
|
|
376
343
|
}
|
|
377
|
-
if (
|
|
378
|
-
let e =
|
|
379
|
-
return /* @__PURE__ */
|
|
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__ */
|
|
383
|
-
layout:
|
|
384
|
-
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 (
|
|
389
|
-
title: i(
|
|
355
|
+
if (f.kind === "windowControl") return /* @__PURE__ */ c(p, {
|
|
356
|
+
title: i(f.title, v),
|
|
390
357
|
subtitle: x,
|
|
391
|
-
children: /* @__PURE__ */
|
|
392
|
-
activePresetId: s ??
|
|
358
|
+
children: /* @__PURE__ */ c(w, {
|
|
359
|
+
activePresetId: s ?? d.window.id,
|
|
393
360
|
onChange: (e) => {
|
|
394
|
-
|
|
361
|
+
g?.(e);
|
|
395
362
|
},
|
|
396
|
-
presets:
|
|
363
|
+
presets: _.map((e) => ({
|
|
397
364
|
id: e.id,
|
|
398
|
-
label: i(e.label,
|
|
365
|
+
label: i(e.label, v)
|
|
399
366
|
}))
|
|
400
367
|
})
|
|
401
368
|
});
|
|
402
|
-
if (
|
|
369
|
+
if (f.kind === "statusSummary") {
|
|
403
370
|
let e = S();
|
|
404
371
|
if (e == null) {
|
|
405
|
-
let e =
|
|
406
|
-
return /* @__PURE__ */
|
|
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__ */
|
|
376
|
+
children: /* @__PURE__ */ c(k, {})
|
|
410
377
|
});
|
|
411
378
|
}
|
|
412
|
-
let t =
|
|
413
|
-
return /* @__PURE__ */
|
|
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__ */
|
|
383
|
+
children: /* @__PURE__ */ c(M, { items: e })
|
|
417
384
|
});
|
|
418
385
|
}
|
|
419
|
-
if (
|
|
420
|
-
let e =
|
|
421
|
-
return /* @__PURE__ */
|
|
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__ */
|
|
391
|
+
children: /* @__PURE__ */ c(k, {})
|
|
425
392
|
});
|
|
426
393
|
}
|
|
427
|
-
let C = b[
|
|
428
|
-
if (C?.kind !== "list-detail") return /* @__PURE__ */
|
|
429
|
-
title: i(
|
|
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__ */
|
|
398
|
+
children: /* @__PURE__ */ c(k, {})
|
|
432
399
|
});
|
|
433
|
-
let
|
|
434
|
-
typeof
|
|
435
|
-
let
|
|
436
|
-
return /* @__PURE__ */
|
|
437
|
-
title:
|
|
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__ */
|
|
406
|
+
children: /* @__PURE__ */ l("div", {
|
|
440
407
|
className: a,
|
|
441
|
-
children: [/* @__PURE__ */
|
|
408
|
+
children: [/* @__PURE__ */ c("div", {
|
|
442
409
|
className: o,
|
|
443
|
-
children:
|
|
444
|
-
}), /* @__PURE__ */
|
|
410
|
+
children: O
|
|
411
|
+
}), /* @__PURE__ */ c(N, { actions: [{
|
|
445
412
|
id: C.id,
|
|
446
|
-
href:
|
|
447
|
-
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
|
-
},
|
|
453
|
-
let a =
|
|
454
|
-
return /* @__PURE__ */
|
|
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
|
-
},
|
|
429
|
+
}, U = (e) => {
|
|
463
430
|
let { widget: t } = e;
|
|
464
|
-
return t.dataSource === "query" ? /* @__PURE__ */
|
|
431
|
+
return t.dataSource === "query" ? /* @__PURE__ */ c(H, {
|
|
465
432
|
...e,
|
|
466
433
|
widget: t
|
|
467
|
-
}) : /* @__PURE__ */
|
|
434
|
+
}) : /* @__PURE__ */ c(V, { ...e });
|
|
468
435
|
};
|
|
469
436
|
//#endregion
|
|
470
|
-
export {
|
|
437
|
+
export { U as BackofficeDashboardWidgetContent, U as default };
|
|
471
438
|
|
|
472
439
|
//# sourceMappingURL=BackofficeDashboardWidgetContent.js.map
|