@splunk/react-ui 5.2.0 → 5.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (114) hide show
  1. package/Accordion.js +31 -31
  2. package/Avatar.js +64 -59
  3. package/Box.js +2 -1
  4. package/Breadcrumbs.js +66 -63
  5. package/ButtonSimple.js +52 -52
  6. package/CHANGELOG.md +47 -0
  7. package/Calendar.js +8 -4
  8. package/CardLayout.js +39 -36
  9. package/Checkbox.d.ts +2 -0
  10. package/Checkbox.js +350 -0
  11. package/Clickable.js +5 -6
  12. package/Code.js +451 -536
  13. package/CollapsiblePanel.js +184 -210
  14. package/Color.js +903 -1023
  15. package/ControlGroup.js +2 -1
  16. package/Date.js +123 -119
  17. package/DefinitionList.js +100 -77
  18. package/Dropdown.js +2 -2
  19. package/DualListbox.js +409 -353
  20. package/File.js +102 -99
  21. package/FormRows.js +13 -11
  22. package/JSONTree.js +679 -1391
  23. package/Link.js +7 -7
  24. package/MIGRATION.md +27 -0
  25. package/Markdown.js +171 -156
  26. package/Menu.js +107 -100
  27. package/Modal.js +3 -3
  28. package/Multiselect.js +2698 -2767
  29. package/Paginator.js +2 -1
  30. package/Popover.js +201 -196
  31. package/Resize.js +11 -8
  32. package/ResultsMenu.js +913 -1029
  33. package/ScreenReaderContent.js +86 -130
  34. package/Scroll.js +366 -424
  35. package/Search.js +131 -127
  36. package/Select.js +1741 -1831
  37. package/Slider.js +1 -1
  38. package/SlidingPanels.js +129 -127
  39. package/StepBar.js +123 -97
  40. package/Switch.js +214 -242
  41. package/TabBar.js +10 -10
  42. package/Table.js +1255 -1248
  43. package/Text.js +180 -206
  44. package/TextArea.js +596 -675
  45. package/Tooltip.js +144 -139
  46. package/Tree.js +638 -682
  47. package/package.json +15 -16
  48. package/tsconfig.check-docs.json +8 -0
  49. package/types/src/Avatar/docs/examples/Basic.d.ts +1 -1
  50. package/types/src/Breadcrumbs/Breadcrumbs.d.ts +1 -5
  51. package/types/src/Breadcrumbs/BreadcrumbsContext.d.ts +7 -0
  52. package/types/src/Breadcrumbs/Item.d.ts +1 -1
  53. package/types/src/ButtonSimple/mixin.d.ts +1 -1
  54. package/types/src/Checkbox/Checkbox.d.ts +90 -0
  55. package/types/src/Checkbox/docs/examples/Basic.d.ts +7 -0
  56. package/types/src/Checkbox/docs/examples/Disabled.d.ts +6 -0
  57. package/types/src/Checkbox/docs/examples/Error.d.ts +6 -0
  58. package/types/src/Checkbox/docs/examples/Uncontrolled.d.ts +7 -0
  59. package/types/src/Checkbox/index.d.ts +2 -0
  60. package/types/src/Code/Code.d.ts +4 -1
  61. package/types/src/Code/LineHighlights.d.ts +1 -0
  62. package/types/src/Code/LineNumbers.d.ts +2 -1
  63. package/types/src/Code/docs/examples/CustomizeContainer.d.ts +7 -0
  64. package/types/src/ControlGroup/docs/examples/CustomizedLabelTarget.d.ts +3 -3
  65. package/types/src/Date/Date.d.ts +7 -1
  66. package/types/src/DefinitionList/DefinitionList.d.ts +7 -2
  67. package/types/src/DefinitionList/DefinitionListContext.d.ts +1 -1
  68. package/types/src/DefinitionList/docs/examples/StackedLayout.d.ts +6 -0
  69. package/types/src/DualListbox/DualListbox.d.ts +1 -1
  70. package/types/src/DualListbox/Label.d.ts +7 -7
  71. package/types/src/DualListbox/Listbox.d.ts +2 -2
  72. package/types/src/DualListbox/ListboxContext.d.ts +1 -1
  73. package/types/src/File/File.d.ts +7 -1
  74. package/types/src/JSONTree/JSONTreeItem.d.ts +5 -3
  75. package/types/src/JSONTree/renderTreeItems.d.ts +3 -2
  76. package/types/src/Markdown/renderers/MarkdownCodeBlock.d.ts +2 -1
  77. package/types/src/Menu/docs/examples/Dimmed.d.ts +1 -1
  78. package/types/src/Menu/docs/examples/Disabled.d.ts +1 -0
  79. package/types/src/Modal/ModalContext.d.ts +1 -1
  80. package/types/src/Multiselect/Compact.d.ts +9 -3
  81. package/types/src/Multiselect/Multiselect.d.ts +7 -1
  82. package/types/src/Multiselect/Normal.d.ts +9 -3
  83. package/types/src/Number/utils.d.ts +1 -1
  84. package/types/src/Popover/getPlacement.d.ts +1 -1
  85. package/types/src/RadioList/Option.d.ts +1 -1
  86. package/types/src/RadioList/RadioListContext.d.ts +1 -1
  87. package/types/src/Search/Search.d.ts +5 -1
  88. package/types/src/StepBar/StepBar.d.ts +4 -1
  89. package/types/src/StepBar/StepBarContext.d.ts +1 -0
  90. package/types/src/StepBar/docs/examples/Vertical.d.ts +6 -0
  91. package/types/src/Switch/Switch.d.ts +13 -1
  92. package/types/src/Switch/docs/examples/Basic.d.ts +2 -10
  93. package/types/src/Switch/docs/examples/Disabled.d.ts +2 -9
  94. package/types/src/TabBar/Tab.d.ts +3 -1
  95. package/types/src/TabBar/docs/examples/Icons.d.ts +4 -0
  96. package/types/src/TabBar/docs/examples/Tooltips.d.ts +3 -0
  97. package/types/src/TabLayout/Panel.d.ts +2 -0
  98. package/types/src/Table/ExpandButton.d.ts +1 -1
  99. package/types/src/Table/Head.d.ts +1 -1
  100. package/types/src/Table/Row.d.ts +1 -1
  101. package/types/src/Table/Table.d.ts +1 -0
  102. package/types/src/Tooltip/Tooltip.d.ts +14 -1
  103. package/types/src/Tree/TreeContext.d.ts +1 -1
  104. package/useControlled.js +61 -97
  105. package/usePrevious.js +30 -62
  106. package/useResizeObserver.js +95 -127
  107. package/NonInteractiveCheckbox.js +0 -101
  108. package/types/src/CollapsiblePanel/icons/ExpandPanel.d.ts +0 -12
  109. package/types/src/NonInteractiveCheckbox/NonInteractiveCheckbox.d.ts +0 -22
  110. package/types/src/NonInteractiveCheckbox/index.d.ts +0 -1
  111. package/types/src/Switch/docs/examples/Error.d.ts +0 -6
  112. package/types/src/Text/IconOutlinedHide.d.ts +0 -3
  113. package/types/src/Text/IconOutlinedView.d.ts +0 -3
  114. /package/cypress/{tsconfig.cypress.json → tsconfig.check-cypress.json} +0 -0
