@localstack/appinspector-ui 1.0.73 → 1.0.75
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 +203 -527
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +64 -387
- 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
|
);
|
|
@@ -13954,9 +13762,10 @@ var useAppInspector = () => {
|
|
|
13954
13762
|
return context;
|
|
13955
13763
|
};
|
|
13956
13764
|
var AppInspectorContextProvider = (props) => {
|
|
13957
|
-
const api = (0, import_react45.useMemo)(
|
|
13958
|
-
|
|
13959
|
-
|
|
13765
|
+
const api = (0, import_react45.useMemo)(
|
|
13766
|
+
() => createApiClient({ localstackEndpoint: props.localstackEndpoint }),
|
|
13767
|
+
[props.localstackEndpoint]
|
|
13768
|
+
);
|
|
13960
13769
|
const resolveLink = (0, import_react45.useCallback)(
|
|
13961
13770
|
(options) => {
|
|
13962
13771
|
if (options.to === "settings") {
|
|
@@ -14141,8 +13950,8 @@ var useSpans = () => {
|
|
|
14141
13950
|
var import_icons_material11 = require("@mui/icons-material");
|
|
14142
13951
|
var import_material19 = require("@mui/material");
|
|
14143
13952
|
var import_styles = require("@mui/material/styles");
|
|
14144
|
-
var
|
|
14145
|
-
var
|
|
13953
|
+
var import_react61 = require("@xyflow/react");
|
|
13954
|
+
var import_react62 = require("react");
|
|
14146
13955
|
|
|
14147
13956
|
// src/components/event-details/event-details.tsx
|
|
14148
13957
|
var import_icons_material8 = require("@mui/icons-material");
|
|
@@ -14151,80 +13960,8 @@ var import_material14 = require("@mui/material");
|
|
|
14151
13960
|
// node_modules/@textea/json-viewer/dist/index.mjs
|
|
14152
13961
|
var import_jsx_runtime129 = require("react/jsx-runtime");
|
|
14153
13962
|
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
|
|
13963
|
+
var import_react48 = require("react");
|
|
13964
|
+
var import_zustand = require("zustand");
|
|
14228
13965
|
var import_copy_to_clipboard = __toESM(require_copy_to_clipboard(), 1);
|
|
14229
13966
|
function r(e2) {
|
|
14230
13967
|
var t2, f2, n2 = "";
|
|
@@ -14282,7 +14019,7 @@ var darkColorspace = {
|
|
|
14282
14019
|
var DefaultKeyRenderer = () => null;
|
|
14283
14020
|
DefaultKeyRenderer.when = () => false;
|
|
14284
14021
|
var createJsonViewerStore = (props) => {
|
|
14285
|
-
return create()((set, get) => {
|
|
14022
|
+
return (0, import_zustand.create)()((set, get) => {
|
|
14286
14023
|
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
14024
|
return {
|
|
14288
14025
|
// provided by user
|
|
@@ -14340,11 +14077,11 @@ var createJsonViewerStore = (props) => {
|
|
|
14340
14077
|
};
|
|
14341
14078
|
});
|
|
14342
14079
|
};
|
|
14343
|
-
var JsonViewerStoreContext = (0,
|
|
14080
|
+
var JsonViewerStoreContext = (0, import_react48.createContext)(void 0);
|
|
14344
14081
|
JsonViewerStoreContext.Provider;
|
|
14345
14082
|
var useJsonViewerStore = (selector2, equalityFn) => {
|
|
14346
|
-
const store = (0,
|
|
14347
|
-
return useStore(store, selector2, equalityFn);
|
|
14083
|
+
const store = (0, import_react48.useContext)(JsonViewerStoreContext);
|
|
14084
|
+
return (0, import_zustand.useStore)(store, selector2, equalityFn);
|
|
14348
14085
|
};
|
|
14349
14086
|
var useTextColor = () => {
|
|
14350
14087
|
return useJsonViewerStore((store) => store.colorspace.base07);
|
|
@@ -14412,10 +14149,10 @@ function getValueSize(value) {
|
|
|
14412
14149
|
}
|
|
14413
14150
|
function segmentArray(arr, size) {
|
|
14414
14151
|
const result = [];
|
|
14415
|
-
let
|
|
14416
|
-
while (
|
|
14417
|
-
result.push(arr.slice(
|
|
14418
|
-
|
|
14152
|
+
let index = 0;
|
|
14153
|
+
while (index < arr.length) {
|
|
14154
|
+
result.push(arr.slice(index, index + size));
|
|
14155
|
+
index += size;
|
|
14419
14156
|
}
|
|
14420
14157
|
return result;
|
|
14421
14158
|
}
|
|
@@ -14468,9 +14205,9 @@ async function copyString(value) {
|
|
|
14468
14205
|
}
|
|
14469
14206
|
function useClipboard() {
|
|
14470
14207
|
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,
|
|
14208
|
+
const [copied, setCopied] = (0, import_react48.useState)(false);
|
|
14209
|
+
const copyTimeout = (0, import_react48.useRef)(null);
|
|
14210
|
+
const handleCopyResult = (0, import_react48.useCallback)((value) => {
|
|
14474
14211
|
const current = copyTimeout.current;
|
|
14475
14212
|
if (current) {
|
|
14476
14213
|
window.clearTimeout(current);
|
|
@@ -14481,7 +14218,7 @@ function useClipboard() {
|
|
|
14481
14218
|
timeout
|
|
14482
14219
|
]);
|
|
14483
14220
|
const onCopy = useJsonViewerStore((store) => store.onCopy);
|
|
14484
|
-
const copy = (0,
|
|
14221
|
+
const copy = (0, import_react48.useCallback)(async (path, value) => {
|
|
14485
14222
|
if (typeof onCopy === "function") {
|
|
14486
14223
|
try {
|
|
14487
14224
|
await onCopy(path, value, copyString);
|
|
@@ -14502,7 +14239,7 @@ function useClipboard() {
|
|
|
14502
14239
|
handleCopyResult,
|
|
14503
14240
|
onCopy
|
|
14504
14241
|
]);
|
|
14505
|
-
const reset = (0,
|
|
14242
|
+
const reset = (0, import_react48.useCallback)(() => {
|
|
14506
14243
|
setCopied(false);
|
|
14507
14244
|
if (copyTimeout.current) {
|
|
14508
14245
|
clearTimeout(copyTimeout.current);
|
|
@@ -14516,7 +14253,7 @@ function useClipboard() {
|
|
|
14516
14253
|
}
|
|
14517
14254
|
function useIsCycleReference(path, value) {
|
|
14518
14255
|
const rootValue = useJsonViewerStore((store) => store.value);
|
|
14519
|
-
return (0,
|
|
14256
|
+
return (0, import_react48.useMemo)(() => isCycleReference(rootValue, path, value), [
|
|
14520
14257
|
path,
|
|
14521
14258
|
value,
|
|
14522
14259
|
rootValue
|
|
@@ -14529,7 +14266,7 @@ function useInspect(path, value, nestedIndex) {
|
|
|
14529
14266
|
const setInspectCache = useJsonViewerStore((store) => store.setInspectCache);
|
|
14530
14267
|
const defaultInspectDepth = useJsonViewerStore((store) => store.defaultInspectDepth);
|
|
14531
14268
|
const defaultInspectControl = useJsonViewerStore((store) => store.defaultInspectControl);
|
|
14532
|
-
(0,
|
|
14269
|
+
(0, import_react48.useEffect)(() => {
|
|
14533
14270
|
const inspect2 = getInspectCache(path, nestedIndex);
|
|
14534
14271
|
if (inspect2 !== void 0) {
|
|
14535
14272
|
return;
|
|
@@ -14551,7 +14288,7 @@ function useInspect(path, value, nestedIndex) {
|
|
|
14551
14288
|
value,
|
|
14552
14289
|
setInspectCache
|
|
14553
14290
|
]);
|
|
14554
|
-
const [inspect, set] = (0,
|
|
14291
|
+
const [inspect, set] = (0, import_react48.useState)(() => {
|
|
14555
14292
|
const shouldInspect = getInspectCache(path, nestedIndex);
|
|
14556
14293
|
if (shouldInspect !== void 0) {
|
|
14557
14294
|
return shouldInspect;
|
|
@@ -14561,7 +14298,7 @@ function useInspect(path, value, nestedIndex) {
|
|
|
14561
14298
|
}
|
|
14562
14299
|
return isTrap ? false : typeof defaultInspectControl === "function" ? defaultInspectControl(path, value) : depth < defaultInspectDepth;
|
|
14563
14300
|
});
|
|
14564
|
-
const setInspect = (0,
|
|
14301
|
+
const setInspect = (0, import_react48.useCallback)((apply) => {
|
|
14565
14302
|
set((oldState) => {
|
|
14566
14303
|
const newState = typeof apply === "boolean" ? apply : apply(oldState);
|
|
14567
14304
|
setInspectCache(path, newState, nestedIndex);
|
|
@@ -14601,7 +14338,7 @@ var DataTypeLabel = (param) => {
|
|
|
14601
14338
|
};
|
|
14602
14339
|
function defineEasyType(param) {
|
|
14603
14340
|
let { is, serialize, deserialize, type, colorKey, displayTypeLabel = true, Renderer } = param;
|
|
14604
|
-
const Render = /* @__PURE__ */ (0,
|
|
14341
|
+
const Render = /* @__PURE__ */ (0, import_react48.memo)(Renderer);
|
|
14605
14342
|
const EasyType = (props) => {
|
|
14606
14343
|
const storeDisplayDataTypes = useJsonViewerStore((store) => store.displayDataTypes);
|
|
14607
14344
|
const color2 = useJsonViewerStore((store) => store.colorspace[colorKey]);
|
|
@@ -14638,7 +14375,7 @@ function defineEasyType(param) {
|
|
|
14638
14375
|
const EasyTypeEditor = (param2) => {
|
|
14639
14376
|
let { value, setValue, abortEditing, commitEditing } = param2;
|
|
14640
14377
|
const color2 = useJsonViewerStore((store) => store.colorspace[colorKey]);
|
|
14641
|
-
const handleKeyDown = (0,
|
|
14378
|
+
const handleKeyDown = (0, import_react48.useCallback)((event) => {
|
|
14642
14379
|
if (event.key === "Enter") {
|
|
14643
14380
|
event.preventDefault();
|
|
14644
14381
|
commitEditing(value);
|
|
@@ -14652,7 +14389,7 @@ function defineEasyType(param) {
|
|
|
14652
14389
|
commitEditing,
|
|
14653
14390
|
value
|
|
14654
14391
|
]);
|
|
14655
|
-
const handleChange = (0,
|
|
14392
|
+
const handleChange = (0, import_react48.useCallback)((event) => {
|
|
14656
14393
|
setValue(event.target.value);
|
|
14657
14394
|
}, [
|
|
14658
14395
|
setValue
|
|
@@ -14977,17 +14714,17 @@ function inspectMetadata(value) {
|
|
|
14977
14714
|
var PreObjectType = (props) => {
|
|
14978
14715
|
const metadataColor = useJsonViewerStore((store) => store.colorspace.base04);
|
|
14979
14716
|
const textColor = useTextColor();
|
|
14980
|
-
const isArrayLike = (0,
|
|
14717
|
+
const isArrayLike = (0, import_react48.useMemo)(() => Array.isArray(props.value) || props.value instanceof Set, [
|
|
14981
14718
|
props.value
|
|
14982
14719
|
]);
|
|
14983
|
-
const isEmptyValue = (0,
|
|
14720
|
+
const isEmptyValue = (0, import_react48.useMemo)(() => getValueSize(props.value) === 0, [
|
|
14984
14721
|
props.value
|
|
14985
14722
|
]);
|
|
14986
|
-
const sizeOfValue = (0,
|
|
14723
|
+
const sizeOfValue = (0, import_react48.useMemo)(() => inspectMetadata(props.value), [
|
|
14987
14724
|
props.value
|
|
14988
14725
|
]);
|
|
14989
14726
|
const displaySize = useJsonViewerStore((store) => store.displaySize);
|
|
14990
|
-
const shouldDisplaySize = (0,
|
|
14727
|
+
const shouldDisplaySize = (0, import_react48.useMemo)(() => typeof displaySize === "function" ? displaySize(props.path, props.value) : displaySize, [
|
|
14991
14728
|
displaySize,
|
|
14992
14729
|
props.path,
|
|
14993
14730
|
props.value
|
|
@@ -15035,17 +14772,17 @@ var PreObjectType = (props) => {
|
|
|
15035
14772
|
var PostObjectType = (props) => {
|
|
15036
14773
|
const metadataColor = useJsonViewerStore((store) => store.colorspace.base04);
|
|
15037
14774
|
const textColor = useTextColor();
|
|
15038
|
-
const isArrayLike = (0,
|
|
14775
|
+
const isArrayLike = (0, import_react48.useMemo)(() => Array.isArray(props.value) || props.value instanceof Set, [
|
|
15039
14776
|
props.value
|
|
15040
14777
|
]);
|
|
15041
|
-
const isEmptyValue = (0,
|
|
14778
|
+
const isEmptyValue = (0, import_react48.useMemo)(() => getValueSize(props.value) === 0, [
|
|
15042
14779
|
props.value
|
|
15043
14780
|
]);
|
|
15044
|
-
const sizeOfValue = (0,
|
|
14781
|
+
const sizeOfValue = (0, import_react48.useMemo)(() => inspectMetadata(props.value), [
|
|
15045
14782
|
props.value
|
|
15046
14783
|
]);
|
|
15047
14784
|
const displaySize = useJsonViewerStore((store) => store.displaySize);
|
|
15048
|
-
const shouldDisplaySize = (0,
|
|
14785
|
+
const shouldDisplaySize = (0, import_react48.useMemo)(() => typeof displaySize === "function" ? displaySize(props.path, props.value) : displaySize, [
|
|
15049
14786
|
displaySize,
|
|
15050
14787
|
props.path,
|
|
15051
14788
|
props.value
|
|
@@ -15082,9 +14819,9 @@ var ObjectType = (props) => {
|
|
|
15082
14819
|
const borderColor = useJsonViewerStore((store) => store.colorspace.base02);
|
|
15083
14820
|
const groupArraysAfterLength = useJsonViewerStore((store) => store.groupArraysAfterLength);
|
|
15084
14821
|
const isTrap = useIsCycleReference(props.path, props.value);
|
|
15085
|
-
const [displayLength, setDisplayLength] = (0,
|
|
14822
|
+
const [displayLength, setDisplayLength] = (0, import_react48.useState)(useJsonViewerStore((store) => store.maxDisplayLength));
|
|
15086
14823
|
const objectSortKeys = useJsonViewerStore((store) => store.objectSortKeys);
|
|
15087
|
-
const elements = (0,
|
|
14824
|
+
const elements = (0, import_react48.useMemo)(() => {
|
|
15088
14825
|
if (!props.inspect) {
|
|
15089
14826
|
return null;
|
|
15090
14827
|
}
|
|
@@ -15094,7 +14831,7 @@ var ObjectType = (props) => {
|
|
|
15094
14831
|
const elements3 = [];
|
|
15095
14832
|
if (value instanceof Map) {
|
|
15096
14833
|
const lastIndex2 = value.size - 1;
|
|
15097
|
-
let
|
|
14834
|
+
let index = 0;
|
|
15098
14835
|
value.forEach((value2, k2) => {
|
|
15099
14836
|
const key = k2.toString();
|
|
15100
14837
|
const path = [
|
|
@@ -15106,9 +14843,9 @@ var ObjectType = (props) => {
|
|
|
15106
14843
|
value: value2,
|
|
15107
14844
|
prevValue: props.prevValue instanceof Map ? props.prevValue.get(k2) : void 0,
|
|
15108
14845
|
editable: false,
|
|
15109
|
-
last:
|
|
14846
|
+
last: index === lastIndex2
|
|
15110
14847
|
}, key));
|
|
15111
|
-
|
|
14848
|
+
index++;
|
|
15112
14849
|
});
|
|
15113
14850
|
} else {
|
|
15114
14851
|
const iterator2 = value[Symbol.iterator]();
|
|
@@ -15140,17 +14877,17 @@ var ObjectType = (props) => {
|
|
|
15140
14877
|
const lastIndex2 = value.length - 1;
|
|
15141
14878
|
if (value.length <= groupArraysAfterLength) {
|
|
15142
14879
|
const elements4 = value.slice(0, displayLength).map((value2, _index) => {
|
|
15143
|
-
const
|
|
14880
|
+
const index = props.nestedIndex ? props.nestedIndex * groupArraysAfterLength + _index : _index;
|
|
15144
14881
|
const path = [
|
|
15145
14882
|
...props.path,
|
|
15146
|
-
|
|
14883
|
+
index
|
|
15147
14884
|
];
|
|
15148
14885
|
return /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(DataKeyPair, {
|
|
15149
14886
|
path,
|
|
15150
14887
|
value: value2,
|
|
15151
|
-
prevValue: Array.isArray(props.prevValue) ? props.prevValue[
|
|
14888
|
+
prevValue: Array.isArray(props.prevValue) ? props.prevValue[index] : void 0,
|
|
15152
14889
|
last: _index === lastIndex2
|
|
15153
|
-
},
|
|
14890
|
+
}, index);
|
|
15154
14891
|
});
|
|
15155
14892
|
if (value.length > displayLength) {
|
|
15156
14893
|
const rest = value.length - displayLength;
|
|
@@ -15176,14 +14913,14 @@ var ObjectType = (props) => {
|
|
|
15176
14913
|
const elements3 = segmentArray(value, groupArraysAfterLength);
|
|
15177
14914
|
const prevElements = Array.isArray(props.prevValue) ? segmentArray(props.prevValue, groupArraysAfterLength) : void 0;
|
|
15178
14915
|
const elementsLastIndex = elements3.length - 1;
|
|
15179
|
-
return elements3.map((list,
|
|
14916
|
+
return elements3.map((list, index) => {
|
|
15180
14917
|
return /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(DataKeyPair, {
|
|
15181
14918
|
path: props.path,
|
|
15182
14919
|
value: list,
|
|
15183
|
-
nestedIndex:
|
|
15184
|
-
prevValue: prevElements === null || prevElements === void 0 ? void 0 : prevElements[
|
|
15185
|
-
last:
|
|
15186
|
-
},
|
|
14920
|
+
nestedIndex: index,
|
|
14921
|
+
prevValue: prevElements === null || prevElements === void 0 ? void 0 : prevElements[index],
|
|
14922
|
+
last: index === elementsLastIndex
|
|
14923
|
+
}, index);
|
|
15187
14924
|
});
|
|
15188
14925
|
}
|
|
15189
14926
|
let entries = Object.entries(value);
|
|
@@ -15197,7 +14934,7 @@ var ObjectType = (props) => {
|
|
|
15197
14934
|
});
|
|
15198
14935
|
}
|
|
15199
14936
|
const lastIndex = entries.length - 1;
|
|
15200
|
-
const elements2 = entries.slice(0, displayLength).map((param,
|
|
14937
|
+
const elements2 = entries.slice(0, displayLength).map((param, index) => {
|
|
15201
14938
|
let [key, value2] = param;
|
|
15202
14939
|
var _props_prevValue;
|
|
15203
14940
|
const path = [
|
|
@@ -15208,7 +14945,7 @@ var ObjectType = (props) => {
|
|
|
15208
14945
|
path,
|
|
15209
14946
|
value: value2,
|
|
15210
14947
|
prevValue: (_props_prevValue = props.prevValue) === null || _props_prevValue === void 0 ? void 0 : _props_prevValue[key],
|
|
15211
|
-
last:
|
|
14948
|
+
last: index === lastIndex
|
|
15212
14949
|
}, key);
|
|
15213
14950
|
});
|
|
15214
14951
|
if (entries.length > displayLength) {
|
|
@@ -15245,7 +14982,7 @@ var ObjectType = (props) => {
|
|
|
15245
14982
|
const marginLeft = props.inspect ? 0.6 : 0;
|
|
15246
14983
|
const width = useJsonViewerStore((store) => store.indentWidth);
|
|
15247
14984
|
const indentWidth = props.inspect ? width - marginLeft : width;
|
|
15248
|
-
const isEmptyValue = (0,
|
|
14985
|
+
const isEmptyValue = (0, import_react48.useMemo)(() => getValueSize(props.value) === 0, [
|
|
15249
14986
|
props.value
|
|
15250
14987
|
]);
|
|
15251
14988
|
if (isEmptyValue) {
|
|
@@ -15288,7 +15025,7 @@ var stringType = defineEasyType({
|
|
|
15288
15025
|
serialize: (value) => value,
|
|
15289
15026
|
deserialize: (value) => value,
|
|
15290
15027
|
Renderer: (props) => {
|
|
15291
|
-
const [showRest, setShowRest] = (0,
|
|
15028
|
+
const [showRest, setShowRest] = (0, import_react48.useState)(false);
|
|
15292
15029
|
const collapseStringsAfterLength = useJsonViewerStore((store) => store.collapseStringsAfterLength);
|
|
15293
15030
|
const value = showRest ? props.value : props.value.slice(0, collapseStringsAfterLength);
|
|
15294
15031
|
const hasRest = props.value.length > collapseStringsAfterLength;
|
|
@@ -15345,17 +15082,17 @@ function memorizeDataType(dataType) {
|
|
|
15345
15082
|
var _prevProps_path, _nextProps_path;
|
|
15346
15083
|
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
15084
|
}
|
|
15348
|
-
dataType.Component = /* @__PURE__ */ (0,
|
|
15085
|
+
dataType.Component = /* @__PURE__ */ (0, import_react48.memo)(dataType.Component, compare);
|
|
15349
15086
|
if (dataType.Editor) {
|
|
15350
|
-
dataType.Editor = /* @__PURE__ */ (0,
|
|
15087
|
+
dataType.Editor = /* @__PURE__ */ (0, import_react48.memo)(dataType.Editor, function compare2(prevProps, nextProps) {
|
|
15351
15088
|
return Object.is(prevProps.value, nextProps.value);
|
|
15352
15089
|
});
|
|
15353
15090
|
}
|
|
15354
15091
|
if (dataType.PreComponent) {
|
|
15355
|
-
dataType.PreComponent = /* @__PURE__ */ (0,
|
|
15092
|
+
dataType.PreComponent = /* @__PURE__ */ (0, import_react48.memo)(dataType.PreComponent, compare);
|
|
15356
15093
|
}
|
|
15357
15094
|
if (dataType.PostComponent) {
|
|
15358
|
-
dataType.PostComponent = /* @__PURE__ */ (0,
|
|
15095
|
+
dataType.PostComponent = /* @__PURE__ */ (0, import_react48.memo)(dataType.PostComponent, compare);
|
|
15359
15096
|
}
|
|
15360
15097
|
return dataType;
|
|
15361
15098
|
}
|
|
@@ -15372,7 +15109,7 @@ var predefinedTypes = [
|
|
|
15372
15109
|
memorizeDataType(bigIntType)
|
|
15373
15110
|
];
|
|
15374
15111
|
var createTypeRegistryStore = () => {
|
|
15375
|
-
return createStore()((set) => ({
|
|
15112
|
+
return (0, import_zustand.createStore)()((set) => ({
|
|
15376
15113
|
registry: predefinedTypes,
|
|
15377
15114
|
registerTypes: (setState) => {
|
|
15378
15115
|
set((state) => ({
|
|
@@ -15381,11 +15118,11 @@ var createTypeRegistryStore = () => {
|
|
|
15381
15118
|
}
|
|
15382
15119
|
}));
|
|
15383
15120
|
};
|
|
15384
|
-
var TypeRegistryStoreContext = /* @__PURE__ */ (0,
|
|
15121
|
+
var TypeRegistryStoreContext = /* @__PURE__ */ (0, import_react48.createContext)(void 0);
|
|
15385
15122
|
TypeRegistryStoreContext.Provider;
|
|
15386
15123
|
var useTypeRegistryStore = (selector2, equalityFn) => {
|
|
15387
|
-
const store = (0,
|
|
15388
|
-
return useStore(store, selector2, equalityFn);
|
|
15124
|
+
const store = (0, import_react48.useContext)(TypeRegistryStoreContext);
|
|
15125
|
+
return (0, import_zustand.useStore)(store, selector2, equalityFn);
|
|
15389
15126
|
};
|
|
15390
15127
|
function matchTypeComponents(value, path, registry) {
|
|
15391
15128
|
let potential;
|
|
@@ -15404,7 +15141,7 @@ function matchTypeComponents(value, path, registry) {
|
|
|
15404
15141
|
}
|
|
15405
15142
|
function useTypeComponents(value, path) {
|
|
15406
15143
|
const registry = useTypeRegistryStore((store) => store.registry);
|
|
15407
|
-
return (0,
|
|
15144
|
+
return (0, import_react48.useMemo)(() => matchTypeComponents(value, path, registry), [
|
|
15408
15145
|
value,
|
|
15409
15146
|
path,
|
|
15410
15147
|
registry
|
|
@@ -15425,7 +15162,7 @@ var DataKeyPair = (props) => {
|
|
|
15425
15162
|
var _props_editable;
|
|
15426
15163
|
const propsEditable = (_props_editable = props.editable) !== null && _props_editable !== void 0 ? _props_editable : void 0;
|
|
15427
15164
|
const storeEditable = useJsonViewerStore((store) => store.editable);
|
|
15428
|
-
const editable = (0,
|
|
15165
|
+
const editable = (0, import_react48.useMemo)(() => {
|
|
15429
15166
|
if (storeEditable === false) {
|
|
15430
15167
|
return false;
|
|
15431
15168
|
}
|
|
@@ -15442,12 +15179,12 @@ var DataKeyPair = (props) => {
|
|
|
15442
15179
|
storeEditable,
|
|
15443
15180
|
value
|
|
15444
15181
|
]);
|
|
15445
|
-
const [tempValue, setTempValue] = (0,
|
|
15182
|
+
const [tempValue, setTempValue] = (0, import_react48.useState)("");
|
|
15446
15183
|
const depth = path.length;
|
|
15447
15184
|
const key = path[depth - 1];
|
|
15448
15185
|
const hoverPath = useJsonViewerStore((store) => store.hoverPath);
|
|
15449
|
-
const isHover = (0,
|
|
15450
|
-
return hoverPath && path.every((value2,
|
|
15186
|
+
const isHover = (0, import_react48.useMemo)(() => {
|
|
15187
|
+
return hoverPath && path.every((value2, index) => value2 === hoverPath.path[index] && nestedIndex === hoverPath.nestedIndex);
|
|
15451
15188
|
}, [
|
|
15452
15189
|
hoverPath,
|
|
15453
15190
|
path,
|
|
@@ -15456,7 +15193,7 @@ var DataKeyPair = (props) => {
|
|
|
15456
15193
|
const setHover = useJsonViewerStore((store) => store.setHover);
|
|
15457
15194
|
const root = useJsonViewerStore((store) => store.value);
|
|
15458
15195
|
const [inspect, setInspect] = useInspect(path, value, nestedIndex);
|
|
15459
|
-
const [editing, setEditing] = (0,
|
|
15196
|
+
const [editing, setEditing] = (0, import_react48.useState)(false);
|
|
15460
15197
|
const onChange = useJsonViewerStore((store) => store.onChange);
|
|
15461
15198
|
const keyColor = useTextColor();
|
|
15462
15199
|
const numberKeyColor = useJsonViewerStore((store) => store.colorspace.base0C);
|
|
@@ -15468,7 +15205,7 @@ var DataKeyPair = (props) => {
|
|
|
15468
15205
|
const isNumberKey = Number.isInteger(Number(key));
|
|
15469
15206
|
const storeEnableAdd = useJsonViewerStore((store) => store.enableAdd);
|
|
15470
15207
|
const onAdd = useJsonViewerStore((store) => store.onAdd);
|
|
15471
|
-
const enableAdd = (0,
|
|
15208
|
+
const enableAdd = (0, import_react48.useMemo)(() => {
|
|
15472
15209
|
if (!onAdd || nestedIndex !== void 0) return false;
|
|
15473
15210
|
if (storeEnableAdd === false) {
|
|
15474
15211
|
return false;
|
|
@@ -15493,7 +15230,7 @@ var DataKeyPair = (props) => {
|
|
|
15493
15230
|
]);
|
|
15494
15231
|
const storeEnableDelete = useJsonViewerStore((store) => store.enableDelete);
|
|
15495
15232
|
const onDelete = useJsonViewerStore((store) => store.onDelete);
|
|
15496
|
-
const enableDelete = (0,
|
|
15233
|
+
const enableDelete = (0, import_react48.useMemo)(() => {
|
|
15497
15234
|
if (!onDelete || nestedIndex !== void 0) return false;
|
|
15498
15235
|
if (isRoot) {
|
|
15499
15236
|
return false;
|
|
@@ -15520,7 +15257,7 @@ var DataKeyPair = (props) => {
|
|
|
15520
15257
|
const enableClipboard = useJsonViewerStore((store) => store.enableClipboard);
|
|
15521
15258
|
const { copy, copied } = useClipboard();
|
|
15522
15259
|
const highlightUpdates = useJsonViewerStore((store) => store.highlightUpdates);
|
|
15523
|
-
const isHighlight = (0,
|
|
15260
|
+
const isHighlight = (0, import_react48.useMemo)(() => {
|
|
15524
15261
|
if (!highlightUpdates || prevValue === void 0) return false;
|
|
15525
15262
|
if (typeof value !== typeof prevValue) {
|
|
15526
15263
|
return true;
|
|
@@ -15544,8 +15281,8 @@ var DataKeyPair = (props) => {
|
|
|
15544
15281
|
prevValue,
|
|
15545
15282
|
value
|
|
15546
15283
|
]);
|
|
15547
|
-
const highlightContainer = (0,
|
|
15548
|
-
(0,
|
|
15284
|
+
const highlightContainer = (0, import_react48.useRef)();
|
|
15285
|
+
(0, import_react48.useEffect)(() => {
|
|
15549
15286
|
if (highlightContainer.current && isHighlight && "animate" in highlightContainer.current) {
|
|
15550
15287
|
highlightContainer.current.animate([
|
|
15551
15288
|
{
|
|
@@ -15565,7 +15302,7 @@ var DataKeyPair = (props) => {
|
|
|
15565
15302
|
prevValue,
|
|
15566
15303
|
value
|
|
15567
15304
|
]);
|
|
15568
|
-
const startEditing = (0,
|
|
15305
|
+
const startEditing = (0, import_react48.useCallback)((event) => {
|
|
15569
15306
|
event.preventDefault();
|
|
15570
15307
|
if (serialize) setTempValue(serialize(value));
|
|
15571
15308
|
setEditing(true);
|
|
@@ -15573,14 +15310,14 @@ var DataKeyPair = (props) => {
|
|
|
15573
15310
|
serialize,
|
|
15574
15311
|
value
|
|
15575
15312
|
]);
|
|
15576
|
-
const abortEditing = (0,
|
|
15313
|
+
const abortEditing = (0, import_react48.useCallback)(() => {
|
|
15577
15314
|
setEditing(false);
|
|
15578
15315
|
setTempValue("");
|
|
15579
15316
|
}, [
|
|
15580
15317
|
setEditing,
|
|
15581
15318
|
setTempValue
|
|
15582
15319
|
]);
|
|
15583
|
-
const commitEditing = (0,
|
|
15320
|
+
const commitEditing = (0, import_react48.useCallback)((newValue) => {
|
|
15584
15321
|
setEditing(false);
|
|
15585
15322
|
if (!deserialize) return;
|
|
15586
15323
|
try {
|
|
@@ -15594,7 +15331,7 @@ var DataKeyPair = (props) => {
|
|
|
15594
15331
|
path,
|
|
15595
15332
|
value
|
|
15596
15333
|
]);
|
|
15597
|
-
const actionIcons = (0,
|
|
15334
|
+
const actionIcons = (0, import_react48.useMemo)(() => {
|
|
15598
15335
|
if (editing) {
|
|
15599
15336
|
return /* @__PURE__ */ (0, import_jsx_runtime129.jsxs)(import_jsx_runtime129.Fragment, {
|
|
15600
15337
|
children: [
|
|
@@ -15690,12 +15427,12 @@ var DataKeyPair = (props) => {
|
|
|
15690
15427
|
abortEditing,
|
|
15691
15428
|
commitEditing
|
|
15692
15429
|
]);
|
|
15693
|
-
const isEmptyValue = (0,
|
|
15430
|
+
const isEmptyValue = (0, import_react48.useMemo)(() => getValueSize(value) === 0, [
|
|
15694
15431
|
value
|
|
15695
15432
|
]);
|
|
15696
15433
|
const expandable = !isEmptyValue && !!(PreComponent && PostComponent);
|
|
15697
15434
|
const KeyRenderer = useJsonViewerStore((store) => store.keyRenderer);
|
|
15698
|
-
const downstreamProps = (0,
|
|
15435
|
+
const downstreamProps = (0, import_react48.useMemo)(() => ({
|
|
15699
15436
|
path,
|
|
15700
15437
|
inspect,
|
|
15701
15438
|
setInspect,
|
|
@@ -15716,7 +15453,7 @@ var DataKeyPair = (props) => {
|
|
|
15716
15453
|
sx: {
|
|
15717
15454
|
userSelect: "text"
|
|
15718
15455
|
},
|
|
15719
|
-
onMouseEnter: (0,
|
|
15456
|
+
onMouseEnter: (0, import_react48.useCallback)(() => setHover(path, nestedIndex), [
|
|
15720
15457
|
setHover,
|
|
15721
15458
|
path,
|
|
15722
15459
|
nestedIndex
|
|
@@ -15731,7 +15468,7 @@ var DataKeyPair = (props) => {
|
|
|
15731
15468
|
letterSpacing: 0.5,
|
|
15732
15469
|
opacity: 0.8
|
|
15733
15470
|
},
|
|
15734
|
-
onClick: (0,
|
|
15471
|
+
onClick: (0, import_react48.useCallback)((event) => {
|
|
15735
15472
|
if (event.isDefaultPrevented()) {
|
|
15736
15473
|
return;
|
|
15737
15474
|
}
|
|
@@ -15841,8 +15578,8 @@ var DataKeyPair = (props) => {
|
|
|
15841
15578
|
};
|
|
15842
15579
|
var query = "(prefers-color-scheme: dark)";
|
|
15843
15580
|
function useThemeDetector() {
|
|
15844
|
-
const [isDark, setIsDark] = (0,
|
|
15845
|
-
(0,
|
|
15581
|
+
const [isDark, setIsDark] = (0, import_react48.useState)(false);
|
|
15582
|
+
(0, import_react48.useEffect)(() => {
|
|
15846
15583
|
const listener = (e2) => setIsDark(e2.matches);
|
|
15847
15584
|
setIsDark(window.matchMedia(query).matches);
|
|
15848
15585
|
const queryMedia = window.matchMedia(query);
|
|
@@ -15852,8 +15589,8 @@ function useThemeDetector() {
|
|
|
15852
15589
|
return isDark;
|
|
15853
15590
|
}
|
|
15854
15591
|
function useSetIfNotUndefinedEffect(key, value) {
|
|
15855
|
-
const { setState } = (0,
|
|
15856
|
-
(0,
|
|
15592
|
+
const { setState } = (0, import_react48.useContext)(JsonViewerStoreContext);
|
|
15593
|
+
(0, import_react48.useEffect)(() => {
|
|
15857
15594
|
if (value !== void 0) {
|
|
15858
15595
|
setState({
|
|
15859
15596
|
[key]: value
|
|
@@ -15866,8 +15603,8 @@ function useSetIfNotUndefinedEffect(key, value) {
|
|
|
15866
15603
|
]);
|
|
15867
15604
|
}
|
|
15868
15605
|
var JsonViewerInner = (props) => {
|
|
15869
|
-
const { setState } = (0,
|
|
15870
|
-
(0,
|
|
15606
|
+
const { setState } = (0, import_react48.useContext)(JsonViewerStoreContext);
|
|
15607
|
+
(0, import_react48.useEffect)(() => {
|
|
15871
15608
|
setState((state) => ({
|
|
15872
15609
|
prevValue: state.value,
|
|
15873
15610
|
value: props.value
|
|
@@ -15895,7 +15632,7 @@ var JsonViewerInner = (props) => {
|
|
|
15895
15632
|
useSetIfNotUndefinedEffect("displaySize", props.displaySize);
|
|
15896
15633
|
useSetIfNotUndefinedEffect("displayComma", props.displayComma);
|
|
15897
15634
|
useSetIfNotUndefinedEffect("highlightUpdates", props.highlightUpdates);
|
|
15898
|
-
(0,
|
|
15635
|
+
(0, import_react48.useEffect)(() => {
|
|
15899
15636
|
if (props.theme === "light") {
|
|
15900
15637
|
setState({
|
|
15901
15638
|
colorspace: lightColorspace
|
|
@@ -15913,13 +15650,13 @@ var JsonViewerInner = (props) => {
|
|
|
15913
15650
|
setState,
|
|
15914
15651
|
props.theme
|
|
15915
15652
|
]);
|
|
15916
|
-
const themeCls = (0,
|
|
15653
|
+
const themeCls = (0, import_react48.useMemo)(() => {
|
|
15917
15654
|
if (typeof props.theme === "object") return "json-viewer-theme-custom";
|
|
15918
15655
|
return props.theme === "dark" ? "json-viewer-theme-dark" : "json-viewer-theme-light";
|
|
15919
15656
|
}, [
|
|
15920
15657
|
props.theme
|
|
15921
15658
|
]);
|
|
15922
|
-
const onceRef = (0,
|
|
15659
|
+
const onceRef = (0, import_react48.useRef)(true);
|
|
15923
15660
|
const registerTypes = useTypeRegistryStore((store) => store.registerTypes);
|
|
15924
15661
|
if (onceRef.current) {
|
|
15925
15662
|
const allTypes = props.valueTypes ? [
|
|
@@ -15931,7 +15668,7 @@ var JsonViewerInner = (props) => {
|
|
|
15931
15668
|
registerTypes(allTypes);
|
|
15932
15669
|
onceRef.current = false;
|
|
15933
15670
|
}
|
|
15934
|
-
(0,
|
|
15671
|
+
(0, import_react48.useEffect)(() => {
|
|
15935
15672
|
const allTypes = props.valueTypes ? [
|
|
15936
15673
|
...predefinedTypes,
|
|
15937
15674
|
...props.valueTypes
|
|
@@ -15945,9 +15682,9 @@ var JsonViewerInner = (props) => {
|
|
|
15945
15682
|
]);
|
|
15946
15683
|
const value = useJsonViewerStore((store) => store.value);
|
|
15947
15684
|
const prevValue = useJsonViewerStore((store) => store.prevValue);
|
|
15948
|
-
const emptyPath = (0,
|
|
15685
|
+
const emptyPath = (0, import_react48.useMemo)(() => [], []);
|
|
15949
15686
|
const setHover = useJsonViewerStore((store) => store.setHover);
|
|
15950
|
-
const onMouseLeave = (0,
|
|
15687
|
+
const onMouseLeave = (0, import_react48.useCallback)(() => setHover(null), [
|
|
15951
15688
|
setHover
|
|
15952
15689
|
]);
|
|
15953
15690
|
return /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(import_material7.Paper, {
|
|
@@ -15976,14 +15713,14 @@ var JsonViewer = function JsonViewer2(props) {
|
|
|
15976
15713
|
}
|
|
15977
15714
|
}
|
|
15978
15715
|
const isAutoDarkTheme = useThemeDetector();
|
|
15979
|
-
const themeType = (0,
|
|
15716
|
+
const themeType = (0, import_react48.useMemo)(() => {
|
|
15980
15717
|
var _props_theme;
|
|
15981
15718
|
return props.theme === "auto" ? isAutoDarkTheme ? "dark" : "light" : (_props_theme = props.theme) !== null && _props_theme !== void 0 ? _props_theme : "light";
|
|
15982
15719
|
}, [
|
|
15983
15720
|
isAutoDarkTheme,
|
|
15984
15721
|
props.theme
|
|
15985
15722
|
]);
|
|
15986
|
-
const theme = (0,
|
|
15723
|
+
const theme = (0, import_react48.useMemo)(() => {
|
|
15987
15724
|
const backgroundColor = typeof themeType === "object" ? themeType.base00 : themeType === "dark" ? darkColorspace.base00 : lightColorspace.base00;
|
|
15988
15725
|
const foregroundColor = typeof themeType === "object" ? themeType.base07 : themeType === "dark" ? darkColorspace.base07 : lightColorspace.base07;
|
|
15989
15726
|
return (0, import_material7.createTheme)({
|
|
@@ -16011,8 +15748,8 @@ var JsonViewer = function JsonViewer2(props) {
|
|
|
16011
15748
|
...props,
|
|
16012
15749
|
theme: themeType
|
|
16013
15750
|
};
|
|
16014
|
-
const jsonViewerStore = (0,
|
|
16015
|
-
const typeRegistryStore = (0,
|
|
15751
|
+
const jsonViewerStore = (0, import_react48.useMemo)(() => createJsonViewerStore(props), []);
|
|
15752
|
+
const typeRegistryStore = (0, import_react48.useMemo)(() => createTypeRegistryStore(), []);
|
|
16016
15753
|
return /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(import_material7.ThemeProvider, {
|
|
16017
15754
|
theme,
|
|
16018
15755
|
children: /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(TypeRegistryStoreContext.Provider, {
|
|
@@ -16028,7 +15765,7 @@ var JsonViewer = function JsonViewer2(props) {
|
|
|
16028
15765
|
};
|
|
16029
15766
|
|
|
16030
15767
|
// src/components/event-details/event-details.tsx
|
|
16031
|
-
var
|
|
15768
|
+
var import_react53 = require("react");
|
|
16032
15769
|
|
|
16033
15770
|
// src/utils/iam-utils.ts
|
|
16034
15771
|
function determinePermissionStatus(payload) {
|
|
@@ -16227,7 +15964,7 @@ var getEventGroupsByType = (events) => {
|
|
|
16227
15964
|
// src/components/event-details/event-detail.tsx
|
|
16228
15965
|
var import_icons_material6 = require("@mui/icons-material");
|
|
16229
15966
|
var import_material11 = require("@mui/material");
|
|
16230
|
-
var
|
|
15967
|
+
var import_react50 = require("react");
|
|
16231
15968
|
|
|
16232
15969
|
// src/components/status-icon.tsx
|
|
16233
15970
|
var import_icons_material3 = require("@mui/icons-material");
|
|
@@ -16378,7 +16115,7 @@ var IAMEventDetail = ({ event }) => {
|
|
|
16378
16115
|
// src/components/event-details/iam-permission-detail.tsx
|
|
16379
16116
|
var import_icons_material5 = require("@mui/icons-material");
|
|
16380
16117
|
var import_material10 = require("@mui/material");
|
|
16381
|
-
var
|
|
16118
|
+
var import_react49 = require("react");
|
|
16382
16119
|
var import_jsx_runtime132 = require("react/jsx-runtime");
|
|
16383
16120
|
var getChipColors = (status) => {
|
|
16384
16121
|
const isAllowed = status === "explicitly_allowed" || status === "implicitly_allowed";
|
|
@@ -16388,8 +16125,8 @@ var getChipColors = (status) => {
|
|
|
16388
16125
|
};
|
|
16389
16126
|
};
|
|
16390
16127
|
var IAMPermissionItem = ({ event }) => {
|
|
16391
|
-
const [isOpen, setIsOpen] = (0,
|
|
16392
|
-
const parsedData = (0,
|
|
16128
|
+
const [isOpen, setIsOpen] = (0, import_react49.useState)(false);
|
|
16129
|
+
const parsedData = (0, import_react49.useMemo)(() => {
|
|
16393
16130
|
const payloadString = event.attributes?.payload;
|
|
16394
16131
|
if (!payloadString) {
|
|
16395
16132
|
return;
|
|
@@ -16459,15 +16196,15 @@ var DetailRow2 = ({ content, label }) => /* @__PURE__ */ (0, import_jsx_runtime1
|
|
|
16459
16196
|
) : content })
|
|
16460
16197
|
] });
|
|
16461
16198
|
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,
|
|
16199
|
+
const [isOpen, setIsOpen] = (0, import_react50.useState)(false);
|
|
16200
|
+
const [isOverflowing, setIsOverflowing] = (0, import_react50.useState)(false);
|
|
16201
|
+
const textReference = (0, import_react50.useRef)(null);
|
|
16202
|
+
const parsedMessage = (0, import_react50.useMemo)(() => parseEventMessage(event), [event]);
|
|
16203
|
+
const isIAMPolicyEvent = (0, import_react50.useMemo)(
|
|
16467
16204
|
() => event.event_type === "iam.policy_evaluation" && event.attributes?.payload && typeof event.attributes.payload === "string",
|
|
16468
16205
|
[event]
|
|
16469
16206
|
);
|
|
16470
|
-
(0,
|
|
16207
|
+
(0, import_react50.useEffect)(() => {
|
|
16471
16208
|
const checkOverflow = () => {
|
|
16472
16209
|
const element = textReference.current;
|
|
16473
16210
|
if (element) {
|
|
@@ -16480,11 +16217,11 @@ var EventMessage = ({ event }) => {
|
|
|
16480
16217
|
window.removeEventListener("resize", checkOverflow);
|
|
16481
16218
|
};
|
|
16482
16219
|
}, [parsedMessage.headline]);
|
|
16483
|
-
const hasAdditionalContent = (0,
|
|
16220
|
+
const hasAdditionalContent = (0, import_react50.useMemo)(
|
|
16484
16221
|
() => parsedMessage.message || parsedMessage.details || isIAMPolicyEvent,
|
|
16485
16222
|
[parsedMessage.message, parsedMessage.details, isIAMPolicyEvent]
|
|
16486
16223
|
);
|
|
16487
|
-
const shouldShowToggle = (0,
|
|
16224
|
+
const shouldShowToggle = (0, import_react50.useMemo)(
|
|
16488
16225
|
() => isOverflowing || hasAdditionalContent,
|
|
16489
16226
|
[isOverflowing, hasAdditionalContent]
|
|
16490
16227
|
);
|
|
@@ -16946,10 +16683,10 @@ var httpSigningMiddleware = (config) => (next, context) => async (args) => {
|
|
|
16946
16683
|
if (!scheme) {
|
|
16947
16684
|
throw new Error(`No HttpAuthScheme was selected: unable to sign request`);
|
|
16948
16685
|
}
|
|
16949
|
-
const { httpAuthOption: { signingProperties = {} }, identity
|
|
16686
|
+
const { httpAuthOption: { signingProperties = {} }, identity, signer } = scheme;
|
|
16950
16687
|
const output = await next({
|
|
16951
16688
|
...args,
|
|
16952
|
-
request: await signer.sign(args.request,
|
|
16689
|
+
request: await signer.sign(args.request, identity, signingProperties)
|
|
16953
16690
|
}).catch((signer.errorHandler || defaultErrorHandler)(signingProperties));
|
|
16954
16691
|
(signer.successHandler || defaultSuccessHandler)(output.response, signingProperties);
|
|
16955
16692
|
return output;
|
|
@@ -18556,12 +18293,12 @@ var DefaultIdentityProviderConfig = class {
|
|
|
18556
18293
|
};
|
|
18557
18294
|
|
|
18558
18295
|
// node_modules/@smithy/core/dist-es/util-identity-and-auth/memoizeIdentityProvider.js
|
|
18559
|
-
var createIsIdentityExpiredFunction = (expirationMs) => function isIdentityExpired2(
|
|
18560
|
-
return doesIdentityRequireRefresh(
|
|
18296
|
+
var createIsIdentityExpiredFunction = (expirationMs) => function isIdentityExpired2(identity) {
|
|
18297
|
+
return doesIdentityRequireRefresh(identity) && identity.expiration.getTime() - Date.now() < expirationMs;
|
|
18561
18298
|
};
|
|
18562
18299
|
var EXPIRATION_MS = 3e5;
|
|
18563
18300
|
var isIdentityExpired = createIsIdentityExpiredFunction(EXPIRATION_MS);
|
|
18564
|
-
var doesIdentityRequireRefresh = (
|
|
18301
|
+
var doesIdentityRequireRefresh = (identity) => identity.expiration !== void 0;
|
|
18565
18302
|
var memoizeIdentityProvider = (provider, isExpired, requiresRefresh) => {
|
|
18566
18303
|
if (provider === void 0) {
|
|
18567
18304
|
return void 0;
|
|
@@ -18767,13 +18504,13 @@ var getAttrPathList = (path) => {
|
|
|
18767
18504
|
};
|
|
18768
18505
|
|
|
18769
18506
|
// node_modules/@smithy/util-endpoints/dist-es/lib/getAttr.js
|
|
18770
|
-
var getAttr = (value, path) => getAttrPathList(path).reduce((acc,
|
|
18507
|
+
var getAttr = (value, path) => getAttrPathList(path).reduce((acc, index) => {
|
|
18771
18508
|
if (typeof acc !== "object") {
|
|
18772
|
-
throw new EndpointError(`Index '${
|
|
18509
|
+
throw new EndpointError(`Index '${index}' in '${path}' not found in '${JSON.stringify(value)}'`);
|
|
18773
18510
|
} else if (Array.isArray(acc)) {
|
|
18774
|
-
return acc[parseInt(
|
|
18511
|
+
return acc[parseInt(index)];
|
|
18775
18512
|
}
|
|
18776
|
-
return acc[
|
|
18513
|
+
return acc[index];
|
|
18777
18514
|
}, value);
|
|
18778
18515
|
|
|
18779
18516
|
// node_modules/@smithy/util-endpoints/dist-es/lib/isSet.js
|
|
@@ -19533,7 +19270,7 @@ var validateSigningProperties = async (signingProperties) => {
|
|
|
19533
19270
|
};
|
|
19534
19271
|
};
|
|
19535
19272
|
var AwsSdkSigV4Signer = class {
|
|
19536
|
-
async sign(httpRequest,
|
|
19273
|
+
async sign(httpRequest, identity, signingProperties) {
|
|
19537
19274
|
if (!HttpRequest.isInstance(httpRequest)) {
|
|
19538
19275
|
throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");
|
|
19539
19276
|
}
|
|
@@ -19580,7 +19317,7 @@ var AwsSdkSigV4Signer = class {
|
|
|
19580
19317
|
};
|
|
19581
19318
|
|
|
19582
19319
|
// node_modules/@smithy/property-provider/dist-es/memoize.js
|
|
19583
|
-
var
|
|
19320
|
+
var memoize = (provider, isExpired, requiresRefresh) => {
|
|
19584
19321
|
let resolved;
|
|
19585
19322
|
let pending;
|
|
19586
19323
|
let hasResult;
|
|
@@ -21935,9 +21672,9 @@ async function checkFeatures(context, config, args) {
|
|
|
21935
21672
|
break;
|
|
21936
21673
|
}
|
|
21937
21674
|
}
|
|
21938
|
-
const
|
|
21939
|
-
if (
|
|
21940
|
-
const credentials =
|
|
21675
|
+
const identity = context.__smithy_context?.selectedHttpAuthScheme?.identity;
|
|
21676
|
+
if (identity?.$source) {
|
|
21677
|
+
const credentials = identity;
|
|
21941
21678
|
if (credentials.accountId) {
|
|
21942
21679
|
setFeature2(context, "RESOLVED_ACCOUNT_ID", "T");
|
|
21943
21680
|
}
|
|
@@ -22020,8 +21757,8 @@ var escapeUserAgent = (userAgentPair) => {
|
|
|
22020
21757
|
if (prefix === "api") {
|
|
22021
21758
|
uaName = uaName.toLowerCase();
|
|
22022
21759
|
}
|
|
22023
|
-
return [prefix, uaName, version].filter((item) => item && item.length > 0).reduce((acc, item,
|
|
22024
|
-
switch (
|
|
21760
|
+
return [prefix, uaName, version].filter((item) => item && item.length > 0).reduce((acc, item, index) => {
|
|
21761
|
+
switch (index) {
|
|
22025
21762
|
case 0:
|
|
22026
21763
|
return item;
|
|
22027
21764
|
case 1:
|
|
@@ -24088,7 +23825,7 @@ var invalidProvider = (message) => () => Promise.reject(message);
|
|
|
24088
23825
|
var DEFAULTS_MODE_OPTIONS = ["in-region", "cross-region", "mobile", "standard", "legacy"];
|
|
24089
23826
|
|
|
24090
23827
|
// node_modules/@smithy/util-defaults-mode-browser/dist-es/resolveDefaultsModeConfig.js
|
|
24091
|
-
var resolveDefaultsModeConfig = ({ defaultsMode } = {}) =>
|
|
23828
|
+
var resolveDefaultsModeConfig = ({ defaultsMode } = {}) => memoize(async () => {
|
|
24092
23829
|
const mode = typeof defaultsMode === "function" ? await defaultsMode() : defaultsMode;
|
|
24093
23830
|
switch (mode?.toLowerCase()) {
|
|
24094
23831
|
case "auto":
|
|
@@ -26210,11 +25947,11 @@ var getHttpAuthExtensionConfiguration = (runtimeConfig) => {
|
|
|
26210
25947
|
let _credentials = runtimeConfig.credentials;
|
|
26211
25948
|
return {
|
|
26212
25949
|
setHttpAuthScheme(httpAuthScheme) {
|
|
26213
|
-
const
|
|
26214
|
-
if (
|
|
25950
|
+
const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);
|
|
25951
|
+
if (index === -1) {
|
|
26215
25952
|
_httpAuthSchemes.push(httpAuthScheme);
|
|
26216
25953
|
} else {
|
|
26217
|
-
_httpAuthSchemes.splice(
|
|
25954
|
+
_httpAuthSchemes.splice(index, 1, httpAuthScheme);
|
|
26218
25955
|
}
|
|
26219
25956
|
},
|
|
26220
25957
|
httpAuthSchemes() {
|
|
@@ -26311,7 +26048,7 @@ var QueryStatus = {
|
|
|
26311
26048
|
|
|
26312
26049
|
// src/components/event-details/lambda-invoke-logs-section.tsx
|
|
26313
26050
|
var import_material12 = require("@mui/material");
|
|
26314
|
-
var
|
|
26051
|
+
var import_react51 = require("react");
|
|
26315
26052
|
var import_jsx_runtime134 = require("react/jsx-runtime");
|
|
26316
26053
|
var POLL_INTERVAL_MS = 1e3;
|
|
26317
26054
|
async function pollQueryResults(client, queryId) {
|
|
@@ -26329,7 +26066,7 @@ async function startLambdaLogsQuery(client, functionName2, requestId, startTimeS
|
|
|
26329
26066
|
}
|
|
26330
26067
|
function useCloudWatchLogsClient(region) {
|
|
26331
26068
|
const { localstackEndpoint } = useAppInspector();
|
|
26332
|
-
const client = (0,
|
|
26069
|
+
const client = (0, import_react51.useMemo)(() => new CloudWatchLogsClient({
|
|
26333
26070
|
credentials: {
|
|
26334
26071
|
accessKeyId: "test",
|
|
26335
26072
|
secretAccessKey: "test"
|
|
@@ -26340,12 +26077,12 @@ function useCloudWatchLogsClient(region) {
|
|
|
26340
26077
|
return client;
|
|
26341
26078
|
}
|
|
26342
26079
|
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,
|
|
26080
|
+
const [loading, setLoading] = (0, import_react51.useState)(true);
|
|
26081
|
+
const [logs, setLogs] = (0, import_react51.useState)([]);
|
|
26082
|
+
const [error, setError] = (0, import_react51.useState)();
|
|
26083
|
+
const pollTimerRef = (0, import_react51.useRef)(null);
|
|
26347
26084
|
const cloudWatchLogs = useCloudWatchLogsClient(region);
|
|
26348
|
-
(0,
|
|
26085
|
+
(0, import_react51.useEffect)(() => {
|
|
26349
26086
|
let cancelled = false;
|
|
26350
26087
|
const startTimeSec = Math.floor(Number(BigInt(startTimeNano) / BigInt(1e9)));
|
|
26351
26088
|
const endTimeSec = Math.ceil(Number(BigInt(endTimeNano) / BigInt(1e9)));
|
|
@@ -26419,10 +26156,10 @@ var LambdaInvokeLogsSection = ({ endTimeNano, functionName: functionName2, regio
|
|
|
26419
26156
|
// src/components/event-details/toggle-section.tsx
|
|
26420
26157
|
var import_icons_material7 = require("@mui/icons-material");
|
|
26421
26158
|
var import_material13 = require("@mui/material");
|
|
26422
|
-
var
|
|
26159
|
+
var import_react52 = require("react");
|
|
26423
26160
|
var import_jsx_runtime135 = require("react/jsx-runtime");
|
|
26424
26161
|
var ToggleSection = ({ action, children, headline, initialOpen = true }) => {
|
|
26425
|
-
const [isOpen, setIsOpen] = (0,
|
|
26162
|
+
const [isOpen, setIsOpen] = (0, import_react52.useState)(initialOpen);
|
|
26426
26163
|
return /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)(import_material13.Box, { sx: { mt: 4 }, children: [
|
|
26427
26164
|
/* @__PURE__ */ (0, import_jsx_runtime135.jsxs)(
|
|
26428
26165
|
import_material13.Box,
|
|
@@ -26489,11 +26226,11 @@ var checkIsSqsSendMessage = (span) => {
|
|
|
26489
26226
|
return span.operation_name.startsWith("SendMessage");
|
|
26490
26227
|
};
|
|
26491
26228
|
var EventDetails = ({ onClose, selectedEvent }) => {
|
|
26492
|
-
const eventGroups = (0,
|
|
26229
|
+
const eventGroups = (0, import_react53.useMemo)(
|
|
26493
26230
|
() => getEventGroupsByType(selectedEvent?.events ?? []),
|
|
26494
26231
|
[selectedEvent?.events]
|
|
26495
26232
|
);
|
|
26496
|
-
const [parseNestedJson, setParseNestedJson] = (0,
|
|
26233
|
+
const [parseNestedJson, setParseNestedJson] = (0, import_react53.useState)(true);
|
|
26497
26234
|
if (!selectedEvent) {
|
|
26498
26235
|
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
26236
|
}
|
|
@@ -26662,7 +26399,7 @@ var EventDetails = ({ onClose, selectedEvent }) => {
|
|
|
26662
26399
|
] }) })
|
|
26663
26400
|
] });
|
|
26664
26401
|
};
|
|
26665
|
-
var PayloadViewer = (0,
|
|
26402
|
+
var PayloadViewer = (0, import_react53.memo)(({ value }) => {
|
|
26666
26403
|
const theme = (0, import_material14.useTheme)();
|
|
26667
26404
|
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
26405
|
JsonViewer,
|
|
@@ -26680,22 +26417,22 @@ var PayloadViewer = (0, import_react54.memo)(({ value }) => {
|
|
|
26680
26417
|
// src/components/trace-graph/trace-graph.tsx
|
|
26681
26418
|
var import_base = require("@xyflow/react/dist/base.css");
|
|
26682
26419
|
var import_material18 = require("@mui/material");
|
|
26683
|
-
var
|
|
26684
|
-
var
|
|
26420
|
+
var import_react59 = require("@xyflow/react");
|
|
26421
|
+
var import_react60 = require("react");
|
|
26685
26422
|
|
|
26686
26423
|
// src/components/trace-graph/service-node.tsx
|
|
26687
26424
|
var import_material16 = require("@mui/material");
|
|
26688
26425
|
var import_style = require("@xyflow/react/dist/style.css");
|
|
26689
|
-
var
|
|
26690
|
-
var
|
|
26426
|
+
var import_react55 = require("@xyflow/react");
|
|
26427
|
+
var import_react56 = require("react");
|
|
26691
26428
|
|
|
26692
26429
|
// src/components/trace-graph/problem-indicator.tsx
|
|
26693
26430
|
var import_icons_material9 = require("@mui/icons-material");
|
|
26694
26431
|
var import_material15 = require("@mui/material");
|
|
26695
|
-
var
|
|
26432
|
+
var import_react54 = require("react");
|
|
26696
26433
|
var import_jsx_runtime137 = require("react/jsx-runtime");
|
|
26697
26434
|
var ProblemIndicator = ({ error }) => {
|
|
26698
|
-
const icon = (0,
|
|
26435
|
+
const icon = (0, import_react54.useMemo)(() => {
|
|
26699
26436
|
switch (error.level) {
|
|
26700
26437
|
case "error": {
|
|
26701
26438
|
return /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(import_icons_material9.Error, { sx: { color: "#d32f2f", fontSize: "14px" } });
|
|
@@ -26708,7 +26445,7 @@ var ProblemIndicator = ({ error }) => {
|
|
|
26708
26445
|
}
|
|
26709
26446
|
}
|
|
26710
26447
|
}, [error.level]);
|
|
26711
|
-
const color2 = (0,
|
|
26448
|
+
const color2 = (0, import_react54.useMemo)(() => {
|
|
26712
26449
|
switch (error.level) {
|
|
26713
26450
|
case "error": {
|
|
26714
26451
|
return "#d32f2f";
|
|
@@ -26747,7 +26484,7 @@ var handleStyle = {
|
|
|
26747
26484
|
borderColor: "lightgray",
|
|
26748
26485
|
opacity: 0
|
|
26749
26486
|
};
|
|
26750
|
-
var ServiceNode = (0,
|
|
26487
|
+
var ServiceNode = (0, import_react56.memo)(({ data, selected }) => {
|
|
26751
26488
|
const hasErrors = (data.event.errors && data.event.errors.length > 0) ?? false;
|
|
26752
26489
|
return /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)(import_material16.Box, { sx: { maxWidth: 200 }, children: [
|
|
26753
26490
|
/* @__PURE__ */ (0, import_jsx_runtime138.jsxs)(
|
|
@@ -26771,8 +26508,8 @@ var ServiceNode = (0, import_react57.memo)(({ data, selected }) => {
|
|
|
26771
26508
|
},
|
|
26772
26509
|
tabIndex: 0,
|
|
26773
26510
|
children: [
|
|
26774
|
-
/* @__PURE__ */ (0, import_jsx_runtime138.jsx)(
|
|
26775
|
-
/* @__PURE__ */ (0, import_jsx_runtime138.jsx)(
|
|
26511
|
+
/* @__PURE__ */ (0, import_jsx_runtime138.jsx)(import_react55.Handle, { position: import_react55.Position.Left, style: handleStyle, type: "target" }),
|
|
26512
|
+
/* @__PURE__ */ (0, import_jsx_runtime138.jsx)(import_react55.Handle, { position: import_react55.Position.Right, style: handleStyle, type: "source" }),
|
|
26776
26513
|
/* @__PURE__ */ (0, import_jsx_runtime138.jsx)(
|
|
26777
26514
|
ServiceCell,
|
|
26778
26515
|
{
|
|
@@ -26862,57 +26599,18 @@ var getLayoutedNodesAndEdges = (inputNodes, inputEdges) => {
|
|
|
26862
26599
|
// src/components/trace-graph/xyflow/controls.tsx
|
|
26863
26600
|
var import_icons_material10 = require("@mui/icons-material");
|
|
26864
26601
|
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
|
|
26602
|
+
var import_react57 = require("@xyflow/react");
|
|
26603
|
+
var import_react58 = require("react");
|
|
26604
|
+
var import_shallow = require("zustand/shallow");
|
|
26907
26605
|
var import_jsx_runtime139 = require("react/jsx-runtime");
|
|
26908
26606
|
var selector = (s2) => ({
|
|
26909
26607
|
isInteractive: s2.nodesDraggable || s2.nodesConnectable || s2.elementsSelectable,
|
|
26910
26608
|
maxZoomReached: s2.transform[2] >= s2.maxZoom,
|
|
26911
26609
|
minZoomReached: s2.transform[2] <= s2.minZoom
|
|
26912
26610
|
});
|
|
26913
|
-
var Controls = (0,
|
|
26914
|
-
const { maxZoomReached, minZoomReached } = (0,
|
|
26915
|
-
const { fitView, zoomIn, zoomOut } = (0,
|
|
26611
|
+
var Controls = (0, import_react58.memo)(() => {
|
|
26612
|
+
const { maxZoomReached, minZoomReached } = (0, import_react57.useStore)(selector, import_shallow.shallow);
|
|
26613
|
+
const { fitView, zoomIn, zoomOut } = (0, import_react57.useReactFlow)();
|
|
26916
26614
|
const onZoomInHandler = () => {
|
|
26917
26615
|
void zoomIn();
|
|
26918
26616
|
};
|
|
@@ -26981,9 +26679,9 @@ var TraceGraph = ({
|
|
|
26981
26679
|
onRefresh,
|
|
26982
26680
|
spans
|
|
26983
26681
|
}) => {
|
|
26984
|
-
const [nodes, setNodes, onNodesChange] = (0,
|
|
26985
|
-
const [edges, setEdges] = (0,
|
|
26986
|
-
(0,
|
|
26682
|
+
const [nodes, setNodes, onNodesChange] = (0, import_react59.useNodesState)([]);
|
|
26683
|
+
const [edges, setEdges] = (0, import_react59.useEdgesState)([]);
|
|
26684
|
+
(0, import_react60.useEffect)(() => {
|
|
26987
26685
|
const allNodes = [];
|
|
26988
26686
|
const allEdges = [];
|
|
26989
26687
|
for (const span of spans.data ?? []) {
|
|
@@ -26998,15 +26696,15 @@ var TraceGraph = ({
|
|
|
26998
26696
|
},
|
|
26999
26697
|
id: span.span_id,
|
|
27000
26698
|
position: { x: 0, y: 0 },
|
|
27001
|
-
sourcePosition:
|
|
27002
|
-
targetPosition:
|
|
26699
|
+
sourcePosition: import_react59.Position.Right,
|
|
26700
|
+
targetPosition: import_react59.Position.Left,
|
|
27003
26701
|
type: "service"
|
|
27004
26702
|
});
|
|
27005
26703
|
if (span.parent_span_id !== null) {
|
|
27006
26704
|
allEdges.push({
|
|
27007
26705
|
animated: false,
|
|
27008
26706
|
id: `e-${span.parent_span_id}-${span.span_id}`,
|
|
27009
|
-
markerEnd: { color: "lightgray", height: 16, type:
|
|
26707
|
+
markerEnd: { color: "lightgray", height: 16, type: import_react59.MarkerType.Arrow, width: 16 },
|
|
27010
26708
|
source: span.parent_span_id,
|
|
27011
26709
|
style: { stroke: "lightgray", strokeWidth: 1 },
|
|
27012
26710
|
target: span.span_id
|
|
@@ -27015,7 +26713,7 @@ var TraceGraph = ({
|
|
|
27015
26713
|
for (const linkedSpanId of span.linked_span_ids ?? []) {
|
|
27016
26714
|
allEdges.push({
|
|
27017
26715
|
id: `e-link-${linkedSpanId}-${span.span_id}`,
|
|
27018
|
-
markerEnd: { color: "lightgray", height: 16, type:
|
|
26716
|
+
markerEnd: { color: "lightgray", height: 16, type: import_react59.MarkerType.Arrow, width: 16 },
|
|
27019
26717
|
source: linkedSpanId,
|
|
27020
26718
|
style: { stroke: "lightgray", strokeWidth: 1 },
|
|
27021
26719
|
// animated: true,
|
|
@@ -27050,7 +26748,7 @@ var TraceGraph = ({
|
|
|
27050
26748
|
}
|
|
27051
26749
|
),
|
|
27052
26750
|
/* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(
|
|
27053
|
-
|
|
26751
|
+
import_react59.ReactFlow,
|
|
27054
26752
|
{
|
|
27055
26753
|
"data-testid": "trace-graph",
|
|
27056
26754
|
edges,
|
|
@@ -27069,7 +26767,7 @@ var TraceGraph = ({
|
|
|
27069
26767
|
children: [
|
|
27070
26768
|
/* @__PURE__ */ (0, import_jsx_runtime140.jsx)(Controls, {}),
|
|
27071
26769
|
/* @__PURE__ */ (0, import_jsx_runtime140.jsx)(
|
|
27072
|
-
|
|
26770
|
+
import_react59.Background,
|
|
27073
26771
|
{
|
|
27074
26772
|
bgColor: theme.palette.background.paper,
|
|
27075
26773
|
color: theme.palette.text.disabled
|
|
@@ -27174,7 +26872,7 @@ var TraceGraphView = ({
|
|
|
27174
26872
|
height: "100%",
|
|
27175
26873
|
overflow: "auto"
|
|
27176
26874
|
},
|
|
27177
|
-
children: traceId !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(
|
|
26875
|
+
children: traceId !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_react61.ReactFlowProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(
|
|
27178
26876
|
TraceGraph,
|
|
27179
26877
|
{
|
|
27180
26878
|
initialFocusEventId: spanId,
|
|
@@ -27235,10 +26933,10 @@ async function fetchConnectedTraces(api, traceIds, allSpans = /* @__PURE__ */ ne
|
|
|
27235
26933
|
}
|
|
27236
26934
|
var TraceGraphPage = ({ onClose, spanId, traceId }) => {
|
|
27237
26935
|
const api = useAppInspectorApi();
|
|
27238
|
-
const [spans, setSpans] = (0,
|
|
27239
|
-
const [loading, setLoading] = (0,
|
|
27240
|
-
const [fetchError, setFetchError] = (0,
|
|
27241
|
-
const fetchSpans = (0,
|
|
26936
|
+
const [spans, setSpans] = (0, import_react62.useState)();
|
|
26937
|
+
const [loading, setLoading] = (0, import_react62.useState)(false);
|
|
26938
|
+
const [fetchError, setFetchError] = (0, import_react62.useState)();
|
|
26939
|
+
const fetchSpans = (0, import_react62.useCallback)(async () => {
|
|
27242
26940
|
setLoading(true);
|
|
27243
26941
|
try {
|
|
27244
26942
|
const spans2 = await fetchConnectedTraces(api, [traceId]);
|
|
@@ -27251,28 +26949,28 @@ var TraceGraphPage = ({ onClose, spanId, traceId }) => {
|
|
|
27251
26949
|
setLoading(false);
|
|
27252
26950
|
}
|
|
27253
26951
|
}, [api, traceId]);
|
|
27254
|
-
(0,
|
|
26952
|
+
(0, import_react62.useEffect)(() => {
|
|
27255
26953
|
void fetchSpans();
|
|
27256
26954
|
}, [fetchSpans]);
|
|
27257
|
-
const [open, setOpen] = (0,
|
|
27258
|
-
const [selectedEvent, setSelectedEvent] = (0,
|
|
27259
|
-
const spansReference = (0,
|
|
27260
|
-
(0,
|
|
26955
|
+
const [open, setOpen] = (0, import_react62.useState)(true);
|
|
26956
|
+
const [selectedEvent, setSelectedEvent] = (0, import_react62.useState)(() => spans?.find((span) => span.span_id === spanId));
|
|
26957
|
+
const spansReference = (0, import_react62.useRef)();
|
|
26958
|
+
(0, import_react62.useEffect)(() => {
|
|
27261
26959
|
if (!spansReference.current && spans) {
|
|
27262
26960
|
setSelectedEvent(spans.find((span) => span.span_id === spanId));
|
|
27263
26961
|
spansReference.current = spans;
|
|
27264
26962
|
}
|
|
27265
26963
|
}, [spans, setSelectedEvent, spanId]);
|
|
27266
26964
|
const { checkStatus, error: statusError, status } = useStatus();
|
|
27267
|
-
const handleEventSelect = (0,
|
|
26965
|
+
const handleEventSelect = (0, import_react62.useCallback)((spanId2) => {
|
|
27268
26966
|
const span = spans?.find((s2) => s2.span_id === spanId2);
|
|
27269
26967
|
setSelectedEvent(span);
|
|
27270
26968
|
setOpen(true);
|
|
27271
26969
|
}, [spans]);
|
|
27272
|
-
const handleRetry = (0,
|
|
26970
|
+
const handleRetry = (0, import_react62.useCallback)(() => {
|
|
27273
26971
|
void checkStatus();
|
|
27274
26972
|
}, [checkStatus]);
|
|
27275
|
-
const navigateToSpansList = (0,
|
|
26973
|
+
const navigateToSpansList = (0, import_react62.useCallback)(() => {
|
|
27276
26974
|
onClose?.();
|
|
27277
26975
|
}, [onClose]);
|
|
27278
26976
|
return /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(
|
|
@@ -27318,17 +27016,17 @@ var SpansListPage = () => {
|
|
|
27318
27016
|
streamPaused,
|
|
27319
27017
|
toggleStream
|
|
27320
27018
|
} = useSpans();
|
|
27321
|
-
const clearSpansSync = (0,
|
|
27019
|
+
const clearSpansSync = (0, import_react63.useCallback)(() => {
|
|
27322
27020
|
void clearSpans();
|
|
27323
27021
|
}, [clearSpans]);
|
|
27324
27022
|
const [order2, setOrder] = useLocalStorage("spans-order", "oldest_first");
|
|
27325
|
-
const [selectedTraceId, setSelectedTraceId] = (0,
|
|
27326
|
-
const [selectedSpanId, setSelectedSpanId] = (0,
|
|
27327
|
-
const navigateToSpan = (0,
|
|
27023
|
+
const [selectedTraceId, setSelectedTraceId] = (0, import_react63.useState)();
|
|
27024
|
+
const [selectedSpanId, setSelectedSpanId] = (0, import_react63.useState)();
|
|
27025
|
+
const navigateToSpan = (0, import_react63.useCallback)((span) => {
|
|
27328
27026
|
setSelectedTraceId(span.trace_id);
|
|
27329
27027
|
setSelectedSpanId(span.span_id);
|
|
27330
27028
|
}, []);
|
|
27331
|
-
const handleRetry = (0,
|
|
27029
|
+
const handleRetry = (0, import_react63.useCallback)(() => {
|
|
27332
27030
|
void checkStatus();
|
|
27333
27031
|
}, [checkStatus]);
|
|
27334
27032
|
const shouldShowStatusMessage = Boolean(statusError) || status?.status === "DISABLED";
|
|
@@ -27394,28 +27092,6 @@ var pages = {
|
|
|
27394
27092
|
};
|
|
27395
27093
|
/*! Bundled license information:
|
|
27396
27094
|
|
|
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
27095
|
@tanstack/table-core/build/lib/index.mjs:
|
|
27420
27096
|
(**
|
|
27421
27097
|
* table-core
|