@cccsaurora/clue-ui 1.1.1-dev.108 → 1.1.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.
Files changed (178) hide show
  1. package/ActionForm-myEAs2UC.js +435 -0
  2. package/AnnotationDetails-BdfWMISw.js +160 -0
  3. package/AnnotationPreview-CKMGCoUH.js +140 -0
  4. package/ClueEnrichContext-CrFpdYhh.js +414 -0
  5. package/FlexOne-BXWFOd1T.js +6 -0
  6. package/_Map-DXNg_Z-q.js +54 -0
  7. package/_MapCache-Cu25RRDU.js +129 -0
  8. package/_Uint8Array-DlJCtTvG.js +102 -0
  9. package/_baseAssignValue-CUmzp727.js +20 -0
  10. package/_baseClone-BlMmRXeX.js +208 -0
  11. package/_baseExtremum-P_0akmCi.js +27 -0
  12. package/_baseFlatten-CN7vDNEQ.js +72 -0
  13. package/_baseGet-Dgf6_xCm.js +80 -0
  14. package/_baseIsEqual-Cpjtfb3Q.js +173 -0
  15. package/_baseIteratee-CP1bocOX.js +95 -0
  16. package/_baseSlice-M5RKzt1A.js +10 -0
  17. package/_baseSum-wEbgNeUs.js +10 -0
  18. package/_baseUniq-tMFmk80M.js +61 -0
  19. package/_commonjsHelpers-DaMA6jEr.js +8 -0
  20. package/_createAggregator-B4Cav8ZM.js +53 -0
  21. package/_getPrototype-CHAFQYL_.js +5 -0
  22. package/_getTag-BV_UoLYG.js +90 -0
  23. package/cloneDeep-BPVpFBzJ.js +8 -0
  24. package/components/AnnotationBody.js +35 -49
  25. package/components/AnnotationDetailPopover.js +30 -36
  26. package/components/AnnotationDetails.js +6 -6
  27. package/components/AnnotationEntry.js +47 -50
  28. package/components/AnnotationPreview.js +5 -5
  29. package/components/ClassificationChip.js +23 -44
  30. package/components/CountBadge.js +26 -31
  31. package/components/EnrichedCard.js +97 -110
  32. package/components/EnrichedChip.js +105 -130
  33. package/components/EnrichedTypography.js +107 -133
  34. package/components/ErrorBoundary.js +24 -28
  35. package/components/RetryFailedEnrichments.js +9 -10
  36. package/components/SourcePicker.js +49 -57
  37. package/components/actions/ActionForm.js +4 -4
  38. package/components/actions/ExecutePopover.js +50 -64
  39. package/components/actions/ResultModal.js +5 -5
  40. package/components/actions/form/schemaAdapter.js +23 -39
  41. package/components/display/graph/ExpandMoreButton.js +10 -10
  42. package/components/display/graph/elements/NodeCard.js +91 -111
  43. package/components/display/graph/elements/NodeTag.js +13 -15
  44. package/components/display/graph/index.js +202 -261
  45. package/components/display/graph/visualizations/Leaf.js +69 -88
  46. package/components/display/graph/visualizations/cloud/index.js +81 -98
  47. package/components/display/graph/visualizations/icons/BaseIcon.js +21 -26
  48. package/components/display/graph/visualizations/icons/BugIcon.js +12 -12
  49. package/components/display/graph/visualizations/icons/HostIcon.js +12 -12
  50. package/components/display/graph/visualizations/icons/NetworkIcon.js +12 -12
  51. package/components/display/graph/visualizations/icons/ProcessIcon.js +12 -12
  52. package/components/display/graph/visualizations/icons/TargetIcon.js +13 -13
  53. package/components/display/graph/visualizations/icons/index.js +13 -14
  54. package/components/display/graph/visualizations/panels/NodePanel.js +8 -10
  55. package/components/display/graph/visualizations/tree/BundleLine.js +81 -108
  56. package/components/display/graph/visualizations/tree/Triangle.js +13 -13
  57. package/components/display/graph/visualizations/tree/index.js +305 -407
  58. package/components/display/icons/Iconified.js +12 -27
  59. package/components/display/json/index.js +4 -4
  60. package/components/display/markdown/index.js +5761 -8662
  61. package/components/enrichment/EnrichPopover.js +47 -55
  62. package/components/fetchers/Fetcher.js +95 -123
  63. package/components/fetchers/PreviewModal.js +17 -20
  64. package/components/fetchers/StatusChip.js +17 -21
  65. package/components/group/Entry.js +11 -13
  66. package/components/group/Group.js +10 -13
  67. package/components/group/GroupControl.js +66 -77
  68. package/components/stats/QueryStatus.js +31 -41
  69. package/countBy-DOutsa_w.js +8 -0
  70. package/data/event.js +4 -6
  71. package/database/index.js +2 -2
  72. package/debounce-DryYcbJ4.js +56 -0
  73. package/get-Bow1vKwx.js +8 -0
  74. package/groupBy-BheQYl6f.js +8 -0
  75. package/hooks/ClueActionContext.js +7 -7
  76. package/hooks/ClueComponentContext.js +23 -29
  77. package/hooks/ClueConfigProvider.js +12 -14
  78. package/hooks/ClueDatabaseContext.js +13 -19
  79. package/hooks/ClueEnrichContext.js +8 -8
  80. package/hooks/ClueFetcherContext.js +46 -74
  81. package/hooks/ClueGroupContext.js +14 -17
  82. package/hooks/CluePopupContext.js +5 -5
  83. package/hooks/ClueProvider.js +10 -12
  84. package/hooks/selectors.js +10 -21
  85. package/hooks/useActionResult.js +2 -2
  86. package/hooks/useAnnotations.js +29 -45
  87. package/hooks/useClue.js +4 -6
  88. package/hooks/useClueActions.js +3 -3
  89. package/hooks/useClueConfig.js +4 -6
  90. package/hooks/useClueTypeConfig.js +3 -3
  91. package/hooks/useComparator.js +435 -722
  92. package/hooks/useErrors.js +18 -22
  93. package/hooks/useMyHighlights.js +36 -66
  94. package/hooks/useMyLocalStorage.js +37 -66
  95. package/iconify-BBckr5AQ.js +1263 -0
  96. package/icons/Action.js +49 -66
  97. package/icons/Assessment.js +68 -84
  98. package/icons/Context.js +63 -77
  99. package/icons/Opinion.js +65 -77
  100. package/icons/iconMap.js +2 -2
  101. package/identity-ByMq8VxU.js +6 -0
  102. package/index-BXxfAxFt.js +12734 -0
  103. package/index-C15OYgRY.js +358 -0
  104. package/index-E7g8cRyW.js +568 -0
  105. package/index-p5_wX7q1.js +11729 -0
  106. package/index-vF6IyBhz.js +975 -0
  107. package/isEmpty-g47Qir2A.js +21 -0
  108. package/isNil-CjWwlQS3.js +6 -0
  109. package/isObject-B53jY8Qg.js +7 -0
  110. package/isObjectLike-BatpeCIi.js +29 -0
  111. package/isSymbol-C3_SC0Qp.js +8 -0
  112. package/last-7CdUxN0r.js +7 -0
  113. package/main.js +62 -62
  114. package/package.json +1 -1
  115. package/sortBy-ITdmD17L.js +79 -0
  116. package/sumBy-DxJUU2E8.js +8 -0
  117. package/text/Frequency.js +23 -42
  118. package/toFinite-BMy6GObD.js +14 -0
  119. package/toNumber-YVhnnJv4.js +31 -0
  120. package/useClueTypeConfig-DyeBcXQX.js +2214 -0
  121. package/utils/chain.js +64 -91
  122. package/utils/classificationParser.js +256 -519
  123. package/utils/constants.js +10 -35
  124. package/utils/graph.js +45 -72
  125. package/utils/hashUtil.js +7 -7
  126. package/utils/line.js +81 -131
  127. package/utils/loggerUtil.js +3 -5
  128. package/utils/sessionStorage.js +27 -41
  129. package/utils/time.js +423 -423
  130. package/utils/utils.js +9 -9
  131. package/utils/window.js +10 -21
  132. package/utils-BnmI_6N8.js +130 -0
  133. package/ActionForm-ByeOzpc4.js +0 -555
  134. package/AnnotationDetails-DknbKDyl.js +0 -175
  135. package/AnnotationPreview-CQwKs8se.js +0 -188
  136. package/ClueEnrichContext-6NJfXpUB.js +0 -536
  137. package/FlexOne-BSYAhhtG.js +0 -9
  138. package/_Map-kgDsDYxq.js +0 -64
  139. package/_MapCache-DabaaWfq.js +0 -161
  140. package/_Uint8Array-BlVVH1tp.js +0 -129
  141. package/_baseAssignValue-CNbcU6Nb.js +0 -25
  142. package/_baseClone-D3a8Pa4T.js +0 -284
  143. package/_baseExtremum-B1o1zHjR.js +0 -33
  144. package/_baseFlatten-D4huXoEI.js +0 -92
  145. package/_baseGet-BSK_nnoz.js +0 -109
  146. package/_baseIsEqual-B5xLoweL.js +0 -238
  147. package/_baseIteratee-p6Nj07-n.js +0 -126
  148. package/_baseSlice-GAv_YFTT.js +0 -20
  149. package/_baseSum-D0WC1dN0.js +0 -13
  150. package/_baseUniq-CpupKWcL.js +0 -89
  151. package/_commonjsHelpers-DWwsNxpa.js +0 -8
  152. package/_createAggregator-BpVy5xMi.js +0 -63
  153. package/_getPrototype-D1LAdQKO.js +0 -5
  154. package/_getTag-D3ToyefI.js +0 -126
  155. package/cloneDeep-CjP5k9zW.js +0 -8
  156. package/countBy-C69WslUA.js +0 -14
  157. package/debounce-bV0h5FC5.js +0 -92
  158. package/get-D3C3lEU3.js +0 -8
  159. package/groupBy-DC2oOuBN.js +0 -14
  160. package/iconify-CXMreGTg.js +0 -1782
  161. package/identity-CPGTqrE4.js +0 -6
  162. package/index-BDVjGvMI.js +0 -696
  163. package/index-BbPn6-Mw.js +0 -15750
  164. package/index-Bi21Wb23.js +0 -465
  165. package/index-C3lkTD69.js +0 -1172
  166. package/index-CC12Ux-9.js +0 -17654
  167. package/isEmpty-BQkZubqU.js +0 -29
  168. package/isNil-CIubwp4T.js +0 -6
  169. package/isObject-FTY-5JQX.js +0 -7
  170. package/isObjectLike-OAgjjZye.js +0 -48
  171. package/isSymbol-Xd2FsJyp.js +0 -8
  172. package/last-CUCl67Im.js +0 -7
  173. package/sortBy-B-UKp4GT.js +0 -100
  174. package/sumBy-MYkDPHZL.js +0 -8
  175. package/toFinite-Bc55msYj.js +0 -16
  176. package/toNumber-DPxy1FBy.js +0 -39
  177. package/useClueTypeConfig-XvGvIw2S.js +0 -3201
  178. package/utils-7OtvGnmf.js +0 -200
