@cccsaurora/clue-ui 0.15.0-dev.31 → 0.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +143 -39
- package/ActionForm-DgfJwTzt.js +0 -436
- package/AnnotationPreview-BvNpZOP0.js +0 -188
- package/ClueEnrichContext-DXwLVp0M.js +0 -518
- 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-CUmg6egw.js +0 -6
- package/_createAggregator-BpVy5xMi.js +0 -63
- package/_getPrototype-D1LAdQKO.js +0 -5
- package/_getTag-D3ToyefI.js +0 -126
- package/api/lookup/enrich.d.ts +0 -10
- package/api/lookup/index.d.ts +0 -5
- package/api/lookup/types.d.ts +0 -5
- package/api/lookup/types_detection.d.ts +0 -5
- package/cloneDeep-CjP5k9zW.js +0 -8
- package/components/AnnotationBody.d.ts +0 -6
- package/components/AnnotationBody.js +0 -56
- package/components/AnnotationDetailPopover.d.ts +0 -14
- package/components/AnnotationDetailPopover.js +0 -61
- package/components/AnnotationDetails.d.ts +0 -8
- package/components/AnnotationDetails.js +0 -172
- package/components/AnnotationEntry.d.ts +0 -6
- package/components/AnnotationEntry.js +0 -59
- package/components/AnnotationPreview.d.ts +0 -14
- package/components/AnnotationPreview.js +0 -11
- package/components/ClassificationChip.d.ts +0 -11
- package/components/ClassificationChip.js +0 -52
- package/components/CountBadge.d.ts +0 -8
- package/components/CountBadge.js +0 -34
- package/components/EnrichedCard.d.ts +0 -14
- package/components/EnrichedCard.js +0 -162
- package/components/EnrichedChip.d.ts +0 -9
- package/components/EnrichedChip.js +0 -176
- package/components/EnrichedTypography.d.ts +0 -16
- package/components/EnrichedTypography.js +0 -178
- package/components/ErrorBoundary.d.ts +0 -15
- package/components/ErrorBoundary.js +0 -36
- package/components/RetryFailedEnrichments.d.ts +0 -2
- package/components/RetryFailedEnrichments.js +0 -13
- package/components/SourcePicker.d.ts +0 -2
- package/components/SourcePicker.js +0 -98
- package/components/actions/ActionForm.d.ts +0 -6
- package/components/actions/ActionForm.js +0 -16
- package/components/actions/ExecutePopover.d.ts +0 -10
- package/components/actions/ExecutePopover.js +0 -93
- package/components/actions/ResultModal.d.ts +0 -9
- package/components/actions/ResultModal.js +0 -46
- package/components/actions/form/schemaAdapter.d.ts +0 -3
- package/components/actions/form/schemaAdapter.js +0 -47
- package/components/display/graph/ExpandMoreButton.d.ts +0 -7
- package/components/display/graph/ExpandMoreButton.js +0 -18
- package/components/display/graph/elements/NodeCard.d.ts +0 -10
- package/components/display/graph/elements/NodeCard.js +0 -146
- package/components/display/graph/elements/NodeTag.d.ts +0 -9
- package/components/display/graph/elements/NodeTag.js +0 -17
- package/components/display/graph/index.d.ts +0 -9
- package/components/display/graph/index.js +0 -438
- package/components/display/graph/visualizations/Leaf.d.ts +0 -25
- package/components/display/graph/visualizations/Leaf.js +0 -125
- package/components/display/graph/visualizations/cloud/index.d.ts +0 -24
- package/components/display/graph/visualizations/cloud/index.js +0 -141
- package/components/display/graph/visualizations/icons/BaseIcon.d.ts +0 -12
- package/components/display/graph/visualizations/icons/BaseIcon.js +0 -37
- package/components/display/graph/visualizations/icons/BugIcon.d.ts +0 -5
- package/components/display/graph/visualizations/icons/BugIcon.js +0 -18
- package/components/display/graph/visualizations/icons/HostIcon.d.ts +0 -5
- package/components/display/graph/visualizations/icons/HostIcon.js +0 -24
- package/components/display/graph/visualizations/icons/NetworkIcon.d.ts +0 -5
- package/components/display/graph/visualizations/icons/NetworkIcon.js +0 -24
- package/components/display/graph/visualizations/icons/ProcessIcon.d.ts +0 -5
- package/components/display/graph/visualizations/icons/ProcessIcon.js +0 -18
- package/components/display/graph/visualizations/icons/TargetIcon.d.ts +0 -5
- package/components/display/graph/visualizations/icons/TargetIcon.js +0 -19
- package/components/display/graph/visualizations/icons/index.d.ts +0 -2
- package/components/display/graph/visualizations/icons/index.js +0 -16
- package/components/display/graph/visualizations/panels/NodePanel.d.ts +0 -8
- package/components/display/graph/visualizations/panels/NodePanel.js +0 -12
- package/components/display/graph/visualizations/tree/BundleLine.d.ts +0 -29
- package/components/display/graph/visualizations/tree/BundleLine.js +0 -121
- package/components/display/graph/visualizations/tree/Triangle.d.ts +0 -9
- package/components/display/graph/visualizations/tree/Triangle.js +0 -26
- package/components/display/graph/visualizations/tree/index.d.ts +0 -36
- package/components/display/graph/visualizations/tree/index.js +0 -485
- package/components/display/graph/visualizations/tree/types.d.ts +0 -11
- package/components/display/graph/visualizations/tree/types.js +0 -1
- package/components/display/icons/Iconified.d.ts +0 -9
- package/components/display/icons/Iconified.js +0 -29
- package/components/display/json/index.d.ts +0 -14
- package/components/display/json/index.js +0 -12
- package/components/display/markdown/DynamicTabs.d.ts +0 -8
- package/components/display/markdown/DynamicTabs.js +0 -26
- package/components/display/markdown/index.d.ts +0 -9
- package/components/display/markdown/index.js +0 -13389
- package/components/display/markdown/markdownPlugins/tabs.d.ts +0 -3
- package/components/display/markdown/markdownPlugins/tabs.js +0 -4
- package/components/enrichment/EnrichPopover.d.ts +0 -10
- package/components/enrichment/EnrichPopover.js +0 -88
- package/components/fetchers/Fetcher.d.ts +0 -17
- package/components/fetchers/Fetcher.js +0 -188
- package/components/fetchers/PreviewModal.d.ts +0 -8
- package/components/fetchers/PreviewModal.js +0 -22
- package/components/fetchers/StatusChip.d.ts +0 -8
- package/components/fetchers/StatusChip.js +0 -30
- package/components/group/Entry.d.ts +0 -8
- package/components/group/Entry.js +0 -15
- package/components/group/Group.d.ts +0 -12
- package/components/group/Group.js +0 -15
- package/components/group/GroupControl.d.ts +0 -4
- package/components/group/GroupControl.js +0 -103
- package/components/stats/QueryStatus.d.ts +0 -4
- package/components/stats/QueryStatus.js +0 -61
- package/countBy-C69WslUA.js +0 -14
- package/data/event.d.ts +0 -12
- package/data/event.js +0 -8
- package/database/index.d.ts +0 -4
- package/database/index.js +0 -4
- package/database/selector.schema.json.d.ts +0 -119
- package/database/status.schema.json.d.ts +0 -38
- package/database/types.d.ts +0 -64
- package/debounce-bV0h5FC5.js +0 -92
- package/en/translation.json +0 -135
- package/fr/translation.json +0 -135
- package/get-D3C3lEU3.js +0 -8
- package/groupBy-DC2oOuBN.js +0 -14
- package/hooks/ClueActionContext.d.ts +0 -86
- package/hooks/ClueActionContext.js +0 -18
- package/hooks/ClueComponentContext.d.ts +0 -10
- package/hooks/ClueComponentContext.js +0 -40
- package/hooks/ClueConfigProvider.d.ts +0 -12
- package/hooks/ClueConfigProvider.js +0 -23
- package/hooks/ClueDatabaseContext.d.ts +0 -10
- package/hooks/ClueDatabaseContext.js +0 -23
- package/hooks/ClueEnrichContext.d.ts +0 -6
- package/hooks/ClueEnrichContext.js +0 -15
- package/hooks/ClueEnrichContextType.d.ts +0 -113
- package/hooks/ClueEnrichProps.d.ts +0 -81
- package/hooks/ClueFetcherContext.d.ts +0 -35
- package/hooks/ClueFetcherContext.js +0 -88
- package/hooks/ClueGroupContext.d.ts +0 -14
- package/hooks/ClueGroupContext.js +0 -23
- package/hooks/CluePopupContext.d.ts +0 -24
- package/hooks/CluePopupContext.js +0 -12
- package/hooks/ClueProvider.d.ts +0 -9
- package/hooks/ClueProvider.js +0 -14
- package/hooks/selectors.d.ts +0 -10
- package/hooks/selectors.js +0 -24
- package/hooks/useAnnotations.d.ts +0 -24
- package/hooks/useAnnotations.js +0 -69
- package/hooks/useClue.d.ts +0 -4
- package/hooks/useClue.js +0 -8
- package/hooks/useClueActions.d.ts +0 -4
- package/hooks/useClueActions.js +0 -5
- package/hooks/useClueConfig.d.ts +0 -1
- package/hooks/useClueConfig.js +0 -8
- package/hooks/useClueTypeConfig.d.ts +0 -17
- package/hooks/useClueTypeConfig.js +0 -7
- package/hooks/useComparator.d.ts +0 -16
- package/hooks/useComparator.js +0 -1060
- package/hooks/useErrors.d.ts +0 -17
- package/hooks/useErrors.js +0 -35
- package/hooks/useMyHighlights.d.ts +0 -11
- package/hooks/useMyHighlights.js +0 -74
- package/hooks/useMyLocalStorage.d.ts +0 -16
- package/hooks/useMyLocalStorage.js +0 -80
- package/iconify-CXMreGTg.js +0 -1782
- package/icons/Action.d.ts +0 -9
- package/icons/Action.js +0 -90
- package/icons/Assessment.d.ts +0 -11
- package/icons/Assessment.js +0 -123
- package/icons/Context.d.ts +0 -12
- package/icons/Context.js +0 -83
- package/icons/Opinion.d.ts +0 -11
- package/icons/Opinion.js +0 -125
- package/icons/iconMap.d.ts +0 -7
- package/icons/iconMap.js +0 -10
- package/identity-CPGTqrE4.js +0 -6
- package/index-BDVjGvMI.js +0 -696
- package/index-BDrtH5ec.js +0 -465
- package/index-C9lySIVX.js +0 -1172
- package/index-DJYqRcxJ.js +0 -15750
- package/index-Dn2NHyXg.js +0 -17654
- package/index.css +0 -21
- 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/isUndefined-CE8h73dH.js +0 -10
- package/last-CUCl67Im.js +0 -7
- package/main.d.ts +0 -42
- package/main.js +0 -70
- package/public/manifest.json +0 -16
- package/public/robots.txt +0 -3
- package/public/svg/dark/clue-h.svg +0 -52
- package/public/svg/dark/clue-icon1-simple.svg +0 -33
- package/public/svg/dark/clue-icon1.svg +0 -44
- package/public/svg/dark/clue-icon2-simple.svg +0 -26
- package/public/svg/dark/clue-icon2.svg +0 -37
- package/public/svg/dark/clue-name.svg +0 -14
- package/public/svg/dark/clue-v.svg +0 -52
- package/public/svg/light/clue-h.svg +0 -60
- package/public/svg/light/clue-icon1-simple.svg +0 -37
- package/public/svg/light/clue-icon1.svg +0 -48
- package/public/svg/light/clue-icon2-simple.svg +0 -30
- package/public/svg/light/clue-icon2.svg +0 -41
- package/public/svg/light/clue-name.svg +0 -14
- package/public/svg/light/clue-v.svg +0 -60
- package/sortBy-B-UKp4GT.js +0 -100
- package/sumBy-MYkDPHZL.js +0 -8
- package/tabs-xGuUGsJd.js +0 -254
- package/text/Frequency.d.ts +0 -9
- package/text/Frequency.js +0 -49
- package/toFinite-CArjry_l.js +0 -16
- package/toNumber-DPxy1FBy.js +0 -39
- package/types/EnrichmentProps.d.ts +0 -73
- package/types/RunningActionData.d.ts +0 -15
- package/types/WithActionData.d.ts +0 -9
- package/types/action.d.ts +0 -25
- package/types/config.d.ts +0 -16
- package/types/fetcher.d.ts +0 -60
- package/types/graph.d.ts +0 -101
- package/types/lookup.d.ts +0 -62
- package/types/network.d.ts +0 -9
- package/useClueTypeConfig-D9ZSxa4F.js +0 -3096
- package/utils/chain.d.ts +0 -14
- package/utils/chain.js +0 -106
- package/utils/classificationParser.d.ts +0 -195
- package/utils/classificationParser.js +0 -553
- package/utils/constants.d.ts +0 -26
- package/utils/constants.js +0 -36
- package/utils/graph.d.ts +0 -13
- package/utils/graph.js +0 -79
- package/utils/hashUtil.d.ts +0 -6
- package/utils/hashUtil.js +0 -11
- package/utils/line.d.ts +0 -28
- package/utils/line.js +0 -136
- package/utils/loggerUtil.d.ts +0 -6
- package/utils/loggerUtil.js +0 -8
- package/utils/sessionStorage.d.ts +0 -9
- package/utils/sessionStorage.js +0 -51
- package/utils/utils.d.ts +0 -13
- package/utils/utils.js +0 -11
- package/utils/window.d.ts +0 -3
- package/utils/window.js +0 -24
- package/utils-CxIhC2xH.js +0 -4182
|
@@ -1,178 +0,0 @@
|
|
|
1
|
-
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
-
import { useTheme, Stack, CircularProgress, Tooltip, IconButton } from "@mui/material";
|
|
3
|
-
import Iconified from "./display/icons/Iconified.js";
|
|
4
|
-
import { ClueComponentContext } from "../hooks/ClueComponentContext.js";
|
|
5
|
-
import { ClueGroupContext } from "../hooks/ClueGroupContext.js";
|
|
6
|
-
import { C as CluePopupContext } from "../AnnotationPreview-BvNpZOP0.js";
|
|
7
|
-
import { useClueEnrichSelector } from "../hooks/selectors.js";
|
|
8
|
-
import useAnnotations from "../hooks/useAnnotations.js";
|
|
9
|
-
import ActionIcon from "../icons/Action.js";
|
|
10
|
-
import AssessmentIcon from "../icons/Assessment.js";
|
|
11
|
-
import ContextIcon from "../icons/Context.js";
|
|
12
|
-
import OpinionIcon from "../icons/Opinion.js";
|
|
13
|
-
import FrequencyText from "../text/Frequency.js";
|
|
14
|
-
import { memo, useRef, useMemo, useCallback, useEffect } from "react";
|
|
15
|
-
import { u as useContextSelector } from "../index-BDVjGvMI.js";
|
|
16
|
-
const EnrichedTypography = ({
|
|
17
|
-
type: _type,
|
|
18
|
-
value,
|
|
19
|
-
classification: _classification,
|
|
20
|
-
contextIcon = false,
|
|
21
|
-
counters = false,
|
|
22
|
-
hideDetails = false,
|
|
23
|
-
hideLoading = false,
|
|
24
|
-
forceDetails = false,
|
|
25
|
-
setForceDetails = null,
|
|
26
|
-
useDetailsIcon = false,
|
|
27
|
-
skipEnrichment = false,
|
|
28
|
-
slotProps = {},
|
|
29
|
-
children,
|
|
30
|
-
...otherProps
|
|
31
|
-
}) => {
|
|
32
|
-
var _a, _b, _c;
|
|
33
|
-
const { t } = useContextSelector(ClueComponentContext, (ctx) => ctx.i18next);
|
|
34
|
-
const theme = useTheme();
|
|
35
|
-
const anchorRef = useRef();
|
|
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]
|
|
42
|
-
);
|
|
43
|
-
if (!type) {
|
|
44
|
-
throw new Error("Type was not provided as a prop, and component is not used in a group context.");
|
|
45
|
-
}
|
|
46
|
-
const [annotations, loading] = useAnnotations(type, value, classification, { skipEnrichment });
|
|
47
|
-
const showInfo = useContextSelector(CluePopupContext, (state) => state.showInfo);
|
|
48
|
-
const closeInfo = useContextSelector(CluePopupContext, (state) => state.closeInfo);
|
|
49
|
-
const buildOptions = useCallback(() => {
|
|
50
|
-
const options = {};
|
|
51
|
-
if (setForceDetails) {
|
|
52
|
-
options.onClose = () => setForceDetails(false);
|
|
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
|
-
() => !loading ? !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 : (
|
|
67
|
-
// We need to give a dummy callback when loading so the popover doesn't get confused
|
|
68
|
-
(e) => {
|
|
69
|
-
var _a2;
|
|
70
|
-
(_a2 = otherProps.onClick) == null ? void 0 : _a2.call(otherProps, e);
|
|
71
|
-
}
|
|
72
|
-
),
|
|
73
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
74
|
-
[loading, hideDetails, useDetailsIcon, otherProps, type, value, classification]
|
|
75
|
-
);
|
|
76
|
-
useEffect(() => {
|
|
77
|
-
if (forceDetails) {
|
|
78
|
-
showInfo("details", anchorRef.current, { type, value, classification }, buildOptions());
|
|
79
|
-
} else {
|
|
80
|
-
closeInfo("details", {
|
|
81
|
-
type,
|
|
82
|
-
value,
|
|
83
|
-
classification
|
|
84
|
-
});
|
|
85
|
-
}
|
|
86
|
-
}, [classification, forceDetails, type, value]);
|
|
87
|
-
return /* @__PURE__ */ jsxs(
|
|
88
|
-
Stack,
|
|
89
|
-
{
|
|
90
|
-
ref: anchorRef,
|
|
91
|
-
direction: "row",
|
|
92
|
-
spacing: 1,
|
|
93
|
-
alignItems: "center",
|
|
94
|
-
...slotProps == null ? void 0 : slotProps.stack,
|
|
95
|
-
sx: [
|
|
96
|
-
{
|
|
97
|
-
cursor: !loading && !hideDetails ? "pointer" : "inherit",
|
|
98
|
-
borderBottom: "1px solid transparent",
|
|
99
|
-
transition: theme.transitions.create(["border-bottom-color"]),
|
|
100
|
-
"&:hover": {
|
|
101
|
-
borderBottomColor: !loading && (!hideDetails ? theme.palette.primary.light : null)
|
|
102
|
-
}
|
|
103
|
-
},
|
|
104
|
-
...Array.isArray((_a = slotProps == null ? void 0 : slotProps.stack) == null ? void 0 : _a.sx) ? (_b = slotProps == null ? void 0 : slotProps.stack) == null ? void 0 : _b.sx : [(_c = slotProps == null ? void 0 : slotProps.stack) == null ? void 0 : _c.sx]
|
|
105
|
-
],
|
|
106
|
-
onClick: !useDetailsIcon ? clicker : void 0,
|
|
107
|
-
children: [
|
|
108
|
-
/* @__PURE__ */ jsx(
|
|
109
|
-
AssessmentIcon,
|
|
110
|
-
{
|
|
111
|
-
ubiquitous: true,
|
|
112
|
-
value: { type, value, classification },
|
|
113
|
-
annotations,
|
|
114
|
-
counters,
|
|
115
|
-
disableTooltip: forceDetails
|
|
116
|
-
}
|
|
117
|
-
),
|
|
118
|
-
/* @__PURE__ */ jsx(
|
|
119
|
-
OpinionIcon,
|
|
120
|
-
{
|
|
121
|
-
ubiquitous: true,
|
|
122
|
-
value: { type, value, classification },
|
|
123
|
-
annotations,
|
|
124
|
-
counters,
|
|
125
|
-
disableTooltip: forceDetails
|
|
126
|
-
}
|
|
127
|
-
),
|
|
128
|
-
/* @__PURE__ */ jsx(
|
|
129
|
-
ContextIcon,
|
|
130
|
-
{
|
|
131
|
-
ubiquitous: true,
|
|
132
|
-
value: { type, value, classification },
|
|
133
|
-
annotations,
|
|
134
|
-
counters,
|
|
135
|
-
showExtraIcon: contextIcon,
|
|
136
|
-
disableTooltip: forceDetails
|
|
137
|
-
}
|
|
138
|
-
),
|
|
139
|
-
children ?? /* @__PURE__ */ jsx(FrequencyText, { id: `enriched-${type}-value`, ...otherProps, annotations, value }),
|
|
140
|
-
/* @__PURE__ */ jsx(
|
|
141
|
-
AssessmentIcon,
|
|
142
|
-
{
|
|
143
|
-
value: { type, value, classification },
|
|
144
|
-
annotations,
|
|
145
|
-
counters,
|
|
146
|
-
disableTooltip: forceDetails
|
|
147
|
-
}
|
|
148
|
-
),
|
|
149
|
-
/* @__PURE__ */ jsx(
|
|
150
|
-
OpinionIcon,
|
|
151
|
-
{
|
|
152
|
-
value: { type, value, classification },
|
|
153
|
-
annotations,
|
|
154
|
-
counters,
|
|
155
|
-
disableTooltip: forceDetails
|
|
156
|
-
}
|
|
157
|
-
),
|
|
158
|
-
/* @__PURE__ */ jsx(
|
|
159
|
-
ContextIcon,
|
|
160
|
-
{
|
|
161
|
-
value: { type, value, classification },
|
|
162
|
-
annotations,
|
|
163
|
-
counters,
|
|
164
|
-
showExtraIcon: contextIcon,
|
|
165
|
-
disableTooltip: forceDetails
|
|
166
|
-
}
|
|
167
|
-
),
|
|
168
|
-
/* @__PURE__ */ jsx(ActionIcon, { counters, value: { type, value, classification }, disableTooltip: forceDetails }),
|
|
169
|
-
loading && !hideLoading && /* @__PURE__ */ jsx(CircularProgress, { color: "primary", size: 18 }),
|
|
170
|
-
!loading && useDetailsIcon && /* @__PURE__ */ jsx(Tooltip, { title: t("details.open"), children: /* @__PURE__ */ jsx(IconButton, { size: "small", onClick: clicker, sx: { color: theme.palette.action.disabled }, children: /* @__PURE__ */ jsx(Iconified, { icon: "ic:outline-info" }) }) })
|
|
171
|
-
]
|
|
172
|
-
}
|
|
173
|
-
);
|
|
174
|
-
};
|
|
175
|
-
const EnrichedTypography$1 = memo(EnrichedTypography);
|
|
176
|
-
export {
|
|
177
|
-
EnrichedTypography$1 as default
|
|
178
|
-
};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { default as React, PropsWithChildren } from 'react';
|
|
2
|
-
|
|
3
|
-
declare class ErrorBoundary extends React.Component<PropsWithChildren<{}>, {
|
|
4
|
-
hasError: boolean;
|
|
5
|
-
error: Error;
|
|
6
|
-
}> {
|
|
7
|
-
constructor(props: any);
|
|
8
|
-
static getDerivedStateFromError(error: any): {
|
|
9
|
-
hasError: boolean;
|
|
10
|
-
error: any;
|
|
11
|
-
};
|
|
12
|
-
componentDidCatch(error: Error): void;
|
|
13
|
-
render(): string | number | boolean | import("react/jsx-runtime").JSX.Element | Iterable<React.ReactNode>;
|
|
14
|
-
}
|
|
15
|
-
export default ErrorBoundary;
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Box, Accordion, AccordionSummary, Typography, AccordionDetails } from "@mui/material";
|
|
3
|
-
import Iconified from "./display/icons/Iconified.js";
|
|
4
|
-
import React__default from "react";
|
|
5
|
-
class ErrorBoundary extends React__default.Component {
|
|
6
|
-
constructor(props) {
|
|
7
|
-
super(props);
|
|
8
|
-
this.state = { hasError: false, error: null };
|
|
9
|
-
}
|
|
10
|
-
static getDerivedStateFromError(error) {
|
|
11
|
-
return { hasError: true, error };
|
|
12
|
-
}
|
|
13
|
-
componentDidCatch(error) {
|
|
14
|
-
this.setState({ hasError: true, error });
|
|
15
|
-
}
|
|
16
|
-
render() {
|
|
17
|
-
if (this.state.hasError) {
|
|
18
|
-
return /* @__PURE__ */ jsx(Box, { pt: 6, textAlign: "center", fontSize: 20, children: /* @__PURE__ */ jsxs(Accordion, { elevation: 0, children: [
|
|
19
|
-
/* @__PURE__ */ jsx(
|
|
20
|
-
AccordionSummary,
|
|
21
|
-
{
|
|
22
|
-
expandIcon: /* @__PURE__ */ jsx(Iconified, { icon: "ic:baseline-expand-more" }),
|
|
23
|
-
"aria-controls": "panel1-content",
|
|
24
|
-
id: "panel1-header",
|
|
25
|
-
children: /* @__PURE__ */ jsx(Typography, { align: "center", sx: { width: "100%", fontSize: "1.2rem" }, variant: "h5", children: this.state.error.message })
|
|
26
|
-
}
|
|
27
|
-
),
|
|
28
|
-
/* @__PURE__ */ jsx(AccordionDetails, { children: /* @__PURE__ */ jsx("code", { children: /* @__PURE__ */ jsx(Typography, { variant: "h6", children: this.state.error.stack }) }) })
|
|
29
|
-
] }) });
|
|
30
|
-
}
|
|
31
|
-
return this.props.children;
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
export {
|
|
35
|
-
ErrorBoundary as default
|
|
36
|
-
};
|
|
@@ -1,13 +0,0 @@
|
|
|
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 useContextSelector } from "../index-BDVjGvMI.js";
|
|
6
|
-
const RetryFailedEnrichments = () => {
|
|
7
|
-
const enrichFailedEnrichments = useClueEnrichSelector((ctx) => ctx.enrichFailedEnrichments);
|
|
8
|
-
const { t } = useContextSelector(ClueComponentContext, (ctx) => ctx.i18next);
|
|
9
|
-
return /* @__PURE__ */ jsx(Button, { onClick: enrichFailedEnrichments, children: t("retry.enrich") });
|
|
10
|
-
};
|
|
11
|
-
export {
|
|
12
|
-
RetryFailedEnrichments as default
|
|
13
|
-
};
|
|
@@ -1,98 +0,0 @@
|
|
|
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 SourcePicker = () => {
|
|
6
|
-
const { t } = useClueComponentSelector((ctx) => ctx.i18next);
|
|
7
|
-
const availableSources = useClueEnrichSelector((state) => state.availableSources);
|
|
8
|
-
const sources = useClueEnrichSelector((state) => state.sources);
|
|
9
|
-
const setSources = useClueEnrichSelector((state) => state.setSources);
|
|
10
|
-
const [anchorEl, setAnchorEl] = useState(null);
|
|
11
|
-
const [sourceFilter, setSourceFilter] = useState();
|
|
12
|
-
const handleClick = (event) => {
|
|
13
|
-
setAnchorEl(event.currentTarget);
|
|
14
|
-
};
|
|
15
|
-
const handleClose = () => {
|
|
16
|
-
setAnchorEl(null);
|
|
17
|
-
};
|
|
18
|
-
useEffect(() => {
|
|
19
|
-
setSources(availableSources);
|
|
20
|
-
}, [availableSources]);
|
|
21
|
-
const id = !!anchorEl ? "sources-popover" : void 0;
|
|
22
|
-
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
23
|
-
/* @__PURE__ */ jsxs(Button, { "aria-describedby": id, variant: "outlined", onClick: handleClick, children: [
|
|
24
|
-
t("sources"),
|
|
25
|
-
" (",
|
|
26
|
-
sources.length === availableSources.length ? t("all") : sources.length,
|
|
27
|
-
")"
|
|
28
|
-
] }),
|
|
29
|
-
/* @__PURE__ */ jsxs(
|
|
30
|
-
Popover,
|
|
31
|
-
{
|
|
32
|
-
id,
|
|
33
|
-
open: !!anchorEl,
|
|
34
|
-
anchorEl,
|
|
35
|
-
onClose: handleClose,
|
|
36
|
-
anchorOrigin: {
|
|
37
|
-
vertical: "bottom",
|
|
38
|
-
horizontal: "left"
|
|
39
|
-
},
|
|
40
|
-
children: [
|
|
41
|
-
/* @__PURE__ */ jsx(
|
|
42
|
-
TextField,
|
|
43
|
-
{
|
|
44
|
-
fullWidth: true,
|
|
45
|
-
sx: { p: 1, width: "350px" },
|
|
46
|
-
placeholder: t("quicksearch.placeholder"),
|
|
47
|
-
onChange: (event) => setSourceFilter(event.target.value.toLowerCase())
|
|
48
|
-
}
|
|
49
|
-
),
|
|
50
|
-
/* @__PURE__ */ jsx(Divider, { orientation: "horizontal" }),
|
|
51
|
-
/* @__PURE__ */ jsxs(Stack, { spacing: 0.5, m: 1, sx: { maxHeight: "500px", overflow: "auto" }, onClick: (e) => e.stopPropagation(), children: [
|
|
52
|
-
/* @__PURE__ */ jsx(
|
|
53
|
-
FormControlLabel,
|
|
54
|
-
{
|
|
55
|
-
control: /* @__PURE__ */ jsx(
|
|
56
|
-
Checkbox,
|
|
57
|
-
{
|
|
58
|
-
size: "small",
|
|
59
|
-
checked: sources.length === availableSources.length,
|
|
60
|
-
sx: { mr: 1 },
|
|
61
|
-
onChange: (__, checked) => {
|
|
62
|
-
setSources(checked ? availableSources : []);
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
),
|
|
66
|
-
label: sources.length < availableSources.length ? t("sources.select.all") : t("sources.select.none"),
|
|
67
|
-
sx: { whiteSpace: "nowrap", textTransform: "capitalize" }
|
|
68
|
-
}
|
|
69
|
-
),
|
|
70
|
-
availableSources.filter((source) => !sourceFilter || source.toLowerCase().includes(sourceFilter)).map((source) => /* @__PURE__ */ jsx(
|
|
71
|
-
FormControlLabel,
|
|
72
|
-
{
|
|
73
|
-
control: /* @__PURE__ */ jsx(
|
|
74
|
-
Checkbox,
|
|
75
|
-
{
|
|
76
|
-
size: "small",
|
|
77
|
-
checked: sources.includes(source),
|
|
78
|
-
onChange: (__, checked) => {
|
|
79
|
-
setSources(checked ? [...sources, source] : sources.filter((src) => src !== source));
|
|
80
|
-
},
|
|
81
|
-
sx: { mr: 1 }
|
|
82
|
-
}
|
|
83
|
-
),
|
|
84
|
-
label: source.replace(/[_-]/g, " "),
|
|
85
|
-
sx: { whiteSpace: "nowrap", textTransform: "capitalize" }
|
|
86
|
-
},
|
|
87
|
-
source
|
|
88
|
-
))
|
|
89
|
-
] })
|
|
90
|
-
]
|
|
91
|
-
}
|
|
92
|
-
)
|
|
93
|
-
] });
|
|
94
|
-
};
|
|
95
|
-
const SourcePicker$1 = memo(SourcePicker);
|
|
96
|
-
export {
|
|
97
|
-
SourcePicker$1 as default
|
|
98
|
-
};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import "react/jsx-runtime";
|
|
2
|
-
import "@jsonforms/material-renderers";
|
|
3
|
-
import "@jsonforms/react";
|
|
4
|
-
import "@mui/material";
|
|
5
|
-
import "../display/icons/Iconified.js";
|
|
6
|
-
import "../../index-BDrtH5ec.js";
|
|
7
|
-
import "../../hooks/ClueComponentContext.js";
|
|
8
|
-
import { A } from "../../ActionForm-DgfJwTzt.js";
|
|
9
|
-
import "react";
|
|
10
|
-
import "../../index-BDVjGvMI.js";
|
|
11
|
-
import "../ErrorBoundary.js";
|
|
12
|
-
import "./form/schemaAdapter.js";
|
|
13
|
-
import "../../utils-CxIhC2xH.js";
|
|
14
|
-
export {
|
|
15
|
-
A as default
|
|
16
|
-
};
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
import { jsxs, Fragment, jsx } from "react/jsx-runtime";
|
|
2
|
-
import { I as Icon } from "../../iconify-CXMreGTg.js";
|
|
3
|
-
import { useTheme, Tooltip, IconButton, CircularProgress, Button, Popover, Paper, Stack, Box, Typography, Divider } from "@mui/material";
|
|
4
|
-
import Iconified from "../display/icons/Iconified.js";
|
|
5
|
-
import { ClueComponentContext } from "../../hooks/ClueComponentContext.js";
|
|
6
|
-
import { useClueActionsSelector } from "../../hooks/selectors.js";
|
|
7
|
-
import useClueConfig from "../../hooks/useClueConfig.js";
|
|
8
|
-
import { isAccessible } from "../../utils/classificationParser.js";
|
|
9
|
-
import { useState, useRef, useMemo, useEffect } from "react";
|
|
10
|
-
import { u as useContextSelector } from "../../index-BDVjGvMI.js";
|
|
11
|
-
import ClassificationChip from "../ClassificationChip.js";
|
|
12
|
-
const ExecutePopover = ({ show = false, size = "small", selectors, multiples = false }) => {
|
|
13
|
-
const { t } = useContextSelector(ClueComponentContext, (ctx) => ctx.i18next);
|
|
14
|
-
const theme = useTheme();
|
|
15
|
-
const availableActions = useClueActionsSelector((ctx) => ctx.availableActions);
|
|
16
|
-
const refreshActions = useClueActionsSelector((ctx) => ctx.refreshActions);
|
|
17
|
-
const executeAction = useClueActionsSelector((ctx) => ctx.executeAction);
|
|
18
|
-
const loading = useClueActionsSelector((ctx) => ctx.loading);
|
|
19
|
-
const { config } = useClueConfig();
|
|
20
|
-
const [showExecuteMenu, setShowExecuteMenu] = useState(show);
|
|
21
|
-
const executeEl = useRef(null);
|
|
22
|
-
const actions = useMemo(
|
|
23
|
-
() => Object.fromEntries(
|
|
24
|
-
Object.entries(availableActions).filter(
|
|
25
|
-
([__, action]) => {
|
|
26
|
-
var _a;
|
|
27
|
-
return (!((_a = action.supported_types) == null ? void 0 : _a.length) || selectors.every((value) => action.supported_types.includes(value == null ? void 0 : value.type))) && (!multiples || action.accept_multiple || selectors.length === 1) && selectors.every((value) => isAccessible(action.classification, value.classification, config.c12nDef));
|
|
28
|
-
}
|
|
29
|
-
)
|
|
30
|
-
),
|
|
31
|
-
[availableActions, config.c12nDef, multiples, selectors]
|
|
32
|
-
);
|
|
33
|
-
const actionDisabled = Object.keys(actions).length < 1 || loading || selectors.length < 1;
|
|
34
|
-
useEffect(() => {
|
|
35
|
-
setShowExecuteMenu(show);
|
|
36
|
-
}, [show]);
|
|
37
|
-
useEffect(() => {
|
|
38
|
-
if (showExecuteMenu) {
|
|
39
|
-
refreshActions();
|
|
40
|
-
}
|
|
41
|
-
}, [refreshActions, showExecuteMenu]);
|
|
42
|
-
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
43
|
-
size === "small" ? /* @__PURE__ */ jsx(Tooltip, { ref: executeEl, title: t("actions.execute"), children: /* @__PURE__ */ jsx("span", { style: { alignSelf: "center" }, children: /* @__PURE__ */ jsx(IconButton, { onClick: () => setShowExecuteMenu(true), disabled: actionDisabled, color: "success", children: loading ? /* @__PURE__ */ jsx(CircularProgress, { color: "success", size: "24px" }) : /* @__PURE__ */ jsx(Iconified, { icon: "ic:outline-play-arrow" }) }) }) }) : /* @__PURE__ */ jsx(
|
|
44
|
-
Button,
|
|
45
|
-
{
|
|
46
|
-
ref: executeEl,
|
|
47
|
-
variant: "outlined",
|
|
48
|
-
color: "success",
|
|
49
|
-
disabled: actionDisabled,
|
|
50
|
-
startIcon: loading ? /* @__PURE__ */ jsx(CircularProgress, { color: "success", size: "20px" }) : /* @__PURE__ */ jsx(Iconified, { icon: "ic:outline-play-arrow" }),
|
|
51
|
-
sx: { alignSelf: "stretch" },
|
|
52
|
-
onClick: () => setShowExecuteMenu(true),
|
|
53
|
-
children: t("actions.execute")
|
|
54
|
-
}
|
|
55
|
-
),
|
|
56
|
-
/* @__PURE__ */ jsx(
|
|
57
|
-
Popover,
|
|
58
|
-
{
|
|
59
|
-
sx: { zIndex: 2e3 },
|
|
60
|
-
open: showExecuteMenu,
|
|
61
|
-
disablePortal: true,
|
|
62
|
-
onClose: () => setShowExecuteMenu(false),
|
|
63
|
-
anchorEl: executeEl.current,
|
|
64
|
-
anchorOrigin: { horizontal: "left", vertical: "bottom" },
|
|
65
|
-
children: /* @__PURE__ */ jsx(Paper, { onClick: () => setShowExecuteMenu(false), children: /* @__PURE__ */ jsx(Stack, { divider: /* @__PURE__ */ jsx(Divider, { flexItem: true, orientation: "horizontal" }), children: Object.entries(actions).map(([actionId, action]) => /* @__PURE__ */ jsx(
|
|
66
|
-
Box,
|
|
67
|
-
{
|
|
68
|
-
sx: {
|
|
69
|
-
px: 3,
|
|
70
|
-
py: 1,
|
|
71
|
-
cursor: "pointer",
|
|
72
|
-
transition: theme.transitions.create("background-color"),
|
|
73
|
-
"&:hover": { backgroundColor: theme.palette.background.default }
|
|
74
|
-
},
|
|
75
|
-
onClick: () => executeAction(actionId, selectors),
|
|
76
|
-
children: /* @__PURE__ */ jsxs(Stack, { children: [
|
|
77
|
-
/* @__PURE__ */ jsxs(Stack, { direction: "row", spacing: 1, alignItems: "center", children: [
|
|
78
|
-
action.action_icon && /* @__PURE__ */ jsx(Icon, { icon: action.action_icon }),
|
|
79
|
-
/* @__PURE__ */ jsx(Typography, { variant: "body1", children: action.name }),
|
|
80
|
-
/* @__PURE__ */ jsx(ClassificationChip, { size: "small", classification: action.classification })
|
|
81
|
-
] }),
|
|
82
|
-
action.summary && /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "text.secondary", children: action.summary })
|
|
83
|
-
] })
|
|
84
|
-
},
|
|
85
|
-
actionId
|
|
86
|
-
)) }) })
|
|
87
|
-
}
|
|
88
|
-
)
|
|
89
|
-
] });
|
|
90
|
-
};
|
|
91
|
-
export {
|
|
92
|
-
ExecutePopover as default
|
|
93
|
-
};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { ActionResult } from "../../types/action";
|
|
2
|
-
import { WithActionData } from "../../types/WithActionData";
|
|
3
|
-
|
|
4
|
-
declare const _default: import('react').NamedExoticComponent<{
|
|
5
|
-
show?: boolean;
|
|
6
|
-
result: WithActionData<ActionResult>;
|
|
7
|
-
onClose?: () => void;
|
|
8
|
-
}>;
|
|
9
|
-
export default _default;
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { I as Icon } from "../../iconify-CXMreGTg.js";
|
|
3
|
-
import { Modal, Paper, Stack, Typography, Divider, Button } from "@mui/material";
|
|
4
|
-
import { J as JSONViewer } from "../../index-BDrtH5ec.js";
|
|
5
|
-
import Markdown from "../display/markdown/index.js";
|
|
6
|
-
import { ClueComponentContext } from "../../hooks/ClueComponentContext.js";
|
|
7
|
-
import { memo } from "react";
|
|
8
|
-
import { u as useContextSelector } from "../../index-BDVjGvMI.js";
|
|
9
|
-
import ClassificationChip from "../ClassificationChip.js";
|
|
10
|
-
import ErrorBoundary from "../ErrorBoundary.js";
|
|
11
|
-
const ResultModal = ({ result, onClose, show = false }) => {
|
|
12
|
-
const { t } = useContextSelector(ClueComponentContext, (ctx) => ctx.i18next);
|
|
13
|
-
if (!result) {
|
|
14
|
-
return null;
|
|
15
|
-
}
|
|
16
|
-
try {
|
|
17
|
-
return /* @__PURE__ */ jsx(Modal, { open: show, sx: { display: "flex", alignItems: "center", justifyContent: "center" }, onClose, children: /* @__PURE__ */ jsx(Paper, { sx: { maxHeight: "80%", maxWidth: "80%", height: "100%", p: 2, minWidth: "750px" }, children: /* @__PURE__ */ jsxs(Stack, { spacing: 1, height: "100%", children: [
|
|
18
|
-
/* @__PURE__ */ jsxs(Stack, { direction: "row", spacing: 1, alignItems: "center", children: [
|
|
19
|
-
result.action.action_icon && /* @__PURE__ */ jsx(Icon, { height: "1.5rem", icon: result.action.action_icon }),
|
|
20
|
-
/* @__PURE__ */ jsx(Typography, { variant: "h5", children: result.action.name }),
|
|
21
|
-
result.action.supported_types && /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "text.secondary", children: result.action.supported_types.map((type) => type.toUpperCase()).join(", ") }),
|
|
22
|
-
/* @__PURE__ */ jsx("div", { style: { flex: 1 } }),
|
|
23
|
-
/* @__PURE__ */ jsx(ClassificationChip, { size: "small", classification: result.action.classification })
|
|
24
|
-
] }),
|
|
25
|
-
/* @__PURE__ */ jsx(Typography, { variant: "body1", children: result.action.summary }),
|
|
26
|
-
/* @__PURE__ */ jsx(Divider, { flexItem: true }),
|
|
27
|
-
/* @__PURE__ */ jsxs(ErrorBoundary, { children: [
|
|
28
|
-
result.format === "markdown" && /* @__PURE__ */ jsx(Markdown, { md: result.output }),
|
|
29
|
-
result.format === "json" && /* @__PURE__ */ jsx(JSONViewer, { data: result.output, collapse: true, forceCompact: true })
|
|
30
|
-
] }),
|
|
31
|
-
/* @__PURE__ */ jsx("div", { style: { flex: 1 } }),
|
|
32
|
-
/* @__PURE__ */ jsxs(Stack, { direction: "row", spacing: 1, children: [
|
|
33
|
-
/* @__PURE__ */ jsx("div", { style: { flex: 1 } }),
|
|
34
|
-
result.link && /* @__PURE__ */ jsx(Button, { variant: "outlined", component: "a", target: "_blank", href: result.link, children: t("details.open") }),
|
|
35
|
-
/* @__PURE__ */ jsx(Button, { variant: "outlined", color: "error", onClick: onClose, children: t("close") })
|
|
36
|
-
] })
|
|
37
|
-
] }) }) });
|
|
38
|
-
} catch (e) {
|
|
39
|
-
console.warn(e);
|
|
40
|
-
return null;
|
|
41
|
-
}
|
|
42
|
-
};
|
|
43
|
-
const ResultModal$1 = memo(ResultModal);
|
|
44
|
-
export {
|
|
45
|
-
ResultModal$1 as default
|
|
46
|
-
};
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { c as cloneDeep } from "../../../cloneDeep-CjP5k9zW.js";
|
|
2
|
-
import { g as get } from "../../../get-D3C3lEU3.js";
|
|
3
|
-
const adaptSchema = (_schema) => {
|
|
4
|
-
const requiredFields = [];
|
|
5
|
-
const schema = cloneDeep(_schema);
|
|
6
|
-
const newSchema = {
|
|
7
|
-
...schema,
|
|
8
|
-
properties: Object.fromEntries(
|
|
9
|
-
Object.entries(schema.properties ?? {}).filter(([name]) => !["raw_data", "selector", "selectors"].includes(name)).map(([name, def]) => {
|
|
10
|
-
var _a, _b;
|
|
11
|
-
requiredFields.push(name);
|
|
12
|
-
if (typeof def === "boolean") {
|
|
13
|
-
return [name, def];
|
|
14
|
-
}
|
|
15
|
-
if (((_a = def.anyOf) == null ? void 0 : _a.length) === 2) {
|
|
16
|
-
if (typeof def.anyOf[1] === "boolean") {
|
|
17
|
-
return [name, def];
|
|
18
|
-
}
|
|
19
|
-
if (def.anyOf[1].type === "null" && typeof def.anyOf[0] !== "boolean") {
|
|
20
|
-
if (def.anyOf[0].enum) {
|
|
21
|
-
def.enum = def.anyOf[0].enum;
|
|
22
|
-
}
|
|
23
|
-
def.type = [...Array.isArray(def.anyOf[0].type) ? def.anyOf[0].type : [def.anyOf[0].type], "null"];
|
|
24
|
-
delete def.anyOf;
|
|
25
|
-
requiredFields.pop();
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
if (((_b = def.allOf) == null ? void 0 : _b.length) > 0) {
|
|
29
|
-
if (typeof def.allOf[0] !== "boolean" && def.allOf[0].$ref) {
|
|
30
|
-
def = {
|
|
31
|
-
...def,
|
|
32
|
-
...get(schema, def.allOf[0].$ref.replace("#/", "").replaceAll("/", ".")),
|
|
33
|
-
title: def.title
|
|
34
|
-
};
|
|
35
|
-
delete def.allOf;
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
return [name, def];
|
|
39
|
-
})
|
|
40
|
-
)
|
|
41
|
-
};
|
|
42
|
-
newSchema.required = requiredFields;
|
|
43
|
-
return newSchema;
|
|
44
|
-
};
|
|
45
|
-
export {
|
|
46
|
-
adaptSchema
|
|
47
|
-
};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { IconButton } from "@mui/material";
|
|
3
|
-
const ExpandMoreButton = (props) => {
|
|
4
|
-
const { expand, ...other } = props;
|
|
5
|
-
return /* @__PURE__ */ jsx(
|
|
6
|
-
IconButton,
|
|
7
|
-
{
|
|
8
|
-
...other,
|
|
9
|
-
sx: {
|
|
10
|
-
transform: !expand ? "rotate(0deg)" : "rotate(180deg)",
|
|
11
|
-
transition: (theme) => theme.transitions.create("transform")
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
);
|
|
15
|
-
};
|
|
16
|
-
export {
|
|
17
|
-
ExpandMoreButton as default
|
|
18
|
-
};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { SxProps, Theme } from '@mui/material';
|
|
2
|
-
import { RawEntry } from "../../../../types/graph";
|
|
3
|
-
import { FC } from 'react';
|
|
4
|
-
|
|
5
|
-
interface NodeCardOptions {
|
|
6
|
-
node: RawEntry;
|
|
7
|
-
sx?: SxProps<Theme>;
|
|
8
|
-
}
|
|
9
|
-
declare const NodeCard: FC<NodeCardOptions>;
|
|
10
|
-
export default NodeCard;
|