@localstack/appinspector-ui 1.0.73 → 1.0.74
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/dist/index.cjs +199 -524
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +60 -384
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -33,198 +33,6 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
33
33
|
));
|
|
34
34
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
35
35
|
|
|
36
|
-
// node_modules/framer-motion/node_modules/@emotion/memoize/dist/memoize.browser.esm.js
|
|
37
|
-
function memoize(fn) {
|
|
38
|
-
var cache2 = {};
|
|
39
|
-
return function(arg) {
|
|
40
|
-
if (cache2[arg] === void 0) cache2[arg] = fn(arg);
|
|
41
|
-
return cache2[arg];
|
|
42
|
-
};
|
|
43
|
-
}
|
|
44
|
-
var memoize_browser_esm_default;
|
|
45
|
-
var init_memoize_browser_esm = __esm({
|
|
46
|
-
"node_modules/framer-motion/node_modules/@emotion/memoize/dist/memoize.browser.esm.js"() {
|
|
47
|
-
"use strict";
|
|
48
|
-
memoize_browser_esm_default = memoize;
|
|
49
|
-
}
|
|
50
|
-
});
|
|
51
|
-
|
|
52
|
-
// node_modules/framer-motion/node_modules/@emotion/is-prop-valid/dist/is-prop-valid.browser.esm.js
|
|
53
|
-
var is_prop_valid_browser_esm_exports = {};
|
|
54
|
-
__export(is_prop_valid_browser_esm_exports, {
|
|
55
|
-
default: () => is_prop_valid_browser_esm_default
|
|
56
|
-
});
|
|
57
|
-
var reactPropsRegex, index, is_prop_valid_browser_esm_default;
|
|
58
|
-
var init_is_prop_valid_browser_esm = __esm({
|
|
59
|
-
"node_modules/framer-motion/node_modules/@emotion/is-prop-valid/dist/is-prop-valid.browser.esm.js"() {
|
|
60
|
-
"use strict";
|
|
61
|
-
init_memoize_browser_esm();
|
|
62
|
-
reactPropsRegex = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|inert|itemProp|itemScope|itemType|itemID|itemRef|on|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/;
|
|
63
|
-
index = memoize_browser_esm_default(
|
|
64
|
-
function(prop) {
|
|
65
|
-
return reactPropsRegex.test(prop) || prop.charCodeAt(0) === 111 && prop.charCodeAt(1) === 110 && prop.charCodeAt(2) < 91;
|
|
66
|
-
}
|
|
67
|
-
/* Z+1 */
|
|
68
|
-
);
|
|
69
|
-
is_prop_valid_browser_esm_default = index;
|
|
70
|
-
}
|
|
71
|
-
});
|
|
72
|
-
|
|
73
|
-
// node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js
|
|
74
|
-
var require_use_sync_external_store_shim_development = __commonJS({
|
|
75
|
-
"node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js"(exports) {
|
|
76
|
-
"use strict";
|
|
77
|
-
(function() {
|
|
78
|
-
function is(x2, y) {
|
|
79
|
-
return x2 === y && (0 !== x2 || 1 / x2 === 1 / y) || x2 !== x2 && y !== y;
|
|
80
|
-
}
|
|
81
|
-
function useSyncExternalStore$2(subscribe, getSnapshot) {
|
|
82
|
-
didWarnOld18Alpha || void 0 === React124.startTransition || (didWarnOld18Alpha = true, console.error(
|
|
83
|
-
"You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."
|
|
84
|
-
));
|
|
85
|
-
var value = getSnapshot();
|
|
86
|
-
if (!didWarnUncachedGetSnapshot) {
|
|
87
|
-
var cachedValue = getSnapshot();
|
|
88
|
-
objectIs(value, cachedValue) || (console.error(
|
|
89
|
-
"The result of getSnapshot should be cached to avoid an infinite loop"
|
|
90
|
-
), didWarnUncachedGetSnapshot = true);
|
|
91
|
-
}
|
|
92
|
-
cachedValue = useState16({
|
|
93
|
-
inst: { value, getSnapshot }
|
|
94
|
-
});
|
|
95
|
-
var inst = cachedValue[0].inst, forceUpdate = cachedValue[1];
|
|
96
|
-
useLayoutEffect2(
|
|
97
|
-
function() {
|
|
98
|
-
inst.value = value;
|
|
99
|
-
inst.getSnapshot = getSnapshot;
|
|
100
|
-
checkIfSnapshotChanged(inst) && forceUpdate({ inst });
|
|
101
|
-
},
|
|
102
|
-
[subscribe, value, getSnapshot]
|
|
103
|
-
);
|
|
104
|
-
useEffect20(
|
|
105
|
-
function() {
|
|
106
|
-
checkIfSnapshotChanged(inst) && forceUpdate({ inst });
|
|
107
|
-
return subscribe(function() {
|
|
108
|
-
checkIfSnapshotChanged(inst) && forceUpdate({ inst });
|
|
109
|
-
});
|
|
110
|
-
},
|
|
111
|
-
[subscribe]
|
|
112
|
-
);
|
|
113
|
-
useDebugValue2(value);
|
|
114
|
-
return value;
|
|
115
|
-
}
|
|
116
|
-
function checkIfSnapshotChanged(inst) {
|
|
117
|
-
var latestGetSnapshot = inst.getSnapshot;
|
|
118
|
-
inst = inst.value;
|
|
119
|
-
try {
|
|
120
|
-
var nextValue = latestGetSnapshot();
|
|
121
|
-
return !objectIs(inst, nextValue);
|
|
122
|
-
} catch (error) {
|
|
123
|
-
return true;
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
function useSyncExternalStore$1(subscribe, getSnapshot) {
|
|
127
|
-
return getSnapshot();
|
|
128
|
-
}
|
|
129
|
-
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
|
|
130
|
-
var React124 = require("react"), objectIs = "function" === typeof Object.is ? Object.is : is, useState16 = React124.useState, useEffect20 = React124.useEffect, useLayoutEffect2 = React124.useLayoutEffect, useDebugValue2 = React124.useDebugValue, didWarnOld18Alpha = false, didWarnUncachedGetSnapshot = false, shim = "undefined" === typeof window || "undefined" === typeof window.document || "undefined" === typeof window.document.createElement ? useSyncExternalStore$1 : useSyncExternalStore$2;
|
|
131
|
-
exports.useSyncExternalStore = void 0 !== React124.useSyncExternalStore ? React124.useSyncExternalStore : shim;
|
|
132
|
-
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
|
|
133
|
-
})();
|
|
134
|
-
}
|
|
135
|
-
});
|
|
136
|
-
|
|
137
|
-
// node_modules/use-sync-external-store/shim/index.js
|
|
138
|
-
var require_shim = __commonJS({
|
|
139
|
-
"node_modules/use-sync-external-store/shim/index.js"(exports, module2) {
|
|
140
|
-
"use strict";
|
|
141
|
-
if (false) {
|
|
142
|
-
module2.exports = null;
|
|
143
|
-
} else {
|
|
144
|
-
module2.exports = require_use_sync_external_store_shim_development();
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
});
|
|
148
|
-
|
|
149
|
-
// node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js
|
|
150
|
-
var require_with_selector_development = __commonJS({
|
|
151
|
-
"node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js"(exports) {
|
|
152
|
-
"use strict";
|
|
153
|
-
(function() {
|
|
154
|
-
function is(x2, y) {
|
|
155
|
-
return x2 === y && (0 !== x2 || 1 / x2 === 1 / y) || x2 !== x2 && y !== y;
|
|
156
|
-
}
|
|
157
|
-
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
|
|
158
|
-
var React124 = require("react"), shim = require_shim(), objectIs = "function" === typeof Object.is ? Object.is : is, useSyncExternalStore = shim.useSyncExternalStore, useRef15 = React124.useRef, useEffect20 = React124.useEffect, useMemo13 = React124.useMemo, useDebugValue2 = React124.useDebugValue;
|
|
159
|
-
exports.useSyncExternalStoreWithSelector = function(subscribe, getSnapshot, getServerSnapshot, selector2, isEqual) {
|
|
160
|
-
var instRef = useRef15(null);
|
|
161
|
-
if (null === instRef.current) {
|
|
162
|
-
var inst = { hasValue: false, value: null };
|
|
163
|
-
instRef.current = inst;
|
|
164
|
-
} else inst = instRef.current;
|
|
165
|
-
instRef = useMemo13(
|
|
166
|
-
function() {
|
|
167
|
-
function memoizedSelector(nextSnapshot) {
|
|
168
|
-
if (!hasMemo) {
|
|
169
|
-
hasMemo = true;
|
|
170
|
-
memoizedSnapshot = nextSnapshot;
|
|
171
|
-
nextSnapshot = selector2(nextSnapshot);
|
|
172
|
-
if (void 0 !== isEqual && inst.hasValue) {
|
|
173
|
-
var currentSelection = inst.value;
|
|
174
|
-
if (isEqual(currentSelection, nextSnapshot))
|
|
175
|
-
return memoizedSelection = currentSelection;
|
|
176
|
-
}
|
|
177
|
-
return memoizedSelection = nextSnapshot;
|
|
178
|
-
}
|
|
179
|
-
currentSelection = memoizedSelection;
|
|
180
|
-
if (objectIs(memoizedSnapshot, nextSnapshot))
|
|
181
|
-
return currentSelection;
|
|
182
|
-
var nextSelection = selector2(nextSnapshot);
|
|
183
|
-
if (void 0 !== isEqual && isEqual(currentSelection, nextSelection))
|
|
184
|
-
return memoizedSnapshot = nextSnapshot, currentSelection;
|
|
185
|
-
memoizedSnapshot = nextSnapshot;
|
|
186
|
-
return memoizedSelection = nextSelection;
|
|
187
|
-
}
|
|
188
|
-
var hasMemo = false, memoizedSnapshot, memoizedSelection, maybeGetServerSnapshot = void 0 === getServerSnapshot ? null : getServerSnapshot;
|
|
189
|
-
return [
|
|
190
|
-
function() {
|
|
191
|
-
return memoizedSelector(getSnapshot());
|
|
192
|
-
},
|
|
193
|
-
null === maybeGetServerSnapshot ? void 0 : function() {
|
|
194
|
-
return memoizedSelector(maybeGetServerSnapshot());
|
|
195
|
-
}
|
|
196
|
-
];
|
|
197
|
-
},
|
|
198
|
-
[getSnapshot, getServerSnapshot, selector2, isEqual]
|
|
199
|
-
);
|
|
200
|
-
var value = useSyncExternalStore(subscribe, instRef[0], instRef[1]);
|
|
201
|
-
useEffect20(
|
|
202
|
-
function() {
|
|
203
|
-
inst.hasValue = true;
|
|
204
|
-
inst.value = value;
|
|
205
|
-
},
|
|
206
|
-
[value]
|
|
207
|
-
);
|
|
208
|
-
useDebugValue2(value);
|
|
209
|
-
return value;
|
|
210
|
-
};
|
|
211
|
-
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
|
|
212
|
-
})();
|
|
213
|
-
}
|
|
214
|
-
});
|
|
215
|
-
|
|
216
|
-
// node_modules/use-sync-external-store/shim/with-selector.js
|
|
217
|
-
var require_with_selector = __commonJS({
|
|
218
|
-
"node_modules/use-sync-external-store/shim/with-selector.js"(exports, module2) {
|
|
219
|
-
"use strict";
|
|
220
|
-
if (false) {
|
|
221
|
-
module2.exports = null;
|
|
222
|
-
} else {
|
|
223
|
-
module2.exports = require_with_selector_development();
|
|
224
|
-
}
|
|
225
|
-
}
|
|
226
|
-
});
|
|
227
|
-
|
|
228
36
|
// node_modules/toggle-selection/index.js
|
|
229
37
|
var require_toggle_selection = __commonJS({
|
|
230
38
|
"node_modules/toggle-selection/index.js"(exports, module2) {
|
|
@@ -680,7 +488,7 @@ module.exports = __toCommonJS(index_exports);
|
|
|
680
488
|
|
|
681
489
|
// src/pages/spans-list-page.tsx
|
|
682
490
|
var import_material20 = require("@mui/material");
|
|
683
|
-
var
|
|
491
|
+
var import_react63 = require("react");
|
|
684
492
|
|
|
685
493
|
// src/components/spans-list/spans-list.tsx
|
|
686
494
|
var import_material5 = require("@mui/material");
|
|
@@ -748,7 +556,7 @@ function memo(getDeps, fn, opts) {
|
|
|
748
556
|
let depTime;
|
|
749
557
|
if (opts.key && opts.debug) depTime = Date.now();
|
|
750
558
|
const newDeps = getDeps(depArgs);
|
|
751
|
-
const depsChanged = newDeps.length !== deps.length || newDeps.some((dep,
|
|
559
|
+
const depsChanged = newDeps.length !== deps.length || newDeps.some((dep, index) => deps[index] !== dep);
|
|
752
560
|
if (!depsChanged) {
|
|
753
561
|
return result;
|
|
754
562
|
}
|
|
@@ -1048,9 +856,9 @@ function buildHeaderGroups(allColumns, columnsToGroup, table, headerFamily) {
|
|
|
1048
856
|
createHeaderGroup(pendingParentHeaders, depth - 1);
|
|
1049
857
|
}
|
|
1050
858
|
};
|
|
1051
|
-
const bottomHeaders = columnsToGroup.map((column,
|
|
859
|
+
const bottomHeaders = columnsToGroup.map((column, index) => createHeader(table, column, {
|
|
1052
860
|
depth: maxDepth2,
|
|
1053
|
-
index
|
|
861
|
+
index
|
|
1054
862
|
}));
|
|
1055
863
|
createHeaderGroup(bottomHeaders, maxDepth2 - 1);
|
|
1056
864
|
headerGroups.reverse();
|
|
@@ -3197,9 +3005,9 @@ function createTable(options) {
|
|
|
3197
3005
|
setState: (updater) => {
|
|
3198
3006
|
table.options.onStateChange == null || table.options.onStateChange(updater);
|
|
3199
3007
|
},
|
|
3200
|
-
_getRowId: (row,
|
|
3008
|
+
_getRowId: (row, index, parent) => {
|
|
3201
3009
|
var _table$options$getRow;
|
|
3202
|
-
return (_table$options$getRow = table.options.getRowId == null ? void 0 : table.options.getRowId(row,
|
|
3010
|
+
return (_table$options$getRow = table.options.getRowId == null ? void 0 : table.options.getRowId(row, index, parent)) != null ? _table$options$getRow : `${parent ? [parent.id, index].join(".") : index}`;
|
|
3203
3011
|
},
|
|
3204
3012
|
getCoreRowModel: () => {
|
|
3205
3013
|
if (!table._getCoreRowModel) {
|
|
@@ -3290,8 +3098,8 @@ function createTable(options) {
|
|
|
3290
3098
|
}
|
|
3291
3099
|
};
|
|
3292
3100
|
Object.assign(table, coreInstance);
|
|
3293
|
-
for (let
|
|
3294
|
-
const feature = table._features[
|
|
3101
|
+
for (let index = 0; index < table._features.length; index++) {
|
|
3102
|
+
const feature = table._features[index];
|
|
3295
3103
|
feature == null || feature.createTable == null || feature.createTable(table);
|
|
3296
3104
|
}
|
|
3297
3105
|
return table;
|
|
@@ -4603,7 +4411,7 @@ function loadExternalIsValidProp(isValidProp) {
|
|
|
4603
4411
|
};
|
|
4604
4412
|
}
|
|
4605
4413
|
try {
|
|
4606
|
-
loadExternalIsValidProp((
|
|
4414
|
+
loadExternalIsValidProp(require("@emotion/is-prop-valid").default);
|
|
4607
4415
|
} catch (_a2) {
|
|
4608
4416
|
}
|
|
4609
4417
|
function filterProps(props, isDom, forwardMotionProps) {
|
|
@@ -4870,8 +4678,8 @@ function makeLatestValues(props, context, presenceContext, scrapeMotionValues) {
|
|
|
4870
4678
|
for (var key2 in target) {
|
|
4871
4679
|
var valueTarget = target[key2];
|
|
4872
4680
|
if (Array.isArray(valueTarget)) {
|
|
4873
|
-
var
|
|
4874
|
-
valueTarget = valueTarget[
|
|
4681
|
+
var index = initialAnimationIsBlocked ? valueTarget.length - 1 : 0;
|
|
4682
|
+
valueTarget = valueTarget[index];
|
|
4875
4683
|
}
|
|
4876
4684
|
if (valueTarget !== null) {
|
|
4877
4685
|
values[key2] = valueTarget;
|
|
@@ -5682,9 +5490,9 @@ function createRenderStep(runNextFrame2) {
|
|
|
5682
5490
|
return callback;
|
|
5683
5491
|
},
|
|
5684
5492
|
cancel: (callback) => {
|
|
5685
|
-
const
|
|
5686
|
-
if (
|
|
5687
|
-
toRunNextFrame.splice(
|
|
5493
|
+
const index = toRunNextFrame.indexOf(callback);
|
|
5494
|
+
if (index !== -1)
|
|
5495
|
+
toRunNextFrame.splice(index, 1);
|
|
5688
5496
|
toKeepAlive.delete(callback);
|
|
5689
5497
|
},
|
|
5690
5498
|
process: (frameData) => {
|
|
@@ -6546,8 +6354,8 @@ function addUniqueItem(arr, item) {
|
|
|
6546
6354
|
arr.indexOf(item) === -1 && arr.push(item);
|
|
6547
6355
|
}
|
|
6548
6356
|
function removeItem(arr, item) {
|
|
6549
|
-
var
|
|
6550
|
-
|
|
6357
|
+
var index = arr.indexOf(item);
|
|
6358
|
+
index > -1 && arr.splice(index, 1);
|
|
6551
6359
|
}
|
|
6552
6360
|
|
|
6553
6361
|
// node_modules/framer-motion/dist/es/utils/subscription-manager.mjs
|
|
@@ -13100,8 +12908,8 @@ var SpansDataGrid = ({
|
|
|
13100
12908
|
hasRows && !hasMoreForward && /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(StreamBoundaryRow, { colSpan: columnCount, label: LABEL_END_OF_STREAM }),
|
|
13101
12909
|
hasRows && /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(AnimatePresence, { initial: false, children: (() => {
|
|
13102
12910
|
const reversed = [];
|
|
13103
|
-
for (let
|
|
13104
|
-
const row = rows.at(
|
|
12911
|
+
for (let index = rows.length - 1; index >= 0; index--) {
|
|
12912
|
+
const row = rows.at(index);
|
|
13105
12913
|
reversed.push(
|
|
13106
12914
|
/* @__PURE__ */ (0, import_jsx_runtime124.jsx)(SpansDataGridRow, { row }, row.original.span_id)
|
|
13107
12915
|
);
|
|
@@ -14141,8 +13949,8 @@ var useSpans = () => {
|
|
|
14141
13949
|
var import_icons_material11 = require("@mui/icons-material");
|
|
14142
13950
|
var import_material19 = require("@mui/material");
|
|
14143
13951
|
var import_styles = require("@mui/material/styles");
|
|
14144
|
-
var
|
|
14145
|
-
var
|
|
13952
|
+
var import_react61 = require("@xyflow/react");
|
|
13953
|
+
var import_react62 = require("react");
|
|
14146
13954
|
|
|
14147
13955
|
// src/components/event-details/event-details.tsx
|
|
14148
13956
|
var import_icons_material8 = require("@mui/icons-material");
|
|
@@ -14151,80 +13959,8 @@ var import_material14 = require("@mui/material");
|
|
|
14151
13959
|
// node_modules/@textea/json-viewer/dist/index.mjs
|
|
14152
13960
|
var import_jsx_runtime129 = require("react/jsx-runtime");
|
|
14153
13961
|
var import_material7 = require("@mui/material");
|
|
14154
|
-
var
|
|
14155
|
-
|
|
14156
|
-
// node_modules/zustand/esm/vanilla.mjs
|
|
14157
|
-
var import_meta = {};
|
|
14158
|
-
var createStoreImpl = (createState2) => {
|
|
14159
|
-
let state;
|
|
14160
|
-
const listeners = /* @__PURE__ */ new Set();
|
|
14161
|
-
const setState = (partial, replace) => {
|
|
14162
|
-
const nextState = typeof partial === "function" ? partial(state) : partial;
|
|
14163
|
-
if (!Object.is(nextState, state)) {
|
|
14164
|
-
const previousState = state;
|
|
14165
|
-
state = (replace != null ? replace : typeof nextState !== "object" || nextState === null) ? nextState : Object.assign({}, state, nextState);
|
|
14166
|
-
listeners.forEach((listener) => listener(state, previousState));
|
|
14167
|
-
}
|
|
14168
|
-
};
|
|
14169
|
-
const getState = () => state;
|
|
14170
|
-
const getInitialState = () => initialState;
|
|
14171
|
-
const subscribe = (listener) => {
|
|
14172
|
-
listeners.add(listener);
|
|
14173
|
-
return () => listeners.delete(listener);
|
|
14174
|
-
};
|
|
14175
|
-
const destroy = () => {
|
|
14176
|
-
if ((import_meta.env ? import_meta.env.MODE : void 0) !== "production") {
|
|
14177
|
-
console.warn(
|
|
14178
|
-
"[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."
|
|
14179
|
-
);
|
|
14180
|
-
}
|
|
14181
|
-
listeners.clear();
|
|
14182
|
-
};
|
|
14183
|
-
const api = { setState, getState, getInitialState, subscribe, destroy };
|
|
14184
|
-
const initialState = state = createState2(setState, getState, api);
|
|
14185
|
-
return api;
|
|
14186
|
-
};
|
|
14187
|
-
var createStore = (createState2) => createState2 ? createStoreImpl(createState2) : createStoreImpl;
|
|
14188
|
-
|
|
14189
|
-
// node_modules/zustand/esm/index.mjs
|
|
14190
|
-
var import_react48 = __toESM(require("react"), 1);
|
|
14191
|
-
var import_with_selector = __toESM(require_with_selector(), 1);
|
|
14192
|
-
var import_meta2 = {};
|
|
14193
|
-
var { useDebugValue } = import_react48.default;
|
|
14194
|
-
var { useSyncExternalStoreWithSelector } = import_with_selector.default;
|
|
14195
|
-
var didWarnAboutEqualityFn = false;
|
|
14196
|
-
var identity = (arg) => arg;
|
|
14197
|
-
function useStore(api, selector2 = identity, equalityFn) {
|
|
14198
|
-
if ((import_meta2.env ? import_meta2.env.MODE : void 0) !== "production" && equalityFn && !didWarnAboutEqualityFn) {
|
|
14199
|
-
console.warn(
|
|
14200
|
-
"[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937"
|
|
14201
|
-
);
|
|
14202
|
-
didWarnAboutEqualityFn = true;
|
|
14203
|
-
}
|
|
14204
|
-
const slice = useSyncExternalStoreWithSelector(
|
|
14205
|
-
api.subscribe,
|
|
14206
|
-
api.getState,
|
|
14207
|
-
api.getServerState || api.getInitialState,
|
|
14208
|
-
selector2,
|
|
14209
|
-
equalityFn
|
|
14210
|
-
);
|
|
14211
|
-
useDebugValue(slice);
|
|
14212
|
-
return slice;
|
|
14213
|
-
}
|
|
14214
|
-
var createImpl = (createState2) => {
|
|
14215
|
-
if ((import_meta2.env ? import_meta2.env.MODE : void 0) !== "production" && typeof createState2 !== "function") {
|
|
14216
|
-
console.warn(
|
|
14217
|
-
"[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`."
|
|
14218
|
-
);
|
|
14219
|
-
}
|
|
14220
|
-
const api = typeof createState2 === "function" ? createStore(createState2) : createState2;
|
|
14221
|
-
const useBoundStore = (selector2, equalityFn) => useStore(api, selector2, equalityFn);
|
|
14222
|
-
Object.assign(useBoundStore, api);
|
|
14223
|
-
return useBoundStore;
|
|
14224
|
-
};
|
|
14225
|
-
var create = (createState2) => createState2 ? createImpl(createState2) : createImpl;
|
|
14226
|
-
|
|
14227
|
-
// node_modules/@textea/json-viewer/dist/index.mjs
|
|
13962
|
+
var import_react48 = require("react");
|
|
13963
|
+
var import_zustand = require("zustand");
|
|
14228
13964
|
var import_copy_to_clipboard = __toESM(require_copy_to_clipboard(), 1);
|
|
14229
13965
|
function r(e2) {
|
|
14230
13966
|
var t2, f2, n2 = "";
|
|
@@ -14282,7 +14018,7 @@ var darkColorspace = {
|
|
|
14282
14018
|
var DefaultKeyRenderer = () => null;
|
|
14283
14019
|
DefaultKeyRenderer.when = () => false;
|
|
14284
14020
|
var createJsonViewerStore = (props) => {
|
|
14285
|
-
return create()((set, get) => {
|
|
14021
|
+
return (0, import_zustand.create)()((set, get) => {
|
|
14286
14022
|
var _props_rootName, _props_indentWidth, _props_keyRenderer, _props_enableAdd, _props_enableDelete, _props_enableClipboard, _props_editable, _props_onChange, _props_onCopy, _props_onSelect, _props_onAdd, _props_onDelete, _props_defaultInspectDepth, _props_defaultInspectControl, _props_maxDisplayLength, _props_groupArraysAfterLength, _props_collapseStringsAfterLength, _props_objectSortKeys, _props_quotesOnKeys, _props_displayDataTypes, _props_displaySize, _props_displayComma, _props_highlightUpdates;
|
|
14287
14023
|
return {
|
|
14288
14024
|
// provided by user
|
|
@@ -14340,11 +14076,11 @@ var createJsonViewerStore = (props) => {
|
|
|
14340
14076
|
};
|
|
14341
14077
|
});
|
|
14342
14078
|
};
|
|
14343
|
-
var JsonViewerStoreContext = (0,
|
|
14079
|
+
var JsonViewerStoreContext = (0, import_react48.createContext)(void 0);
|
|
14344
14080
|
JsonViewerStoreContext.Provider;
|
|
14345
14081
|
var useJsonViewerStore = (selector2, equalityFn) => {
|
|
14346
|
-
const store = (0,
|
|
14347
|
-
return useStore(store, selector2, equalityFn);
|
|
14082
|
+
const store = (0, import_react48.useContext)(JsonViewerStoreContext);
|
|
14083
|
+
return (0, import_zustand.useStore)(store, selector2, equalityFn);
|
|
14348
14084
|
};
|
|
14349
14085
|
var useTextColor = () => {
|
|
14350
14086
|
return useJsonViewerStore((store) => store.colorspace.base07);
|
|
@@ -14412,10 +14148,10 @@ function getValueSize(value) {
|
|
|
14412
14148
|
}
|
|
14413
14149
|
function segmentArray(arr, size) {
|
|
14414
14150
|
const result = [];
|
|
14415
|
-
let
|
|
14416
|
-
while (
|
|
14417
|
-
result.push(arr.slice(
|
|
14418
|
-
|
|
14151
|
+
let index = 0;
|
|
14152
|
+
while (index < arr.length) {
|
|
14153
|
+
result.push(arr.slice(index, index + size));
|
|
14154
|
+
index += size;
|
|
14419
14155
|
}
|
|
14420
14156
|
return result;
|
|
14421
14157
|
}
|
|
@@ -14468,9 +14204,9 @@ async function copyString(value) {
|
|
|
14468
14204
|
}
|
|
14469
14205
|
function useClipboard() {
|
|
14470
14206
|
let { timeout = 2e3 } = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
14471
|
-
const [copied, setCopied] = (0,
|
|
14472
|
-
const copyTimeout = (0,
|
|
14473
|
-
const handleCopyResult = (0,
|
|
14207
|
+
const [copied, setCopied] = (0, import_react48.useState)(false);
|
|
14208
|
+
const copyTimeout = (0, import_react48.useRef)(null);
|
|
14209
|
+
const handleCopyResult = (0, import_react48.useCallback)((value) => {
|
|
14474
14210
|
const current = copyTimeout.current;
|
|
14475
14211
|
if (current) {
|
|
14476
14212
|
window.clearTimeout(current);
|
|
@@ -14481,7 +14217,7 @@ function useClipboard() {
|
|
|
14481
14217
|
timeout
|
|
14482
14218
|
]);
|
|
14483
14219
|
const onCopy = useJsonViewerStore((store) => store.onCopy);
|
|
14484
|
-
const copy = (0,
|
|
14220
|
+
const copy = (0, import_react48.useCallback)(async (path, value) => {
|
|
14485
14221
|
if (typeof onCopy === "function") {
|
|
14486
14222
|
try {
|
|
14487
14223
|
await onCopy(path, value, copyString);
|
|
@@ -14502,7 +14238,7 @@ function useClipboard() {
|
|
|
14502
14238
|
handleCopyResult,
|
|
14503
14239
|
onCopy
|
|
14504
14240
|
]);
|
|
14505
|
-
const reset = (0,
|
|
14241
|
+
const reset = (0, import_react48.useCallback)(() => {
|
|
14506
14242
|
setCopied(false);
|
|
14507
14243
|
if (copyTimeout.current) {
|
|
14508
14244
|
clearTimeout(copyTimeout.current);
|
|
@@ -14516,7 +14252,7 @@ function useClipboard() {
|
|
|
14516
14252
|
}
|
|
14517
14253
|
function useIsCycleReference(path, value) {
|
|
14518
14254
|
const rootValue = useJsonViewerStore((store) => store.value);
|
|
14519
|
-
return (0,
|
|
14255
|
+
return (0, import_react48.useMemo)(() => isCycleReference(rootValue, path, value), [
|
|
14520
14256
|
path,
|
|
14521
14257
|
value,
|
|
14522
14258
|
rootValue
|
|
@@ -14529,7 +14265,7 @@ function useInspect(path, value, nestedIndex) {
|
|
|
14529
14265
|
const setInspectCache = useJsonViewerStore((store) => store.setInspectCache);
|
|
14530
14266
|
const defaultInspectDepth = useJsonViewerStore((store) => store.defaultInspectDepth);
|
|
14531
14267
|
const defaultInspectControl = useJsonViewerStore((store) => store.defaultInspectControl);
|
|
14532
|
-
(0,
|
|
14268
|
+
(0, import_react48.useEffect)(() => {
|
|
14533
14269
|
const inspect2 = getInspectCache(path, nestedIndex);
|
|
14534
14270
|
if (inspect2 !== void 0) {
|
|
14535
14271
|
return;
|
|
@@ -14551,7 +14287,7 @@ function useInspect(path, value, nestedIndex) {
|
|
|
14551
14287
|
value,
|
|
14552
14288
|
setInspectCache
|
|
14553
14289
|
]);
|
|
14554
|
-
const [inspect, set] = (0,
|
|
14290
|
+
const [inspect, set] = (0, import_react48.useState)(() => {
|
|
14555
14291
|
const shouldInspect = getInspectCache(path, nestedIndex);
|
|
14556
14292
|
if (shouldInspect !== void 0) {
|
|
14557
14293
|
return shouldInspect;
|
|
@@ -14561,7 +14297,7 @@ function useInspect(path, value, nestedIndex) {
|
|
|
14561
14297
|
}
|
|
14562
14298
|
return isTrap ? false : typeof defaultInspectControl === "function" ? defaultInspectControl(path, value) : depth < defaultInspectDepth;
|
|
14563
14299
|
});
|
|
14564
|
-
const setInspect = (0,
|
|
14300
|
+
const setInspect = (0, import_react48.useCallback)((apply) => {
|
|
14565
14301
|
set((oldState) => {
|
|
14566
14302
|
const newState = typeof apply === "boolean" ? apply : apply(oldState);
|
|
14567
14303
|
setInspectCache(path, newState, nestedIndex);
|
|
@@ -14601,7 +14337,7 @@ var DataTypeLabel = (param) => {
|
|
|
14601
14337
|
};
|
|
14602
14338
|
function defineEasyType(param) {
|
|
14603
14339
|
let { is, serialize, deserialize, type, colorKey, displayTypeLabel = true, Renderer } = param;
|
|
14604
|
-
const Render = /* @__PURE__ */ (0,
|
|
14340
|
+
const Render = /* @__PURE__ */ (0, import_react48.memo)(Renderer);
|
|
14605
14341
|
const EasyType = (props) => {
|
|
14606
14342
|
const storeDisplayDataTypes = useJsonViewerStore((store) => store.displayDataTypes);
|
|
14607
14343
|
const color2 = useJsonViewerStore((store) => store.colorspace[colorKey]);
|
|
@@ -14638,7 +14374,7 @@ function defineEasyType(param) {
|
|
|
14638
14374
|
const EasyTypeEditor = (param2) => {
|
|
14639
14375
|
let { value, setValue, abortEditing, commitEditing } = param2;
|
|
14640
14376
|
const color2 = useJsonViewerStore((store) => store.colorspace[colorKey]);
|
|
14641
|
-
const handleKeyDown = (0,
|
|
14377
|
+
const handleKeyDown = (0, import_react48.useCallback)((event) => {
|
|
14642
14378
|
if (event.key === "Enter") {
|
|
14643
14379
|
event.preventDefault();
|
|
14644
14380
|
commitEditing(value);
|
|
@@ -14652,7 +14388,7 @@ function defineEasyType(param) {
|
|
|
14652
14388
|
commitEditing,
|
|
14653
14389
|
value
|
|
14654
14390
|
]);
|
|
14655
|
-
const handleChange = (0,
|
|
14391
|
+
const handleChange = (0, import_react48.useCallback)((event) => {
|
|
14656
14392
|
setValue(event.target.value);
|
|
14657
14393
|
}, [
|
|
14658
14394
|
setValue
|
|
@@ -14977,17 +14713,17 @@ function inspectMetadata(value) {
|
|
|
14977
14713
|
var PreObjectType = (props) => {
|
|
14978
14714
|
const metadataColor = useJsonViewerStore((store) => store.colorspace.base04);
|
|
14979
14715
|
const textColor = useTextColor();
|
|
14980
|
-
const isArrayLike = (0,
|
|
14716
|
+
const isArrayLike = (0, import_react48.useMemo)(() => Array.isArray(props.value) || props.value instanceof Set, [
|
|
14981
14717
|
props.value
|
|
14982
14718
|
]);
|
|
14983
|
-
const isEmptyValue = (0,
|
|
14719
|
+
const isEmptyValue = (0, import_react48.useMemo)(() => getValueSize(props.value) === 0, [
|
|
14984
14720
|
props.value
|
|
14985
14721
|
]);
|
|
14986
|
-
const sizeOfValue = (0,
|
|
14722
|
+
const sizeOfValue = (0, import_react48.useMemo)(() => inspectMetadata(props.value), [
|
|
14987
14723
|
props.value
|
|
14988
14724
|
]);
|
|
14989
14725
|
const displaySize = useJsonViewerStore((store) => store.displaySize);
|
|
14990
|
-
const shouldDisplaySize = (0,
|
|
14726
|
+
const shouldDisplaySize = (0, import_react48.useMemo)(() => typeof displaySize === "function" ? displaySize(props.path, props.value) : displaySize, [
|
|
14991
14727
|
displaySize,
|
|
14992
14728
|
props.path,
|
|
14993
14729
|
props.value
|
|
@@ -15035,17 +14771,17 @@ var PreObjectType = (props) => {
|
|
|
15035
14771
|
var PostObjectType = (props) => {
|
|
15036
14772
|
const metadataColor = useJsonViewerStore((store) => store.colorspace.base04);
|
|
15037
14773
|
const textColor = useTextColor();
|
|
15038
|
-
const isArrayLike = (0,
|
|
14774
|
+
const isArrayLike = (0, import_react48.useMemo)(() => Array.isArray(props.value) || props.value instanceof Set, [
|
|
15039
14775
|
props.value
|
|
15040
14776
|
]);
|
|
15041
|
-
const isEmptyValue = (0,
|
|
14777
|
+
const isEmptyValue = (0, import_react48.useMemo)(() => getValueSize(props.value) === 0, [
|
|
15042
14778
|
props.value
|
|
15043
14779
|
]);
|
|
15044
|
-
const sizeOfValue = (0,
|
|
14780
|
+
const sizeOfValue = (0, import_react48.useMemo)(() => inspectMetadata(props.value), [
|
|
15045
14781
|
props.value
|
|
15046
14782
|
]);
|
|
15047
14783
|
const displaySize = useJsonViewerStore((store) => store.displaySize);
|
|
15048
|
-
const shouldDisplaySize = (0,
|
|
14784
|
+
const shouldDisplaySize = (0, import_react48.useMemo)(() => typeof displaySize === "function" ? displaySize(props.path, props.value) : displaySize, [
|
|
15049
14785
|
displaySize,
|
|
15050
14786
|
props.path,
|
|
15051
14787
|
props.value
|
|
@@ -15082,9 +14818,9 @@ var ObjectType = (props) => {
|
|
|
15082
14818
|
const borderColor = useJsonViewerStore((store) => store.colorspace.base02);
|
|
15083
14819
|
const groupArraysAfterLength = useJsonViewerStore((store) => store.groupArraysAfterLength);
|
|
15084
14820
|
const isTrap = useIsCycleReference(props.path, props.value);
|
|
15085
|
-
const [displayLength, setDisplayLength] = (0,
|
|
14821
|
+
const [displayLength, setDisplayLength] = (0, import_react48.useState)(useJsonViewerStore((store) => store.maxDisplayLength));
|
|
15086
14822
|
const objectSortKeys = useJsonViewerStore((store) => store.objectSortKeys);
|
|
15087
|
-
const elements = (0,
|
|
14823
|
+
const elements = (0, import_react48.useMemo)(() => {
|
|
15088
14824
|
if (!props.inspect) {
|
|
15089
14825
|
return null;
|
|
15090
14826
|
}
|
|
@@ -15094,7 +14830,7 @@ var ObjectType = (props) => {
|
|
|
15094
14830
|
const elements3 = [];
|
|
15095
14831
|
if (value instanceof Map) {
|
|
15096
14832
|
const lastIndex2 = value.size - 1;
|
|
15097
|
-
let
|
|
14833
|
+
let index = 0;
|
|
15098
14834
|
value.forEach((value2, k2) => {
|
|
15099
14835
|
const key = k2.toString();
|
|
15100
14836
|
const path = [
|
|
@@ -15106,9 +14842,9 @@ var ObjectType = (props) => {
|
|
|
15106
14842
|
value: value2,
|
|
15107
14843
|
prevValue: props.prevValue instanceof Map ? props.prevValue.get(k2) : void 0,
|
|
15108
14844
|
editable: false,
|
|
15109
|
-
last:
|
|
14845
|
+
last: index === lastIndex2
|
|
15110
14846
|
}, key));
|
|
15111
|
-
|
|
14847
|
+
index++;
|
|
15112
14848
|
});
|
|
15113
14849
|
} else {
|
|
15114
14850
|
const iterator2 = value[Symbol.iterator]();
|
|
@@ -15140,17 +14876,17 @@ var ObjectType = (props) => {
|
|
|
15140
14876
|
const lastIndex2 = value.length - 1;
|
|
15141
14877
|
if (value.length <= groupArraysAfterLength) {
|
|
15142
14878
|
const elements4 = value.slice(0, displayLength).map((value2, _index) => {
|
|
15143
|
-
const
|
|
14879
|
+
const index = props.nestedIndex ? props.nestedIndex * groupArraysAfterLength + _index : _index;
|
|
15144
14880
|
const path = [
|
|
15145
14881
|
...props.path,
|
|
15146
|
-
|
|
14882
|
+
index
|
|
15147
14883
|
];
|
|
15148
14884
|
return /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(DataKeyPair, {
|
|
15149
14885
|
path,
|
|
15150
14886
|
value: value2,
|
|
15151
|
-
prevValue: Array.isArray(props.prevValue) ? props.prevValue[
|
|
14887
|
+
prevValue: Array.isArray(props.prevValue) ? props.prevValue[index] : void 0,
|
|
15152
14888
|
last: _index === lastIndex2
|
|
15153
|
-
},
|
|
14889
|
+
}, index);
|
|
15154
14890
|
});
|
|
15155
14891
|
if (value.length > displayLength) {
|
|
15156
14892
|
const rest = value.length - displayLength;
|
|
@@ -15176,14 +14912,14 @@ var ObjectType = (props) => {
|
|
|
15176
14912
|
const elements3 = segmentArray(value, groupArraysAfterLength);
|
|
15177
14913
|
const prevElements = Array.isArray(props.prevValue) ? segmentArray(props.prevValue, groupArraysAfterLength) : void 0;
|
|
15178
14914
|
const elementsLastIndex = elements3.length - 1;
|
|
15179
|
-
return elements3.map((list,
|
|
14915
|
+
return elements3.map((list, index) => {
|
|
15180
14916
|
return /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(DataKeyPair, {
|
|
15181
14917
|
path: props.path,
|
|
15182
14918
|
value: list,
|
|
15183
|
-
nestedIndex:
|
|
15184
|
-
prevValue: prevElements === null || prevElements === void 0 ? void 0 : prevElements[
|
|
15185
|
-
last:
|
|
15186
|
-
},
|
|
14919
|
+
nestedIndex: index,
|
|
14920
|
+
prevValue: prevElements === null || prevElements === void 0 ? void 0 : prevElements[index],
|
|
14921
|
+
last: index === elementsLastIndex
|
|
14922
|
+
}, index);
|
|
15187
14923
|
});
|
|
15188
14924
|
}
|
|
15189
14925
|
let entries = Object.entries(value);
|
|
@@ -15197,7 +14933,7 @@ var ObjectType = (props) => {
|
|
|
15197
14933
|
});
|
|
15198
14934
|
}
|
|
15199
14935
|
const lastIndex = entries.length - 1;
|
|
15200
|
-
const elements2 = entries.slice(0, displayLength).map((param,
|
|
14936
|
+
const elements2 = entries.slice(0, displayLength).map((param, index) => {
|
|
15201
14937
|
let [key, value2] = param;
|
|
15202
14938
|
var _props_prevValue;
|
|
15203
14939
|
const path = [
|
|
@@ -15208,7 +14944,7 @@ var ObjectType = (props) => {
|
|
|
15208
14944
|
path,
|
|
15209
14945
|
value: value2,
|
|
15210
14946
|
prevValue: (_props_prevValue = props.prevValue) === null || _props_prevValue === void 0 ? void 0 : _props_prevValue[key],
|
|
15211
|
-
last:
|
|
14947
|
+
last: index === lastIndex
|
|
15212
14948
|
}, key);
|
|
15213
14949
|
});
|
|
15214
14950
|
if (entries.length > displayLength) {
|
|
@@ -15245,7 +14981,7 @@ var ObjectType = (props) => {
|
|
|
15245
14981
|
const marginLeft = props.inspect ? 0.6 : 0;
|
|
15246
14982
|
const width = useJsonViewerStore((store) => store.indentWidth);
|
|
15247
14983
|
const indentWidth = props.inspect ? width - marginLeft : width;
|
|
15248
|
-
const isEmptyValue = (0,
|
|
14984
|
+
const isEmptyValue = (0, import_react48.useMemo)(() => getValueSize(props.value) === 0, [
|
|
15249
14985
|
props.value
|
|
15250
14986
|
]);
|
|
15251
14987
|
if (isEmptyValue) {
|
|
@@ -15288,7 +15024,7 @@ var stringType = defineEasyType({
|
|
|
15288
15024
|
serialize: (value) => value,
|
|
15289
15025
|
deserialize: (value) => value,
|
|
15290
15026
|
Renderer: (props) => {
|
|
15291
|
-
const [showRest, setShowRest] = (0,
|
|
15027
|
+
const [showRest, setShowRest] = (0, import_react48.useState)(false);
|
|
15292
15028
|
const collapseStringsAfterLength = useJsonViewerStore((store) => store.collapseStringsAfterLength);
|
|
15293
15029
|
const value = showRest ? props.value : props.value.slice(0, collapseStringsAfterLength);
|
|
15294
15030
|
const hasRest = props.value.length > collapseStringsAfterLength;
|
|
@@ -15345,17 +15081,17 @@ function memorizeDataType(dataType) {
|
|
|
15345
15081
|
var _prevProps_path, _nextProps_path;
|
|
15346
15082
|
return Object.is(prevProps.value, nextProps.value) && prevProps.inspect && nextProps.inspect && ((_prevProps_path = prevProps.path) === null || _prevProps_path === void 0 ? void 0 : _prevProps_path.join(".")) === ((_nextProps_path = nextProps.path) === null || _nextProps_path === void 0 ? void 0 : _nextProps_path.join("."));
|
|
15347
15083
|
}
|
|
15348
|
-
dataType.Component = /* @__PURE__ */ (0,
|
|
15084
|
+
dataType.Component = /* @__PURE__ */ (0, import_react48.memo)(dataType.Component, compare);
|
|
15349
15085
|
if (dataType.Editor) {
|
|
15350
|
-
dataType.Editor = /* @__PURE__ */ (0,
|
|
15086
|
+
dataType.Editor = /* @__PURE__ */ (0, import_react48.memo)(dataType.Editor, function compare2(prevProps, nextProps) {
|
|
15351
15087
|
return Object.is(prevProps.value, nextProps.value);
|
|
15352
15088
|
});
|
|
15353
15089
|
}
|
|
15354
15090
|
if (dataType.PreComponent) {
|
|
15355
|
-
dataType.PreComponent = /* @__PURE__ */ (0,
|
|
15091
|
+
dataType.PreComponent = /* @__PURE__ */ (0, import_react48.memo)(dataType.PreComponent, compare);
|
|
15356
15092
|
}
|
|
15357
15093
|
if (dataType.PostComponent) {
|
|
15358
|
-
dataType.PostComponent = /* @__PURE__ */ (0,
|
|
15094
|
+
dataType.PostComponent = /* @__PURE__ */ (0, import_react48.memo)(dataType.PostComponent, compare);
|
|
15359
15095
|
}
|
|
15360
15096
|
return dataType;
|
|
15361
15097
|
}
|
|
@@ -15372,7 +15108,7 @@ var predefinedTypes = [
|
|
|
15372
15108
|
memorizeDataType(bigIntType)
|
|
15373
15109
|
];
|
|
15374
15110
|
var createTypeRegistryStore = () => {
|
|
15375
|
-
return createStore()((set) => ({
|
|
15111
|
+
return (0, import_zustand.createStore)()((set) => ({
|
|
15376
15112
|
registry: predefinedTypes,
|
|
15377
15113
|
registerTypes: (setState) => {
|
|
15378
15114
|
set((state) => ({
|
|
@@ -15381,11 +15117,11 @@ var createTypeRegistryStore = () => {
|
|
|
15381
15117
|
}
|
|
15382
15118
|
}));
|
|
15383
15119
|
};
|
|
15384
|
-
var TypeRegistryStoreContext = /* @__PURE__ */ (0,
|
|
15120
|
+
var TypeRegistryStoreContext = /* @__PURE__ */ (0, import_react48.createContext)(void 0);
|
|
15385
15121
|
TypeRegistryStoreContext.Provider;
|
|
15386
15122
|
var useTypeRegistryStore = (selector2, equalityFn) => {
|
|
15387
|
-
const store = (0,
|
|
15388
|
-
return useStore(store, selector2, equalityFn);
|
|
15123
|
+
const store = (0, import_react48.useContext)(TypeRegistryStoreContext);
|
|
15124
|
+
return (0, import_zustand.useStore)(store, selector2, equalityFn);
|
|
15389
15125
|
};
|
|
15390
15126
|
function matchTypeComponents(value, path, registry) {
|
|
15391
15127
|
let potential;
|
|
@@ -15404,7 +15140,7 @@ function matchTypeComponents(value, path, registry) {
|
|
|
15404
15140
|
}
|
|
15405
15141
|
function useTypeComponents(value, path) {
|
|
15406
15142
|
const registry = useTypeRegistryStore((store) => store.registry);
|
|
15407
|
-
return (0,
|
|
15143
|
+
return (0, import_react48.useMemo)(() => matchTypeComponents(value, path, registry), [
|
|
15408
15144
|
value,
|
|
15409
15145
|
path,
|
|
15410
15146
|
registry
|
|
@@ -15425,7 +15161,7 @@ var DataKeyPair = (props) => {
|
|
|
15425
15161
|
var _props_editable;
|
|
15426
15162
|
const propsEditable = (_props_editable = props.editable) !== null && _props_editable !== void 0 ? _props_editable : void 0;
|
|
15427
15163
|
const storeEditable = useJsonViewerStore((store) => store.editable);
|
|
15428
|
-
const editable = (0,
|
|
15164
|
+
const editable = (0, import_react48.useMemo)(() => {
|
|
15429
15165
|
if (storeEditable === false) {
|
|
15430
15166
|
return false;
|
|
15431
15167
|
}
|
|
@@ -15442,12 +15178,12 @@ var DataKeyPair = (props) => {
|
|
|
15442
15178
|
storeEditable,
|
|
15443
15179
|
value
|
|
15444
15180
|
]);
|
|
15445
|
-
const [tempValue, setTempValue] = (0,
|
|
15181
|
+
const [tempValue, setTempValue] = (0, import_react48.useState)("");
|
|
15446
15182
|
const depth = path.length;
|
|
15447
15183
|
const key = path[depth - 1];
|
|
15448
15184
|
const hoverPath = useJsonViewerStore((store) => store.hoverPath);
|
|
15449
|
-
const isHover = (0,
|
|
15450
|
-
return hoverPath && path.every((value2,
|
|
15185
|
+
const isHover = (0, import_react48.useMemo)(() => {
|
|
15186
|
+
return hoverPath && path.every((value2, index) => value2 === hoverPath.path[index] && nestedIndex === hoverPath.nestedIndex);
|
|
15451
15187
|
}, [
|
|
15452
15188
|
hoverPath,
|
|
15453
15189
|
path,
|
|
@@ -15456,7 +15192,7 @@ var DataKeyPair = (props) => {
|
|
|
15456
15192
|
const setHover = useJsonViewerStore((store) => store.setHover);
|
|
15457
15193
|
const root = useJsonViewerStore((store) => store.value);
|
|
15458
15194
|
const [inspect, setInspect] = useInspect(path, value, nestedIndex);
|
|
15459
|
-
const [editing, setEditing] = (0,
|
|
15195
|
+
const [editing, setEditing] = (0, import_react48.useState)(false);
|
|
15460
15196
|
const onChange = useJsonViewerStore((store) => store.onChange);
|
|
15461
15197
|
const keyColor = useTextColor();
|
|
15462
15198
|
const numberKeyColor = useJsonViewerStore((store) => store.colorspace.base0C);
|
|
@@ -15468,7 +15204,7 @@ var DataKeyPair = (props) => {
|
|
|
15468
15204
|
const isNumberKey = Number.isInteger(Number(key));
|
|
15469
15205
|
const storeEnableAdd = useJsonViewerStore((store) => store.enableAdd);
|
|
15470
15206
|
const onAdd = useJsonViewerStore((store) => store.onAdd);
|
|
15471
|
-
const enableAdd = (0,
|
|
15207
|
+
const enableAdd = (0, import_react48.useMemo)(() => {
|
|
15472
15208
|
if (!onAdd || nestedIndex !== void 0) return false;
|
|
15473
15209
|
if (storeEnableAdd === false) {
|
|
15474
15210
|
return false;
|
|
@@ -15493,7 +15229,7 @@ var DataKeyPair = (props) => {
|
|
|
15493
15229
|
]);
|
|
15494
15230
|
const storeEnableDelete = useJsonViewerStore((store) => store.enableDelete);
|
|
15495
15231
|
const onDelete = useJsonViewerStore((store) => store.onDelete);
|
|
15496
|
-
const enableDelete = (0,
|
|
15232
|
+
const enableDelete = (0, import_react48.useMemo)(() => {
|
|
15497
15233
|
if (!onDelete || nestedIndex !== void 0) return false;
|
|
15498
15234
|
if (isRoot) {
|
|
15499
15235
|
return false;
|
|
@@ -15520,7 +15256,7 @@ var DataKeyPair = (props) => {
|
|
|
15520
15256
|
const enableClipboard = useJsonViewerStore((store) => store.enableClipboard);
|
|
15521
15257
|
const { copy, copied } = useClipboard();
|
|
15522
15258
|
const highlightUpdates = useJsonViewerStore((store) => store.highlightUpdates);
|
|
15523
|
-
const isHighlight = (0,
|
|
15259
|
+
const isHighlight = (0, import_react48.useMemo)(() => {
|
|
15524
15260
|
if (!highlightUpdates || prevValue === void 0) return false;
|
|
15525
15261
|
if (typeof value !== typeof prevValue) {
|
|
15526
15262
|
return true;
|
|
@@ -15544,8 +15280,8 @@ var DataKeyPair = (props) => {
|
|
|
15544
15280
|
prevValue,
|
|
15545
15281
|
value
|
|
15546
15282
|
]);
|
|
15547
|
-
const highlightContainer = (0,
|
|
15548
|
-
(0,
|
|
15283
|
+
const highlightContainer = (0, import_react48.useRef)();
|
|
15284
|
+
(0, import_react48.useEffect)(() => {
|
|
15549
15285
|
if (highlightContainer.current && isHighlight && "animate" in highlightContainer.current) {
|
|
15550
15286
|
highlightContainer.current.animate([
|
|
15551
15287
|
{
|
|
@@ -15565,7 +15301,7 @@ var DataKeyPair = (props) => {
|
|
|
15565
15301
|
prevValue,
|
|
15566
15302
|
value
|
|
15567
15303
|
]);
|
|
15568
|
-
const startEditing = (0,
|
|
15304
|
+
const startEditing = (0, import_react48.useCallback)((event) => {
|
|
15569
15305
|
event.preventDefault();
|
|
15570
15306
|
if (serialize) setTempValue(serialize(value));
|
|
15571
15307
|
setEditing(true);
|
|
@@ -15573,14 +15309,14 @@ var DataKeyPair = (props) => {
|
|
|
15573
15309
|
serialize,
|
|
15574
15310
|
value
|
|
15575
15311
|
]);
|
|
15576
|
-
const abortEditing = (0,
|
|
15312
|
+
const abortEditing = (0, import_react48.useCallback)(() => {
|
|
15577
15313
|
setEditing(false);
|
|
15578
15314
|
setTempValue("");
|
|
15579
15315
|
}, [
|
|
15580
15316
|
setEditing,
|
|
15581
15317
|
setTempValue
|
|
15582
15318
|
]);
|
|
15583
|
-
const commitEditing = (0,
|
|
15319
|
+
const commitEditing = (0, import_react48.useCallback)((newValue) => {
|
|
15584
15320
|
setEditing(false);
|
|
15585
15321
|
if (!deserialize) return;
|
|
15586
15322
|
try {
|
|
@@ -15594,7 +15330,7 @@ var DataKeyPair = (props) => {
|
|
|
15594
15330
|
path,
|
|
15595
15331
|
value
|
|
15596
15332
|
]);
|
|
15597
|
-
const actionIcons = (0,
|
|
15333
|
+
const actionIcons = (0, import_react48.useMemo)(() => {
|
|
15598
15334
|
if (editing) {
|
|
15599
15335
|
return /* @__PURE__ */ (0, import_jsx_runtime129.jsxs)(import_jsx_runtime129.Fragment, {
|
|
15600
15336
|
children: [
|
|
@@ -15690,12 +15426,12 @@ var DataKeyPair = (props) => {
|
|
|
15690
15426
|
abortEditing,
|
|
15691
15427
|
commitEditing
|
|
15692
15428
|
]);
|
|
15693
|
-
const isEmptyValue = (0,
|
|
15429
|
+
const isEmptyValue = (0, import_react48.useMemo)(() => getValueSize(value) === 0, [
|
|
15694
15430
|
value
|
|
15695
15431
|
]);
|
|
15696
15432
|
const expandable = !isEmptyValue && !!(PreComponent && PostComponent);
|
|
15697
15433
|
const KeyRenderer = useJsonViewerStore((store) => store.keyRenderer);
|
|
15698
|
-
const downstreamProps = (0,
|
|
15434
|
+
const downstreamProps = (0, import_react48.useMemo)(() => ({
|
|
15699
15435
|
path,
|
|
15700
15436
|
inspect,
|
|
15701
15437
|
setInspect,
|
|
@@ -15716,7 +15452,7 @@ var DataKeyPair = (props) => {
|
|
|
15716
15452
|
sx: {
|
|
15717
15453
|
userSelect: "text"
|
|
15718
15454
|
},
|
|
15719
|
-
onMouseEnter: (0,
|
|
15455
|
+
onMouseEnter: (0, import_react48.useCallback)(() => setHover(path, nestedIndex), [
|
|
15720
15456
|
setHover,
|
|
15721
15457
|
path,
|
|
15722
15458
|
nestedIndex
|
|
@@ -15731,7 +15467,7 @@ var DataKeyPair = (props) => {
|
|
|
15731
15467
|
letterSpacing: 0.5,
|
|
15732
15468
|
opacity: 0.8
|
|
15733
15469
|
},
|
|
15734
|
-
onClick: (0,
|
|
15470
|
+
onClick: (0, import_react48.useCallback)((event) => {
|
|
15735
15471
|
if (event.isDefaultPrevented()) {
|
|
15736
15472
|
return;
|
|
15737
15473
|
}
|
|
@@ -15841,8 +15577,8 @@ var DataKeyPair = (props) => {
|
|
|
15841
15577
|
};
|
|
15842
15578
|
var query = "(prefers-color-scheme: dark)";
|
|
15843
15579
|
function useThemeDetector() {
|
|
15844
|
-
const [isDark, setIsDark] = (0,
|
|
15845
|
-
(0,
|
|
15580
|
+
const [isDark, setIsDark] = (0, import_react48.useState)(false);
|
|
15581
|
+
(0, import_react48.useEffect)(() => {
|
|
15846
15582
|
const listener = (e2) => setIsDark(e2.matches);
|
|
15847
15583
|
setIsDark(window.matchMedia(query).matches);
|
|
15848
15584
|
const queryMedia = window.matchMedia(query);
|
|
@@ -15852,8 +15588,8 @@ function useThemeDetector() {
|
|
|
15852
15588
|
return isDark;
|
|
15853
15589
|
}
|
|
15854
15590
|
function useSetIfNotUndefinedEffect(key, value) {
|
|
15855
|
-
const { setState } = (0,
|
|
15856
|
-
(0,
|
|
15591
|
+
const { setState } = (0, import_react48.useContext)(JsonViewerStoreContext);
|
|
15592
|
+
(0, import_react48.useEffect)(() => {
|
|
15857
15593
|
if (value !== void 0) {
|
|
15858
15594
|
setState({
|
|
15859
15595
|
[key]: value
|
|
@@ -15866,8 +15602,8 @@ function useSetIfNotUndefinedEffect(key, value) {
|
|
|
15866
15602
|
]);
|
|
15867
15603
|
}
|
|
15868
15604
|
var JsonViewerInner = (props) => {
|
|
15869
|
-
const { setState } = (0,
|
|
15870
|
-
(0,
|
|
15605
|
+
const { setState } = (0, import_react48.useContext)(JsonViewerStoreContext);
|
|
15606
|
+
(0, import_react48.useEffect)(() => {
|
|
15871
15607
|
setState((state) => ({
|
|
15872
15608
|
prevValue: state.value,
|
|
15873
15609
|
value: props.value
|
|
@@ -15895,7 +15631,7 @@ var JsonViewerInner = (props) => {
|
|
|
15895
15631
|
useSetIfNotUndefinedEffect("displaySize", props.displaySize);
|
|
15896
15632
|
useSetIfNotUndefinedEffect("displayComma", props.displayComma);
|
|
15897
15633
|
useSetIfNotUndefinedEffect("highlightUpdates", props.highlightUpdates);
|
|
15898
|
-
(0,
|
|
15634
|
+
(0, import_react48.useEffect)(() => {
|
|
15899
15635
|
if (props.theme === "light") {
|
|
15900
15636
|
setState({
|
|
15901
15637
|
colorspace: lightColorspace
|
|
@@ -15913,13 +15649,13 @@ var JsonViewerInner = (props) => {
|
|
|
15913
15649
|
setState,
|
|
15914
15650
|
props.theme
|
|
15915
15651
|
]);
|
|
15916
|
-
const themeCls = (0,
|
|
15652
|
+
const themeCls = (0, import_react48.useMemo)(() => {
|
|
15917
15653
|
if (typeof props.theme === "object") return "json-viewer-theme-custom";
|
|
15918
15654
|
return props.theme === "dark" ? "json-viewer-theme-dark" : "json-viewer-theme-light";
|
|
15919
15655
|
}, [
|
|
15920
15656
|
props.theme
|
|
15921
15657
|
]);
|
|
15922
|
-
const onceRef = (0,
|
|
15658
|
+
const onceRef = (0, import_react48.useRef)(true);
|
|
15923
15659
|
const registerTypes = useTypeRegistryStore((store) => store.registerTypes);
|
|
15924
15660
|
if (onceRef.current) {
|
|
15925
15661
|
const allTypes = props.valueTypes ? [
|
|
@@ -15931,7 +15667,7 @@ var JsonViewerInner = (props) => {
|
|
|
15931
15667
|
registerTypes(allTypes);
|
|
15932
15668
|
onceRef.current = false;
|
|
15933
15669
|
}
|
|
15934
|
-
(0,
|
|
15670
|
+
(0, import_react48.useEffect)(() => {
|
|
15935
15671
|
const allTypes = props.valueTypes ? [
|
|
15936
15672
|
...predefinedTypes,
|
|
15937
15673
|
...props.valueTypes
|
|
@@ -15945,9 +15681,9 @@ var JsonViewerInner = (props) => {
|
|
|
15945
15681
|
]);
|
|
15946
15682
|
const value = useJsonViewerStore((store) => store.value);
|
|
15947
15683
|
const prevValue = useJsonViewerStore((store) => store.prevValue);
|
|
15948
|
-
const emptyPath = (0,
|
|
15684
|
+
const emptyPath = (0, import_react48.useMemo)(() => [], []);
|
|
15949
15685
|
const setHover = useJsonViewerStore((store) => store.setHover);
|
|
15950
|
-
const onMouseLeave = (0,
|
|
15686
|
+
const onMouseLeave = (0, import_react48.useCallback)(() => setHover(null), [
|
|
15951
15687
|
setHover
|
|
15952
15688
|
]);
|
|
15953
15689
|
return /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(import_material7.Paper, {
|
|
@@ -15976,14 +15712,14 @@ var JsonViewer = function JsonViewer2(props) {
|
|
|
15976
15712
|
}
|
|
15977
15713
|
}
|
|
15978
15714
|
const isAutoDarkTheme = useThemeDetector();
|
|
15979
|
-
const themeType = (0,
|
|
15715
|
+
const themeType = (0, import_react48.useMemo)(() => {
|
|
15980
15716
|
var _props_theme;
|
|
15981
15717
|
return props.theme === "auto" ? isAutoDarkTheme ? "dark" : "light" : (_props_theme = props.theme) !== null && _props_theme !== void 0 ? _props_theme : "light";
|
|
15982
15718
|
}, [
|
|
15983
15719
|
isAutoDarkTheme,
|
|
15984
15720
|
props.theme
|
|
15985
15721
|
]);
|
|
15986
|
-
const theme = (0,
|
|
15722
|
+
const theme = (0, import_react48.useMemo)(() => {
|
|
15987
15723
|
const backgroundColor = typeof themeType === "object" ? themeType.base00 : themeType === "dark" ? darkColorspace.base00 : lightColorspace.base00;
|
|
15988
15724
|
const foregroundColor = typeof themeType === "object" ? themeType.base07 : themeType === "dark" ? darkColorspace.base07 : lightColorspace.base07;
|
|
15989
15725
|
return (0, import_material7.createTheme)({
|
|
@@ -16011,8 +15747,8 @@ var JsonViewer = function JsonViewer2(props) {
|
|
|
16011
15747
|
...props,
|
|
16012
15748
|
theme: themeType
|
|
16013
15749
|
};
|
|
16014
|
-
const jsonViewerStore = (0,
|
|
16015
|
-
const typeRegistryStore = (0,
|
|
15750
|
+
const jsonViewerStore = (0, import_react48.useMemo)(() => createJsonViewerStore(props), []);
|
|
15751
|
+
const typeRegistryStore = (0, import_react48.useMemo)(() => createTypeRegistryStore(), []);
|
|
16016
15752
|
return /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(import_material7.ThemeProvider, {
|
|
16017
15753
|
theme,
|
|
16018
15754
|
children: /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(TypeRegistryStoreContext.Provider, {
|
|
@@ -16028,7 +15764,7 @@ var JsonViewer = function JsonViewer2(props) {
|
|
|
16028
15764
|
};
|
|
16029
15765
|
|
|
16030
15766
|
// src/components/event-details/event-details.tsx
|
|
16031
|
-
var
|
|
15767
|
+
var import_react53 = require("react");
|
|
16032
15768
|
|
|
16033
15769
|
// src/utils/iam-utils.ts
|
|
16034
15770
|
function determinePermissionStatus(payload) {
|
|
@@ -16227,7 +15963,7 @@ var getEventGroupsByType = (events) => {
|
|
|
16227
15963
|
// src/components/event-details/event-detail.tsx
|
|
16228
15964
|
var import_icons_material6 = require("@mui/icons-material");
|
|
16229
15965
|
var import_material11 = require("@mui/material");
|
|
16230
|
-
var
|
|
15966
|
+
var import_react50 = require("react");
|
|
16231
15967
|
|
|
16232
15968
|
// src/components/status-icon.tsx
|
|
16233
15969
|
var import_icons_material3 = require("@mui/icons-material");
|
|
@@ -16378,7 +16114,7 @@ var IAMEventDetail = ({ event }) => {
|
|
|
16378
16114
|
// src/components/event-details/iam-permission-detail.tsx
|
|
16379
16115
|
var import_icons_material5 = require("@mui/icons-material");
|
|
16380
16116
|
var import_material10 = require("@mui/material");
|
|
16381
|
-
var
|
|
16117
|
+
var import_react49 = require("react");
|
|
16382
16118
|
var import_jsx_runtime132 = require("react/jsx-runtime");
|
|
16383
16119
|
var getChipColors = (status) => {
|
|
16384
16120
|
const isAllowed = status === "explicitly_allowed" || status === "implicitly_allowed";
|
|
@@ -16388,8 +16124,8 @@ var getChipColors = (status) => {
|
|
|
16388
16124
|
};
|
|
16389
16125
|
};
|
|
16390
16126
|
var IAMPermissionItem = ({ event }) => {
|
|
16391
|
-
const [isOpen, setIsOpen] = (0,
|
|
16392
|
-
const parsedData = (0,
|
|
16127
|
+
const [isOpen, setIsOpen] = (0, import_react49.useState)(false);
|
|
16128
|
+
const parsedData = (0, import_react49.useMemo)(() => {
|
|
16393
16129
|
const payloadString = event.attributes?.payload;
|
|
16394
16130
|
if (!payloadString) {
|
|
16395
16131
|
return;
|
|
@@ -16459,15 +16195,15 @@ var DetailRow2 = ({ content, label }) => /* @__PURE__ */ (0, import_jsx_runtime1
|
|
|
16459
16195
|
) : content })
|
|
16460
16196
|
] });
|
|
16461
16197
|
var EventMessage = ({ event }) => {
|
|
16462
|
-
const [isOpen, setIsOpen] = (0,
|
|
16463
|
-
const [isOverflowing, setIsOverflowing] = (0,
|
|
16464
|
-
const textReference = (0,
|
|
16465
|
-
const parsedMessage = (0,
|
|
16466
|
-
const isIAMPolicyEvent = (0,
|
|
16198
|
+
const [isOpen, setIsOpen] = (0, import_react50.useState)(false);
|
|
16199
|
+
const [isOverflowing, setIsOverflowing] = (0, import_react50.useState)(false);
|
|
16200
|
+
const textReference = (0, import_react50.useRef)(null);
|
|
16201
|
+
const parsedMessage = (0, import_react50.useMemo)(() => parseEventMessage(event), [event]);
|
|
16202
|
+
const isIAMPolicyEvent = (0, import_react50.useMemo)(
|
|
16467
16203
|
() => event.event_type === "iam.policy_evaluation" && event.attributes?.payload && typeof event.attributes.payload === "string",
|
|
16468
16204
|
[event]
|
|
16469
16205
|
);
|
|
16470
|
-
(0,
|
|
16206
|
+
(0, import_react50.useEffect)(() => {
|
|
16471
16207
|
const checkOverflow = () => {
|
|
16472
16208
|
const element = textReference.current;
|
|
16473
16209
|
if (element) {
|
|
@@ -16480,11 +16216,11 @@ var EventMessage = ({ event }) => {
|
|
|
16480
16216
|
window.removeEventListener("resize", checkOverflow);
|
|
16481
16217
|
};
|
|
16482
16218
|
}, [parsedMessage.headline]);
|
|
16483
|
-
const hasAdditionalContent = (0,
|
|
16219
|
+
const hasAdditionalContent = (0, import_react50.useMemo)(
|
|
16484
16220
|
() => parsedMessage.message || parsedMessage.details || isIAMPolicyEvent,
|
|
16485
16221
|
[parsedMessage.message, parsedMessage.details, isIAMPolicyEvent]
|
|
16486
16222
|
);
|
|
16487
|
-
const shouldShowToggle = (0,
|
|
16223
|
+
const shouldShowToggle = (0, import_react50.useMemo)(
|
|
16488
16224
|
() => isOverflowing || hasAdditionalContent,
|
|
16489
16225
|
[isOverflowing, hasAdditionalContent]
|
|
16490
16226
|
);
|
|
@@ -16946,10 +16682,10 @@ var httpSigningMiddleware = (config) => (next, context) => async (args) => {
|
|
|
16946
16682
|
if (!scheme) {
|
|
16947
16683
|
throw new Error(`No HttpAuthScheme was selected: unable to sign request`);
|
|
16948
16684
|
}
|
|
16949
|
-
const { httpAuthOption: { signingProperties = {} }, identity
|
|
16685
|
+
const { httpAuthOption: { signingProperties = {} }, identity, signer } = scheme;
|
|
16950
16686
|
const output = await next({
|
|
16951
16687
|
...args,
|
|
16952
|
-
request: await signer.sign(args.request,
|
|
16688
|
+
request: await signer.sign(args.request, identity, signingProperties)
|
|
16953
16689
|
}).catch((signer.errorHandler || defaultErrorHandler)(signingProperties));
|
|
16954
16690
|
(signer.successHandler || defaultSuccessHandler)(output.response, signingProperties);
|
|
16955
16691
|
return output;
|
|
@@ -18556,12 +18292,12 @@ var DefaultIdentityProviderConfig = class {
|
|
|
18556
18292
|
};
|
|
18557
18293
|
|
|
18558
18294
|
// node_modules/@smithy/core/dist-es/util-identity-and-auth/memoizeIdentityProvider.js
|
|
18559
|
-
var createIsIdentityExpiredFunction = (expirationMs) => function isIdentityExpired2(
|
|
18560
|
-
return doesIdentityRequireRefresh(
|
|
18295
|
+
var createIsIdentityExpiredFunction = (expirationMs) => function isIdentityExpired2(identity) {
|
|
18296
|
+
return doesIdentityRequireRefresh(identity) && identity.expiration.getTime() - Date.now() < expirationMs;
|
|
18561
18297
|
};
|
|
18562
18298
|
var EXPIRATION_MS = 3e5;
|
|
18563
18299
|
var isIdentityExpired = createIsIdentityExpiredFunction(EXPIRATION_MS);
|
|
18564
|
-
var doesIdentityRequireRefresh = (
|
|
18300
|
+
var doesIdentityRequireRefresh = (identity) => identity.expiration !== void 0;
|
|
18565
18301
|
var memoizeIdentityProvider = (provider, isExpired, requiresRefresh) => {
|
|
18566
18302
|
if (provider === void 0) {
|
|
18567
18303
|
return void 0;
|
|
@@ -18767,13 +18503,13 @@ var getAttrPathList = (path) => {
|
|
|
18767
18503
|
};
|
|
18768
18504
|
|
|
18769
18505
|
// node_modules/@smithy/util-endpoints/dist-es/lib/getAttr.js
|
|
18770
|
-
var getAttr = (value, path) => getAttrPathList(path).reduce((acc,
|
|
18506
|
+
var getAttr = (value, path) => getAttrPathList(path).reduce((acc, index) => {
|
|
18771
18507
|
if (typeof acc !== "object") {
|
|
18772
|
-
throw new EndpointError(`Index '${
|
|
18508
|
+
throw new EndpointError(`Index '${index}' in '${path}' not found in '${JSON.stringify(value)}'`);
|
|
18773
18509
|
} else if (Array.isArray(acc)) {
|
|
18774
|
-
return acc[parseInt(
|
|
18510
|
+
return acc[parseInt(index)];
|
|
18775
18511
|
}
|
|
18776
|
-
return acc[
|
|
18512
|
+
return acc[index];
|
|
18777
18513
|
}, value);
|
|
18778
18514
|
|
|
18779
18515
|
// node_modules/@smithy/util-endpoints/dist-es/lib/isSet.js
|
|
@@ -19533,7 +19269,7 @@ var validateSigningProperties = async (signingProperties) => {
|
|
|
19533
19269
|
};
|
|
19534
19270
|
};
|
|
19535
19271
|
var AwsSdkSigV4Signer = class {
|
|
19536
|
-
async sign(httpRequest,
|
|
19272
|
+
async sign(httpRequest, identity, signingProperties) {
|
|
19537
19273
|
if (!HttpRequest.isInstance(httpRequest)) {
|
|
19538
19274
|
throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");
|
|
19539
19275
|
}
|
|
@@ -19580,7 +19316,7 @@ var AwsSdkSigV4Signer = class {
|
|
|
19580
19316
|
};
|
|
19581
19317
|
|
|
19582
19318
|
// node_modules/@smithy/property-provider/dist-es/memoize.js
|
|
19583
|
-
var
|
|
19319
|
+
var memoize = (provider, isExpired, requiresRefresh) => {
|
|
19584
19320
|
let resolved;
|
|
19585
19321
|
let pending;
|
|
19586
19322
|
let hasResult;
|
|
@@ -21935,9 +21671,9 @@ async function checkFeatures(context, config, args) {
|
|
|
21935
21671
|
break;
|
|
21936
21672
|
}
|
|
21937
21673
|
}
|
|
21938
|
-
const
|
|
21939
|
-
if (
|
|
21940
|
-
const credentials =
|
|
21674
|
+
const identity = context.__smithy_context?.selectedHttpAuthScheme?.identity;
|
|
21675
|
+
if (identity?.$source) {
|
|
21676
|
+
const credentials = identity;
|
|
21941
21677
|
if (credentials.accountId) {
|
|
21942
21678
|
setFeature2(context, "RESOLVED_ACCOUNT_ID", "T");
|
|
21943
21679
|
}
|
|
@@ -22020,8 +21756,8 @@ var escapeUserAgent = (userAgentPair) => {
|
|
|
22020
21756
|
if (prefix === "api") {
|
|
22021
21757
|
uaName = uaName.toLowerCase();
|
|
22022
21758
|
}
|
|
22023
|
-
return [prefix, uaName, version].filter((item) => item && item.length > 0).reduce((acc, item,
|
|
22024
|
-
switch (
|
|
21759
|
+
return [prefix, uaName, version].filter((item) => item && item.length > 0).reduce((acc, item, index) => {
|
|
21760
|
+
switch (index) {
|
|
22025
21761
|
case 0:
|
|
22026
21762
|
return item;
|
|
22027
21763
|
case 1:
|
|
@@ -24088,7 +23824,7 @@ var invalidProvider = (message) => () => Promise.reject(message);
|
|
|
24088
23824
|
var DEFAULTS_MODE_OPTIONS = ["in-region", "cross-region", "mobile", "standard", "legacy"];
|
|
24089
23825
|
|
|
24090
23826
|
// node_modules/@smithy/util-defaults-mode-browser/dist-es/resolveDefaultsModeConfig.js
|
|
24091
|
-
var resolveDefaultsModeConfig = ({ defaultsMode } = {}) =>
|
|
23827
|
+
var resolveDefaultsModeConfig = ({ defaultsMode } = {}) => memoize(async () => {
|
|
24092
23828
|
const mode = typeof defaultsMode === "function" ? await defaultsMode() : defaultsMode;
|
|
24093
23829
|
switch (mode?.toLowerCase()) {
|
|
24094
23830
|
case "auto":
|
|
@@ -26210,11 +25946,11 @@ var getHttpAuthExtensionConfiguration = (runtimeConfig) => {
|
|
|
26210
25946
|
let _credentials = runtimeConfig.credentials;
|
|
26211
25947
|
return {
|
|
26212
25948
|
setHttpAuthScheme(httpAuthScheme) {
|
|
26213
|
-
const
|
|
26214
|
-
if (
|
|
25949
|
+
const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);
|
|
25950
|
+
if (index === -1) {
|
|
26215
25951
|
_httpAuthSchemes.push(httpAuthScheme);
|
|
26216
25952
|
} else {
|
|
26217
|
-
_httpAuthSchemes.splice(
|
|
25953
|
+
_httpAuthSchemes.splice(index, 1, httpAuthScheme);
|
|
26218
25954
|
}
|
|
26219
25955
|
},
|
|
26220
25956
|
httpAuthSchemes() {
|
|
@@ -26311,7 +26047,7 @@ var QueryStatus = {
|
|
|
26311
26047
|
|
|
26312
26048
|
// src/components/event-details/lambda-invoke-logs-section.tsx
|
|
26313
26049
|
var import_material12 = require("@mui/material");
|
|
26314
|
-
var
|
|
26050
|
+
var import_react51 = require("react");
|
|
26315
26051
|
var import_jsx_runtime134 = require("react/jsx-runtime");
|
|
26316
26052
|
var POLL_INTERVAL_MS = 1e3;
|
|
26317
26053
|
async function pollQueryResults(client, queryId) {
|
|
@@ -26329,7 +26065,7 @@ async function startLambdaLogsQuery(client, functionName2, requestId, startTimeS
|
|
|
26329
26065
|
}
|
|
26330
26066
|
function useCloudWatchLogsClient(region) {
|
|
26331
26067
|
const { localstackEndpoint } = useAppInspector();
|
|
26332
|
-
const client = (0,
|
|
26068
|
+
const client = (0, import_react51.useMemo)(() => new CloudWatchLogsClient({
|
|
26333
26069
|
credentials: {
|
|
26334
26070
|
accessKeyId: "test",
|
|
26335
26071
|
secretAccessKey: "test"
|
|
@@ -26340,12 +26076,12 @@ function useCloudWatchLogsClient(region) {
|
|
|
26340
26076
|
return client;
|
|
26341
26077
|
}
|
|
26342
26078
|
function useLambdaInvokeLogs(functionName2, requestId, region, startTimeNano, endTimeNano) {
|
|
26343
|
-
const [loading, setLoading] = (0,
|
|
26344
|
-
const [logs, setLogs] = (0,
|
|
26345
|
-
const [error, setError] = (0,
|
|
26346
|
-
const pollTimerRef = (0,
|
|
26079
|
+
const [loading, setLoading] = (0, import_react51.useState)(true);
|
|
26080
|
+
const [logs, setLogs] = (0, import_react51.useState)([]);
|
|
26081
|
+
const [error, setError] = (0, import_react51.useState)();
|
|
26082
|
+
const pollTimerRef = (0, import_react51.useRef)(null);
|
|
26347
26083
|
const cloudWatchLogs = useCloudWatchLogsClient(region);
|
|
26348
|
-
(0,
|
|
26084
|
+
(0, import_react51.useEffect)(() => {
|
|
26349
26085
|
let cancelled = false;
|
|
26350
26086
|
const startTimeSec = Math.floor(Number(BigInt(startTimeNano) / BigInt(1e9)));
|
|
26351
26087
|
const endTimeSec = Math.ceil(Number(BigInt(endTimeNano) / BigInt(1e9)));
|
|
@@ -26419,10 +26155,10 @@ var LambdaInvokeLogsSection = ({ endTimeNano, functionName: functionName2, regio
|
|
|
26419
26155
|
// src/components/event-details/toggle-section.tsx
|
|
26420
26156
|
var import_icons_material7 = require("@mui/icons-material");
|
|
26421
26157
|
var import_material13 = require("@mui/material");
|
|
26422
|
-
var
|
|
26158
|
+
var import_react52 = require("react");
|
|
26423
26159
|
var import_jsx_runtime135 = require("react/jsx-runtime");
|
|
26424
26160
|
var ToggleSection = ({ action, children, headline, initialOpen = true }) => {
|
|
26425
|
-
const [isOpen, setIsOpen] = (0,
|
|
26161
|
+
const [isOpen, setIsOpen] = (0, import_react52.useState)(initialOpen);
|
|
26426
26162
|
return /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)(import_material13.Box, { sx: { mt: 4 }, children: [
|
|
26427
26163
|
/* @__PURE__ */ (0, import_jsx_runtime135.jsxs)(
|
|
26428
26164
|
import_material13.Box,
|
|
@@ -26489,11 +26225,11 @@ var checkIsSqsSendMessage = (span) => {
|
|
|
26489
26225
|
return span.operation_name.startsWith("SendMessage");
|
|
26490
26226
|
};
|
|
26491
26227
|
var EventDetails = ({ onClose, selectedEvent }) => {
|
|
26492
|
-
const eventGroups = (0,
|
|
26228
|
+
const eventGroups = (0, import_react53.useMemo)(
|
|
26493
26229
|
() => getEventGroupsByType(selectedEvent?.events ?? []),
|
|
26494
26230
|
[selectedEvent?.events]
|
|
26495
26231
|
);
|
|
26496
|
-
const [parseNestedJson, setParseNestedJson] = (0,
|
|
26232
|
+
const [parseNestedJson, setParseNestedJson] = (0, import_react53.useState)(true);
|
|
26497
26233
|
if (!selectedEvent) {
|
|
26498
26234
|
return /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(import_material14.Box, { sx: { p: 3, textAlign: "center" }, children: /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(import_material14.Typography, { color: "text.secondary", variant: "body2", children: "Select an event to view details" }) });
|
|
26499
26235
|
}
|
|
@@ -26662,7 +26398,7 @@ var EventDetails = ({ onClose, selectedEvent }) => {
|
|
|
26662
26398
|
] }) })
|
|
26663
26399
|
] });
|
|
26664
26400
|
};
|
|
26665
|
-
var PayloadViewer = (0,
|
|
26401
|
+
var PayloadViewer = (0, import_react53.memo)(({ value }) => {
|
|
26666
26402
|
const theme = (0, import_material14.useTheme)();
|
|
26667
26403
|
return /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(import_material14.Box, { sx: { backgroundColor: "background.default", borderRadius: 1, fontSize: 12, overflow: "auto", p: 1 }, children: /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(
|
|
26668
26404
|
JsonViewer,
|
|
@@ -26680,22 +26416,22 @@ var PayloadViewer = (0, import_react54.memo)(({ value }) => {
|
|
|
26680
26416
|
// src/components/trace-graph/trace-graph.tsx
|
|
26681
26417
|
var import_base = require("@xyflow/react/dist/base.css");
|
|
26682
26418
|
var import_material18 = require("@mui/material");
|
|
26683
|
-
var
|
|
26684
|
-
var
|
|
26419
|
+
var import_react59 = require("@xyflow/react");
|
|
26420
|
+
var import_react60 = require("react");
|
|
26685
26421
|
|
|
26686
26422
|
// src/components/trace-graph/service-node.tsx
|
|
26687
26423
|
var import_material16 = require("@mui/material");
|
|
26688
26424
|
var import_style = require("@xyflow/react/dist/style.css");
|
|
26689
|
-
var
|
|
26690
|
-
var
|
|
26425
|
+
var import_react55 = require("@xyflow/react");
|
|
26426
|
+
var import_react56 = require("react");
|
|
26691
26427
|
|
|
26692
26428
|
// src/components/trace-graph/problem-indicator.tsx
|
|
26693
26429
|
var import_icons_material9 = require("@mui/icons-material");
|
|
26694
26430
|
var import_material15 = require("@mui/material");
|
|
26695
|
-
var
|
|
26431
|
+
var import_react54 = require("react");
|
|
26696
26432
|
var import_jsx_runtime137 = require("react/jsx-runtime");
|
|
26697
26433
|
var ProblemIndicator = ({ error }) => {
|
|
26698
|
-
const icon = (0,
|
|
26434
|
+
const icon = (0, import_react54.useMemo)(() => {
|
|
26699
26435
|
switch (error.level) {
|
|
26700
26436
|
case "error": {
|
|
26701
26437
|
return /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(import_icons_material9.Error, { sx: { color: "#d32f2f", fontSize: "14px" } });
|
|
@@ -26708,7 +26444,7 @@ var ProblemIndicator = ({ error }) => {
|
|
|
26708
26444
|
}
|
|
26709
26445
|
}
|
|
26710
26446
|
}, [error.level]);
|
|
26711
|
-
const color2 = (0,
|
|
26447
|
+
const color2 = (0, import_react54.useMemo)(() => {
|
|
26712
26448
|
switch (error.level) {
|
|
26713
26449
|
case "error": {
|
|
26714
26450
|
return "#d32f2f";
|
|
@@ -26747,7 +26483,7 @@ var handleStyle = {
|
|
|
26747
26483
|
borderColor: "lightgray",
|
|
26748
26484
|
opacity: 0
|
|
26749
26485
|
};
|
|
26750
|
-
var ServiceNode = (0,
|
|
26486
|
+
var ServiceNode = (0, import_react56.memo)(({ data, selected }) => {
|
|
26751
26487
|
const hasErrors = (data.event.errors && data.event.errors.length > 0) ?? false;
|
|
26752
26488
|
return /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)(import_material16.Box, { sx: { maxWidth: 200 }, children: [
|
|
26753
26489
|
/* @__PURE__ */ (0, import_jsx_runtime138.jsxs)(
|
|
@@ -26771,8 +26507,8 @@ var ServiceNode = (0, import_react57.memo)(({ data, selected }) => {
|
|
|
26771
26507
|
},
|
|
26772
26508
|
tabIndex: 0,
|
|
26773
26509
|
children: [
|
|
26774
|
-
/* @__PURE__ */ (0, import_jsx_runtime138.jsx)(
|
|
26775
|
-
/* @__PURE__ */ (0, import_jsx_runtime138.jsx)(
|
|
26510
|
+
/* @__PURE__ */ (0, import_jsx_runtime138.jsx)(import_react55.Handle, { position: import_react55.Position.Left, style: handleStyle, type: "target" }),
|
|
26511
|
+
/* @__PURE__ */ (0, import_jsx_runtime138.jsx)(import_react55.Handle, { position: import_react55.Position.Right, style: handleStyle, type: "source" }),
|
|
26776
26512
|
/* @__PURE__ */ (0, import_jsx_runtime138.jsx)(
|
|
26777
26513
|
ServiceCell,
|
|
26778
26514
|
{
|
|
@@ -26862,57 +26598,18 @@ var getLayoutedNodesAndEdges = (inputNodes, inputEdges) => {
|
|
|
26862
26598
|
// src/components/trace-graph/xyflow/controls.tsx
|
|
26863
26599
|
var import_icons_material10 = require("@mui/icons-material");
|
|
26864
26600
|
var import_material17 = require("@mui/material");
|
|
26865
|
-
var
|
|
26866
|
-
var
|
|
26867
|
-
|
|
26868
|
-
// node_modules/zustand/esm/shallow.mjs
|
|
26869
|
-
function shallow$1(objA, objB) {
|
|
26870
|
-
if (Object.is(objA, objB)) {
|
|
26871
|
-
return true;
|
|
26872
|
-
}
|
|
26873
|
-
if (typeof objA !== "object" || objA === null || typeof objB !== "object" || objB === null) {
|
|
26874
|
-
return false;
|
|
26875
|
-
}
|
|
26876
|
-
if (objA instanceof Map && objB instanceof Map) {
|
|
26877
|
-
if (objA.size !== objB.size) return false;
|
|
26878
|
-
for (const [key, value] of objA) {
|
|
26879
|
-
if (!Object.is(value, objB.get(key))) {
|
|
26880
|
-
return false;
|
|
26881
|
-
}
|
|
26882
|
-
}
|
|
26883
|
-
return true;
|
|
26884
|
-
}
|
|
26885
|
-
if (objA instanceof Set && objB instanceof Set) {
|
|
26886
|
-
if (objA.size !== objB.size) return false;
|
|
26887
|
-
for (const value of objA) {
|
|
26888
|
-
if (!objB.has(value)) {
|
|
26889
|
-
return false;
|
|
26890
|
-
}
|
|
26891
|
-
}
|
|
26892
|
-
return true;
|
|
26893
|
-
}
|
|
26894
|
-
const keysA = Object.keys(objA);
|
|
26895
|
-
if (keysA.length !== Object.keys(objB).length) {
|
|
26896
|
-
return false;
|
|
26897
|
-
}
|
|
26898
|
-
for (const keyA of keysA) {
|
|
26899
|
-
if (!Object.prototype.hasOwnProperty.call(objB, keyA) || !Object.is(objA[keyA], objB[keyA])) {
|
|
26900
|
-
return false;
|
|
26901
|
-
}
|
|
26902
|
-
}
|
|
26903
|
-
return true;
|
|
26904
|
-
}
|
|
26905
|
-
|
|
26906
|
-
// src/components/trace-graph/xyflow/controls.tsx
|
|
26601
|
+
var import_react57 = require("@xyflow/react");
|
|
26602
|
+
var import_react58 = require("react");
|
|
26603
|
+
var import_shallow = require("zustand/shallow");
|
|
26907
26604
|
var import_jsx_runtime139 = require("react/jsx-runtime");
|
|
26908
26605
|
var selector = (s2) => ({
|
|
26909
26606
|
isInteractive: s2.nodesDraggable || s2.nodesConnectable || s2.elementsSelectable,
|
|
26910
26607
|
maxZoomReached: s2.transform[2] >= s2.maxZoom,
|
|
26911
26608
|
minZoomReached: s2.transform[2] <= s2.minZoom
|
|
26912
26609
|
});
|
|
26913
|
-
var Controls = (0,
|
|
26914
|
-
const { maxZoomReached, minZoomReached } = (0,
|
|
26915
|
-
const { fitView, zoomIn, zoomOut } = (0,
|
|
26610
|
+
var Controls = (0, import_react58.memo)(() => {
|
|
26611
|
+
const { maxZoomReached, minZoomReached } = (0, import_react57.useStore)(selector, import_shallow.shallow);
|
|
26612
|
+
const { fitView, zoomIn, zoomOut } = (0, import_react57.useReactFlow)();
|
|
26916
26613
|
const onZoomInHandler = () => {
|
|
26917
26614
|
void zoomIn();
|
|
26918
26615
|
};
|
|
@@ -26981,9 +26678,9 @@ var TraceGraph = ({
|
|
|
26981
26678
|
onRefresh,
|
|
26982
26679
|
spans
|
|
26983
26680
|
}) => {
|
|
26984
|
-
const [nodes, setNodes, onNodesChange] = (0,
|
|
26985
|
-
const [edges, setEdges] = (0,
|
|
26986
|
-
(0,
|
|
26681
|
+
const [nodes, setNodes, onNodesChange] = (0, import_react59.useNodesState)([]);
|
|
26682
|
+
const [edges, setEdges] = (0, import_react59.useEdgesState)([]);
|
|
26683
|
+
(0, import_react60.useEffect)(() => {
|
|
26987
26684
|
const allNodes = [];
|
|
26988
26685
|
const allEdges = [];
|
|
26989
26686
|
for (const span of spans.data ?? []) {
|
|
@@ -26998,15 +26695,15 @@ var TraceGraph = ({
|
|
|
26998
26695
|
},
|
|
26999
26696
|
id: span.span_id,
|
|
27000
26697
|
position: { x: 0, y: 0 },
|
|
27001
|
-
sourcePosition:
|
|
27002
|
-
targetPosition:
|
|
26698
|
+
sourcePosition: import_react59.Position.Right,
|
|
26699
|
+
targetPosition: import_react59.Position.Left,
|
|
27003
26700
|
type: "service"
|
|
27004
26701
|
});
|
|
27005
26702
|
if (span.parent_span_id !== null) {
|
|
27006
26703
|
allEdges.push({
|
|
27007
26704
|
animated: false,
|
|
27008
26705
|
id: `e-${span.parent_span_id}-${span.span_id}`,
|
|
27009
|
-
markerEnd: { color: "lightgray", height: 16, type:
|
|
26706
|
+
markerEnd: { color: "lightgray", height: 16, type: import_react59.MarkerType.Arrow, width: 16 },
|
|
27010
26707
|
source: span.parent_span_id,
|
|
27011
26708
|
style: { stroke: "lightgray", strokeWidth: 1 },
|
|
27012
26709
|
target: span.span_id
|
|
@@ -27015,7 +26712,7 @@ var TraceGraph = ({
|
|
|
27015
26712
|
for (const linkedSpanId of span.linked_span_ids ?? []) {
|
|
27016
26713
|
allEdges.push({
|
|
27017
26714
|
id: `e-link-${linkedSpanId}-${span.span_id}`,
|
|
27018
|
-
markerEnd: { color: "lightgray", height: 16, type:
|
|
26715
|
+
markerEnd: { color: "lightgray", height: 16, type: import_react59.MarkerType.Arrow, width: 16 },
|
|
27019
26716
|
source: linkedSpanId,
|
|
27020
26717
|
style: { stroke: "lightgray", strokeWidth: 1 },
|
|
27021
26718
|
// animated: true,
|
|
@@ -27050,7 +26747,7 @@ var TraceGraph = ({
|
|
|
27050
26747
|
}
|
|
27051
26748
|
),
|
|
27052
26749
|
/* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(
|
|
27053
|
-
|
|
26750
|
+
import_react59.ReactFlow,
|
|
27054
26751
|
{
|
|
27055
26752
|
"data-testid": "trace-graph",
|
|
27056
26753
|
edges,
|
|
@@ -27069,7 +26766,7 @@ var TraceGraph = ({
|
|
|
27069
26766
|
children: [
|
|
27070
26767
|
/* @__PURE__ */ (0, import_jsx_runtime140.jsx)(Controls, {}),
|
|
27071
26768
|
/* @__PURE__ */ (0, import_jsx_runtime140.jsx)(
|
|
27072
|
-
|
|
26769
|
+
import_react59.Background,
|
|
27073
26770
|
{
|
|
27074
26771
|
bgColor: theme.palette.background.paper,
|
|
27075
26772
|
color: theme.palette.text.disabled
|
|
@@ -27174,7 +26871,7 @@ var TraceGraphView = ({
|
|
|
27174
26871
|
height: "100%",
|
|
27175
26872
|
overflow: "auto"
|
|
27176
26873
|
},
|
|
27177
|
-
children: traceId !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(
|
|
26874
|
+
children: traceId !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_react61.ReactFlowProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(
|
|
27178
26875
|
TraceGraph,
|
|
27179
26876
|
{
|
|
27180
26877
|
initialFocusEventId: spanId,
|
|
@@ -27235,10 +26932,10 @@ async function fetchConnectedTraces(api, traceIds, allSpans = /* @__PURE__ */ ne
|
|
|
27235
26932
|
}
|
|
27236
26933
|
var TraceGraphPage = ({ onClose, spanId, traceId }) => {
|
|
27237
26934
|
const api = useAppInspectorApi();
|
|
27238
|
-
const [spans, setSpans] = (0,
|
|
27239
|
-
const [loading, setLoading] = (0,
|
|
27240
|
-
const [fetchError, setFetchError] = (0,
|
|
27241
|
-
const fetchSpans = (0,
|
|
26935
|
+
const [spans, setSpans] = (0, import_react62.useState)();
|
|
26936
|
+
const [loading, setLoading] = (0, import_react62.useState)(false);
|
|
26937
|
+
const [fetchError, setFetchError] = (0, import_react62.useState)();
|
|
26938
|
+
const fetchSpans = (0, import_react62.useCallback)(async () => {
|
|
27242
26939
|
setLoading(true);
|
|
27243
26940
|
try {
|
|
27244
26941
|
const spans2 = await fetchConnectedTraces(api, [traceId]);
|
|
@@ -27251,28 +26948,28 @@ var TraceGraphPage = ({ onClose, spanId, traceId }) => {
|
|
|
27251
26948
|
setLoading(false);
|
|
27252
26949
|
}
|
|
27253
26950
|
}, [api, traceId]);
|
|
27254
|
-
(0,
|
|
26951
|
+
(0, import_react62.useEffect)(() => {
|
|
27255
26952
|
void fetchSpans();
|
|
27256
26953
|
}, [fetchSpans]);
|
|
27257
|
-
const [open, setOpen] = (0,
|
|
27258
|
-
const [selectedEvent, setSelectedEvent] = (0,
|
|
27259
|
-
const spansReference = (0,
|
|
27260
|
-
(0,
|
|
26954
|
+
const [open, setOpen] = (0, import_react62.useState)(true);
|
|
26955
|
+
const [selectedEvent, setSelectedEvent] = (0, import_react62.useState)(() => spans?.find((span) => span.span_id === spanId));
|
|
26956
|
+
const spansReference = (0, import_react62.useRef)();
|
|
26957
|
+
(0, import_react62.useEffect)(() => {
|
|
27261
26958
|
if (!spansReference.current && spans) {
|
|
27262
26959
|
setSelectedEvent(spans.find((span) => span.span_id === spanId));
|
|
27263
26960
|
spansReference.current = spans;
|
|
27264
26961
|
}
|
|
27265
26962
|
}, [spans, setSelectedEvent, spanId]);
|
|
27266
26963
|
const { checkStatus, error: statusError, status } = useStatus();
|
|
27267
|
-
const handleEventSelect = (0,
|
|
26964
|
+
const handleEventSelect = (0, import_react62.useCallback)((spanId2) => {
|
|
27268
26965
|
const span = spans?.find((s2) => s2.span_id === spanId2);
|
|
27269
26966
|
setSelectedEvent(span);
|
|
27270
26967
|
setOpen(true);
|
|
27271
26968
|
}, [spans]);
|
|
27272
|
-
const handleRetry = (0,
|
|
26969
|
+
const handleRetry = (0, import_react62.useCallback)(() => {
|
|
27273
26970
|
void checkStatus();
|
|
27274
26971
|
}, [checkStatus]);
|
|
27275
|
-
const navigateToSpansList = (0,
|
|
26972
|
+
const navigateToSpansList = (0, import_react62.useCallback)(() => {
|
|
27276
26973
|
onClose?.();
|
|
27277
26974
|
}, [onClose]);
|
|
27278
26975
|
return /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(
|
|
@@ -27318,17 +27015,17 @@ var SpansListPage = () => {
|
|
|
27318
27015
|
streamPaused,
|
|
27319
27016
|
toggleStream
|
|
27320
27017
|
} = useSpans();
|
|
27321
|
-
const clearSpansSync = (0,
|
|
27018
|
+
const clearSpansSync = (0, import_react63.useCallback)(() => {
|
|
27322
27019
|
void clearSpans();
|
|
27323
27020
|
}, [clearSpans]);
|
|
27324
27021
|
const [order2, setOrder] = useLocalStorage("spans-order", "oldest_first");
|
|
27325
|
-
const [selectedTraceId, setSelectedTraceId] = (0,
|
|
27326
|
-
const [selectedSpanId, setSelectedSpanId] = (0,
|
|
27327
|
-
const navigateToSpan = (0,
|
|
27022
|
+
const [selectedTraceId, setSelectedTraceId] = (0, import_react63.useState)();
|
|
27023
|
+
const [selectedSpanId, setSelectedSpanId] = (0, import_react63.useState)();
|
|
27024
|
+
const navigateToSpan = (0, import_react63.useCallback)((span) => {
|
|
27328
27025
|
setSelectedTraceId(span.trace_id);
|
|
27329
27026
|
setSelectedSpanId(span.span_id);
|
|
27330
27027
|
}, []);
|
|
27331
|
-
const handleRetry = (0,
|
|
27028
|
+
const handleRetry = (0, import_react63.useCallback)(() => {
|
|
27332
27029
|
void checkStatus();
|
|
27333
27030
|
}, [checkStatus]);
|
|
27334
27031
|
const shouldShowStatusMessage = Boolean(statusError) || status?.status === "DISABLED";
|
|
@@ -27394,28 +27091,6 @@ var pages = {
|
|
|
27394
27091
|
};
|
|
27395
27092
|
/*! Bundled license information:
|
|
27396
27093
|
|
|
27397
|
-
use-sync-external-store/cjs/use-sync-external-store-shim.development.js:
|
|
27398
|
-
(**
|
|
27399
|
-
* @license React
|
|
27400
|
-
* use-sync-external-store-shim.development.js
|
|
27401
|
-
*
|
|
27402
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
27403
|
-
*
|
|
27404
|
-
* This source code is licensed under the MIT license found in the
|
|
27405
|
-
* LICENSE file in the root directory of this source tree.
|
|
27406
|
-
*)
|
|
27407
|
-
|
|
27408
|
-
use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js:
|
|
27409
|
-
(**
|
|
27410
|
-
* @license React
|
|
27411
|
-
* use-sync-external-store-shim/with-selector.development.js
|
|
27412
|
-
*
|
|
27413
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
27414
|
-
*
|
|
27415
|
-
* This source code is licensed under the MIT license found in the
|
|
27416
|
-
* LICENSE file in the root directory of this source tree.
|
|
27417
|
-
*)
|
|
27418
|
-
|
|
27419
27094
|
@tanstack/table-core/build/lib/index.mjs:
|
|
27420
27095
|
(**
|
|
27421
27096
|
* table-core
|