@cccsaurora/clue-ui 1.1.0-dev.98 → 1.1.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.
Files changed (178) hide show
  1. package/ActionForm-myEAs2UC.js +435 -0
  2. package/AnnotationDetails-BdfWMISw.js +160 -0
  3. package/AnnotationPreview-CKMGCoUH.js +140 -0
  4. package/ClueEnrichContext-CrFpdYhh.js +414 -0
  5. package/FlexOne-BXWFOd1T.js +6 -0
  6. package/_Map-DXNg_Z-q.js +54 -0
  7. package/_MapCache-Cu25RRDU.js +129 -0
  8. package/_Uint8Array-DlJCtTvG.js +102 -0
  9. package/_baseAssignValue-CUmzp727.js +20 -0
  10. package/_baseClone-BlMmRXeX.js +208 -0
  11. package/_baseExtremum-P_0akmCi.js +27 -0
  12. package/_baseFlatten-CN7vDNEQ.js +72 -0
  13. package/_baseGet-Dgf6_xCm.js +80 -0
  14. package/_baseIsEqual-Cpjtfb3Q.js +173 -0
  15. package/_baseIteratee-CP1bocOX.js +95 -0
  16. package/_baseSlice-M5RKzt1A.js +10 -0
  17. package/_baseSum-wEbgNeUs.js +10 -0
  18. package/_baseUniq-tMFmk80M.js +61 -0
  19. package/_commonjsHelpers-DaMA6jEr.js +8 -0
  20. package/_createAggregator-B4Cav8ZM.js +53 -0
  21. package/_getPrototype-CHAFQYL_.js +5 -0
  22. package/_getTag-BV_UoLYG.js +90 -0
  23. package/cloneDeep-BPVpFBzJ.js +8 -0
  24. package/components/AnnotationBody.js +35 -49
  25. package/components/AnnotationDetailPopover.js +30 -36
  26. package/components/AnnotationDetails.js +6 -6
  27. package/components/AnnotationEntry.js +47 -50
  28. package/components/AnnotationPreview.js +5 -5
  29. package/components/ClassificationChip.js +23 -44
  30. package/components/CountBadge.js +26 -31
  31. package/components/EnrichedCard.js +97 -110
  32. package/components/EnrichedChip.js +105 -130
  33. package/components/EnrichedTypography.js +107 -133
  34. package/components/ErrorBoundary.js +24 -28
  35. package/components/RetryFailedEnrichments.js +9 -10
  36. package/components/SourcePicker.js +49 -57
  37. package/components/actions/ActionForm.js +4 -4
  38. package/components/actions/ExecutePopover.js +50 -64
  39. package/components/actions/ResultModal.js +5 -5
  40. package/components/actions/form/schemaAdapter.js +23 -39
  41. package/components/display/graph/ExpandMoreButton.js +10 -10
  42. package/components/display/graph/elements/NodeCard.js +91 -111
  43. package/components/display/graph/elements/NodeTag.js +13 -15
  44. package/components/display/graph/index.js +202 -261
  45. package/components/display/graph/visualizations/Leaf.js +69 -88
  46. package/components/display/graph/visualizations/cloud/index.js +81 -98
  47. package/components/display/graph/visualizations/icons/BaseIcon.js +21 -26
  48. package/components/display/graph/visualizations/icons/BugIcon.js +12 -12
  49. package/components/display/graph/visualizations/icons/HostIcon.js +12 -12
  50. package/components/display/graph/visualizations/icons/NetworkIcon.js +12 -12
  51. package/components/display/graph/visualizations/icons/ProcessIcon.js +12 -12
  52. package/components/display/graph/visualizations/icons/TargetIcon.js +13 -13
  53. package/components/display/graph/visualizations/icons/index.js +13 -14
  54. package/components/display/graph/visualizations/panels/NodePanel.js +8 -10
  55. package/components/display/graph/visualizations/tree/BundleLine.js +81 -108
  56. package/components/display/graph/visualizations/tree/Triangle.js +13 -13
  57. package/components/display/graph/visualizations/tree/index.js +305 -407
  58. package/components/display/icons/Iconified.js +12 -27
  59. package/components/display/json/index.js +4 -4
  60. package/components/display/markdown/index.js +5761 -8662
  61. package/components/enrichment/EnrichPopover.js +47 -55
  62. package/components/fetchers/Fetcher.js +95 -123
  63. package/components/fetchers/PreviewModal.js +17 -20
  64. package/components/fetchers/StatusChip.js +17 -21
  65. package/components/group/Entry.js +11 -13
  66. package/components/group/Group.js +10 -13
  67. package/components/group/GroupControl.js +66 -77
  68. package/components/stats/QueryStatus.js +31 -41
  69. package/countBy-DOutsa_w.js +8 -0
  70. package/data/event.js +4 -6
  71. package/database/index.js +2 -2
  72. package/debounce-DryYcbJ4.js +56 -0
  73. package/get-Bow1vKwx.js +8 -0
  74. package/groupBy-BheQYl6f.js +8 -0
  75. package/hooks/ClueActionContext.js +7 -7
  76. package/hooks/ClueComponentContext.js +23 -29
  77. package/hooks/ClueConfigProvider.js +12 -14
  78. package/hooks/ClueDatabaseContext.js +13 -19
  79. package/hooks/ClueEnrichContext.js +8 -8
  80. package/hooks/ClueFetcherContext.js +46 -74
  81. package/hooks/ClueGroupContext.js +14 -17
  82. package/hooks/CluePopupContext.js +5 -5
  83. package/hooks/ClueProvider.js +10 -12
  84. package/hooks/selectors.js +10 -21
  85. package/hooks/useActionResult.js +2 -2
  86. package/hooks/useAnnotations.js +29 -45
  87. package/hooks/useClue.js +4 -6
  88. package/hooks/useClueActions.js +3 -3
  89. package/hooks/useClueConfig.js +4 -6
  90. package/hooks/useClueTypeConfig.js +3 -3
  91. package/hooks/useComparator.js +435 -722
  92. package/hooks/useErrors.js +18 -22
  93. package/hooks/useMyHighlights.js +36 -66
  94. package/hooks/useMyLocalStorage.js +37 -66
  95. package/iconify-BBckr5AQ.js +1263 -0
  96. package/icons/Action.js +49 -66
  97. package/icons/Assessment.js +68 -84
  98. package/icons/Context.js +63 -77
  99. package/icons/Opinion.js +65 -77
  100. package/icons/iconMap.js +2 -2
  101. package/identity-ByMq8VxU.js +6 -0
  102. package/index-BXxfAxFt.js +12734 -0
  103. package/index-C15OYgRY.js +358 -0
  104. package/index-E7g8cRyW.js +568 -0
  105. package/index-p5_wX7q1.js +11729 -0
  106. package/index-vF6IyBhz.js +975 -0
  107. package/isEmpty-g47Qir2A.js +21 -0
  108. package/isNil-CjWwlQS3.js +6 -0
  109. package/isObject-B53jY8Qg.js +7 -0
  110. package/isObjectLike-BatpeCIi.js +29 -0
  111. package/isSymbol-C3_SC0Qp.js +8 -0
  112. package/last-7CdUxN0r.js +7 -0
  113. package/main.js +62 -62
  114. package/package.json +1 -1
  115. package/sortBy-ITdmD17L.js +79 -0
  116. package/sumBy-DxJUU2E8.js +8 -0
  117. package/text/Frequency.js +23 -42
  118. package/toFinite-BMy6GObD.js +14 -0
  119. package/toNumber-YVhnnJv4.js +31 -0
  120. package/useClueTypeConfig-DyeBcXQX.js +2214 -0
  121. package/utils/chain.js +64 -91
  122. package/utils/classificationParser.js +256 -519
  123. package/utils/constants.js +10 -35
  124. package/utils/graph.js +45 -72
  125. package/utils/hashUtil.js +7 -7
  126. package/utils/line.js +81 -131
  127. package/utils/loggerUtil.js +3 -5
  128. package/utils/sessionStorage.js +27 -41
  129. package/utils/time.js +423 -423
  130. package/utils/utils.js +9 -9
  131. package/utils/window.js +10 -21
  132. package/utils-BnmI_6N8.js +130 -0
  133. package/ActionForm-ByeOzpc4.js +0 -555
  134. package/AnnotationDetails-DknbKDyl.js +0 -175
  135. package/AnnotationPreview-CQwKs8se.js +0 -188
  136. package/ClueEnrichContext-6NJfXpUB.js +0 -536
  137. package/FlexOne-BSYAhhtG.js +0 -9
  138. package/_Map-kgDsDYxq.js +0 -64
  139. package/_MapCache-DabaaWfq.js +0 -161
  140. package/_Uint8Array-BlVVH1tp.js +0 -129
  141. package/_baseAssignValue-CNbcU6Nb.js +0 -25
  142. package/_baseClone-D3a8Pa4T.js +0 -284
  143. package/_baseExtremum-B1o1zHjR.js +0 -33
  144. package/_baseFlatten-D4huXoEI.js +0 -92
  145. package/_baseGet-BSK_nnoz.js +0 -109
  146. package/_baseIsEqual-B5xLoweL.js +0 -238
  147. package/_baseIteratee-p6Nj07-n.js +0 -126
  148. package/_baseSlice-GAv_YFTT.js +0 -20
  149. package/_baseSum-D0WC1dN0.js +0 -13
  150. package/_baseUniq-CpupKWcL.js +0 -89
  151. package/_commonjsHelpers-DWwsNxpa.js +0 -8
  152. package/_createAggregator-BpVy5xMi.js +0 -63
  153. package/_getPrototype-D1LAdQKO.js +0 -5
  154. package/_getTag-D3ToyefI.js +0 -126
  155. package/cloneDeep-CjP5k9zW.js +0 -8
  156. package/countBy-C69WslUA.js +0 -14
  157. package/debounce-bV0h5FC5.js +0 -92
  158. package/get-D3C3lEU3.js +0 -8
  159. package/groupBy-DC2oOuBN.js +0 -14
  160. package/iconify-CXMreGTg.js +0 -1782
  161. package/identity-CPGTqrE4.js +0 -6
  162. package/index-BDVjGvMI.js +0 -696
  163. package/index-BbPn6-Mw.js +0 -15750
  164. package/index-Bi21Wb23.js +0 -465
  165. package/index-C3lkTD69.js +0 -1172
  166. package/index-CC12Ux-9.js +0 -17654
  167. package/isEmpty-BQkZubqU.js +0 -29
  168. package/isNil-CIubwp4T.js +0 -6
  169. package/isObject-FTY-5JQX.js +0 -7
  170. package/isObjectLike-OAgjjZye.js +0 -48
  171. package/isSymbol-Xd2FsJyp.js +0 -8
  172. package/last-CUCl67Im.js +0 -7
  173. package/sortBy-B-UKp4GT.js +0 -100
  174. package/sumBy-MYkDPHZL.js +0 -8
  175. package/toFinite-Bc55msYj.js +0 -16
  176. package/toNumber-DPxy1FBy.js +0 -39
  177. package/useClueTypeConfig-XvGvIw2S.js +0 -3201
  178. package/utils-7OtvGnmf.js +0 -200