@@ -1,93 +1,79 @@
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(
1
+ import { jsxs as f, Fragment as j, jsx as e } from "react/jsx-runtime";
2
+ import { I as z } from "../../iconify-BBckr5AQ.js";
3
+ import { useTheme as O, Tooltip as P, IconButton as D, CircularProgress as v, Button as w, Popover as B, Paper as M, Stack as p, Box as T, Typography as A, Divider as F } from "@mui/material";
4
+ import E from "../display/icons/Iconified.js";
5
+ import { ClueComponentContext as R } from "../../hooks/ClueComponentContext.js";
6
+ import { useClueActionsSelector as c } from "../../hooks/selectors.js";
7
+ import q from "../../hooks/useClueConfig.js";
8
+ import { isAccessible as G } from "../../utils/classificationParser.js";
9
+ import { useState as H, useRef as J, useMemo as K, useEffect as I } from "react";
10
+ import { u as L } from "../../index-E7g8cRyW.js";
11
+ import N from "../ClassificationChip.js";
12
+ const ie = ({ show: s = !1, size: S = "small", selectors: i, multiples: m = !1 }) => {
13
+ const { t: d } = L(R, (o) => o.i18next), h = O(), x = c((o) => o.availableActions), g = c((o) => o.refreshActions), _ = c((o) => o.executeAction), l = c((o) => o.loading), { config: b } = q(), [a, n] = H(s), u = J(null), y = K(
23
14
  () => 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));
15
+ Object.entries(x).filter(
16
+ ([o, t]) => {
17
+ var k;
18
+ return (!((k = t.supported_types) != null && k.length) || i.every((r) => t.supported_types.includes(r == null ? void 0 : r.type))) && (!m || t.accept_multiple || i.length === 1) && i.every((r) => G(t.classification, r.classification, b.c12nDef));
28
19
  }
29
20
  )
30
21
  ),
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,
22
+ [x, b.c12nDef, m, i]
23
+ ), C = Object.keys(y).length < 1 || l || i.length < 1;
24
+ return I(() => {
25
+ n(s);
26
+ }, [s]), I(() => {
27
+ a && g();
28
+ }, [g, a]), /* @__PURE__ */ f(j, { children: [
29
+ S === "small" ? /* @__PURE__ */ e(P, { ref: u, title: d("actions.execute"), children: /* @__PURE__ */ e("span", { style: { alignSelf: "center" }, children: /* @__PURE__ */ e(D, { onClick: () => n(!0), disabled: C, color: "success", children: l ? /* @__PURE__ */ e(v, { color: "success", size: "24px" }) : /* @__PURE__ */ e(E, { icon: "ic:outline-play-arrow" }) }) }) }) : /* @__PURE__ */ e(
30
+ w,
45
31
  {
46
- ref: executeEl,
32
+ ref: u,
47
33
  variant: "outlined",
48
34
  color: "success",
49
- disabled: actionDisabled,
50
- startIcon: loading ? /* @__PURE__ */ jsx(CircularProgress, { color: "success", size: "20px" }) : /* @__PURE__ */ jsx(Iconified, { icon: "ic:outline-play-arrow" }),
35
+ disabled: C,
36
+ startIcon: l ? /* @__PURE__ */ e(v, { color: "success", size: "20px" }) : /* @__PURE__ */ e(E, { icon: "ic:outline-play-arrow" }),
51
37
  sx: { alignSelf: "stretch" },
52
- onClick: () => setShowExecuteMenu(true),
53
- children: t("actions.execute")
38
+ onClick: () => n(!0),
39
+ children: d("actions.execute")
54
40
  }
55
41
  ),
56
- /* @__PURE__ */ jsx(
57
- Popover,
42
+ /* @__PURE__ */ e(
43
+ B,
58
44
  {
59
45
  sx: { zIndex: 2e3 },
60
- open: showExecuteMenu,
61
- disablePortal: true,
62
- onClose: () => setShowExecuteMenu(false),
63
- anchorEl: executeEl.current,
46
+ open: a,
47
+ disablePortal: !0,
48
+ onClose: () => n(!1),
49
+ anchorEl: u.current,
64
50
  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,
51
+ children: /* @__PURE__ */ e(M, { onClick: () => n(!1), children: /* @__PURE__ */ e(p, { divider: /* @__PURE__ */ e(F, { flexItem: !0, orientation: "horizontal" }), children: Object.entries(y).map(([o, t]) => /* @__PURE__ */ e(
52
+ T,
67
53
  {
68
54
  sx: {
69
55
  px: 3,
70
56
  py: 1,
71
57
  cursor: "pointer",
72
- transition: theme.transitions.create("background-color"),
73
- "&:hover": { backgroundColor: theme.palette.background.default }
58
+ transition: h.transitions.create("background-color"),
59
+ "&:hover": { backgroundColor: h.palette.background.default }
74
60
  },
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 })
61
+ onClick: () => _(o, i),
62
+ children: /* @__PURE__ */ f(p, { children: [
63
+ /* @__PURE__ */ f(p, { direction: "row", spacing: 1, alignItems: "center", children: [
64
+ t.action_icon && /* @__PURE__ */ e(z, { icon: t.action_icon }),
65
+ /* @__PURE__ */ e(A, { variant: "body1", children: t.name }),
66
+ /* @__PURE__ */ e(N, { size: "small", classification: t.classification })
81
67
  ] }),
82
- action.summary && /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "text.secondary", children: action.summary })
68
+ t.summary && /* @__PURE__ */ e(A, { variant: "caption", color: "text.secondary", children: t.summary })
83
69
  ] })
84
70
  },
85
- actionId
71
+ o
86
72
  )) }) })
87
73
  }
88
74
  )
