@uipath/apollo-react 6.72.0 → 6.74.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 (81) hide show
  1. package/dist/canvas/components/JsonTree/JsonTree.cjs +256 -214
  2. package/dist/canvas/components/JsonTree/JsonTree.d.ts +31 -25
  3. package/dist/canvas/components/JsonTree/JsonTree.d.ts.map +1 -1
  4. package/dist/canvas/components/JsonTree/JsonTree.js +238 -217
  5. package/dist/canvas/components/JsonTree/index.cjs +67 -58
  6. package/dist/canvas/components/JsonTree/index.d.ts +2 -8
  7. package/dist/canvas/components/JsonTree/index.d.ts.map +1 -1
  8. package/dist/canvas/components/JsonTree/index.js +2 -8
  9. package/dist/canvas/components/NodeIOView/NodeIOView.types.d.ts +1 -1
  10. package/dist/canvas/components/NodeIOView/NodeIOView.types.d.ts.map +1 -1
  11. package/dist/canvas/components/StageNode/StageNode.types.d.ts +1 -1
  12. package/dist/canvas/components/StageNode/StageNode.types.d.ts.map +1 -1
  13. package/dist/canvas/components/StageNode/StageNodeHeader.cjs +15 -6
  14. package/dist/canvas/components/StageNode/StageNodeHeader.d.ts.map +1 -1
  15. package/dist/canvas/components/StageNode/StageNodeHeader.js +15 -6
  16. package/dist/canvas/stories/templates/LayoutPreviewsPage.cjs +1257 -0
  17. package/dist/canvas/stories/templates/LayoutPreviewsPage.d.ts +2 -0
  18. package/dist/canvas/stories/templates/LayoutPreviewsPage.d.ts.map +1 -0
  19. package/dist/canvas/stories/templates/LayoutPreviewsPage.js +1223 -0
  20. package/dist/canvas/styles/tailwind.canvas.css +1 -1
  21. package/package.json +2 -2
  22. package/dist/canvas/components/JsonTree/DecorationChip.cjs +0 -81
  23. package/dist/canvas/components/JsonTree/DecorationChip.d.ts +0 -5
  24. package/dist/canvas/components/JsonTree/DecorationChip.d.ts.map +0 -1
  25. package/dist/canvas/components/JsonTree/DecorationChip.js +0 -47
  26. package/dist/canvas/components/JsonTree/EditorChrome.cjs +0 -93
  27. package/dist/canvas/components/JsonTree/EditorChrome.d.ts +0 -18
  28. package/dist/canvas/components/JsonTree/EditorChrome.d.ts.map +0 -1
  29. package/dist/canvas/components/JsonTree/EditorChrome.js +0 -56
  30. package/dist/canvas/components/JsonTree/JsonContainerEditor.cjs +0 -103
  31. package/dist/canvas/components/JsonTree/JsonContainerEditor.d.ts +0 -10
  32. package/dist/canvas/components/JsonTree/JsonContainerEditor.d.ts.map +0 -1
  33. package/dist/canvas/components/JsonTree/JsonContainerEditor.js +0 -69
  34. package/dist/canvas/components/JsonTree/JsonLeafValueEditor.cjs +0 -98
  35. package/dist/canvas/components/JsonTree/JsonLeafValueEditor.d.ts +0 -9
  36. package/dist/canvas/components/JsonTree/JsonLeafValueEditor.d.ts.map +0 -1
  37. package/dist/canvas/components/JsonTree/JsonLeafValueEditor.js +0 -64
  38. package/dist/canvas/components/JsonTree/JsonMultilineLeafEditor.cjs +0 -86
  39. package/dist/canvas/components/JsonTree/JsonMultilineLeafEditor.d.ts +0 -9
  40. package/dist/canvas/components/JsonTree/JsonMultilineLeafEditor.d.ts.map +0 -1
  41. package/dist/canvas/components/JsonTree/JsonMultilineLeafEditor.js +0 -52
  42. package/dist/canvas/components/JsonTree/JsonTree.types.cjs +0 -18
  43. package/dist/canvas/components/JsonTree/JsonTree.types.d.ts +0 -110
  44. package/dist/canvas/components/JsonTree/JsonTree.types.d.ts.map +0 -1
  45. package/dist/canvas/components/JsonTree/JsonTree.types.js +0 -0
  46. package/dist/canvas/components/JsonTree/JsonTreeRow.cjs +0 -358
  47. package/dist/canvas/components/JsonTree/JsonTreeRow.d.ts +0 -36
  48. package/dist/canvas/components/JsonTree/JsonTreeRow.d.ts.map +0 -1
  49. package/dist/canvas/components/JsonTree/JsonTreeRow.js +0 -318
  50. package/dist/canvas/components/JsonTree/JsonTreeToolbar.cjs +0 -224
  51. package/dist/canvas/components/JsonTree/JsonTreeToolbar.d.ts +0 -17
  52. package/dist/canvas/components/JsonTree/JsonTreeToolbar.d.ts.map +0 -1
  53. package/dist/canvas/components/JsonTree/JsonTreeToolbar.js +0 -190
  54. package/dist/canvas/components/JsonTree/JsonTypeBadge.cjs +0 -70
  55. package/dist/canvas/components/JsonTree/JsonTypeBadge.d.ts +0 -10
  56. package/dist/canvas/components/JsonTree/JsonTypeBadge.d.ts.map +0 -1
  57. package/dist/canvas/components/JsonTree/JsonTypeBadge.js +0 -36
  58. package/dist/canvas/components/JsonTree/NodeKey.cjs +0 -86
  59. package/dist/canvas/components/JsonTree/NodeKey.d.ts +0 -10
  60. package/dist/canvas/components/JsonTree/NodeKey.d.ts.map +0 -1
  61. package/dist/canvas/components/JsonTree/NodeKey.js +0 -52
  62. package/dist/canvas/components/JsonTree/RowActions.cjs +0 -121
  63. package/dist/canvas/components/JsonTree/RowActions.d.ts +0 -8
  64. package/dist/canvas/components/JsonTree/RowActions.d.ts.map +0 -1
  65. package/dist/canvas/components/JsonTree/RowActions.js +0 -87
  66. package/dist/canvas/components/JsonTree/ScalarValueCell.cjs +0 -132
  67. package/dist/canvas/components/JsonTree/ScalarValueCell.d.ts +0 -12
  68. package/dist/canvas/components/JsonTree/ScalarValueCell.d.ts.map +0 -1
  69. package/dist/canvas/components/JsonTree/ScalarValueCell.js +0 -95
  70. package/dist/canvas/components/JsonTree/buildJsonTree.cjs +0 -321
  71. package/dist/canvas/components/JsonTree/buildJsonTree.d.ts +0 -39
  72. package/dist/canvas/components/JsonTree/buildJsonTree.d.ts.map +0 -1
  73. package/dist/canvas/components/JsonTree/buildJsonTree.js +0 -254
  74. package/dist/canvas/components/JsonTree/clipboard.cjs +0 -63
  75. package/dist/canvas/components/JsonTree/clipboard.d.ts +0 -2
  76. package/dist/canvas/components/JsonTree/clipboard.d.ts.map +0 -1
  77. package/dist/canvas/components/JsonTree/clipboard.js +0 -29
  78. package/dist/canvas/components/JsonTree/leafEditTypes.cjs +0 -74
  79. package/dist/canvas/components/JsonTree/leafEditTypes.d.ts +0 -6
  80. package/dist/canvas/components/JsonTree/leafEditTypes.d.ts.map +0 -1
  81. package/dist/canvas/components/JsonTree/leafEditTypes.js +0 -34