package/utils/utils.js CHANGED
@@ -1,12 +1,12 @@
1
- import { d, b, r, s, t } from "../utils-7OtvGnmf.js";
1
+ import { d as a, b as i, r as p, s as c, t as h } from "../utils-BnmI_6N8.js";
2
2
  import "./time.js";
3
- import "../_Map-kgDsDYxq.js";
4
- import "../isEmpty-BQkZubqU.js";
5
- import "../isNil-CIubwp4T.js";
3
+ import "../_Map-DXNg_Z-q.js";
4
+ import "../isEmpty-g47Qir2A.js";
5
+ import "../isNil-CjWwlQS3.js";
6
6
  export {
7
- d as delay,
8
- b as filterEnrichments,
9
- r as removeEmpty,
10
- s as searchObject,
11
- t as twitterShort
7
+ a as delay,
8
+ i as filterEnrichments,
9
+ p as removeEmpty,
10
+ c as searchObject,
11
+ h as twitterShort
12
12
  };
package/utils/window.js CHANGED
@@ -1,24 +1,13 @@
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);
1
+ const i = (e) => {
2
+ typeof window > "u" || window.dispatchEvent(e);
3
+ }, d = (e, n, t) => {
4
+ typeof window > "u" || window.removeEventListener(e, n, t);
5
+ }, o = (e, n, t) => {
6
+ if (!(typeof window > "u"))
7
+ return window.addEventListener(e, n, t), () => d(e, n, t);
19
8
  };