89
75
  ] });
90
76
  };
91
77
  export {
92
- ExecutePopover as default
78
+ ie as default
93
79
  };
@@ -1,14 +1,14 @@
1
1
  import "react/jsx-runtime";
2
- import "../../iconify-CXMreGTg.js";
2
+ import "../../iconify-BBckr5AQ.js";
3
3
  import "@mui/material";
4
- import "../../index-Bi21Wb23.js";
4
+ import "../../index-C15OYgRY.js";
5
5
  import "../display/markdown/index.js";
6
6
  import "../../hooks/ClueComponentContext.js";
7
- import { R } from "../../ActionForm-ByeOzpc4.js";
7
+ import { R as u } from "../../ActionForm-myEAs2UC.js";
8
8
  import "react";
9
- import "../../index-BDVjGvMI.js";
9
+ import "../../index-E7g8cRyW.js";
10
10
  import "../ClassificationChip.js";
11
11
  import "../ErrorBoundary.js";
12
12
  export {
13
- R as default
13
+ u as default
14
14
  };
@@ -1,48 +1,32 @@
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,
1
+ import { c as y } from "../../../cloneDeep-BPVpFBzJ.js";
2
+ import { g as s } from "../../../get-Bow1vKwx.js";
3
+ const u = (i) => {
4
+ const r = [], l = y(i), n = {
5
+ ...l,
8
6
  properties: Object.fromEntries(
9
- Object.entries(schema.properties ?? {}).filter(([name]) => !["raw_data", "selector", "selectors", "context"].includes(name)).map(([name, def]) => {
10
- var _a, _b;
11
- requiredFields.push(name);
12
- if (typeof def === "boolean") {
13
- return [name, def];
7
+ Object.entries(l.properties ?? {}).filter(([t]) => !["raw_data", "selector", "selectors", "context"].includes(t)).map(([t, e]) => {
8
+ var a, o;
9
+ if (r.push(t), typeof e == "boolean")
10
+ return [t, e];
11
+ if (((a = e.anyOf) == null ? void 0 : a.length) === 2) {
12
+ if (typeof e.anyOf[1] == "boolean")
13
+ return [t, e];
14
+ e.anyOf[1].type === "null" && typeof e.anyOf[0] != "boolean" && (e.anyOf[0].enum && (e.enum = e.anyOf[0].enum), e.type = [...Array.isArray(e.anyOf[0].type) ? e.anyOf[0].type : [e.anyOf[0].type], "null"], delete e.anyOf, r.pop());
14
15
  }
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
- }
16
+ if (((o = e.allOf) == null ? void 0 : o.length) > 0 && typeof e.allOf[0] != "boolean" && e.allOf[0].$ref) {
17
+ const p = {
18
+ ...e,
19
+ ...s(l, e.allOf[0].$ref.replace("#/", "").replaceAll("/", ".")),
20
+ title: e.title
21
+ };
22
+ return delete p.allOf, [t, p];
27
23
  }
28
- if (((_b = def.allOf) == null ? void 0 : _b.length) > 0) {
29
- if (typeof def.allOf[0] !== "boolean" && def.allOf[0].$ref) {
30
- const newDef = {
31
- ...def,
32
- ...get(schema, def.allOf[0].$ref.replace("#/", "").replaceAll("/", ".")),
33
- title: def.title
34
- };
35
- delete newDef.allOf;
36
- return [name, newDef];
37
- }
38
- }
39
- return [name, def];
24
+ return [t, e];
40
25
  })
41
26
  )
42
27
  };
43
- newSchema.required = requiredFields;
44
- return newSchema;
28
+ return n.required = r, n;
45
29
  };
46
30
  export {
47
- adaptSchema
31
+ u as adaptSchema
48
32
  };
@@ -1,18 +1,18 @@
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,
1
+ import { jsx as e } from "react/jsx-runtime";
2
+ import { IconButton as a } from "@mui/material";
3
+ const m = (t) => {
4
+ const { expand: o, ...r } = t;
5
+ return /* @__PURE__ */ e(
6
+ a,
7
7
  {
8
- ...other,
8
+ ...r,
9
9
  sx: {
10
- transform: !expand ? "rotate(0deg)" : "rotate(180deg)",
11
- transition: (theme) => theme.transitions.create("transform")
10
+ transform: o ? "rotate(180deg)" : "rotate(0deg)",
11
+ transition: (n) => n.transitions.create("transform")
12
12
  }
13
13
  }
14
14
  );
15
15
  };
16
16
  export {
17
- ExpandMoreButton as default
17
+ m as default
18
18
  };
@@ -1,111 +1,91 @@
1
- import { jsxs, jsx, Fragment } from "react/jsx-runtime";
2
- import { Stack, Typography, Card, CardContent, Divider, Collapse } from "@mui/material";
3
- import { a as isPlainObject, f as flatten$1 } from "../../../../utils-7OtvGnmf.js";
4
- import { cssImportant } from "../../../../utils/graph.js";
5
- import { b as baseGet, c as castPath, t as toKey, a as arrayMap } from "../../../../_baseGet-BSK_nnoz.js";
6
- import { c as copyObject, g as getAllKeysIn, b as baseClone } from "../../../../_baseClone-D3a8Pa4T.js";
7
- import { l as last } from "../../../../last-CUCl67Im.js";
8
- import { b as baseSlice } from "../../../../_baseSlice-GAv_YFTT.js";
9
- import { b as baseFlatten, s as setToString, o as overRest } from "../../../../_baseFlatten-D4huXoEI.js";
10
- import { useState, useEffect, useCallback, Fragment as Fragment$1 } from "react";
11
- import Iconified from "../../icons/Iconified.js";
12
- import { J as JSONViewer } from "../../../../index-Bi21Wb23.js";
13
- import Markdown from "../../markdown/index.js";
14
- import ExpandMoreButton from "../ExpandMoreButton.js";
15
- import NodeTag from "./NodeTag.js";
16
- function flatten(array) {
17
- var length = array == null ? 0 : array.length;
18
- return length ? baseFlatten(array) : [];
1
+ import { jsxs as l, jsx as n, Fragment as b } from "react/jsx-runtime";
2
+ import { Stack as c, Typography as g, Card as C, CardContent as w, Divider as m, Collapse as _ } from "@mui/material";
3
+ import { a as E, f as O } from "../../../../utils-BnmI_6N8.js";
4
+ import { cssImportant as d } from "../../../../utils/graph.js";
5
+ import { b as S, c as v, t as k, a as A } from "../../../../_baseGet-Dgf6_xCm.js";
6
+ import { c as I, g as L, b as F } from "../../../../_baseClone-BlMmRXeX.js";
7
+ import { l as N } from "../../../../last-7CdUxN0r.js";
8
+ import { b as P } from "../../../../_baseSlice-M5RKzt1A.js";
9
+ import { b as D, s as M, o as G } from "../../../../_baseFlatten-CN7vDNEQ.js";
10
+ import { useState as x, useEffect as T, useCallback as z, Fragment as B } from "react";
11
+ import R from "../../icons/Iconified.js";
12
+ import { J } from "../../../../index-C15OYgRY.js";
13
+ import K from "../../markdown/index.js";
14
+ import $ from "../ExpandMoreButton.js";
15
+ import h from "./NodeTag.js";
16
+ function U(e) {
17
+ var t = e == null ? 0 : e.length;
18
+ return t ? D(e) : [];
19
19
  }
20
- function flatRest(func) {
21
- return setToString(overRest(func, void 0, flatten), func + "");
20
+ function V(e) {
21
+ return M(G(e, void 0, U), e + "");
22
22
  }
23
- function parent(object, path) {
24
- return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1));
23
+ function Y(e, t) {
24
+ return t.length < 2 ? e : S(e, P(t, 0, -1));
25
25
  }
26
- var objectProto = Object.prototype;
27
- var hasOwnProperty = objectProto.hasOwnProperty;
28
- function baseUnset(object, path) {
29
- path = castPath(path, object);
30
- var index = -1, length = path.length;
31
- if (!length) {
32
- return true;
33
- }
34
- var isRootPrimitive = object == null || typeof object !== "object" && typeof object !== "function";
35
- while (++index < length) {
36
- var key = path[index];
37
- if (typeof key !== "string") {
38
- continue;
39
- }
40
- if (key === "__proto__" && !hasOwnProperty.call(object, "__proto__")) {
41
- return false;
42
- }
43
- if (key === "constructor" && index + 1 < length && typeof path[index + 1] === "string" && path[index + 1] === "prototype") {
44
- if (isRootPrimitive && index === 0) {
45
- continue;
26
+ var j = Object.prototype, q = j.hasOwnProperty;
27
+ function H(e, t) {
28
+ t = v(t, e);
29
+ var r = -1, i = t.length;
30
+ if (!i)
31
+ return !0;
32
+ for (var o = e == null || typeof e != "object" && typeof e != "function"; ++r < i; ) {
33
+ var a = t[r];
34
+ if (typeof a == "string") {
35
+ if (a === "__proto__" && !q.call(e, "__proto__"))
36
+ return !1;
37
+ if (a === "constructor" && r + 1 < i && typeof t[r + 1] == "string" && t[r + 1] === "prototype") {
38
+ if (o && r === 0)
39
+ continue;
40
+ return !1;
46
41
  }
47
- return false;
48
42
  }
49
43
  }
50
- var obj = parent(object, path);
51
- return obj == null || delete obj[toKey(last(path))];
44
+ var s = Y(e, t);
45
+ return s == null || delete s[k(N(t))];
52
46
  }
53
- function customOmitClone(value) {
54
- return isPlainObject(value) ? void 0 : value;
47
+ function Q(e) {
48
+ return E(e) ? void 0 : e;
55
49
  }
56
- var CLONE_DEEP_FLAG = 1, CLONE_FLAT_FLAG = 2, CLONE_SYMBOLS_FLAG = 4;
57
- var omit = flatRest(function(object, paths) {
58
- var result = {};
59
- if (object == null) {
60
- return result;
61
- }
62
- var isDeep = false;
63
- paths = arrayMap(paths, function(path) {
64
- path = castPath(path, object);
65
- isDeep || (isDeep = path.length > 1);
66
- return path;
67
- });
68
- copyObject(object, getAllKeysIn(object), result);
69
- if (isDeep) {
70
- result = baseClone(result, CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG, customOmitClone);
71
- }
72
- var length = paths.length;
73
- while (length--) {
74
- baseUnset(result, paths[length]);
75
- }
76
- return result;
50
+ var W = 1, X = 2, Z = 4, ee = V(function(e, t) {
51
+ var r = {};
52
+ if (e == null)
53
+ return r;
54
+ var i = !1;
55
+ t = A(t, function(a) {
56
+ return a = v(a, e), i || (i = a.length > 1), a;
57
+ }), I(e, L(e), r), i && (r = F(r, W | X | Z, Q));
58
+ for (var o = t.length; o--; )
59
+ H(r, t[o]);
60
+ return r;
77
61
  });
78
- const NodeCard = ({ node, sx = {} }) => {
79
- var _a;
80
- const [expanded, setExpanded] = useState(false);
81
- const [nodeExtraData, setNodeExtraData] = useState();
82
- const handleExpandClick = () => {
83
- setExpanded(!expanded);
62
+ const xe = ({ node: e, sx: t = {} }) => {
63
+ var u;
64
+ const [r, i] = x(!1), [o, a] = x(), s = () => {
65
+ i(!r);
84
66
  };
85
- useEffect(() => {
86
- setNodeExtraData(omit(node, ["id", "edges"]));
87
- }, [node]);
88
- const renderEdgeList = useCallback((edgeIds) => {
89
- return /* @__PURE__ */ jsxs(Stack, { alignSelf: "stretch", children: [
90
- /* @__PURE__ */ jsx(Typography, { textAlign: "left", variant: "body2", color: "text.secondary", children: "Edges" }),
91
- /* @__PURE__ */ jsx(Stack, { spacing: 0.25, children: edgeIds.map((edgeId) => /* @__PURE__ */ jsx(NodeTag, { nodeId: edgeId }, edgeId)) })
92
- ] });
93
- }, []);
94
- return /* @__PURE__ */ jsx(
95
- Card,
67
+ T(() => {
68
+ a(ee(e, ["id", "edges"]));
69
+ }, [e]);
70
+ const y = z((f) => /* @__PURE__ */ l(c, { alignSelf: "stretch", children: [
71
+ /* @__PURE__ */ n(g, { textAlign: "left", variant: "body2", color: "text.secondary", children: "Edges" }),
72
+ /* @__PURE__ */ n(c, { spacing: 0.25, children: f.map((p) => /* @__PURE__ */ n(h, { nodeId: p }, p)) })
73
+ ] }), []);
74
+ return /* @__PURE__ */ n(
75
+ C,
96
76
  {
97
77
  variant: "outlined",
98
78
  sx: {
99
79
  position: "relative",
100
80
  overflow: "auto",
101
- zIndex: expanded ? 100 : "initial",
81
+ zIndex: r ? 100 : "initial",
102
82
  "& *": {
103
83
  opacity: 1
104
84
  },
105
- ...sx
85
+ ...t
106
86
  },
107
- children: /* @__PURE__ */ jsx(CardContent, { sx: { p: 1 }, children: /* @__PURE__ */ jsxs(
108
- Stack,
87
+ children: /* @__PURE__ */ n(w, { sx: { p: 1 }, children: /* @__PURE__ */ l(
88
+ c,
109
89
  {
110
90
  spacing: 1,
111
91
  sx: {
@@ -116,44 +96,44 @@ const NodeCard = ({ node, sx = {} }) => {
116
96
  }
117
97
  },
118
98
  children: [
119
- /* @__PURE__ */ jsx(NodeTag, { nodeId: node.id, label: node.id, type: "header", children: /* @__PURE__ */ jsx(
120
- ExpandMoreButton,
99
+ /* @__PURE__ */ n(h, { nodeId: e.id, label: e.id, type: "header", children: /* @__PURE__ */ n(
100
+ $,
121
101
  {
122
- expand: expanded,
123
- onClick: handleExpandClick,
124
- "aria-expanded": expanded,
102
+ expand: r,
103
+ onClick: s,
104
+ "aria-expanded": r,
125
105
  "aria-label": "show more",
126
106
  size: "small",
127
- children: /* @__PURE__ */ jsx(Iconified, { icon: "ic:baseline-expand-more", fontSize: "medium" })
107
+ children: /* @__PURE__ */ n(R, { icon: "ic:baseline-expand-more", fontSize: "medium" })
128
108
  }
129
109
  ) }),
130
- node.markdown && /* @__PURE__ */ jsxs(Fragment, { children: [
131
- /* @__PURE__ */ jsx(Divider, { flexItem: true }),
132
- /* @__PURE__ */ jsx(Markdown, { md: node.markdown, components: flatten$1(node) })
110
+ e.markdown && /* @__PURE__ */ l(b, { children: [
111
+ /* @__PURE__ */ n(m, { flexItem: !0 }),
112
+ /* @__PURE__ */ n(K, { md: e.markdown, components: O(e) })
133
113
  ] }),
134
- !!((_a = node == null ? void 0 : node.edges) == null ? void 0 : _a.length) && /* @__PURE__ */ jsxs(Fragment$1, { children: [
135
- /* @__PURE__ */ jsx(Divider, { flexItem: true }),
136
- renderEdgeList(node == null ? void 0 : node.edges)
114
+ !!((u = e == null ? void 0 : e.edges) != null && u.length) && /* @__PURE__ */ l(B, { children: [
115
+ /* @__PURE__ */ n(m, { flexItem: !0 }),
116
+ y(e == null ? void 0 : e.edges)
137
117
  ] }),
138
- /* @__PURE__ */ jsx(Collapse, { in: expanded, timeout: "auto", children: /* @__PURE__ */ jsxs(
139
- Stack,
118
+ /* @__PURE__ */ n(_, { in: r, timeout: "auto", children: /* @__PURE__ */ l(
119
+ c,
140
120
  {
141
121
  justifyContent: "start",
142
122
  alignItems: "start",
143
123
  spacing: 1,
144
- sx: (theme) => ({
124
+ sx: (f) => ({
145
125
  "& > ul": {
146
126
  width: "100%",
147
127
  textAlign: "left",
148
- p: cssImportant(theme.spacing(1)),
149
- mx: cssImportant("0"),
150
- backgroundColor: cssImportant(theme.palette.background.paper)
128
+ p: d(f.spacing(1)),
129
+ mx: d("0"),
130
+ backgroundColor: d(f.palette.background.paper)
151
131
  }
152
132
  }),
153
133
  children: [
154
- /* @__PURE__ */ jsx(Divider, { flexItem: true }),
155
- /* @__PURE__ */ jsx(Typography, { textAlign: "left", variant: "body1", children: "Metadata:" }),
156
- /* @__PURE__ */ jsx(JSONViewer, { data: nodeExtraData })
134
+ /* @__PURE__ */ n(m, { flexItem: !0 }),
135
+ /* @__PURE__ */ n(g, { textAlign: "left", variant: "body1", children: "Metadata:" }),
136
+ /* @__PURE__ */ n(J, { data: o })
157
137
  ]
158
138
  }
159
139
  ) })
@@ -164,5 +144,5 @@ const NodeCard = ({ node, sx = {} }) => {
164
144
  );
165
145
  };
166
146
  export {
167
- NodeCard as default
147
+ xe as default
168
148
  };
@@ -1,17 +1,15 @@
1
- import { jsxs, jsx } from "react/jsx-runtime";
2
- import { Stack, Typography, Tooltip } from "@mui/material";
3
- import { F as FlexOne } from "../../../../FlexOne-BSYAhhtG.js";
4
- import Iconified from "../../icons/Iconified.js";
5
- const NodeTag = ({ nodeId, label = nodeId, type = "content", children }) => {
6
- return /* @__PURE__ */ jsxs(Stack, { direction: "row", spacing: 1, alignItems: "center", pr: 1, children: [
7
- type === "header" ? /* @__PURE__ */ jsxs(Stack, { direction: "row", spacing: 1, alignItems: "center", sx: { overflow: "hidden" }, children: [
8
- /* @__PURE__ */ jsx(Typography, { variant: "body1", sx: { wordWrap: "break-all" }, children: label.replace(" (TRUNCATED)", "") }),
9
- label.includes("TRUNCATED") && /* @__PURE__ */ jsx(Tooltip, { title: "Field is truncated.", children: /* @__PURE__ */ jsx(Iconified, { icon: "ic:baseline-content-cut", fontSize: "small", style: { fontSize: "0.9em" } }) })
10
- ] }) : label,
11
- /* @__PURE__ */ jsx(FlexOne, {}),
12
- children
13
- ] });
14
- };
1
+ import { jsxs as i, jsx as e } from "react/jsx-runtime";
2
+ import { Stack as t, Typography as a, Tooltip as d } from "@mui/material";
3
+ import { F as s } from "../../../../FlexOne-BXWFOd1T.js";
4
+ import l from "../../icons/Iconified.js";
5
+ const T = ({ nodeId: n, label: r = n, type: o = "content", children: c }) => /* @__PURE__ */ i(t, { direction: "row", spacing: 1, alignItems: "center", pr: 1, children: [
6
+ o === "header" ? /* @__PURE__ */ i(t, { direction: "row", spacing: 1, alignItems: "center", sx: { overflow: "hidden" }, children: [
7
+ /* @__PURE__ */ e(a, { variant: "body1", sx: { wordWrap: "break-all" }, children: r.replace(" (TRUNCATED)", "") }),
8
+ r.includes("TRUNCATED") && /* @__PURE__ */ e(d, { title: "Field is truncated.", children: /* @__PURE__ */ e(l, { icon: "ic:baseline-content-cut", fontSize: "small", style: { fontSize: "0.9em" } }) })
9
+ ] }) : r,
10
+ /* @__PURE__ */ e(s, {}),
11
+ c
12
+ ] });
15
13
  export {
16
- NodeTag as default
14
+ T as default
17
15
  };