@cccsaurora/clue-ui 0.15.0-dev.28 → 0.15.0-dev.30
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-DgfJwTzt.js +436 -0
- package/AnnotationPreview-BvNpZOP0.js +188 -0
- package/ClueEnrichContext-DXwLVp0M.js +518 -0
- package/FlexOne-BSYAhhtG.js +9 -0
- package/_Map-kgDsDYxq.js +64 -0
- package/_MapCache-DabaaWfq.js +161 -0
- package/_Uint8Array-BlVVH1tp.js +129 -0
- package/_baseAssignValue-CNbcU6Nb.js +25 -0
- package/_baseClone-D3a8Pa4T.js +284 -0
- package/_baseExtremum-B1o1zHjR.js +33 -0
- package/_baseFlatten-D4huXoEI.js +92 -0
- package/_baseGet-BSK_nnoz.js +109 -0
- package/_baseIsEqual-B5xLoweL.js +238 -0
- package/_baseIteratee-p6Nj07-n.js +126 -0
- package/_baseSlice-GAv_YFTT.js +20 -0
- package/_baseSum-D0WC1dN0.js +13 -0
- package/_baseUniq-CpupKWcL.js +89 -0
- package/_commonjsHelpers-CUmg6egw.js +6 -0
- package/_createAggregator-BpVy5xMi.js +63 -0
- package/_getPrototype-D1LAdQKO.js +5 -0
- package/_getTag-D3ToyefI.js +126 -0
- package/api/lookup/enrich.d.ts +10 -0
- package/api/lookup/index.d.ts +5 -0
- package/api/lookup/types.d.ts +5 -0
- package/api/lookup/types_detection.d.ts +5 -0
- package/cloneDeep-CjP5k9zW.js +8 -0
- package/components/AnnotationBody.d.ts +6 -0
- package/components/AnnotationBody.js +56 -0
- package/components/AnnotationDetailPopover.d.ts +14 -0
- package/components/AnnotationDetailPopover.js +61 -0
- package/components/AnnotationDetails.d.ts +8 -0
- package/components/AnnotationDetails.js +172 -0
- package/components/AnnotationEntry.d.ts +6 -0
- package/components/AnnotationEntry.js +59 -0
- package/components/AnnotationPreview.d.ts +14 -0
- package/components/AnnotationPreview.js +11 -0
- package/components/ClassificationChip.d.ts +11 -0
- package/components/ClassificationChip.js +52 -0
- package/components/CountBadge.d.ts +8 -0
- package/components/CountBadge.js +34 -0
- package/components/EnrichedCard.d.ts +14 -0
- package/components/EnrichedCard.js +162 -0
- package/components/EnrichedChip.d.ts +9 -0
- package/components/EnrichedChip.js +176 -0
- package/components/EnrichedTypography.d.ts +16 -0
- package/components/EnrichedTypography.js +178 -0
- package/components/ErrorBoundary.d.ts +15 -0
- package/components/ErrorBoundary.js +36 -0
- package/components/RetryFailedEnrichments.d.ts +2 -0
- package/components/RetryFailedEnrichments.js +13 -0
- package/components/SourcePicker.d.ts +2 -0
- package/components/SourcePicker.js +98 -0
- package/components/actions/ActionForm.d.ts +6 -0
- package/components/actions/ActionForm.js +16 -0
- package/components/actions/ExecutePopover.d.ts +10 -0
- package/components/actions/ExecutePopover.js +93 -0
- package/components/actions/ResultModal.d.ts +9 -0
- package/components/actions/ResultModal.js +46 -0
- package/components/actions/form/schemaAdapter.d.ts +3 -0
- package/components/actions/form/schemaAdapter.js +47 -0
- package/components/display/graph/ExpandMoreButton.d.ts +7 -0
- package/components/display/graph/ExpandMoreButton.js +18 -0
- package/components/display/graph/elements/NodeCard.d.ts +10 -0
- package/components/display/graph/elements/NodeCard.js +146 -0
- package/components/display/graph/elements/NodeTag.d.ts +9 -0
- package/components/display/graph/elements/NodeTag.js +17 -0
- package/components/display/graph/index.d.ts +9 -0
- package/components/display/graph/index.js +438 -0
- package/components/display/graph/visualizations/Leaf.d.ts +25 -0
- package/components/display/graph/visualizations/Leaf.js +125 -0
- package/components/display/graph/visualizations/cloud/index.d.ts +24 -0
- package/components/display/graph/visualizations/cloud/index.js +141 -0
- package/components/display/graph/visualizations/icons/BaseIcon.d.ts +12 -0
- package/components/display/graph/visualizations/icons/BaseIcon.js +37 -0
- package/components/display/graph/visualizations/icons/BugIcon.d.ts +5 -0
- package/components/display/graph/visualizations/icons/BugIcon.js +18 -0
- package/components/display/graph/visualizations/icons/HostIcon.d.ts +5 -0
- package/components/display/graph/visualizations/icons/HostIcon.js +24 -0
- package/components/display/graph/visualizations/icons/NetworkIcon.d.ts +5 -0
- package/components/display/graph/visualizations/icons/NetworkIcon.js +24 -0
- package/components/display/graph/visualizations/icons/ProcessIcon.d.ts +5 -0
- package/components/display/graph/visualizations/icons/ProcessIcon.js +18 -0
- package/components/display/graph/visualizations/icons/TargetIcon.d.ts +5 -0
- package/components/display/graph/visualizations/icons/TargetIcon.js +19 -0
- package/components/display/graph/visualizations/icons/index.d.ts +2 -0
- package/components/display/graph/visualizations/icons/index.js +16 -0
- package/components/display/graph/visualizations/panels/NodePanel.d.ts +8 -0
- package/components/display/graph/visualizations/panels/NodePanel.js +12 -0
- package/components/display/graph/visualizations/tree/BundleLine.d.ts +29 -0
- package/components/display/graph/visualizations/tree/BundleLine.js +121 -0
- package/components/display/graph/visualizations/tree/Triangle.d.ts +9 -0
- package/components/display/graph/visualizations/tree/Triangle.js +26 -0
- package/components/display/graph/visualizations/tree/index.d.ts +36 -0
- package/components/display/graph/visualizations/tree/index.js +485 -0
- package/components/display/graph/visualizations/tree/types.d.ts +11 -0
- package/components/display/graph/visualizations/tree/types.js +1 -0
- package/components/display/icons/Iconified.d.ts +9 -0
- package/components/display/icons/Iconified.js +29 -0
- package/components/display/json/index.d.ts +14 -0
- package/components/display/json/index.js +12 -0
- package/components/display/markdown/DynamicTabs.d.ts +8 -0
- package/components/display/markdown/DynamicTabs.js +26 -0
- package/components/display/markdown/index.d.ts +9 -0
- package/components/display/markdown/index.js +13389 -0
- package/components/display/markdown/markdownPlugins/tabs.d.ts +3 -0
- package/components/display/markdown/markdownPlugins/tabs.js +4 -0
- package/components/enrichment/EnrichPopover.d.ts +10 -0
- package/components/enrichment/EnrichPopover.js +88 -0
- package/components/fetchers/Fetcher.d.ts +17 -0
- package/components/fetchers/Fetcher.js +188 -0
- package/components/fetchers/PreviewModal.d.ts +8 -0
- package/components/fetchers/PreviewModal.js +22 -0
- package/components/fetchers/StatusChip.d.ts +8 -0
- package/components/fetchers/StatusChip.js +30 -0
- package/components/group/Entry.d.ts +8 -0
- package/components/group/Entry.js +15 -0
- package/components/group/Group.d.ts +12 -0
- package/components/group/Group.js +15 -0
- package/components/group/GroupControl.d.ts +4 -0
- package/components/group/GroupControl.js +103 -0
- package/components/stats/QueryStatus.d.ts +4 -0
- package/components/stats/QueryStatus.js +61 -0
- package/countBy-C69WslUA.js +14 -0
- package/data/event.d.ts +12 -0
- package/data/event.js +8 -0
- package/database/index.d.ts +4 -0
- package/database/index.js +4 -0
- package/database/selector.schema.json.d.ts +119 -0
- package/database/status.schema.json.d.ts +38 -0
- package/database/types.d.ts +64 -0
- package/debounce-bV0h5FC5.js +92 -0
- package/en/translation.json +135 -0
- package/fr/translation.json +135 -0
- package/get-D3C3lEU3.js +8 -0
- package/groupBy-DC2oOuBN.js +14 -0
- package/hooks/ClueActionContext.d.ts +86 -0
- package/hooks/ClueActionContext.js +18 -0
- package/hooks/ClueComponentContext.d.ts +10 -0
- package/hooks/ClueComponentContext.js +40 -0
- package/hooks/ClueConfigProvider.d.ts +12 -0
- package/hooks/ClueConfigProvider.js +23 -0
- package/hooks/ClueDatabaseContext.d.ts +10 -0
- package/hooks/ClueDatabaseContext.js +23 -0
- package/hooks/ClueEnrichContext.d.ts +6 -0
- package/hooks/ClueEnrichContext.js +15 -0
- package/hooks/ClueEnrichContextType.d.ts +113 -0
- package/hooks/ClueEnrichProps.d.ts +81 -0
- package/hooks/ClueFetcherContext.d.ts +35 -0
- package/hooks/ClueFetcherContext.js +88 -0
- package/hooks/ClueGroupContext.d.ts +14 -0
- package/hooks/ClueGroupContext.js +23 -0
- package/hooks/CluePopupContext.d.ts +24 -0
- package/hooks/CluePopupContext.js +12 -0
- package/hooks/ClueProvider.d.ts +9 -0
- package/hooks/ClueProvider.js +14 -0
- package/hooks/selectors.d.ts +10 -0
- package/hooks/selectors.js +24 -0
- package/hooks/useAnnotations.d.ts +24 -0
- package/hooks/useAnnotations.js +69 -0
- package/hooks/useClue.d.ts +4 -0
- package/hooks/useClue.js +8 -0
- package/hooks/useClueActions.d.ts +4 -0
- package/hooks/useClueActions.js +5 -0
- package/hooks/useClueConfig.d.ts +1 -0
- package/hooks/useClueConfig.js +8 -0
- package/hooks/useClueTypeConfig.d.ts +17 -0
- package/hooks/useClueTypeConfig.js +7 -0
- package/hooks/useComparator.d.ts +16 -0
- package/hooks/useComparator.js +1060 -0
- package/hooks/useErrors.d.ts +17 -0
- package/hooks/useErrors.js +35 -0
- package/hooks/useMyHighlights.d.ts +11 -0
- package/hooks/useMyHighlights.js +74 -0
- package/hooks/useMyLocalStorage.d.ts +16 -0
- package/hooks/useMyLocalStorage.js +80 -0
- package/iconify-CXMreGTg.js +1782 -0
- package/icons/Action.d.ts +9 -0
- package/icons/Action.js +90 -0
- package/icons/Assessment.d.ts +11 -0
- package/icons/Assessment.js +123 -0
- package/icons/Context.d.ts +12 -0
- package/icons/Context.js +83 -0
- package/icons/Opinion.d.ts +11 -0
- package/icons/Opinion.js +125 -0
- package/icons/iconMap.d.ts +7 -0
- package/icons/iconMap.js +10 -0
- package/identity-CPGTqrE4.js +6 -0
- package/index-BDVjGvMI.js +696 -0
- package/index-BDrtH5ec.js +465 -0
- package/index-C9lySIVX.js +1172 -0
- package/index-DJYqRcxJ.js +15750 -0
- package/index-Dn2NHyXg.js +17654 -0
- package/index.css +21 -0
- package/isEmpty-BQkZubqU.js +29 -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/isUndefined-CE8h73dH.js +10 -0
- package/last-CUCl67Im.js +7 -0
- package/main.d.ts +42 -0
- package/main.js +70 -0
- package/package.json +40 -40
- package/public/manifest.json +16 -0
- package/public/robots.txt +3 -0
- package/public/svg/dark/clue-h.svg +52 -0
- package/public/svg/dark/clue-icon1-simple.svg +33 -0
- package/public/svg/dark/clue-icon1.svg +44 -0
- package/public/svg/dark/clue-icon2-simple.svg +26 -0
- package/public/svg/dark/clue-icon2.svg +37 -0
- package/public/svg/dark/clue-name.svg +14 -0
- package/public/svg/dark/clue-v.svg +52 -0
- package/public/svg/light/clue-h.svg +60 -0
- package/public/svg/light/clue-icon1-simple.svg +37 -0
- package/public/svg/light/clue-icon1.svg +48 -0
- package/public/svg/light/clue-icon2-simple.svg +30 -0
- package/public/svg/light/clue-icon2.svg +41 -0
- package/public/svg/light/clue-name.svg +14 -0
- package/public/svg/light/clue-v.svg +60 -0
- package/sortBy-B-UKp4GT.js +100 -0
- package/sumBy-MYkDPHZL.js +8 -0
- package/tabs-xGuUGsJd.js +254 -0
- package/text/Frequency.d.ts +9 -0
- package/text/Frequency.js +49 -0
- package/toFinite-CArjry_l.js +16 -0
- package/toNumber-DPxy1FBy.js +39 -0
- package/types/EnrichmentProps.d.ts +73 -0
- package/types/RunningActionData.d.ts +15 -0
- package/types/WithActionData.d.ts +9 -0
- package/types/action.d.ts +25 -0
- package/types/config.d.ts +16 -0
- package/types/fetcher.d.ts +60 -0
- package/types/graph.d.ts +101 -0
- package/types/lookup.d.ts +62 -0
- package/types/network.d.ts +9 -0
- package/useClueTypeConfig-D9ZSxa4F.js +3096 -0
- package/utils/chain.d.ts +14 -0
- package/utils/chain.js +106 -0
- package/utils/classificationParser.d.ts +195 -0
- package/utils/classificationParser.js +553 -0
- package/utils/constants.d.ts +26 -0
- package/utils/constants.js +36 -0
- package/utils/graph.d.ts +13 -0
- package/utils/graph.js +79 -0
- package/utils/hashUtil.d.ts +6 -0
- package/utils/hashUtil.js +11 -0
- package/utils/line.d.ts +28 -0
- package/utils/line.js +136 -0
- package/utils/loggerUtil.d.ts +6 -0
- package/utils/loggerUtil.js +8 -0
- package/utils/sessionStorage.d.ts +9 -0
- package/utils/sessionStorage.js +51 -0
- package/utils/utils.d.ts +13 -0
- package/utils/utils.js +11 -0
- package/utils/window.d.ts +3 -0
- package/utils/window.js +24 -0
- package/utils-CxIhC2xH.js +4182 -0
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { k as keys } from "./_Uint8Array-BlVVH1tp.js";
|
|
2
|
+
import { i as isArrayLike } from "./_getTag-D3ToyefI.js";
|
|
3
|
+
import { b as baseIteratee } from "./_baseIteratee-p6Nj07-n.js";
|
|
4
|
+
import { i as isArray } from "./_Map-kgDsDYxq.js";
|
|
5
|
+
function arrayAggregator(array, setter, iteratee, accumulator) {
|
|
6
|
+
var index = -1, length = array == null ? 0 : array.length;
|
|
7
|
+
while (++index < length) {
|
|
8
|
+
var value = array[index];
|
|
9
|
+
setter(accumulator, value, iteratee(value), array);
|
|
10
|
+
}
|
|
11
|
+
return accumulator;
|
|
12
|
+
}
|
|
13
|
+
function createBaseFor(fromRight) {
|
|
14
|
+
return function(object, iteratee, keysFunc) {
|
|
15
|
+
var index = -1, iterable = Object(object), props = keysFunc(object), length = props.length;
|
|
16
|
+
while (length--) {
|
|
17
|
+
var key = props[++index];
|
|
18
|
+
if (iteratee(iterable[key], key, iterable) === false) {
|
|
19
|
+
break;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
return object;
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
var baseFor = createBaseFor();
|
|
26
|
+
function baseForOwn(object, iteratee) {
|
|
27
|
+
return object && baseFor(object, iteratee, keys);
|
|
28
|
+
}
|
|
29
|
+
function createBaseEach(eachFunc, fromRight) {
|
|
30
|
+
return function(collection, iteratee) {
|
|
31
|
+
if (collection == null) {
|
|
32
|
+
return collection;
|
|
33
|
+
}
|
|
34
|
+
if (!isArrayLike(collection)) {
|
|
35
|
+
return eachFunc(collection, iteratee);
|
|
36
|
+
}
|
|
37
|
+
var length = collection.length, index = -1, iterable = Object(collection);
|
|
38
|
+
while (++index < length) {
|
|
39
|
+
if (iteratee(iterable[index], index, iterable) === false) {
|
|
40
|
+
break;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
return collection;
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
var baseEach = createBaseEach(baseForOwn);
|
|
47
|
+
function baseAggregator(collection, setter, iteratee, accumulator) {
|
|
48
|
+
baseEach(collection, function(value, key, collection2) {
|
|
49
|
+
setter(accumulator, value, iteratee(value), collection2);
|
|
50
|
+
});
|
|
51
|
+
return accumulator;
|
|
52
|
+
}
|
|
53
|
+
function createAggregator(setter, initializer) {
|
|
54
|
+
return function(collection, iteratee) {
|
|
55
|
+
var func = isArray(collection) ? arrayAggregator : baseAggregator, accumulator = {};
|
|
56
|
+
return func(collection, setter, baseIteratee(iteratee), accumulator);
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
export {
|
|
60
|
+
baseForOwn as a,
|
|
61
|
+
baseEach as b,
|
|
62
|
+
createAggregator as c
|
|
63
|
+
};
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import { g as getNative, a as isFunction, t as toSource, M as Map } from "./_Map-kgDsDYxq.js";
|
|
2
|
+
import { r as root, i as isObjectLike, b as baseGetTag, f as freeGlobal } from "./isObjectLike-OAgjjZye.js";
|
|
3
|
+
var WeakMap = getNative(root, "WeakMap");
|
|
4
|
+
var MAX_SAFE_INTEGER = 9007199254740991;
|
|
5
|
+
function isLength(value) {
|
|
6
|
+
return typeof value == "number" && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
|
|
7
|
+
}
|
|
8
|
+
function isArrayLike(value) {
|
|
9
|
+
return value != null && isLength(value.length) && !isFunction(value);
|
|
10
|
+
}
|
|
11
|
+
var objectProto$2 = Object.prototype;
|
|
12
|
+
function isPrototype(value) {
|
|
13
|
+
var Ctor = value && value.constructor, proto = typeof Ctor == "function" && Ctor.prototype || objectProto$2;
|
|
14
|
+
return value === proto;
|
|
15
|
+
}
|
|
16
|
+
var argsTag$1 = "[object Arguments]";
|
|
17
|
+
function baseIsArguments(value) {
|
|
18
|
+
return isObjectLike(value) && baseGetTag(value) == argsTag$1;
|
|
19
|
+
}
|
|
20
|
+
var objectProto$1 = Object.prototype;
|
|
21
|
+
var hasOwnProperty$1 = objectProto$1.hasOwnProperty;
|
|
22
|
+
var propertyIsEnumerable = objectProto$1.propertyIsEnumerable;
|
|
23
|
+
var isArguments = baseIsArguments(/* @__PURE__ */ function() {
|
|
24
|
+
return arguments;
|
|
25
|
+
}()) ? baseIsArguments : function(value) {
|
|
26
|
+
return isObjectLike(value) && hasOwnProperty$1.call(value, "callee") && !propertyIsEnumerable.call(value, "callee");
|
|
27
|
+
};
|
|
28
|
+
function stubFalse() {
|
|
29
|
+
return false;
|
|
30
|
+
}
|
|
31
|
+
var freeExports$1 = typeof exports == "object" && exports && !exports.nodeType && exports;
|
|
32
|
+
var freeModule$1 = freeExports$1 && typeof module == "object" && module && !module.nodeType && module;
|
|
33
|
+
var moduleExports$1 = freeModule$1 && freeModule$1.exports === freeExports$1;
|
|
34
|
+
var Buffer = moduleExports$1 ? root.Buffer : void 0;
|
|
35
|
+
var nativeIsBuffer = Buffer ? Buffer.isBuffer : void 0;
|
|
36
|
+
var isBuffer = nativeIsBuffer || stubFalse;
|
|
37
|
+
var argsTag = "[object Arguments]", arrayTag = "[object Array]", boolTag = "[object Boolean]", dateTag = "[object Date]", errorTag = "[object Error]", funcTag = "[object Function]", mapTag$1 = "[object Map]", numberTag = "[object Number]", objectTag$1 = "[object Object]", regexpTag = "[object RegExp]", setTag$1 = "[object Set]", stringTag = "[object String]", weakMapTag$1 = "[object WeakMap]";
|
|
38
|
+
var arrayBufferTag = "[object ArrayBuffer]", dataViewTag$1 = "[object DataView]", float32Tag = "[object Float32Array]", float64Tag = "[object Float64Array]", int8Tag = "[object Int8Array]", int16Tag = "[object Int16Array]", int32Tag = "[object Int32Array]", uint8Tag = "[object Uint8Array]", uint8ClampedTag = "[object Uint8ClampedArray]", uint16Tag = "[object Uint16Array]", uint32Tag = "[object Uint32Array]";
|
|
39
|
+
var typedArrayTags = {};
|
|
40
|
+
typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = typedArrayTags[uint32Tag] = true;
|
|
41
|
+
typedArrayTags[argsTag] = typedArrayTags[arrayTag] = typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = typedArrayTags[dataViewTag$1] = typedArrayTags[dateTag] = typedArrayTags[errorTag] = typedArrayTags[funcTag] = typedArrayTags[mapTag$1] = typedArrayTags[numberTag] = typedArrayTags[objectTag$1] = typedArrayTags[regexpTag] = typedArrayTags[setTag$1] = typedArrayTags[stringTag] = typedArrayTags[weakMapTag$1] = false;
|
|
42
|
+
function baseIsTypedArray(value) {
|
|
43
|
+
return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[baseGetTag(value)];
|
|
44
|
+
}
|
|
45
|
+
function baseUnary(func) {
|
|
46
|
+
return function(value) {
|
|
47
|
+
return func(value);
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
var freeExports = typeof exports == "object" && exports && !exports.nodeType && exports;
|
|
51
|
+
var freeModule = freeExports && typeof module == "object" && module && !module.nodeType && module;
|
|
52
|
+
var moduleExports = freeModule && freeModule.exports === freeExports;
|
|
53
|
+
var freeProcess = moduleExports && freeGlobal.process;
|
|
54
|
+
var nodeUtil = function() {
|
|
55
|
+
try {
|
|
56
|
+
var types = freeModule && freeModule.require && freeModule.require("util").types;
|
|
57
|
+
if (types) {
|
|
58
|
+
return types;
|
|
59
|
+
}
|
|
60
|
+
return freeProcess && freeProcess.binding && freeProcess.binding("util");
|
|
61
|
+
} catch (e) {
|
|
62
|
+
}
|
|
63
|
+
}();
|
|
64
|
+
var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
|
|
65
|
+
var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
|
|
66
|
+
function overArg(func, transform) {
|
|
67
|
+
return function(arg) {
|
|
68
|
+
return func(transform(arg));
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
var nativeKeys = overArg(Object.keys, Object);
|
|
72
|
+
var objectProto = Object.prototype;
|
|
73
|
+
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
74
|
+
function baseKeys(object) {
|
|
75
|
+
if (!isPrototype(object)) {
|
|
76
|
+
return nativeKeys(object);
|
|
77
|
+
}
|
|
78
|
+
var result = [];
|
|
79
|
+
for (var key in Object(object)) {
|
|
80
|
+
if (hasOwnProperty.call(object, key) && key != "constructor") {
|
|
81
|
+
result.push(key);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
return result;
|
|
85
|
+
}
|
|
86
|
+
var DataView = getNative(root, "DataView");
|
|
87
|
+
var Promise$1 = getNative(root, "Promise");
|
|
88
|
+
var Set = getNative(root, "Set");
|
|
89
|
+
var mapTag = "[object Map]", objectTag = "[object Object]", promiseTag = "[object Promise]", setTag = "[object Set]", weakMapTag = "[object WeakMap]";
|
|
90
|
+
var dataViewTag = "[object DataView]";
|
|
91
|
+
var dataViewCtorString = toSource(DataView), mapCtorString = toSource(Map), promiseCtorString = toSource(Promise$1), setCtorString = toSource(Set), weakMapCtorString = toSource(WeakMap);
|
|
92
|
+
var getTag = baseGetTag;
|
|
93
|
+
if (DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag || Map && getTag(new Map()) != mapTag || Promise$1 && getTag(Promise$1.resolve()) != promiseTag || Set && getTag(new Set()) != setTag || WeakMap && getTag(new WeakMap()) != weakMapTag) {
|
|
94
|
+
getTag = function(value) {
|
|
95
|
+
var result = baseGetTag(value), Ctor = result == objectTag ? value.constructor : void 0, ctorString = Ctor ? toSource(Ctor) : "";
|
|
96
|
+
if (ctorString) {
|
|
97
|
+
switch (ctorString) {
|
|
98
|
+
case dataViewCtorString:
|
|
99
|
+
return dataViewTag;
|
|
100
|
+
case mapCtorString:
|
|
101
|
+
return mapTag;
|
|
102
|
+
case promiseCtorString:
|
|
103
|
+
return promiseTag;
|
|
104
|
+
case setCtorString:
|
|
105
|
+
return setTag;
|
|
106
|
+
case weakMapCtorString:
|
|
107
|
+
return weakMapTag;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
return result;
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
export {
|
|
114
|
+
Set as S,
|
|
115
|
+
isBuffer as a,
|
|
116
|
+
isTypedArray as b,
|
|
117
|
+
isArguments as c,
|
|
118
|
+
isPrototype as d,
|
|
119
|
+
baseKeys as e,
|
|
120
|
+
baseUnary as f,
|
|
121
|
+
getTag as g,
|
|
122
|
+
isLength as h,
|
|
123
|
+
isArrayLike as i,
|
|
124
|
+
nodeUtil as n,
|
|
125
|
+
overArg as o
|
|
126
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { AxiosRequestConfig } from 'axios';
|
|
2
|
+
import { BulkEnrichResponses, Selector } from "../../types/lookup";
|
|
3
|
+
|
|
4
|
+
export declare function uri(): string;
|
|
5
|
+
export declare function post(bulkData: Selector[], sources?: string[], options?: {
|
|
6
|
+
classification?: string;
|
|
7
|
+
timeout?: number;
|
|
8
|
+
includeRaw?: boolean;
|
|
9
|
+
noCache?: boolean;
|
|
10
|
+
}, config?: AxiosRequestConfig): Promise<BulkEnrichResponses>;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { I as Icon } from "../iconify-CXMreGTg.js";
|
|
3
|
+
import { Box, Chip, Stack, Typography } from "@mui/material";
|
|
4
|
+
import { memo, useMemo } from "react";
|
|
5
|
+
const AnnotationBody = ({ annotation }) => {
|
|
6
|
+
const icon = useMemo(() => {
|
|
7
|
+
if (annotation.type === "assessment") {
|
|
8
|
+
return ["trivial", "recon", "attempt", "compromise", "mitigated"].includes(annotation.value) ? "healthicons:hazardous" : "fluent-mdl2:ribbon-solid";
|
|
9
|
+
}
|
|
10
|
+
if (annotation.type === "opinion") {
|
|
11
|
+
return annotation.value === "benign" ? "mdi:shield-check" : annotation.value === "suspicious" ? "mdi:warning-outline" : annotation.value === "obscure" ? "bi:eye-slash-fill" : "mdi:warning-decagram";
|
|
12
|
+
}
|
|
13
|
+
return null;
|
|
14
|
+
}, [annotation.type, annotation.value]);
|
|
15
|
+
if (annotation.type === "assessment") {
|
|
16
|
+
return /* @__PURE__ */ jsx(Box, { children: /* @__PURE__ */ jsx(
|
|
17
|
+
Chip,
|
|
18
|
+
{
|
|
19
|
+
size: "small",
|
|
20
|
+
icon: /* @__PURE__ */ jsx(Icon, { icon }),
|
|
21
|
+
color: ["trivial", "recon", "attempt", "compromise", "mitigated"].includes(annotation.value) ? "error" : "success",
|
|
22
|
+
label: `${annotation.type}: ${annotation.value}`,
|
|
23
|
+
sx: { textTransform: "capitalize" }
|
|
24
|
+
}
|
|
25
|
+
) });
|
|
26
|
+
}
|
|
27
|
+
if (annotation.type === "opinion") {
|
|
28
|
+
return /* @__PURE__ */ jsx(Box, { children: /* @__PURE__ */ jsx(
|
|
29
|
+
Chip,
|
|
30
|
+
{
|
|
31
|
+
size: "small",
|
|
32
|
+
icon: /* @__PURE__ */ jsx(Icon, { icon }),
|
|
33
|
+
color: {
|
|
34
|
+
benign: "success",
|
|
35
|
+
suspicious: "warning",
|
|
36
|
+
obscure: "error",
|
|
37
|
+
malicious: "error"
|
|
38
|
+
}[annotation.value],
|
|
39
|
+
label: `${annotation.type}: ${annotation.value}`,
|
|
40
|
+
sx: { textTransform: "capitalize" }
|
|
41
|
+
}
|
|
42
|
+
) });
|
|
43
|
+
}
|
|
44
|
+
return /* @__PURE__ */ jsxs(Stack, { direction: "row", alignItems: "center", spacing: 0.5, children: [
|
|
45
|
+
annotation.icon && /* @__PURE__ */ jsx(Icon, { icon: annotation.icon, style: { filter: "drop-shadow(0px 0px 1px rgb(0 0 0 / 0.4))" } }),
|
|
46
|
+
annotation.type !== "context" && /* @__PURE__ */ jsxs(Typography, { variant: "body2", sx: { textTransform: "capitalize" }, children: [
|
|
47
|
+
annotation.type,
|
|
48
|
+
":"
|
|
49
|
+
] }),
|
|
50
|
+
/* @__PURE__ */ jsx(Typography, { variant: "body2", children: annotation.value })
|
|
51
|
+
] });
|
|
52
|
+
};
|
|
53
|
+
const AnnotationBody$1 = memo(AnnotationBody);
|
|
54
|
+
export {
|
|
55
|
+
AnnotationBody$1 as default
|
|
56
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { PopoverProps } from '@mui/material';
|
|
2
|
+
import { Selector } from "../types/lookup";
|
|
3
|
+
import { FC } from 'react';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* The Annotation Popover is for showing a permanent popover on click with interactivity. For showing data on hover, use Annotation Popper.
|
|
7
|
+
*/
|
|
8
|
+
declare const AnnotationDetailPopover: FC<{
|
|
9
|
+
anchorEl: HTMLElement;
|
|
10
|
+
enrichRequest: Selector;
|
|
11
|
+
onClose: PopoverProps['onClose'];
|
|
12
|
+
open: boolean;
|
|
13
|
+
} & Omit<PopoverProps, 'open'>>;
|
|
14
|
+
export default AnnotationDetailPopover;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Popover } from "@mui/material";
|
|
3
|
+
import React__default, { useRef, useState, useEffect } from "react";
|
|
4
|
+
import AnnotationDetails from "./AnnotationDetails.js";
|
|
5
|
+
const AnnotationDetailPopover = React__default.memo(({ anchorEl, enrichRequest, open, onClose, ...otherProps }) => {
|
|
6
|
+
var _a, _b, _c;
|
|
7
|
+
const actionRef = useRef();
|
|
8
|
+
const [ready, setReady] = useState(false);
|
|
9
|
+
useEffect(() => {
|
|
10
|
+
if (!open) {
|
|
11
|
+
setReady(false);
|
|
12
|
+
}
|
|
13
|
+
}, [open]);
|
|
14
|
+
return /* @__PURE__ */ jsx(
|
|
15
|
+
Popover,
|
|
16
|
+
{
|
|
17
|
+
anchorOrigin: { horizontal: "left", vertical: "bottom" },
|
|
18
|
+
...otherProps,
|
|
19
|
+
action: actionRef,
|
|
20
|
+
open: !!(open && ready),
|
|
21
|
+
keepMounted: open,
|
|
22
|
+
anchorEl,
|
|
23
|
+
onClose,
|
|
24
|
+
slotProps: {
|
|
25
|
+
...otherProps.slotProps ?? {},
|
|
26
|
+
paper: {
|
|
27
|
+
...((_a = otherProps.slotProps) == null ? void 0 : _a.paper) ?? {},
|
|
28
|
+
sx: [
|
|
29
|
+
{
|
|
30
|
+
maxHeight: "min(600px, 95vh)",
|
|
31
|
+
overflowY: "auto",
|
|
32
|
+
maxWidth: "500px",
|
|
33
|
+
width: "100%",
|
|
34
|
+
zIndex: ((_c = (_b = anchorEl == null ? void 0 : anchorEl.computedStyleMap) == null ? void 0 : _b.call(anchorEl).get("z-index")) == null ? void 0 : _c.toString()) || 2
|
|
35
|
+
}
|
|
36
|
+
]
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
onClick: (e) => {
|
|
40
|
+
var _a2;
|
|
41
|
+
e.preventDefault();
|
|
42
|
+
e.stopPropagation();
|
|
43
|
+
(_a2 = otherProps.onClick) == null ? void 0 : _a2.call(otherProps, e);
|
|
44
|
+
},
|
|
45
|
+
children: /* @__PURE__ */ jsx(
|
|
46
|
+
AnnotationDetails,
|
|
47
|
+
{
|
|
48
|
+
enrichRequest,
|
|
49
|
+
setReady,
|
|
50
|
+
updatePosition: () => {
|
|
51
|
+
var _a2;
|
|
52
|
+
return (_a2 = actionRef.current) == null ? void 0 : _a2.updatePosition();
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
)
|
|
56
|
+
}
|
|
57
|
+
);
|
|
58
|
+
});
|
|
59
|
+
export {
|
|
60
|
+
AnnotationDetailPopover as default
|
|
61
|
+
};
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import { I as Icon } from "../iconify-CXMreGTg.js";
|
|
3
|
+
import { useTheme, Stack, Typography, Tooltip, Box, IconButton, CircularProgress, Chip, Accordion, AccordionSummary, AccordionDetails, Divider } from "@mui/material";
|
|
4
|
+
import Iconified from "./display/icons/Iconified.js";
|
|
5
|
+
import { SNACKBAR_EVENT_ID } from "../data/event.js";
|
|
6
|
+
import { ClueComponentContext } from "../hooks/ClueComponentContext.js";
|
|
7
|
+
import { useClueEnrichSelector } from "../hooks/selectors.js";
|
|
8
|
+
import useAnnotations from "../hooks/useAnnotations.js";
|
|
9
|
+
import useErrors from "../hooks/useErrors.js";
|
|
10
|
+
import { ICON_MAP } from "../icons/iconMap.js";
|
|
11
|
+
import { safeDispatchEvent } from "../utils/window.js";
|
|
12
|
+
import { memo, useState, useMemo, useCallback, useEffect } from "react";
|
|
13
|
+
import { u as useContextSelector } from "../index-BDVjGvMI.js";
|
|
14
|
+
import ExecutePopover from "./actions/ExecutePopover.js";
|
|
15
|
+
import AnnotationEntry from "./AnnotationEntry.js";
|
|
16
|
+
import ClassificationChip from "./ClassificationChip.js";
|
|
17
|
+
import EnrichPopover from "./enrichment/EnrichPopover.js";
|
|
18
|
+
import { u as uniq } from "../ClueEnrichContext-DXwLVp0M.js";
|
|
19
|
+
import { g as groupBy } from "../groupBy-DC2oOuBN.js";
|
|
20
|
+
import { i as isNull } from "../isUndefined-CE8h73dH.js";
|
|
21
|
+
const AnnotationDetails = ({ enrichRequest, setReady, updatePosition }) => {
|
|
22
|
+
const theme = useTheme();
|
|
23
|
+
const { t } = useContextSelector(ClueComponentContext, (ctx) => ctx.i18next);
|
|
24
|
+
const [filter, setFilter] = useState("all");
|
|
25
|
+
const enrich = useClueEnrichSelector((state) => state.enrich);
|
|
26
|
+
const [annotations, loading] = useAnnotations(
|
|
27
|
+
enrichRequest == null ? void 0 : enrichRequest.type,
|
|
28
|
+
enrichRequest == null ? void 0 : enrichRequest.value,
|
|
29
|
+
enrichRequest == null ? void 0 : enrichRequest.classification,
|
|
30
|
+
{ skipEnrichment: true }
|
|
31
|
+
);
|
|
32
|
+
const errors = useErrors(enrichRequest == null ? void 0 : enrichRequest.value);
|
|
33
|
+
const options = useMemo(
|
|
34
|
+
() => ["all", ...uniq((annotations ?? []).map((annotation) => annotation.type))],
|
|
35
|
+
[annotations]
|
|
36
|
+
);
|
|
37
|
+
const annotationsByType = useMemo(() => groupBy(annotations ?? [], "type"), [annotations]);
|
|
38
|
+
const forceEnrich = useCallback(async () => {
|
|
39
|
+
await enrich(enrichRequest.type, enrichRequest.value, {
|
|
40
|
+
classification: enrichRequest.classification,
|
|
41
|
+
timeout: 15,
|
|
42
|
+
force: true
|
|
43
|
+
});
|
|
44
|
+
}, [enrichRequest, enrich]);
|
|
45
|
+
useEffect(() => {
|
|
46
|
+
if (!setReady) {
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
setReady(enrichRequest && !isNull(annotations));
|
|
50
|
+
updatePosition == null ? void 0 : updatePosition();
|
|
51
|
+
}, [annotations, enrichRequest, setReady, updatePosition]);
|
|
52
|
+
return enrichRequest && !isNull(annotations) && /* @__PURE__ */ jsxs(Stack, { direction: "column", sx: { p: 1, width: "100%" }, spacing: 1, children: [
|
|
53
|
+
/* @__PURE__ */ jsxs(Stack, { spacing: 1, children: [
|
|
54
|
+
/* @__PURE__ */ jsxs(Stack, { direction: "row", spacing: 1, children: [
|
|
55
|
+
/* @__PURE__ */ jsxs(Stack, { children: [
|
|
56
|
+
/* @__PURE__ */ jsxs(Stack, { direction: "row", spacing: 1, children: [
|
|
57
|
+
/* @__PURE__ */ jsx(Typography, { variant: "body1", fontWeight: "bold", children: "Clue" }),
|
|
58
|
+
enrichRequest.classification && /* @__PURE__ */ jsx(ClassificationChip, { size: "small", classification: enrichRequest.classification })
|
|
59
|
+
] }),
|
|
60
|
+
/* @__PURE__ */ jsxs(Typography, { variant: "caption", color: "text.secondary", children: [
|
|
61
|
+
enrichRequest.type.toLocaleUpperCase(),
|
|
62
|
+
" ",
|
|
63
|
+
t("enrichment")
|
|
64
|
+
] })
|
|
65
|
+
] }),
|
|
66
|
+
/* @__PURE__ */ jsx("div", { style: { flex: 1 } }),
|
|
67
|
+
/* @__PURE__ */ jsx(Tooltip, { title: t("refresh"), children: /* @__PURE__ */ jsx(Box, { sx: { alignSelf: "center", m: -1 }, children: /* @__PURE__ */ jsx(IconButton, { onClick: () => forceEnrich(), disabled: loading, children: loading ? /* @__PURE__ */ jsx(CircularProgress, { variant: "indeterminate", size: 20 }) : /* @__PURE__ */ jsx(Iconified, { icon: "ic:baseline-replay", fontSize: "small" }) }) }) }),
|
|
68
|
+
/* @__PURE__ */ jsx(Tooltip, { title: t("clipboard"), children: /* @__PURE__ */ jsx(
|
|
69
|
+
IconButton,
|
|
70
|
+
{
|
|
71
|
+
sx: { alignSelf: "center", m: -1 },
|
|
72
|
+
onClick: () => {
|
|
73
|
+
navigator.clipboard.writeText(enrichRequest.value);
|
|
74
|
+
safeDispatchEvent(
|
|
75
|
+
new CustomEvent(SNACKBAR_EVENT_ID, {
|
|
76
|
+
detail: {
|
|
77
|
+
message: `${enrichRequest.value} ${t("clipboard.success")}`,
|
|
78
|
+
level: "success"
|
|
79
|
+
}
|
|
80
|
+
})
|
|
81
|
+
);
|
|
82
|
+
},
|
|
83
|
+
children: /* @__PURE__ */ jsx(Iconified, { icon: "ic:outline-assignment", fontSize: "small" })
|
|
84
|
+
}
|
|
85
|
+
) }),
|
|
86
|
+
/* @__PURE__ */ jsx(EnrichPopover, { selector: enrichRequest }),
|
|
87
|
+
/* @__PURE__ */ jsx(ExecutePopover, { selectors: [enrichRequest] })
|
|
88
|
+
] }),
|
|
89
|
+
/* @__PURE__ */ jsxs(Stack, { direction: "row", spacing: 0.5, children: [
|
|
90
|
+
options.map((opt, id) => /* @__PURE__ */ jsx(
|
|
91
|
+
Chip,
|
|
92
|
+
{
|
|
93
|
+
size: "small",
|
|
94
|
+
variant: opt === filter ? "filled" : "outlined",
|
|
95
|
+
icon: ICON_MAP[opt] && /* @__PURE__ */ jsx(Icon, { icon: ICON_MAP[opt] }),
|
|
96
|
+
label: /* @__PURE__ */ jsxs(Typography, { variant: "caption", textTransform: "capitalize", children: [
|
|
97
|
+
opt,
|
|
98
|
+
":",
|
|
99
|
+
" ",
|
|
100
|
+
opt === "all" ? annotations.length : annotations.filter((annotation) => annotation.type === opt).length
|
|
101
|
+
] }),
|
|
102
|
+
onClick: () => setFilter(opt)
|
|
103
|
+
},
|
|
104
|
+
id
|
|
105
|
+
)),
|
|
106
|
+
(errors == null ? void 0 : errors.length) > 0 && /* @__PURE__ */ jsx(
|
|
107
|
+
Tooltip,
|
|
108
|
+
{
|
|
109
|
+
title: /* @__PURE__ */ jsx("div", { onClick: (e) => e.stopPropagation(), children: errors.map((err, err_id) => /* @__PURE__ */ jsxs("div", { children: [
|
|
110
|
+
/* @__PURE__ */ jsx("span", { style: { textTransform: "capitalize" }, children: err.source.replace(/-/g, " ") }),
|
|
111
|
+
":",
|
|
112
|
+
" ",
|
|
113
|
+
err.message
|
|
114
|
+
] }, err_id)) }),
|
|
115
|
+
children: /* @__PURE__ */ jsx(
|
|
116
|
+
Chip,
|
|
117
|
+
{
|
|
118
|
+
size: "small",
|
|
119
|
+
variant: "outlined",
|
|
120
|
+
icon: /* @__PURE__ */ jsx(Icon, { icon: "material-symbols:timer-outline", color: theme.palette.error.main }),
|
|
121
|
+
label: /* @__PURE__ */ jsxs(Typography, { variant: "caption", textTransform: "capitalize", children: [
|
|
122
|
+
t("annotation.failed"),
|
|
123
|
+
": ",
|
|
124
|
+
errors.length
|
|
125
|
+
] }),
|
|
126
|
+
onClick: forceEnrich
|
|
127
|
+
}
|
|
128
|
+
)
|
|
129
|
+
}
|
|
130
|
+
)
|
|
131
|
+
] })
|
|
132
|
+
] }),
|
|
133
|
+
/* @__PURE__ */ jsx(Box, {}),
|
|
134
|
+
Object.keys(annotationsByType).filter((type) => !filter || filter === "all" || type === filter).map((type, id) => /* @__PURE__ */ jsxs(
|
|
135
|
+
Accordion,
|
|
136
|
+
{
|
|
137
|
+
defaultExpanded: true,
|
|
138
|
+
sx: {
|
|
139
|
+
marginTop: `${theme.spacing(1)} !important`,
|
|
140
|
+
marginBottom: "0 !important",
|
|
141
|
+
"&:before": { height: 0 }
|
|
142
|
+
},
|
|
143
|
+
children: [
|
|
144
|
+
filter === "all" && /* @__PURE__ */ jsx(
|
|
145
|
+
AccordionSummary,
|
|
146
|
+
{
|
|
147
|
+
expandIcon: /* @__PURE__ */ jsx(Iconified, { icon: "ic:baseline-arrow-drop-down" }),
|
|
148
|
+
sx: {
|
|
149
|
+
minHeight: "initial !important",
|
|
150
|
+
mt: 0.5,
|
|
151
|
+
mb: 0,
|
|
152
|
+
px: 1,
|
|
153
|
+
"& .MuiAccordionSummary-content": { my: 0.5, mx: 0 },
|
|
154
|
+
"& .MuiAccordionSummary-content.Mui-expanded": { my: 0.5, mx: 0 }
|
|
155
|
+
},
|
|
156
|
+
children: /* @__PURE__ */ jsx(Typography, { variant: "body1", textTransform: "capitalize", children: type }, type)
|
|
157
|
+
}
|
|
158
|
+
),
|
|
159
|
+
/* @__PURE__ */ jsxs(AccordionDetails, { sx: { px: 1 }, children: [
|
|
160
|
+
filter === "all" && /* @__PURE__ */ jsx(Divider, { orientation: "horizontal", sx: { mb: 1 } }),
|
|
161
|
+
/* @__PURE__ */ jsx(Stack, { spacing: 1, divider: /* @__PURE__ */ jsx(Divider, { orientation: "horizontal", flexItem: true }), children: annotationsByType[type].map((annotation, ann_id) => /* @__PURE__ */ jsx(AnnotationEntry, { annotation }, ann_id)) })
|
|
162
|
+
] })
|
|
163
|
+
]
|
|
164
|
+
},
|
|
165
|
+
id
|
|
166
|
+
))
|
|
167
|
+
] });
|
|
168
|
+
};
|
|
169
|
+
const AnnotationDetails$1 = memo(AnnotationDetails);
|
|
170
|
+
export {
|
|
171
|
+
AnnotationDetails$1 as default
|
|
172
|
+
};
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { jsxs, jsx, Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { I as Icon } from "../iconify-CXMreGTg.js";
|
|
3
|
+
import { Stack, Typography, Chip, IconButton } from "@mui/material";
|
|
4
|
+
import Iconified from "./display/icons/Iconified.js";
|
|
5
|
+
import { t as twitterShort } from "../utils-CxIhC2xH.js";
|
|
6
|
+
import { memo } from "react";
|
|
7
|
+
import AnnotationBody from "./AnnotationBody.js";
|
|
8
|
+
import ClassificationChip from "./ClassificationChip.js";
|
|
9
|
+
const AnnotatonEntry = ({ annotation }) => {
|
|
10
|
+
return /* @__PURE__ */ jsxs(Stack, { direction: "column", spacing: 1, children: [
|
|
11
|
+
/* @__PURE__ */ jsxs(Stack, { direction: "row", spacing: 1, alignItems: "center", children: [
|
|
12
|
+
annotation.analytic_icon && /* @__PURE__ */ jsx(
|
|
13
|
+
Icon,
|
|
14
|
+
{
|
|
15
|
+
style: { alignSelf: "center", filter: "drop-shadow(0px 0px 1px rgb(0 0 0 / 0.4))" },
|
|
16
|
+
icon: annotation.analytic_icon
|
|
17
|
+
}
|
|
18
|
+
),
|
|
19
|
+
/* @__PURE__ */ jsx(Typography, { variant: "body1", sx: { textTransform: "capitalize", maxWidth: "275px" }, children: annotation.analytic ?? annotation.author }),
|
|
20
|
+
annotation.quantity > 1 && /* @__PURE__ */ jsxs(Typography, { variant: "caption", color: "text.secondary", children: [
|
|
21
|
+
"(x",
|
|
22
|
+
annotation.quantity,
|
|
23
|
+
")"
|
|
24
|
+
] }),
|
|
25
|
+
/* @__PURE__ */ jsx("div", { style: { flex: 1 } }),
|
|
26
|
+
annotation.version && /* @__PURE__ */ jsx(Chip, { size: "small", label: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
27
|
+
"v",
|
|
28
|
+
annotation.version.replace(/^v/, "")
|
|
29
|
+
] }) }),
|
|
30
|
+
annotation.link && /* @__PURE__ */ jsx(
|
|
31
|
+
IconButton,
|
|
32
|
+
{
|
|
33
|
+
component: "a",
|
|
34
|
+
href: annotation.link,
|
|
35
|
+
onClick: () => window.open(annotation.link, "_blank", "noreferrer"),
|
|
36
|
+
target: "_blank",
|
|
37
|
+
rel: "noreferrer",
|
|
38
|
+
size: "small",
|
|
39
|
+
children: /* @__PURE__ */ jsx(Iconified, { icon: "ic:baseline-open-in-new", fontSize: "small" })
|
|
40
|
+
}
|
|
41
|
+
),
|
|
42
|
+
annotation.classification && /* @__PURE__ */ jsx(ClassificationChip, { size: "small", classification: annotation.classification })
|
|
43
|
+
] }),
|
|
44
|
+
/* @__PURE__ */ jsx(AnnotationBody, { annotation }),
|
|
45
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "text.secondary", children: annotation.summary }),
|
|
46
|
+
/* @__PURE__ */ jsxs(Stack, { direction: "row", children: [
|
|
47
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "text.secondary", fontSize: "10px", children: twitterShort(annotation.timestamp) }),
|
|
48
|
+
/* @__PURE__ */ jsx("div", { style: { flex: 1 } }),
|
|
49
|
+
!!annotation.latency && /* @__PURE__ */ jsxs(Typography, { variant: "caption", color: "text.secondary", fontSize: "10px", children: [
|
|
50
|
+
Math.round(annotation.latency),
|
|
51
|
+
"ms"
|
|
52
|
+
] })
|
|
53
|
+
] })
|
|
54
|
+
] });
|
|
55
|
+
};
|
|
56
|
+
const AnnotationEntry = memo(AnnotatonEntry);
|
|
57
|
+
export {
|
|
58
|
+
AnnotationEntry as default
|
|
59
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { PopperProps } from '@mui/material';
|
|
2
|
+
import { Selector } from "../types/lookup";
|
|
3
|
+
import { FC } from 'react';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* The Annotation Preview is for showing a temporary popper on hover.
|
|
7
|
+
*/
|
|
8
|
+
declare const AnnotationPreview: FC<{
|
|
9
|
+
annotationType: 'opinion' | 'frequency' | 'owner' | 'assessment' | 'context' | 'activity' | 'mitigation' | 'actionResults';
|
|
10
|
+
anchorEl: HTMLElement;
|
|
11
|
+
enrichRequest: Selector;
|
|
12
|
+
open: boolean;
|
|
13
|
+
} & Omit<PopperProps, 'open'>>;
|
|
14
|
+
export default AnnotationPreview;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import "react/jsx-runtime";
|
|
2
|
+
import "../iconify-CXMreGTg.js";
|
|
3
|
+
import "@mui/material";
|
|
4
|
+
import { A } from "../AnnotationPreview-BvNpZOP0.js";
|
|
5
|
+
import "../hooks/useAnnotations.js";
|
|
6
|
+
import "../utils-CxIhC2xH.js";
|
|
7
|
+
import "react";
|
|
8
|
+
import "../index-BDVjGvMI.js";
|
|
9
|
+
export {
|
|
10
|
+
A as default
|
|
11
|
+
};
|