20
9
  export {
21
- safeAddEventListener,
22
- safeDispatchEvent,
23
- safeRemoveEventListener
10
+ o as safeAddEventListener,
11
+ i as safeDispatchEvent,
12
+ d as safeRemoveEventListener
24
13
  };
@@ -0,0 +1,130 @@
1
+ var P = Object.defineProperty;
2
+ var _ = (t, e, r) => e in t ? P(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;
3
+ var O = (t, e, r) => _(t, typeof e != "symbol" ? e + "" : e, r);
4
+ import { dayjs as d } from "./utils/time.js";
5
+ import { i as h } from "./_Map-DXNg_Z-q.js";
6
+ import { i as g } from "./isEmpty-g47Qir2A.js";
7
+ import { b as K } from "./_baseIsEqual-Cpjtfb3Q.js";
8
+ import { i as N } from "./isNil-CjWwlQS3.js";
9
+ import { i as T, b as q } from "./isObjectLike-BatpeCIi.js";
10
+ import { g as B } from "./_getPrototype-CHAFQYL_.js";
11
+ import { b as C } from "./_baseUniq-tMFmk80M.js";
12
+ function w(t) {
13
+ return t && t.constructor && typeof t.constructor.isBuffer == "function" && t.constructor.isBuffer(t);
14
+ }
15
+ function E(t) {
16
+ return t;
17
+ }
18
+ function A(t, e) {
19
+ e = e || {};
20
+ const r = e.delimiter || ".", c = e.maxDepth, u = e.transformKey || E, a = {};
21
+ function b(l, y, m) {
22
+ m = m || 1, Object.keys(l).forEach(function(o) {
23
+ const n = l[o], i = e.safe && Array.isArray(n), s = Object.prototype.toString.call(n), f = w(n), p = s === "[object Object]" || s === "[object Array]", j = y ? y + r + u(o) : u(o);
24
+ if (!i && !f && p && Object.keys(n).length && (!e.maxDepth || m < c))
25
+ return b(n, j, m + 1);
26
+ a[j] = n;
27
+ });
28
+ }
29
+ return b(t), a;
30
+ }
31
+ function S(t, e) {
32
+ e = e || {};
33
+ const r = e.delimiter || ".", c = e.overwrite || !1, u = e.transformKey || E, a = {};
34
+ if (w(t) || Object.prototype.toString.call(t) !== "[object Object]")
35
+ return t;
36
+ function l(o) {
37
+ const n = Number(o);
38
+ return isNaN(n) || o.indexOf(".") !== -1 || e.object ? o : n;
39
+ }
40
+ function y(o, n, i) {
41
+ return Object.keys(i).reduce(function(s, f) {
42
+ return s[o + r + f] = i[f], s;
43
+ }, n);
44
+ }
45
+ function m(o) {
46
+ const n = Object.prototype.toString.call(o), i = n === "[object Array]", s = n === "[object Object]";
47
+ if (o) {
48
+ if (i)
49
+ return !o.length;
50
+ if (s)
51
+ return !Object.keys(o).length;
52
+ } else return !0;
53
+ }
54
+ return t = Object.keys(t).reduce(function(o, n) {
55
+ const i = Object.prototype.toString.call(t[n]);
56
+ return !(i === "[object Object]" || i === "[object Array]") || m(t[n]) ? (o[n] = t[n], o) : y(
57
+ n,
58
+ o,
59
+ A(t[n], e)
60
+ );
61
+ }, {}), Object.keys(t).forEach(function(o) {
62
+ const n = o.split(r).map(u);
63
+ let i = l(n.shift()), s = l(n[0]), f = a;
64
+ for (; s !== void 0; ) {
65
+ if (i === "__proto__")
66
+ return;
67
+ const p = Object.prototype.toString.call(f[i]), j = p === "[object Object]" || p === "[object Array]";
68
+ if (!c && !j && typeof f[i] < "u")
69
+ return;
70
+ (c && !j || !c && f[i] == null) && (f[i] = typeof s == "number" && !e.object ? [] : {}), f = f[i], n.length > 0 && (i = l(n.shift()), s = l(n[0]));
71
+ }
72
+ f[i] = S(t[o], e);
73
+ }), a;
74
+ }
75
+ var I = "[object Object]", v = Function.prototype, D = Object.prototype, x = v.toString, F = D.hasOwnProperty, G = x.call(Object);
76
+ function L(t) {
77
+ if (!T(t) || q(t) != I)
78
+ return !1;
79
+ var e = B(t);
80
+ if (e === null)
81
+ return !0;
82
+ var r = F.call(e, "constructor") && e.constructor;
83
+ return typeof r == "function" && r instanceof r && x.call(r) == G;
84
+ }
85
+ function R(t, e) {
86
+ return K(t, e);
87
+ }
88
+ function U(t, e) {
89
+ return e = typeof e == "function" ? e : void 0, t && t.length ? C(t, void 0, e) : [];
90
+ }
91
+ const Z = (t) => {
92
+ if (!t || t === "?")
93
+ return "?";
94
+ const e = d(), r = d(t);
95
+ return r.isAfter(e) ? e.fromNow() : r.fromNow();
96
+ }, $ = (t, e = !1) => {
97
+ let r, c;
98
+ class u extends Promise {
99
+ constructor() {
100
+ super(...arguments);
101
+ O(this, "cancel", () => {
102
+ e && c(), clearTimeout(r);
103
+ });
104
+ }
105
+ }
106
+ return new u((a, b) => {
107
+ r = setTimeout(a, t), c = b;
108
+ });
109
+ }, W = (t, e = !1) => e && g(t) ? null : h(t) ? t : Object.fromEntries(
110
+ Object.entries(t ?? {}).filter(([r, c]) => !N(c)).map(([r, c]) => [r, L(c) || h(c) ? W(c, e) : c]).filter(([r, c]) => !!c)
111
+ ), tt = (t, e) => {
112
+ try {
113
+ const r = new RegExp(e, "i");
114
+ return S(
115
+ Object.fromEntries(Object.entries(A(t)).filter(([c, u]) => r.test(c) || r.test(u))) ?? {}
116
+ );
117
+ } catch {
118
+ return t;
119
+ }
120
+ }, et = (t) => U(t, R);
121
+ export {
122
+ L as a,
123
+ et as b,
124
+ $ as d,
125
+ A as f,
126
+ R as i,
127
+ W as r,
128
+ tt as s,
129
+ Z as t
130
+ };