@cccsaurora/clue-ui 1.1.0-dev.91 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ActionForm-myEAs2UC.js +435 -0
- package/AnnotationDetails-BdfWMISw.js +160 -0
- package/AnnotationPreview-CKMGCoUH.js +140 -0
- package/ClueEnrichContext-CrFpdYhh.js +414 -0
- package/FlexOne-BXWFOd1T.js +6 -0
- package/_Map-DXNg_Z-q.js +54 -0
- package/_MapCache-Cu25RRDU.js +129 -0
- package/_Uint8Array-DlJCtTvG.js +102 -0
- package/_baseAssignValue-CUmzp727.js +20 -0
- package/_baseClone-BlMmRXeX.js +208 -0
- package/_baseExtremum-P_0akmCi.js +27 -0
- package/_baseFlatten-CN7vDNEQ.js +72 -0
- package/_baseGet-Dgf6_xCm.js +80 -0
- package/_baseIsEqual-Cpjtfb3Q.js +173 -0
- package/_baseIteratee-CP1bocOX.js +95 -0
- package/_baseSlice-M5RKzt1A.js +10 -0
- package/_baseSum-wEbgNeUs.js +10 -0
- package/_baseUniq-tMFmk80M.js +61 -0
- package/_commonjsHelpers-DaMA6jEr.js +8 -0
- package/_createAggregator-B4Cav8ZM.js +53 -0
- package/_getPrototype-CHAFQYL_.js +5 -0
- package/_getTag-BV_UoLYG.js +90 -0
- package/cloneDeep-BPVpFBzJ.js +8 -0
- package/components/AnnotationBody.js +35 -49
- package/components/AnnotationDetailPopover.js +30 -36
- package/components/AnnotationDetails.js +6 -6
- package/components/AnnotationEntry.js +47 -50
- package/components/AnnotationPreview.js +5 -5
- package/components/ClassificationChip.d.ts +2 -1
- package/components/ClassificationChip.js +23 -44
- package/components/CountBadge.js +26 -31
- package/components/EnrichedCard.js +97 -110
- package/components/EnrichedChip.js +105 -130
- package/components/EnrichedTypography.js +107 -133
- package/components/ErrorBoundary.js +24 -28
- package/components/RetryFailedEnrichments.js +9 -10
- package/components/SourcePicker.js +49 -57
- package/components/actions/ActionForm.js +4 -4
- package/components/actions/ExecutePopover.js +50 -64
- package/components/actions/ResultModal.js +5 -5
- package/components/actions/form/schemaAdapter.js +23 -38
- package/components/display/graph/ExpandMoreButton.js +10 -10
- package/components/display/graph/elements/NodeCard.js +94 -92
- package/components/display/graph/elements/NodeTag.js +13 -15
- package/components/display/graph/index.js +202 -261
- package/components/display/graph/visualizations/Leaf.js +69 -88
- package/components/display/graph/visualizations/cloud/index.js +81 -98
- package/components/display/graph/visualizations/icons/BaseIcon.js +21 -26
- package/components/display/graph/visualizations/icons/BugIcon.js +12 -12
- package/components/display/graph/visualizations/icons/HostIcon.js +12 -12
- package/components/display/graph/visualizations/icons/NetworkIcon.js +12 -12
- package/components/display/graph/visualizations/icons/ProcessIcon.js +12 -12
- package/components/display/graph/visualizations/icons/TargetIcon.js +13 -13
- package/components/display/graph/visualizations/icons/index.js +13 -14
- package/components/display/graph/visualizations/panels/NodePanel.js +8 -10
- package/components/display/graph/visualizations/tree/BundleLine.js +81 -108
- package/components/display/graph/visualizations/tree/Triangle.js +13 -13
- package/components/display/graph/visualizations/tree/index.js +305 -407
- package/components/display/icons/Iconified.js +12 -27
- package/components/display/json/index.js +4 -4
- package/components/display/markdown/index.js +5761 -8662
- package/components/enrichment/EnrichPopover.js +47 -55
- package/components/fetchers/Fetcher.js +95 -123
- package/components/fetchers/PreviewModal.js +17 -20
- package/components/fetchers/StatusChip.js +17 -21
- package/components/group/Entry.js +11 -13
- package/components/group/Group.js +10 -13
- package/components/group/GroupControl.js +66 -77
- package/components/stats/QueryStatus.js +31 -41
- package/countBy-DOutsa_w.js +8 -0
- package/data/event.js +4 -6
- package/database/index.js +2 -2
- package/debounce-DryYcbJ4.js +56 -0
- package/get-Bow1vKwx.js +8 -0
- package/groupBy-BheQYl6f.js +8 -0
- package/hooks/ClueActionContext.js +7 -7
- package/hooks/ClueComponentContext.js +23 -29
- package/hooks/ClueConfigProvider.js +12 -14
- package/hooks/ClueDatabaseContext.js +13 -19
- package/hooks/ClueEnrichContext.js +8 -8
- package/hooks/ClueFetcherContext.js +46 -74
- package/hooks/ClueGroupContext.js +14 -17
- package/hooks/CluePopupContext.js +5 -5
- package/hooks/ClueProvider.js +10 -12
- package/hooks/selectors.js +10 -21
- package/hooks/useActionResult.js +2 -2
- package/hooks/useAnnotations.js +29 -45
- package/hooks/useClue.js +4 -6
- package/hooks/useClueActions.js +3 -3
- package/hooks/useClueConfig.js +4 -6
- package/hooks/useClueTypeConfig.js +3 -3
- package/hooks/useComparator.js +435 -722
- package/hooks/useErrors.js +18 -22
- package/hooks/useMyHighlights.js +36 -66
- package/hooks/useMyLocalStorage.js +37 -66
- package/iconify-BBckr5AQ.js +1263 -0
- package/icons/Action.js +49 -66
- package/icons/Assessment.js +68 -84
- package/icons/Context.js +63 -77
- package/icons/Opinion.js +65 -77
- package/icons/iconMap.js +2 -2
- package/identity-ByMq8VxU.js +6 -0
- package/index-BXxfAxFt.js +12734 -0
- package/index-C15OYgRY.js +358 -0
- package/index-E7g8cRyW.js +568 -0
- package/index-p5_wX7q1.js +11729 -0
- package/index-vF6IyBhz.js +975 -0
- package/isEmpty-g47Qir2A.js +21 -0
- package/isNil-CjWwlQS3.js +6 -0
- package/isObject-B53jY8Qg.js +7 -0
- package/isObjectLike-BatpeCIi.js +29 -0
- package/isSymbol-C3_SC0Qp.js +8 -0
- package/last-7CdUxN0r.js +7 -0
- package/main.js +62 -62
- package/package.json +2 -2
- package/sortBy-ITdmD17L.js +79 -0
- package/sumBy-DxJUU2E8.js +8 -0
- package/text/Frequency.js +23 -42
- package/toFinite-BMy6GObD.js +14 -0
- package/toNumber-YVhnnJv4.js +31 -0
- package/useClueTypeConfig-DyeBcXQX.js +2214 -0
- package/utils/chain.js +64 -91
- package/utils/classificationParser.js +256 -519
- package/utils/constants.js +10 -35
- package/utils/graph.js +45 -72
- package/utils/hashUtil.js +7 -7
- package/utils/line.js +81 -131
- package/utils/loggerUtil.js +3 -5
- package/utils/sessionStorage.js +27 -41
- package/utils/time.js +423 -423
- package/utils/utils.js +9 -9
- package/utils/window.js +10 -21
- package/utils-BnmI_6N8.js +130 -0
- package/ActionForm-ByeOzpc4.js +0 -555
- package/AnnotationDetails-DknbKDyl.js +0 -175
- package/AnnotationPreview-CQwKs8se.js +0 -188
- package/ClueEnrichContext-6NJfXpUB.js +0 -536
- package/FlexOne-BSYAhhtG.js +0 -9
- package/_Map-kgDsDYxq.js +0 -64
- package/_MapCache-DabaaWfq.js +0 -161
- package/_Uint8Array-BlVVH1tp.js +0 -129
- package/_baseAssignValue-CNbcU6Nb.js +0 -25
- package/_baseClone-D3a8Pa4T.js +0 -284
- package/_baseExtremum-B1o1zHjR.js +0 -33
- package/_baseFlatten-D4huXoEI.js +0 -92
- package/_baseGet-BSK_nnoz.js +0 -109
- package/_baseIsEqual-B5xLoweL.js +0 -238
- package/_baseIteratee-p6Nj07-n.js +0 -126
- package/_baseSlice-GAv_YFTT.js +0 -20
- package/_baseSum-D0WC1dN0.js +0 -13
- package/_baseUniq-CpupKWcL.js +0 -89
- package/_commonjsHelpers-DWwsNxpa.js +0 -8
- package/_createAggregator-BpVy5xMi.js +0 -63
- package/_getPrototype-D1LAdQKO.js +0 -5
- package/_getTag-D3ToyefI.js +0 -126
- package/cloneDeep-CjP5k9zW.js +0 -8
- package/countBy-C69WslUA.js +0 -14
- package/debounce-bV0h5FC5.js +0 -92
- package/get-D3C3lEU3.js +0 -8
- package/groupBy-DC2oOuBN.js +0 -14
- package/iconify-CXMreGTg.js +0 -1782
- package/identity-CPGTqrE4.js +0 -6
- package/index-BDVjGvMI.js +0 -696
- package/index-BbPn6-Mw.js +0 -15750
- package/index-Bi21Wb23.js +0 -465
- package/index-C3lkTD69.js +0 -1172
- package/index-CC12Ux-9.js +0 -17654
- package/isEmpty-BQkZubqU.js +0 -29
- package/isNil-CIubwp4T.js +0 -6
- package/isObject-FTY-5JQX.js +0 -7
- package/isObjectLike-OAgjjZye.js +0 -48
- package/isSymbol-Xd2FsJyp.js +0 -8
- package/last-CUCl67Im.js +0 -7
- package/sortBy-B-UKp4GT.js +0 -100
- package/sumBy-MYkDPHZL.js +0 -8
- package/toFinite-Bc55msYj.js +0 -16
- package/toNumber-DPxy1FBy.js +0 -39
- package/useClueTypeConfig-XvGvIw2S.js +0 -3201
- package/utils-7OtvGnmf.js +0 -200
|
@@ -1,173 +1,147 @@
|
|
|
1
|
-
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
-
import { useTheme, Stack, CircularProgress, Tooltip, IconButton } from "@mui/material";
|
|
3
|
-
import
|
|
4
|
-
import { ClueComponentContext } from "../hooks/ClueComponentContext.js";
|
|
5
|
-
import { ClueGroupContext } from "../hooks/ClueGroupContext.js";
|
|
6
|
-
import { C as
|
|
7
|
-
import { useClueEnrichSelector } from "../hooks/selectors.js";
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import { memo, useRef, useMemo, useCallback, useEffect } from "react";
|
|
15
|
-
import { u as
|
|
16
|
-
const
|
|
17
|
-
type:
|
|
18
|
-
value,
|
|
19
|
-
classification:
|
|
20
|
-
contextIcon =
|
|
21
|
-
counters =
|
|
22
|
-
hideDetails =
|
|
23
|
-
hideLoading =
|
|
24
|
-
forceDetails =
|
|
25
|
-
setForceDetails = null,
|
|
26
|
-
useDetailsIcon =
|
|
27
|
-
skipEnrichment =
|
|
28
|
-
slotProps = {},
|
|
29
|
-
children,
|
|
30
|
-
...
|
|
1
|
+
import { jsxs as J, jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { useTheme as K, Stack as L, CircularProgress as Q, Tooltip as U, IconButton as V } from "@mui/material";
|
|
3
|
+
import W from "./display/icons/Iconified.js";
|
|
4
|
+
import { ClueComponentContext as X } from "../hooks/ClueComponentContext.js";
|
|
5
|
+
import { ClueGroupContext as Y } from "../hooks/ClueGroupContext.js";
|
|
6
|
+
import { C as $ } from "../AnnotationPreview-CKMGCoUH.js";
|
|
7
|
+
import { useClueEnrichSelector as Z } from "../hooks/selectors.js";
|
|
8
|
+
import F from "../hooks/useAnnotations.js";
|
|
9
|
+
import _ from "../icons/Action.js";
|
|
10
|
+
import j from "../icons/Assessment.js";
|
|
11
|
+
import z from "../icons/Context.js";
|
|
12
|
+
import N from "../icons/Opinion.js";
|
|
13
|
+
import D from "../text/Frequency.js";
|
|
14
|
+
import { memo as P, useRef as ii, useMemo as x, useCallback as ni, useEffect as oi } from "react";
|
|
15
|
+
import { u as l } from "../index-E7g8cRyW.js";
|
|
16
|
+
const ei = ({
|
|
17
|
+
type: T,
|
|
18
|
+
value: e,
|
|
19
|
+
classification: h,
|
|
20
|
+
contextIcon: k = !1,
|
|
21
|
+
counters: c = !1,
|
|
22
|
+
hideDetails: d = !1,
|
|
23
|
+
hideLoading: O = !1,
|
|
24
|
+
forceDetails: r = !1,
|
|
25
|
+
setForceDetails: C = null,
|
|
26
|
+
useDetailsIcon: u = !1,
|
|
27
|
+
skipEnrichment: R = !1,
|
|
28
|
+
slotProps: i = {},
|
|
29
|
+
children: G,
|
|
30
|
+
...f
|
|
31
31
|
}) => {
|
|
32
|
-
var
|
|
33
|
-
const { t } =
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
const groupType = useContextSelector(ClueGroupContext, (ctx) => ctx == null ? void 0 : ctx.type);
|
|
37
|
-
const defaultClassification = useClueEnrichSelector((ctx) => ctx.defaultClassification);
|
|
38
|
-
const type = useMemo(() => _type ?? groupType, [_type, groupType]);
|
|
39
|
-
const classification = useMemo(
|
|
40
|
-
() => _classification ?? defaultClassification,
|
|
41
|
-
[_classification, defaultClassification]
|
|
32
|
+
var A, q, v, B;
|
|
33
|
+
const { t: M } = l(X, (n) => n.i18next), b = K(), y = ii(), s = l(Y, (n) => n == null ? void 0 : n.type), g = Z((n) => n.defaultClassification), o = x(() => T ?? s, [T, s]), t = x(
|
|
34
|
+
() => h ?? g,
|
|
35
|
+
[h, g]
|
|
42
36
|
);
|
|
43
|
-
if (!
|
|
37
|
+
if (!o)
|
|
44
38
|
throw new Error("Type was not provided as a prop, and component is not used in a group context.");
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
}
|
|
54
|
-
if (slotProps == null ? void 0 : slotProps.popover) {
|
|
55
|
-
options.popoverProps = slotProps.popover;
|
|
56
|
-
}
|
|
57
|
-
return options;
|
|
58
|
-
}, [setForceDetails, slotProps.popover]);
|
|
59
|
-
const clicker = useMemo(
|
|
60
|
-
() => !hideDetails || useDetailsIcon ? (e) => {
|
|
61
|
-
var _a2;
|
|
62
|
-
showInfo("details", anchorRef.current, { type, value, classification }, buildOptions());
|
|
63
|
-
(_a2 = otherProps.onClick) == null ? void 0 : _a2.call(otherProps, e);
|
|
64
|
-
e.stopPropagation();
|
|
65
|
-
e.preventDefault();
|
|
66
|
-
} : otherProps.onClick,
|
|
39
|
+
const [m, p] = F(o, e, t, { skipEnrichment: R }), I = l($, (n) => n.showInfo), H = l($, (n) => n.closeInfo), w = ni(() => {
|
|
40
|
+
const n = {};
|
|
41
|
+
return C && (n.onClose = () => C(!1)), i != null && i.popover && (n.popoverProps = i.popover), n;
|
|
42
|
+
}, [C, i.popover]), E = x(
|
|
43
|
+
() => !d || u ? (n) => {
|
|
44
|
+
var S;
|
|
45
|
+
I("details", y.current, { type: o, value: e, classification: t }, w()), (S = f.onClick) == null || S.call(f, n), n.stopPropagation(), n.preventDefault();
|
|
46
|
+
} : f.onClick,
|
|
67
47
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
68
|
-
[
|
|
48
|
+
[d, u, f, o, e, t]
|
|
69
49
|
);
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
});
|
|
79
|
-
}
|
|
80
|
-
}, [classification, forceDetails, type, value]);
|
|
81
|
-
return /* @__PURE__ */ jsxs(
|
|
82
|
-
Stack,
|
|
50
|
+
return oi(() => {
|
|
51
|
+
r ? I("details", y.current, { type: o, value: e, classification: t }, w()) : H("details", {
|
|
52
|
+
type: o,
|
|
53
|
+
value: e,
|
|
54
|
+
classification: t
|
|
55
|
+
});
|
|
56
|
+
}, [t, r, o, e]), /* @__PURE__ */ J(
|
|
57
|
+
L,
|
|
83
58
|
{
|
|
84
|
-
ref:
|
|
59
|
+
ref: y,
|
|
85
60
|
direction: "row",
|
|
86
61
|
spacing: 1,
|
|
87
62
|
alignItems: "center",
|
|
88
|
-
...
|
|
89
|
-
className: `enriched-typography ${((
|
|
63
|
+
...i == null ? void 0 : i.stack,
|
|
64
|
+
className: `enriched-typography ${((A = i == null ? void 0 : i.stack) == null ? void 0 : A.className) ?? ""}`.trim(),
|
|
90
65
|
sx: [
|
|
91
66
|
{
|
|
92
|
-
cursor: !
|
|
67
|
+
cursor: !p && !d ? "pointer" : "inherit",
|
|
93
68
|
borderBottom: "1px solid transparent",
|
|
94
|
-
transition:
|
|
69
|
+
transition: b.transitions.create(["border-bottom-color"]),
|
|
95
70
|
"&:hover": {
|
|
96
|
-
borderBottomColor: !
|
|
71
|
+
borderBottomColor: !p && (d ? null : b.palette.primary.light)
|
|
97
72
|
}
|
|
98
73
|
},
|
|
99
|
-
...Array.isArray((
|
|
74
|
+
...Array.isArray((q = i == null ? void 0 : i.stack) == null ? void 0 : q.sx) ? (v = i == null ? void 0 : i.stack) == null ? void 0 : v.sx : [(B = i == null ? void 0 : i.stack) == null ? void 0 : B.sx]
|
|
100
75
|
],
|
|
101
|
-
onClick:
|
|
76
|
+
onClick: u ? void 0 : E,
|
|
102
77
|
children: [
|
|
103
|
-
/* @__PURE__ */
|
|
104
|
-
|
|
78
|
+
/* @__PURE__ */ a(
|
|
79
|
+
j,
|
|
105
80
|
{
|
|
106
|
-
ubiquitous:
|
|
107
|
-
value: { type, value, classification },
|
|
108
|
-
annotations,
|
|
109
|
-
counters,
|
|
110
|
-
disableTooltip:
|
|
81
|
+
ubiquitous: !0,
|
|
82
|
+
value: { type: o, value: e, classification: t },
|
|
83
|
+
annotations: m,
|
|
84
|
+
counters: c,
|
|
85
|
+
disableTooltip: r
|
|
111
86
|
}
|
|
112
87
|
),
|
|
113
|
-
/* @__PURE__ */
|
|
114
|
-
|
|
88
|
+
/* @__PURE__ */ a(
|
|
89
|
+
N,
|
|
115
90
|
{
|
|
116
|
-
ubiquitous:
|
|
117
|
-
value: { type, value, classification },
|
|
118
|
-
annotations,
|
|
119
|
-
counters,
|
|
120
|
-
disableTooltip:
|
|
91
|
+
ubiquitous: !0,
|
|
92
|
+
value: { type: o, value: e, classification: t },
|
|
93
|
+
annotations: m,
|
|
94
|
+
counters: c,
|
|
95
|
+
disableTooltip: r
|
|
121
96
|
}
|
|
122
97
|
),
|
|
123
|
-
/* @__PURE__ */
|
|
124
|
-
|
|
98
|
+
/* @__PURE__ */ a(
|
|
99
|
+
z,
|
|
125
100
|
{
|
|
126
|
-
ubiquitous:
|
|
127
|
-
value: { type, value, classification },
|
|
128
|
-
annotations,
|
|
129
|
-
counters,
|
|
130
|
-
showExtraIcon:
|
|
131
|
-
disableTooltip:
|
|
101
|
+
ubiquitous: !0,
|
|
102
|
+
value: { type: o, value: e, classification: t },
|
|
103
|
+
annotations: m,
|
|
104
|
+
counters: c,
|
|
105
|
+
showExtraIcon: k,
|
|
106
|
+
disableTooltip: r
|
|
132
107
|
}
|
|
133
108
|
),
|
|
134
|
-
|
|
135
|
-
/* @__PURE__ */
|
|
136
|
-
|
|
109
|
+
G ?? /* @__PURE__ */ a(D, { id: `enriched-${o}-value`, ...f, annotations: m, value: e }),
|
|
110
|
+
/* @__PURE__ */ a(
|
|
111
|
+
j,
|
|
137
112
|
{
|
|
138
|
-
value: { type, value, classification },
|
|
139
|
-
annotations,
|
|
140
|
-
counters,
|
|
141
|
-
disableTooltip:
|
|
113
|
+
value: { type: o, value: e, classification: t },
|
|
114
|
+
annotations: m,
|
|
115
|
+
counters: c,
|
|
116
|
+
disableTooltip: r
|
|
142
117
|
}
|
|
143
118
|
),
|
|
144
|
-
/* @__PURE__ */
|
|
145
|
-
|
|
119
|
+
/* @__PURE__ */ a(
|
|
120
|
+
N,
|
|
146
121
|
{
|
|
147
|
-
value: { type, value, classification },
|
|
148
|
-
annotations,
|
|
149
|
-
counters,
|
|
150
|
-
disableTooltip:
|
|
122
|
+
value: { type: o, value: e, classification: t },
|
|
123
|
+
annotations: m,
|
|
124
|
+
counters: c,
|
|
125
|
+
disableTooltip: r
|
|
151
126
|
}
|
|
152
127
|
),
|
|
153
|
-
/* @__PURE__ */
|
|
154
|
-
|
|
128
|
+
/* @__PURE__ */ a(
|
|
129
|
+
z,
|
|
155
130
|
{
|
|
156
|
-
value: { type, value, classification },
|
|
157
|
-
annotations,
|
|
158
|
-
counters,
|
|
159
|
-
showExtraIcon:
|
|
160
|
-
disableTooltip:
|
|
131
|
+
value: { type: o, value: e, classification: t },
|
|
132
|
+
annotations: m,
|
|
133
|
+
counters: c,
|
|
134
|
+
showExtraIcon: k,
|
|
135
|
+
disableTooltip: r
|
|
161
136
|
}
|
|
162
137
|
),
|
|
163
|
-
/* @__PURE__ */
|
|
164
|
-
|
|
165
|
-
!
|
|
138
|
+
/* @__PURE__ */ a(_, { counters: c, value: { type: o, value: e, classification: t }, disableTooltip: r }),
|
|
139
|
+
p && !O && /* @__PURE__ */ a(Q, { color: "primary", size: 18 }),
|
|
140
|
+
!p && u && /* @__PURE__ */ a(U, { title: M("details.open"), children: /* @__PURE__ */ a(V, { size: "small", onClick: E, sx: { color: b.palette.action.disabled }, children: /* @__PURE__ */ a(W, { icon: "ic:outline-info" }) }) })
|
|
166
141
|
]
|
|
167
142
|
}
|
|
168
143
|
);
|
|
169
|
-
};
|
|
170
|
-
const EnrichedTypography$1 = memo(EnrichedTypography);
|
|
144
|
+
}, hi = P(ei);
|
|
171
145
|
export {
|
|
172
|
-
|
|
146
|
+
hi as default
|
|
173
147
|
};
|
|
@@ -1,36 +1,32 @@
|
|
|
1
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Box, Accordion, AccordionSummary, Typography, AccordionDetails } from "@mui/material";
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
class
|
|
6
|
-
constructor(
|
|
7
|
-
super(
|
|
8
|
-
this.state = { hasError: false, error: null };
|
|
1
|
+
import { jsx as r, jsxs as o } from "react/jsx-runtime";
|
|
2
|
+
import { Box as n, Accordion as i, AccordionSummary as a, Typography as t, AccordionDetails as s } from "@mui/material";
|
|
3
|
+
import c from "./display/icons/Iconified.js";
|
|
4
|
+
import d from "react";
|
|
5
|
+
class f extends d.Component {
|
|
6
|
+
constructor(e) {
|
|
7
|
+
super(e), this.state = { hasError: !1, error: null };
|
|
9
8
|
}
|
|
10
|
-
static getDerivedStateFromError(
|
|
11
|
-
return { hasError:
|
|
9
|
+
static getDerivedStateFromError(e) {
|
|
10
|
+
return { hasError: !0, error: e };
|
|
12
11
|
}
|
|
13
|
-
componentDidCatch(
|
|
14
|
-
this.setState({ hasError:
|
|
12
|
+
componentDidCatch(e) {
|
|
13
|
+
this.setState({ hasError: !0, error: e });
|
|
15
14
|
}
|
|
16
15
|
render() {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
{
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
] }) });
|
|
30
|
-
}
|
|
31
|
-
return this.props.children;
|
|
16
|
+
return this.state.hasError ? /* @__PURE__ */ r(n, { pt: 6, textAlign: "center", fontSize: 20, children: /* @__PURE__ */ o(i, { elevation: 0, children: [
|
|
17
|
+
/* @__PURE__ */ r(
|
|
18
|
+
a,
|
|
19
|
+
{
|
|
20
|
+
expandIcon: /* @__PURE__ */ r(c, { icon: "ic:baseline-expand-more" }),
|
|
21
|
+
"aria-controls": "panel1-content",
|
|
22
|
+
id: "panel1-header",
|
|
23
|
+
children: /* @__PURE__ */ r(t, { align: "center", sx: { width: "100%", fontSize: "1.2rem" }, variant: "h5", children: this.state.error.message })
|
|
24
|
+
}
|
|
25
|
+
),
|
|
26
|
+
/* @__PURE__ */ r(s, { children: /* @__PURE__ */ r("code", { children: /* @__PURE__ */ r(t, { variant: "h6", children: this.state.error.stack }) }) })
|
|
27
|
+
] }) }) : this.props.children;
|
|
32
28
|
}
|
|
33
29
|
}
|
|
34
30
|
export {
|
|
35
|
-
|
|
31
|
+
f as default
|
|
36
32
|
};
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { Button } from "@mui/material";
|
|
3
|
-
import { ClueComponentContext } from "../hooks/ClueComponentContext.js";
|
|
4
|
-
import { useClueEnrichSelector } from "../hooks/selectors.js";
|
|
5
|
-
import { u as
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
return /* @__PURE__ */ jsx(Button, { onClick: enrichFailedEnrichments, children: t("retry.enrich") });
|
|
1
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { Button as o } from "@mui/material";
|
|
3
|
+
import { ClueComponentContext as i } from "../hooks/ClueComponentContext.js";
|
|
4
|
+
import { useClueEnrichSelector as c } from "../hooks/selectors.js";
|
|
5
|
+
import { u as m } from "../index-E7g8cRyW.js";
|
|
6
|
+
const a = () => {
|
|
7
|
+
const t = c((e) => e.enrichFailedEnrichments), { t: r } = m(i, (e) => e.i18next);
|
|
8
|
+
return /* @__PURE__ */ n(o, { onClick: t, children: r("retry.enrich") });
|
|
10
9
|
};
|
|
11
10
|
export {
|
|
12
|
-
|
|
11
|
+
a as default
|
|
13
12
|
};
|
|
@@ -1,98 +1,90 @@
|
|
|
1
|
-
import { jsxs, Fragment, jsx } from "react/jsx-runtime";
|
|
2
|
-
import { Button, Popover, TextField, Divider, Stack, FormControlLabel, Checkbox } from "@mui/material";
|
|
3
|
-
import { useClueComponentSelector, useClueEnrichSelector } from "../hooks/selectors.js";
|
|
4
|
-
import { memo, useState, useEffect } from "react";
|
|
5
|
-
const
|
|
6
|
-
const { t } =
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
const [anchorEl, setAnchorEl] = useState(null);
|
|
11
|
-
const [sourceFilter, setSourceFilter] = useState();
|
|
12
|
-
const handleClick = (event) => {
|
|
13
|
-
setAnchorEl(event.currentTarget);
|
|
1
|
+
import { jsxs as n, Fragment as v, jsx as l } from "react/jsx-runtime";
|
|
2
|
+
import { Button as b, Popover as w, TextField as z, Divider as F, Stack as _, FormControlLabel as m, Checkbox as d } from "@mui/material";
|
|
3
|
+
import { useClueComponentSelector as E, useClueEnrichSelector as a } from "../hooks/selectors.js";
|
|
4
|
+
import { memo as P, useState as g, useEffect as T } from "react";
|
|
5
|
+
const L = () => {
|
|
6
|
+
const { t: r } = E((e) => e.i18next), o = a((e) => e.availableSources), t = a((e) => e.sources), c = a((e) => e.setSources), [s, i] = g(null), [h, x] = g(), C = (e) => {
|
|
7
|
+
i(e.currentTarget);
|
|
8
|
+
}, f = () => {
|
|
9
|
+
i(null);
|
|
14
10
|
};
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
23
|
-
/* @__PURE__ */ jsxs(Button, { "aria-describedby": id, variant: "outlined", onClick: handleClick, children: [
|
|
24
|
-
t("sources"),
|
|
11
|
+
T(() => {
|
|
12
|
+
c(o);
|
|
13
|
+
}, [o]);
|
|
14
|
+
const u = s ? "sources-popover" : void 0;
|
|
15
|
+
return /* @__PURE__ */ n(v, { children: [
|
|
16
|
+
/* @__PURE__ */ n(b, { "aria-describedby": u, variant: "outlined", onClick: C, children: [
|
|
17
|
+
r("sources"),
|
|
25
18
|
" (",
|
|
26
|
-
|
|
19
|
+
t.length === o.length ? r("all") : t.length,
|
|
27
20
|
")"
|
|
28
21
|
] }),
|
|
29
|
-
/* @__PURE__ */
|
|
30
|
-
|
|
22
|
+
/* @__PURE__ */ n(
|
|
23
|
+
w,
|
|
31
24
|
{
|
|
32
|
-
id,
|
|
33
|
-
open: !!
|
|
34
|
-
anchorEl,
|
|
35
|
-
onClose:
|
|
25
|
+
id: u,
|
|
26
|
+
open: !!s,
|
|
27
|
+
anchorEl: s,
|
|
28
|
+
onClose: f,
|
|
36
29
|
anchorOrigin: {
|
|
37
30
|
vertical: "bottom",
|
|
38
31
|
horizontal: "left"
|
|
39
32
|
},
|
|
40
33
|
children: [
|
|
41
|
-
/* @__PURE__ */
|
|
42
|
-
|
|
34
|
+
/* @__PURE__ */ l(
|
|
35
|
+
z,
|
|
43
36
|
{
|
|
44
|
-
fullWidth:
|
|
37
|
+
fullWidth: !0,
|
|
45
38
|
sx: { p: 1, width: "350px" },
|
|
46
|
-
placeholder:
|
|
47
|
-
onChange: (
|
|
39
|
+
placeholder: r("quicksearch.placeholder"),
|
|
40
|
+
onChange: (e) => x(e.target.value.toLowerCase())
|
|
48
41
|
}
|
|
49
42
|
),
|
|
50
|
-
/* @__PURE__ */
|
|
51
|
-
/* @__PURE__ */
|
|
52
|
-
/* @__PURE__ */
|
|
53
|
-
|
|
43
|
+
/* @__PURE__ */ l(F, { orientation: "horizontal" }),
|
|
44
|
+
/* @__PURE__ */ n(_, { spacing: 0.5, m: 1, sx: { maxHeight: "500px", overflow: "auto" }, onClick: (e) => e.stopPropagation(), children: [
|
|
45
|
+
/* @__PURE__ */ l(
|
|
46
|
+
m,
|
|
54
47
|
{
|
|
55
|
-
control: /* @__PURE__ */
|
|
56
|
-
|
|
48
|
+
control: /* @__PURE__ */ l(
|
|
49
|
+
d,
|
|
57
50
|
{
|
|
58
51
|
size: "small",
|
|
59
|
-
checked:
|
|
52
|
+
checked: t.length === o.length,
|
|
60
53
|
sx: { mr: 1 },
|
|
61
|
-
onChange: (
|
|
62
|
-
|
|
54
|
+
onChange: (e, p) => {
|
|
55
|
+
c(p ? o : []);
|
|
63
56
|
}
|
|
64
57
|
}
|
|
65
58
|
),
|
|
66
|
-
label:
|
|
59
|
+
label: t.length < o.length ? r("sources.select.all") : r("sources.select.none"),
|
|
67
60
|
sx: { whiteSpace: "nowrap", textTransform: "capitalize" }
|
|
68
61
|
}
|
|
69
62
|
),
|
|
70
|
-
|
|
71
|
-
|
|
63
|
+
o.filter((e) => !h || e.toLowerCase().includes(h)).map((e) => /* @__PURE__ */ l(
|
|
64
|
+
m,
|
|
72
65
|
{
|
|
73
|
-
control: /* @__PURE__ */
|
|
74
|
-
|
|
66
|
+
control: /* @__PURE__ */ l(
|
|
67
|
+
d,
|
|
75
68
|
{
|
|
76
69
|
size: "small",
|
|
77
|
-
checked:
|
|
78
|
-
onChange: (
|
|
79
|
-
|
|
70
|
+
checked: t.includes(e),
|
|
71
|
+
onChange: (p, S) => {
|
|
72
|
+
c(S ? [...t, e] : t.filter((k) => k !== e));
|
|
80
73
|
},
|
|
81
74
|
sx: { mr: 1 }
|
|
82
75
|
}
|
|
83
76
|
),
|
|
84
|
-
label:
|
|
77
|
+
label: e.replace(/[_-]/g, " "),
|
|
85
78
|
sx: { whiteSpace: "nowrap", textTransform: "capitalize" }
|
|
86
79
|
},
|
|
87
|
-
|
|
80
|
+
e
|
|
88
81
|
))
|
|
89
82
|
] })
|
|
90
83
|
]
|
|
91
84
|
}
|
|
92
85
|
)
|
|
93
86
|
] });
|
|
94
|
-
};
|
|
95
|
-
const SourcePicker$1 = memo(SourcePicker);
|
|
87
|
+
}, B = P(L);
|
|
96
88
|
export {
|
|
97
|
-
|
|
89
|
+
B as default
|
|
98
90
|
};
|
|
@@ -3,12 +3,12 @@ import "@jsonforms/material-renderers";
|
|
|
3
3
|
import "@jsonforms/react";
|
|
4
4
|
import "@mui/material";
|
|
5
5
|
import "../display/icons/Iconified.js";
|
|
6
|
-
import "../../index-
|
|
6
|
+
import "../../index-C15OYgRY.js";
|
|
7
7
|
import "../../hooks/ClueComponentContext.js";
|
|
8
|
-
import { A } from "../../ActionForm-
|
|
9
|
-
import "../../utils-
|
|
8
|
+
import { A } from "../../ActionForm-myEAs2UC.js";
|
|
9
|
+
import "../../utils-BnmI_6N8.js";
|
|
10
10
|
import "react";
|
|
11
|
-
import "../../index-
|
|
11
|
+
import "../../index-E7g8cRyW.js";
|
|
12
12
|
import "../ErrorBoundary.js";
|
|
13
13
|
import "./form/schemaAdapter.js";
|
|
14
14
|
export {
|