package/JSONTree.js CHANGED
@@ -1,755 +1,34 @@
1
1
  /******/ (() => {
2
2
  // webpackBootstrap
3
3
  /******/ "use strict";
4
- /******/ var e = {
5
- /***/ 8655:
6
- /***/ (e, n, r) => {
7
- // EXPORTS
8
- r.d(n, {
9
- default: () => /* reexport */ ce
10
- });
11
- // UNUSED EXPORTS: Item
12
- // EXTERNAL MODULE: external "react"
13
- var t = r(9497);
14
- var o = r.n(t);
15
- // EXTERNAL MODULE: external "prop-types"
16
- var a = r(23);
17
- var i = r.n(a);
18
- // EXTERNAL MODULE: external "styled-components"
19
- var l = r(232);
20
- var u = r.n(l);
21
- // EXTERNAL MODULE: external "@splunk/themes"
22
- var c = r(3563);
23
- // CONCATENATED MODULE: ./src/Tree/ItemStyles.ts
24
- var f = u().span.withConfig({
25
- displayName: "ItemStyles__StyledTreeItemContentWrapper",
26
- componentId: "sc-1ig9nmy-0"
27
- })([ "display:inline-block;min-height:100%;" ]);
28
- var d = u().span.withConfig({
29
- displayName: "ItemStyles__StyledTreeItemIndent",
30
- componentId: "sc-1ig9nmy-1"
31
- })([ "white-space:pre;" ]);
32
- var s = u().span.withConfig({
33
- displayName: "ItemStyles__StyledTreeItemContent",
34
- componentId: "sc-1ig9nmy-2"
35
- })([ "display:", ";min-height:100%;&:focus{outline:3px solid ", ";outline-offset:1px;&:active{outline:none;}}&:hover{background-color:", ";cursor:pointer;}" ], (function(e) {
36
- var n = e.$hasCustomIndent;
37
- return n ? "inline" : "inline-block";
38
- }), c.variables.focusColor, c.variables.actionColorBackgroundSecondaryHover);
39
- // CONCATENATED MODULE: ./src/Tree/TreeContext.tsx
40
- var v = (0, t.createContext)({
41
- defaultIndent: true
42
- });
43
- /* harmony default export */ const p = v;
44
- // CONCATENATED MODULE: ./src/Tree/TreeStyles.ts
45
- var y = u().ul.withConfig({
46
- displayName: "TreeStyles__StyledUnorderedList",
47
- componentId: "sc-13pokwt-0"
48
- })([ "", ";list-style:none;white-space:inherit;", ";" ], c.mixins.reset("ul"), (function(e) {
49
- var n = e.$defaultIndent;
50
- return n && (0, l.css)([ "padding-inline-start:", ";" ], c.variables.spacingXXXLarge);
51
- }));
52
- // CONCATENATED MODULE: ./src/utils/updateReactRef.ts
53
- /**
54
- * Updates a React ref. Callback refs and object refs (from `createRef` and `useRef`) are supported.
55
- *
56
- * @param ref - The React callback or object ref. Can be `null` or `undefined`.
57
- * @param current - The new value of the ref.
58
- */
59
- function m(e, n) {
60
- if (e) {
61
- if (typeof e === "function") {
62
- e(n);
63
- } else {
64
- // the public signature of this util uses React.Ref<T> to mirror the way React types refs.
65
- // the intention here is to signal "we will take care of setting 'current', not you".
66
- e.current = n;
67
- // eslint-disable-line no-param-reassign
68
- }
69
- }
70
- }
71
- // CONCATENATED MODULE: ./src/Tree/Item.tsx
72
- function b(e) {
73
- "@babel/helpers - typeof";
74
- return b = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) {
75
- return typeof e;
76
- } : function(e) {
77
- return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
78
- }, b(e);
79
- }
80
- function h() {
81
- return h = Object.assign ? Object.assign.bind() : function(e) {
82
- for (var n = 1; n < arguments.length; n++) {
83
- var r = arguments[n];
84
- for (var t in r) {
85
- ({}).hasOwnProperty.call(r, t) && (e[t] = r[t]);
86
- }
87
- }
88
- return e;
89
- }, h.apply(null, arguments);
90
- }
91
- function g(e, n) {
92
- var r = Object.keys(e);
93
- if (Object.getOwnPropertySymbols) {
94
- var t = Object.getOwnPropertySymbols(e);
95
- n && (t = t.filter((function(n) {
96
- return Object.getOwnPropertyDescriptor(e, n).enumerable;
97
- }))), r.push.apply(r, t);
98
- }
99
- return r;
100
- }
101
- function S(e) {
102
- for (var n = 1; n < arguments.length; n++) {
103
- var r = null != arguments[n] ? arguments[n] : {};
104
- n % 2 ? g(Object(r), !0).forEach((function(n) {
105
- O(e, n, r[n]);
106
- })) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : g(Object(r)).forEach((function(n) {
107
- Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(r, n));
108
- }));
109
- }
110
- return e;
111
- }
112
- function O(e, n, r) {
113
- return (n = w(n)) in e ? Object.defineProperty(e, n, {
114
- value: r,
115
- enumerable: !0,
116
- configurable: !0,
117
- writable: !0
118
- }) : e[n] = r, e;
119
- }
120
- function w(e) {
121
- var n = k(e, "string");
122
- return "symbol" == b(n) ? n : n + "";
123
- }
124
- function k(e, n) {
125
- if ("object" != b(e) || !e) return e;
126
- var r = e[Symbol.toPrimitive];
127
- if (void 0 !== r) {
128
- var t = r.call(e, n || "default");
129
- if ("object" != b(t)) return t;
130
- throw new TypeError("@@toPrimitive must return a primitive value.");
131
- }
132
- return ("string" === n ? String : Number)(e);
133
- }
134
- function x(e, n) {
135
- return T(e) || E(e, n) || j(e, n) || I();
136
- }
137
- function I() {
138
- throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
139
- }
140
- function j(e, n) {
141
- if (e) {
142
- if ("string" == typeof e) return C(e, n);
143
- var r = {}.toString.call(e).slice(8, -1);
144
- return "Object" === r && e.constructor && (r = e.constructor.name), "Map" === r || "Set" === r ? Array.from(e) : "Arguments" === r || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r) ? C(e, n) : void 0;
145
- }
146
- }
147
- function C(e, n) {
148
- (null == n || n > e.length) && (n = e.length);
149
- for (var r = 0, t = Array(n); r < n; r++) {
150
- t[r] = e[r];
151
- }
152
- return t;
153
- }
154
- function E(e, n) {
155
- var r = null == e ? null : "undefined" != typeof Symbol && e[Symbol.iterator] || e["@@iterator"];
156
- if (null != r) {
157
- var t, o, a, i, l = [], u = !0, c = !1;
158
- try {
159
- if (a = (r = r.call(e)).next, 0 === n) {
160
- if (Object(r) !== r) return;
161
- u = !1;
162
- } else for (;!(u = (t = a.call(r)).done) && (l.push(t.value), l.length !== n); u = !0) {
163
- }
164
- } catch (e) {
165
- c = !0, o = e;
166
- } finally {
167
- try {
168
- if (!u && null != r["return"] && (i = r["return"](), Object(i) !== i)) return;
169
- } finally {
170
- if (c) throw o;
171
- }
172
- }
173
- return l;
174
- }
175
- }
176
- function T(e) {
177
- if (Array.isArray(e)) return e;
178
- }
179
- function A(e, n) {
180
- if (null == e) return {};
181
- var r, t, o = P(e, n);
182
- if (Object.getOwnPropertySymbols) {
183
- var a = Object.getOwnPropertySymbols(e);
184
- for (t = 0; t < a.length; t++) {
185
- r = a[t], -1 === n.indexOf(r) && {}.propertyIsEnumerable.call(e, r) && (o[r] = e[r]);
186
- }
187
- }
188
- return o;
189
- }
190
- function P(e, n) {
191
- if (null == e) return {};
192
- var r = {};
193
- for (var t in e) {
194
- if ({}.hasOwnProperty.call(e, t)) {
195
- if (-1 !== n.indexOf(t)) continue;
196
- r[t] = e[t];
197
- }
198
- }
199
- return r;
200
- }
201
- var R = {
202
- id: i().string,
203
- children: i().node,
204
- content: i().node,
205
- customIndent: i().node,
206
- elementRef: i().oneOfType([ i().func, i().object ]),
207
- endAdornment: i().node,
208
- expanded: i().bool,
209
- onFocus: i().func,
210
- onKeyDown: i().func,
211
- onToggleSelection: i().func,
212
- onToggleExpansion: i().func
213
- };
214
- /** @public */
215
- /** @public */ function _(e) {
216
- var n = e.id, r = e.children, a = e.content, i = e.customIndent, l = e.elementRef, u = e.endAdornment, c = e.expanded, v = e.onFocus, b = e.onKeyDown, g = e.onToggleExpansion, O = e.onToggleSelection, w = A(e, [ "id", "children", "content", "customIndent", "elementRef", "endAdornment", "expanded", "onFocus", "onKeyDown", "onToggleExpansion", "onToggleSelection" ]);
217
- // @docs-props-type TreeItemPropsBase
218
- var k = (0, t.useContext)(p), I = k.defaultIndent, j = I === void 0 ? true : I, C = k.onItemKeyDown, E = k.onItemClick, T = k.removeNode, P = k.setNode, R = k.itemPaths, _ = k.focusedItemId;
219
- // make first tree item tabbable
220
- var K = (0, t.useState)((R === null || R === void 0 ? void 0 : R.get("".concat(n))) === "0" ? 0 : -1), N = x(K, 2), D = N[0], V = N[1];
221
- var L = (0, t.useRef)(null);
222
- var q = (0, t.useRef)(null);
223
- var F = t.Children.toArray(r).filter(t.isValidElement);
224
- F.forEach((function(e, r) {
225
- if (e.props.id) {
226
- if (c && P) {
227
- P("".concat(e.props.id), "".concat(R === null || R === void 0 ? void 0 : R.get("".concat(n)), "-").concat(r));
228
- } else if (T) {
229
- T(e.props.id);
230
- }
231
- }
232
- }));
233
- var $ = (0, t.useCallback)((function(e) {
234
- m(L, e);
235
- m(l, e);
236
- }), [ l ]);
237
- var M = (0, t.useCallback)((function(e) {
238
- var n;
239
- var r = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
240
- // For consistency, if not provided but found in the event then add it to `data` on callback.
241
- // This allows for common handling of both click and keyboard events in the consumer.
242
- var t = S({}, r);
243
- if (!r.treeItemId && ((n = e.currentTarget) === null || n === void 0 ? void 0 : n.id)) {
244
- t.treeItemId = e.currentTarget.id;
245
- }
246
- g === null || g === void 0 ? void 0 : g(e, t);
247
- }), [ g ]);
248
- var J = (0, t.useCallback)((function(e) {
249
- E === null || E === void 0 ? void 0 : E(e, n);
250
- }), [ n, E ]);
251
- var U = (0, t.useCallback)((function(e) {
252
- var n;
253
- e.stopPropagation();
254
- q === null || q === void 0 ? void 0 : (n = q.current) === null || n === void 0 ? void 0 : n.focus();
255
- v === null || v === void 0 ? void 0 : v(e);
256
- }), [ v ]);
257
- var B = (0, t.useCallback)((function() {
258
- if ((R === null || R === void 0 ? void 0 : R.get("".concat(n))) === "0") {
259
- V(0);
260
- }
261
- }), [ n, R ]);
262
- (0, t.useEffect)((function() {
263
- if (_ === n) {
264
- var e;
265
- L === null || L === void 0 ? void 0 : (e = L.current) === null || e === void 0 ? void 0 : e.focus();
266
- }
267
- }), [ _, n, L ]);
268
- var X = (0, t.useCallback)((function(e) {
269
- e.stopPropagation();
270
- }), []);
271
- var G = (0, t.useCallback)((function(e) {
272
- e.stopPropagation();
273
- if (e.key === " ") {
274
- e.preventDefault();
275
- O === null || O === void 0 ? void 0 : O(e, {
276
- treeItemId: n
277
- });
278
- return;
279
- }
280
- // Used to ensure first item in Tree is tab navigable, i.e. in JSONTree when focus is manually set to the root item,
281
- // this allows user to tab backwards to previous item. Tab index is reset to 0 onBlur.
282
- if (e.shiftKey && e.key === "Tab" && (R === null || R === void 0 ? void 0 : R.get("".concat(n))) === "0") {
283
- V(-1);
284
- }
285
- C === null || C === void 0 ? void 0 : C(e, n, c, F, M);
286
- b === null || b === void 0 ? void 0 : b(e);
287
- }), [ F, c, M, n, R, C, b, O ]);
288
-
289
- return o().createElement("li", h({
290
- "data-test": "tree-item"
291
- }, w, {
292
- id: n,
293
- ref: $,
294
- tabIndex: D,
295
- onBlur: B,
296
- onFocus: U,
297
- onKeyDown: G,
298
- role: "treeitem",
299
- "aria-expanded": F.length ? c || "false" : undefined
300
- }), o().createElement(f, null, o().createElement(d, null, i), o().createElement(s, {
301
- $hasCustomIndent: !!i,
302
- "data-test": "tree-item-content",
303
- ref: q,
304
- tabIndex: -1,
305
- onFocus: X,
306
- onClick: J
307
- }, a, !c && u)), c && o().createElement(o().Fragment, null, o().createElement(y, {
308
- role: "group",
309
- $defaultIndent: j
310
- }, r), u));
311
- }
312
- _.propTypes = R;
313
- /* harmony default export */ const K = _;
314
- // CONCATENATED MODULE: ./src/Tree/treeUtils.ts
315
- function N(e, n) {
316
- return F(e) || q(e, n) || V(e, n) || D();
317
- }
318
- function D() {
319
- throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
320
- }
321
- function V(e, n) {
322
- if (e) {
323
- if ("string" == typeof e) return L(e, n);
324
- var r = {}.toString.call(e).slice(8, -1);
325
- return "Object" === r && e.constructor && (r = e.constructor.name), "Map" === r || "Set" === r ? Array.from(e) : "Arguments" === r || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r) ? L(e, n) : void 0;
326
- }
327
- }
328
- function L(e, n) {
329
- (null == n || n > e.length) && (n = e.length);
330
- for (var r = 0, t = Array(n); r < n; r++) {
331
- t[r] = e[r];
332
- }
333
- return t;
334
- }
335
- function q(e, n) {
336
- var r = null == e ? null : "undefined" != typeof Symbol && e[Symbol.iterator] || e["@@iterator"];
337
- if (null != r) {
338
- var t, o, a, i, l = [], u = !0, c = !1;
339
- try {
340
- if (a = (r = r.call(e)).next, 0 === n) {
341
- if (Object(r) !== r) return;
342
- u = !1;
343
- } else for (;!(u = (t = a.call(r)).done) && (l.push(t.value), l.length !== n); u = !0) {
344
- }
345
- } catch (e) {
346
- c = !0, o = e;
347
- } finally {
348
- try {
349
- if (!u && null != r["return"] && (i = r["return"](), Object(i) !== i)) return;
350
- } finally {
351
- if (c) throw o;
352
- }
353
- }
354
- return l;
355
- }
356
- }
357
- function F(e) {
358
- if (Array.isArray(e)) return e;
359
- }
360
- /**
361
- * A helper function to get first key in Map that matches given value
362
- */ function $(e, n) {
363
- var r;
364
- var t = Array.from(e.entries());
365
- return (r = t.find((function(e) {
366
- var r = N(e, 2), t = r[1];
367
- return t === n;
368
- }))) === null || r === void 0 ? void 0 : r[0];
369
- }
370
- /**
371
- * A helper function to get parent path of current item path
372
- */ function M(e) {
373
- // remove last index number of the current item path string to get parent
374
- return e.split("-").slice(0, -1).join("-");
375
- }
376
- /**
377
- * A helper function to get next path of current item path in same level
378
- */ function J(e, n) {
379
- return e === null || e === void 0 ? void 0 : e.replace(/([^-]*)$/, "".concat(n + 1));
380
- }
381
- /**
382
- * A helper function to get the last index number of an item path string
383
- */ function U(e) {
384
- var n = e.split("-").pop();
385
- if (!n) {
386
- return 0;
387
- }
388
- return parseInt(n, 10) || 0;
389
- }
390
- function B(e, n) {
391
- var r = e.get(n);
392
- if (!r) {
393
- return n;
394
- }
395
- var t = M(r);
396
- return $(e, t) || n;
397
- }
398
- /**
399
- * A helper function for getNextTreeItem
400
- */ function X(e, n) {
401
- var r = M(n);
402
- if (!r) {
403
- return $(e, n);
404
- }
405
- // get next node in the parent level
406
- var t = U(r);
407
- var o = J(r, t);
408
- var a = $(e, o);
409
- if (a) {
410
- return a;
411
- }
412
- // continue getting parents until find next node or reach root
413
- return X(e, o);
414
- }
415
- function G(e, n) {
416
- var r = e.get(n);
417
- if (!r) {
418
- return n;
419
- }
420
- // case where next tree item is the first visible child
421
- var t = $(e, "".concat(r, "-0"));
422
- if (t) {
423
- return t;
424
- }
425
- // case where next tree item is the next node in the same level
426
- var o = U(r);
427
- var a = J(r, o);
428
- var i = $(e, a);
429
- if (i) {
430
- return i;
431
- }
432
- // case where next tree item is a higher level or does not exist
433
- return X(e, r) || n;
434
- }
435
- /**
436
- * A helper function for getPrevTreeItem
437
- */ function H(e, n) {
438
- var r = $(e, "".concat(n, "-0"));
439
- if (!r) {
440
- return $(e, n);
441
- }
442
- var t = $(e, n);
443
- var o = "".concat(n, "-0");
444
- // get the last child in current node, and continue to find its children recursively
445
- while (t) {
446
- var a = U(o);
447
- var i = J(o, a);
448
- t = $(e, i);
449
- if (t) {
450
- o = i;
451
- }
452
- }
453
- return H(e, o);
454
- }
455
- function W(e, n) {
456
- var r = e.get(n);
457
- if (!r) {
458
- return n;
459
- }
460
- var t = U(r);
461
- // case where current is first child of parent or root item
462
- if (t === 0) {
463
- return B(e, n);
464
- }
465
- // case where previous tree item is or is a child of previous node in same level
466
- var o = r.replace(/[^-]+$/, "".concat(t - 1));
467
- return H(e, o) || n;
468
- }
469
- function z(e) {
470
- return $(e, "0");
471
- }
472
- function Q(e) {
473
- var n = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "0";
474
- var r = $(e, n);
475
- var t = n;
476
- // find last child in current node
477
- while (r) {
478
- var o = U(t);
479
- r = $(e, J(t, o));
480
- if (r) {
481
- t = J(t, o);
482
- }
483
- }
484
- // check if last child has children
485
- var a = $(e, "".concat(t, "-0"));
486
- if (!a) {
487
- return $(e, t);
488
- }
489
- // continue to find its last child recursively
490
- t = "".concat(t, "-0");
491
- return Q(e, t);
492
- }
493
- // CONCATENATED MODULE: ./src/Tree/Tree.tsx
494
- function Y() {
495
- return Y = Object.assign ? Object.assign.bind() : function(e) {
496
- for (var n = 1; n < arguments.length; n++) {
497
- var r = arguments[n];
498
- for (var t in r) {
499
- ({}).hasOwnProperty.call(r, t) && (e[t] = r[t]);
500
- }
501
- }
502
- return e;
503
- }, Y.apply(null, arguments);
504
- }
505
- function Z(e, n) {
506
- return oe(e) || te(e, n) || ne(e, n) || ee();
507
- }
508
- function ee() {
509
- throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
510
- }
511
- function ne(e, n) {
512
- if (e) {
513
- if ("string" == typeof e) return re(e, n);
514
- var r = {}.toString.call(e).slice(8, -1);
515
- return "Object" === r && e.constructor && (r = e.constructor.name), "Map" === r || "Set" === r ? Array.from(e) : "Arguments" === r || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r) ? re(e, n) : void 0;
516
- }
517
- }
518
- function re(e, n) {
519
- (null == n || n > e.length) && (n = e.length);
520
- for (var r = 0, t = Array(n); r < n; r++) {
521
- t[r] = e[r];
522
- }
523
- return t;
524
- }
525
- function te(e, n) {
526
- var r = null == e ? null : "undefined" != typeof Symbol && e[Symbol.iterator] || e["@@iterator"];
527
- if (null != r) {
528
- var t, o, a, i, l = [], u = !0, c = !1;
529
- try {
530
- if (a = (r = r.call(e)).next, 0 === n) {
531
- if (Object(r) !== r) return;
532
- u = !1;
533
- } else for (;!(u = (t = a.call(r)).done) && (l.push(t.value), l.length !== n); u = !0) {
534
- }
535
- } catch (e) {
536
- c = !0, o = e;
537
- } finally {
538
- try {
539
- if (!u && null != r["return"] && (i = r["return"](), Object(i) !== i)) return;
540
- } finally {
541
- if (c) throw o;
542
- }
543
- }
544
- return l;
545
- }
546
- }
547
- function oe(e) {
548
- if (Array.isArray(e)) return e;
549
- }
550
- function ae(e, n) {
551
- if (null == e) return {};
552
- var r, t, o = ie(e, n);
553
- if (Object.getOwnPropertySymbols) {
554
- var a = Object.getOwnPropertySymbols(e);
555
- for (t = 0; t < a.length; t++) {
556
- r = a[t], -1 === n.indexOf(r) && {}.propertyIsEnumerable.call(e, r) && (o[r] = e[r]);
557
- }
558
- }
559
- return o;
560
- }
561
- function ie(e, n) {
562
- if (null == e) return {};
563
- var r = {};
564
- for (var t in e) {
565
- if ({}.hasOwnProperty.call(e, t)) {
566
- if (-1 !== n.indexOf(t)) continue;
567
- r[t] = e[t];
568
- }
569
- }
570
- return r;
571
- }
572
- var le = {
573
- children: i().node,
574
- defaultIndent: i().bool,
575
- elementRef: i().oneOfType([ i().func, i().object ])
576
- };
577
- /**
578
- * Used to present a hierarchical list.
579
- */ function ue(e) {
580
- var n = e.children, r = e.defaultIndent, a = r === void 0 ? true : r, i = e.elementRef, l = ae(e, [ "children", "defaultIndent", "elementRef" ]);
581
- // @docs-props-type TreePropsBase
582
- var u = (0, t.useState)(), c = Z(u, 2), f = c[0], d = c[1];
583
- var s = (0, t.useMemo)((function() {
584
- return new Map;
585
- }), []);
586
- var v = (0, t.useCallback)((function(e, n, r, t, o) {
587
- e.stopPropagation();
588
- var a = r && (t === null || t === void 0 ? void 0 : t.length);
589
- switch (e.key) {
590
- case "ArrowUp":
591
- e.preventDefault();
592
- d(W(s, n));
593
- break;
594
-
595
- case "ArrowDown":
596
- e.preventDefault();
597
- d(G(s, n));
598
- break;
599
-
600
- case "ArrowLeft":
601
- e.preventDefault();
602
- if (a) {
603
- o(e, {
604
- treeItemId: n
605
- });
606
- } else {
607
- d(B(s, n));
608
- }
609
- break;
610
-
611
- case "ArrowRight":
612
- e.preventDefault();
613
- if (a) {
614
- d(G(s, n));
615
- } else {
616
- o(e, {
617
- treeItemId: n
618
- });
619
- }
620
- break;
621
-
622
- case "Home":
623
- e.preventDefault();
624
- d(z(s));
625
- break;
626
-
627
- case "End":
628
- e.preventDefault();
629
- d(Q(s));
630
- break;
631
-
632
- case "Enter":
633
- e.preventDefault();
634
- o(e, {
635
- treeItemId: n
636
- });
637
- break;
638
-
639
- default:
640
- // do nothing
641
- }
642
- }), [ s ]);
643
- var m = function e(n, r) {
644
- n.preventDefault();
645
- d(r);
646
- };
647
- var b = (0, t.useCallback)((function(e) {
648
- s["delete"](e);
649
- }), [ s ]);
650
- var h = (0, t.useCallback)((function(e, n) {
651
- s.set(e, n);
652
- }), [ s ]);
653
- var g = t.Children.toArray(n).filter(t.isValidElement);
654
- g.forEach((function(e, n) {
655
- if (e.props.id && h) {
656
- h("".concat(e.props.id), "".concat(n));
657
- }
658
- }));
659
- var S = (0, t.useMemo)((function() {
660
- return {
661
- defaultIndent: a,
662
- onItemKeyDown: v,
663
- onItemClick: m,
664
- removeNode: b,
665
- setNode: h,
666
- itemPaths: s,
667
- focusedItemId: f
668
- };
669
- }), [ a, f, s, v, b, h ]);
670
-
671
- return o().createElement(p.Provider, {
672
- value: S
673
- }, o().createElement(y, Y({
674
- "data-test": "tree",
675
- ref: i,
676
- role: "tree",
677
- $defaultIndent: a
678
- }, l), n));
679
- }
680
- ue.propTypes = le;
681
- ue.Item = K;
682
- /* harmony default export */ const ce = ue;
683
- } // CONCATENATED MODULE: ./src/Tree/index.ts
684
- /***/ ,
685
- /***/ 3563:
686
- /***/ e => {
687
- e.exports = require("@splunk/themes");
688
- /***/ },
689
- /***/ 23:
690
- /***/ e => {
691
- e.exports = require("prop-types");
692
- /***/ },
693
- /***/ 9497:
694
- /***/ e => {
695
- e.exports = require("react");
696
- /***/ },
697
- /***/ 232:
698
- /***/ e => {
699
- e.exports = require("styled-components");
700
- /***/
701
- /******/ }
702
- };
703
- /************************************************************************/
704
- /******/ // The module cache
705
- /******/ var n = {};
706
- /******/
707
- /******/ // The require function
708
- /******/ function r(t) {
709
- /******/ // Check if module is in cache
710
- /******/ var o = n[t];
711
- /******/ if (o !== undefined) {
712
- /******/ return o.exports;
713
- /******/ }
714
- /******/ // Create a new module (and put it into the cache)
715
- /******/ var a = n[t] = {
716
- /******/ // no module.id needed
717
- /******/ // no module.loaded needed
718
- /******/ exports: {}
719
- /******/ };
720
- /******/
721
- /******/ // Execute the module function
722
- /******/ e[t](a, a.exports, r);
723
- /******/
724
- /******/ // Return the exports of the module
725
- /******/ return a.exports;
726
- /******/ }
4
+ /******/ // The require scope
5
+ /******/ var e = {};
727
6
  /******/
