@gen-epix/ui-client-casedb 4.2.0 → 4.3.1
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/dist/_chunks/CaseInfoDialog.js +40 -39
- package/dist/_chunks/CaseInfoDialog.js.map +1 -1
- package/dist/_chunks/Dashboard.js +613 -667
- package/dist/_chunks/Dashboard.js.map +1 -1
- package/dist/_chunks/LegendaItem.js.map +1 -1
- package/dist/_chunks/LineListWidget.js +138 -136
- package/dist/_chunks/LineListWidget.js.map +1 -1
- package/dist/_chunks/UploadUtil.js +4 -6
- package/dist/_chunks/UploadUtil.js.map +1 -1
- package/dist/_chunks/_baseClone.js +1 -1
- package/dist/_chunks/_baseClone.js.map +1 -1
- package/dist/_chunks/cloneDeep.js +1 -1
- package/dist/_chunks/cloneDeep.js.map +1 -1
- package/dist/_chunks/esm.js +93 -101
- package/dist/_chunks/esm.js.map +1 -1
- package/dist/_chunks/react.js +1 -1
- package/dist/_chunks/react.js.map +1 -1
- package/dist/_chunks/shallow.js +2 -2
- package/dist/_chunks/shallow.js.map +1 -1
- package/dist/_chunks/sync.js +4 -4
- package/dist/_chunks/sync.js.map +1 -1
- package/dist/_chunks/vanilla.js +1 -1
- package/dist/_chunks/vanilla.js.map +1 -1
- package/dist/_chunks/yup.js +2 -2
- package/dist/_chunks/yup.js.map +1 -1
- package/dist/components/ui/ContextMenu/index.js +1 -1
- package/dist/components/ui/ContextMenu/index.js.map +1 -1
- package/dist/components/ui/CreateEventDialog/index.js +1 -1
- package/dist/components/ui/CreateEventDialog/index.js.map +1 -1
- package/dist/components/ui/HistogramWidget/index.js +161 -162
- package/dist/components/ui/HistogramWidget/index.js.map +1 -1
- package/dist/components/ui/PanelSeparator/index.js +50 -2
- package/dist/components/ui/PanelSeparator/index.js.map +1 -0
- package/dist/locale/en.json +6 -0
- package/dist/locale/nl.json +7 -1
- package/dist/pages/CasesDetailPage/index.js +16 -16
- package/dist/pages/ColsAdminPage/index.js +77 -77
- package/dist/pages/ColsAdminPage/index.js.map +1 -1
- package/dist/pages/ConceptsAdminPage/index.js +31 -31
- package/dist/pages/DataCollectionVisualizationPage/index.js +1 -1
- package/dist/pages/DataCollectionVisualizationPage/index.js.map +1 -1
- package/dist/pages/DimsAdminPage/index.js +46 -46
- package/dist/pages/EventsDetailPage/index.js +18 -18
- package/dist/pages/OrganizationAccessCasePoliciesAdminPage/index.js +120 -86
- package/dist/pages/OrganizationAccessCasePoliciesAdminPage/index.js.map +1 -1
- package/dist/pages/RefColsAdminPage/index.js +94 -94
- package/dist/pages/RegionSetShapesAdminPage/index.js +26 -26
- package/dist/pages/RegionsAdminPage/index.js +33 -33
- package/dist/pages/UserEffectiveRightsAdminPage/index.js +56 -56
- package/dist/pages/UserEffectiveRightsAdminPage/index.js.map +1 -1
- package/dist/pages/UserEffectiveRightsTesterAdminPage/index.js +45 -45
- package/dist/pages/UserEffectiveRightsTesterAdminPage/index.js.map +1 -1
- package/dist/routes/index.js +93 -91
- package/dist/routes/index.js.map +1 -1
- package/dist/setup/setup.js +2 -3
- package/dist/setup/setup.js.map +1 -1
- package/dist/utils/CaseDbStandardConfigUtil/index.js +1 -5
- package/dist/utils/CaseDbStandardConfigUtil/index.js.map +1 -1
- package/dist/utils/MapUtil/index.js +1 -1
- package/dist/utils/MapUtil/index.js.map +1 -1
- package/package.json +36 -31
- package/dist/_chunks/PanelSeparator.js +0 -1666
- package/dist/_chunks/PanelSeparator.js.map +0 -1
- package/dist/_chunks/chunk-BV7QT456.js +0 -1162
- package/dist/_chunks/chunk-BV7QT456.js.map +0 -1
|
@@ -24,79 +24,80 @@ import { Grouping as C } from "../components/ui/Grouping/index.js";
|
|
|
24
24
|
import { t as w } from "./FindSimilarCasesDialog.js";
|
|
25
25
|
import { t as T } from "./userProfileStoreContext.js";
|
|
26
26
|
import { ArrangementEditor as E } from "../components/form/fields/ArrangementEditor/index.js";
|
|
27
|
-
import {
|
|
28
|
-
import { WidgetHeaderIconButton as
|
|
29
|
-
import { WidgetMenu as
|
|
30
|
-
import { Warning as
|
|
31
|
-
import { StringUtil as
|
|
32
|
-
import { ConfigService as
|
|
33
|
-
import { Alert as
|
|
34
|
-
import {
|
|
35
|
-
import { useTranslation as
|
|
36
|
-
import { Fragment as
|
|
37
|
-
import { ResponseHandler as
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
40
|
-
import {
|
|
41
|
-
import {
|
|
42
|
-
import {
|
|
43
|
-
import {
|
|
44
|
-
import {
|
|
45
|
-
import
|
|
46
|
-
import
|
|
47
|
-
import {
|
|
48
|
-
import {
|
|
49
|
-
import {
|
|
50
|
-
import
|
|
51
|
-
import
|
|
52
|
-
import
|
|
53
|
-
import
|
|
54
|
-
import
|
|
55
|
-
import {
|
|
56
|
-
import
|
|
57
|
-
import
|
|
58
|
-
import
|
|
59
|
-
import
|
|
60
|
-
import
|
|
61
|
-
import
|
|
62
|
-
import
|
|
63
|
-
import
|
|
64
|
-
import
|
|
65
|
-
import
|
|
66
|
-
import
|
|
27
|
+
import { PanelSeparatorHorizontal as ee, PanelSeparatorVertical as te } from "../components/ui/PanelSeparator/index.js";
|
|
28
|
+
import { WidgetHeaderIconButton as D } from "../components/ui/WidgetHeaderIconButton/index.js";
|
|
29
|
+
import { WidgetMenu as O } from "../components/ui/WidgetMenu/index.js";
|
|
30
|
+
import { Warning as k } from "../components/ui/Warning/index.js";
|
|
31
|
+
import { StringUtil as ne } from "@gen-epix/ui-core/utils/StringUtil";
|
|
32
|
+
import { ConfigService as A } from "@gen-epix/ui-client-common/classes/services/ConfigService";
|
|
33
|
+
import { Alert as re, AlertTitle as ie, Box as j, Button as M, ClickAwayListener as N, Divider as ae, FormGroup as P, IconButton as F, InputAdornment as oe, Link as se, ListItemIcon as ce, ListItemText as le, Menu as I, MenuItem as ue, MenuList as de, OutlinedInput as fe, Paper as pe, Popper as me, Tooltip as he, Typography as L, styled as ge, useTheme as _e } from "@mui/material";
|
|
34
|
+
import { Fragment as ve, createContext as ye, createElement as be, isValidElement as xe, use as R, useCallback as z, useEffect as B, useId as Se, useImperativeHandle as Ce, useMemo as V, useRef as H, useState as U } from "react";
|
|
35
|
+
import { useTranslation as W } from "react-i18next";
|
|
36
|
+
import { Fragment as we, jsx as G, jsxs as K } from "react/jsx-runtime";
|
|
37
|
+
import { ResponseHandler as Te } from "@gen-epix/ui-client-common/components/ui/ResponseHandler";
|
|
38
|
+
import { STEPPER_DIRECTION as Ee, Stepper as De } from "@gen-epix/ui-core-components/components/Stepper";
|
|
39
|
+
import { FormProvider as Oe, useForm as ke, useWatch as Ae } from "react-hook-form";
|
|
40
|
+
import { GenericForm as je } from "@gen-epix/ui-core-form/components/helpers/GenericForm";
|
|
41
|
+
import { TableFiltersSidebarItem as Me, TableFiltersSidebarItemIcon as Ne } from "@gen-epix/ui-client-common/components/ui/Table";
|
|
42
|
+
import { withDialog as Pe } from "@gen-epix/ui-core-components/hoc/withDialog";
|
|
43
|
+
import { TestIdUtil as q } from "@gen-epix/ui-core/utils/TestIdUtil";
|
|
44
|
+
import { FormUtil as Fe } from "@gen-epix/ui-core-form/utils/FormUtil";
|
|
45
|
+
import Ie from "@mui/icons-material/Info";
|
|
46
|
+
import { EpiContactDetailsDialog as Le } from "@gen-epix/ui-client-common/components/epi/EpiContactDetailsDialog";
|
|
47
|
+
import { SidebarItem as Re, SidebarMenu as ze, SidebarMenuItem as Be } from "@gen-epix/ui-client-common/components/ui/Sidebar";
|
|
48
|
+
import { KeyboardShortcutService as Ve } from "@gen-epix/ui-core/classes/services/KeyboardShortcutService";
|
|
49
|
+
import { Spinner as He } from "@gen-epix/ui-core-components/components/Spinner";
|
|
50
|
+
import Ue from "@mui/icons-material/Download";
|
|
51
|
+
import { NestedDropdown as We } from "@gen-epix/ui-core-components/components/NestedMenu";
|
|
52
|
+
import Ge from "@mui/icons-material/Settings";
|
|
53
|
+
import Ke from "@mui/icons-material/RestartAlt";
|
|
54
|
+
import { Switch as qe } from "@gen-epix/ui-core-form/components/fields/Switch";
|
|
55
|
+
import { ErrorBoundary as Je } from "react-error-boundary";
|
|
56
|
+
import { Group as Ye, Panel as Xe, useDefaultLayout as J, useGroupRef as Y } from "react-resizable-panels";
|
|
57
|
+
import Ze from "@mui/icons-material/Widgets";
|
|
58
|
+
import Qe from "@mui/icons-material/Search";
|
|
59
|
+
import $e from "@mui/icons-material/KeyboardArrowUp";
|
|
60
|
+
import et from "@mui/icons-material/KeyboardArrowDown";
|
|
61
|
+
import tt from "@mui/icons-material/Tune";
|
|
62
|
+
import nt from "@mui/icons-material/Close";
|
|
63
|
+
import rt from "@mui/icons-material/Check";
|
|
64
|
+
import { Subject as it } from "@gen-epix/ui-core/classes/Subject";
|
|
65
|
+
import at from "@mui/icons-material/ZoomInMap";
|
|
66
|
+
import ot from "@mui/icons-material/ZoomOutMap";
|
|
67
|
+
import { MenuDataUtil as st } from "@gen-epix/ui-client-common/utils/MenuDataUtil";
|
|
67
68
|
//#region src/components/ui/RemoveFindSimilarCasesResultDialog/RemoveFindSimilarCasesResultDialog.tsx
|
|
68
|
-
var
|
|
69
|
-
let { t: a } =
|
|
70
|
-
|
|
69
|
+
var ct = Pe(({ onActionsChange: e, onClose: t, onTitleChange: n, openProps: i }) => {
|
|
70
|
+
let { t: a } = W(), l = Se(), u = R(c), d = o(u, (e) => e.setFindSimilarCasesResults), f = V(() => r.getTreeConfigurations(i.completeCaseType), [i.completeCaseType]), p = o(u, (e) => e.findSimilarCasesResults), [m, h] = U(p);
|
|
71
|
+
B(() => {
|
|
71
72
|
n(a`Remove similar cases from results`);
|
|
72
73
|
}, [a, n]);
|
|
73
|
-
let g =
|
|
74
|
+
let g = z(() => {
|
|
74
75
|
d(m), t();
|
|
75
76
|
}, [
|
|
76
77
|
d,
|
|
77
78
|
m,
|
|
78
79
|
t
|
|
79
|
-
]), _ =
|
|
80
|
+
]), _ = z(() => {
|
|
80
81
|
h(p);
|
|
81
|
-
}, [p]), v =
|
|
82
|
+
}, [p]), v = z(() => {
|
|
82
83
|
d([]), t();
|
|
83
84
|
}, [d, t]);
|
|
84
|
-
|
|
85
|
+
B(() => {
|
|
85
86
|
let n = [];
|
|
86
87
|
n.push({
|
|
87
|
-
...
|
|
88
|
+
...q.createAttributes("RemoveFindSimilarCasesResultDialog-closeButton"),
|
|
88
89
|
color: "primary",
|
|
89
90
|
label: a`Close`,
|
|
90
91
|
onClick: t,
|
|
91
92
|
variant: "outlined"
|
|
92
93
|
}), p.length !== m.length && n.push({
|
|
93
|
-
...
|
|
94
|
+
...q.createAttributes("RemoveFindSimilarCasesResultDialog-undoButton"),
|
|
94
95
|
color: "secondary",
|
|
95
96
|
label: a`Undo`,
|
|
96
97
|
onClick: _,
|
|
97
98
|
variant: "outlined"
|
|
98
99
|
}), p.length !== m.length && n.push({
|
|
99
|
-
...
|
|
100
|
+
...q.createAttributes("RemoveFindSimilarCasesResultDialog-applyButton"),
|
|
100
101
|
color: "secondary",
|
|
101
102
|
label: a`Apply and close`,
|
|
102
103
|
onClick: g,
|
|
@@ -112,15 +113,15 @@ var ut = ze(({ onActionsChange: e, onClose: t, onTitleChange: n, openProps: i })
|
|
|
112
113
|
g,
|
|
113
114
|
_
|
|
114
115
|
]);
|
|
115
|
-
let y =
|
|
116
|
+
let y = z((e) => {
|
|
116
117
|
h(s(m, (t) => (t.splice(e, 1), t)));
|
|
117
|
-
}, [m]), b =
|
|
118
|
-
content: /* @__PURE__ */
|
|
118
|
+
}, [m]), b = V(() => [{
|
|
119
|
+
content: /* @__PURE__ */ G(j, {
|
|
119
120
|
sx: {
|
|
120
121
|
marginBottom: 2,
|
|
121
122
|
marginTop: 1
|
|
122
123
|
},
|
|
123
|
-
children: /* @__PURE__ */
|
|
124
|
+
children: /* @__PURE__ */ G(M, {
|
|
124
125
|
color: "primary",
|
|
125
126
|
onClick: v,
|
|
126
127
|
variant: "outlined",
|
|
@@ -131,32 +132,32 @@ var ut = ze(({ onActionsChange: e, onClose: t, onTitleChange: n, openProps: i })
|
|
|
131
132
|
key: "start",
|
|
132
133
|
label: a("Result without similar cases ({{numberOfCases}} cases)", { numberOfCases: p?.[0]?.originalCaseIds.length || 0 })
|
|
133
134
|
}, ...m.map((e, t) => ({
|
|
134
|
-
content: /* @__PURE__ */
|
|
135
|
+
content: /* @__PURE__ */ K(j, { children: [/* @__PURE__ */ K(j, {
|
|
135
136
|
component: "ul",
|
|
136
137
|
children: [
|
|
137
|
-
/* @__PURE__ */
|
|
138
|
+
/* @__PURE__ */ G(j, {
|
|
138
139
|
component: "li",
|
|
139
140
|
children: a("Tree: {{treeLabel}}", { treeLabel: f.find((t) => t.col.id === e.colId)?.col?.label || e.colId })
|
|
140
141
|
}),
|
|
141
|
-
/* @__PURE__ */
|
|
142
|
+
/* @__PURE__ */ G(j, {
|
|
142
143
|
component: "li",
|
|
143
144
|
children: a("Distance: {{distance}}", { distance: e.distance })
|
|
144
145
|
}),
|
|
145
|
-
/* @__PURE__ */
|
|
146
|
+
/* @__PURE__ */ G(j, {
|
|
146
147
|
component: "li",
|
|
147
148
|
children: a("Found similar cases: {{foundCases}}", { foundCases: e.similarCaseIds.length })
|
|
148
149
|
}),
|
|
149
|
-
/* @__PURE__ */
|
|
150
|
+
/* @__PURE__ */ G(j, {
|
|
150
151
|
component: "li",
|
|
151
152
|
children: a("New number of cases: {{numberOfCases}}", { numberOfCases: e.similarCaseIds.length + e.originalCaseIds.length })
|
|
152
153
|
})
|
|
153
154
|
]
|
|
154
|
-
}), /* @__PURE__ */
|
|
155
|
+
}), /* @__PURE__ */ G(j, {
|
|
155
156
|
sx: {
|
|
156
157
|
marginBottom: 2,
|
|
157
158
|
marginTop: 1
|
|
158
159
|
},
|
|
159
|
-
children: /* @__PURE__ */
|
|
160
|
+
children: /* @__PURE__ */ G(M, {
|
|
160
161
|
color: "primary",
|
|
161
162
|
disabled: t !== m.length - 1,
|
|
162
163
|
onClick: () => y(t),
|
|
@@ -175,11 +176,11 @@ var ut = ze(({ onActionsChange: e, onClose: t, onTitleChange: n, openProps: i })
|
|
|
175
176
|
a,
|
|
176
177
|
f
|
|
177
178
|
]);
|
|
178
|
-
return /* @__PURE__ */
|
|
179
|
+
return /* @__PURE__ */ K(j, {
|
|
179
180
|
sx: { position: "relative" },
|
|
180
|
-
children: [b.length === 0 && /* @__PURE__ */
|
|
181
|
+
children: [b.length === 0 && /* @__PURE__ */ G(L, { children: a("No similar cases results to remove.") }), b.length > 0 && /* @__PURE__ */ G(De, {
|
|
181
182
|
activeStep: b[b.length - 1].key,
|
|
182
|
-
direction:
|
|
183
|
+
direction: Ee.VERTICAL,
|
|
183
184
|
hideCompletedIndicator: !0,
|
|
184
185
|
steps: b
|
|
185
186
|
})]
|
|
@@ -189,171 +190,171 @@ var ut = ze(({ onActionsChange: e, onClose: t, onTitleChange: n, openProps: i })
|
|
|
189
190
|
fullWidth: !0,
|
|
190
191
|
maxWidth: "lg",
|
|
191
192
|
testId: "RemoveFindSimilarCasesResultDialog"
|
|
192
|
-
}),
|
|
193
|
-
let { t: e } =
|
|
193
|
+
}), lt = () => {
|
|
194
|
+
let { t: e } = W(), t = R(T), n = o(t, d((e) => e.resetDashboardGeneralSettings)), r = o(t, d((e) => e.dashboardGeneralSettings)), i = o(t, d((e) => e.setDashboardGeneralSettings)), a = ke({
|
|
194
195
|
defaultValues: r,
|
|
195
196
|
values: r
|
|
196
|
-
}), { control: s } = a, c =
|
|
197
|
+
}), { control: s } = a, c = Ae({ control: s }), l = z(() => {
|
|
197
198
|
n();
|
|
198
199
|
}, [n]);
|
|
199
|
-
|
|
200
|
+
B(() => {
|
|
200
201
|
i(c);
|
|
201
202
|
}, [c, i]);
|
|
202
|
-
let u =
|
|
203
|
-
return /* @__PURE__ */
|
|
203
|
+
let u = z(() => {}, []);
|
|
204
|
+
return /* @__PURE__ */ K(Oe, {
|
|
204
205
|
...a,
|
|
205
|
-
children: [/* @__PURE__ */
|
|
206
|
+
children: [/* @__PURE__ */ G("form", {
|
|
206
207
|
autoComplete: "off",
|
|
207
208
|
onSubmit: u,
|
|
208
|
-
children: /* @__PURE__ */
|
|
209
|
+
children: /* @__PURE__ */ G(j, {
|
|
209
210
|
sx: { marginY: 1 },
|
|
210
|
-
children: /* @__PURE__ */
|
|
211
|
+
children: /* @__PURE__ */ G(P, { children: /* @__PURE__ */ G(qe, {
|
|
211
212
|
label: e`Enable highlighting across widgets`,
|
|
212
213
|
name: "isHighlightingEnabled"
|
|
213
214
|
}) })
|
|
214
215
|
})
|
|
215
|
-
}), /* @__PURE__ */
|
|
216
|
+
}), /* @__PURE__ */ G(j, {
|
|
216
217
|
sx: {
|
|
217
218
|
display: "flex",
|
|
218
219
|
justifyContent: "flex-end"
|
|
219
220
|
},
|
|
220
|
-
children: /* @__PURE__ */
|
|
221
|
+
children: /* @__PURE__ */ G(j, {
|
|
221
222
|
sx: { marginX: 1 },
|
|
222
|
-
children: /* @__PURE__ */
|
|
223
|
+
children: /* @__PURE__ */ G(M, {
|
|
223
224
|
color: "primary",
|
|
224
225
|
onClick: l,
|
|
225
|
-
startIcon: /* @__PURE__ */
|
|
226
|
+
startIcon: /* @__PURE__ */ G(Ke, {}),
|
|
226
227
|
variant: "outlined",
|
|
227
228
|
children: e`Reset general settings`
|
|
228
229
|
})
|
|
229
230
|
})
|
|
230
231
|
})]
|
|
231
232
|
});
|
|
232
|
-
},
|
|
233
|
-
let { t } =
|
|
233
|
+
}, ut = /* @__PURE__ */ e(t(), 1), dt = ({ onReset: e }) => {
|
|
234
|
+
let { t } = W(), n = R(T), r = o(n, d((e) => e.resetDashboardLayout)), a = o(n, d((e) => e.dashboardArrangementConfig)), s = o(n, d((e) => e.setDashboardArrangementConfig)), c = ke({ values: { arrangementKey: a.arrangementKey } }), { control: l } = c, u = Ae({ control: l }), f = z(() => {
|
|
234
235
|
r(), e && e();
|
|
235
236
|
}, [e, r]);
|
|
236
|
-
|
|
237
|
+
B(() => {
|
|
237
238
|
let { arrangementKey: e } = u;
|
|
238
239
|
if (!e) return;
|
|
239
|
-
let t =
|
|
240
|
+
let t = A.getInstance().config.dashboard.ARRANGEMENT_OPTIONS[e];
|
|
240
241
|
t && s({
|
|
241
242
|
arrangementKey: e,
|
|
242
|
-
arrangementWidgetAssignments: i.getArrangementWidgetAssignments(t,
|
|
243
|
+
arrangementWidgetAssignments: i.getArrangementWidgetAssignments(t, A.getInstance().config.dashboard.DEFAULT_WIDGET_ASSIGNMENTS[e])
|
|
243
244
|
});
|
|
244
245
|
}, [u, s]);
|
|
245
|
-
let p =
|
|
246
|
-
return /* @__PURE__ */
|
|
246
|
+
let p = ut.default;
|
|
247
|
+
return /* @__PURE__ */ K(Oe, {
|
|
247
248
|
...c,
|
|
248
|
-
children: [/* @__PURE__ */
|
|
249
|
+
children: [/* @__PURE__ */ G("form", {
|
|
249
250
|
autoComplete: "off",
|
|
250
251
|
onSubmit: p,
|
|
251
|
-
children: /* @__PURE__ */
|
|
252
|
+
children: /* @__PURE__ */ G(j, {
|
|
252
253
|
sx: { marginY: 1 },
|
|
253
|
-
children: /* @__PURE__ */
|
|
254
|
+
children: /* @__PURE__ */ G(P, { children: /* @__PURE__ */ G(E, {
|
|
254
255
|
label: t`Arrangement`,
|
|
255
256
|
name: "arrangementKey",
|
|
256
|
-
options:
|
|
257
|
+
options: A.getInstance().config.dashboard.ARRANGEMENT_OPTIONS
|
|
257
258
|
}) })
|
|
258
259
|
})
|
|
259
|
-
}), /* @__PURE__ */
|
|
260
|
+
}), /* @__PURE__ */ G(j, {
|
|
260
261
|
sx: {
|
|
261
262
|
display: "flex",
|
|
262
263
|
justifyContent: "flex-end"
|
|
263
264
|
},
|
|
264
|
-
children: /* @__PURE__ */
|
|
265
|
+
children: /* @__PURE__ */ G(j, {
|
|
265
266
|
sx: { marginX: 1 },
|
|
266
|
-
children: /* @__PURE__ */
|
|
267
|
+
children: /* @__PURE__ */ G(M, {
|
|
267
268
|
color: "primary",
|
|
268
269
|
onClick: f,
|
|
269
|
-
startIcon: /* @__PURE__ */
|
|
270
|
+
startIcon: /* @__PURE__ */ G(Ke, {}),
|
|
270
271
|
variant: "outlined",
|
|
271
272
|
children: t`Reset dashboard layout`
|
|
272
273
|
})
|
|
273
274
|
})
|
|
274
275
|
})]
|
|
275
276
|
});
|
|
276
|
-
},
|
|
277
|
-
let { t } =
|
|
278
|
-
if (s) return
|
|
279
|
-
}, [s]), u =
|
|
277
|
+
}, ft = ({ widgetName: e }) => {
|
|
278
|
+
let { t } = W(), n = R(T), r = Se(), i = o(n, d((e) => e.resetWidgetSettings)), a = o(n, d((e) => e.setWidgetSettings)), s = A.getInstance().config.dashboard.WIDGETS[e].configFormFieldsDefinitions, c = A.getInstance().config.dashboard.WIDGETS[e].configDefaultValues, l = V(() => {
|
|
279
|
+
if (s) return Fe.createYupSchemaFromFormFieldDefinitions(s);
|
|
280
|
+
}, [s]), u = ke({
|
|
280
281
|
defaultValues: c,
|
|
281
282
|
values: c
|
|
282
|
-
}), { control: f } = u, p =
|
|
283
|
+
}), { control: f } = u, p = Ae({ control: f }), m = z(() => {
|
|
283
284
|
i(e);
|
|
284
285
|
}, [i, e]);
|
|
285
|
-
|
|
286
|
+
B(() => {
|
|
286
287
|
a(e, p);
|
|
287
288
|
}, [
|
|
288
289
|
p,
|
|
289
290
|
a,
|
|
290
291
|
e
|
|
291
292
|
]);
|
|
292
|
-
let h =
|
|
293
|
-
return /* @__PURE__ */
|
|
293
|
+
let h = z(() => {}, []);
|
|
294
|
+
return /* @__PURE__ */ K(j, { children: [/* @__PURE__ */ G(j, {
|
|
294
295
|
sx: { marginY: 1 },
|
|
295
|
-
children: /* @__PURE__ */
|
|
296
|
+
children: /* @__PURE__ */ G(je, {
|
|
296
297
|
formFieldDefinitions: s,
|
|
297
298
|
formId: r,
|
|
298
299
|
formMethods: u,
|
|
299
300
|
onSubmit: h,
|
|
300
301
|
schema: l
|
|
301
302
|
})
|
|
302
|
-
}), /* @__PURE__ */
|
|
303
|
+
}), /* @__PURE__ */ G(j, {
|
|
303
304
|
sx: {
|
|
304
305
|
display: "flex",
|
|
305
306
|
justifyContent: "flex-end"
|
|
306
307
|
},
|
|
307
|
-
children: /* @__PURE__ */
|
|
308
|
+
children: /* @__PURE__ */ G(j, {
|
|
308
309
|
sx: { marginX: 1 },
|
|
309
|
-
children: /* @__PURE__ */
|
|
310
|
+
children: /* @__PURE__ */ G(M, {
|
|
310
311
|
color: "primary",
|
|
311
312
|
onClick: m,
|
|
312
|
-
startIcon: /* @__PURE__ */
|
|
313
|
+
startIcon: /* @__PURE__ */ G(Ke, {}),
|
|
313
314
|
variant: "outlined",
|
|
314
315
|
children: t("Reset {widgetName} settings", { widgetName: e })
|
|
315
316
|
})
|
|
316
317
|
})
|
|
317
318
|
})] });
|
|
318
|
-
},
|
|
319
|
-
let t =
|
|
319
|
+
}, pt = Ge, mt = ({ onReset: e }) => {
|
|
320
|
+
let t = _e(), { t: n } = W(), r = V(() => {
|
|
320
321
|
let t = [{
|
|
321
|
-
component: /* @__PURE__ */
|
|
322
|
+
component: /* @__PURE__ */ G(dt, { onReset: e }),
|
|
322
323
|
label: n`Dashboard layout`
|
|
323
324
|
}, {
|
|
324
|
-
component: /* @__PURE__ */
|
|
325
|
+
component: /* @__PURE__ */ G(lt, {}),
|
|
325
326
|
label: n`General`
|
|
326
327
|
}];
|
|
327
|
-
return Object.entries(
|
|
328
|
+
return Object.entries(A.getInstance().config.dashboard.WIDGETS).forEach(([e, n]) => {
|
|
328
329
|
n.configFormFieldsDefinitions && t.push({
|
|
329
|
-
component: /* @__PURE__ */
|
|
330
|
+
component: /* @__PURE__ */ G(ft, { widgetName: e }),
|
|
330
331
|
label: n.widgetLabel
|
|
331
332
|
});
|
|
332
333
|
}), t;
|
|
333
334
|
}, [e, n]);
|
|
334
|
-
return /* @__PURE__ */
|
|
335
|
+
return /* @__PURE__ */ G(j, {
|
|
335
336
|
sx: { width: t.spacing(59) },
|
|
336
|
-
children: r.map(({ component: e, label: t }, n) => /* @__PURE__ */
|
|
337
|
+
children: r.map(({ component: e, label: t }, n) => /* @__PURE__ */ K(j, {
|
|
337
338
|
sx: {
|
|
338
339
|
marginTop: n === 0 ? 0 : 2,
|
|
339
340
|
paddingTop: n === r.length - 1 ? 0 : 1
|
|
340
341
|
},
|
|
341
342
|
children: [
|
|
342
|
-
/* @__PURE__ */
|
|
343
|
+
/* @__PURE__ */ G(j, {
|
|
343
344
|
sx: { marginBottom: 2 },
|
|
344
|
-
children: /* @__PURE__ */
|
|
345
|
+
children: /* @__PURE__ */ G(L, {
|
|
345
346
|
variant: "h5",
|
|
346
347
|
children: t
|
|
347
348
|
})
|
|
348
349
|
}),
|
|
349
|
-
/* @__PURE__ */
|
|
350
|
+
/* @__PURE__ */ G(j, {
|
|
350
351
|
sx: {
|
|
351
352
|
marginBottom: 2,
|
|
352
353
|
marginRight: 1
|
|
353
354
|
},
|
|
354
355
|
children: e
|
|
355
356
|
}),
|
|
356
|
-
/* @__PURE__ */
|
|
357
|
+
/* @__PURE__ */ G(ae, {
|
|
357
358
|
flexItem: !0,
|
|
358
359
|
orientation: "horizontal",
|
|
359
360
|
sx: {
|
|
@@ -365,79 +366,24 @@ var ut = ze(({ onActionsChange: e, onClose: t, onTitleChange: n, openProps: i })
|
|
|
365
366
|
]
|
|
366
367
|
}, t))
|
|
367
368
|
});
|
|
368
|
-
},
|
|
369
|
-
let { t: r } =
|
|
370
|
-
return /* @__PURE__ */
|
|
371
|
-
closeIcon: /* @__PURE__ */
|
|
369
|
+
}, ht = ({ onClose: e, onReset: t, open: n }) => {
|
|
370
|
+
let { t: r } = W();
|
|
371
|
+
return /* @__PURE__ */ G(Re, {
|
|
372
|
+
closeIcon: /* @__PURE__ */ G(pt, {}),
|
|
372
373
|
closeIconTooltipText: r`Close settings`,
|
|
373
374
|
onClose: e,
|
|
374
375
|
open: n,
|
|
375
376
|
testIdAttributes: { name: "DashboardSettingsSidebarItem" },
|
|
376
377
|
title: r`Settings`,
|
|
377
378
|
width: 60,
|
|
378
|
-
children: n && /* @__PURE__ */
|
|
379
|
+
children: n && /* @__PURE__ */ G(mt, { onReset: t })
|
|
379
380
|
});
|
|
380
|
-
},
|
|
381
|
-
|
|
382
|
-
error: null
|
|
383
|
-
}, bt = class extends xe {
|
|
384
|
-
constructor(e) {
|
|
385
|
-
super(e), this.resetErrorBoundary = this.resetErrorBoundary.bind(this), this.state = yt;
|
|
386
|
-
}
|
|
387
|
-
static getDerivedStateFromError(e) {
|
|
388
|
-
return {
|
|
389
|
-
didCatch: !0,
|
|
390
|
-
error: e
|
|
391
|
-
};
|
|
392
|
-
}
|
|
393
|
-
resetErrorBoundary(...e) {
|
|
394
|
-
let { didCatch: t } = this.state;
|
|
395
|
-
t && (this.props.onReset?.({
|
|
396
|
-
args: e,
|
|
397
|
-
reason: "imperative-api"
|
|
398
|
-
}), this.setState(yt));
|
|
399
|
-
}
|
|
400
|
-
componentDidCatch(e, t) {
|
|
401
|
-
this.props.onError?.(e, t);
|
|
402
|
-
}
|
|
403
|
-
componentDidUpdate(e, t) {
|
|
404
|
-
let { didCatch: n } = this.state, { resetKeys: r } = this.props;
|
|
405
|
-
n && t.didCatch && xt(e.resetKeys, r) && (this.props.onReset?.({
|
|
406
|
-
next: r,
|
|
407
|
-
prev: e.resetKeys,
|
|
408
|
-
reason: "keys"
|
|
409
|
-
}), this.setState(yt));
|
|
410
|
-
}
|
|
411
|
-
render() {
|
|
412
|
-
let { children: e, fallbackRender: t, FallbackComponent: n, fallback: r } = this.props, { didCatch: i, error: a } = this.state, o = e;
|
|
413
|
-
if (i) {
|
|
414
|
-
let e = {
|
|
415
|
-
error: a,
|
|
416
|
-
resetErrorBoundary: this.resetErrorBoundary
|
|
417
|
-
};
|
|
418
|
-
if (typeof t == "function") o = t(e);
|
|
419
|
-
else if (n) o = we(n, e);
|
|
420
|
-
else if (r !== void 0) o = r;
|
|
421
|
-
else throw a;
|
|
422
|
-
}
|
|
423
|
-
return we(vt.Provider, { value: {
|
|
424
|
-
didCatch: i,
|
|
425
|
-
error: a,
|
|
426
|
-
resetErrorBoundary: this.resetErrorBoundary
|
|
427
|
-
} }, o);
|
|
428
|
-
}
|
|
429
|
-
};
|
|
430
|
-
function xt(e = [], t = []) {
|
|
431
|
-
return e.length !== t.length || e.some((e, n) => !Object.is(e, t[n]));
|
|
432
|
-
}
|
|
433
|
-
//#endregion
|
|
434
|
-
//#region src/components/ui/Dashboard/DashboardZoneContext.ts
|
|
435
|
-
var St = Ce(null), Ct = () => {
|
|
436
|
-
let { t: e } = G(), [t, n] = W(null), r = z(T), a = z(St), s = o(r, (e) => e.dashboardArrangementConfig), c = o(r, (e) => e.setDashboardArrangementConfig), l = M.getInstance().config.dashboard.WIDGETS, u = a ? i.getAvailableWidgets(s, a, l) : [], d = B((e) => {
|
|
381
|
+
}, gt = ye(null), _t = () => {
|
|
382
|
+
let { t: e } = W(), [t, n] = U(null), r = R(T), a = R(gt), s = o(r, (e) => e.dashboardArrangementConfig), c = o(r, (e) => e.setDashboardArrangementConfig), l = A.getInstance().config.dashboard.WIDGETS, u = a ? i.getAvailableWidgets(s, a, l) : [], d = z((e) => {
|
|
437
383
|
n(e.currentTarget);
|
|
438
|
-
}, []), f =
|
|
384
|
+
}, []), f = z(() => {
|
|
439
385
|
n(null);
|
|
440
|
-
}, []), p =
|
|
386
|
+
}, []), p = z((e) => {
|
|
441
387
|
if (!a) return;
|
|
442
388
|
let { dashboardArrangementConfig: t } = r.getState();
|
|
443
389
|
c({
|
|
@@ -451,11 +397,11 @@ var St = Ce(null), Ct = () => {
|
|
|
451
397
|
c,
|
|
452
398
|
r,
|
|
453
399
|
a
|
|
454
|
-
]), m =
|
|
400
|
+
]), m = z((e) => {
|
|
455
401
|
let t = e.currentTarget.dataset.widgetName;
|
|
456
402
|
t && p(t);
|
|
457
403
|
}, [p]);
|
|
458
|
-
return /* @__PURE__ */
|
|
404
|
+
return /* @__PURE__ */ K(j, {
|
|
459
405
|
sx: {
|
|
460
406
|
alignItems: "center",
|
|
461
407
|
display: "flex",
|
|
@@ -463,80 +409,80 @@ var St = Ce(null), Ct = () => {
|
|
|
463
409
|
justifyContent: "center",
|
|
464
410
|
width: "100%"
|
|
465
411
|
},
|
|
466
|
-
children: [/* @__PURE__ */
|
|
412
|
+
children: [/* @__PURE__ */ G(M, {
|
|
467
413
|
onClick: d,
|
|
468
|
-
startIcon: /* @__PURE__ */
|
|
414
|
+
startIcon: /* @__PURE__ */ G(Ze, {}),
|
|
469
415
|
variant: "outlined",
|
|
470
416
|
children: e("Add a widget")
|
|
471
|
-
}), /* @__PURE__ */
|
|
417
|
+
}), /* @__PURE__ */ K(I, {
|
|
472
418
|
anchorEl: t,
|
|
473
419
|
onClose: f,
|
|
474
420
|
open: !!t,
|
|
475
|
-
children: [u.length === 0 && /* @__PURE__ */
|
|
421
|
+
children: [u.length === 0 && /* @__PURE__ */ G(ue, {
|
|
476
422
|
disabled: !0,
|
|
477
423
|
children: e("No widgets available")
|
|
478
|
-
}), u.map((e) => /* @__PURE__ */
|
|
424
|
+
}), u.map((e) => /* @__PURE__ */ G(ue, {
|
|
479
425
|
"data-widget-name": e,
|
|
480
426
|
onClick: m,
|
|
481
427
|
children: l[e].widgetLabel
|
|
482
428
|
}, e))]
|
|
483
429
|
})]
|
|
484
430
|
});
|
|
485
|
-
},
|
|
431
|
+
}, vt = (e, t) => ({
|
|
486
432
|
getItem: (n) => e.getState().dashboardPanels[`${t}-${n}`],
|
|
487
433
|
setItem: (n, r) => {
|
|
488
434
|
e.getState().setDashboardPanelConfiguration(`${t}-${n}`, r);
|
|
489
435
|
}
|
|
490
|
-
}),
|
|
491
|
-
let n =
|
|
436
|
+
}), yt = ({ disabled: e, ref: t }) => {
|
|
437
|
+
let n = R(T), r = R(c), a = o(n, (e) => e.dashboardArrangementConfig), s = o(r, (e) => e.expandedZone), { MIN_PANEL_HEIGHT: u, MIN_PANEL_WIDTH: d } = A.getInstance().config.dashboard, { arrangementKey: f, arrangementWidgetAssignments: p } = a, m = A.getInstance().config.dashboard.ARRANGEMENT_OPTIONS[f], h = f, g = V(() => m?.cells ? i.getArrangementGroupInfos(m, h) : [], [m, h]), _ = V(() => vt(n, "epi-dashboard"), [n]), v = J({
|
|
492
438
|
groupId: g[0]?.groupId ?? `${h}-ph-0`,
|
|
493
439
|
storage: _
|
|
494
|
-
}), y =
|
|
440
|
+
}), y = J({
|
|
495
441
|
groupId: g[1]?.groupId ?? `${h}-ph-1`,
|
|
496
442
|
storage: _
|
|
497
|
-
}), b =
|
|
443
|
+
}), b = J({
|
|
498
444
|
groupId: g[2]?.groupId ?? `${h}-ph-2`,
|
|
499
445
|
storage: _
|
|
500
|
-
}), x =
|
|
446
|
+
}), x = J({
|
|
501
447
|
groupId: g[3]?.groupId ?? `${h}-ph-3`,
|
|
502
448
|
storage: _
|
|
503
|
-
}), S =
|
|
449
|
+
}), S = J({
|
|
504
450
|
groupId: g[4]?.groupId ?? `${h}-ph-4`,
|
|
505
451
|
storage: _
|
|
506
|
-
}), C =
|
|
452
|
+
}), C = J({
|
|
507
453
|
groupId: g[5]?.groupId ?? `${h}-ph-5`,
|
|
508
454
|
storage: _
|
|
509
|
-
}), w =
|
|
455
|
+
}), w = J({
|
|
510
456
|
groupId: g[6]?.groupId ?? `${h}-ph-6`,
|
|
511
457
|
storage: _
|
|
512
|
-
}), E =
|
|
458
|
+
}), E = J({
|
|
513
459
|
groupId: g[7]?.groupId ?? `${h}-ph-7`,
|
|
514
460
|
storage: _
|
|
515
|
-
}),
|
|
461
|
+
}), D = J({
|
|
516
462
|
groupId: g[8]?.groupId ?? `${h}-ph-8`,
|
|
517
463
|
storage: _
|
|
518
|
-
}),
|
|
464
|
+
}), O = J({
|
|
519
465
|
groupId: g[9]?.groupId ?? `${h}-ph-9`,
|
|
520
466
|
storage: _
|
|
521
|
-
}),
|
|
467
|
+
}), k = J({
|
|
522
468
|
groupId: g[10]?.groupId ?? `${h}-ph-10`,
|
|
523
469
|
storage: _
|
|
524
|
-
}),
|
|
470
|
+
}), re = J({
|
|
525
471
|
groupId: g[11]?.groupId ?? `${h}-ph-11`,
|
|
526
472
|
storage: _
|
|
527
|
-
}),
|
|
473
|
+
}), ie = J({
|
|
528
474
|
groupId: g[12]?.groupId ?? `${h}-ph-12`,
|
|
529
475
|
storage: _
|
|
530
|
-
}),
|
|
476
|
+
}), j = J({
|
|
531
477
|
groupId: g[13]?.groupId ?? `${h}-ph-13`,
|
|
532
478
|
storage: _
|
|
533
|
-
}),
|
|
479
|
+
}), M = J({
|
|
534
480
|
groupId: g[14]?.groupId ?? `${h}-ph-14`,
|
|
535
481
|
storage: _
|
|
536
|
-
}),
|
|
482
|
+
}), N = J({
|
|
537
483
|
groupId: g[15]?.groupId ?? `${h}-ph-15`,
|
|
538
484
|
storage: _
|
|
539
|
-
}),
|
|
485
|
+
}), ae = Y(), P = Y(), F = Y(), oe = Y(), se = Y(), ce = Y(), le = Y(), I = Y(), ue = Y(), de = Y(), fe = Y(), pe = Y(), me = Y(), he = Y(), L = Y(), ge = Y(), _e = [
|
|
540
486
|
v,
|
|
541
487
|
y,
|
|
542
488
|
b,
|
|
@@ -545,52 +491,52 @@ var St = Ce(null), Ct = () => {
|
|
|
545
491
|
C,
|
|
546
492
|
w,
|
|
547
493
|
E,
|
|
548
|
-
|
|
549
|
-
|
|
494
|
+
D,
|
|
495
|
+
O,
|
|
496
|
+
k,
|
|
550
497
|
re,
|
|
498
|
+
ie,
|
|
499
|
+
j,
|
|
500
|
+
M,
|
|
501
|
+
N
|
|
502
|
+
], ye = V(() => [
|
|
551
503
|
ae,
|
|
552
|
-
oe,
|
|
553
|
-
N,
|
|
554
504
|
P,
|
|
555
|
-
se
|
|
556
|
-
], xe = H(() => [
|
|
557
505
|
F,
|
|
558
|
-
|
|
559
|
-
|
|
506
|
+
oe,
|
|
507
|
+
se,
|
|
560
508
|
ce,
|
|
561
509
|
le,
|
|
510
|
+
I,
|
|
562
511
|
ue,
|
|
563
512
|
de,
|
|
564
513
|
fe,
|
|
565
514
|
pe,
|
|
566
515
|
me,
|
|
567
516
|
he,
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
ve,
|
|
571
|
-
R,
|
|
572
|
-
ye
|
|
517
|
+
L,
|
|
518
|
+
ge
|
|
573
519
|
], [
|
|
520
|
+
ae,
|
|
521
|
+
P,
|
|
574
522
|
F,
|
|
575
|
-
|
|
576
|
-
|
|
523
|
+
oe,
|
|
524
|
+
se,
|
|
577
525
|
ce,
|
|
578
526
|
le,
|
|
527
|
+
I,
|
|
579
528
|
ue,
|
|
580
529
|
de,
|
|
581
530
|
fe,
|
|
582
531
|
pe,
|
|
583
532
|
me,
|
|
584
533
|
he,
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
ve,
|
|
588
|
-
R,
|
|
589
|
-
ye
|
|
534
|
+
L,
|
|
535
|
+
ge
|
|
590
536
|
]);
|
|
591
|
-
|
|
537
|
+
Ce(t, () => ({ reset: () => {
|
|
592
538
|
try {
|
|
593
|
-
|
|
539
|
+
ye.forEach((e) => {
|
|
594
540
|
if (e.current) {
|
|
595
541
|
let t = e.current.getLayout(), n = Object.keys(t);
|
|
596
542
|
if (n.length > 0) {
|
|
@@ -600,25 +546,25 @@ var St = Ce(null), Ct = () => {
|
|
|
600
546
|
}
|
|
601
547
|
});
|
|
602
548
|
} catch {}
|
|
603
|
-
} }), [
|
|
604
|
-
let
|
|
605
|
-
let e =
|
|
606
|
-
return Object.fromEntries(Object.entries(e).map(([e, { component: t, widgetLabel: n }]) => [e, /* @__PURE__ */
|
|
607
|
-
fallback: /* @__PURE__ */
|
|
608
|
-
children:
|
|
549
|
+
} }), [ye]);
|
|
550
|
+
let xe = V(() => {
|
|
551
|
+
let e = A.getInstance().config.dashboard.WIDGETS;
|
|
552
|
+
return Object.fromEntries(Object.entries(e).map(([e, { component: t, widgetLabel: n }]) => [e, /* @__PURE__ */ G(Je, {
|
|
553
|
+
fallback: /* @__PURE__ */ G(l, { widgetLabel: n }),
|
|
554
|
+
children: be(t)
|
|
609
555
|
}, e)]));
|
|
610
556
|
}, []);
|
|
611
557
|
if (s) {
|
|
612
558
|
let e = p[s];
|
|
613
|
-
return /* @__PURE__ */
|
|
559
|
+
return /* @__PURE__ */ G(gt, {
|
|
614
560
|
value: s,
|
|
615
|
-
children:
|
|
561
|
+
children: xe[e] ?? null
|
|
616
562
|
});
|
|
617
563
|
}
|
|
618
564
|
if (!m?.cells) return null;
|
|
619
|
-
let
|
|
620
|
-
let n =
|
|
621
|
-
return /* @__PURE__ */
|
|
565
|
+
let z = { value: 0 }, B = (t) => {
|
|
566
|
+
let n = z.value++, r = g[n]?.groupId ?? `${h}-group-${n}`, i = t.orientation, { defaultLayout: a, onLayoutChanged: o } = _e[n] ?? {}, s = ye[n];
|
|
567
|
+
return /* @__PURE__ */ G(Ye, {
|
|
622
568
|
defaultLayout: a,
|
|
623
569
|
groupRef: s,
|
|
624
570
|
id: r,
|
|
@@ -630,124 +576,124 @@ var St = Ce(null), Ct = () => {
|
|
|
630
576
|
},
|
|
631
577
|
children: t.cells.map((n, a) => {
|
|
632
578
|
let o = a === t.cells.length - 1, s = `${r}-panel-${a}`;
|
|
633
|
-
return /* @__PURE__ */
|
|
634
|
-
/* @__PURE__ */
|
|
579
|
+
return /* @__PURE__ */ K(ve, { children: [
|
|
580
|
+
/* @__PURE__ */ G(Xe, {
|
|
635
581
|
defaultSize: n.size,
|
|
636
582
|
id: s,
|
|
637
583
|
minSize: i === "vertical" ? u : d,
|
|
638
584
|
style: { overflow: "hidden" },
|
|
639
|
-
children: "name" in n ? /* @__PURE__ */
|
|
585
|
+
children: "name" in n ? /* @__PURE__ */ G(gt, {
|
|
640
586
|
value: n.name,
|
|
641
|
-
children:
|
|
587
|
+
children: xe[p[n.name]] ?? /* @__PURE__ */ G(_t, {})
|
|
642
588
|
}) : B(n)
|
|
643
589
|
}),
|
|
644
|
-
!o && i === "horizontal" && /* @__PURE__ */
|
|
645
|
-
!o && i === "vertical" && /* @__PURE__ */
|
|
646
|
-
] }, "name" in n ? n.name :
|
|
590
|
+
!o && i === "horizontal" && /* @__PURE__ */ G(te, { disabled: e }),
|
|
591
|
+
!o && i === "vertical" && /* @__PURE__ */ G(ee, { disabled: e })
|
|
592
|
+
] }, "name" in n ? n.name : ne.createHash(JSON.stringify(n)));
|
|
647
593
|
})
|
|
648
594
|
});
|
|
649
595
|
};
|
|
650
596
|
return B(m);
|
|
651
|
-
},
|
|
652
|
-
let e =
|
|
653
|
-
|
|
597
|
+
}, bt = Ue, xt = () => {
|
|
598
|
+
let e = _e(), { t } = W(), [n, r] = U([]);
|
|
599
|
+
B(() => {
|
|
654
600
|
let e = (e) => {
|
|
655
|
-
e?.zone && r((t) => e.items === null ? t.filter((t) => t.zone !== e.zone) : [...t.filter((t) => t.zone !== e.zone), e].sort((e, t) =>
|
|
601
|
+
e?.zone && r((t) => e.items === null ? t.filter((t) => t.zone !== e.zone) : [...t.filter((t) => t.zone !== e.zone), e].sort((e, t) => A.getInstance().config.dashboard.DOWNLOAD_SECTION_ORDER.indexOf(e.zone) - A.getInstance().config.dashboard.DOWNLOAD_SECTION_ORDER.indexOf(t.zone)));
|
|
656
602
|
}, t = u.getInstance();
|
|
657
603
|
return t.addEventListener("onDownloadOptionsChanged", e), t.emit("onDownloadOptionsRequested"), () => {
|
|
658
604
|
t.removeEventListener("onDownloadOptionsChanged", e);
|
|
659
605
|
};
|
|
660
606
|
}, []);
|
|
661
|
-
let i =
|
|
607
|
+
let i = z((e, t) => /* @__PURE__ */ G(j, {
|
|
662
608
|
sx: { marginLeft: 1 },
|
|
663
|
-
children: t || e.disabled || !e.callback ? /* @__PURE__ */
|
|
609
|
+
children: t || e.disabled || !e.callback ? /* @__PURE__ */ G(L, { children: e.label }) : /* @__PURE__ */ G(se, {
|
|
664
610
|
component: "button",
|
|
665
611
|
onClick: () => e.callback(),
|
|
666
612
|
tabIndex: 0,
|
|
667
613
|
children: e.label
|
|
668
614
|
})
|
|
669
|
-
}, e.label), []), a =
|
|
615
|
+
}, e.label), []), a = z((e) => /* @__PURE__ */ K(j, { children: [/* @__PURE__ */ G(L, {
|
|
670
616
|
variant: "h6",
|
|
671
617
|
children: e.label
|
|
672
618
|
}), e.items.map((t) => i(t, e.disabled))] }, e.label), [i]);
|
|
673
|
-
return /* @__PURE__ */
|
|
619
|
+
return /* @__PURE__ */ G(j, {
|
|
674
620
|
sx: { width: e.spacing(59) },
|
|
675
|
-
children: n.map((n) => /* @__PURE__ */
|
|
621
|
+
children: n.map((n) => /* @__PURE__ */ K(j, {
|
|
676
622
|
sx: {
|
|
677
623
|
borderBottom: `1px solid ${e.palette.divider}`,
|
|
678
624
|
padding: e.spacing(1)
|
|
679
625
|
},
|
|
680
626
|
children: [
|
|
681
|
-
/* @__PURE__ */
|
|
627
|
+
/* @__PURE__ */ G(j, { children: /* @__PURE__ */ G(L, {
|
|
682
628
|
color: n.disabled ? e.palette.text.disabled : void 0,
|
|
683
629
|
variant: "h5",
|
|
684
630
|
children: n.zoneLabel
|
|
685
631
|
}) }),
|
|
686
|
-
n.disabled && /* @__PURE__ */
|
|
632
|
+
n.disabled && /* @__PURE__ */ G(j, {
|
|
687
633
|
sx: { padding: e.spacing(1) },
|
|
688
|
-
children: /* @__PURE__ */
|
|
634
|
+
children: /* @__PURE__ */ G(L, { children: t`No data available for download.` })
|
|
689
635
|
}),
|
|
690
|
-
!n.disabled && n.items.map((e) => "items" in e && e.disabled ? null : /* @__PURE__ */
|
|
636
|
+
!n.disabled && n.items.map((e) => "items" in e && e.disabled ? null : /* @__PURE__ */ G(ve, { children: "items" in e ? a(e) : i(e) }, e.label))
|
|
691
637
|
]
|
|
692
638
|
}, n.zone))
|
|
693
639
|
});
|
|
694
|
-
},
|
|
695
|
-
let { t: n } =
|
|
696
|
-
return /* @__PURE__ */
|
|
697
|
-
closeIcon: /* @__PURE__ */
|
|
640
|
+
}, St = ({ onClose: e, open: t }) => {
|
|
641
|
+
let { t: n } = W();
|
|
642
|
+
return /* @__PURE__ */ G(Re, {
|
|
643
|
+
closeIcon: /* @__PURE__ */ G(bt, {}),
|
|
698
644
|
closeIconTooltipText: n`Close download`,
|
|
699
645
|
onClose: e,
|
|
700
646
|
open: t,
|
|
701
647
|
testIdAttributes: { name: "DashboardDownloadSidebarItem" },
|
|
702
648
|
title: n`Download`,
|
|
703
649
|
width: 60,
|
|
704
|
-
children: t && /* @__PURE__ */
|
|
650
|
+
children: t && /* @__PURE__ */ G(xt, {})
|
|
705
651
|
});
|
|
706
652
|
};
|
|
707
653
|
//#endregion
|
|
708
654
|
//#region ../../node_modules/.pnpm/fuse.js@7.5.0/node_modules/fuse.js/dist/fuse.mjs
|
|
709
|
-
function
|
|
710
|
-
return Array.isArray ? Array.isArray(e) :
|
|
655
|
+
function X(e) {
|
|
656
|
+
return Array.isArray ? Array.isArray(e) : At(e) === "[object Array]";
|
|
711
657
|
}
|
|
712
|
-
function
|
|
658
|
+
function Ct(e) {
|
|
713
659
|
if (typeof e == "string") return e;
|
|
714
660
|
if (typeof e == "bigint") return e.toString();
|
|
715
661
|
let t = e + "";
|
|
716
662
|
return t == "0" && 1 / e == -Infinity ? "-0" : t;
|
|
717
663
|
}
|
|
718
|
-
function
|
|
719
|
-
return e == null ? "" :
|
|
664
|
+
function wt(e) {
|
|
665
|
+
return e == null ? "" : Ct(e);
|
|
720
666
|
}
|
|
721
|
-
function
|
|
667
|
+
function Z(e) {
|
|
722
668
|
return typeof e == "string";
|
|
723
669
|
}
|
|
724
|
-
function
|
|
670
|
+
function Tt(e) {
|
|
725
671
|
return typeof e == "number";
|
|
726
672
|
}
|
|
727
|
-
function
|
|
728
|
-
return e === !0 || e === !1 ||
|
|
673
|
+
function Et(e) {
|
|
674
|
+
return e === !0 || e === !1 || Ot(e) && At(e) == "[object Boolean]";
|
|
729
675
|
}
|
|
730
|
-
function
|
|
676
|
+
function Dt(e) {
|
|
731
677
|
return typeof e == "object";
|
|
732
678
|
}
|
|
733
|
-
function
|
|
734
|
-
return
|
|
679
|
+
function Ot(e) {
|
|
680
|
+
return Dt(e) && e !== null;
|
|
735
681
|
}
|
|
736
|
-
function
|
|
682
|
+
function Q(e) {
|
|
737
683
|
return e != null;
|
|
738
684
|
}
|
|
739
|
-
function
|
|
685
|
+
function kt(e) {
|
|
740
686
|
return !e.trim().length;
|
|
741
687
|
}
|
|
742
|
-
function
|
|
688
|
+
function At(e) {
|
|
743
689
|
return e == null ? e === void 0 ? "[object Undefined]" : "[object Null]" : Object.prototype.toString.call(e);
|
|
744
690
|
}
|
|
745
|
-
var
|
|
691
|
+
var jt = "Incorrect 'index' type", Mt = "Invalid doc index: must be a non-negative integer within the bounds of the docs array", Nt = (e) => `Invalid value for key ${e}`, Pt = (e) => `Pattern length exceeds max of ${e}.`, Ft = (e) => `Missing ${e} property in key`, It = (e) => `Property 'weight' in key '${e}' must be a positive integer`, Lt = "Fuse.match does not support useTokenSearch: token search requires corpus-level statistics (df, fieldCount) that a one-off string comparison does not have. Use new Fuse(...).search(...) instead.", Rt = Object.prototype.hasOwnProperty, zt = class {
|
|
746
692
|
constructor(e) {
|
|
747
693
|
this._keys = [], this._keyMap = {};
|
|
748
694
|
let t = 0;
|
|
749
695
|
e.forEach((e) => {
|
|
750
|
-
let n =
|
|
696
|
+
let n = Bt(e);
|
|
751
697
|
this._keys.push(n), this._keyMap[n.id] = n, t += n.weight;
|
|
752
698
|
}), this._keys.forEach((e) => {
|
|
753
699
|
e.weight /= t;
|
|
@@ -763,14 +709,14 @@ var Lt = "Incorrect 'index' type", Rt = "Invalid doc index: must be a non-negati
|
|
|
763
709
|
return JSON.stringify(this._keys);
|
|
764
710
|
}
|
|
765
711
|
};
|
|
766
|
-
function
|
|
712
|
+
function Bt(e) {
|
|
767
713
|
let t = null, n = null, r = null, i = 1, a = null;
|
|
768
|
-
if (
|
|
714
|
+
if (Z(e) || X(e)) r = e, t = Vt(e), n = Ht(e);
|
|
769
715
|
else {
|
|
770
|
-
if (!
|
|
716
|
+
if (!Rt.call(e, "name")) throw Error(Ft("name"));
|
|
771
717
|
let o = e.name;
|
|
772
|
-
if (r = o,
|
|
773
|
-
t =
|
|
718
|
+
if (r = o, Rt.call(e, "weight") && e.weight !== void 0 && (i = e.weight, i <= 0)) throw Error(It(Ht(o)));
|
|
719
|
+
t = Vt(o), n = Ht(o), a = e.getFn ?? null;
|
|
774
720
|
}
|
|
775
721
|
return {
|
|
776
722
|
path: t,
|
|
@@ -780,74 +726,74 @@ function Kt(e) {
|
|
|
780
726
|
getFn: a
|
|
781
727
|
};
|
|
782
728
|
}
|
|
783
|
-
function
|
|
784
|
-
return
|
|
729
|
+
function Vt(e) {
|
|
730
|
+
return X(e) ? e : e.split(".");
|
|
785
731
|
}
|
|
786
|
-
function
|
|
787
|
-
return
|
|
732
|
+
function Ht(e) {
|
|
733
|
+
return X(e) ? e.join(".") : e;
|
|
788
734
|
}
|
|
789
|
-
function
|
|
735
|
+
function Ut(e, t) {
|
|
790
736
|
let n = [], r = !1, i = (e, t, a, o) => {
|
|
791
|
-
if (
|
|
737
|
+
if (Q(e)) {
|
|
792
738
|
if (!t[a]) n.push(o === void 0 ? e : {
|
|
793
739
|
v: e,
|
|
794
740
|
i: o
|
|
795
741
|
});
|
|
796
742
|
else {
|
|
797
743
|
let s = e[t[a]];
|
|
798
|
-
if (!
|
|
799
|
-
if (a === t.length - 1 && (
|
|
800
|
-
v:
|
|
744
|
+
if (!Q(s)) return;
|
|
745
|
+
if (a === t.length - 1 && (Z(s) || Tt(s) || Et(s) || typeof s == "bigint")) n.push(o === void 0 ? wt(s) : {
|
|
746
|
+
v: wt(s),
|
|
801
747
|
i: o
|
|
802
748
|
});
|
|
803
|
-
else if (
|
|
749
|
+
else if (X(s)) {
|
|
804
750
|
r = !0;
|
|
805
751
|
for (let e = 0, n = s.length; e < n; e += 1) i(s[e], t, a + 1, e);
|
|
806
752
|
} else t.length && i(s, t, a + 1, o);
|
|
807
753
|
}
|
|
808
754
|
}
|
|
809
755
|
};
|
|
810
|
-
return i(e,
|
|
756
|
+
return i(e, Z(t) ? t.split(".") : t, 0), r ? n : n[0];
|
|
811
757
|
}
|
|
812
|
-
var
|
|
758
|
+
var Wt = {
|
|
813
759
|
includeMatches: !1,
|
|
814
760
|
findAllMatches: !1,
|
|
815
761
|
minMatchCharLength: 1
|
|
816
|
-
},
|
|
762
|
+
}, Gt = {
|
|
817
763
|
isCaseSensitive: !1,
|
|
818
764
|
ignoreDiacritics: !1,
|
|
819
765
|
includeScore: !1,
|
|
820
766
|
keys: [],
|
|
821
767
|
shouldSort: !0,
|
|
822
768
|
sortFn: (e, t) => e.score === t.score ? e.idx < t.idx ? -1 : 1 : e.score < t.score ? -1 : 1
|
|
823
|
-
},
|
|
769
|
+
}, Kt = {
|
|
824
770
|
location: 0,
|
|
825
771
|
threshold: .6,
|
|
826
772
|
distance: 100
|
|
827
|
-
},
|
|
773
|
+
}, qt = {
|
|
828
774
|
useExtendedSearch: !1,
|
|
829
775
|
useTokenSearch: !1,
|
|
830
776
|
tokenize: void 0,
|
|
831
777
|
tokenMatch: "any",
|
|
832
|
-
getFn:
|
|
778
|
+
getFn: Ut,
|
|
833
779
|
ignoreLocation: !1,
|
|
834
780
|
ignoreFieldNorm: !1,
|
|
835
781
|
fieldNormWeight: 1
|
|
836
|
-
},
|
|
837
|
-
...
|
|
838
|
-
...
|
|
839
|
-
...
|
|
840
|
-
|
|
782
|
+
}, $ = Object.freeze({
|
|
783
|
+
...Gt,
|
|
784
|
+
...Wt,
|
|
785
|
+
...Kt,
|
|
786
|
+
...qt
|
|
841
787
|
});
|
|
842
|
-
function
|
|
788
|
+
function Jt(e) {
|
|
843
789
|
return e >= 9 && e <= 13 || e === 32 || e === 160;
|
|
844
790
|
}
|
|
845
|
-
function
|
|
791
|
+
function Yt(e = 1, t = 3) {
|
|
846
792
|
let n = /* @__PURE__ */ new Map(), r = 10 ** t;
|
|
847
793
|
return {
|
|
848
794
|
get(t) {
|
|
849
795
|
let i = 0, a = !1;
|
|
850
|
-
for (let e = 0; e < t.length; e++)
|
|
796
|
+
for (let e = 0; e < t.length; e++) Jt(t.charCodeAt(e)) ? a = !1 : a ||= (i++, !0);
|
|
851
797
|
if (i === 0 && (i = 1), n.has(i)) return n.get(i);
|
|
852
798
|
let o = Math.round(r / i ** (.5 * e)) / r;
|
|
853
799
|
return n.set(i, o), o;
|
|
@@ -857,9 +803,9 @@ function tn(e = 1, t = 3) {
|
|
|
857
803
|
}
|
|
858
804
|
};
|
|
859
805
|
}
|
|
860
|
-
var
|
|
861
|
-
constructor({ getFn: e =
|
|
862
|
-
this.norm =
|
|
806
|
+
var Xt = class {
|
|
807
|
+
constructor({ getFn: e = $.getFn, fieldNormWeight: t = $.fieldNormWeight } = {}) {
|
|
808
|
+
this.norm = Yt(t, 3), this.getFn = e, this.isCreated = !1, this.docs = [], this.keys = [], this._keysMap = {}, this.setIndexRecords();
|
|
863
809
|
}
|
|
864
810
|
setSources(e = []) {
|
|
865
811
|
this.docs = e;
|
|
@@ -878,7 +824,7 @@ var nn = class {
|
|
|
878
824
|
let e = this.docs.length;
|
|
879
825
|
this.records = Array(e);
|
|
880
826
|
let t = 0;
|
|
881
|
-
if (
|
|
827
|
+
if (Z(this.docs[0])) for (let n = 0; n < e; n++) {
|
|
882
828
|
let e = this._createStringRecord(this.docs[n], n);
|
|
883
829
|
e && (this.records[t++] = e);
|
|
884
830
|
}
|
|
@@ -886,8 +832,8 @@ var nn = class {
|
|
|
886
832
|
this.records.length = t, this.norm.clear();
|
|
887
833
|
}
|
|
888
834
|
add(e, t) {
|
|
889
|
-
if (!Number.isInteger(t) || t < 0) throw Error(
|
|
890
|
-
if (
|
|
835
|
+
if (!Number.isInteger(t) || t < 0) throw Error(Mt);
|
|
836
|
+
if (Z(e)) {
|
|
891
837
|
let n = this._createStringRecord(e, t);
|
|
892
838
|
return n && this.records.push(n), n;
|
|
893
839
|
}
|
|
@@ -895,7 +841,7 @@ var nn = class {
|
|
|
895
841
|
return this.records.push(n), n;
|
|
896
842
|
}
|
|
897
843
|
removeAt(e) {
|
|
898
|
-
if (!Number.isInteger(e) || e < 0) throw Error(
|
|
844
|
+
if (!Number.isInteger(e) || e < 0) throw Error(Mt);
|
|
899
845
|
for (let t = 0, n = this.records.length; t < n; t += 1) if (this.records[t].i === e) {
|
|
900
846
|
this.records.splice(t, 1);
|
|
901
847
|
break;
|
|
@@ -924,7 +870,7 @@ var nn = class {
|
|
|
924
870
|
return this.records.length;
|
|
925
871
|
}
|
|
926
872
|
_createStringRecord(e, t) {
|
|
927
|
-
return !
|
|
873
|
+
return !Q(e) || kt(e) ? null : {
|
|
928
874
|
v: e,
|
|
929
875
|
i: t,
|
|
930
876
|
n: this.norm.get(e)
|
|
@@ -937,14 +883,14 @@ var nn = class {
|
|
|
937
883
|
};
|
|
938
884
|
for (let t = 0, r = this.keys.length; t < r; t++) {
|
|
939
885
|
let r = this.keys[t], i = r.getFn ? r.getFn(e) : this.getFn(e, r.path);
|
|
940
|
-
if (
|
|
941
|
-
if (
|
|
886
|
+
if (Q(i)) {
|
|
887
|
+
if (X(i)) {
|
|
942
888
|
let e = [];
|
|
943
889
|
for (let t = 0, n = i.length; t < n; t += 1) {
|
|
944
890
|
let n = i[t];
|
|
945
|
-
if (
|
|
946
|
-
if (
|
|
947
|
-
if (!
|
|
891
|
+
if (Q(n)) {
|
|
892
|
+
if (Z(n)) {
|
|
893
|
+
if (!kt(n)) {
|
|
948
894
|
let r = {
|
|
949
895
|
v: n,
|
|
950
896
|
i: t,
|
|
@@ -952,9 +898,9 @@ var nn = class {
|
|
|
952
898
|
};
|
|
953
899
|
e.push(r);
|
|
954
900
|
}
|
|
955
|
-
} else if (
|
|
956
|
-
let t =
|
|
957
|
-
if (!
|
|
901
|
+
} else if (Q(n.v)) {
|
|
902
|
+
let t = Z(n.v) ? n.v : wt(n.v);
|
|
903
|
+
if (!kt(t)) {
|
|
958
904
|
let r = {
|
|
959
905
|
v: t,
|
|
960
906
|
i: n.i,
|
|
@@ -966,7 +912,7 @@ var nn = class {
|
|
|
966
912
|
}
|
|
967
913
|
}
|
|
968
914
|
n.$[t] = e;
|
|
969
|
-
} else if (
|
|
915
|
+
} else if (Z(i) && !kt(i)) {
|
|
970
916
|
let e = {
|
|
971
917
|
v: i,
|
|
972
918
|
n: this.norm.get(i)
|
|
@@ -984,21 +930,21 @@ var nn = class {
|
|
|
984
930
|
};
|
|
985
931
|
}
|
|
986
932
|
};
|
|
987
|
-
function
|
|
988
|
-
let i = new
|
|
933
|
+
function Zt(e, t, { getFn: n = $.getFn, fieldNormWeight: r = $.fieldNormWeight } = {}) {
|
|
934
|
+
let i = new Xt({
|
|
989
935
|
getFn: n,
|
|
990
936
|
fieldNormWeight: r
|
|
991
937
|
});
|
|
992
|
-
return i.setKeys(e.map(
|
|
938
|
+
return i.setKeys(e.map(Bt)), i.setSources(t), i.create(), i;
|
|
993
939
|
}
|
|
994
|
-
function
|
|
995
|
-
let { keys: r, records: i } = e, a = new
|
|
940
|
+
function Qt(e, { getFn: t = $.getFn, fieldNormWeight: n = $.fieldNormWeight } = {}) {
|
|
941
|
+
let { keys: r, records: i } = e, a = new Xt({
|
|
996
942
|
getFn: t,
|
|
997
943
|
fieldNormWeight: n
|
|
998
944
|
});
|
|
999
945
|
return a.setKeys(r), a.setIndexRecords(i), a;
|
|
1000
946
|
}
|
|
1001
|
-
function
|
|
947
|
+
function $t(e = [], t = $.minMatchCharLength) {
|
|
1002
948
|
let n = [], r = -1, i = -1, a = 0;
|
|
1003
949
|
for (let o = e.length; a < o; a += 1) {
|
|
1004
950
|
let o = e[a];
|
|
@@ -1006,8 +952,8 @@ function on(e = [], t = Q.minMatchCharLength) {
|
|
|
1006
952
|
}
|
|
1007
953
|
return e[a - 1] && a - r >= t && n.push([r, a - 1]), n;
|
|
1008
954
|
}
|
|
1009
|
-
function
|
|
1010
|
-
if (t.length > 32) throw Error(
|
|
955
|
+
function en(e, t, n, { location: r = $.location, distance: i = $.distance, threshold: a = $.threshold, findAllMatches: o = $.findAllMatches, minMatchCharLength: s = $.minMatchCharLength, includeMatches: c = $.includeMatches, ignoreLocation: l = $.ignoreLocation } = {}) {
|
|
956
|
+
if (t.length > 32) throw Error(Pt(32));
|
|
1011
957
|
let u = t.length, d = e.length, f = Math.max(0, Math.min(r, d)), p = a, m = f, h = (e, t) => {
|
|
1012
958
|
let n = e / u;
|
|
1013
959
|
if (l) return n;
|
|
@@ -1048,12 +994,12 @@ function sn(e, t, n, { location: r = Q.location, distance: i = Q.distance, thres
|
|
|
1048
994
|
score: Math.max(.001, b)
|
|
1049
995
|
};
|
|
1050
996
|
if (g) {
|
|
1051
|
-
let e =
|
|
997
|
+
let e = $t(_, s);
|
|
1052
998
|
e.length ? c && (w.indices = e) : w.isMatch = !1;
|
|
1053
999
|
}
|
|
1054
1000
|
return w;
|
|
1055
1001
|
}
|
|
1056
|
-
function
|
|
1002
|
+
function tn(e) {
|
|
1057
1003
|
let t = {};
|
|
1058
1004
|
for (let n = 0, r = e.length; n < r; n += 1) {
|
|
1059
1005
|
let i = e.charAt(n);
|
|
@@ -1061,7 +1007,7 @@ function cn(e) {
|
|
|
1061
1007
|
}
|
|
1062
1008
|
return t;
|
|
1063
1009
|
}
|
|
1064
|
-
function
|
|
1010
|
+
function nn(e) {
|
|
1065
1011
|
if (e.length <= 1) return e;
|
|
1066
1012
|
e.sort((e, t) => e[0] - t[0] || e[1] - t[1]);
|
|
1067
1013
|
let t = [e[0]];
|
|
@@ -1071,7 +1017,7 @@ function ln(e) {
|
|
|
1071
1017
|
}
|
|
1072
1018
|
return t;
|
|
1073
1019
|
}
|
|
1074
|
-
var
|
|
1020
|
+
var rn = {
|
|
1075
1021
|
ł: "l",
|
|
1076
1022
|
Ł: "L",
|
|
1077
1023
|
đ: "d",
|
|
@@ -1084,8 +1030,8 @@ var un = {
|
|
|
1084
1030
|
Ŧ: "T",
|
|
1085
1031
|
ı: "i",
|
|
1086
1032
|
ß: "ss"
|
|
1087
|
-
},
|
|
1088
|
-
constructor(e, { location: t =
|
|
1033
|
+
}, an = RegExp("[" + Object.keys(rn).join("") + "]", "g"), on = typeof String.prototype.normalize == "function" ? (e) => e.normalize("NFD").replace(/[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]/g, "").replace(an, (e) => rn[e]) : (e) => e, sn = class {
|
|
1034
|
+
constructor(e, { location: t = $.location, threshold: n = $.threshold, distance: r = $.distance, includeMatches: i = $.includeMatches, findAllMatches: a = $.findAllMatches, minMatchCharLength: o = $.minMatchCharLength, isCaseSensitive: s = $.isCaseSensitive, ignoreDiacritics: c = $.ignoreDiacritics, ignoreLocation: l = $.ignoreLocation } = {}) {
|
|
1089
1035
|
if (this.options = {
|
|
1090
1036
|
location: t,
|
|
1091
1037
|
threshold: n,
|
|
@@ -1096,11 +1042,11 @@ var un = {
|
|
|
1096
1042
|
isCaseSensitive: s,
|
|
1097
1043
|
ignoreDiacritics: c,
|
|
1098
1044
|
ignoreLocation: l
|
|
1099
|
-
}, e = s ? e : e.toLowerCase(), e = c ?
|
|
1045
|
+
}, e = s ? e : e.toLowerCase(), e = c ? on(e) : e, this.pattern = e, this.chunks = [], !this.pattern.length) return;
|
|
1100
1046
|
let u = (e, t) => {
|
|
1101
1047
|
this.chunks.push({
|
|
1102
1048
|
pattern: e,
|
|
1103
|
-
alphabet:
|
|
1049
|
+
alphabet: tn(e),
|
|
1104
1050
|
startIndex: t
|
|
1105
1051
|
});
|
|
1106
1052
|
}, d = this.pattern.length;
|
|
@@ -1115,7 +1061,7 @@ var un = {
|
|
|
1115
1061
|
}
|
|
1116
1062
|
searchIn(e) {
|
|
1117
1063
|
let { isCaseSensitive: t, ignoreDiacritics: n, includeMatches: r } = this.options;
|
|
1118
|
-
if (e = t ? e : e.toLowerCase(), e = n ?
|
|
1064
|
+
if (e = t ? e : e.toLowerCase(), e = n ? on(e) : e, this.pattern === e) {
|
|
1119
1065
|
if (e.length < this.options.minMatchCharLength) return {
|
|
1120
1066
|
isMatch: !1,
|
|
1121
1067
|
score: 1
|
|
@@ -1128,7 +1074,7 @@ var un = {
|
|
|
1128
1074
|
}
|
|
1129
1075
|
let { location: i, distance: a, threshold: o, findAllMatches: s, minMatchCharLength: c, ignoreLocation: l } = this.options, u = [], d = 0, f = !1;
|
|
1130
1076
|
this.chunks.forEach(({ pattern: t, alphabet: n, startIndex: p }) => {
|
|
1131
|
-
let { isMatch: m, score: h, indices: g } =
|
|
1077
|
+
let { isMatch: m, score: h, indices: g } = en(e, t, n, {
|
|
1132
1078
|
location: i + p,
|
|
1133
1079
|
distance: a,
|
|
1134
1080
|
threshold: o,
|
|
@@ -1143,13 +1089,13 @@ var un = {
|
|
|
1143
1089
|
isMatch: f,
|
|
1144
1090
|
score: f ? d / this.chunks.length : 1
|
|
1145
1091
|
};
|
|
1146
|
-
return f && r && (p.indices =
|
|
1092
|
+
return f && r && (p.indices = nn(u)), p;
|
|
1147
1093
|
}
|
|
1148
|
-
},
|
|
1149
|
-
function
|
|
1094
|
+
}, cn = /* @__PURE__ */ new Set(["fuzzy", "include"]);
|
|
1095
|
+
function ln(e) {
|
|
1150
1096
|
return e.startsWith("inverse");
|
|
1151
1097
|
}
|
|
1152
|
-
var
|
|
1098
|
+
var un = [
|
|
1153
1099
|
{
|
|
1154
1100
|
type: "exact",
|
|
1155
1101
|
multiRegex: /^="(.*)"$/,
|
|
@@ -1269,16 +1215,16 @@ var gn = [
|
|
|
1269
1215
|
multiRegex: /^"(.*)"$/,
|
|
1270
1216
|
singleRegex: /^(.*)$/,
|
|
1271
1217
|
create: (e, t = {}) => {
|
|
1272
|
-
let n = new
|
|
1273
|
-
location: t.location ??
|
|
1274
|
-
threshold: t.threshold ??
|
|
1275
|
-
distance: t.distance ??
|
|
1276
|
-
includeMatches: t.includeMatches ??
|
|
1277
|
-
findAllMatches: t.findAllMatches ??
|
|
1278
|
-
minMatchCharLength: t.minMatchCharLength ??
|
|
1279
|
-
isCaseSensitive: t.isCaseSensitive ??
|
|
1280
|
-
ignoreDiacritics: t.ignoreDiacritics ??
|
|
1281
|
-
ignoreLocation: t.ignoreLocation ??
|
|
1218
|
+
let n = new sn(e, {
|
|
1219
|
+
location: t.location ?? $.location,
|
|
1220
|
+
threshold: t.threshold ?? $.threshold,
|
|
1221
|
+
distance: t.distance ?? $.distance,
|
|
1222
|
+
includeMatches: t.includeMatches ?? $.includeMatches,
|
|
1223
|
+
findAllMatches: t.findAllMatches ?? $.findAllMatches,
|
|
1224
|
+
minMatchCharLength: t.minMatchCharLength ?? $.minMatchCharLength,
|
|
1225
|
+
isCaseSensitive: t.isCaseSensitive ?? $.isCaseSensitive,
|
|
1226
|
+
ignoreDiacritics: t.ignoreDiacritics ?? $.ignoreDiacritics,
|
|
1227
|
+
ignoreLocation: t.ignoreLocation ?? $.ignoreLocation
|
|
1282
1228
|
});
|
|
1283
1229
|
return {
|
|
1284
1230
|
type: "fuzzy",
|
|
@@ -1288,8 +1234,8 @@ var gn = [
|
|
|
1288
1234
|
};
|
|
1289
1235
|
}
|
|
1290
1236
|
}
|
|
1291
|
-
],
|
|
1292
|
-
function
|
|
1237
|
+
], dn = un.length, fn = "\0", pn = "|";
|
|
1238
|
+
function mn(e) {
|
|
1293
1239
|
let t = [], n = e.length, r = 0;
|
|
1294
1240
|
for (; r < n;) {
|
|
1295
1241
|
for (; r < n && e[r] === " ";) r++;
|
|
@@ -1319,21 +1265,21 @@ function bn(e) {
|
|
|
1319
1265
|
}
|
|
1320
1266
|
return t;
|
|
1321
1267
|
}
|
|
1322
|
-
function
|
|
1268
|
+
function hn(e, t) {
|
|
1323
1269
|
let n = e.match(t);
|
|
1324
1270
|
return n ? n[1] : null;
|
|
1325
1271
|
}
|
|
1326
|
-
function
|
|
1327
|
-
return e.replace(/\\\|/g,
|
|
1328
|
-
let n =
|
|
1272
|
+
function gn(e, t = {}) {
|
|
1273
|
+
return e.replace(/\\\|/g, fn).split(pn).map((e) => {
|
|
1274
|
+
let n = mn(e.replace(/\u0000/g, "|").trim()).filter((e) => e && !!e.trim()), r = [];
|
|
1329
1275
|
for (let e = 0, i = n.length; e < i; e += 1) {
|
|
1330
1276
|
let i = n[e], a = !1, o = -1;
|
|
1331
|
-
for (; !a && ++o <
|
|
1332
|
-
let e =
|
|
1277
|
+
for (; !a && ++o < dn;) {
|
|
1278
|
+
let e = un[o], n = hn(i, e.multiRegex);
|
|
1333
1279
|
n && (r.push(e.create(n, t)), a = !0);
|
|
1334
1280
|
}
|
|
1335
|
-
if (!a) for (o = -1; ++o <
|
|
1336
|
-
let e =
|
|
1281
|
+
if (!a) for (o = -1; ++o < dn;) {
|
|
1282
|
+
let e = un[o], n = hn(i, e.singleRegex);
|
|
1337
1283
|
if (n) {
|
|
1338
1284
|
r.push(e.create(n, t));
|
|
1339
1285
|
break;
|
|
@@ -1343,8 +1289,8 @@ function Sn(e, t = {}) {
|
|
|
1343
1289
|
return r;
|
|
1344
1290
|
});
|
|
1345
1291
|
}
|
|
1346
|
-
var
|
|
1347
|
-
constructor(e, { isCaseSensitive: t =
|
|
1292
|
+
var _n = class {
|
|
1293
|
+
constructor(e, { isCaseSensitive: t = $.isCaseSensitive, ignoreDiacritics: n = $.ignoreDiacritics, includeMatches: r = $.includeMatches, minMatchCharLength: i = $.minMatchCharLength, ignoreLocation: a = $.ignoreLocation, findAllMatches: o = $.findAllMatches, location: s = $.location, threshold: c = $.threshold, distance: l = $.distance } = {}) {
|
|
1348
1294
|
this.query = null, this.options = {
|
|
1349
1295
|
isCaseSensitive: t,
|
|
1350
1296
|
ignoreDiacritics: n,
|
|
@@ -1355,7 +1301,7 @@ var Cn = class {
|
|
|
1355
1301
|
location: s,
|
|
1356
1302
|
threshold: c,
|
|
1357
1303
|
distance: l
|
|
1358
|
-
}, e = t ? e : e.toLowerCase(), e = n ?
|
|
1304
|
+
}, e = t ? e : e.toLowerCase(), e = n ? on(e) : e, this.pattern = e, this.query = gn(this.pattern, this.options);
|
|
1359
1305
|
}
|
|
1360
1306
|
static condition(e, t) {
|
|
1361
1307
|
return t.useExtendedSearch;
|
|
@@ -1367,14 +1313,14 @@ var Cn = class {
|
|
|
1367
1313
|
score: 1
|
|
1368
1314
|
};
|
|
1369
1315
|
let { includeMatches: n, isCaseSensitive: r, ignoreDiacritics: i } = this.options;
|
|
1370
|
-
e = r ? e : e.toLowerCase(), e = i ?
|
|
1316
|
+
e = r ? e : e.toLowerCase(), e = i ? on(e) : e;
|
|
1371
1317
|
let a = 0, o = [], s = 0, c = !1;
|
|
1372
1318
|
for (let r = 0, i = t.length; r < i; r += 1) {
|
|
1373
1319
|
let i = t[r];
|
|
1374
1320
|
o.length = 0, a = 0, c = !1;
|
|
1375
1321
|
for (let t = 0, r = i.length; t < r; t += 1) {
|
|
1376
1322
|
let r = i[t], { isMatch: l, indices: u, score: d } = r.search(e);
|
|
1377
|
-
if (l) a += 1, s += d,
|
|
1323
|
+
if (l) a += 1, s += d, ln(r.type) && (c = !0), n && (cn.has(r.type) ? o.push(...u) : o.push(u));
|
|
1378
1324
|
else {
|
|
1379
1325
|
s = 0, a = 0, o.length = 0, c = !1;
|
|
1380
1326
|
break;
|
|
@@ -1385,7 +1331,7 @@ var Cn = class {
|
|
|
1385
1331
|
isMatch: !0,
|
|
1386
1332
|
score: s / a
|
|
1387
1333
|
};
|
|
1388
|
-
return c && (e.hasInverse = !0), n && (e.indices =
|
|
1334
|
+
return c && (e.hasInverse = !0), n && (e.indices = nn(o)), e;
|
|
1389
1335
|
}
|
|
1390
1336
|
}
|
|
1391
1337
|
return {
|
|
@@ -1393,43 +1339,43 @@ var Cn = class {
|
|
|
1393
1339
|
score: 1
|
|
1394
1340
|
};
|
|
1395
1341
|
}
|
|
1396
|
-
},
|
|
1397
|
-
function
|
|
1398
|
-
|
|
1342
|
+
}, vn = [];
|
|
1343
|
+
function yn(...e) {
|
|
1344
|
+
vn.push(...e);
|
|
1399
1345
|
}
|
|
1400
|
-
function
|
|
1401
|
-
for (let n = 0, r =
|
|
1402
|
-
let r =
|
|
1346
|
+
function bn(e, t) {
|
|
1347
|
+
for (let n = 0, r = vn.length; n < r; n += 1) {
|
|
1348
|
+
let r = vn[n];
|
|
1403
1349
|
if (r.condition(e, t)) return new r(e, t);
|
|
1404
1350
|
}
|
|
1405
|
-
return new
|
|
1351
|
+
return new sn(e, t);
|
|
1406
1352
|
}
|
|
1407
|
-
var
|
|
1353
|
+
var xn = {
|
|
1408
1354
|
AND: "$and",
|
|
1409
1355
|
OR: "$or"
|
|
1410
|
-
},
|
|
1356
|
+
}, Sn = {
|
|
1411
1357
|
PATH: "$path",
|
|
1412
1358
|
PATTERN: "$val"
|
|
1413
|
-
},
|
|
1414
|
-
function
|
|
1359
|
+
}, Cn = (e) => !!(e[xn.AND] || e[xn.OR]), wn = (e) => !!e[Sn.PATH], Tn = (e) => !X(e) && Dt(e) && !Cn(e), En = (e) => ({ [xn.AND]: Object.keys(e).map((t) => ({ [t]: e[t] })) });
|
|
1360
|
+
function Dn(e, t, { auto: n = !0 } = {}) {
|
|
1415
1361
|
let r = (e) => {
|
|
1416
|
-
if (
|
|
1362
|
+
if (Z(e)) {
|
|
1417
1363
|
let r = {
|
|
1418
1364
|
keyId: null,
|
|
1419
1365
|
pattern: e
|
|
1420
1366
|
};
|
|
1421
|
-
return n && (r.searcher =
|
|
1367
|
+
return n && (r.searcher = bn(e, t)), r;
|
|
1422
1368
|
}
|
|
1423
|
-
let i = Object.keys(e), a =
|
|
1424
|
-
if (!a && i.length > 1 && !
|
|
1425
|
-
if (
|
|
1426
|
-
let r = a ? e[
|
|
1427
|
-
if (!
|
|
1369
|
+
let i = Object.keys(e), a = wn(e);
|
|
1370
|
+
if (!a && i.length > 1 && !Cn(e)) return r(En(e));
|
|
1371
|
+
if (Tn(e)) {
|
|
1372
|
+
let r = a ? e[Sn.PATH] : i[0], o = a ? e[Sn.PATTERN] : e[r];
|
|
1373
|
+
if (!Z(o)) throw Error(Nt(r));
|
|
1428
1374
|
let s = {
|
|
1429
|
-
keyId:
|
|
1375
|
+
keyId: Ht(r),
|
|
1430
1376
|
pattern: o
|
|
1431
1377
|
};
|
|
1432
|
-
return n && (s.searcher =
|
|
1378
|
+
return n && (s.searcher = bn(o, t)), s;
|
|
1433
1379
|
}
|
|
1434
1380
|
let o = {
|
|
1435
1381
|
children: [],
|
|
@@ -1437,26 +1383,26 @@ function Nn(e, t, { auto: n = !0 } = {}) {
|
|
|
1437
1383
|
};
|
|
1438
1384
|
return i.forEach((t) => {
|
|
1439
1385
|
let n = e[t];
|
|
1440
|
-
|
|
1386
|
+
X(n) && n.forEach((e) => {
|
|
1441
1387
|
o.children.push(r(e));
|
|
1442
1388
|
});
|
|
1443
1389
|
}), o;
|
|
1444
1390
|
};
|
|
1445
|
-
return
|
|
1391
|
+
return Cn(e) || (e = En(e)), r(e);
|
|
1446
1392
|
}
|
|
1447
|
-
function
|
|
1393
|
+
function On(e, { ignoreFieldNorm: t = $.ignoreFieldNorm }) {
|
|
1448
1394
|
let n = 1;
|
|
1449
1395
|
return e.forEach(({ key: e, norm: r, score: i }) => {
|
|
1450
1396
|
let a = e ? e.weight : null;
|
|
1451
1397
|
n *= (i === 0 && a ? 2 ** -52 : i) ** +((a || 1) * (t ? 1 : r));
|
|
1452
1398
|
}), n;
|
|
1453
1399
|
}
|
|
1454
|
-
function
|
|
1400
|
+
function kn(e, { ignoreFieldNorm: t = $.ignoreFieldNorm }) {
|
|
1455
1401
|
e.forEach((e) => {
|
|
1456
|
-
e.score =
|
|
1402
|
+
e.score = On(e.matches, { ignoreFieldNorm: t });
|
|
1457
1403
|
});
|
|
1458
1404
|
}
|
|
1459
|
-
var
|
|
1405
|
+
var An = class {
|
|
1460
1406
|
constructor(e, t) {
|
|
1461
1407
|
this.limit = e, this.heap = [], this.comparator = t;
|
|
1462
1408
|
}
|
|
@@ -1490,10 +1436,10 @@ var In = class {
|
|
|
1490
1436
|
} while (r !== e);
|
|
1491
1437
|
}
|
|
1492
1438
|
};
|
|
1493
|
-
function
|
|
1439
|
+
function jn(e) {
|
|
1494
1440
|
let t = [];
|
|
1495
1441
|
return e.matches.forEach((e) => {
|
|
1496
|
-
if (!
|
|
1442
|
+
if (!Q(e.indices) || !e.indices.length) return;
|
|
1497
1443
|
let n = {
|
|
1498
1444
|
indices: e.indices,
|
|
1499
1445
|
value: e.value
|
|
@@ -1501,20 +1447,20 @@ function Ln(e) {
|
|
|
1501
1447
|
e.key && (n.key = e.key.id), e.idx > -1 && (n.refIndex = e.idx), t.push(n);
|
|
1502
1448
|
}), t;
|
|
1503
1449
|
}
|
|
1504
|
-
function
|
|
1450
|
+
function Mn(e, t, { includeMatches: n = $.includeMatches, includeScore: r = $.includeScore } = {}) {
|
|
1505
1451
|
return e.map((e) => {
|
|
1506
1452
|
let { idx: i } = e, a = {
|
|
1507
1453
|
item: t[i],
|
|
1508
1454
|
refIndex: i
|
|
1509
1455
|
};
|
|
1510
|
-
return n && (a.matches =
|
|
1456
|
+
return n && (a.matches = jn(e)), r && (a.score = e.score), a;
|
|
1511
1457
|
});
|
|
1512
1458
|
}
|
|
1513
|
-
var
|
|
1514
|
-
function
|
|
1515
|
-
|
|
1459
|
+
var Nn = /[\p{L}\p{M}\p{N}_]+/gu, Pn = /* @__PURE__ */ new WeakSet();
|
|
1460
|
+
function Fn(e) {
|
|
1461
|
+
Pn.has(e) || (Pn.add(e), console.warn(`[Fuse] tokenize regex ${e} lacks the global flag; only the first match per text will be returned. Add the 'g' flag.`));
|
|
1516
1462
|
}
|
|
1517
|
-
function
|
|
1463
|
+
function In(e) {
|
|
1518
1464
|
if (typeof e == "function") {
|
|
1519
1465
|
let t = !1;
|
|
1520
1466
|
return (n) => {
|
|
@@ -1523,20 +1469,20 @@ function Hn(e) {
|
|
|
1523
1469
|
return r;
|
|
1524
1470
|
};
|
|
1525
1471
|
}
|
|
1526
|
-
return e instanceof RegExp ? (e.global ||
|
|
1472
|
+
return e instanceof RegExp ? (e.global || Fn(e), (t) => t.match(e) || []) : (e) => e.match(Nn) || [];
|
|
1527
1473
|
}
|
|
1528
|
-
function
|
|
1529
|
-
let r =
|
|
1474
|
+
function Ln({ isCaseSensitive: e = !1, ignoreDiacritics: t = !1, tokenize: n } = {}) {
|
|
1475
|
+
let r = In(n);
|
|
1530
1476
|
return { tokenize(n) {
|
|
1531
|
-
return e || (n = n.toLowerCase()), t && (n =
|
|
1477
|
+
return e || (n = n.toLowerCase()), t && (n = on(n)), r(n);
|
|
1532
1478
|
} };
|
|
1533
1479
|
}
|
|
1534
|
-
var
|
|
1480
|
+
var Rn = class {
|
|
1535
1481
|
static condition(e, t) {
|
|
1536
1482
|
return t.useTokenSearch;
|
|
1537
1483
|
}
|
|
1538
1484
|
constructor(e, t) {
|
|
1539
|
-
this.options = t, this.analyzer =
|
|
1485
|
+
this.options = t, this.analyzer = Ln({
|
|
1540
1486
|
isCaseSensitive: t.isCaseSensitive,
|
|
1541
1487
|
ignoreDiacritics: t.ignoreDiacritics,
|
|
1542
1488
|
tokenize: t.tokenize
|
|
@@ -1544,7 +1490,7 @@ var Wn = class {
|
|
|
1544
1490
|
let n = this.analyzer.tokenize(e), { df: r, fieldCount: i } = t._invertedIndex;
|
|
1545
1491
|
this.termSearchers = [], this.idfWeights = [];
|
|
1546
1492
|
for (let e of n) {
|
|
1547
|
-
this.termSearchers.push(new
|
|
1493
|
+
this.termSearchers.push(new sn(e, {
|
|
1548
1494
|
location: t.location,
|
|
1549
1495
|
threshold: t.threshold,
|
|
1550
1496
|
distance: t.distance,
|
|
@@ -1578,10 +1524,10 @@ var Wn = class {
|
|
|
1578
1524
|
isMatch: !0,
|
|
1579
1525
|
score: Math.max(.001, s)
|
|
1580
1526
|
};
|
|
1581
|
-
return this.options.includeMatches && t.length && (c.indices =
|
|
1527
|
+
return this.options.includeMatches && t.length && (c.indices = nn(t)), this.combineAll && (this.useMask ? c.matchedMask = a : c.matchedTerms = o, c.termCount = this.numTerms), c;
|
|
1582
1528
|
}
|
|
1583
1529
|
};
|
|
1584
|
-
function
|
|
1530
|
+
function zn(e, t, n, r) {
|
|
1585
1531
|
let i = r.tokenize(t);
|
|
1586
1532
|
if (!i.length) return;
|
|
1587
1533
|
e.fieldCount++, e.docFieldCount.set(n, (e.docFieldCount.get(n) || 0) + 1);
|
|
@@ -1589,34 +1535,34 @@ function Gn(e, t, n, r) {
|
|
|
1589
1535
|
o || (o = /* @__PURE__ */ new Map(), e.docTermFieldHits.set(n, o));
|
|
1590
1536
|
for (let t of a) o.set(t, (o.get(t) || 0) + 1), e.df.set(t, (e.df.get(t) || 0) + 1);
|
|
1591
1537
|
}
|
|
1592
|
-
function
|
|
1538
|
+
function Bn(e, t, n, r) {
|
|
1593
1539
|
let { i, v: a, $: o } = t;
|
|
1594
1540
|
if (a !== void 0) {
|
|
1595
|
-
|
|
1541
|
+
zn(e, a, i, r);
|
|
1596
1542
|
return;
|
|
1597
1543
|
}
|
|
1598
1544
|
if (o) for (let t = 0; t < n; t++) {
|
|
1599
1545
|
let n = o[t];
|
|
1600
1546
|
if (n) {
|
|
1601
|
-
if (Array.isArray(n)) for (let t of n)
|
|
1602
|
-
else
|
|
1547
|
+
if (Array.isArray(n)) for (let t of n) zn(e, t.v, i, r);
|
|
1548
|
+
else zn(e, n.v, i, r);
|
|
1603
1549
|
}
|
|
1604
1550
|
}
|
|
1605
1551
|
}
|
|
1606
|
-
function
|
|
1552
|
+
function Vn(e, t, n) {
|
|
1607
1553
|
let r = {
|
|
1608
1554
|
fieldCount: 0,
|
|
1609
1555
|
df: /* @__PURE__ */ new Map(),
|
|
1610
1556
|
docFieldCount: /* @__PURE__ */ new Map(),
|
|
1611
1557
|
docTermFieldHits: /* @__PURE__ */ new Map()
|
|
1612
1558
|
};
|
|
1613
|
-
for (let i of e)
|
|
1559
|
+
for (let i of e) Bn(r, i, t, n);
|
|
1614
1560
|
return r;
|
|
1615
1561
|
}
|
|
1616
|
-
function
|
|
1617
|
-
|
|
1562
|
+
function Hn(e, t, n, r) {
|
|
1563
|
+
Bn(e, t, n, r);
|
|
1618
1564
|
}
|
|
1619
|
-
function
|
|
1565
|
+
function Un(e, t) {
|
|
1620
1566
|
let n = e.docFieldCount.get(t);
|
|
1621
1567
|
if (n === void 0) return;
|
|
1622
1568
|
e.fieldCount -= n, e.docFieldCount.delete(t);
|
|
@@ -1629,10 +1575,10 @@ function Yn(e, t) {
|
|
|
1629
1575
|
e.docTermFieldHits.delete(t);
|
|
1630
1576
|
}
|
|
1631
1577
|
}
|
|
1632
|
-
function
|
|
1578
|
+
function Wn(e, t) {
|
|
1633
1579
|
if (t.length === 0) return;
|
|
1634
1580
|
let n = Array.from(new Set(t)).sort((e, t) => e - t);
|
|
1635
|
-
for (let t of n)
|
|
1581
|
+
for (let t of n) Un(e, t);
|
|
1636
1582
|
let r = (e) => {
|
|
1637
1583
|
let t = 0, r = n.length;
|
|
1638
1584
|
for (; t < r;) {
|
|
@@ -1647,47 +1593,47 @@ function Xn(e, t) {
|
|
|
1647
1593
|
for (let [t, n] of e.docTermFieldHits) o.set(t > i ? r(t) : t, n);
|
|
1648
1594
|
e.docTermFieldHits = o;
|
|
1649
1595
|
}
|
|
1650
|
-
var
|
|
1596
|
+
var Gn = class {
|
|
1651
1597
|
constructor(e, t, n) {
|
|
1652
1598
|
this.options = {
|
|
1653
|
-
|
|
1599
|
+
...$,
|
|
1654
1600
|
...t
|
|
1655
|
-
}, this.options.useExtendedSearch, this.options.useTokenSearch, this._keyStore = new
|
|
1601
|
+
}, this.options.useExtendedSearch, this.options.useTokenSearch, this._keyStore = new zt(this.options.keys), this._docs = e, this._myIndex = null, this._invertedIndex = null, this.setCollection(e, n), this._lastQuery = null, this._lastSearcher = null;
|
|
1656
1602
|
}
|
|
1657
1603
|
_getSearcher(e) {
|
|
1658
1604
|
if (this._lastQuery === e) return this._lastSearcher;
|
|
1659
|
-
let t =
|
|
1605
|
+
let t = bn(e, this._invertedIndex ? {
|
|
1660
1606
|
...this.options,
|
|
1661
1607
|
_invertedIndex: this._invertedIndex
|
|
1662
1608
|
} : this.options);
|
|
1663
1609
|
return this._lastQuery = e, this._lastSearcher = t, t;
|
|
1664
1610
|
}
|
|
1665
1611
|
setCollection(e, t) {
|
|
1666
|
-
if (this._docs = e, t && !(t instanceof
|
|
1667
|
-
if (this._myIndex = t ||
|
|
1612
|
+
if (this._docs = e, t && !(t instanceof Xt)) throw Error(jt);
|
|
1613
|
+
if (this._myIndex = t || Zt(this.options.keys, this._docs, {
|
|
1668
1614
|
getFn: this.options.getFn,
|
|
1669
1615
|
fieldNormWeight: this.options.fieldNormWeight
|
|
1670
1616
|
}), this.options.useTokenSearch) {
|
|
1671
|
-
let e =
|
|
1617
|
+
let e = Ln({
|
|
1672
1618
|
isCaseSensitive: this.options.isCaseSensitive,
|
|
1673
1619
|
ignoreDiacritics: this.options.ignoreDiacritics,
|
|
1674
1620
|
tokenize: this.options.tokenize
|
|
1675
1621
|
});
|
|
1676
|
-
this._invertedIndex =
|
|
1622
|
+
this._invertedIndex = Vn(this._myIndex.records, this._myIndex.keys.length, e);
|
|
1677
1623
|
}
|
|
1678
1624
|
this._invalidateSearcherCache();
|
|
1679
1625
|
}
|
|
1680
1626
|
add(e) {
|
|
1681
|
-
if (!
|
|
1627
|
+
if (!Q(e)) return;
|
|
1682
1628
|
this._docs.push(e);
|
|
1683
1629
|
let t = this._myIndex.add(e, this._docs.length - 1);
|
|
1684
1630
|
if (this._invertedIndex && t) {
|
|
1685
|
-
let e =
|
|
1631
|
+
let e = Ln({
|
|
1686
1632
|
isCaseSensitive: this.options.isCaseSensitive,
|
|
1687
1633
|
ignoreDiacritics: this.options.ignoreDiacritics,
|
|
1688
1634
|
tokenize: this.options.tokenize
|
|
1689
1635
|
});
|
|
1690
|
-
|
|
1636
|
+
Hn(this._invertedIndex, t, this._myIndex.keys.length, e);
|
|
1691
1637
|
}
|
|
1692
1638
|
this._invalidateSearcherCache();
|
|
1693
1639
|
}
|
|
@@ -1695,15 +1641,15 @@ var $ = class {
|
|
|
1695
1641
|
let t = [], n = [];
|
|
1696
1642
|
for (let r = 0, i = this._docs.length; r < i; r += 1) e(this._docs[r], r) && (t.push(this._docs[r]), n.push(r));
|
|
1697
1643
|
if (n.length) {
|
|
1698
|
-
this._invertedIndex &&
|
|
1644
|
+
this._invertedIndex && Wn(this._invertedIndex, n);
|
|
1699
1645
|
let e = new Set(n);
|
|
1700
1646
|
this._docs = this._docs.filter((t, n) => !e.has(n)), this._myIndex.removeAll(n), this._invalidateSearcherCache();
|
|
1701
1647
|
}
|
|
1702
1648
|
return t;
|
|
1703
1649
|
}
|
|
1704
1650
|
removeAt(e) {
|
|
1705
|
-
if (!Number.isInteger(e) || e < 0 || e >= this._docs.length) throw Error(
|
|
1706
|
-
this._invertedIndex &&
|
|
1651
|
+
if (!Number.isInteger(e) || e < 0 || e >= this._docs.length) throw Error(Mt);
|
|
1652
|
+
this._invertedIndex && Wn(this._invertedIndex, [e]);
|
|
1707
1653
|
let t = this._docs.splice(e, 1)[0];
|
|
1708
1654
|
return this._myIndex.removeAt(e), this._invalidateSearcherCache(), t;
|
|
1709
1655
|
}
|
|
@@ -1718,25 +1664,25 @@ var $ = class {
|
|
|
1718
1664
|
}
|
|
1719
1665
|
search(e, t) {
|
|
1720
1666
|
let { limit: n = -1 } = t || {}, { includeMatches: r, includeScore: i, shouldSort: a, sortFn: o, ignoreFieldNorm: s } = this.options;
|
|
1721
|
-
if (
|
|
1667
|
+
if (Z(e) && !e.trim()) {
|
|
1722
1668
|
let e = this._docs.map((e, t) => ({
|
|
1723
1669
|
item: e,
|
|
1724
1670
|
refIndex: t
|
|
1725
1671
|
}));
|
|
1726
|
-
return
|
|
1672
|
+
return Tt(n) && n > -1 && (e = e.slice(0, n)), e;
|
|
1727
1673
|
}
|
|
1728
|
-
let c = a &&
|
|
1674
|
+
let c = a && Tt(n) && n > 0 && Z(e), l = o, u = (e, t) => l(e, t) || e.idx - t.idx, d;
|
|
1729
1675
|
if (c) {
|
|
1730
|
-
let t = new
|
|
1731
|
-
|
|
1676
|
+
let t = new An(n, u);
|
|
1677
|
+
Z(this._docs[0]) ? this._searchStringList(e, {
|
|
1732
1678
|
heap: t,
|
|
1733
1679
|
ignoreFieldNorm: s
|
|
1734
1680
|
}) : this._searchObjectList(e, {
|
|
1735
1681
|
heap: t,
|
|
1736
1682
|
ignoreFieldNorm: s
|
|
1737
1683
|
}), d = t.extractSorted();
|
|
1738
|
-
} else d =
|
|
1739
|
-
return
|
|
1684
|
+
} else d = Z(e) ? Z(this._docs[0]) ? this._searchStringList(e) : this._searchObjectList(e) : this._searchLogical(e), kn(d, { ignoreFieldNorm: s }), a && d.sort(Z(e) ? u : l), Tt(n) && n > -1 && (d = d.slice(0, n));
|
|
1685
|
+
return Mn(d, this._docs, {
|
|
1740
1686
|
includeMatches: r,
|
|
1741
1687
|
includeScore: i
|
|
1742
1688
|
});
|
|
@@ -1744,7 +1690,7 @@ var $ = class {
|
|
|
1744
1690
|
_searchStringList(e, { heap: t, ignoreFieldNorm: n } = {}) {
|
|
1745
1691
|
let r = this._getSearcher(e), i = this.options.useTokenSearch && this.options.tokenMatch === "all", { records: a } = this._myIndex, o = t ? null : [];
|
|
1746
1692
|
return a.forEach(({ v: e, i: a, n: s }) => {
|
|
1747
|
-
if (!
|
|
1693
|
+
if (!Q(e)) return;
|
|
1748
1694
|
let c = r.searchIn(e);
|
|
1749
1695
|
if (c.isMatch) {
|
|
1750
1696
|
let r = {
|
|
@@ -1761,13 +1707,13 @@ var $ = class {
|
|
|
1761
1707
|
idx: a,
|
|
1762
1708
|
matches: l
|
|
1763
1709
|
};
|
|
1764
|
-
t ? (r.score =
|
|
1710
|
+
t ? (r.score = On(r.matches, { ignoreFieldNorm: n }), t.insert(r)) : o.push(r);
|
|
1765
1711
|
}
|
|
1766
1712
|
}
|
|
1767
1713
|
}), o;
|
|
1768
1714
|
}
|
|
1769
1715
|
_searchLogical(e) {
|
|
1770
|
-
let t =
|
|
1716
|
+
let t = Dn(e, this.options), n = this._normalizedKeys(), r = (e, t, i) => {
|
|
1771
1717
|
if (!("children" in e)) {
|
|
1772
1718
|
let { keyId: r, searcher: a } = e, o;
|
|
1773
1719
|
return r === null ? (o = [], n.forEach((e, n) => {
|
|
@@ -1790,12 +1736,12 @@ var $ = class {
|
|
|
1790
1736
|
for (let e = 0, n = a.length; e < n; e += 1) {
|
|
1791
1737
|
let n = a[e], c = r(n, t, i);
|
|
1792
1738
|
if (c.length) s.push(...c);
|
|
1793
|
-
else if (o ===
|
|
1739
|
+
else if (o === xn.AND) return [];
|
|
1794
1740
|
}
|
|
1795
1741
|
return s;
|
|
1796
1742
|
}, i = this._myIndex.records, a = /* @__PURE__ */ new Map(), o = [];
|
|
1797
1743
|
return i.forEach(({ $: e, i: n }) => {
|
|
1798
|
-
if (
|
|
1744
|
+
if (Q(e)) {
|
|
1799
1745
|
let i = r(t, e, n);
|
|
1800
1746
|
i.length && (a.has(n) || (a.set(n, {
|
|
1801
1747
|
idx: n,
|
|
@@ -1810,7 +1756,7 @@ var $ = class {
|
|
|
1810
1756
|
_searchObjectList(e, { heap: t, ignoreFieldNorm: n } = {}) {
|
|
1811
1757
|
let r = this._getSearcher(e), i = this.options.useTokenSearch && this.options.tokenMatch === "all", { records: a } = this._myIndex, o = this._normalizedKeys(), s = t ? null : [];
|
|
1812
1758
|
return a.forEach(({ $: e, i: a }) => {
|
|
1813
|
-
if (!
|
|
1759
|
+
if (!Q(e)) return;
|
|
1814
1760
|
let c = [], l = !1, u = !1;
|
|
1815
1761
|
if (o.forEach((t, n) => {
|
|
1816
1762
|
let i = this._findMatches({
|
|
@@ -1825,15 +1771,15 @@ var $ = class {
|
|
|
1825
1771
|
item: e,
|
|
1826
1772
|
matches: c
|
|
1827
1773
|
};
|
|
1828
|
-
t ? (r.score =
|
|
1774
|
+
t ? (r.score = On(r.matches, { ignoreFieldNorm: n }), t.insert(r)) : s.push(r);
|
|
1829
1775
|
}
|
|
1830
1776
|
}), s;
|
|
1831
1777
|
}
|
|
1832
1778
|
_findMatches({ key: e, value: t, searcher: n }) {
|
|
1833
|
-
if (!
|
|
1779
|
+
if (!Q(t)) return [];
|
|
1834
1780
|
let r = [];
|
|
1835
|
-
if (
|
|
1836
|
-
if (!
|
|
1781
|
+
if (X(t)) t.forEach(({ v: t, i, n: a }) => {
|
|
1782
|
+
if (!Q(t)) return;
|
|
1837
1783
|
let o = n.searchIn(t);
|
|
1838
1784
|
if (o.isMatch) {
|
|
1839
1785
|
let n = {
|
|
@@ -1880,17 +1826,17 @@ var $ = class {
|
|
|
1880
1826
|
return n.size === t;
|
|
1881
1827
|
}
|
|
1882
1828
|
};
|
|
1883
|
-
|
|
1884
|
-
if (n && n.useTokenSearch) throw Error(
|
|
1885
|
-
return
|
|
1886
|
-
|
|
1829
|
+
Gn.version = "7.5.0", Gn.createIndex = Zt, Gn.parseIndex = Qt, Gn.config = $, Gn.match = function(e, t, n) {
|
|
1830
|
+
if (n && n.useTokenSearch) throw Error(Lt);
|
|
1831
|
+
return bn(e, {
|
|
1832
|
+
...$,
|
|
1887
1833
|
...n
|
|
1888
1834
|
}).searchIn(t);
|
|
1889
|
-
},
|
|
1890
|
-
e.forEach((e) =>
|
|
1835
|
+
}, Gn.parseQuery = Dn, yn(_n), yn(Rn), Gn.use = function(...e) {
|
|
1836
|
+
e.forEach((e) => yn(e));
|
|
1891
1837
|
};
|
|
1892
|
-
var
|
|
1893
|
-
let { t: o } =
|
|
1838
|
+
var Kn = Gn, qn = ({ anchorEl: e, onChange: t, onClose: n, onEscapeKeyDown: r, open: i, searchMode: a }) => {
|
|
1839
|
+
let { t: o } = W(), s = [
|
|
1894
1840
|
{
|
|
1895
1841
|
label: o`Include match`,
|
|
1896
1842
|
searchMode: "include-match"
|
|
@@ -1911,51 +1857,51 @@ var Zn = $, Qn = ({ anchorEl: e, onChange: t, onClose: n, onEscapeKeyDown: r, op
|
|
|
1911
1857
|
label: o`Ends with`,
|
|
1912
1858
|
searchMode: "suffix-exact-match"
|
|
1913
1859
|
}
|
|
1914
|
-
], c =
|
|
1860
|
+
], c = z((e) => {
|
|
1915
1861
|
let r = e.currentTarget.dataset.searchMode;
|
|
1916
1862
|
r && (t(r), n());
|
|
1917
|
-
}, [t, n]), l =
|
|
1863
|
+
}, [t, n]), l = z((e) => {
|
|
1918
1864
|
e.key === "Escape" && (e.preventDefault(), e.stopPropagation(), r());
|
|
1919
1865
|
}, [r]);
|
|
1920
|
-
return /* @__PURE__ */
|
|
1866
|
+
return /* @__PURE__ */ G(me, {
|
|
1921
1867
|
anchorEl: e,
|
|
1922
1868
|
open: i,
|
|
1923
1869
|
placement: "bottom-end",
|
|
1924
1870
|
sx: { zIndex: (e) => e.zIndex.modal + 1 },
|
|
1925
|
-
children: /* @__PURE__ */
|
|
1871
|
+
children: /* @__PURE__ */ G(N, {
|
|
1926
1872
|
onClickAway: n,
|
|
1927
|
-
children: /* @__PURE__ */
|
|
1873
|
+
children: /* @__PURE__ */ K(pe, {
|
|
1928
1874
|
elevation: 8,
|
|
1929
1875
|
sx: { width: 280 },
|
|
1930
|
-
...
|
|
1876
|
+
...q.createAttributes("DashboardSearchSettings"),
|
|
1931
1877
|
children: [
|
|
1932
|
-
/* @__PURE__ */
|
|
1878
|
+
/* @__PURE__ */ G(de, {
|
|
1933
1879
|
autoFocusItem: i,
|
|
1934
1880
|
onKeyDown: l,
|
|
1935
|
-
children: s.map((e) => /* @__PURE__ */
|
|
1881
|
+
children: s.map((e) => /* @__PURE__ */ K(ue, {
|
|
1936
1882
|
"data-search-mode": e.searchMode,
|
|
1937
1883
|
onClick: c,
|
|
1938
1884
|
selected: e.searchMode === a,
|
|
1939
|
-
children: [/* @__PURE__ */
|
|
1885
|
+
children: [/* @__PURE__ */ G(ce, { children: e.searchMode === a && /* @__PURE__ */ G(rt, { fontSize: "small" }) }), /* @__PURE__ */ G(le, { children: e.label })]
|
|
1940
1886
|
}, e.searchMode))
|
|
1941
1887
|
}),
|
|
1942
|
-
/* @__PURE__ */
|
|
1943
|
-
/* @__PURE__ */
|
|
1888
|
+
/* @__PURE__ */ G(ae, {}),
|
|
1889
|
+
/* @__PURE__ */ K(j, {
|
|
1944
1890
|
sx: { p: 1.5 },
|
|
1945
1891
|
children: [
|
|
1946
|
-
/* @__PURE__ */
|
|
1892
|
+
/* @__PURE__ */ G(L, {
|
|
1947
1893
|
variant: "subtitle2",
|
|
1948
1894
|
children: o`Operators`
|
|
1949
1895
|
}),
|
|
1950
|
-
/* @__PURE__ */
|
|
1896
|
+
/* @__PURE__ */ G(L, {
|
|
1951
1897
|
variant: "body2",
|
|
1952
1898
|
children: o`Spaces combine terms with AND.`
|
|
1953
1899
|
}),
|
|
1954
|
-
/* @__PURE__ */
|
|
1900
|
+
/* @__PURE__ */ G(L, {
|
|
1955
1901
|
variant: "body2",
|
|
1956
1902
|
children: o`Use | between groups for OR.`
|
|
1957
1903
|
}),
|
|
1958
|
-
/* @__PURE__ */
|
|
1904
|
+
/* @__PURE__ */ G(L, {
|
|
1959
1905
|
variant: "body2",
|
|
1960
1906
|
children: o`Use double quotes for phrases with spaces.`
|
|
1961
1907
|
})
|
|
@@ -1965,7 +1911,7 @@ var Zn = $, Qn = ({ anchorEl: e, onChange: t, onClose: n, onEscapeKeyDown: r, op
|
|
|
1965
1911
|
})
|
|
1966
1912
|
})
|
|
1967
1913
|
});
|
|
1968
|
-
},
|
|
1914
|
+
}, Jn = (e, t) => {
|
|
1969
1915
|
switch (t) {
|
|
1970
1916
|
case "exact-match": return `=${e}`;
|
|
1971
1917
|
case "fuzzy-match": return e;
|
|
@@ -1974,13 +1920,13 @@ var Zn = $, Qn = ({ anchorEl: e, onChange: t, onClose: n, onEscapeKeyDown: r, op
|
|
|
1974
1920
|
case "suffix-exact-match": return `${e}$`;
|
|
1975
1921
|
default: return `'${e}`;
|
|
1976
1922
|
}
|
|
1977
|
-
},
|
|
1978
|
-
let e =
|
|
1923
|
+
}, Yn = () => {
|
|
1924
|
+
let e = H(null), t = H(null), r = H(null), i = H(!1), s = H(null), l = H(null), u = H(null), d = R(c), f = o(d, (e) => e.sortedData), p = o(d, (e) => e.completeCaseType), m = _e(), { t: h } = W(), [g, _] = U(""), [v, y] = U(null), [b, x] = U([]), [C, w] = U(!1), [T, E] = U(-1), [ee, te] = U("include-match"), [D, O] = U(null), k = R(S), ne = null;
|
|
1979
1925
|
g && (ne = b.length ? T < 0 ? h("{{numResults}} results", { numResults: b.length }) : h("{{current}}/{{numResults}} results", {
|
|
1980
1926
|
current: T + 1,
|
|
1981
1927
|
numResults: b.length
|
|
1982
1928
|
}) : h`No results`);
|
|
1983
|
-
let A =
|
|
1929
|
+
let A = z(() => {
|
|
1984
1930
|
let e = [];
|
|
1985
1931
|
return f.forEach((t) => {
|
|
1986
1932
|
let r = { id: t.id };
|
|
@@ -1992,7 +1938,7 @@ var Zn = $, Qn = ({ anchorEl: e, onChange: t, onClose: n, onEscapeKeyDown: r, op
|
|
|
1992
1938
|
let o = n.getRowValue({ [e]: t }, i, p);
|
|
1993
1939
|
o.isMissing || (a.concept_set_id || (r[`${e}-raw`] = o.raw), o.full !== o.raw && (r[`${e}-full`] = o.full), o.long !== o.raw && o.long !== o.full && (r[`${e}-long`] = o.long), o.short !== o.raw && o.short !== o.full && o.short !== o.long && (r[`${e}-short`] = o.short));
|
|
1994
1940
|
}), e.push(r);
|
|
1995
|
-
}), new
|
|
1941
|
+
}), new Kn(e, {
|
|
1996
1942
|
ignoreDiacritics: !0,
|
|
1997
1943
|
ignoreLocation: !1,
|
|
1998
1944
|
includeMatches: !0,
|
|
@@ -2007,17 +1953,17 @@ var Zn = $, Qn = ({ anchorEl: e, onChange: t, onClose: n, onEscapeKeyDown: r, op
|
|
|
2007
1953
|
threshold: .3,
|
|
2008
1954
|
useExtendedSearch: !0
|
|
2009
1955
|
});
|
|
2010
|
-
}, [p, f]),
|
|
1956
|
+
}, [p, f]), re = z(() => {
|
|
2011
1957
|
if (v) return v;
|
|
2012
1958
|
let e = A();
|
|
2013
1959
|
return y(e), e;
|
|
2014
|
-
}, [A, v]),
|
|
1960
|
+
}, [A, v]), ie = z((e) => {
|
|
2015
1961
|
let t = e.target.value;
|
|
2016
|
-
_(t), t &&
|
|
2017
|
-
}, [
|
|
2018
|
-
|
|
1962
|
+
_(t), t && re();
|
|
1963
|
+
}, [re]);
|
|
1964
|
+
B(() => {
|
|
2019
1965
|
_(""), w(!1), y(null), x([]), E(-1);
|
|
2020
|
-
}, [p, f]),
|
|
1966
|
+
}, [p, f]), B(() => {
|
|
2021
1967
|
if (!g) {
|
|
2022
1968
|
x([]), E(-1), k.highlight({
|
|
2023
1969
|
caseIds: [],
|
|
@@ -2026,7 +1972,7 @@ var Zn = $, Qn = ({ anchorEl: e, onChange: t, onClose: n, onEscapeKeyDown: r, op
|
|
|
2026
1972
|
return;
|
|
2027
1973
|
}
|
|
2028
1974
|
if (!v) return;
|
|
2029
|
-
let e =
|
|
1975
|
+
let e = Jn(g, ee), t = v.search(e).sort((e, t) => e.refIndex - t.refIndex);
|
|
2030
1976
|
x(t), E(-1);
|
|
2031
1977
|
}, [
|
|
2032
1978
|
k,
|
|
@@ -2034,32 +1980,32 @@ var Zn = $, Qn = ({ anchorEl: e, onChange: t, onClose: n, onEscapeKeyDown: r, op
|
|
|
2034
1980
|
ee,
|
|
2035
1981
|
g
|
|
2036
1982
|
]);
|
|
2037
|
-
let
|
|
1983
|
+
let M = z(() => {
|
|
2038
1984
|
w(!0);
|
|
2039
1985
|
}, []);
|
|
2040
|
-
|
|
1986
|
+
B(() => {
|
|
2041
1987
|
C ? e.current?.focus() : i.current && (i.current = !1, t.current?.focus());
|
|
2042
1988
|
}, [C]);
|
|
2043
|
-
let
|
|
1989
|
+
let N = z(() => {
|
|
2044
1990
|
i.current = !0, w(!1), _(""), x([]), E(-1), k.highlight({
|
|
2045
1991
|
caseIds: [],
|
|
2046
1992
|
origin: a.SEARCH_BOX
|
|
2047
1993
|
});
|
|
2048
|
-
}, [k]), ae =
|
|
2049
|
-
|
|
2050
|
-
}, [
|
|
2051
|
-
e.key === "Escape" && (e.preventDefault(),
|
|
2052
|
-
}, [
|
|
1994
|
+
}, [k]), ae = z(() => {
|
|
1995
|
+
N();
|
|
1996
|
+
}, [N]), P = z((e) => {
|
|
1997
|
+
e.key === "Escape" && (e.preventDefault(), N());
|
|
1998
|
+
}, [N]), se = z((e) => {
|
|
2053
1999
|
if (e.key === "Enter") {
|
|
2054
2000
|
if (!b?.length) return;
|
|
2055
2001
|
e.preventDefault(), E(0), l.current?.focus();
|
|
2056
2002
|
}
|
|
2057
|
-
}, [b]),
|
|
2003
|
+
}, [b]), ce = z(() => {
|
|
2058
2004
|
b?.length && E((e) => e <= 0 ? b.length - 1 : e - 1);
|
|
2059
|
-
}, [b]),
|
|
2005
|
+
}, [b]), le = z(() => {
|
|
2060
2006
|
b?.length && E((e) => e >= b.length - 1 ? 0 : e + 1);
|
|
2061
2007
|
}, [b]);
|
|
2062
|
-
|
|
2008
|
+
B(() => {
|
|
2063
2009
|
if (!b?.length || T < 0 || T >= b.length) {
|
|
2064
2010
|
k.highlight({
|
|
2065
2011
|
caseIds: [],
|
|
@@ -2077,7 +2023,7 @@ var Zn = $, Qn = ({ anchorEl: e, onChange: t, onClose: n, onEscapeKeyDown: r, op
|
|
|
2077
2023
|
b,
|
|
2078
2024
|
T
|
|
2079
2025
|
]);
|
|
2080
|
-
let I =
|
|
2026
|
+
let I = z((t) => {
|
|
2081
2027
|
if (t.key === "ArrowRight") {
|
|
2082
2028
|
t.preventDefault();
|
|
2083
2029
|
let e = t.currentTarget.nextElementSibling;
|
|
@@ -2091,90 +2037,90 @@ var Zn = $, Qn = ({ anchorEl: e, onChange: t, onClose: n, onEscapeKeyDown: r, op
|
|
|
2091
2037
|
let n = t.currentTarget.previousElementSibling;
|
|
2092
2038
|
n && n.focus();
|
|
2093
2039
|
}
|
|
2094
|
-
}, []),
|
|
2040
|
+
}, []), ue = z(() => {
|
|
2095
2041
|
O(r.current);
|
|
2096
|
-
}, []),
|
|
2042
|
+
}, []), de = z(() => {
|
|
2097
2043
|
O(null);
|
|
2098
|
-
}, []),
|
|
2044
|
+
}, []), pe = z(() => {
|
|
2099
2045
|
O(null), r.current?.focus();
|
|
2100
|
-
}, []),
|
|
2101
|
-
|
|
2046
|
+
}, []), me = z((t) => {
|
|
2047
|
+
te(t), e.current?.focus();
|
|
2102
2048
|
}, []);
|
|
2103
|
-
return /* @__PURE__ */
|
|
2049
|
+
return /* @__PURE__ */ G(j, {
|
|
2104
2050
|
sx: {
|
|
2105
2051
|
height: m.spacing(4),
|
|
2106
2052
|
maxWidth: m.spacing(60),
|
|
2107
2053
|
overflow: "hidden",
|
|
2108
2054
|
width: "calc(100% / 2)"
|
|
2109
2055
|
},
|
|
2110
|
-
...
|
|
2111
|
-
children: C ? /* @__PURE__ */
|
|
2112
|
-
onKeyDown:
|
|
2113
|
-
children: /* @__PURE__ */
|
|
2114
|
-
endAdornment: /* @__PURE__ */
|
|
2056
|
+
...q.createAttributes("DashboardSearch"),
|
|
2057
|
+
children: C ? /* @__PURE__ */ G(j, {
|
|
2058
|
+
onKeyDown: P,
|
|
2059
|
+
children: /* @__PURE__ */ G(fe, {
|
|
2060
|
+
endAdornment: /* @__PURE__ */ K(oe, {
|
|
2115
2061
|
position: "end",
|
|
2116
2062
|
children: [
|
|
2117
|
-
ne && /* @__PURE__ */
|
|
2063
|
+
ne && /* @__PURE__ */ G(j, {
|
|
2118
2064
|
"aria-atomic": "true",
|
|
2119
2065
|
"aria-live": "polite",
|
|
2120
2066
|
role: "status",
|
|
2121
2067
|
children: ne
|
|
2122
2068
|
}),
|
|
2123
|
-
/* @__PURE__ */
|
|
2124
|
-
...
|
|
2069
|
+
/* @__PURE__ */ G(F, {
|
|
2070
|
+
...q.createAttributes("DashboardSearch-PreviousButton"),
|
|
2125
2071
|
"aria-label": h`Goto previous search result`,
|
|
2126
2072
|
disabled: !b?.length,
|
|
2127
2073
|
edge: "end",
|
|
2128
|
-
onClick:
|
|
2074
|
+
onClick: ce,
|
|
2129
2075
|
onKeyDown: I,
|
|
2130
2076
|
ref: s,
|
|
2131
2077
|
sx: { color: m.palette.primary.main },
|
|
2132
|
-
children: /* @__PURE__ */
|
|
2078
|
+
children: /* @__PURE__ */ G($e, {})
|
|
2133
2079
|
}),
|
|
2134
|
-
/* @__PURE__ */
|
|
2135
|
-
...
|
|
2080
|
+
/* @__PURE__ */ G(F, {
|
|
2081
|
+
...q.createAttributes("DashboardSearch-NextButton"),
|
|
2136
2082
|
"aria-label": h`Goto next search result`,
|
|
2137
2083
|
disabled: !b?.length,
|
|
2138
2084
|
edge: "end",
|
|
2139
|
-
onClick:
|
|
2085
|
+
onClick: le,
|
|
2140
2086
|
onKeyDown: I,
|
|
2141
2087
|
ref: l,
|
|
2142
2088
|
sx: { color: m.palette.primary.main },
|
|
2143
|
-
children: /* @__PURE__ */
|
|
2089
|
+
children: /* @__PURE__ */ G(et, {})
|
|
2144
2090
|
}),
|
|
2145
|
-
/* @__PURE__ */
|
|
2146
|
-
...
|
|
2091
|
+
/* @__PURE__ */ G(F, {
|
|
2092
|
+
...q.createAttributes("DashboardSearch-SettingsButton"),
|
|
2147
2093
|
"aria-label": h`Open settings`,
|
|
2148
2094
|
edge: "end",
|
|
2149
|
-
onClick:
|
|
2095
|
+
onClick: ue,
|
|
2150
2096
|
onKeyDown: I,
|
|
2151
2097
|
ref: r,
|
|
2152
|
-
children: /* @__PURE__ */
|
|
2098
|
+
children: /* @__PURE__ */ G(tt, {})
|
|
2153
2099
|
}),
|
|
2154
|
-
/* @__PURE__ */
|
|
2155
|
-
anchorEl:
|
|
2156
|
-
onChange:
|
|
2157
|
-
onClose:
|
|
2158
|
-
onEscapeKeyDown:
|
|
2159
|
-
open: !!
|
|
2100
|
+
/* @__PURE__ */ G(qn, {
|
|
2101
|
+
anchorEl: D,
|
|
2102
|
+
onChange: me,
|
|
2103
|
+
onClose: de,
|
|
2104
|
+
onEscapeKeyDown: pe,
|
|
2105
|
+
open: !!D,
|
|
2160
2106
|
searchMode: ee
|
|
2161
2107
|
}),
|
|
2162
|
-
/* @__PURE__ */
|
|
2163
|
-
...
|
|
2108
|
+
/* @__PURE__ */ G(F, {
|
|
2109
|
+
...q.createAttributes("DashboardSearch-CloseButton"),
|
|
2164
2110
|
"aria-label": h`Close search`,
|
|
2165
2111
|
edge: "end",
|
|
2166
2112
|
onClick: ae,
|
|
2167
2113
|
onKeyDown: I,
|
|
2168
2114
|
ref: u,
|
|
2169
|
-
children: /* @__PURE__ */
|
|
2115
|
+
children: /* @__PURE__ */ G(nt, {})
|
|
2170
2116
|
})
|
|
2171
2117
|
]
|
|
2172
2118
|
}),
|
|
2173
2119
|
fullWidth: !0,
|
|
2174
2120
|
inputRef: e,
|
|
2175
2121
|
name: h`Search listed cases`,
|
|
2176
|
-
onChange:
|
|
2177
|
-
onKeyDown:
|
|
2122
|
+
onChange: ie,
|
|
2123
|
+
onKeyDown: se,
|
|
2178
2124
|
placeholder: h`Search listed cases`,
|
|
2179
2125
|
size: "small",
|
|
2180
2126
|
slotProps: { input: {
|
|
@@ -2194,34 +2140,34 @@ var Zn = $, Qn = ({ anchorEl: e, onChange: t, onClose: n, onEscapeKeyDown: r, op
|
|
|
2194
2140
|
type: "search",
|
|
2195
2141
|
value: g
|
|
2196
2142
|
})
|
|
2197
|
-
}) : /* @__PURE__ */
|
|
2143
|
+
}) : /* @__PURE__ */ G(j, {
|
|
2198
2144
|
sx: {
|
|
2199
2145
|
justifySelf: "flex-end",
|
|
2200
2146
|
marginRight: m.spacing(.6),
|
|
2201
2147
|
marginTop: m.spacing(.5)
|
|
2202
2148
|
},
|
|
2203
|
-
children: /* @__PURE__ */
|
|
2149
|
+
children: /* @__PURE__ */ G(F, {
|
|
2204
2150
|
"aria-label": h`Search`,
|
|
2205
2151
|
edge: "end",
|
|
2206
|
-
onClick:
|
|
2152
|
+
onClick: M,
|
|
2207
2153
|
ref: t,
|
|
2208
2154
|
sx: {
|
|
2209
2155
|
color: m.palette.primary.main,
|
|
2210
2156
|
margin: 0,
|
|
2211
2157
|
padding: 0
|
|
2212
2158
|
},
|
|
2213
|
-
children: /* @__PURE__ */
|
|
2159
|
+
children: /* @__PURE__ */ G(Qe, {})
|
|
2214
2160
|
})
|
|
2215
2161
|
})
|
|
2216
2162
|
});
|
|
2217
|
-
},
|
|
2218
|
-
let { t } =
|
|
2219
|
-
|
|
2220
|
-
}, [
|
|
2221
|
-
|
|
2163
|
+
}, Xn = ({ caseSet: e }) => {
|
|
2164
|
+
let { t } = W(), n = _e(), r = H(null), i = H(null), a = H(null), s = H(null), l = H(null), f = H(null), p = H(null), S = H(null), T = H(null), E = H(null), ee = H(null), [te, D] = U(!1), [O, k] = U(!1), [ne, M] = U(!1), N = R(c), ae = o(N, d((e) => e.fetchData)), P = o(N, (e) => e.completeCaseType), F = o(N, (e) => e.filters.filter((e) => !e.isInitialFilterValue()).length), oe = o(N, (e) => e.isMaxResultsExceeded), se = o(N, (e) => e.isMaxResultsExceededDismissed), ce = z(() => {
|
|
2165
|
+
N.setState({ isMaxResultsExceededDismissed: !0 });
|
|
2166
|
+
}, [N]);
|
|
2167
|
+
B(() => {
|
|
2222
2168
|
let e = u.getInstance(), t = [
|
|
2223
2169
|
e.addEventListener("onEventCreated", () => {
|
|
2224
|
-
|
|
2170
|
+
ae();
|
|
2225
2171
|
}),
|
|
2226
2172
|
e.addEventListener("openAddCasesToEventDialog", (...e) => E.current?.open(...e)),
|
|
2227
2173
|
e.addEventListener("openCaseInfoDialog", (...e) => f.current?.open(...e)),
|
|
@@ -2231,28 +2177,28 @@ var Zn = $, Qn = ({ anchorEl: e, onChange: t, onClose: n, onEscapeKeyDown: r, op
|
|
|
2231
2177
|
e.addEventListener("openRemoveFindSimilarCasesResultDialog", (...e) => ee.current?.open(...e)),
|
|
2232
2178
|
e.addEventListener("openRemoveCasesFromEventDialog", (...e) => T.current?.open(...e)),
|
|
2233
2179
|
e.addEventListener("openSequenceDownloadDialog", (...e) => l.current?.open(...e)),
|
|
2234
|
-
e.addEventListener("openFiltersMenu", () =>
|
|
2180
|
+
e.addEventListener("openFiltersMenu", () => D(!0))
|
|
2235
2181
|
];
|
|
2236
2182
|
return () => {
|
|
2237
2183
|
t.forEach((e) => e());
|
|
2238
2184
|
};
|
|
2239
|
-
}, [
|
|
2185
|
+
}, [ae]), B(() => {
|
|
2240
2186
|
let e = [
|
|
2241
|
-
|
|
2187
|
+
Ve.getInstance().registerShortcut({
|
|
2242
2188
|
callback: () => {
|
|
2243
|
-
|
|
2189
|
+
D((e) => !e);
|
|
2244
2190
|
},
|
|
2245
2191
|
key: "f",
|
|
2246
2192
|
modifier: null
|
|
2247
2193
|
}),
|
|
2248
|
-
|
|
2194
|
+
Ve.getInstance().registerShortcut({
|
|
2249
2195
|
callback: () => {
|
|
2250
2196
|
k((e) => !e);
|
|
2251
2197
|
},
|
|
2252
2198
|
key: "s",
|
|
2253
2199
|
modifier: null
|
|
2254
2200
|
}),
|
|
2255
|
-
|
|
2201
|
+
Ve.getInstance().registerShortcut({
|
|
2256
2202
|
callback: () => {
|
|
2257
2203
|
a.current.open();
|
|
2258
2204
|
},
|
|
@@ -2264,129 +2210,129 @@ var Zn = $, Qn = ({ anchorEl: e, onChange: t, onClose: n, onEscapeKeyDown: r, op
|
|
|
2264
2210
|
e.forEach((e) => e());
|
|
2265
2211
|
};
|
|
2266
2212
|
}, []);
|
|
2267
|
-
let
|
|
2268
|
-
|
|
2269
|
-
}, []),
|
|
2270
|
-
|
|
2271
|
-
}, []),
|
|
2213
|
+
let le = z(() => {
|
|
2214
|
+
D(!1);
|
|
2215
|
+
}, []), I = z(() => {
|
|
2216
|
+
D(!0);
|
|
2217
|
+
}, []), ue = z(() => {
|
|
2272
2218
|
k(!1);
|
|
2273
|
-
}, []),
|
|
2274
|
-
|
|
2275
|
-
}, []),
|
|
2219
|
+
}, []), de = z(() => {
|
|
2220
|
+
M(!1);
|
|
2221
|
+
}, []), fe = z(() => {
|
|
2276
2222
|
k(!0);
|
|
2277
|
-
}, []),
|
|
2278
|
-
|
|
2279
|
-
}, []),
|
|
2223
|
+
}, []), pe = z(() => {
|
|
2224
|
+
M(!0);
|
|
2225
|
+
}, []), me = z(() => {
|
|
2280
2226
|
a.current.open();
|
|
2281
|
-
}, []),
|
|
2227
|
+
}, []), he = z(() => {
|
|
2282
2228
|
i.current.open({
|
|
2283
2229
|
caseSetId: e?.id,
|
|
2284
|
-
caseTypeId:
|
|
2230
|
+
caseTypeId: P?.id
|
|
2285
2231
|
});
|
|
2286
|
-
}, [e?.id,
|
|
2232
|
+
}, [e?.id, P?.id]), L = z(() => {
|
|
2287
2233
|
r.current?.reset();
|
|
2288
|
-
}, []), ge =
|
|
2289
|
-
return /* @__PURE__ */
|
|
2290
|
-
/* @__PURE__ */
|
|
2291
|
-
/* @__PURE__ */
|
|
2234
|
+
}, []), ge = V(() => !!oe && !se, [se, oe]), ve = A.getInstance().config.dashboard.DASHBOARD_INJECTED_COMPONENT;
|
|
2235
|
+
return /* @__PURE__ */ K(we, { children: [
|
|
2236
|
+
/* @__PURE__ */ K(ze, { children: [
|
|
2237
|
+
/* @__PURE__ */ G(Be, {
|
|
2292
2238
|
badgeColor: "secondary",
|
|
2293
|
-
badgeContent:
|
|
2239
|
+
badgeContent: F,
|
|
2294
2240
|
first: !0,
|
|
2295
|
-
icon: /* @__PURE__ */
|
|
2296
|
-
onClick:
|
|
2241
|
+
icon: /* @__PURE__ */ G(Ne, {}),
|
|
2242
|
+
onClick: I,
|
|
2297
2243
|
testIdAttributes: { name: "filters" },
|
|
2298
2244
|
title: t`Open filters`
|
|
2299
2245
|
}),
|
|
2300
|
-
/* @__PURE__ */
|
|
2246
|
+
/* @__PURE__ */ G(Be, {
|
|
2301
2247
|
badgeColor: "secondary",
|
|
2302
|
-
icon: /* @__PURE__ */
|
|
2303
|
-
onClick:
|
|
2248
|
+
icon: /* @__PURE__ */ G(pt, {}),
|
|
2249
|
+
onClick: fe,
|
|
2304
2250
|
testIdAttributes: { name: "dashboard" },
|
|
2305
2251
|
title: t`Change dashboard layout`
|
|
2306
2252
|
}),
|
|
2307
|
-
/* @__PURE__ */
|
|
2308
|
-
icon: /* @__PURE__ */
|
|
2309
|
-
onClick:
|
|
2253
|
+
/* @__PURE__ */ G(Be, {
|
|
2254
|
+
icon: /* @__PURE__ */ G(Ie, {}),
|
|
2255
|
+
onClick: me,
|
|
2310
2256
|
testIdAttributes: { name: "case" },
|
|
2311
2257
|
title: t`Show case type information`
|
|
2312
2258
|
}),
|
|
2313
|
-
e && /* @__PURE__ */
|
|
2314
|
-
icon: /* @__PURE__ */
|
|
2315
|
-
onClick:
|
|
2259
|
+
e && /* @__PURE__ */ G(Be, {
|
|
2260
|
+
icon: /* @__PURE__ */ G(m, {}),
|
|
2261
|
+
onClick: he,
|
|
2316
2262
|
testIdAttributes: { name: "event" },
|
|
2317
2263
|
title: t`Show event information`
|
|
2318
2264
|
}),
|
|
2319
|
-
/* @__PURE__ */
|
|
2320
|
-
icon: /* @__PURE__ */
|
|
2321
|
-
onClick:
|
|
2265
|
+
/* @__PURE__ */ G(Be, {
|
|
2266
|
+
icon: /* @__PURE__ */ G(bt, {}),
|
|
2267
|
+
onClick: pe,
|
|
2322
2268
|
testIdAttributes: { name: "download" },
|
|
2323
2269
|
title: t`Download`
|
|
2324
2270
|
}),
|
|
2325
|
-
/* @__PURE__ */
|
|
2326
|
-
onClose: L,
|
|
2327
|
-
open: D
|
|
2328
|
-
}),
|
|
2329
|
-
/* @__PURE__ */ K(_t, {
|
|
2271
|
+
/* @__PURE__ */ G(Me, {
|
|
2330
2272
|
onClose: le,
|
|
2331
|
-
|
|
2332
|
-
open: O
|
|
2273
|
+
open: te
|
|
2333
2274
|
}),
|
|
2334
|
-
/* @__PURE__ */
|
|
2335
|
-
e && /* @__PURE__ */ K(h, { ref: i }),
|
|
2336
|
-
/* @__PURE__ */ K(Ot, {
|
|
2275
|
+
/* @__PURE__ */ G(ht, {
|
|
2337
2276
|
onClose: ue,
|
|
2277
|
+
onReset: L,
|
|
2278
|
+
open: O
|
|
2279
|
+
}),
|
|
2280
|
+
/* @__PURE__ */ G(g, { ref: a }),
|
|
2281
|
+
e && /* @__PURE__ */ G(h, { ref: i }),
|
|
2282
|
+
/* @__PURE__ */ G(St, {
|
|
2283
|
+
onClose: de,
|
|
2338
2284
|
open: ne
|
|
2339
2285
|
})
|
|
2340
2286
|
] }),
|
|
2341
|
-
/* @__PURE__ */
|
|
2287
|
+
/* @__PURE__ */ K(j, {
|
|
2342
2288
|
sx: {
|
|
2343
2289
|
display: "grid",
|
|
2344
2290
|
gridTemplateRows: `${ge ? "max-content " : ""}max-content auto`,
|
|
2345
2291
|
height: "100%",
|
|
2346
|
-
paddingLeft: n.spacing(
|
|
2292
|
+
paddingLeft: n.spacing(A.getInstance().config.layout.SIDEBAR_MENU_WIDTH + 1),
|
|
2347
2293
|
width: "100%"
|
|
2348
2294
|
},
|
|
2349
2295
|
children: [
|
|
2350
|
-
ge && /* @__PURE__ */
|
|
2296
|
+
ge && /* @__PURE__ */ G(j, {
|
|
2351
2297
|
sx: { marginY: n.spacing(1) },
|
|
2352
|
-
children: /* @__PURE__ */
|
|
2353
|
-
onClose:
|
|
2298
|
+
children: /* @__PURE__ */ K(re, {
|
|
2299
|
+
onClose: ce,
|
|
2354
2300
|
severity: "warning",
|
|
2355
2301
|
sx: { width: "100%" },
|
|
2356
|
-
children: [/* @__PURE__ */
|
|
2357
|
-
caseTypeName:
|
|
2358
|
-
maxResultsForCaseType:
|
|
2302
|
+
children: [/* @__PURE__ */ G(ie, { children: t`Maximum number of results exceeded` }), t("The maximum number of results for {{caseTypeName}} ({{maxResultsForCaseType}}) has been exceeded. Refine your filters to reduce the number of results.", {
|
|
2303
|
+
caseTypeName: P.name,
|
|
2304
|
+
maxResultsForCaseType: P.props.read_max_n_cases
|
|
2359
2305
|
})]
|
|
2360
2306
|
})
|
|
2361
2307
|
}),
|
|
2362
|
-
/* @__PURE__ */
|
|
2308
|
+
/* @__PURE__ */ K(j, {
|
|
2363
2309
|
sx: {
|
|
2364
2310
|
display: "flex",
|
|
2365
2311
|
justifyContent: "space-between"
|
|
2366
2312
|
},
|
|
2367
|
-
children: [/* @__PURE__ */
|
|
2313
|
+
children: [/* @__PURE__ */ G(C, {}), /* @__PURE__ */ G(Yn, {})]
|
|
2368
2314
|
}),
|
|
2369
|
-
/* @__PURE__ */
|
|
2370
|
-
disabled:
|
|
2315
|
+
/* @__PURE__ */ G(j, { children: /* @__PURE__ */ G(yt, {
|
|
2316
|
+
disabled: te || O,
|
|
2371
2317
|
ref: r
|
|
2372
2318
|
}) })
|
|
2373
2319
|
]
|
|
2374
2320
|
}),
|
|
2375
|
-
/* @__PURE__ */
|
|
2376
|
-
/* @__PURE__ */
|
|
2377
|
-
/* @__PURE__ */
|
|
2378
|
-
/* @__PURE__ */
|
|
2379
|
-
/* @__PURE__ */
|
|
2380
|
-
/* @__PURE__ */
|
|
2381
|
-
/* @__PURE__ */
|
|
2382
|
-
/* @__PURE__ */
|
|
2383
|
-
|
|
2321
|
+
/* @__PURE__ */ G(Le, { ref: s }),
|
|
2322
|
+
/* @__PURE__ */ G(w, { ref: p }),
|
|
2323
|
+
/* @__PURE__ */ G(ct, { ref: ee }),
|
|
2324
|
+
/* @__PURE__ */ G(x, { ref: l }),
|
|
2325
|
+
/* @__PURE__ */ G(v, { ref: f }),
|
|
2326
|
+
/* @__PURE__ */ G(y, { ref: S }),
|
|
2327
|
+
/* @__PURE__ */ G(b, { ref: T }),
|
|
2328
|
+
/* @__PURE__ */ G(_, { ref: E }),
|
|
2329
|
+
ve && /* @__PURE__ */ G(ve, {})
|
|
2384
2330
|
] });
|
|
2385
|
-
},
|
|
2386
|
-
let n =
|
|
2331
|
+
}, Zn = ({ caseSet: e, children: t }) => {
|
|
2332
|
+
let n = R(T), r = V(() => new it({
|
|
2387
2333
|
caseIds: [],
|
|
2388
2334
|
origin: null
|
|
2389
|
-
}), []), i =
|
|
2335
|
+
}), []), i = V(() => new it(), []), a = V(() => new it(), []), o = z(() => {
|
|
2390
2336
|
r.next({
|
|
2391
2337
|
caseIds: [],
|
|
2392
2338
|
origin: null
|
|
@@ -2395,9 +2341,9 @@ var Zn = $, Qn = ({ anchorEl: e, onChange: t, onClose: n, onEscapeKeyDown: r, op
|
|
|
2395
2341
|
r,
|
|
2396
2342
|
i,
|
|
2397
2343
|
a
|
|
2398
|
-
]), s =
|
|
2344
|
+
]), s = z((e) => {
|
|
2399
2345
|
n.getState().dashboardGeneralSettings.isHighlightingEnabled && r.next(e);
|
|
2400
|
-
}, [r, n]), c =
|
|
2346
|
+
}, [r, n]), c = V(() => ({
|
|
2401
2347
|
caseSet: e,
|
|
2402
2348
|
highlight: s,
|
|
2403
2349
|
highlightSubject: r,
|
|
@@ -2412,50 +2358,50 @@ var Zn = $, Qn = ({ anchorEl: e, onChange: t, onClose: n, onEscapeKeyDown: r, op
|
|
|
2412
2358
|
a,
|
|
2413
2359
|
o
|
|
2414
2360
|
]);
|
|
2415
|
-
return /* @__PURE__ */
|
|
2361
|
+
return /* @__PURE__ */ G(S, {
|
|
2416
2362
|
value: c,
|
|
2417
2363
|
children: t
|
|
2418
2364
|
});
|
|
2419
|
-
},
|
|
2420
|
-
let t =
|
|
2365
|
+
}, Qn = f(({ caseSet: e }) => {
|
|
2366
|
+
let t = R(c), n = o(t, (e) => e.dataError), [r, i] = U(null), a = z(() => {
|
|
2421
2367
|
i(null);
|
|
2422
2368
|
}, []);
|
|
2423
|
-
return
|
|
2369
|
+
return B(() => {
|
|
2424
2370
|
let e = [u.getInstance().addEventListener("openEditCases", (e) => {
|
|
2425
2371
|
i(e);
|
|
2426
2372
|
})];
|
|
2427
2373
|
return () => {
|
|
2428
2374
|
e.forEach((e) => e());
|
|
2429
2375
|
};
|
|
2430
|
-
}, []), /* @__PURE__ */
|
|
2376
|
+
}, []), /* @__PURE__ */ G(Zn, {
|
|
2431
2377
|
caseSet: e,
|
|
2432
|
-
children: /* @__PURE__ */
|
|
2378
|
+
children: /* @__PURE__ */ G(j, {
|
|
2433
2379
|
sx: {
|
|
2434
2380
|
height: "100%",
|
|
2435
2381
|
position: "relative",
|
|
2436
2382
|
width: "100%"
|
|
2437
2383
|
},
|
|
2438
|
-
children: /* @__PURE__ */
|
|
2384
|
+
children: /* @__PURE__ */ G(Te, {
|
|
2439
2385
|
error: n,
|
|
2440
2386
|
isLoading: !1,
|
|
2441
|
-
children: r ? /* @__PURE__ */
|
|
2387
|
+
children: r ? /* @__PURE__ */ G(p, {
|
|
2442
2388
|
cases: r,
|
|
2443
2389
|
onClose: a
|
|
2444
|
-
}) : /* @__PURE__ */
|
|
2390
|
+
}) : /* @__PURE__ */ G(Xn, { caseSet: e })
|
|
2445
2391
|
})
|
|
2446
2392
|
})
|
|
2447
2393
|
});
|
|
2448
|
-
}),
|
|
2394
|
+
}), $n = ge(ae)(({ theme: e }) => ({
|
|
2449
2395
|
marginBottom: e.spacing(.5),
|
|
2450
2396
|
marginTop: e.spacing(.5)
|
|
2451
|
-
})),
|
|
2452
|
-
let d =
|
|
2397
|
+
})), er = ({ children: e, expandDisabled: t, isLoading: n, primaryMenu: r, secondaryMenu: a, title: s, warningMessage: l, widgetName: u }) => {
|
|
2398
|
+
let d = _e(), { t: f } = W(), p = R(T), m = R(c), h = R(gt), g = o(m, (e) => e.expandZone), _ = o(m, (e) => e.expandedZone), v = o(p, (e) => i.getEnabledWidgets(e.dashboardArrangementConfig).length), y = o(p, (e) => e.setDashboardArrangementConfig), b = _ === h, x = z(() => {
|
|
2453
2399
|
g(_ === h ? null : h);
|
|
2454
2400
|
}, [
|
|
2455
2401
|
g,
|
|
2456
2402
|
_,
|
|
2457
2403
|
h
|
|
2458
|
-
]), S =
|
|
2404
|
+
]), S = z(() => {
|
|
2459
2405
|
let { dashboardArrangementConfig: e } = p.getState();
|
|
2460
2406
|
y({
|
|
2461
2407
|
...e,
|
|
@@ -2468,12 +2414,12 @@ var Zn = $, Qn = ({ anchorEl: e, onChange: t, onClose: n, onEscapeKeyDown: r, op
|
|
|
2468
2414
|
y,
|
|
2469
2415
|
p,
|
|
2470
2416
|
h
|
|
2471
|
-
]), C =
|
|
2472
|
-
if (typeof s == "string") return /* @__PURE__ */
|
|
2417
|
+
]), C = V(() => {
|
|
2418
|
+
if (typeof s == "string") return /* @__PURE__ */ G(he, {
|
|
2473
2419
|
arrow: !0,
|
|
2474
2420
|
placement: "right",
|
|
2475
2421
|
title: s,
|
|
2476
|
-
children: /* @__PURE__ */
|
|
2422
|
+
children: /* @__PURE__ */ G(L, {
|
|
2477
2423
|
component: "h2",
|
|
2478
2424
|
sx: {
|
|
2479
2425
|
display: "inline-block",
|
|
@@ -2488,8 +2434,8 @@ var Zn = $, Qn = ({ anchorEl: e, onChange: t, onClose: n, onEscapeKeyDown: r, op
|
|
|
2488
2434
|
children: s
|
|
2489
2435
|
})
|
|
2490
2436
|
});
|
|
2491
|
-
if (
|
|
2492
|
-
if (
|
|
2437
|
+
if (xe(s)) return s;
|
|
2438
|
+
if (st.isMenuItemData(s)) return /* @__PURE__ */ G(We, {
|
|
2493
2439
|
ButtonProps: {
|
|
2494
2440
|
color: "inherit",
|
|
2495
2441
|
size: "small",
|
|
@@ -2505,13 +2451,13 @@ var Zn = $, Qn = ({ anchorEl: e, onChange: t, onClose: n, onEscapeKeyDown: r, op
|
|
|
2505
2451
|
menuItemsData: s,
|
|
2506
2452
|
showTopLevelTooltip: !0
|
|
2507
2453
|
});
|
|
2508
|
-
}, [d, s]), w =
|
|
2454
|
+
}, [d, s]), w = V(() => /* @__PURE__ */ G(j, {
|
|
2509
2455
|
sx: {
|
|
2510
2456
|
height: d.spacing(3),
|
|
2511
2457
|
position: "relative",
|
|
2512
2458
|
width: "100%"
|
|
2513
2459
|
},
|
|
2514
|
-
children: /* @__PURE__ */
|
|
2460
|
+
children: /* @__PURE__ */ G(j, {
|
|
2515
2461
|
sx: {
|
|
2516
2462
|
height: d.spacing(3),
|
|
2517
2463
|
left: 0,
|
|
@@ -2521,31 +2467,31 @@ var Zn = $, Qn = ({ anchorEl: e, onChange: t, onClose: n, onEscapeKeyDown: r, op
|
|
|
2521
2467
|
children: C
|
|
2522
2468
|
})
|
|
2523
2469
|
}), [d, C]);
|
|
2524
|
-
return /* @__PURE__ */
|
|
2525
|
-
...
|
|
2470
|
+
return /* @__PURE__ */ K(j, {
|
|
2471
|
+
...q.createAttributes("DashboardWidget", { "widget-name": u }),
|
|
2526
2472
|
sx: { height: "100%" },
|
|
2527
|
-
children: [/* @__PURE__ */
|
|
2473
|
+
children: [/* @__PURE__ */ K(j, {
|
|
2528
2474
|
sx: {
|
|
2529
2475
|
display: "flex",
|
|
2530
2476
|
height: d.spacing(3),
|
|
2531
2477
|
justifyContent: "space-between"
|
|
2532
2478
|
},
|
|
2533
|
-
children: [w, /* @__PURE__ */
|
|
2479
|
+
children: [w, /* @__PURE__ */ K(j, {
|
|
2534
2480
|
sx: { display: "flex" },
|
|
2535
|
-
children: [/* @__PURE__ */
|
|
2481
|
+
children: [/* @__PURE__ */ K(j, {
|
|
2536
2482
|
sx: {
|
|
2537
2483
|
display: "flex",
|
|
2538
2484
|
height: `calc(${d.spacing(3)} - 1px)`,
|
|
2539
2485
|
justifySelf: "right",
|
|
2540
2486
|
marginTop: "1px"
|
|
2541
2487
|
},
|
|
2542
|
-
children: [r && /* @__PURE__ */
|
|
2488
|
+
children: [r && /* @__PURE__ */ G(O, { menu: r }), r && /* @__PURE__ */ G($n, {
|
|
2543
2489
|
"aria-hidden": "true",
|
|
2544
2490
|
flexItem: !0,
|
|
2545
2491
|
orientation: "vertical",
|
|
2546
2492
|
variant: "middle"
|
|
2547
2493
|
})]
|
|
2548
|
-
}), /* @__PURE__ */
|
|
2494
|
+
}), /* @__PURE__ */ K(j, {
|
|
2549
2495
|
sx: {
|
|
2550
2496
|
display: "flex",
|
|
2551
2497
|
height: `calc(${d.spacing(3)} - 1px)`,
|
|
@@ -2553,44 +2499,44 @@ var Zn = $, Qn = ({ anchorEl: e, onChange: t, onClose: n, onEscapeKeyDown: r, op
|
|
|
2553
2499
|
marginTop: "1px"
|
|
2554
2500
|
},
|
|
2555
2501
|
children: [
|
|
2556
|
-
a && /* @__PURE__ */
|
|
2557
|
-
a && /* @__PURE__ */
|
|
2502
|
+
a && /* @__PURE__ */ G(O, { menu: a }),
|
|
2503
|
+
a && /* @__PURE__ */ G($n, {
|
|
2558
2504
|
"aria-hidden": "true",
|
|
2559
2505
|
flexItem: !0,
|
|
2560
2506
|
orientation: "vertical",
|
|
2561
2507
|
variant: "middle"
|
|
2562
2508
|
}),
|
|
2563
|
-
v > 1 && /* @__PURE__ */
|
|
2509
|
+
v > 1 && /* @__PURE__ */ K(D, {
|
|
2564
2510
|
disabled: t,
|
|
2565
2511
|
label: b ? f`Collapse` : f`Expand`,
|
|
2566
2512
|
onClick: x,
|
|
2567
|
-
children: [b && /* @__PURE__ */
|
|
2513
|
+
children: [b && /* @__PURE__ */ G(at, {}), !b && /* @__PURE__ */ G(ot, {})]
|
|
2568
2514
|
}),
|
|
2569
|
-
!b && /* @__PURE__ */
|
|
2515
|
+
!b && /* @__PURE__ */ G(D, {
|
|
2570
2516
|
label: f`Remove widget`,
|
|
2571
2517
|
onClick: S,
|
|
2572
2518
|
sx: { marginRight: d.spacing(-1) },
|
|
2573
|
-
children: /* @__PURE__ */
|
|
2519
|
+
children: /* @__PURE__ */ G(nt, {})
|
|
2574
2520
|
})
|
|
2575
2521
|
]
|
|
2576
2522
|
})]
|
|
2577
2523
|
})]
|
|
2578
|
-
}), /* @__PURE__ */
|
|
2524
|
+
}), /* @__PURE__ */ K(j, {
|
|
2579
2525
|
sx: {
|
|
2580
2526
|
height: `calc(100% - ${d.spacing(3)})`,
|
|
2581
2527
|
position: "relative"
|
|
2582
2528
|
},
|
|
2583
|
-
children: [l && /* @__PURE__ */
|
|
2529
|
+
children: [l && /* @__PURE__ */ G(j, {
|
|
2584
2530
|
sx: { height: d.spacing(3) },
|
|
2585
|
-
children: /* @__PURE__ */
|
|
2586
|
-
}), /* @__PURE__ */
|
|
2531
|
+
children: /* @__PURE__ */ G(k, { warningMessage: l })
|
|
2532
|
+
}), /* @__PURE__ */ K(j, {
|
|
2587
2533
|
sx: { height: l ? `calc(100% - ${d.spacing(3)})` : "100%" },
|
|
2588
|
-
children: [n && /* @__PURE__ */
|
|
2534
|
+
children: [n && /* @__PURE__ */ G(He, { label: f`Loading` }), !n && e]
|
|
2589
2535
|
})]
|
|
2590
2536
|
})]
|
|
2591
2537
|
});
|
|
2592
2538
|
};
|
|
2593
2539
|
//#endregion
|
|
2594
|
-
export {
|
|
2540
|
+
export { Qn as n, er as t };
|
|
2595
2541
|
|
|
2596
2542
|
//# sourceMappingURL=Dashboard.js.map
|