@@ -1,358 +0,0 @@
1
- "use strict";
2
- var __webpack_require__ = {};
3
- (()=>{
4
- __webpack_require__.d = (exports1, definition)=>{
5
- for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
6
- enumerable: true,
7
- get: definition[key]
8
- });
9
- };
10
- })();
11
- (()=>{
12
- __webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
13
- })();
14
- (()=>{
15
- __webpack_require__.r = (exports1)=>{
16
- if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
17
- value: 'Module'
18
- });
19
- Object.defineProperty(exports1, '__esModule', {
20
- value: true
21
- });
22
- };
23
- })();
24
- var __webpack_exports__ = {};
25
- __webpack_require__.r(__webpack_exports__);
26
- __webpack_require__.d(__webpack_exports__, {
27
- JsonTreeRowContextProvider: ()=>JsonTreeRowContextProvider,
28
- JsonTreeRow: ()=>JsonTreeRow,
29
- ROW_MIN_HEIGHT_PX: ()=>ROW_MIN_HEIGHT_PX
30
- });
31
- const jsx_runtime_namespaceObject = require("react/jsx-runtime");
32
- const apollo_wind_namespaceObject = require("@uipath/apollo-wind");
33
- const external_lucide_react_namespaceObject = require("lucide-react");
34
- const external_react_namespaceObject = require("react");
35
- const index_cjs_namespaceObject = require("../../../i18n/index.cjs");
36
- const external_buildJsonTree_cjs_namespaceObject = require("./buildJsonTree.cjs");
37
- const external_DecorationChip_cjs_namespaceObject = require("./DecorationChip.cjs");
38
- const external_JsonContainerEditor_cjs_namespaceObject = require("./JsonContainerEditor.cjs");
39
- const external_JsonMultilineLeafEditor_cjs_namespaceObject = require("./JsonMultilineLeafEditor.cjs");
40
- const external_JsonTypeBadge_cjs_namespaceObject = require("./JsonTypeBadge.cjs");
41
- const external_NodeKey_cjs_namespaceObject = require("./NodeKey.cjs");
42
- const external_RowActions_cjs_namespaceObject = require("./RowActions.cjs");
43
- const external_ScalarValueCell_cjs_namespaceObject = require("./ScalarValueCell.cjs");
44
- const ROW_CLASS = 'group flex min-h-7 cursor-default items-center gap-1.5 py-1 pr-1 transition hover:bg-surface-overlay';
45
- const ROW_MIN_HEIGHT_PX = 28;
46
- const VALUE_CELL_CLASS = 'flex min-w-8 flex-1 items-center';
47
- function rowIndent(depth, extra = 0) {
48
- return {
49
- paddingLeft: `${6 + 12 * depth + extra}px`
50
- };
51
- }
52
- const KEY_ALIGN_OFFSET = 44;
53
- const JsonTreeRowContext = /*#__PURE__*/ (0, external_react_namespaceObject.createContext)(null);
54
- const JsonTreeRowContextProvider = JsonTreeRowContext.Provider;
55
- function useJsonTreeRowContext() {
56
- const ctx = (0, external_react_namespaceObject.useContext)(JsonTreeRowContext);
57
- if (!ctx) throw new Error('JsonTreeRow must be rendered inside a JsonTreeRowContext provider');
58
- return ctx;
59
- }
60
- function JsonTreeRow({ node, depth }) {
61
- const { _ } = (0, index_cjs_namespaceObject.useSafeLingui)();
62
- const { collapsed, onToggleCollapsed, readOnly, decorateNode, deriveTypeIcon, renderValue, nodeActions, maxInlineActions, renderCodeEditor, pathForCopy, canEdit, RowWrapper, templateItemLabel, editingPath, jsonEditingPath, wrappedPaths, copied, setEditingPath, setJsonEditingPath, copyPath, copyValue, toggleWrapped, commitEdit } = useJsonTreeRowContext();
63
- const buildDefaultActions = (node, flags)=>{
64
- const actions = [];
65
- if (flags.wrappable) actions.push({
66
- id: 'wrap',
67
- icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.WrapText, {}),
68
- active: flags.wrapped,
69
- tooltip: flags.wrapped ? _({
70
- id: 'canvas.json_value_panel.unwrap_value',
71
- message: 'Unwrap value'
72
- }) : _({
73
- id: 'canvas.json_value_panel.wrap_value',
74
- message: 'Wrap value'
75
- }),
76
- label: flags.wrapped ? _({
77
- id: 'canvas.json_value_panel.unwrap_value_of',
78
- message: 'Unwrap value of {key}',
79
- values: {
80
- key: node.key
81
- }
82
- }) : _({
83
- id: 'canvas.json_value_panel.wrap_value_of',
84
- message: 'Wrap value of {key}',
85
- values: {
86
- key: node.key
87
- }
88
- }),
89
- onSelect: ()=>toggleWrapped(node)
90
- });
91
- if (flags.isContainer && canEdit && !node.isArrayItemTemplate) actions.push({
92
- id: 'edit-json',
93
- icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.Pencil, {}),
94
- tooltip: _({
95
- id: 'canvas.json_value_panel.edit_as_json',
96
- message: 'Edit as JSON'
97
- }),
98
- label: _({
99
- id: 'canvas.json_value_panel.edit_key_as_json',
100
- message: 'Edit {key} as JSON',
101
- values: {
102
- key: node.key
103
- }
104
- }),
105
- onSelect: ()=>setJsonEditingPath(node.path)
106
- });
107
- if (flags.canCopyValue) actions.push({
108
- id: 'copy-value',
109
- icon: flags.copiedValue ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.CircleCheck, {
110
- className: "text-brand"
111
- }) : /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.Copy, {}),
112
- tooltip: _({
113
- id: 'canvas.json_value_panel.copy_value',
114
- message: 'Copy value'
115
- }),
116
- label: _({
117
- id: 'canvas.json_value_panel.copy_value_of',
118
- message: 'Copy value of {key}',
119
- values: {
120
- key: node.key
121
- }
122
- }),
123
- onSelect: ()=>copyValue(node)
124
- });
125
- return actions;
126
- };
127
- const isContainer = void 0 !== node.children;
128
- const isTemplate = !!node.isArrayItemTemplate;
129
- const isTemplateItem = (0, external_buildJsonTree_cjs_namespaceObject.isArrayItemTemplateRoot)(node);
130
- const childCount = node.children?.filter((c)=>!(0, external_buildJsonTree_cjs_namespaceObject.isArrayItemTemplateRoot)(c)).length ?? 0;
131
- const decoration = decorateNode?.(node);
132
- const customCell = renderValue?.(node, {
133
- readOnly,
134
- commit: (value)=>commitEdit(node, value),
135
- clear: ()=>commitEdit(node, void 0)
136
- });
137
- const canCopyValue = void 0 !== node.value;
138
- const wrappable = !isContainer && null == customCell && void 0 !== node.value && 'boolean' !== node.type && !node.schema?.enum?.length;
139
- const wrapped = wrappable && !!wrappedPaths[node.path];
140
- const copiedValue = copied?.path === node.path && 'value' === copied.kind;
141
- let builtDefaults;
142
- const getDefaultActions = ()=>{
143
- builtDefaults ??= buildDefaultActions(node, {
144
- isContainer,
145
- wrappable,
146
- wrapped,
147
- canCopyValue,
148
- copiedValue
149
- });
150
- return builtDefaults;
151
- };
152
- const actions = nodeActions?.(node, {
153
- readOnly,
154
- get defaultActions () {
155
- return getDefaultActions();
156
- },
157
- commit: (value)=>commitEdit(node, value),
158
- clear: ()=>commitEdit(node, void 0)
159
- }) ?? getDefaultActions();
160
- const rowClickable = isContainer && !!onToggleCollapsed;
161
- const handleRowClick = (event)=>{
162
- if (event.target.closest('button, a, input, textarea, select, [contenteditable="true"]')) return;
163
- onToggleCollapsed?.(node.path);
164
- };
165
- return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
166
- children: [
167
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(RowWrapper, {
168
- node: node,
169
- className: (0, apollo_wind_namespaceObject.cn)(ROW_CLASS, rowClickable && 'cursor-pointer'),
170
- style: rowIndent(depth),
171
- onClick: rowClickable ? handleRowClick : void 0,
172
- children: [
173
- isContainer ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("button", {
174
- type: "button",
175
- onClick: ()=>onToggleCollapsed?.(node.path),
176
- "aria-label": collapsed[node.path] ? _({
177
- id: 'canvas.json_value_panel.expand_key',
178
- message: 'Expand {key}',
179
- values: {
180
- key: node.key
181
- }
182
- }) : _({
183
- id: 'canvas.json_value_panel.collapse_key',
184
- message: 'Collapse {key}',
185
- values: {
186
- key: node.key
187
- }
188
- }),
189
- "aria-expanded": !collapsed[node.path],
190
- className: "grid size-2.5 shrink-0 cursor-pointer place-items-center text-foreground-subtle transition hover:text-foreground",
191
- children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.ChevronDown, {
192
- size: 10,
193
- className: (0, apollo_wind_namespaceObject.cn)('transition-transform duration-100', collapsed[node.path] && '-rotate-90')
194
- })
195
- }) : /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
196
- className: "size-2.5 shrink-0"
197
- }),
198
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_JsonTypeBadge_cjs_namespaceObject.JsonTypeBadge, {
199
- type: node.type,
200
- icon: decoration?.badge?.icon ?? deriveTypeIcon?.(node),
201
- className: decoration?.badge?.className
202
- }),
203
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_NodeKey_cjs_namespaceObject.NodeKey, {
204
- node: node,
205
- label: isTemplateItem ? templateItemLabel : decoration?.label,
206
- displayPath: pathForCopy?.(node.path) ?? node.path,
207
- onCopyPath: copyPath,
208
- className: isTemplateItem ? 'font-normal italic text-foreground-subtle' : void 0
209
- }),
210
- copied?.path === node.path && 'path' === copied.kind && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.CircleCheck, {
211
- size: 11,
212
- className: "shrink-0 text-brand",
213
- role: "img",
214
- "aria-label": _({
215
- id: 'canvas.json_value_panel.path_copied',
216
- message: 'Path copied'
217
- })
218
- }),
219
- decoration?.sublabel && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
220
- className: "min-w-0 truncate font-mono text-[10px] text-foreground-subtle leading-4",
221
- children: decoration.sublabel
222
- }),
223
- node.required && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(apollo_wind_namespaceObject.RequiredIndicator, {
224
- className: "ml-0 shrink-0 text-[10px] text-foreground",
225
- srLabel: _({
226
- id: 'canvas.json_value_panel.required_marker',
227
- message: 'required'
228
- })
229
- }),
230
- isContainer ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(jsx_runtime_namespaceObject.Fragment, {
231
- children: [
232
- !decoration?.hideCount && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
233
- className: "shrink-0 whitespace-nowrap font-mono italic text-[10px] text-foreground-subtle",
234
- children: 'array' === node.type ? _({
235
- id: 'canvas.json_value_panel.item_count',
236
- message: '{count, plural, one {# item} other {# items}}',
237
- values: {
238
- count: childCount
239
- }
240
- }) : _({
241
- id: 'canvas.json_value_panel.key_count',
242
- message: '{count, plural, one {# key} other {# keys}}',
243
- values: {
244
- count: childCount
245
- }
246
- })
247
- }),
248
- null != customCell && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
249
- className: VALUE_CELL_CLASS,
250
- children: customCell
251
- }),
252
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_DecorationChip_cjs_namespaceObject.DecorationChip, {
253
- decoration: decoration
254
- }),
255
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_RowActions_cjs_namespaceObject.RowActions, {
256
- node: node,
257
- actions: actions,
258
- maxInline: maxInlineActions
259
- })
260
- ]
261
- }) : /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(jsx_runtime_namespaceObject.Fragment, {
262
- children: [
263
- !wrapped && (null != customCell ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
264
- className: VALUE_CELL_CLASS,
265
- children: customCell
266
- }) : !(readOnly && void 0 === node.value || isTemplate) && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(jsx_runtime_namespaceObject.Fragment, {
267
- children: [
268
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
269
- className: "shrink-0 font-mono text-xs text-foreground-subtle",
270
- children: "="
271
- }),
272
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
273
- className: (0, apollo_wind_namespaceObject.cn)(VALUE_CELL_CLASS, 'shrink-3'),
274
- children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_ScalarValueCell_cjs_namespaceObject.ScalarValueCell, {
275
- node: node,
276
- readOnly: readOnly,
277
- editing: editingPath === node.path,
278
- onStartEdit: (n)=>setEditingPath(n.path),
279
- onStopEdit: ()=>setEditingPath(null),
280
- onEdit: canEdit ? commitEdit : void 0
281
- })
282
- })
283
- ]
284
- })),
285
- editingPath !== node.path && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(jsx_runtime_namespaceObject.Fragment, {
286
- children: [
287
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_DecorationChip_cjs_namespaceObject.DecorationChip, {
288
- decoration: decoration
289
- }),
290
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_RowActions_cjs_namespaceObject.RowActions, {
291
- node: node,
292
- actions: actions,
293
- maxInline: maxInlineActions
294
- })
295
- ]
296
- })
297
- ]
298
- })
299
- ]
300
- }),
301
- wrapped && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
302
- className: "pb-1.5 pr-3.5",
303
- style: rowIndent(depth, KEY_ALIGN_OFFSET),
304
- children: editingPath === node.path && canEdit ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_JsonMultilineLeafEditor_cjs_namespaceObject.JsonMultilineLeafEditor, {
305
- node: node,
306
- onCommit: (value)=>{
307
- setEditingPath(null);
308
- commitEdit(node, value);
309
- },
310
- onCancel: ()=>setEditingPath(null)
311
- }) : /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("button", {
312
- type: "button",
313
- disabled: !canEdit,
314
- onClick: ()=>setEditingPath(node.path),
315
- "aria-label": _({
316
- id: 'canvas.json_value_panel.edit_value_of',
317
- message: 'Edit value of {key}',
318
- values: {
319
- key: node.key
320
- }
321
- }),
322
- title: canEdit ? _({
323
- id: 'canvas.json_value_panel.edit_hint',
324
- message: 'Click to edit'
325
- }) : void 0,
326
- className: (0, apollo_wind_namespaceObject.cn)('w-full whitespace-pre-wrap break-all rounded text-left font-mono text-xs leading-5', canEdit && 'cursor-text', (0, external_ScalarValueCell_cjs_namespaceObject.valueColorClass)(node.type, node.value)),
327
- children: (0, external_buildJsonTree_cjs_namespaceObject.formatLeafValue)(node.type, node.value, {
328
- preserveStringWhitespace: true
329
- })
330
- })
331
- }),
332
- isContainer && jsonEditingPath === node.path && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
333
- className: "py-1.5 pr-3.5",
334
- style: rowIndent(depth, KEY_ALIGN_OFFSET),
335
- children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_JsonContainerEditor_cjs_namespaceObject.JsonContainerEditor, {
336
- node: node,
337
- onCommit: (value)=>{
338
- setJsonEditingPath(null);
339
- commitEdit(node, value);
340
- },
341
- onCancel: ()=>setJsonEditingPath(null),
342
- renderCodeEditor: renderCodeEditor
343
- })
344
- })
345
- ]
346
- });
347
- }
348
- exports.JsonTreeRow = __webpack_exports__.JsonTreeRow;
349
- exports.JsonTreeRowContextProvider = __webpack_exports__.JsonTreeRowContextProvider;
350
- exports.ROW_MIN_HEIGHT_PX = __webpack_exports__.ROW_MIN_HEIGHT_PX;
351
- for(var __rspack_i in __webpack_exports__)if (-1 === [
352
- "JsonTreeRow",
353
- "JsonTreeRowContextProvider",
354
- "ROW_MIN_HEIGHT_PX"
355
- ].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
356
- Object.defineProperty(exports, '__esModule', {
357
- value: true
358
- });
@@ -1,36 +0,0 @@
1
- import type { CopyEvent, DeriveTypeIcon, JsonTreeNode, JsonTreeRowWrapper, JsonValue, NodeActionsResolver, NodeDecoration, RenderCodeEditor, RenderValueCell } from './JsonTree.types';
2
- export declare const ROW_MIN_HEIGHT_PX = 28;
3
- export interface JsonTreeRowContextValue {
4
- collapsed: Record<string, boolean>;
5
- onToggleCollapsed?: (path: string) => void;
6
- readOnly: boolean;
7
- decorateNode?: (node: JsonTreeNode) => NodeDecoration | undefined;
8
- deriveTypeIcon?: DeriveTypeIcon;
9
- renderValue?: RenderValueCell;
10
- nodeActions?: NodeActionsResolver;
11
- maxInlineActions: number;
12
- renderCodeEditor?: RenderCodeEditor;
13
- pathForCopy?: (path: string) => string;
14
- canEdit: boolean;
15
- RowWrapper: JsonTreeRowWrapper;
16
- templateItemLabel: string;
17
- editingPath: string | null;
18
- jsonEditingPath: string | null;
19
- wrappedPaths: Record<string, boolean>;
20
- copied: {
21
- path: string;
22
- kind: CopyEvent['kind'];
23
- } | null;
24
- setEditingPath: (path: string | null) => void;
25
- setJsonEditingPath: (path: string | null) => void;
26
- copyPath: (node: JsonTreeNode) => void;
27
- copyValue: (node: JsonTreeNode) => void;
28
- toggleWrapped: (node: JsonTreeNode) => void;
29
- commitEdit: (node: JsonTreeNode, value: JsonValue | undefined) => void;
30
- }
31
- export declare const JsonTreeRowContextProvider: import("react").Provider<JsonTreeRowContextValue | null>;
32
- export declare function JsonTreeRow({ node, depth }: {
33
- node: JsonTreeNode;
34
- depth: number;
35
- }): import("react/jsx-runtime").JSX.Element;
36
- //# sourceMappingURL=JsonTreeRow.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"JsonTreeRow.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/JsonTree/JsonTreeRow.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EACV,SAAS,EACT,cAAc,EACd,YAAY,EACZ,kBAAkB,EAClB,SAAS,EAET,mBAAmB,EACnB,cAAc,EACd,gBAAgB,EAChB,eAAe,EAChB,MAAM,kBAAkB,CAAC;AAa1B,eAAO,MAAM,iBAAiB,KAAK,CAAC;AAqBpC,MAAM,WAAW,uBAAuB;IACtC,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACnC,iBAAiB,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3C,QAAQ,EAAE,OAAO,CAAC;IAClB,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,YAAY,KAAK,cAAc,GAAG,SAAS,CAAC;IAClE,cAAc,CAAC,EAAE,cAAc,CAAC;IAChC,WAAW,CAAC,EAAE,eAAe,CAAC;IAC9B,WAAW,CAAC,EAAE,mBAAmB,CAAC;IAClC,gBAAgB,EAAE,MAAM,CAAC;IACzB,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;IACpC,WAAW,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;IAEvC,OAAO,EAAE,OAAO,CAAC;IACjB,UAAU,EAAE,kBAAkB,CAAC;IAE/B,iBAAiB,EAAE,MAAM,CAAC;IAC1B,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACtC,MAAM,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,SAAS,CAAC,MAAM,CAAC,CAAA;KAAE,GAAG,IAAI,CAAC;IACzD,cAAc,EAAE,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IAC9C,kBAAkB,EAAE,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IAClD,QAAQ,EAAE,CAAC,IAAI,EAAE,YAAY,KAAK,IAAI,CAAC;IACvC,SAAS,EAAE,CAAC,IAAI,EAAE,YAAY,KAAK,IAAI,CAAC;IACxC,aAAa,EAAE,CAAC,IAAI,EAAE,YAAY,KAAK,IAAI,CAAC;IAC5C,UAAU,EAAE,CAAC,IAAI,EAAE,YAAY,EAAE,KAAK,EAAE,SAAS,GAAG,SAAS,KAAK,IAAI,CAAC;CACxE;AAID,eAAO,MAAM,0BAA0B,0DAA8B,CAAC;AAgBtE,wBAAgB,WAAW,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE;IAAE,IAAI,EAAE,YAAY,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,2CA6WjF"}