728
7
  /************************************************************************/
729
8
  /******/ /* webpack/runtime/compat get default export */
730
9
  /******/ (() => {
731
10
  /******/ // getDefaultExport function for compatibility with non-harmony modules
732
- /******/ r.n = e => {
733
- /******/ var n = e && e.__esModule ?
734
- /******/ () => e["default"]
735
- /******/ : () => e
11
+ /******/ e.n = n => {
12
+ /******/ var r = n && n.__esModule ?
13
+ /******/ () => n["default"]
14
+ /******/ : () => n
736
15
  /******/;
737
- r.d(n, {
738
- a: n
16
+ e.d(r, {
17
+ a: r
739
18
  });
740
- /******/ return n;
19
+ /******/ return r;
741
20
  /******/ };
742
21
  /******/ })();
743
22
  /******/
744
23
  /******/ /* webpack/runtime/define property getters */
745
24
  /******/ (() => {
746
25
  /******/ // define getter functions for harmony exports
747
- /******/ r.d = (e, n) => {
748
- /******/ for (var t in n) {
749
- /******/ if (r.o(n, t) && !r.o(e, t)) {
750
- /******/ Object.defineProperty(e, t, {
26
+ /******/ e.d = (n, r) => {
27
+ /******/ for (var t in r) {
28
+ /******/ if (e.o(r, t) && !e.o(n, t)) {
29
+ /******/ Object.defineProperty(n, t, {
751
30
  enumerable: true,
752
- get: n[t]
31
+ get: r[t]
753
32
  });
754
33
  /******/ }
755
34
  /******/ }
@@ -758,14 +37,14 @@
758
37
  /******/
759
38
  /******/ /* webpack/runtime/hasOwnProperty shorthand */
760
39
  /******/ (() => {
761
- /******/ r.o = (e, n) => Object.prototype.hasOwnProperty.call(e, n)
40
+ /******/ e.o = (e, n) => Object.prototype.hasOwnProperty.call(e, n)
762
41
  /******/;
763
42
  })();
764
43
  /******/
765
44
  /******/ /* webpack/runtime/make namespace object */
766
45
  /******/ (() => {
767
46
  /******/ // define __esModule on exports
768
- /******/ r.r = e => {
47
+ /******/ e.r = e => {
769
48
  /******/ if (typeof Symbol !== "undefined" && Symbol.toStringTag) {
770
49
  /******/ Object.defineProperty(e, Symbol.toStringTag, {
771
50
  value: "Module"
@@ -777,708 +56,717 @@
777
56
  /******/ };
778
57
  /******/ })();
779
58
  /******/
780
- /************************************************************************/ var t = {};
781
- // This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
782
- (() => {
783
- // ESM COMPAT FLAG
784
- r.r(t);
785
- // EXPORTS
786
- r.d(t, {
787
- default: () => /* reexport */ Pe
788
- });
789
- // EXTERNAL MODULE: external "react"
790
- var e = r(9497);
791
- var n = r.n(e);
792
- // CONCATENATED MODULE: external "lodash/isString"
793
- const o = require("lodash/isString");
794
- var a = r.n(o);
795
- // EXTERNAL MODULE: external "prop-types"
796
- var i = r(23);
797
- var l = r.n(i);
798
- // EXTERNAL MODULE: external "styled-components"
799
- var u = r(232);
800
- var c = r.n(u);
801
- // CONCATENATED MODULE: external "@splunk/react-ui/Tree"
802
- const f = require("@splunk/react-ui/Tree");
803
- var d = r.n(f);
804
- // EXTERNAL MODULE: external "@splunk/themes"
805
- var s = r(3563);
806
- // CONCATENATED MODULE: ./src/JSONTree/JSONTreeStyles.ts
807
- var v = (0, u.css)([ "", ";", ";color:", ";padding:4px;" ], s.mixins.reset("block"), s.mixins.typography({
808
- family: "monospace"
809
- }), s.variables.syntaxGray);
810
- var p = c().code.withConfig({
811
- displayName: "JSONTreeStyles__StyledScrollCode",
812
- componentId: "vrdt21-0"
813
- })([ "", ";overflow-x:auto;white-space:nowrap;" ], v);
814
- var y = c()(d()).withConfig({
815
- displayName: "JSONTreeStyles__StyledTree",
816
- componentId: "vrdt21-1"
817
- })([ "font-family:inherit;ul{font-family:inherit;}" ]);
818
- var m = c().code.withConfig({
819
- displayName: "JSONTreeStyles__StyledWrapCode",
820
- componentId: "vrdt21-2"
821
- })([ "", ";white-space:pre-wrap;" ], v);
822
- // CONCATENATED MODULE: external "lodash/fill"
823
- const b = require("lodash/fill");
824
- var h = r.n(b);
825
- // CONCATENATED MODULE: external "lodash/isArray"
826
- const g = require("lodash/isArray");
827
- var S = r.n(g);
828
- // CONCATENATED MODULE: external "lodash/isEmpty"
829
- const O = require("lodash/isEmpty");
830
- var w = r.n(O);
831
- // CONCATENATED MODULE: external "lodash/isNumber"
832
- const k = require("lodash/isNumber");
833
- var x = r.n(k);
834
- // CONCATENATED MODULE: external "lodash/isObject"
835
- const I = require("lodash/isObject");
836
- var j = r.n(I);
837
- // CONCATENATED MODULE: external "lodash/keys"
838
- const C = require("lodash/keys");
839
- var E = r.n(C);
840
- // CONCATENATED MODULE: external "lodash/repeat"
841
- const T = require("lodash/repeat");
842
- var A = r.n(T);
843
- // CONCATENATED MODULE: external "@splunk/ui-utils/i18n"
844
- const P = require("@splunk/ui-utils/i18n");
845
- // CONCATENATED MODULE: external "@splunk/react-ui/ButtonSimple"
846
- const R = require("@splunk/react-ui/ButtonSimple");
847
- var _ = r.n(R);
848
- // CONCATENATED MODULE: external "@splunk/react-ui/Clickable"
849
- const K = require("@splunk/react-ui/Clickable");
850
- var N = r.n(K);
851
- // CONCATENATED MODULE: external "@splunk/react-ui/Tooltip"
852
- const D = require("@splunk/react-ui/Tooltip");
853
- var V = r.n(D);
854
- // CONCATENATED MODULE: ./src/JSONTree/JSONTreeItemStyles.ts
855
- var L = {
856
- string: s.variables.syntaxTeal,
857
- number: s.variables.syntaxBlue,
858
- boolean: s.variables.syntaxPurple,
859
- null: s.variables.syntaxBrown,
860
- object: s.variables.syntaxGray,
861
- array: s.variables.syntaxGray
862
- };
863
- var q = (0, u.css)([ "word-break:break-word;word-wrap:break-word;" ]);
864
- var F = (0, u.css)([ "white-space:nowrap;" ]);
865
- /* Using this magic number to set the height to be at least the minimum target size of 24 by 24 */ var $ = (0,
866
- u.css)([ "padding-block:2px;" ]);
867
- var M = (0, u.css)([ "font-family:inherit;&:focus{box-shadow:", ";outline:0;&:active{box-shadow:none;}}&:hover{background-color:", ";}" ], s.variables.focusShadow, s.variables.neutral50);
868
- var J = (0, u.css)([ "color:", ";", ";", "" ], (function(e) {
869
- var n = e.valueType;
870
- return L[n];
871
- }), (function(e) {
872
- var n = e.overflowType;
873
- return n === "wrap" ? q : F;
874
- }), $);
875
- var U = c().span.withConfig({
876
- displayName: "JSONTreeItemStyles__StyledContentWrapper",
877
- componentId: "o558h3-0"
878
- })([ "color:", ";" ], s.variables.syntaxGray);
879
- var B = c().span.withConfig({
880
- displayName: "JSONTreeItemStyles__StyledValue",
881
- componentId: "o558h3-1"
882
- })([ "", "" ], J);
883
- var X = c()(N()).withConfig({
884
- displayName: "JSONTreeItemStyles__StyledValueInteractiveClickable",
885
- componentId: "o558h3-2"
886
- })([ "", " ", " min-width:24px;text-align:center;" ], J, M);
887
- var G = (0, u.css)([ "", " color:", ";" ], $, s.variables.syntaxRed);
888
- var H = c().span.withConfig({
889
- displayName: "JSONTreeItemStyles__StyledProperty",
890
- componentId: "o558h3-3"
891
- })([ "", "" ], G);
892
- var W = c()(N()).withConfig({
893
- displayName: "JSONTreeItemStyles__StyledPropertyInteractiveClickable",
894
- componentId: "o558h3-4"
895
- })([ "", " ", "" ], G, M);
896
- var z = c()(_()).withConfig({
897
- displayName: "JSONTreeItemStyles__StyledExpandLinkClickable",
898
- componentId: "o558h3-5"
899
- })([ "", ";border:none;border-radius:0;font-family:inherit;padding:1px ", " 3px ", ";&:hover{background-color:", ";text-decoration:none;}&:focus{box-shadow:", ";&:active{box-shadow:none;}}" ], $, s.variables.spacingXSmall, s.variables.spacingXSmall, s.variables.actionColorBackgroundSubtleHover, s.variables.focusShadowInset);
900
- var Q = c()(V()).withConfig({
901
- displayName: "JSONTreeItemStyles__StyledTooltip",
902
- componentId: "o558h3-6"
903
- })([ "font-family:", ";" ], s.variables.monoFontFamily);
904
- // EXTERNAL MODULE: ./src/Tree/index.ts + 7 modules
905
- var Y = r(8655);
906
- // CONCATENATED MODULE: ./src/JSONTree/JSONTreeItem.tsx
907
- function Z() {
908
- return Z = Object.assign ? Object.assign.bind() : function(e) {
909
- for (var n = 1; n < arguments.length; n++) {
910
- var r = arguments[n];
911
- for (var t in r) {
912
- ({}).hasOwnProperty.call(r, t) && (e[t] = r[t]);
913
- }
914
- }
915
- return e;
916
- }, Z.apply(null, arguments);
917
- }
918
- function ee(e, n) {
919
- return ae(e) || oe(e, n) || re(e, n) || ne();
920
- }
921
- function ne() {
922
- throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
923
- }
924
- function re(e, n) {
925
- if (e) {
926
- if ("string" == typeof e) return te(e, n);
927
- var r = {}.toString.call(e).slice(8, -1);
928
- return "Object" === r && e.constructor && (r = e.constructor.name), "Map" === r || "Set" === r ? Array.from(e) : "Arguments" === r || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r) ? te(e, n) : void 0;
929
- }
59
+ /************************************************************************/ var n = {};
60
+ // ESM COMPAT FLAG
61
+ e.r(n);
62
+ // EXPORTS
63
+ e.d(n, {
64
+ default: () => /* reexport */ Ae
65
+ });
66
+ // CONCATENATED MODULE: external "react"
67
+ const r = require("react");
68
+ var t = e.n(r);
69
+ // CONCATENATED MODULE: external "lodash/isString"
70
+ const a = require("lodash/isString");
71
+ var o = e.n(a);
72
+ // CONCATENATED MODULE: external "prop-types"
73
+ const l = require("prop-types");
74
+ var i = e.n(l);
75
+ // CONCATENATED MODULE: external "@splunk/ui-utils/id"
76
+ const u = require("@splunk/ui-utils/id");
77
+ // CONCATENATED MODULE: external "styled-components"
78
+ const c = require("styled-components");
79
+ var d = e.n(c);
80
+ // CONCATENATED MODULE: external "@splunk/react-ui/Tree"
81
+ const s = require("@splunk/react-ui/Tree");
82
+ var f = e.n(s);
83
+ // CONCATENATED MODULE: external "@splunk/themes"
84
+ const p = require("@splunk/themes");
85
+ // CONCATENATED MODULE: ./src/JSONTree/JSONTreeStyles.ts
86
+ var v = (0, c.css)([ "", ";", ";color:", ";padding:4px;" ], p.mixins.reset("block"), p.mixins.typography({
87
+ family: "monospace"
88
+ }), p.variables.syntaxGray);
89
+ var y = d().code.withConfig({
90
+ displayName: "JSONTreeStyles__StyledScrollCode",
91
+ componentId: "vrdt21-0"
92
+ })([ "", ";overflow-x:auto;white-space:nowrap;" ], v);
93
+ var b = d()(f()).withConfig({
94
+ displayName: "JSONTreeStyles__StyledTree",
95
+ componentId: "vrdt21-1"
96
+ })([ "font-family:inherit;ul{font-family:inherit;}" ]);
97
+ var m = d().code.withConfig({
98
+ displayName: "JSONTreeStyles__StyledWrapCode",
99
+ componentId: "vrdt21-2"
100
+ })([ "", ";white-space:pre-wrap;" ], v);
101
+ // CONCATENATED MODULE: external "lodash/fill"
102
+ const h = require("lodash/fill");
103
+ var g = e.n(h);
104
+ // CONCATENATED MODULE: external "lodash/isArray"
105
+ const S = require("lodash/isArray");
106
+ var k = e.n(S);
107
+ // CONCATENATED MODULE: external "lodash/isEmpty"
108
+ const x = require("lodash/isEmpty");
109
+ var O = e.n(x);
110
+ // CONCATENATED MODULE: external "lodash/isNumber"
111
+ const w = require("lodash/isNumber");
112
+ var C = e.n(w);
113
+ // CONCATENATED MODULE: external "lodash/isObject"
114
+ const E = require("lodash/isObject");
115
+ var I = e.n(E);
116
+ // CONCATENATED MODULE: external "lodash/keys"
117
+ const j = require("lodash/keys");
118
+ var T = e.n(j);
119
+ // CONCATENATED MODULE: external "lodash/repeat"
120
+ const R = require("lodash/repeat");
121
+ var A = e.n(R);
122
+ // CONCATENATED MODULE: external "@splunk/ui-utils/i18n"
123
+ const P = require("@splunk/ui-utils/i18n");
124
+ // CONCATENATED MODULE: external "@splunk/react-ui/ButtonSimple"
125
+ const _ = require("@splunk/react-ui/ButtonSimple");
126
+ var K = e.n(_);
127
+ // CONCATENATED MODULE: external "@splunk/react-ui/Clickable"
128
+ const N = require("@splunk/react-ui/Clickable");
129
+ var V = e.n(N);
130
+ // CONCATENATED MODULE: external "@splunk/react-ui/Tooltip"
131
+ const q = require("@splunk/react-ui/Tooltip");
132
+ var L = e.n(q);
133
+ // CONCATENATED MODULE: ./src/JSONTree/JSONTreeItemStyles.ts
134
+ var D = {
135
+ string: p.variables.syntaxTeal,
136
+ number: p.variables.syntaxBlue,
137
+ boolean: p.variables.syntaxPurple,
138
+ null: p.variables.syntaxBrown,
139
+ object: p.variables.syntaxGray,
140
+ array: p.variables.syntaxGray
141
+ };
142
+ var F = (0, c.css)([ "word-break:break-word;word-wrap:break-word;" ]);
143
+ var J = (0, c.css)([ "white-space:nowrap;" ]);
144
+ /* Using this magic number to set the height to be at least the minimum target size of 24 by 24 */ var M = (0,
145
+ c.css)([ "padding-block:2px;" ]);
146
+ var B = (0, c.css)([ "font-family:inherit;&:focus{box-shadow:", ";outline:0;&:active{box-shadow:none;}}&:hover{background-color:", ";}" ], p.variables.focusShadow, p.variables.neutral50);
147
+ var G = (0, c.css)([ "color:", ";", ";", "" ], (function(e) {
148
+ var n = e.valueType;
149
+ return D[n];
150
+ }), (function(e) {
151
+ var n = e.overflowType;
152
+ return n === "wrap" ? F : J;
153
+ }), M);
154
+ var U = d().span.withConfig({
155
+ displayName: "JSONTreeItemStyles__StyledContentWrapper",
156
+ componentId: "o558h3-0"
157
+ })([ "color:", ";" ], p.variables.syntaxGray);
158
+ var $ = d().span.withConfig({
159
+ displayName: "JSONTreeItemStyles__StyledValue",
160
+ componentId: "o558h3-1"
161
+ })([ "", "" ], G);
162
+ var W = d()(V()).withConfig({
163
+ displayName: "JSONTreeItemStyles__StyledValueInteractiveClickable",
164
+ componentId: "o558h3-2"
165
+ })([ "", " ", " min-width:24px;text-align:center;" ], G, B);
166
+ var X = (0, c.css)([ "", " color:", ";" ], M, p.variables.syntaxRed);
167
+ var H = d().span.withConfig({
168
+ displayName: "JSONTreeItemStyles__StyledProperty",
169
+ componentId: "o558h3-3"
170
+ })([ "", "" ], X);
171
+ var z = d()(V()).withConfig({
172
+ displayName: "JSONTreeItemStyles__StyledPropertyInteractiveClickable",
173
+ componentId: "o558h3-4"
174
+ })([ "", " ", "" ], X, B);
175
+ var Q = d()(K()).withConfig({
176
+ displayName: "JSONTreeItemStyles__StyledExpandLinkClickable",
177
+ componentId: "o558h3-5"
178
+ })([ "", ";border:none;border-radius:0;font-family:inherit;padding:1px ", " 3px ", ";&:hover{background-color:", ";text-decoration:none;}&:focus{box-shadow:", ";&:active{box-shadow:none;}}" ], M, p.variables.spacingXSmall, p.variables.spacingXSmall, p.variables.actionColorBackgroundSubtleHover, p.variables.focusShadowInset);
179
+ var Y = d()(L()).withConfig({
180
+ displayName: "JSONTreeItemStyles__StyledTooltip",
181
+ componentId: "o558h3-6"
182
+ })([ "font-family:", ";" ], p.variables.monoFontFamily);
183
+ // CONCATENATED MODULE: ./src/JSONTree/JSONTreeItem.tsx
184
+ function Z() {
185
+ return Z = Object.assign ? Object.assign.bind() : function(e) {
186
+ for (var n = 1; n < arguments.length; n++) {
187
+ var r = arguments[n];
188
+ for (var t in r) {
189
+ ({}).hasOwnProperty.call(r, t) && (e[t] = r[t]);
190
+ }
191
+ }
192
+ return e;
193
+ }, Z.apply(null, arguments);
194
+ }
195
+ function ee(e, n) {
196
+ return oe(e) || ae(e, n) || re(e, n) || ne();
197
+ }
198
+ function ne() {
199
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
200
+ }
201
+ function re(e, n) {
202
+ if (e) {
203
+ if ("string" == typeof e) return te(e, n);
204
+ var r = {}.toString.call(e).slice(8, -1);
205
+ return "Object" === r && e.constructor && (r = e.constructor.name), "Map" === r || "Set" === r ? Array.from(e) : "Arguments" === r || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r) ? te(e, n) : void 0;
930
206
  }
931
- function te(e, n) {
932
- (null == n || n > e.length) && (n = e.length);
933
- for (var r = 0, t = Array(n); r < n; r++) {
934
- t[r] = e[r];
935
- }
936
- return t;
207
+ }
208
+ function te(e, n) {
209
+ (null == n || n > e.length) && (n = e.length);
210
+ for (var r = 0, t = Array(n); r < n; r++) {
211
+ t[r] = e[r];
937
212
  }
938
- function oe(e, n) {
939
- var r = null == e ? null : "undefined" != typeof Symbol && e[Symbol.iterator] || e["@@iterator"];
940
- if (null != r) {
941
- var t, o, a, i, l = [], u = !0, c = !1;
213
+ return t;
214
+ }
215
+ function ae(e, n) {
216
+ var r = null == e ? null : "undefined" != typeof Symbol && e[Symbol.iterator] || e["@@iterator"];
217
+ if (null != r) {
218
+ var t, a, o, l, i = [], u = !0, c = !1;
219
+ try {
220
+ if (o = (r = r.call(e)).next, 0 === n) {
221
+ if (Object(r) !== r) return;
222
+ u = !1;
223
+ } else for (;!(u = (t = o.call(r)).done) && (i.push(t.value), i.length !== n); u = !0) {
224
+ }
225
+ } catch (e) {
226
+ c = !0, a = e;
227
+ } finally {
942
228
  try {
943
- if (a = (r = r.call(e)).next, 0 === n) {
944
- if (Object(r) !== r) return;
945
- u = !1;
946
- } else for (;!(u = (t = a.call(r)).done) && (l.push(t.value), l.length !== n); u = !0) {
947
- }
948
- } catch (e) {
949
- c = !0, o = e;
229
+ if (!u && null != r["return"] && (l = r["return"](), Object(l) !== l)) return;
950
230
  } finally {
951
- try {
952
- if (!u && null != r["return"] && (i = r["return"](), Object(i) !== i)) return;
953
- } finally {
954
- if (c) throw o;
955
- }
231
+ if (c) throw a;
956
232
  }
957
- return l;
958
233
  }
234
+ return i;
959
235
  }
960
- function ae(e) {
961
- if (Array.isArray(e)) return e;
962
- }
963
- function ie(e, n) {
964
- if (null == e) return {};
965
- var r, t, o = le(e, n);
966
- if (Object.getOwnPropertySymbols) {
967
- var a = Object.getOwnPropertySymbols(e);
968
- for (t = 0; t < a.length; t++) {
969
- r = a[t], -1 === n.indexOf(r) && {}.propertyIsEnumerable.call(e, r) && (o[r] = e[r]);
970
- }
236
+ }
237
+ function oe(e) {
238
+ if (Array.isArray(e)) return e;
239
+ }
240
+ function le(e, n) {
241
+ if (null == e) return {};
242
+ var r, t, a = ie(e, n);
243
+ if (Object.getOwnPropertySymbols) {
244
+ var o = Object.getOwnPropertySymbols(e);
245
+ for (t = 0; t < o.length; t++) {
246
+ r = o[t], -1 === n.indexOf(r) && {}.propertyIsEnumerable.call(e, r) && (a[r] = e[r]);
971
247
  }
972
- return o;
973
248
  }
974
- function le(e, n) {
975
- if (null == e) return {};
976
- var r = {};
977
- for (var t in e) {
978
- if ({}.hasOwnProperty.call(e, t)) {
979
- if (-1 !== n.indexOf(t)) continue;
980
- r[t] = e[t];
981
- }
249
+ return a;
250
+ }
251
+ function ie(e, n) {
252
+ if (null == e) return {};
253
+ var r = {};
254
+ for (var t in e) {
255
+ if ({}.hasOwnProperty.call(e, t)) {
256
+ if (-1 !== n.indexOf(t)) continue;
257
+ r[t] = e[t];
982
258
  }
983
- return r;
984
259
  }
985
- var ue = {
986
- clickableKeyRef: l().object,
987
- clickableValRef: l().object,
988
- hasChildren: l().bool,
989
- indentArray: l().arrayOf(l().string),
990
- index: l().number,
991
- initialOpenState: l().bool,
992
- properties: l().arrayOf(l().string),
993
- propertyDataPath: l().string,
994
- propertyElement: l().node,
995
- renderExpandLink: l().func,
996
- representation: l().node,
997
- value: l().oneOfType([ l().string, l().object, l().array, l().number, l().bool ])
998
- };
999
- function ce(r) {
1000
- var t = r.clickableKeyRef, o = r.clickableValRef, a = r.hasChildren, i = r.indentArray, l = r.index, u = r.initialOpenState, c = r.onFocus, f = r.properties, d = r.propertyDataPath, s = r.propertyElement, v = r.renderExpandLink, p = r.representation, y = r.value, m = ie(r, [ "clickableKeyRef", "clickableValRef", "hasChildren", "indentArray", "index", "initialOpenState", "onFocus", "properties", "propertyDataPath", "propertyElement", "renderExpandLink", "representation", "value" ]);
1001
- var b = (0, e.useState)(u), h = ee(b, 2), g = h[0], O = h[1];
1002
- var w = (0, e.useCallback)((function() {
1003
- O((function(e) {
1004
- return !e;
1005
- }));
1006
- }), []);
1007
- var k = (0, e.useRef)(null);
1008
- var x = v ? v({
1009
- onToggleExpansion: w,
1010
- open: g,
1011
- withTooltip: true,
1012
- expandLinkRef: k
1013
- }) : {
1014
- expandLink: undefined
1015
- }, I = x.expandLink;
1016
- var j = (f === null || f === void 0 ? void 0 : f.length) && l + 1 < (f === null || f === void 0 ? void 0 : f.length) ? "," : null;
1017
-
1018
- return n().createElement(Y["default"].Item, Z({
1019
- content: n().createElement(U, null, s, a && (S()(y) ? "[" : "{"), !a && n().createElement(n().Fragment, null, p, j), a && I),
1020
- customIndent: i,
1021
- "data-test": a ? "node" : null,
1022
- "data-test-path": d,
1023
- endAdornment: a && n().createElement(U, null, g && i, S()(y) ? "]" : "}", j),
1024
- expanded: g,
1025
- onFocus: function e(n) {
1026
- c === null || c === void 0 ? void 0 : c(n);
1027
- // check if onFocus was triggered by a click event or expand link
1028
- var r = n.relatedTarget === (t === null || t === void 0 ? void 0 : t.current) || n.relatedTarget === (o === null || o === void 0 ? void 0 : o.current) || n.relatedTarget === (k === null || k === void 0 ? void 0 : k.current) ? n.relatedTarget : null;
1029
- if (m.id === "root") {
1030
- var a;
1031
- k === null || k === void 0 ? void 0 : (a = k.current) === null || a === void 0 ? void 0 : a.focus();
1032
- }
1033
- if (!r) {
1034
- // if JSONTreeItem contains clickable keys/vals, focus should go there
1035
- if (s && (t === null || t === void 0 ? void 0 : t.current)) {
1036
- var i;
1037
- (i = t.current) === null || i === void 0 ? void 0 : i.focus();
1038
- } else if (o === null || o === void 0 ? void 0 : o.current) {
1039
- var l;
1040
- (l = o.current) === null || l === void 0 ? void 0 : l.focus();
1041
- }
1042
- } else {
1043
- r.focus();
260
+ return r;
261
+ }
262
+ var ue = {
263
+ clickableKeyRef: i().object,
264
+ clickableValRef: i().object,
265
+ hasChildren: i().bool,
266
+ indentArray: i().arrayOf(i().string),
267
+ index: i().number,
268
+ initialOpenState: i().bool,
269
+ isRoot: i().bool,
270
+ properties: i().arrayOf(i().string),
271
+ propertyDataPath: i().string,
272
+ propertyElement: i().node,
273
+ renderExpandLink: i().func,
274
+ representation: i().node,
275
+ value: i().oneOfType([ i().string, i().object, i().array, i().number, i().bool ])
276
+ };
277
+ function ce(e) {
278
+ var n = e.clickableKeyRef, a = e.clickableValRef, o = e.hasChildren, l = e.indentArray, i = e.index, u = e.initialOpenState, c = e.isRoot, d = e.onFocus, s = e.properties, p = e.propertyDataPath, v = e.propertyElement, y = e.renderExpandLink, b = e.representation, m = e.value, h = le(e, [ "clickableKeyRef", "clickableValRef", "hasChildren", "indentArray", "index", "initialOpenState", "isRoot", "onFocus", "properties", "propertyDataPath", "propertyElement", "renderExpandLink", "representation", "value" ]);
279
+ // @docs-props-type JSONTreeItemPropsBase
280
+ var g = (0, r.useState)(u), S = ee(g, 2), x = S[0], O = S[1];
281
+ var w = (0, r.useCallback)((function() {
282
+ O((function(e) {
283
+ return !e;
284
+ }));
285
+ }), []);
286
+ var C = (0, r.useRef)(null);
287
+ var E = y ? y({
288
+ onToggleExpansion: w,
289
+ open: x,
290
+ withTooltip: true,
291
+ expandLinkRef: C
292
+ }) : {
293
+ expandLink: undefined
294
+ }, I = E.expandLink;
295
+ var j = (s === null || s === void 0 ? void 0 : s.length) && i + 1 < (s === null || s === void 0 ? void 0 : s.length) ? "," : null;
296
+
297
+ return t().createElement(f().Item, Z({
298
+ content: t().createElement(U, null, v, o && (k()(m) ? "[" : "{"), !o && t().createElement(t().Fragment, null, b, j), o && I),
299
+ customIndent: l,
300
+ "data-test": o ? "node" : null,
301
+ "data-test-path": p,
302
+ endAdornment: o && t().createElement(U, null, x && l, k()(m) ? "]" : "}", j),
303
+ expanded: x,
304
+ onFocus: function e(r) {
305
+ d === null || d === void 0 ? void 0 : d(r);
306
+ // check if onFocus was triggered by a click event or expand link
307
+ var t = r.relatedTarget === (n === null || n === void 0 ? void 0 : n.current) || r.relatedTarget === (a === null || a === void 0 ? void 0 : a.current) || r.relatedTarget === (C === null || C === void 0 ? void 0 : C.current) ? r.relatedTarget : null;
308
+ if (c) {
309
+ var o;
310
+ C === null || C === void 0 ? void 0 : (o = C.current) === null || o === void 0 ? void 0 : o.focus();
311
+ }
312
+ if (!t) {
313
+ // if JSONTreeItem contains clickable keys/vals, focus should go there
314
+ if (v && (n === null || n === void 0 ? void 0 : n.current)) {
315
+ var l;
316
+ (l = n.current) === null || l === void 0 ? void 0 : l.focus();
317
+ } else if (a === null || a === void 0 ? void 0 : a.current) {
318
+ var i;
319
+ (i = a.current) === null || i === void 0 ? void 0 : i.focus();
1044
320
  }
1045
- },
1046
- onToggleExpansion: w,
1047
- tabIndex: 0
1048
- }, m), a && p);
1049
- }
1050
- ce.propTypes = ue;
1051
- // CONCATENATED MODULE: ./src/JSONTree/renderTreeItems.tsx
1052
- function fe(e) {
1053
- "@babel/helpers - typeof";
1054
- return fe = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) {
1055
- return typeof e;
1056
- } : function(e) {
1057
- return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
1058
- }, fe(e);
1059
- }
1060
- function de(e) {
1061
- return ye(e) || pe(e) || ve(e) || se();
321
+ } else {
322
+ t.focus();
323
+ }
324
+ },
325
+ onToggleExpansion: w,
326
+ tabIndex: 0
327
+ }, h), o && b);
328
+ }
329
+ ce.propTypes = ue;
330
+ // CONCATENATED MODULE: ./src/JSONTree/renderTreeItems.tsx
331
+ function de(e) {
332
+ "@babel/helpers - typeof";
333
+ return de = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) {
334
+ return typeof e;
335
+ } : function(e) {
336
+ return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
337
+ }, de(e);
338
+ }
339
+ function se(e) {
340
+ return ye(e) || ve(e) || pe(e) || fe();
341
+ }
342
+ function fe() {
343
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
344
+ }
345
+ function pe(e, n) {
346
+ if (e) {
347
+ if ("string" == typeof e) return be(e, n);
348
+ var r = {}.toString.call(e).slice(8, -1);
349
+ return "Object" === r && e.constructor && (r = e.constructor.name), "Map" === r || "Set" === r ? Array.from(e) : "Arguments" === r || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r) ? be(e, n) : void 0;
1062
350
  }
1063
- function se() {
1064
- throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
351
+ }
352
+ function ve(e) {
353
+ if ("undefined" != typeof Symbol && null != e[Symbol.iterator] || null != e["@@iterator"]) return Array.from(e);
354
+ }
355
+ function ye(e) {
356
+ if (Array.isArray(e)) return be(e);
357
+ }
358
+ function be(e, n) {
359
+ (null == n || n > e.length) && (n = e.length);
360
+ for (var r = 0, t = Array(n); r < n; r++) {
361
+ t[r] = e[r];
1065
362
  }
1066
- function ve(e, n) {
1067
- if (e) {
1068
- if ("string" == typeof e) return me(e, n);
1069
- var r = {}.toString.call(e).slice(8, -1);
1070
- return "Object" === r && e.constructor && (r = e.constructor.name), "Map" === r || "Set" === r ? Array.from(e) : "Arguments" === r || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r) ? me(e, n) : void 0;
363
+ return t;
364
+ }
365
+ function me(e) {
366
+ var n = e.id, a = e.childKey, o = e.index, l = e.value, i = e.properties, u = e.propertyDataPath, c = e.obj, d = e.renderValue, s = e.renderKey, f = e.getInitialOpenState, p = e.indentArray, v = e.renderExpandLink, y = e.onFocus;
367
+ var b = (0, r.useRef)(null);
368
+ var m = (0, r.useRef)(null);
369
+ var h = d({
370
+ key: a,
371
+ value: l,
372
+ clickValueRef: b
373
+ }), g = h.representation, S = h.clickableValRef;
374
+ var x = !k()(c) ? s(a, m) : {
375
+ propertyElement: undefined,
376
+ clickableKeyRef: undefined
377
+ }, w = x.propertyElement, C = x.clickableKeyRef;
378
+ var E = I()(l) && !O()(l) || k()(l) && l.length > 0;
379
+
380
+ return t().createElement(ce, {
381
+ id: n,
382
+ propertyDataPath: u,
383
+ propertyElement: w,
384
+ hasChildren: E,
385
+ initialOpenState: f(),
386
+ representation: g,
387
+ indentArray: p,
388
+ value: l,
389
+ index: o,
390
+ properties: i,
391
+ renderExpandLink: v,
392
+ clickableKeyRef: C,
393
+ clickableValRef: S,
394
+ onFocus: function e() {
395
+ y(C, S);
1071
396
  }
1072
- }
1073
- function pe(e) {
1074
- if ("undefined" != typeof Symbol && null != e[Symbol.iterator] || null != e["@@iterator"]) return Array.from(e);
1075
- }
1076
- function ye(e) {
1077
- if (Array.isArray(e)) return me(e);
1078
- }
1079
- function me(e, n) {
1080
- (null == n || n > e.length) && (n = e.length);
1081
- for (var r = 0, t = Array(n); r < n; r++) {
1082
- t[r] = e[r];
397
+ });
398
+ }
399
+ function he(e) {
400
+ var n = e.baseId, a = e.renderValue, o = e.obj;
401
+ var l = (0, r.useRef)(null);
402
+ var i = a({
403
+ value: o,
404
+ clickValueRef: l
405
+ }), u = i.representation;
406
+
407
+ return t().createElement(f().Item, {
408
+ id: "".concat(n, "-0"),
409
+ "data-test-path": ".",
410
+ content: u
411
+ });
412
+ }
413
+ function ge(e) {
414
+ var n = e.baseId, r = e.defaultOpen, a = r === void 0 ? false : r, l = e.defaultExpanded, i = l === void 0 ? false : l, u = e.expandChildrenOnShiftKey, c = u === void 0 ? false : u, d = e.indent, s = d === void 0 ? 4 : d, f = e.indentLevel, p = f === void 0 ? 1 : f, v = e.obj, y = e.onClickKey, b = e.onClickValue, m = e.overflow, h = m === void 0 ? "scroll" : m, S = e.path, x = S === void 0 ? [] : S, w = e.shift, E = e.updateShift;
415
+ var j = g()(Array(p), A()(" ", s));
416
+ var R;
417
+ var _;
418
+ var K = function e() {
419
+ if (i && w == null) {
420
+ return true;
421
+ }
422
+ if (c) {
423
+ return !!w;
424
+ }
425
+ return a;
426
+ };
427
+ var N = function e(n) {
428
+ if (c && E != null) {
429
+ E(n.shiftKey);
1083
430
  }
1084
- return t;
1085
- }
1086
- function be(r) {
1087
- var t = r.id, o = r.childKey, a = r.index, i = r.value, l = r.properties, u = r.propertyDataPath, c = r.obj, f = r.renderValue, d = r.renderKey, s = r.getInitialOpenState, v = r.indentArray, p = r.renderExpandLink, y = r.onFocus;
1088
- var m = (0, e.useRef)(null);
1089
- var b = (0, e.useRef)(null);
1090
- var h = f({
1091
- key: o,
1092
- value: i,
1093
- clickValueRef: m
1094
- }), g = h.representation, O = h.clickableValRef;
1095
- var k = !S()(c) ? d(o, b) : {
1096
- propertyElement: undefined,
1097
- clickableKeyRef: undefined
1098
- }, x = k.propertyElement, I = k.clickableKeyRef;
1099
- var C = j()(i) && !w()(i) || S()(i) && i.length > 0;
1100
-
1101
- return n().createElement(ce, {
1102
- id: t,
1103
- propertyDataPath: u,
1104
- propertyElement: x,
1105
- hasChildren: C,
1106
- initialOpenState: s(),
1107
- representation: g,
1108
- indentArray: v,
1109
- value: i,
1110
- index: a,
1111
- properties: l,
1112
- renderExpandLink: p,
1113
- clickableKeyRef: I,
1114
- clickableValRef: O,
1115
- onFocus: function e() {
1116
- y(I, O);
1117
- }
431
+ };
432
+ var V = function e(n, r) {
433
+ var t, a;
434
+ // When rendering a single value key is not present, here we prevent `[undefined]` in path
435
+ var o = r !== undefined ? [].concat(se(x), [ r ]) : se(x);
436
+ var l = ".".concat(o.join("."));
437
+ (t = _) === null || t === void 0 ? void 0 : (a = t.current) === null || a === void 0 ? void 0 : a.focus();
438
+ y === null || y === void 0 ? void 0 : y(n, {
439
+ key: l,
440
+ keyPath: o
1118
441
  });
1119
- }
1120
- function he(r) {
1121
- var t = r.renderValue, o = r.obj;
1122
- var a = (0, e.useRef)(null);
1123
- var i = t({
1124
- value: o,
1125
- clickValueRef: a
1126
- }), l = i.representation;
1127
-
1128
- return n().createElement(Y["default"].Item, {
1129
- id: "0",
1130
- "data-test-path": ".",
1131
- content: l
442
+ };
443
+ var q = function e(n, r) {
444
+ var t, a;
445
+ // When rendering a single value key is not present, here we prevent `[undefined]` in path
446
+ var o = r !== undefined ? [].concat(se(x), [ r ]) : se(x);
447
+ var l = ".".concat(o.join("."));
448
+ (t = R) === null || t === void 0 ? void 0 : (a = t.current) === null || a === void 0 ? void 0 : a.focus();
449
+ b === null || b === void 0 ? void 0 : b(n, {
450
+ key: l,
451
+ keyPath: o,
452
+ value: n.target.textContent
1132
453
  });
1133
- }
1134
- function ge(e) {
1135
- var r = e.defaultOpen, t = r === void 0 ? false : r, o = e.defaultExpanded, i = o === void 0 ? false : o, l = e.expandChildrenOnShiftKey, u = l === void 0 ? false : l, c = e.indent, f = c === void 0 ? 4 : c, d = e.indentLevel, s = d === void 0 ? 1 : d, v = e.obj, p = e.onClickKey, y = e.onClickValue, m = e.overflow, b = m === void 0 ? "scroll" : m, g = e.path, O = g === void 0 ? [] : g, k = e.shift, I = e.updateShift;
1136
- var C = h()(Array(s), A()(" ", f));
1137
- var T;
1138
- var R;
1139
- var _ = function e() {
1140
- if (i && k == null) {
1141
- return true;
1142
- }
1143
- if (u) {
1144
- return !!k;
1145
- }
1146
- return t;
1147
- };
1148
- var K = function e(n) {
1149
- if (u && I != null) {
1150
- I(n.shiftKey);
1151
- }
1152
- };
1153
- var N = function e(n, r) {
1154
- var t, o;
1155
- // When rendering a single value key is not present, here we prevent `[undefined]` in path
1156
- var a = r !== undefined ? [].concat(de(O), [ r ]) : de(O);
1157
- var i = ".".concat(a.join("."));
1158
- (t = R) === null || t === void 0 ? void 0 : (o = t.current) === null || o === void 0 ? void 0 : o.focus();
1159
- p === null || p === void 0 ? void 0 : p(n, {
1160
- key: i,
1161
- keyPath: a
1162
- });
1163
- };
1164
- var D = function e(n, r) {
1165
- var t, o;
1166
- // When rendering a single value key is not present, here we prevent `[undefined]` in path
1167
- var a = r !== undefined ? [].concat(de(O), [ r ]) : de(O);
1168
- var i = ".".concat(a.join("."));
1169
- (t = T) === null || t === void 0 ? void 0 : (o = t.current) === null || o === void 0 ? void 0 : o.focus();
1170
- y === null || y === void 0 ? void 0 : y(n, {
1171
- key: i,
1172
- keyPath: a,
1173
- value: n.target.textContent
1174
- });
1175
- };
1176
- var V = function e(n, r) {
1177
- var t, o;
1178
- var a = n.key;
1179
- if (a === "ArrowLeft" && p && ((t = R) === null || t === void 0 ? void 0 : t.current) && !r) {
1180
- var i;
1181
- n.stopPropagation();
1182
- (i = R.current) === null || i === void 0 ? void 0 : i.focus();
1183
- }
1184
- if (a === "ArrowRight" && y && ((o = T) === null || o === void 0 ? void 0 : o.current) && r) {
1185
- var l;
1186
- n.stopPropagation();
1187
- (l = T.current) === null || l === void 0 ? void 0 : l.focus();
1188
- }
1189
- };
1190
- var L = function e(r) {
1191
- var t = r.onToggleExpansion, o = r.open, a = r.withTooltip, i = r.expandLinkRef;
1192
- var l = o ? "[-]" : "[+]";
1193
- var c = o ? (0, P._)("Collapse all") : (0, P._)("Shift click to expand all");
1194
- var f = n().createElement(z, {
1195
- appearance: "subtle",
1196
- elementRef: i,
1197
- tabIndex: -1,
1198
- onClick: function e(n) {
1199
- K(n);
1200
- t === null || t === void 0 ? void 0 : t(n);
1201
- },
1202
- "aria-expanded": o,
1203
- "data-test": "toggle"
1204
- }, l);
1205
- if (u && a) {
1206
- return {
1207
- expandLink: n().createElement(Q, {
1208
- contentRelationship: "description",
1209
- openDelay: "secondary",
1210
- defaultPlacement: "above",
1211
- content: (0, P._)(c)
1212
- }, f),
1213
- expandLinkRef: i
1214
- };
1215
- }
454
+ };
455
+ var L = function e(n, r) {
456
+ var t, a;
457
+ var o = n.key;
458
+ if (o === "ArrowLeft" && y && ((t = _) === null || t === void 0 ? void 0 : t.current) && !r) {
459
+ var l;
460
+ n.stopPropagation();
461
+ (l = _.current) === null || l === void 0 ? void 0 : l.focus();
462
+ }
463
+ if (o === "ArrowRight" && b && ((a = R) === null || a === void 0 ? void 0 : a.current) && r) {
464
+ var i;
465
+ n.stopPropagation();
466
+ (i = R.current) === null || i === void 0 ? void 0 : i.focus();
467
+ }
468
+ };
469
+ var D = function e(n) {
470
+ var r = n.onToggleExpansion, a = n.open, o = n.withTooltip, l = n.expandLinkRef;
471
+ var i = a ? "[-]" : "[+]";
472
+ var u = a ? (0, P._)("Collapse all") : (0, P._)("Shift click to expand all");
473
+ var d = t().createElement(Q, {
474
+ appearance: "subtle",
475
+ elementRef: l,
476
+ tabIndex: -1,
477
+ onClick: function e(n) {
478
+ N(n);
479
+ r === null || r === void 0 ? void 0 : r(n);
480
+ },
481
+ "aria-expanded": a,
482
+ "data-test": "toggle"
483
+ }, i);
484
+ if (c && o) {
1216
485
  return {
1217
- expandLink: f,
1218
- expandLinkRef: i
486
+ expandLink: t().createElement(Y, {
487
+ contentRelationship: "description",
488
+ openDelay: "secondary",
489
+ defaultPlacement: "above",
490
+ content: (0, P._)(u)
491
+ }, d),
492
+ expandLinkRef: l
1219
493
  };
494
+ }
495
+ return {
496
+ expandLink: d,
497
+ expandLinkRef: l
1220
498
  };
1221
- var q = function e(r) {
1222
- var t = r.value, o = r.key, l = r.clickValueRef;
1223
- var c;
1224
- if (!j()(t)) {
1225
- if (typeof t === "string") {
1226
- c = '"'.concat(t, '"');
1227
- } else if (typeof t === "boolean") {
1228
- c = t.toString();
1229
- } else if (t === null) {
1230
- c = "null";
1231
- } else {
1232
- c = t;
1233
- }
1234
- } else if (w()(t)) {
1235
- // isObject is true for arrays
1236
- c = S()(t) ? "[]" : "{}";
499
+ };
500
+ var F = function e(r) {
501
+ var a = r.value, l = r.key, u = r.clickValueRef;
502
+ var d;
503
+ if (!I()(a)) {
504
+ if (typeof a === "string") {
505
+ d = '"'.concat(a, '"');
506
+ } else if (typeof a === "boolean") {
507
+ d = a.toString();
508
+ } else if (a === null) {
509
+ d = "null";
1237
510
  } else {
1238
- c = ge({
1239
- defaultOpen: i === true,
1240
- defaultExpanded: i,
1241
- expandChildrenOnShiftKey: u,
1242
- onClickKey: p,
1243
- onClickValue: y,
1244
- overflow: b,
1245
- obj: t,
1246
- path: o !== undefined ? [].concat(de(O), [ o ]) : de(O),
1247
- indentLevel: s + 1,
1248
- shift: k,
1249
- updateShift: I
1250
- });
1251
- }
1252
- if (a()(c) || x()(c)) {
1253
- var f = t === null ? "null" : // TS: bigint, function, symbol are prevented by JSONElement type
1254
- fe(t);
1255
- if (y) {
1256
- return {
1257
- representation: n().createElement(X, {
1258
- elementRef: l,
1259
- valueType: f,
1260
- overflowType: b,
1261
- onClick: function e(n) {
1262
- T = l;
1263
- D(n, o);
1264
- },
1265
- onKeyDown: function e(n) {
1266
- V(n, false);
1267
- },
1268
- tabIndex: -1
1269
- }, c),
1270
- clickableValRef: l
1271
- };
1272
- }
1273
- return {
1274
- representation: n().createElement(B, {
1275
- valueType: f,
1276
- overflowType: b
1277
- }, c)
1278
- };
1279
- }
1280
- return {
1281
- representation: c
1282
- };
1283
- };
1284
- var F = function e(r, t) {
1285
- if (p) {
511
+ d = a;
512
+ }
513
+ } else if (O()(a)) {
514
+ // isObject is true for arrays
515
+ d = k()(a) ? "[]" : "{}";
516
+ } else {
517
+ d = ge({
518
+ baseId: n,
519
+ defaultOpen: i === true,
520
+ defaultExpanded: i,
521
+ expandChildrenOnShiftKey: c,
522
+ onClickKey: y,
523
+ onClickValue: b,
524
+ overflow: h,
525
+ obj: a,
526
+ path: l !== undefined ? [].concat(se(x), [ l ]) : se(x),
527
+ indentLevel: p + 1,
528
+ shift: w,
529
+ updateShift: E
530
+ });
531
+ }
532
+ if (o()(d) || C()(d)) {
533
+ var s = a === null ? "null" : // TS: bigint, function, symbol are prevented by JSONElement type
534
+ de(a);
535
+ if (b) {
1286
536
  return {
1287
- propertyElement: n().createElement(n().Fragment, null, n().createElement(W, {
1288
- elementRef: t,
1289
- tabIndex: -1,
537
+ representation: t().createElement(W, {
538
+ elementRef: u,
539
+ valueType: s,
540
+ overflowType: h,
1290
541
  onClick: function e(n) {
1291
- R = t;
1292
- N(n, r);
542
+ R = u;
543
+ q(n, l);
1293
544
  },
1294
545
  onKeyDown: function e(n) {
1295
- V(n, true);
1296
- }
1297
- }, r), ":", " "),
1298
- clickableKeyRef: t
546
+ L(n, false);
547
+ },
548
+ tabIndex: -1
549
+ }, d),
550
+ clickableValRef: u
1299
551
  };
1300
552
  }
1301
553
  return {
1302
- propertyElement: n().createElement(n().Fragment, null, n().createElement(H, null, r), ":", " ")
554
+ representation: t().createElement($, {
555
+ valueType: s,
556
+ overflowType: h
557
+ }, d)
1303
558
  };
559
+ }
560
+ return {
561
+ representation: d
1304
562
  };
1305
- if (j()(v) && !w()(v) || S()(v) && v.length > 0) {
1306
- var $ = E()(v).map((function(e, r, t) {
1307
- var o = v[e];
1308
- // TS: should be safe based on (recursive) JSONElement type
1309
- var a = S()(v) ? parseInt(e, 10) : e;
1310
- var i = O.length === 0 ? ".".concat(a) : ".".concat(O.join("."), ".").concat(a);
1311
-
1312
- return n().createElement(be, {
1313
- id: i,
1314
- key: i,
1315
- propertyDataPath: i,
1316
- childKey: a,
1317
- index: r,
1318
- value: o,
1319
- properties: t,
1320
- obj: v,
1321
- renderValue: q,
1322
- renderKey: F,
1323
- getInitialOpenState: _,
1324
- indentArray: C,
1325
- renderExpandLink: L,
1326
- onFocus: function e(n, r) {
1327
- R = n;
1328
- T = r;
563
+ };
564
+ var J = function e(n, r) {
565
+ if (y) {
566
+ return {
567
+ propertyElement: t().createElement(t().Fragment, null, t().createElement(z, {
568
+ elementRef: r,
569
+ tabIndex: -1,
570
+ onClick: function e(t) {
571
+ _ = r;
572
+ V(t, n);
573
+ },
574
+ onKeyDown: function e(n) {
575
+ L(n, true);
1329
576
  }
1330
- });
1331
- }));
1332
- if (O.length === 0) {
1333
- var M = j()(v) && !w()(v) || S()(v) && v.length > 0;
1334
-
1335
- return n().createElement(ce, {
1336
- id: "root",
1337
- propertyDataPath: ".",
1338
- key: ".",
1339
- hasChildren: M,
1340
- initialOpenState: t || i,
1341
- value: v,
1342
- index: 0,
1343
- renderExpandLink: L,
1344
- representation: $
1345
- });
1346
- }
1347
- return $;
577
+ }, n), ":", " "),
578
+ clickableKeyRef: r
579
+ };
1348
580
  }
1349
- // edge case: a single number/string/boolean being rendered (still valid JSON)
1350
-
1351
- return n().createElement(he, {
1352
- obj: v,
1353
- renderValue: q
1354
- });
1355
- }
1356
- // CONCATENATED MODULE: ./src/JSONTree/JSONTree.tsx
1357
- function Se() {
1358
- return Se = Object.assign ? Object.assign.bind() : function(e) {
1359
- for (var n = 1; n < arguments.length; n++) {
1360
- var r = arguments[n];
1361
- for (var t in r) {
1362
- ({}).hasOwnProperty.call(r, t) && (e[t] = r[t]);
581
+ return {
582
+ propertyElement: t().createElement(t().Fragment, null, t().createElement(H, null, n), ":", " ")
583
+ };
584
+ };
585
+ if (I()(v) && !O()(v) || k()(v) && v.length > 0) {
586
+ var M = T()(v).map((function(e, r, a) {
587
+ var o = v[e];
588
+ // TS: should be safe based on (recursive) JSONElement type
589
+ var l = k()(v) ? parseInt(e, 10) : e;
590
+ var i = x.length === 0 ? ".".concat(l) : ".".concat(x.join("."), ".").concat(l);
591
+
592
+ return t().createElement(me, {
593
+ id: "".concat(n, "-").concat(i),
594
+ key: i,
595
+ propertyDataPath: i,
596
+ childKey: l,
597
+ index: r,
598
+ value: o,
599
+ properties: a,
600
+ obj: v,
601
+ renderValue: F,
602
+ renderKey: J,
603
+ getInitialOpenState: K,
604
+ indentArray: j,
605
+ renderExpandLink: D,
606
+ onFocus: function e(n, r) {
607
+ _ = n;
608
+ R = r;
1363
609
  }
1364
- }
1365
- return e;
1366
- }, Se.apply(null, arguments);
1367
- }
1368
- function Oe(e, n) {
1369
- return je(e) || Ie(e, n) || ke(e, n) || we();
1370
- }
1371
- function we() {
1372
- throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
1373
- }
1374
- function ke(e, n) {
1375
- if (e) {
1376
- if ("string" == typeof e) return xe(e, n);
1377
- var r = {}.toString.call(e).slice(8, -1);
1378
- return "Object" === r && e.constructor && (r = e.constructor.name), "Map" === r || "Set" === r ? Array.from(e) : "Arguments" === r || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r) ? xe(e, n) : void 0;
610
+ });
611
+ }));
612
+ if (x.length === 0) {
613
+ var B = I()(v) && !O()(v) || k()(v) && v.length > 0;
614
+
615
+ return t().createElement(ce, {
616
+ id: "".concat(n, "-root"),
617
+ isRoot: true,
618
+ propertyDataPath: ".",
619
+ key: ".",
620
+ hasChildren: B,
621
+ initialOpenState: a || i,
622
+ value: v,
623
+ index: 0,
624
+ renderExpandLink: D,
625
+ representation: M
626
+ });
1379
627
  }
628
+ return M;
1380
629
  }
1381
- function xe(e, n) {
1382
- (null == n || n > e.length) && (n = e.length);
1383
- for (var r = 0, t = Array(n); r < n; r++) {
1384
- t[r] = e[r];
1385
- }
1386
- return t;
630
+ // edge case: a single number/string/boolean being rendered (still valid JSON)
631
+
632
+ return t().createElement(he, {
633
+ baseId: n,
634
+ obj: v,
635
+ renderValue: F
636
+ });
637
+ }
638
+ // CONCATENATED MODULE: ./src/JSONTree/JSONTree.tsx
639
+ function Se() {
640
+ return Se = Object.assign ? Object.assign.bind() : function(e) {
641
+ for (var n = 1; n < arguments.length; n++) {
642
+ var r = arguments[n];
643
+ for (var t in r) {
644
+ ({}).hasOwnProperty.call(r, t) && (e[t] = r[t]);
645
+ }
646
+ }
647
+ return e;
648
+ }, Se.apply(null, arguments);
649
+ }
650
+ function ke(e, n) {
651
+ return Ee(e) || Ce(e, n) || Oe(e, n) || xe();
652
+ }
653
+ function xe() {
654
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
655
+ }
656
+ function Oe(e, n) {
657
+ if (e) {
658
+ if ("string" == typeof e) return we(e, n);
659
+ var r = {}.toString.call(e).slice(8, -1);
660
+ return "Object" === r && e.constructor && (r = e.constructor.name), "Map" === r || "Set" === r ? Array.from(e) : "Arguments" === r || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r) ? we(e, n) : void 0;
661
+ }
662
+ }
663
+ function we(e, n) {
664
+ (null == n || n > e.length) && (n = e.length);
665
+ for (var r = 0, t = Array(n); r < n; r++) {
666
+ t[r] = e[r];
1387
667
  }
1388
- function Ie(e, n) {
1389
- var r = null == e ? null : "undefined" != typeof Symbol && e[Symbol.iterator] || e["@@iterator"];
1390
- if (null != r) {
1391
- var t, o, a, i, l = [], u = !0, c = !1;
668
+ return t;
669
+ }
670
+ function Ce(e, n) {
671
+ var r = null == e ? null : "undefined" != typeof Symbol && e[Symbol.iterator] || e["@@iterator"];
672
+ if (null != r) {
673
+ var t, a, o, l, i = [], u = !0, c = !1;
674
+ try {
675
+ if (o = (r = r.call(e)).next, 0 === n) {
676
+ if (Object(r) !== r) return;
677
+ u = !1;
678
+ } else for (;!(u = (t = o.call(r)).done) && (i.push(t.value), i.length !== n); u = !0) {
679
+ }
680
+ } catch (e) {
681
+ c = !0, a = e;
682
+ } finally {
1392
683
  try {
1393
- if (a = (r = r.call(e)).next, 0 === n) {
1394
- if (Object(r) !== r) return;
1395
- u = !1;
1396
- } else for (;!(u = (t = a.call(r)).done) && (l.push(t.value), l.length !== n); u = !0) {
1397
- }
1398
- } catch (e) {
1399
- c = !0, o = e;
684
+ if (!u && null != r["return"] && (l = r["return"](), Object(l) !== l)) return;
1400
685
  } finally {
1401
- try {
1402
- if (!u && null != r["return"] && (i = r["return"](), Object(i) !== i)) return;
1403
- } finally {
1404
- if (c) throw o;
1405
- }
686
+ if (c) throw a;
1406
687
  }
1407
- return l;
1408
688
  }
689
+ return i;
1409
690
  }
1410
- function je(e) {
1411
- if (Array.isArray(e)) return e;
1412
- }
1413
- function Ce(e, n) {
1414
- if (null == e) return {};
1415
- var r, t, o = Ee(e, n);
1416
- if (Object.getOwnPropertySymbols) {
1417
- var a = Object.getOwnPropertySymbols(e);
1418
- for (t = 0; t < a.length; t++) {
1419
- r = a[t], -1 === n.indexOf(r) && {}.propertyIsEnumerable.call(e, r) && (o[r] = e[r]);
1420
- }
691
+ }
692
+ function Ee(e) {
693
+ if (Array.isArray(e)) return e;
694
+ }
695
+ function Ie(e, n) {
696
+ if (null == e) return {};
697
+ var r, t, a = je(e, n);
698
+ if (Object.getOwnPropertySymbols) {
699
+ var o = Object.getOwnPropertySymbols(e);
700
+ for (t = 0; t < o.length; t++) {
701
+ r = o[t], -1 === n.indexOf(r) && {}.propertyIsEnumerable.call(e, r) && (a[r] = e[r]);
1421
702
  }
1422
- return o;
1423
703
  }
1424
- function Ee(e, n) {
1425
- if (null == e) return {};
1426
- var r = {};
1427
- for (var t in e) {
1428
- if ({}.hasOwnProperty.call(e, t)) {
1429
- if (-1 !== n.indexOf(t)) continue;
1430
- r[t] = e[t];
1431
- }
704
+ return a;
705
+ }
706
+ function je(e, n) {
707
+ if (null == e) return {};
708
+ var r = {};
709
+ for (var t in e) {
710
+ if ({}.hasOwnProperty.call(e, t)) {
711
+ if (-1 !== n.indexOf(t)) continue;
712
+ r[t] = e[t];
1432
713
  }
1433
- return r;
1434
714
  }
1435
- /** @public */
1436
- /** @public */
1437
- /** @public */ var Te = {
1438
- elementRef: l().oneOfType([ l().func, l().object ]),
1439
- defaultExpanded: l().bool,
1440
- indent: l().number,
1441
- json: l().oneOfType([ l().string, l().object, l().array, l().number, l().bool ]).isRequired,
1442
- onClickKey: l().func,
1443
- onClickValue: l().func,
1444
- overflow: l().oneOf([ "wrap", "scroll" ]),
1445
- expandChildrenOnShiftKey: l().bool
1446
- };
1447
- /**
715
+ return r;
716
+ }
717
+ /** @public */
718
+ /** @public */
719
+ /** @public */ var Te = {
720
+ elementRef: i().oneOfType([ i().func, i().object ]),
721
+ defaultExpanded: i().bool,
722
+ indent: i().number,
723
+ json: i().oneOfType([ i().string, i().object, i().array, i().number, i().bool ]).isRequired,
724
+ onClickKey: i().func,
725
+ onClickValue: i().func,
726
+ overflow: i().oneOf([ "wrap", "scroll" ]),
727
+ expandChildrenOnShiftKey: i().bool
728
+ };
729
+ /**
1448
730
  * Used to visualize a JSON string.
1449
- */ function Ae(r) {
1450
- var t = r.elementRef, o = r.defaultExpanded, i = o === void 0 ? false : o, l = r.indent, u = l === void 0 ? 4 : l, c = r.json, f = r.onClickKey, d = r.onClickValue, s = r.overflow, v = s === void 0 ? "scroll" : s, b = r.expandChildrenOnShiftKey, h = b === void 0 ? true : b, g = Ce(r, [ "elementRef", "defaultExpanded", "indent", "json", "onClickKey", "onClickValue", "overflow", "expandChildrenOnShiftKey" ]);
1451
- // @docs-props-type JSONTreePropsBase
1452
- var S = a()(c) ? JSON.parse(c) : c;
1453
- var O = v === "wrap" ? m : p;
1454
- var w = (0, e.useState)(undefined), k = Oe(w, 2), x = k[0], I = k[1];
1455
- var j = function e(n) {
1456
- I(n);
1457
- };
1458
-
1459
- return n().createElement(O, Se({
1460
- "data-language": "language-json",
1461
- "data-test": "json-tree",
1462
- ref: t,
1463
- role: "tree"
1464
- }, g), n().createElement(y, {
1465
- defaultIndent: false
1466
- }, ge({
731
+ */ function Re(e) {
732
+ var n = e.elementRef, a = e.defaultExpanded, l = a === void 0 ? false : a, i = e.indent, c = i === void 0 ? 4 : i, d = e.json, s = e.onClickKey, f = e.onClickValue, p = e.overflow, v = p === void 0 ? "scroll" : p, h = e.expandChildrenOnShiftKey, g = h === void 0 ? true : h, S = Ie(e, [ "elementRef", "defaultExpanded", "indent", "json", "onClickKey", "onClickValue", "overflow", "expandChildrenOnShiftKey" ]);
733
+ // @docs-props-type JSONTreePropsBase
734
+ var k = (0, r.useMemo)((function() {
735
+ return S.id || (0, u.createDOMID)("json-tree");
736
+ }), [ S.id ]);
737
+ var x = o()(d) ? JSON.parse(d) : d;
738
+ var O = v === "wrap" ? m : y;
739
+ var w = (0, r.useState)(undefined), C = ke(w, 2), E = C[0], I = C[1];
740
+ var j = (0, r.useCallback)((function(e) {
741
+ I(e);
742
+ }), []);
743
+ var T = (0, r.useMemo)((function() {
744
+ return ge({
745
+ baseId: k,
1467
746
  defaultOpen: true,
1468
- defaultExpanded: i,
1469
- expandChildrenOnShiftKey: h,
1470
- indent: u,
1471
- obj: S,
1472
- onClickKey: f,
1473
- onClickValue: d,
747
+ defaultExpanded: l,
748
+ expandChildrenOnShiftKey: g,
749
+ indent: c,
750
+ obj: x,
751
+ onClickKey: s,
752
+ onClickValue: f,
1474
753
  overflow: v,
1475
- shift: x,
754
+ shift: E,
1476
755
  updateShift: j
1477
- })));
1478
- }
1479
- Ae.propTypes = Te;
1480
- /* harmony default export */ const Pe = Ae;
1481
- }) // CONCATENATED MODULE: ./src/JSONTree/index.ts
1482
- ();
1483
- module.exports = t;
756
+ });
757
+ }), [ k, l, g, c, x, s, f, v, E, j ]);
758
+
759
+ return t().createElement(O, Se({
760
+ "data-language": "language-json",
761
+ "data-test": "json-tree",
762
+ ref: n,
763
+ role: "tree"
764
+ }, S), t().createElement(b, {
765
+ defaultIndent: false
766
+ }, T));
767
+ }
768
+ Re.propTypes = Te;
769
+ /* harmony default export */ const Ae = Re;
770
+ // CONCATENATED MODULE: ./src/JSONTree/index.ts
771
+ module.exports = n;
1484
772
  /******/})();