@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.
- package/dist/canvas/components/JsonTree/JsonTree.cjs +256 -214
- package/dist/canvas/components/JsonTree/JsonTree.d.ts +31 -25
- package/dist/canvas/components/JsonTree/JsonTree.d.ts.map +1 -1
- package/dist/canvas/components/JsonTree/JsonTree.js +238 -217
- package/dist/canvas/components/JsonTree/index.cjs +67 -58
- package/dist/canvas/components/JsonTree/index.d.ts +2 -8
- package/dist/canvas/components/JsonTree/index.d.ts.map +1 -1
- package/dist/canvas/components/JsonTree/index.js +2 -8
- package/dist/canvas/components/NodeIOView/NodeIOView.types.d.ts +1 -1
- package/dist/canvas/components/NodeIOView/NodeIOView.types.d.ts.map +1 -1
- package/dist/canvas/components/StageNode/StageNode.types.d.ts +1 -1
- package/dist/canvas/components/StageNode/StageNode.types.d.ts.map +1 -1
- package/dist/canvas/components/StageNode/StageNodeHeader.cjs +15 -6
- package/dist/canvas/components/StageNode/StageNodeHeader.d.ts.map +1 -1
- package/dist/canvas/components/StageNode/StageNodeHeader.js +15 -6
- package/dist/canvas/stories/templates/LayoutPreviewsPage.cjs +1257 -0
- package/dist/canvas/stories/templates/LayoutPreviewsPage.d.ts +2 -0
- package/dist/canvas/stories/templates/LayoutPreviewsPage.d.ts.map +1 -0
- package/dist/canvas/stories/templates/LayoutPreviewsPage.js +1223 -0
- package/dist/canvas/styles/tailwind.canvas.css +1 -1
- package/package.json +2 -2
- package/dist/canvas/components/JsonTree/DecorationChip.cjs +0 -81
- package/dist/canvas/components/JsonTree/DecorationChip.d.ts +0 -5
- package/dist/canvas/components/JsonTree/DecorationChip.d.ts.map +0 -1
- package/dist/canvas/components/JsonTree/DecorationChip.js +0 -47
- package/dist/canvas/components/JsonTree/EditorChrome.cjs +0 -93
- package/dist/canvas/components/JsonTree/EditorChrome.d.ts +0 -18
- package/dist/canvas/components/JsonTree/EditorChrome.d.ts.map +0 -1
- package/dist/canvas/components/JsonTree/EditorChrome.js +0 -56
- package/dist/canvas/components/JsonTree/JsonContainerEditor.cjs +0 -103
- package/dist/canvas/components/JsonTree/JsonContainerEditor.d.ts +0 -10
- package/dist/canvas/components/JsonTree/JsonContainerEditor.d.ts.map +0 -1
- package/dist/canvas/components/JsonTree/JsonContainerEditor.js +0 -69
- package/dist/canvas/components/JsonTree/JsonLeafValueEditor.cjs +0 -98
- package/dist/canvas/components/JsonTree/JsonLeafValueEditor.d.ts +0 -9
- package/dist/canvas/components/JsonTree/JsonLeafValueEditor.d.ts.map +0 -1
- package/dist/canvas/components/JsonTree/JsonLeafValueEditor.js +0 -64
- package/dist/canvas/components/JsonTree/JsonMultilineLeafEditor.cjs +0 -86
- package/dist/canvas/components/JsonTree/JsonMultilineLeafEditor.d.ts +0 -9
- package/dist/canvas/components/JsonTree/JsonMultilineLeafEditor.d.ts.map +0 -1
- package/dist/canvas/components/JsonTree/JsonMultilineLeafEditor.js +0 -52
- package/dist/canvas/components/JsonTree/JsonTree.types.cjs +0 -18
- package/dist/canvas/components/JsonTree/JsonTree.types.d.ts +0 -110
- package/dist/canvas/components/JsonTree/JsonTree.types.d.ts.map +0 -1
- package/dist/canvas/components/JsonTree/JsonTree.types.js +0 -0
- package/dist/canvas/components/JsonTree/JsonTreeRow.cjs +0 -358
- package/dist/canvas/components/JsonTree/JsonTreeRow.d.ts +0 -36
- package/dist/canvas/components/JsonTree/JsonTreeRow.d.ts.map +0 -1
- package/dist/canvas/components/JsonTree/JsonTreeRow.js +0 -318
- package/dist/canvas/components/JsonTree/JsonTreeToolbar.cjs +0 -224
- package/dist/canvas/components/JsonTree/JsonTreeToolbar.d.ts +0 -17
- package/dist/canvas/components/JsonTree/JsonTreeToolbar.d.ts.map +0 -1
- package/dist/canvas/components/JsonTree/JsonTreeToolbar.js +0 -190
- package/dist/canvas/components/JsonTree/JsonTypeBadge.cjs +0 -70
- package/dist/canvas/components/JsonTree/JsonTypeBadge.d.ts +0 -10
- package/dist/canvas/components/JsonTree/JsonTypeBadge.d.ts.map +0 -1
- package/dist/canvas/components/JsonTree/JsonTypeBadge.js +0 -36
- package/dist/canvas/components/JsonTree/NodeKey.cjs +0 -86
- package/dist/canvas/components/JsonTree/NodeKey.d.ts +0 -10
- package/dist/canvas/components/JsonTree/NodeKey.d.ts.map +0 -1
- package/dist/canvas/components/JsonTree/NodeKey.js +0 -52
- package/dist/canvas/components/JsonTree/RowActions.cjs +0 -121
- package/dist/canvas/components/JsonTree/RowActions.d.ts +0 -8
- package/dist/canvas/components/JsonTree/RowActions.d.ts.map +0 -1
- package/dist/canvas/components/JsonTree/RowActions.js +0 -87
- package/dist/canvas/components/JsonTree/ScalarValueCell.cjs +0 -132
- package/dist/canvas/components/JsonTree/ScalarValueCell.d.ts +0 -12
- package/dist/canvas/components/JsonTree/ScalarValueCell.d.ts.map +0 -1
- package/dist/canvas/components/JsonTree/ScalarValueCell.js +0 -95
- package/dist/canvas/components/JsonTree/buildJsonTree.cjs +0 -321
- package/dist/canvas/components/JsonTree/buildJsonTree.d.ts +0 -39
- package/dist/canvas/components/JsonTree/buildJsonTree.d.ts.map +0 -1
- package/dist/canvas/components/JsonTree/buildJsonTree.js +0 -254
- package/dist/canvas/components/JsonTree/clipboard.cjs +0 -63
- package/dist/canvas/components/JsonTree/clipboard.d.ts +0 -2
- package/dist/canvas/components/JsonTree/clipboard.d.ts.map +0 -1
- package/dist/canvas/components/JsonTree/clipboard.js +0 -29
- package/dist/canvas/components/JsonTree/leafEditTypes.cjs +0 -74
- package/dist/canvas/components/JsonTree/leafEditTypes.d.ts +0 -6
- package/dist/canvas/components/JsonTree/leafEditTypes.d.ts.map +0 -1
- package/dist/canvas/components/JsonTree/leafEditTypes.js +0 -34
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { cn } from "@uipath/apollo-wind";
|
|
3
|
-
import { useEffect, useRef, useState } from "react";
|
|
4
|
-
import { useSafeLingui } from "../../../i18n/index.js";
|
|
5
|
-
import { isNumericEdit, parseLeafValue, resolveLeafEditType } from "./leafEditTypes.js";
|
|
6
|
-
function JsonLeafValueEditor({ node, onCommit, onCancel, className }) {
|
|
7
|
-
const { _ } = useSafeLingui();
|
|
8
|
-
const editType = resolveLeafEditType(node.type, node.schema);
|
|
9
|
-
const initial = void 0 === node.value || null === node.value ? String(node.schema?.default ?? '') : String(node.value);
|
|
10
|
-
const [raw, setRaw] = useState(initial);
|
|
11
|
-
const cancelledRef = useRef(false);
|
|
12
|
-
const inputRef = useRef(null);
|
|
13
|
-
const invalid = void 0 === parseLeafValue(raw, editType);
|
|
14
|
-
useEffect(()=>{
|
|
15
|
-
inputRef.current?.focus();
|
|
16
|
-
}, []);
|
|
17
|
-
const commit = ()=>{
|
|
18
|
-
const parsed = parseLeafValue(raw, editType);
|
|
19
|
-
if (void 0 === parsed) return;
|
|
20
|
-
onCommit(parsed);
|
|
21
|
-
};
|
|
22
|
-
return /*#__PURE__*/ jsx("input", {
|
|
23
|
-
ref: inputRef,
|
|
24
|
-
type: "text",
|
|
25
|
-
value: raw,
|
|
26
|
-
inputMode: 'integer' === editType ? 'numeric' : 'number' === editType ? 'decimal' : void 0,
|
|
27
|
-
onChange: (e)=>setRaw(e.target.value),
|
|
28
|
-
onFocus: (e)=>e.target.select(),
|
|
29
|
-
onBlur: ()=>{
|
|
30
|
-
if (cancelledRef.current) {
|
|
31
|
-
cancelledRef.current = false;
|
|
32
|
-
return;
|
|
33
|
-
}
|
|
34
|
-
if (invalid) onCancel();
|
|
35
|
-
else commit();
|
|
36
|
-
},
|
|
37
|
-
onKeyDown: (e)=>{
|
|
38
|
-
if ('Enter' === e.key) commit();
|
|
39
|
-
if ('Escape' === e.key) {
|
|
40
|
-
e.preventDefault();
|
|
41
|
-
e.stopPropagation();
|
|
42
|
-
cancelledRef.current = true;
|
|
43
|
-
onCancel();
|
|
44
|
-
}
|
|
45
|
-
},
|
|
46
|
-
"aria-label": _({
|
|
47
|
-
id: 'canvas.json_value_panel.edit_value_of',
|
|
48
|
-
message: 'Edit value of {key}',
|
|
49
|
-
values: {
|
|
50
|
-
key: node.key
|
|
51
|
-
}
|
|
52
|
-
}),
|
|
53
|
-
"aria-invalid": invalid || void 0,
|
|
54
|
-
placeholder: isNumericEdit(editType) ? _({
|
|
55
|
-
id: 'canvas.json_value_panel.enter_number',
|
|
56
|
-
message: 'Enter a number'
|
|
57
|
-
}) : _({
|
|
58
|
-
id: 'canvas.json_value_panel.enter_value',
|
|
59
|
-
message: 'Enter a value'
|
|
60
|
-
}),
|
|
61
|
-
className: cn('min-w-0 flex-1 rounded bg-transparent font-mono text-xs text-foreground outline-none ring-1', invalid ? 'ring-error' : 'ring-brand', className)
|
|
62
|
-
});
|
|
63
|
-
}
|
|
64
|
-
export { JsonLeafValueEditor };
|
|
@@ -1,86 +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
|
-
JsonMultilineLeafEditor: ()=>JsonMultilineLeafEditor
|
|
28
|
-
});
|
|
29
|
-
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
30
|
-
const apollo_wind_namespaceObject = require("@uipath/apollo-wind");
|
|
31
|
-
const external_react_namespaceObject = require("react");
|
|
32
|
-
const index_cjs_namespaceObject = require("../../../i18n/index.cjs");
|
|
33
|
-
const external_EditorChrome_cjs_namespaceObject = require("./EditorChrome.cjs");
|
|
34
|
-
const external_leafEditTypes_cjs_namespaceObject = require("./leafEditTypes.cjs");
|
|
35
|
-
function JsonMultilineLeafEditor({ node, onCommit, onCancel, className }) {
|
|
36
|
-
const { _ } = (0, index_cjs_namespaceObject.useSafeLingui)();
|
|
37
|
-
const editType = (0, external_leafEditTypes_cjs_namespaceObject.resolveLeafEditType)(node.type, node.schema);
|
|
38
|
-
const initial = void 0 === node.value || null === node.value ? String(node.schema?.default ?? '') : String(node.value);
|
|
39
|
-
const [raw, setRaw] = (0, external_react_namespaceObject.useState)(initial);
|
|
40
|
-
const invalid = void 0 === (0, external_leafEditTypes_cjs_namespaceObject.parseLeafValue)(raw, editType);
|
|
41
|
-
const apply = ()=>{
|
|
42
|
-
const parsed = (0, external_leafEditTypes_cjs_namespaceObject.parseLeafValue)(raw, editType);
|
|
43
|
-
if (void 0 === parsed) return;
|
|
44
|
-
onCommit(parsed);
|
|
45
|
-
};
|
|
46
|
-
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
47
|
-
className: (0, apollo_wind_namespaceObject.cn)('flex flex-col gap-1.5', className),
|
|
48
|
-
children: [
|
|
49
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_EditorChrome_cjs_namespaceObject.EditorTextarea, {
|
|
50
|
-
value: raw,
|
|
51
|
-
onChange: setRaw,
|
|
52
|
-
onApply: apply,
|
|
53
|
-
onCancel: onCancel,
|
|
54
|
-
invalid: invalid,
|
|
55
|
-
rows: Math.min(10, Math.max(3, raw.split('\n').length + 1)),
|
|
56
|
-
ariaLabel: _({
|
|
57
|
-
id: 'canvas.json_value_panel.edit_value_of',
|
|
58
|
-
message: 'Edit value of {key}',
|
|
59
|
-
values: {
|
|
60
|
-
key: node.key
|
|
61
|
-
}
|
|
62
|
-
}),
|
|
63
|
-
placeholder: (0, external_leafEditTypes_cjs_namespaceObject.isNumericEdit)(editType) ? _({
|
|
64
|
-
id: 'canvas.json_value_panel.enter_number',
|
|
65
|
-
message: 'Enter a number'
|
|
66
|
-
}) : _({
|
|
67
|
-
id: 'canvas.json_value_panel.enter_value',
|
|
68
|
-
message: 'Enter a value'
|
|
69
|
-
}),
|
|
70
|
-
className: "whitespace-pre-wrap"
|
|
71
|
-
}),
|
|
72
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_EditorChrome_cjs_namespaceObject.EditorActions, {
|
|
73
|
-
onApply: apply,
|
|
74
|
-
onCancel: onCancel,
|
|
75
|
-
applyDisabled: invalid
|
|
76
|
-
})
|
|
77
|
-
]
|
|
78
|
-
});
|
|
79
|
-
}
|
|
80
|
-
exports.JsonMultilineLeafEditor = __webpack_exports__.JsonMultilineLeafEditor;
|
|
81
|
-
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
82
|
-
"JsonMultilineLeafEditor"
|
|
83
|
-
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
84
|
-
Object.defineProperty(exports, '__esModule', {
|
|
85
|
-
value: true
|
|
86
|
-
});
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { JsonTreeNode, JsonValue } from './JsonTree.types';
|
|
2
|
-
export interface JsonMultilineLeafEditorProps {
|
|
3
|
-
node: JsonTreeNode;
|
|
4
|
-
onCommit: (value: JsonValue) => void;
|
|
5
|
-
onCancel: () => void;
|
|
6
|
-
className?: string;
|
|
7
|
-
}
|
|
8
|
-
export declare function JsonMultilineLeafEditor({ node, onCommit, onCancel, className, }: JsonMultilineLeafEditorProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
-
//# sourceMappingURL=JsonMultilineLeafEditor.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"JsonMultilineLeafEditor.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/JsonTree/JsonMultilineLeafEditor.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAGhE,MAAM,WAAW,4BAA4B;IAC3C,IAAI,EAAE,YAAY,CAAC;IACnB,QAAQ,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,IAAI,CAAC;IACrC,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAOD,wBAAgB,uBAAuB,CAAC,EACtC,IAAI,EACJ,QAAQ,EACR,QAAQ,EACR,SAAS,GACV,EAAE,4BAA4B,2CA8C9B"}
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { cn } from "@uipath/apollo-wind";
|
|
3
|
-
import { useState } from "react";
|
|
4
|
-
import { useSafeLingui } from "../../../i18n/index.js";
|
|
5
|
-
import { EditorActions, EditorTextarea } from "./EditorChrome.js";
|
|
6
|
-
import { isNumericEdit, parseLeafValue, resolveLeafEditType } from "./leafEditTypes.js";
|
|
7
|
-
function JsonMultilineLeafEditor({ node, onCommit, onCancel, className }) {
|
|
8
|
-
const { _ } = useSafeLingui();
|
|
9
|
-
const editType = resolveLeafEditType(node.type, node.schema);
|
|
10
|
-
const initial = void 0 === node.value || null === node.value ? String(node.schema?.default ?? '') : String(node.value);
|
|
11
|
-
const [raw, setRaw] = useState(initial);
|
|
12
|
-
const invalid = void 0 === parseLeafValue(raw, editType);
|
|
13
|
-
const apply = ()=>{
|
|
14
|
-
const parsed = parseLeafValue(raw, editType);
|
|
15
|
-
if (void 0 === parsed) return;
|
|
16
|
-
onCommit(parsed);
|
|
17
|
-
};
|
|
18
|
-
return /*#__PURE__*/ jsxs("div", {
|
|
19
|
-
className: cn('flex flex-col gap-1.5', className),
|
|
20
|
-
children: [
|
|
21
|
-
/*#__PURE__*/ jsx(EditorTextarea, {
|
|
22
|
-
value: raw,
|
|
23
|
-
onChange: setRaw,
|
|
24
|
-
onApply: apply,
|
|
25
|
-
onCancel: onCancel,
|
|
26
|
-
invalid: invalid,
|
|
27
|
-
rows: Math.min(10, Math.max(3, raw.split('\n').length + 1)),
|
|
28
|
-
ariaLabel: _({
|
|
29
|
-
id: 'canvas.json_value_panel.edit_value_of',
|
|
30
|
-
message: 'Edit value of {key}',
|
|
31
|
-
values: {
|
|
32
|
-
key: node.key
|
|
33
|
-
}
|
|
34
|
-
}),
|
|
35
|
-
placeholder: isNumericEdit(editType) ? _({
|
|
36
|
-
id: 'canvas.json_value_panel.enter_number',
|
|
37
|
-
message: 'Enter a number'
|
|
38
|
-
}) : _({
|
|
39
|
-
id: 'canvas.json_value_panel.enter_value',
|
|
40
|
-
message: 'Enter a value'
|
|
41
|
-
}),
|
|
42
|
-
className: "whitespace-pre-wrap"
|
|
43
|
-
}),
|
|
44
|
-
/*#__PURE__*/ jsx(EditorActions, {
|
|
45
|
-
onApply: apply,
|
|
46
|
-
onCancel: onCancel,
|
|
47
|
-
applyDisabled: invalid
|
|
48
|
-
})
|
|
49
|
-
]
|
|
50
|
-
});
|
|
51
|
-
}
|
|
52
|
-
export { JsonMultilineLeafEditor };
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __webpack_require__ = {};
|
|
3
|
-
(()=>{
|
|
4
|
-
__webpack_require__.r = (exports1)=>{
|
|
5
|
-
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
6
|
-
value: 'Module'
|
|
7
|
-
});
|
|
8
|
-
Object.defineProperty(exports1, '__esModule', {
|
|
9
|
-
value: true
|
|
10
|
-
});
|
|
11
|
-
};
|
|
12
|
-
})();
|
|
13
|
-
var __webpack_exports__ = {};
|
|
14
|
-
__webpack_require__.r(__webpack_exports__);
|
|
15
|
-
for(var __rspack_i in __webpack_exports__)exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
16
|
-
Object.defineProperty(exports, '__esModule', {
|
|
17
|
-
value: true
|
|
18
|
-
});
|
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
import type { ComponentType, CSSProperties, MouseEvent, ReactNode } from 'react';
|
|
2
|
-
export type JsonValue = string | number | boolean | null | JsonValue[] | JsonObject;
|
|
3
|
-
export interface JsonObject {
|
|
4
|
-
[key: string]: JsonValue;
|
|
5
|
-
}
|
|
6
|
-
export type JsonContainer = JsonObject | JsonValue[];
|
|
7
|
-
export type JsonSchemaTypeName = 'string' | 'number' | 'integer' | 'boolean' | 'object' | 'array' | 'null';
|
|
8
|
-
export interface JsonSchema {
|
|
9
|
-
type?: JsonSchemaTypeName | JsonSchemaTypeName[];
|
|
10
|
-
title?: string;
|
|
11
|
-
description?: string;
|
|
12
|
-
format?: string;
|
|
13
|
-
enum?: Array<string | number | boolean | null>;
|
|
14
|
-
default?: JsonValue;
|
|
15
|
-
properties?: Record<string, JsonSchema>;
|
|
16
|
-
required?: string[];
|
|
17
|
-
items?: JsonSchema;
|
|
18
|
-
additionalProperties?: boolean | JsonSchema;
|
|
19
|
-
}
|
|
20
|
-
export type JsonTreeNodeType = 'string' | 'number' | 'boolean' | 'object' | 'array' | 'null';
|
|
21
|
-
export type PathSegment = string | number;
|
|
22
|
-
export interface JsonTreeNode {
|
|
23
|
-
key: string;
|
|
24
|
-
path: string;
|
|
25
|
-
segments: PathSegment[];
|
|
26
|
-
type: JsonTreeNodeType;
|
|
27
|
-
value?: JsonValue;
|
|
28
|
-
schema?: JsonSchema;
|
|
29
|
-
required?: boolean;
|
|
30
|
-
children?: JsonTreeNode[];
|
|
31
|
-
isArrayItemTemplate?: boolean;
|
|
32
|
-
}
|
|
33
|
-
export interface JsonTreeFilterOption {
|
|
34
|
-
id: string;
|
|
35
|
-
label: string;
|
|
36
|
-
predicate: (node: JsonTreeNode) => boolean;
|
|
37
|
-
count?: number;
|
|
38
|
-
}
|
|
39
|
-
export type NodeDecorationTone = 'neutral' | 'info' | 'warning' | 'error';
|
|
40
|
-
export type DeriveTypeIcon = (node: JsonTreeNode) => ReactNode;
|
|
41
|
-
export interface NodeDecorationChip {
|
|
42
|
-
label?: string;
|
|
43
|
-
icon?: ReactNode;
|
|
44
|
-
tooltip?: string;
|
|
45
|
-
tone?: NodeDecorationTone;
|
|
46
|
-
}
|
|
47
|
-
export interface NodeDecorationBadge {
|
|
48
|
-
icon?: ReactNode;
|
|
49
|
-
className?: string;
|
|
50
|
-
}
|
|
51
|
-
export interface NodeDecoration {
|
|
52
|
-
label?: string;
|
|
53
|
-
sublabel?: string;
|
|
54
|
-
badge?: NodeDecorationBadge;
|
|
55
|
-
chip?: NodeDecorationChip;
|
|
56
|
-
hideCount?: boolean;
|
|
57
|
-
}
|
|
58
|
-
export interface RenderValueContext {
|
|
59
|
-
readOnly: boolean;
|
|
60
|
-
commit: (value: JsonValue) => void;
|
|
61
|
-
clear: () => void;
|
|
62
|
-
}
|
|
63
|
-
export type RenderValueCell = (node: JsonTreeNode, ctx: RenderValueContext) => ReactNode;
|
|
64
|
-
export interface NodeAction {
|
|
65
|
-
id: string;
|
|
66
|
-
icon: ReactNode;
|
|
67
|
-
label: string;
|
|
68
|
-
tooltip?: string;
|
|
69
|
-
onSelect: (node: JsonTreeNode) => void;
|
|
70
|
-
active?: boolean;
|
|
71
|
-
disabled?: boolean;
|
|
72
|
-
tone?: NodeDecorationTone;
|
|
73
|
-
}
|
|
74
|
-
export interface NodeActionContext {
|
|
75
|
-
readOnly: boolean;
|
|
76
|
-
defaultActions: NodeAction[];
|
|
77
|
-
commit: (value: JsonValue) => void;
|
|
78
|
-
clear: () => void;
|
|
79
|
-
}
|
|
80
|
-
export type NodeActionsResolver = (node: JsonTreeNode, ctx: NodeActionContext) => NodeAction[] | undefined;
|
|
81
|
-
export interface CopyEvent {
|
|
82
|
-
kind: 'path' | 'value';
|
|
83
|
-
path: string;
|
|
84
|
-
text: string;
|
|
85
|
-
}
|
|
86
|
-
export interface JsonTreeChange {
|
|
87
|
-
path: string;
|
|
88
|
-
segments: PathSegment[];
|
|
89
|
-
value?: JsonValue;
|
|
90
|
-
previous?: JsonValue;
|
|
91
|
-
}
|
|
92
|
-
export interface JsonTreeRowWrapperProps {
|
|
93
|
-
node: JsonTreeNode;
|
|
94
|
-
className?: string;
|
|
95
|
-
style?: CSSProperties;
|
|
96
|
-
onClick?: (event: MouseEvent) => void;
|
|
97
|
-
children: ReactNode;
|
|
98
|
-
}
|
|
99
|
-
export type JsonTreeRowWrapper = ComponentType<JsonTreeRowWrapperProps>;
|
|
100
|
-
export interface JsonCodeEditorRenderProps {
|
|
101
|
-
value: string;
|
|
102
|
-
onChange: (value: string) => void;
|
|
103
|
-
onApply: () => void;
|
|
104
|
-
onCancel: () => void;
|
|
105
|
-
invalid: boolean;
|
|
106
|
-
language: 'json';
|
|
107
|
-
autoFocus: boolean;
|
|
108
|
-
}
|
|
109
|
-
export type RenderCodeEditor = (props: JsonCodeEditorRenderProps) => ReactNode;
|
|
110
|
-
//# sourceMappingURL=JsonTree.types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"JsonTree.types.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/JsonTree/JsonTree.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,aAAa,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGjF,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,GAAG,SAAS,EAAE,GAAG,UAA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