@cccsaurora/clue-ui 1.2.3 → 1.2.4-dev.278
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-BdW0Za1y.js +5956 -0
- package/AnnotationDetails-BHZFzyt-.js +175 -0
- package/AnnotationPreview-DGoyoxRb.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/en/translation.json +1 -1
- package/fr/translation.json +1 -1
- package/get-DSsNkRQs.js +8 -0
- package/groupBy-xqz-n0Vd.js +14 -0
- 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 +4 -2
- 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/WithActionData.d.ts +2 -1
- 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-DlOXqMUx.js +0 -4460
- package/AnnotationDetails-Bk-p0F6h.js +0 -160
- package/AnnotationPreview-jzZvkCxJ.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/index-BK-zfYhR.js
DELETED
|
@@ -1,358 +0,0 @@
|
|
|
1
|
-
var Y = Object.defineProperty;
|
|
2
|
-
var Z = (t, e, n) => e in t ? Y(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
|
|
3
|
-
var _ = (t, e, n) => Z(t, typeof e != "symbol" ? e + "" : e, n);
|
|
4
|
-
import { jsx as f, jsxs as N } from "react/jsx-runtime";
|
|
5
|
-
import { ClickAwayListener as $, TextField as P, InputAdornment as D, Popper as ee, Paper as te, MenuList as ne, MenuItem as se, ListItemText as re, useTheme as ie, Stack as ae, Skeleton as ue } from "@mui/material";
|
|
6
|
-
import { useRef as I, useState as O, useEffect as z, useMemo as T, lazy as oe } from "react";
|
|
7
|
-
import { r as ce, s as he, f as fe } from "./utils-DmwSUrum.js";
|
|
8
|
-
import { ClueComponentContext as L } from "./hooks/ClueComponentContext.js";
|
|
9
|
-
import { useMyLocalStorageItem as j } from "./hooks/useMyLocalStorage.js";
|
|
10
|
-
import { StorageKey as J } from "./utils/constants.js";
|
|
11
|
-
import { u as K } from "./index-Dj5C04IX.js";
|
|
12
|
-
const de = "Enter", le = "Escape", me = "ArrowLeft", pe = "ArrowUp", _e = "ArrowRight", ye = "ArrowDown", ke = "Backspace", be = " ";
|
|
13
|
-
function x(t, e) {
|
|
14
|
-
return t === e;
|
|
15
|
-
}
|
|
16
|
-
function xe(t) {
|
|
17
|
-
return x(t, pe);
|
|
18
|
-
}
|
|
19
|
-
function ge(t) {
|
|
20
|
-
return x(t, ye);
|
|
21
|
-
}
|
|
22
|
-
function we(t) {
|
|
23
|
-
return x(t, me);
|
|
24
|
-
}
|
|
25
|
-
function Ie(t) {
|
|
26
|
-
return x(t, _e);
|
|
27
|
-
}
|
|
28
|
-
function Ae(t) {
|
|
29
|
-
return x(t, le);
|
|
30
|
-
}
|
|
31
|
-
function Re(t) {
|
|
32
|
-
return x(t, de);
|
|
33
|
-
}
|
|
34
|
-
function Ee(t) {
|
|
35
|
-
return x(t, ke);
|
|
36
|
-
}
|
|
37
|
-
function Se(t) {
|
|
38
|
-
return x(t, be);
|
|
39
|
-
}
|
|
40
|
-
function V(t) {
|
|
41
|
-
return {
|
|
42
|
-
key: t.key,
|
|
43
|
-
isCtrl: t.ctrlKey,
|
|
44
|
-
isEnter: Re(t.key),
|
|
45
|
-
isSpace: Se(t.key),
|
|
46
|
-
isBackspace: Ee(t.key),
|
|
47
|
-
isEscape: Ae(t.key),
|
|
48
|
-
isArrowLeft: we(t.key),
|
|
49
|
-
isArrowRight: Ie(t.key),
|
|
50
|
-
isArrowUp: xe(t.key),
|
|
51
|
-
isArrowDown: ge(t.key)
|
|
52
|
-
};
|
|
53
|
-
}
|
|
54
|
-
class Ce {
|
|
55
|
-
constructor() {
|
|
56
|
-
_(this, "_phrase", null);
|
|
57
|
-
_(this, "_buffer", null);
|
|
58
|
-
_(this, "_tokens", null);
|
|
59
|
-
_(this, "_consumers", null);
|
|
60
|
-
_(this, "_consumer", null);
|
|
61
|
-
_(this, "_startIndex", 0);
|
|
62
|
-
_(this, "_endIndex", -1);
|
|
63
|
-
}
|
|
64
|
-
find(e, n) {
|
|
65
|
-
const r = n.findIndex((h) => h.startIndex <= e && e <= h.endIndex), s = n.at(r);
|
|
66
|
-
return { index: r, token: s };
|
|
67
|
-
}
|
|
68
|
-
parse(e, n = 0) {
|
|
69
|
-
this._phrase = e, this._buffer = [], this._tokens = [], this._consumers = this.consumers(), this._consumer = null, this._startIndex = 0, this._endIndex = -1;
|
|
70
|
-
for (let o = 0; o < this._phrase.length; o++) {
|
|
71
|
-
this._endIndex += 1;
|
|
72
|
-
const k = this._phrase[o];
|
|
73
|
-
this._buffer.push(k);
|
|
74
|
-
let l = !1;
|
|
75
|
-
if (this._consumer || (this._consumer = this.lock(), this._consumer && (l = !0, this._consumer.init(this._buffer, this))), this._consumer) {
|
|
76
|
-
l ? l = !1 : this._consumer.append(k, this);
|
|
77
|
-
const m = this._consumer.consume(this);
|
|
78
|
-
m && (this._tokens.push(m), this._buffer = [], this._consumer = null, this._startIndex = this._endIndex + 1);
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
this._tokens.push({ type: "eop", startIndex: e.length, endIndex: e.length, value: "" });
|
|
82
|
-
const r = this._tokens.flatMap((o) => o.children && o.children.length > 0 ? o.children : [o]), { token: s, index: h } = this.find(n, this._tokens), { token: c, index: y } = this.find(n, r), d = n === c.startIndex && r[y - 1] ? r[y - 1] : c;
|
|
83
|
-
return {
|
|
84
|
-
cursor: n,
|
|
85
|
-
parentIndex: h,
|
|
86
|
-
parent: s,
|
|
87
|
-
currentIndex: y,
|
|
88
|
-
current: c,
|
|
89
|
-
suggest: {
|
|
90
|
-
token: d,
|
|
91
|
-
parent: this.find(d.startIndex, this._tokens).token,
|
|
92
|
-
value: d.value.substring(0, n - d.startIndex)
|
|
93
|
-
},
|
|
94
|
-
tokens: this._tokens
|
|
95
|
-
};
|
|
96
|
-
}
|
|
97
|
-
lock() {
|
|
98
|
-
return this._consumers.find((e) => e.lock(this));
|
|
99
|
-
}
|
|
100
|
-
buffer() {
|
|
101
|
-
return this._buffer;
|
|
102
|
-
}
|
|
103
|
-
bufferValue() {
|
|
104
|
-
return this._buffer.join("");
|
|
105
|
-
}
|
|
106
|
-
start() {
|
|
107
|
-
return this._startIndex;
|
|
108
|
-
}
|
|
109
|
-
end() {
|
|
110
|
-
return this._endIndex;
|
|
111
|
-
}
|
|
112
|
-
ahead(e) {
|
|
113
|
-
const n = this._endIndex + 1;
|
|
114
|
-
return e ? this._phrase.slice(n, n + e) : this._phrase.substring(n);
|
|
115
|
-
}
|
|
116
|
-
behind(e) {
|
|
117
|
-
return e ? this.bufferValue().slice(-e) : this.bufferValue();
|
|
118
|
-
}
|
|
119
|
-
behindEndsWithAny(e, ...n) {
|
|
120
|
-
const r = e ? this.behind().trimEnd() : this.behind();
|
|
121
|
-
return n.some((s) => r.endsWith(s));
|
|
122
|
-
}
|
|
123
|
-
testBehind(e) {
|
|
124
|
-
return e.test(this.behind());
|
|
125
|
-
}
|
|
126
|
-
aheadStartsWithAny(e, ...n) {
|
|
127
|
-
const r = e ? this.ahead().trimStart() : this.ahead();
|
|
128
|
-
return n.some((s) => r.startsWith(s));
|
|
129
|
-
}
|
|
130
|
-
aheadIsEmpty(e = !1) {
|
|
131
|
-
return e ? this.ahead().trim().length === 0 : this.ahead().length === 0;
|
|
132
|
-
}
|
|
133
|
-
testAhead(e) {
|
|
134
|
-
return e.test(this.ahead());
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
class B {
|
|
138
|
-
constructor() {
|
|
139
|
-
_(this, "_buffer", []);
|
|
140
|
-
}
|
|
141
|
-
reset() {
|
|
142
|
-
this._buffer = [];
|
|
143
|
-
}
|
|
144
|
-
init(e, n) {
|
|
145
|
-
this._buffer = [...e];
|
|
146
|
-
}
|
|
147
|
-
append(e, n) {
|
|
148
|
-
this._buffer.push(e);
|
|
149
|
-
}
|
|
150
|
-
bufferValue() {
|
|
151
|
-
return this._buffer.join("");
|
|
152
|
-
}
|
|
153
|
-
endsWithAny(...e) {
|
|
154
|
-
const n = this.bufferValue();
|
|
155
|
-
return e.some((r) => n.endsWith(r));
|
|
156
|
-
}
|
|
157
|
-
test(e) {
|
|
158
|
-
return e.test(this.bufferValue());
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
class Te extends B {
|
|
162
|
-
lock(e) {
|
|
163
|
-
return e.bufferValue().match(/\s/) && e.ahead(1) !== " ";
|
|
164
|
-
}
|
|
165
|
-
consume(e) {
|
|
166
|
-
return e.ahead(1) !== " " ? {
|
|
167
|
-
type: "whitespace",
|
|
168
|
-
startIndex: e.start(),
|
|
169
|
-
endIndex: e.end(),
|
|
170
|
-
value: this._buffer.join("")
|
|
171
|
-
} : null;
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
class Oe extends B {
|
|
175
|
-
lock(e) {
|
|
176
|
-
return !e.bufferValue().match(/\s/) && (e.ahead(1) === " " || e.ahead(1) === "");
|
|
177
|
-
}
|
|
178
|
-
consume(e) {
|
|
179
|
-
return e.ahead(1) === " " || e.aheadIsEmpty(!0) ? {
|
|
180
|
-
type: "word",
|
|
181
|
-
startIndex: e.start(),
|
|
182
|
-
endIndex: e.end(),
|
|
183
|
-
value: this._buffer.join("")
|
|
184
|
-
} : null;
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
|
-
class We extends Ce {
|
|
188
|
-
consumers() {
|
|
189
|
-
return [new Oe(), new Te()];
|
|
190
|
-
}
|
|
191
|
-
}
|
|
192
|
-
class M {
|
|
193
|
-
constructor(e) {
|
|
194
|
-
this.suggestions = e;
|
|
195
|
-
}
|
|
196
|
-
suggest(e) {
|
|
197
|
-
return this.suggestions.filter((n) => n.indexOf(e.suggest.value) > -1);
|
|
198
|
-
}
|
|
199
|
-
}
|
|
200
|
-
function ve({
|
|
201
|
-
value: t = "",
|
|
202
|
-
variant: e = "outlined",
|
|
203
|
-
suggestions: n = [],
|
|
204
|
-
lexer: r,
|
|
205
|
-
suggester: s,
|
|
206
|
-
startAdornment: h,
|
|
207
|
-
endAdornment: c,
|
|
208
|
-
onChange: y,
|
|
209
|
-
onKeyDown: d,
|
|
210
|
-
...o
|
|
211
|
-
}) {
|
|
212
|
-
const k = I(), l = I(), m = I(), W = I(r || new We()), A = I(), R = I(s || new M(n)), [w, g] = O(!1), [b, S] = O(n);
|
|
213
|
-
z(() => {
|
|
214
|
-
R.current = s || new M(n);
|
|
215
|
-
}, [s, n]);
|
|
216
|
-
const C = (i, p = 0) => {
|
|
217
|
-
let u = l.current.querySelector("input").selectionStart + p;
|
|
218
|
-
return u = u < 0 ? 0 : u > i.length ? i.length : u, A.current = W.current.parse(i, u), A.current;
|
|
219
|
-
}, E = (i, p = 0) => {
|
|
220
|
-
const u = R.current.suggest(C(i, p));
|
|
221
|
-
S((u == null ? void 0 : u.length) > 0 ? u : [...n]);
|
|
222
|
-
}, a = (i) => {
|
|
223
|
-
y(i.target.value);
|
|
224
|
-
}, q = (i) => {
|
|
225
|
-
const p = V(i), { isEnter: u, isCtrl: H, isSpace: G, isEscape: Q, isArrowDown: X } = p;
|
|
226
|
-
X ? (i.preventDefault(), m.current.focus()) : H && G ? (g(!0), E(t)) : Q && g(!w), u && w && b.length === 1 ? (v(b[0]), i.preventDefault()) : d && d(p);
|
|
227
|
-
}, U = (i) => {
|
|
228
|
-
w && E(i.target.value);
|
|
229
|
-
}, F = (i) => {
|
|
230
|
-
const { isEscape: p } = V(i);
|
|
231
|
-
p && (l.current.focus(), g(!1));
|
|
232
|
-
}, v = (i) => {
|
|
233
|
-
const { suggest: p } = A.current, u = l.current.querySelector("input");
|
|
234
|
-
u.focus(), u.setSelectionRange(p.token.startIndex, p.token.endIndex + 1), document.execCommand("insertText", !1, i), g(!1);
|
|
235
|
-
};
|
|
236
|
-
return /* @__PURE__ */ f($, { onClickAway: () => g(!1), children: /* @__PURE__ */ N("div", { ref: k, style: { position: "relative" }, children: [
|
|
237
|
-
/* @__PURE__ */ f(
|
|
238
|
-
P,
|
|
239
|
-
{
|
|
240
|
-
ref: l,
|
|
241
|
-
...o,
|
|
242
|
-
fullWidth: !0,
|
|
243
|
-
autoComplete: "off",
|
|
244
|
-
value: t,
|
|
245
|
-
variant: e,
|
|
246
|
-
onChange: a,
|
|
247
|
-
onKeyDown: q,
|
|
248
|
-
InputProps: {
|
|
249
|
-
...o.InputProps,
|
|
250
|
-
onSelectCapture: U,
|
|
251
|
-
startAdornment: h && /* @__PURE__ */ f(D, { position: "start", children: h }),
|
|
252
|
-
endAdornment: c && /* @__PURE__ */ f(D, { position: "end", children: c })
|
|
253
|
-
}
|
|
254
|
-
}
|
|
255
|
-
),
|
|
256
|
-
/* @__PURE__ */ f(
|
|
257
|
-
ee,
|
|
258
|
-
{
|
|
259
|
-
anchorEl: k.current,
|
|
260
|
-
style: { width: "100%", zIndex: 100 },
|
|
261
|
-
open: w && b.length > 0,
|
|
262
|
-
disablePortal: !0,
|
|
263
|
-
children: /* @__PURE__ */ f(
|
|
264
|
-
te,
|
|
265
|
-
{
|
|
266
|
-
elevation: 2,
|
|
267
|
-
sx: { maxHeight: 200, overflow: "auto", borderTopRightRadius: 0, borderTopLeftRadius: 0 },
|
|
268
|
-
children: /* @__PURE__ */ f(
|
|
269
|
-
ne,
|
|
270
|
-
{
|
|
271
|
-
ref: m,
|
|
272
|
-
onKeyDown: F,
|
|
273
|
-
sx: {
|
|
274
|
-
"&:focus": {
|
|
275
|
-
outline: "none"
|
|
276
|
-
}
|
|
277
|
-
},
|
|
278
|
-
children: b == null ? void 0 : b.map((i) => /* @__PURE__ */ f(se, { onClick: () => v(i), children: /* @__PURE__ */ f(re, { children: i }) }, i))
|
|
279
|
-
}
|
|
280
|
-
)
|
|
281
|
-
}
|
|
282
|
-
)
|
|
283
|
-
}
|
|
284
|
-
)
|
|
285
|
-
] }) });
|
|
286
|
-
}
|
|
287
|
-
const Be = ({ data: t, collapse: e = !0, hideSearch: n = !1, forceCompact: r = !1, slotProps: s }) => {
|
|
288
|
-
var S, C, E;
|
|
289
|
-
const h = ie(), [c] = j(J.COMPACT_JSON), [y] = j(J.FLATTEN_JSON), d = K(L, (a) => a == null ? void 0 : a.ReactJson), { t: o } = K(L, (a) => a == null ? void 0 : a.i18next), [k, l] = O(null), [m, W] = O(""), A = T(() => h.palette.mode === "dark", [h]), R = T(() => ce(t, c || r), [c, t, r]), w = T(() => {
|
|
290
|
-
const a = he(R, m);
|
|
291
|
-
return y ? fe(a) : a;
|
|
292
|
-
}, [R, y, m]), g = T(() => {
|
|
293
|
-
try {
|
|
294
|
-
return new RegExp(m), !1;
|
|
295
|
-
} catch {
|
|
296
|
-
return !0;
|
|
297
|
-
}
|
|
298
|
-
}, [m]);
|
|
299
|
-
z(() => {
|
|
300
|
-
l(d ? () => d : oe(() => import("@microlink/react-json-view")));
|
|
301
|
-
}, [d]);
|
|
302
|
-
const b = (a) => a.name !== "root" && a.type !== "object" || a.namespace.length > 3;
|
|
303
|
-
return t ? /* @__PURE__ */ N(
|
|
304
|
-
ae,
|
|
305
|
-
{
|
|
306
|
-
direction: "column",
|
|
307
|
-
spacing: 1,
|
|
308
|
-
...s == null ? void 0 : s.stack,
|
|
309
|
-
sx: {
|
|
310
|
-
"& > div:first-of-type": { mt: 1, mr: 0.5 },
|
|
311
|
-
...Array.isArray((S = s == null ? void 0 : s.stack) == null ? void 0 : S.sx) ? (C = s == null ? void 0 : s.stack) == null ? void 0 : C.sx : [(E = s == null ? void 0 : s.stack) == null ? void 0 : E.sx]
|
|
312
|
-
},
|
|
313
|
-
children: [
|
|
314
|
-
!n && /* @__PURE__ */ f(
|
|
315
|
-
ve,
|
|
316
|
-
{
|
|
317
|
-
value: m,
|
|
318
|
-
onChange: W,
|
|
319
|
-
size: "small",
|
|
320
|
-
error: g,
|
|
321
|
-
label: o("json.viewer.search.label"),
|
|
322
|
-
placeholder: o("json.viewer.search.prompt")
|
|
323
|
-
}
|
|
324
|
-
),
|
|
325
|
-
k && /* @__PURE__ */ f(
|
|
326
|
-
k,
|
|
327
|
-
{
|
|
328
|
-
src: w,
|
|
329
|
-
theme: A ? "summerfruit" : "summerfruit:inverted",
|
|
330
|
-
indentWidth: 2,
|
|
331
|
-
displayDataTypes: !c && !r,
|
|
332
|
-
displayObjectSize: !c && !r,
|
|
333
|
-
shouldCollapse: e ? b : !1,
|
|
334
|
-
quotesOnKeys: !1,
|
|
335
|
-
style: {
|
|
336
|
-
flex: 1,
|
|
337
|
-
overflow: "auto",
|
|
338
|
-
height: "100%",
|
|
339
|
-
fontSize: c || r ? "small" : "smaller",
|
|
340
|
-
borderRadius: h.shape.borderRadius,
|
|
341
|
-
padding: h.spacing(1)
|
|
342
|
-
},
|
|
343
|
-
enableClipboard: (a) => {
|
|
344
|
-
typeof a.src == "string" ? navigator.clipboard.writeText(a.src) : navigator.clipboard.writeText(JSON.stringify(a.src));
|
|
345
|
-
},
|
|
346
|
-
// Type declaration is wrong - this is a valid prop
|
|
347
|
-
displayArrayKey: !c && !r,
|
|
348
|
-
...s == null ? void 0 : s.json
|
|
349
|
-
}
|
|
350
|
-
)
|
|
351
|
-
]
|
|
352
|
-
}
|
|
353
|
-
) : /* @__PURE__ */ f(ue, { width: "100%", height: "95%", variant: "rounded" });
|
|
354
|
-
};
|
|
355
|
-
export {
|
|
356
|
-
Be as J,
|
|
357
|
-
V as p
|
|
358
|
-
};
|