@cccsaurora/clue-ui 1.2.4-patch.275 → 1.2.5-dev.298
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-D6gYuFRR.js +5970 -0
- package/AnnotationDetails-Zx4pjBiN.js +175 -0
- package/AnnotationPreview-Dmz7taAU.js +188 -0
- package/ClueEnrichContext-CJEJxrgs.js +541 -0
- package/FlexOne-BSYAhhtG.js +9 -0
- package/_MapCache-WmuDdwuH.js +222 -0
- package/_Uint8Array-B7JqpgFX.js +128 -0
- package/_baseAssignValue-CGTuELqU.js +25 -0
- package/_baseClone-CkNrTyhm.js +283 -0
- package/_baseExtremum-kob8QXyt.js +18 -0
- package/_baseFlatten-jIR_sN_-.js +92 -0
- package/_baseGet-Bx3A4Qfp.js +108 -0
- package/_baseIsEqual-C5OTWzTk.js +208 -0
- package/_baseIteratee-avi7MX2o.js +126 -0
- package/_baseSlice-GAv_YFTT.js +20 -0
- package/_baseSum-D0WC1dN0.js +13 -0
- package/_baseUniq-BI9GIHMF.js +115 -0
- package/_commonjsHelpers-DWwsNxpa.js +8 -0
- package/_createAggregator-QD8MzKwe.js +63 -0
- package/_getPrototype-CU0j_POw.js +5 -0
- package/_getTag-Ckxxfr88.js +126 -0
- package/_isIterateeCall-Ds3sw2SF.js +17 -0
- package/_setToArray-CaPKQhcz.js +33 -0
- package/cloneDeep-DJrLSw8W.js +8 -0
- package/components/AnnotationBody.js +49 -35
- package/components/AnnotationDetailPopover.js +36 -30
- package/components/AnnotationDetails.js +7 -7
- package/components/AnnotationEntry.js +35 -35
- package/components/AnnotationPreview.js +5 -5
- package/components/ClassificationChip.js +44 -23
- package/components/CountBadge.js +31 -26
- package/components/EnrichedCard.js +110 -97
- package/components/EnrichedChip.js +130 -105
- package/components/EnrichedTypography.js +133 -107
- package/components/ErrorBoundary.js +28 -24
- package/components/RetryFailedEnrichments.js +10 -9
- package/components/SourcePicker.js +57 -49
- package/components/actions/ActionForm.js +4 -4
- package/components/actions/ExecutePopover.js +75 -59
- package/components/actions/ResultModal.js +4 -4
- package/components/actions/form/schemaAdapter.js +39 -23
- package/components/actions/formats/FileResult.js +86 -59
- package/components/actions/formats/index.js +21 -10
- package/components/display/graph/ExpandMoreButton.js +10 -10
- package/components/display/graph/elements/NodeCard.js +111 -91
- package/components/display/graph/elements/NodeTag.js +15 -13
- package/components/display/graph/index.js +261 -202
- package/components/display/graph/visualizations/Leaf.js +88 -69
- package/components/display/graph/visualizations/cloud/index.js +98 -81
- package/components/display/graph/visualizations/icons/BaseIcon.js +26 -21
- 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 +14 -13
- package/components/display/graph/visualizations/panels/NodePanel.js +10 -8
- package/components/display/graph/visualizations/tree/BundleLine.js +108 -81
- package/components/display/graph/visualizations/tree/Triangle.js +13 -13
- package/components/display/graph/visualizations/tree/index.js +408 -306
- package/components/display/icons/Iconified.js +27 -12
- package/components/display/json/index.js +4 -4
- package/components/display/markdown/index.js +8678 -5770
- package/components/enrichment/EnrichPopover.js +54 -46
- package/components/fetchers/Fetcher.js +158 -119
- package/components/fetchers/PreviewModal.js +20 -17
- package/components/fetchers/StatusChip.js +21 -17
- package/components/group/Entry.js +13 -11
- package/components/group/Group.js +13 -10
- package/components/group/GroupControl.js +76 -65
- package/components/stats/QueryStatus.js +43 -33
- package/countBy-c6S3dvSW.js +14 -0
- package/data/event.js +6 -4
- package/database/index.js +2 -2
- package/debounce-bV0h5FC5.js +92 -0
- package/get-DSsNkRQs.js +8 -0
- package/groupBy-xqz-n0Vd.js +14 -0
- package/hooks/ClueActionContext.d.ts +10 -2
- package/hooks/ClueActionContext.js +6 -6
- package/hooks/ClueComponentContext.js +29 -23
- package/hooks/ClueConfigProvider.js +14 -12
- package/hooks/ClueDatabaseContext.js +19 -13
- package/hooks/ClueEnrichContext.js +8 -8
- package/hooks/ClueFetcherContext.js +83 -56
- package/hooks/ClueGroupContext.js +17 -14
- package/hooks/CluePopupContext.js +5 -5
- package/hooks/ClueProvider.js +12 -10
- package/hooks/selectors.js +7 -7
- package/hooks/useActionResult.d.ts +1 -0
- package/hooks/useActionResult.js +3 -3
- package/hooks/useAnnotations.js +47 -31
- package/hooks/useClue.js +6 -4
- package/hooks/useClueActions.js +3 -3
- package/hooks/useClueConfig.js +6 -4
- package/hooks/useClueTypeConfig.js +3 -3
- package/hooks/useComparator.js +722 -435
- package/hooks/useErrors.js +22 -18
- package/hooks/useFetcherResult.d.ts +1 -0
- package/hooks/useFetcherResult.js +33 -24
- package/hooks/useMyHighlights.js +66 -36
- package/hooks/useMyLocalStorage.js +66 -37
- package/iconify-CXMreGTg.js +1782 -0
- package/icons/Action.js +66 -49
- package/icons/Assessment.js +85 -69
- package/icons/Context.js +77 -63
- package/icons/Opinion.js +76 -60
- package/icons/iconMap.js +2 -2
- package/identity-CPGTqrE4.js +6 -0
- package/index-AMfoEg_6.js +696 -0
- package/index-B6C2a_Lg.js +1172 -0
- package/index-C12gPw2W.js +17698 -0
- package/index-DCKkHTvx.js +15750 -0
- package/index-JcKyZeoY.js +465 -0
- package/isNil-CIubwp4T.js +6 -0
- package/isObject-FTY-5JQX.js +7 -0
- package/isObjectLike-OAgjjZye.js +48 -0
- package/isSymbol-Xd2FsJyp.js +8 -0
- package/last-CUCl67Im.js +7 -0
- package/main.js +60 -60
- package/maxBy-IKHzFrCS.js +8 -0
- package/package.json +1 -1
- package/sortBy-DfSj8IoJ.js +96 -0
- package/sumBy-D-hb_NY-.js +8 -0
- package/text/Frequency.js +42 -23
- package/toFinite-Bc55msYj.js +16 -0
- package/toNumber-DPxy1FBy.js +39 -0
- package/types/RunningActionData.d.ts +1 -0
- package/types/WithActionData.d.ts +1 -0
- package/useClueTypeConfig-Z1LFp01b.js +3289 -0
- package/utils/chain.js +92 -65
- package/utils/classificationParser.js +519 -256
- package/utils/constants.js +35 -10
- package/utils/graph.js +72 -45
- package/utils/hashUtil.js +7 -7
- package/utils/line.js +131 -81
- package/utils/loggerUtil.js +5 -3
- package/utils/sessionStorage.js +41 -27
- package/utils/time.js +423 -423
- package/utils/utils.js +9 -9
- package/utils/window.js +21 -10
- package/utils-HmNPuoDB.js +199 -0
- package/ActionForm-CwsfB99X.js +0 -4458
- package/AnnotationDetails-Bw2JdtTL.js +0 -160
- package/AnnotationPreview-BO7rVnOP.js +0 -140
- package/ClueEnrichContext-KqRuuWNS.js +0 -418
- package/FlexOne-BXWFOd1T.js +0 -6
- package/_MapCache-BiTi0iqu.js +0 -180
- package/_Uint8Array-BQNOM9Rr.js +0 -101
- package/_baseAssignValue-CNMLQZco.js +0 -20
- package/_baseClone-BnT-6pyM.js +0 -207
- package/_baseExtremum-Ca2EHgy2.js +0 -16
- package/_baseFlatten-Bfr_Molw.js +0 -72
- package/_baseGet-DSZygzyq.js +0 -79
- package/_baseIsEqual-VgvaAFZG.js +0 -147
- package/_baseIteratee-Dbfsw5z8.js +0 -95
- package/_baseSlice-M5RKzt1A.js +0 -10
- package/_baseSum-wEbgNeUs.js +0 -10
- package/_baseUniq-BJcj69PL.js +0 -79
- package/_commonjsHelpers-DaMA6jEr.js +0 -8
- package/_createAggregator-k3TuAnxT.js +0 -53
- package/_getPrototype-Cr1Mk7BC.js +0 -5
- package/_getTag-CK2Sffaq.js +0 -90
- package/_isIterateeCall-DkJP7Rbx.js +0 -13
- package/_setToArray-C7yMOeww.js +0 -29
- package/cloneDeep-CF8TtLHr.js +0 -8
- package/countBy-CdYegFSu.js +0 -8
- package/debounce-DryYcbJ4.js +0 -56
- package/get-CH7kz5Ix.js +0 -8
- package/groupBy-br8xmD2R.js +0 -8
- package/iconify-BBckr5AQ.js +0 -1263
- package/identity-ByMq8VxU.js +0 -6
- package/index-BHAe_V9n.js +0 -12768
- package/index-BK-zfYhR.js +0 -358
- package/index-CA5CUNZO.js +0 -975
- package/index-Dj5C04IX.js +0 -568
- package/index-p5_wX7q1.js +0 -11729
- package/isNil-CjWwlQS3.js +0 -6
- package/isObject-B53jY8Qg.js +0 -7
- package/isObjectLike-BatpeCIi.js +0 -29
- package/isSymbol-C3_SC0Qp.js +0 -8
- package/last-7CdUxN0r.js +0 -7
- package/maxBy-Bc0dYHcO.js +0 -8
- package/sortBy-DY2JBf9n.js +0 -75
- package/sumBy-DuMASLPd.js +0 -8
- package/toFinite-BMy6GObD.js +0 -14
- package/toNumber-YVhnnJv4.js +0 -31
- package/useClueTypeConfig-Ct9Ygter.js +0 -2292
- package/utils-DmwSUrum.js +0 -129
package/utils/constants.js
CHANGED
|
@@ -1,12 +1,37 @@
|
|
|
1
|
-
const
|
|
2
|
-
|
|
3
|
-
const
|
|
1
|
+
const CLUE_API = void 0;
|
|
2
|
+
const LOCAL = CLUE_API === "MOCK";
|
|
3
|
+
const VERSION = void 0;
|
|
4
|
+
const MY_LOCAL_STORAGE_PREFIX = "clue.ui";
|
|
5
|
+
const MY_SESSION_STORAGE_PREFIX = `${MY_LOCAL_STORAGE_PREFIX}.cache`;
|
|
6
|
+
var StorageKey = /* @__PURE__ */ ((StorageKey2) => {
|
|
7
|
+
StorageKey2["PROVIDER"] = "provider";
|
|
8
|
+
StorageKey2["REFRESH_TOKEN"] = "refresh_token";
|
|
9
|
+
StorageKey2["APP_TOKEN"] = "app_token";
|
|
10
|
+
StorageKey2["NEXT_LOCATION"] = "next.location";
|
|
11
|
+
StorageKey2["NEXT_SEARCH"] = "next.search";
|
|
12
|
+
StorageKey2["AXIOS_CACHE"] = "axios.cache";
|
|
13
|
+
StorageKey2["COMPACT_JSON"] = "compact_json_view";
|
|
14
|
+
StorageKey2["FLATTEN_JSON"] = "flatten_json_view";
|
|
15
|
+
StorageKey2["PAGE_COUNT"] = "page_count";
|
|
16
|
+
StorageKey2["CLUE_CACHE"] = "results";
|
|
17
|
+
StorageKey2["LOGIN_NONCE"] = "login_nonce";
|
|
18
|
+
StorageKey2["COLOR_SCHEME"] = "color.scheme";
|
|
19
|
+
StorageKey2["SHOW_DIRECTIONALITY"] = "show.directionality";
|
|
20
|
+
StorageKey2["SHOW_CARDS"] = "show.cards";
|
|
21
|
+
StorageKey2["CARD_CUTOFF"] = "card.cutoff";
|
|
22
|
+
StorageKey2["SHOW_MOUSE_POS"] = "show.mouse.position";
|
|
23
|
+
StorageKey2["SHOW_COORDINATES"] = "show.coordinates";
|
|
24
|
+
StorageKey2["PANEL_LOCATION"] = "panel.location";
|
|
25
|
+
StorageKey2["FORCE_COLOR_SETTING"] = "force.color.setting";
|
|
26
|
+
return StorageKey2;
|
|
27
|
+
})(StorageKey || {});
|
|
28
|
+
const BUNDLE_SEPARATOR = "-X-";
|
|
4
29
|
export {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
30
|
+
BUNDLE_SEPARATOR,
|
|
31
|
+
CLUE_API,
|
|
32
|
+
LOCAL,
|
|
33
|
+
MY_LOCAL_STORAGE_PREFIX,
|
|
34
|
+
MY_SESSION_STORAGE_PREFIX,
|
|
35
|
+
StorageKey,
|
|
36
|
+
VERSION
|
|
12
37
|
};
|
package/utils/graph.js
CHANGED
|
@@ -1,52 +1,79 @@
|
|
|
1
|
-
const
|
|
2
|
-
let
|
|
3
|
-
for (let
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
1
|
+
const cyrb53 = (str, seed = 0) => {
|
|
2
|
+
let h1 = 3735928559 ^ seed, h2 = 1103547991 ^ seed;
|
|
3
|
+
for (let i = 0, ch; i < str.length; i++) {
|
|
4
|
+
ch = str.charCodeAt(i);
|
|
5
|
+
h1 = Math.imul(h1 ^ ch, 2654435761);
|
|
6
|
+
h2 = Math.imul(h2 ^ ch, 1597334677);
|
|
7
|
+
}
|
|
8
|
+
h1 = Math.imul(h1 ^ h1 >>> 16, 2246822507);
|
|
9
|
+
h1 ^= Math.imul(h2 ^ h2 >>> 13, 3266489909);
|
|
10
|
+
h2 = Math.imul(h2 ^ h2 >>> 16, 2246822507);
|
|
11
|
+
h2 ^= Math.imul(h1 ^ h1 >>> 13, 3266489909);
|
|
12
|
+
return parseFloat(`0.${4294967296 * (2097151 & h2) + (h1 >>> 0)}`);
|
|
13
|
+
};
|
|
14
|
+
const cssImportant = (property) => `${property} !important`;
|
|
15
|
+
const findNode = (nodeId, flatNodes) => {
|
|
16
|
+
return flatNodes.find((node) => node.id === nodeId);
|
|
17
|
+
};
|
|
18
|
+
const getPathToRoot = (nodeId, data) => {
|
|
19
|
+
const getRoot = (currNodeId, results) => {
|
|
20
|
+
if (results.has(currNodeId)) {
|
|
21
|
+
return results;
|
|
22
|
+
}
|
|
23
|
+
let newResults = results.add(currNodeId);
|
|
24
|
+
const currNode = findNode(currNodeId, data.flat());
|
|
25
|
+
if (currNode == null ? void 0 : currNode.edges) {
|
|
26
|
+
currNode == null ? void 0 : currNode.edges.forEach((parent) => {
|
|
27
|
+
newResults = getRoot(parent, results);
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
return newResults;
|
|
15
31
|
};
|
|
16
|
-
return
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
32
|
+
return getRoot(nodeId, /* @__PURE__ */ new Set());
|
|
33
|
+
};
|
|
34
|
+
const getAllChildren = (nodeId, data) => {
|
|
35
|
+
const getChildren = (currNodeId, results) => {
|
|
36
|
+
if (results.has(currNodeId)) {
|
|
37
|
+
return results;
|
|
38
|
+
}
|
|
39
|
+
let newResults = results.add(currNodeId);
|
|
40
|
+
const currNode = findNode(currNodeId, data.flat());
|
|
41
|
+
const directChildren = data.flat().filter((n) => {
|
|
42
|
+
var _a;
|
|
43
|
+
return (_a = n.edges) == null ? void 0 : _a.includes(currNode == null ? void 0 : currNode.id);
|
|
25
44
|
});
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
45
|
+
if (directChildren) {
|
|
46
|
+
directChildren.forEach((child) => {
|
|
47
|
+
newResults = getChildren(child.id, newResults);
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
return newResults;
|
|
29
51
|
};
|
|
30
|
-
return
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
const
|
|
38
|
-
return
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
52
|
+
return getChildren(nodeId, /* @__PURE__ */ new Set());
|
|
53
|
+
};
|
|
54
|
+
const getSubGraphNodeSet = (nodeId, data) => {
|
|
55
|
+
if (!data) {
|
|
56
|
+
return new Set(nodeId);
|
|
57
|
+
}
|
|
58
|
+
const ancestors = getPathToRoot(nodeId, data);
|
|
59
|
+
const descendents = getAllChildren(nodeId, data);
|
|
60
|
+
return /* @__PURE__ */ new Set([nodeId, ...ancestors, ...descendents]);
|
|
61
|
+
};
|
|
62
|
+
const createSubGraph = (nodeId, dataset) => {
|
|
63
|
+
const subGraphNodes = getSubGraphNodeSet(nodeId, dataset.data);
|
|
64
|
+
const newData = dataset.data.map(
|
|
65
|
+
(level) => level.filter((node) => subGraphNodes.has(node.id)).map((node) => {
|
|
66
|
+
var _a;
|
|
67
|
+
return { ...node, edges: (_a = node == null ? void 0 : node.edges) == null ? void 0 : _a.filter((edge) => subGraphNodes.has(edge)) };
|
|
42
68
|
})
|
|
43
|
-
).filter((
|
|
69
|
+
).filter((level) => level.length > 0);
|
|
70
|
+
return newData;
|
|
44
71
|
};
|
|
45
72
|
export {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
73
|
+
createSubGraph,
|
|
74
|
+
cssImportant,
|
|
75
|
+
cyrb53,
|
|
76
|
+
getAllChildren,
|
|
77
|
+
getPathToRoot,
|
|
78
|
+
getSubGraphNodeSet
|
|
52
79
|
};
|
package/utils/hashUtil.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
function
|
|
2
|
-
let
|
|
3
|
-
for (let
|
|
4
|
-
const
|
|
5
|
-
|
|
1
|
+
function simpleHash(value) {
|
|
2
|
+
let hash = 0;
|
|
3
|
+
for (let i = 0; i < value.length; i++) {
|
|
4
|
+
const char = value.charCodeAt(i);
|
|
5
|
+
hash = (hash << 5) - hash + char;
|
|
6
6
|
}
|
|
7
|
-
return (
|
|
7
|
+
return (hash >>> 0).toString(36).padStart(7, "0");
|
|
8
8
|
}
|
|
9
9
|
export {
|
|
10
|
-
|
|
10
|
+
simpleHash
|
|
11
11
|
};
|
package/utils/line.js
CHANGED
|
@@ -1,86 +1,136 @@
|
|
|
1
|
-
const
|
|
2
|
-
paddingAtLevel
|
|
3
|
-
numLines
|
|
4
|
-
distanceX
|
|
5
|
-
distanceY
|
|
6
|
-
childX
|
|
7
|
-
childY
|
|
8
|
-
childHeight
|
|
9
|
-
parentX
|
|
10
|
-
parentY
|
|
11
|
-
linePaddingX
|
|
12
|
-
nodeLocations
|
|
13
|
-
dest
|
|
14
|
-
arcRadius
|
|
1
|
+
const buildHorizontalLine = ({
|
|
2
|
+
paddingAtLevel,
|
|
3
|
+
numLines,
|
|
4
|
+
distanceX,
|
|
5
|
+
distanceY,
|
|
6
|
+
childX,
|
|
7
|
+
childY,
|
|
8
|
+
childHeight,
|
|
9
|
+
parentX,
|
|
10
|
+
parentY,
|
|
11
|
+
linePaddingX,
|
|
12
|
+
nodeLocations,
|
|
13
|
+
dest,
|
|
14
|
+
arcRadius
|
|
15
15
|
}) => {
|
|
16
|
-
const
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
16
|
+
const d = [];
|
|
17
|
+
const verticalLineX = childX - (paddingAtLevel - numLines) * linePaddingX;
|
|
18
|
+
if (distanceX === 0) {
|
|
19
|
+
if (distanceY === 0) {
|
|
20
|
+
d.push(
|
|
21
|
+
`M ${parentX} ${parentY}`,
|
|
22
|
+
`L ${parentX - linePaddingX + 3} ${parentY}`,
|
|
23
|
+
`A 3 3 90 0 0 ${verticalLineX} ${parentY + 3}`
|
|
24
|
+
);
|
|
25
|
+
d.push(
|
|
26
|
+
`L ${verticalLineX} ${nodeLocations[dest.id][1] - 3}`,
|
|
27
|
+
`A 3 3 90 0 0 ${verticalLineX + 3} ${nodeLocations[dest.id][1]}`,
|
|
28
|
+
`L ${childX} ${nodeLocations[dest.id][1]}`
|
|
29
|
+
);
|
|
30
|
+
} else {
|
|
31
|
+
d.push(`M ${parentX} ${parentY}`, `L ${verticalLineX + arcRadius} ${parentY}`);
|
|
32
|
+
if (Math.sign(distanceY) < 0) {
|
|
33
|
+
d.push(
|
|
34
|
+
`A ${arcRadius} ${arcRadius} 90 0 1 ${verticalLineX} ${parentY - arcRadius}`,
|
|
35
|
+
`L ${verticalLineX} ${childY + arcRadius}`,
|
|
36
|
+
`A ${arcRadius} ${arcRadius} 90 0 1 ${verticalLineX + arcRadius} ${childY}`
|
|
37
|
+
);
|
|
38
|
+
} else {
|
|
39
|
+
d.push(
|
|
40
|
+
`A ${arcRadius} ${arcRadius} 90 0 0 ${verticalLineX} ${parentY + arcRadius}`,
|
|
41
|
+
`L ${verticalLineX} ${childY - arcRadius}`,
|
|
42
|
+
`A ${arcRadius} ${arcRadius} 90 0 0 ${verticalLineX + arcRadius} ${childY}`
|
|
43
|
+
);
|
|
44
|
+
}
|
|
45
|
+
d.push(`L ${childX} ${childY}`);
|
|
46
|
+
}
|
|
47
|
+
} else {
|
|
48
|
+
d.push(`M ${parentX} ${parentY}`);
|
|
49
|
+
if (Math.sign(distanceY) < 0) {
|
|
50
|
+
if (Math.sign(distanceX) < 0) {
|
|
51
|
+
d.push(
|
|
52
|
+
`L ${verticalLineX + arcRadius} ${parentY}`,
|
|
53
|
+
`A ${arcRadius} ${arcRadius} 90 0 1 ${verticalLineX} ${parentY - arcRadius}`
|
|
54
|
+
);
|
|
55
|
+
} else {
|
|
56
|
+
d.push(
|
|
57
|
+
`L ${verticalLineX - arcRadius} ${parentY}`,
|
|
58
|
+
`A ${arcRadius} ${arcRadius} 90 0 0 ${verticalLineX} ${parentY - arcRadius}`
|
|
59
|
+
);
|
|
60
|
+
}
|
|
61
|
+
d.push(
|
|
62
|
+
`L ${verticalLineX} ${childY + childHeight / 2 + arcRadius}`,
|
|
63
|
+
`A ${arcRadius} ${arcRadius} 90 0 1 ${verticalLineX + arcRadius} ${childY + childHeight / 2}`
|
|
64
|
+
);
|
|
65
|
+
} else {
|
|
66
|
+
if (Math.sign(distanceX) < 0) {
|
|
67
|
+
d.push(
|
|
68
|
+
`L ${verticalLineX + arcRadius} ${parentY}`,
|
|
69
|
+
`A ${arcRadius} ${arcRadius} 90 0 0 ${verticalLineX} ${parentY + arcRadius}`
|
|
70
|
+
);
|
|
71
|
+
} else {
|
|
72
|
+
d.push(
|
|
73
|
+
`L ${verticalLineX - arcRadius} ${parentY}`,
|
|
74
|
+
`A ${arcRadius} ${arcRadius} 90 0 1 ${verticalLineX} ${parentY + arcRadius}`
|
|
75
|
+
);
|
|
76
|
+
}
|
|
77
|
+
d.push(
|
|
78
|
+
`L ${verticalLineX} ${childY + childHeight / 2 - arcRadius}`,
|
|
79
|
+
`A ${arcRadius} ${arcRadius} 90 0 0 ${verticalLineX + arcRadius} ${childY + childHeight / 2}`
|
|
80
|
+
);
|
|
81
|
+
}
|
|
82
|
+
d.push(`L ${childX} ${childY + childHeight / 2}`);
|
|
83
|
+
}
|
|
84
|
+
return d;
|
|
85
|
+
};
|
|
86
|
+
const buildVerticalLine = ({
|
|
87
|
+
paddingAtLevel,
|
|
88
|
+
numLines,
|
|
89
|
+
distanceX,
|
|
90
|
+
distanceY,
|
|
91
|
+
childX,
|
|
92
|
+
childY,
|
|
93
|
+
childHeight,
|
|
94
|
+
parentX,
|
|
95
|
+
parentY,
|
|
96
|
+
linePaddingX,
|
|
97
|
+
arcRadius
|
|
64
98
|
}) => {
|
|
65
|
-
const
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
`
|
|
69
|
-
|
|
70
|
-
`
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
99
|
+
const d = [];
|
|
100
|
+
const verticalLineX = (Math.sign(distanceY) < 0 ? childX : parentX) - (paddingAtLevel - numLines) * linePaddingX;
|
|
101
|
+
if (distanceX === 0) {
|
|
102
|
+
d.push(`M ${parentX} ${parentY}`, `L ${childX} ${childY}`);
|
|
103
|
+
} else {
|
|
104
|
+
d.push(`M ${parentX} ${parentY}`);
|
|
105
|
+
if (Math.sign(distanceY) < 0) {
|
|
106
|
+
if (Math.sign(distanceX) < 0) {
|
|
107
|
+
d.push(
|
|
108
|
+
`L ${verticalLineX + arcRadius} ${parentY}`,
|
|
109
|
+
`A ${arcRadius} ${arcRadius} 90 0 1 ${verticalLineX} ${parentY - arcRadius}`,
|
|
110
|
+
`L ${verticalLineX} ${childY + childHeight / 2 + arcRadius}`,
|
|
111
|
+
`A ${arcRadius} ${arcRadius} 90 0 1 ${verticalLineX + arcRadius} ${childY + childHeight / 2}`
|
|
112
|
+
);
|
|
113
|
+
} else {
|
|
114
|
+
d.push(
|
|
115
|
+
`L ${verticalLineX - arcRadius} ${parentY}`,
|
|
116
|
+
`A ${arcRadius} ${arcRadius} 90 0 0 ${verticalLineX} ${parentY - arcRadius}`,
|
|
117
|
+
`L ${verticalLineX} ${childY + childHeight / 2 + arcRadius}`,
|
|
118
|
+
`A ${arcRadius} ${arcRadius} 90 0 0 ${verticalLineX - arcRadius} ${childY + childHeight / 2}`
|
|
119
|
+
);
|
|
120
|
+
}
|
|
121
|
+
} else {
|
|
122
|
+
d.push(
|
|
123
|
+
`L ${verticalLineX + arcRadius} ${parentY}`,
|
|
124
|
+
`A ${arcRadius} ${arcRadius} 90 0 0 ${verticalLineX} ${parentY + arcRadius}`,
|
|
125
|
+
`L ${verticalLineX} ${childY + childHeight / 2 - arcRadius}`,
|
|
126
|
+
`A ${arcRadius} ${arcRadius} 90 0 0 ${verticalLineX + arcRadius} ${childY + childHeight / 2}`
|
|
127
|
+
);
|
|
128
|
+
}
|
|
129
|
+
d.push(`L ${childX} ${childY + childHeight / 2}`);
|
|
130
|
+
}
|
|
131
|
+
return d;
|
|
82
132
|
};
|
|
83
133
|
export {
|
|
84
|
-
|
|
85
|
-
|
|
134
|
+
buildHorizontalLine,
|
|
135
|
+
buildVerticalLine
|
|
86
136
|
};
|
package/utils/loggerUtil.js
CHANGED
package/utils/sessionStorage.js
CHANGED
|
@@ -1,37 +1,51 @@
|
|
|
1
|
-
import { StorageKey
|
|
2
|
-
import { d as
|
|
3
|
-
const
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { StorageKey, MY_SESSION_STORAGE_PREFIX } from "./constants.js";
|
|
2
|
+
import { d as debounce } from "../debounce-bV0h5FC5.js";
|
|
3
|
+
const buildName = (name) => `${MY_SESSION_STORAGE_PREFIX}.${name}`;
|
|
4
|
+
const {
|
|
5
|
+
_getStored: getStored,
|
|
6
|
+
_removeStored: removeStored,
|
|
7
|
+
_setStored: setStored
|
|
7
8
|
} = /* @__PURE__ */ (() => {
|
|
8
|
-
let
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
}
|
|
12
|
-
|
|
9
|
+
let changes = {};
|
|
10
|
+
const _getStored = (name) => {
|
|
11
|
+
return changes[buildName(name)] ?? JSON.parse(sessionStorage.getItem(buildName(name)));
|
|
12
|
+
};
|
|
13
|
+
const _removeStored = (name) => {
|
|
14
|
+
delete changes[buildName(name)];
|
|
15
|
+
sessionStorage.removeItem(buildName(name));
|
|
16
|
+
};
|
|
17
|
+
const _setStored = (name, item) => {
|
|
18
|
+
changes[buildName(name)] = item;
|
|
19
|
+
debounce(
|
|
13
20
|
() => {
|
|
14
|
-
Object.entries(
|
|
21
|
+
Object.entries(changes).forEach(([_name, data]) => {
|
|
15
22
|
try {
|
|
16
|
-
sessionStorage.setItem(
|
|
17
|
-
} catch (
|
|
18
|
-
console.warn("Quota Error when saving to sessionStorage",
|
|
23
|
+
sessionStorage.setItem(_name, JSON.stringify(data));
|
|
24
|
+
} catch (e) {
|
|
25
|
+
console.warn("Quota Error when saving to sessionStorage", e);
|
|
19
26
|
}
|
|
20
|
-
})
|
|
27
|
+
});
|
|
28
|
+
changes = {};
|
|
21
29
|
},
|
|
22
30
|
250,
|
|
23
|
-
{ leading:
|
|
31
|
+
{ leading: false, trailing: true, maxWait: 800 }
|
|
24
32
|
);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
33
|
+
};
|
|
34
|
+
return { _getStored, _removeStored, _setStored };
|
|
35
|
+
})();
|
|
36
|
+
const getAxiosCache = () => {
|
|
37
|
+
return getStored(StorageKey.AXIOS_CACHE) ?? {};
|
|
38
|
+
};
|
|
39
|
+
const setAxiosCache = (etag, value) => {
|
|
40
|
+
const cache = getAxiosCache();
|
|
41
|
+
cache[etag] = value;
|
|
42
|
+
setStored(StorageKey.AXIOS_CACHE, cache);
|
|
29
43
|
};
|
|
30
44
|
export {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
45
|
+
buildName,
|
|
46
|
+
getAxiosCache,
|
|
47
|
+
getStored,
|
|
48
|
+
removeStored,
|
|
49
|
+
setAxiosCache,
|
|
50
|
+
setStored
|
|
37
51
|
};
|