@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
package/utils/graph.js
DELETED
|
@@ -1,79 +0,0 @@
|
|
|
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
|
-
function 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;
|
|
31
|
-
}
|
|
32
|
-
return getRoot(nodeId, /* @__PURE__ */ new Set());
|
|
33
|
-
};
|
|
34
|
-
const getAllChildren = (nodeId, data) => {
|
|
35
|
-
function 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);
|
|
44
|
-
});
|
|
45
|
-
if (directChildren) {
|
|
46
|
-
directChildren.forEach((child) => {
|
|
47
|
-
newResults = getChildren(child.id, newResults);
|
|
48
|
-
});
|
|
49
|
-
}
|
|
50
|
-
return newResults;
|
|
51
|
-
}
|
|
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)) };
|
|
68
|
-
})
|
|
69
|
-
).filter((level) => level.length > 0);
|
|
70
|
-
return newData;
|
|
71
|
-
};
|
|
72
|
-
export {
|
|
73
|
-
createSubGraph,
|
|
74
|
-
cssImportant,
|
|
75
|
-
cyrb53,
|
|
76
|
-
getAllChildren,
|
|
77
|
-
getPathToRoot,
|
|
78
|
-
getSubGraphNodeSet
|
|
79
|
-
};
|
package/utils/hashUtil.d.ts
DELETED
package/utils/hashUtil.js
DELETED
package/utils/line.d.ts
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
export declare const buildHorizontalLine: ({ paddingAtLevel, numLines, distanceX, distanceY, childX, childY, childHeight, parentX, parentY, linePaddingX, nodeLocations, dest, arcRadius }: {
|
|
2
|
-
paddingAtLevel: any;
|
|
3
|
-
numLines: any;
|
|
4
|
-
distanceX: any;
|
|
5
|
-
distanceY: any;
|
|
6
|
-
childX: any;
|
|
7
|
-
childY: any;
|
|
8
|
-
childHeight: any;
|
|
9
|
-
parentX: any;
|
|
10
|
-
parentY: any;
|
|
11
|
-
linePaddingX: any;
|
|
12
|
-
nodeLocations: any;
|
|
13
|
-
dest: any;
|
|
14
|
-
arcRadius: any;
|
|
15
|
-
}) => string[];
|
|
16
|
-
export declare const buildVerticalLine: ({ paddingAtLevel, numLines, distanceX, distanceY, childX, childY, childHeight, parentX, parentY, linePaddingX, arcRadius }: {
|
|
17
|
-
paddingAtLevel: any;
|
|
18
|
-
numLines: any;
|
|
19
|
-
distanceX: any;
|
|
20
|
-
distanceY: any;
|
|
21
|
-
childX: any;
|
|
22
|
-
childY: any;
|
|
23
|
-
childHeight: any;
|
|
24
|
-
parentX: any;
|
|
25
|
-
parentY: any;
|
|
26
|
-
linePaddingX: any;
|
|
27
|
-
arcRadius: any;
|
|
28
|
-
}) => string[];
|
package/utils/line.js
DELETED
|
@@ -1,136 +0,0 @@
|
|
|
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
|
-
}) => {
|
|
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
|
|
98
|
-
}) => {
|
|
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;
|
|
132
|
-
};
|
|
133
|
-
export {
|
|
134
|
-
buildHorizontalLine,
|
|
135
|
-
buildVerticalLine
|
|
136
|
-
};
|
package/utils/loggerUtil.d.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Utility for logging debug messages if clue is configured to allow debug logging.
|
|
3
|
-
* @param message The debug message.
|
|
4
|
-
* @param loggingEnabled the flag to determine if debugging is enabled.
|
|
5
|
-
*/
|
|
6
|
-
export declare function clueDebugLogger(message: string, loggingEnabled: boolean): void;
|
package/utils/loggerUtil.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { StorageKey } from "../utils/constants";
|
|
2
|
-
|
|
3
|
-
export declare const buildName: (name: string) => string;
|
|
4
|
-
declare const getStored: <T = string>(name: StorageKey) => T, removeStored: (name: StorageKey) => void, setStored: (name: StorageKey, item: any) => void;
|
|
5
|
-
export { getStored, removeStored, setStored };
|
|
6
|
-
export declare const getAxiosCache: () => {
|
|
7
|
-
[index: string]: any;
|
|
8
|
-
};
|
|
9
|
-
export declare const setAxiosCache: (etag: string, value: any) => void;
|
package/utils/sessionStorage.js
DELETED
|
@@ -1,51 +0,0 @@
|
|
|
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
|
|
8
|
-
} = /* @__PURE__ */ (() => {
|
|
9
|
-
let changes = {};
|
|
10
|
-
const _getStored = function(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(
|
|
20
|
-
() => {
|
|
21
|
-
Object.entries(changes).forEach(([_name, data]) => {
|
|
22
|
-
try {
|
|
23
|
-
sessionStorage.setItem(_name, JSON.stringify(data));
|
|
24
|
-
} catch (e) {
|
|
25
|
-
console.warn("Quota Error when saving to sessionStorage", e);
|
|
26
|
-
}
|
|
27
|
-
});
|
|
28
|
-
changes = {};
|
|
29
|
-
},
|
|
30
|
-
250,
|
|
31
|
-
{ leading: false, trailing: true, maxWait: 800 }
|
|
32
|
-
);
|
|
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);
|
|
43
|
-
};
|
|
44
|
-
export {
|
|
45
|
-
buildName,
|
|
46
|
-
getAxiosCache,
|
|
47
|
-
getStored,
|
|
48
|
-
removeStored,
|
|
49
|
-
setAxiosCache,
|
|
50
|
-
setStored
|
|
51
|
-
};
|
package/utils/utils.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { FailedRequest } from "../types/lookup";
|
|
2
|
-
|
|
3
|
-
export declare const twitterShort: (date: string | Date | number) => string;
|
|
4
|
-
export declare const delay: (ms: number, rejectOnCancel?: boolean) => {
|
|
5
|
-
cancel: () => void;
|
|
6
|
-
then<TResult1 = void, TResult2 = never>(onfulfilled?: (value: void) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>): Promise<TResult1 | TResult2>;
|
|
7
|
-
catch<TResult = never>(onrejected?: (reason: any) => TResult | PromiseLike<TResult>): Promise<void | TResult>;
|
|
8
|
-
finally(onfinally?: () => void): Promise<void>;
|
|
9
|
-
readonly [Symbol.toStringTag]: string;
|
|
10
|
-
};
|
|
11
|
-
export declare const removeEmpty: (obj: any, aggressive?: boolean) => any;
|
|
12
|
-
export declare const searchObject: (o: any, query: string) => any;
|
|
13
|
-
export declare const filterEnrichments: (failedEnrichments: FailedRequest[]) => FailedRequest[];
|
package/utils/utils.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { d, b, r, s, t } from "../utils-CxIhC2xH.js";
|
|
2
|
-
import "../isEmpty-BQkZubqU.js";
|
|
3
|
-
import "../_Map-kgDsDYxq.js";
|
|
4
|
-
import "../isNil-CIubwp4T.js";
|
|
5
|
-
export {
|
|
6
|
-
d as delay,
|
|
7
|
-
b as filterEnrichments,
|
|
8
|
-
r as removeEmpty,
|
|
9
|
-
s as searchObject,
|
|
10
|
-
t as twitterShort
|
|
11
|
-
};
|
package/utils/window.d.ts
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
export declare const safeDispatchEvent: (event: Event) => void;
|
|
2
|
-
export declare const safeRemoveEventListener: (type: string, listener: (this: Window, ev: any) => any, options?: boolean | EventListenerOptions) => void;
|
|
3
|
-
export declare const safeAddEventListener: (type: string, listener: (this: Window, ev: any) => any, options?: boolean | AddEventListenerOptions) => () => void;
|
package/utils/window.js
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
const safeDispatchEvent = (event) => {
|
|
2
|
-
if (typeof window === "undefined") {
|
|
3
|
-
return;
|
|
4
|
-
}
|
|
5
|
-
window.dispatchEvent(event);
|
|
6
|
-
};
|
|
7
|
-
const safeRemoveEventListener = (type, listener, options) => {
|
|
8
|
-
if (typeof window === "undefined") {
|
|
9
|
-
return;
|
|
10
|
-
}
|
|
11
|
-
window.removeEventListener(type, listener, options);
|
|
12
|
-
};
|
|
13
|
-
const safeAddEventListener = (type, listener, options) => {
|
|
14
|
-
if (typeof window === "undefined") {
|
|
15
|
-
return;
|
|
16
|
-
}
|
|
17
|
-
window.addEventListener(type, listener, options);
|
|
18
|
-
return () => safeRemoveEventListener(type, listener, options);
|
|
19
|
-
};
|
|
20
|
-
export {
|
|
21
|
-
safeAddEventListener,
|
|
22
|
-
safeDispatchEvent,
|
|
23
|
-
safeRemoveEventListener
|
|
24
|
-
};
|