@uipath/apollo-wind 2.60.1 → 2.62.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/components/forms/field-actions.cjs +181 -0
- package/dist/components/forms/field-actions.d.ts +131 -0
- package/dist/components/forms/field-actions.js +129 -0
- package/dist/components/forms/field-control.cjs +415 -0
- package/dist/components/forms/field-control.d.ts +52 -0
- package/dist/components/forms/field-control.js +372 -0
- package/dist/components/forms/field-renderer.cjs +77 -420
- package/dist/components/forms/field-renderer.d.ts +2 -3
- package/dist/components/forms/field-renderer.js +78 -421
- package/dist/components/forms/form-designer.cjs +7 -1
- package/dist/components/forms/form-designer.js +7 -1
- package/dist/components/forms/form-schema.d.ts +121 -2
- package/dist/components/forms/form-strings.cjs +67 -0
- package/dist/components/forms/form-strings.d.ts +30 -0
- package/dist/components/forms/form-strings.js +30 -0
- package/dist/components/forms/index.cjs +53 -9
- package/dist/components/forms/index.d.ts +6 -1
- package/dist/components/forms/index.js +6 -1
- package/dist/components/forms/literal-value-context.cjs +37 -0
- package/dist/components/forms/literal-value-context.d.ts +5 -0
- package/dist/components/forms/literal-value-context.js +3 -0
- package/dist/components/forms/metadata-form.cjs +100 -21
- package/dist/components/forms/metadata-form.d.ts +5 -0
- package/dist/components/forms/metadata-form.js +101 -22
- package/dist/components/forms/mode-aware-field.cjs +589 -0
- package/dist/components/forms/mode-aware-field.d.ts +15 -0
- package/dist/components/forms/mode-aware-field.js +555 -0
- package/dist/components/forms/opaque-value.cjs +44 -0
- package/dist/components/forms/opaque-value.d.ts +7 -0
- package/dist/components/forms/opaque-value.js +7 -0
- package/dist/components/forms/rules-engine.cjs +13 -0
- package/dist/components/forms/rules-engine.js +13 -0
- package/dist/components/forms/schema-serializer.cjs +8 -0
- package/dist/components/forms/schema-serializer.js +8 -0
- package/dist/components/forms/string-list-field.cjs +36 -18
- package/dist/components/forms/string-list-field.d.ts +6 -0
- package/dist/components/forms/string-list-field.js +35 -20
- package/dist/components/forms/validation-converter.cjs +32 -2
- package/dist/components/forms/validation-converter.d.ts +17 -1
- package/dist/components/forms/validation-converter.js +30 -3
- package/dist/components/forms/value-modes.cjs +253 -0
- package/dist/components/forms/value-modes.d.ts +236 -0
- package/dist/components/forms/value-modes.js +180 -0
- package/dist/components/ui/avatar.d.ts +1 -1
- package/dist/components/ui/badge.d.ts +1 -1
- package/dist/components/ui/boolean-radio-group.cjs +114 -0
- package/dist/components/ui/boolean-radio-group.d.ts +24 -0
- package/dist/components/ui/boolean-radio-group.js +77 -0
- package/dist/components/ui/button.d.ts +2 -2
- package/dist/components/ui/checkbox.cjs +10 -5
- package/dist/components/ui/checkbox.js +12 -7
- package/dist/components/ui/command.d.ts +7 -7
- package/dist/components/ui/field-addons/field-menu.cjs +1 -0
- package/dist/components/ui/field-addons/field-menu.d.ts +2 -0
- package/dist/components/ui/field-addons/field-menu.js +1 -0
- package/dist/components/ui/field-addons/index.cjs +4 -0
- package/dist/components/ui/field-addons/index.d.ts +1 -0
- package/dist/components/ui/field-addons/index.js +2 -1
- package/dist/components/ui/field-addons/value-mode-strings.cjs +7 -1
- package/dist/components/ui/field-addons/value-mode-strings.d.ts +9 -0
- package/dist/components/ui/field-addons/value-mode-strings.js +7 -1
- package/dist/components/ui/field-addons/value-mode-switch-dialog.cjs +73 -0
- package/dist/components/ui/field-addons/value-mode-switch-dialog.d.ts +16 -0
- package/dist/components/ui/field-addons/value-mode-switch-dialog.js +39 -0
- package/dist/components/ui/form-field.cjs +2 -1
- package/dist/components/ui/form-field.d.ts +2 -0
- package/dist/components/ui/form-field.js +2 -1
- package/dist/components/ui/index.cjs +237 -193
- package/dist/components/ui/index.d.ts +4 -0
- package/dist/components/ui/index.js +4 -0
- package/dist/components/ui/input-group.cjs +6 -3
- package/dist/components/ui/input-group.d.ts +6 -5
- package/dist/components/ui/input-group.js +6 -3
- package/dist/components/ui/json-tree-view/DecorationChip.cjs +81 -0
- package/dist/components/ui/json-tree-view/DecorationChip.d.ts +4 -0
- package/dist/components/ui/json-tree-view/DecorationChip.js +47 -0
- package/dist/components/ui/json-tree-view/EditorChrome.cjs +88 -0
- package/dist/components/ui/json-tree-view/EditorChrome.d.ts +21 -0
- package/dist/components/ui/json-tree-view/EditorChrome.js +51 -0
- package/dist/components/ui/json-tree-view/JsonContainerEditor.cjs +95 -0
- package/dist/components/ui/json-tree-view/JsonContainerEditor.d.ts +18 -0
- package/dist/components/ui/json-tree-view/JsonContainerEditor.js +61 -0
- package/dist/components/ui/json-tree-view/JsonLeafValueEditor.cjs +86 -0
- package/dist/components/ui/json-tree-view/JsonLeafValueEditor.d.ts +12 -0
- package/dist/components/ui/json-tree-view/JsonLeafValueEditor.js +52 -0
- package/dist/components/ui/json-tree-view/JsonMultilineLeafEditor.cjs +74 -0
- package/dist/components/ui/json-tree-view/JsonMultilineLeafEditor.d.ts +13 -0
- package/dist/components/ui/json-tree-view/JsonMultilineLeafEditor.js +40 -0
- package/dist/components/ui/json-tree-view/JsonTree.cjs +253 -0
- package/dist/components/ui/json-tree-view/JsonTree.d.ts +81 -0
- package/dist/components/ui/json-tree-view/JsonTree.js +219 -0
- package/dist/components/ui/json-tree-view/JsonTree.types.cjs +18 -0
- package/dist/components/ui/json-tree-view/JsonTree.types.d.ts +253 -0
- package/dist/components/ui/json-tree-view/JsonTree.types.js +0 -0
- package/dist/components/ui/json-tree-view/JsonTreeRow.cjs +284 -0
- package/dist/components/ui/json-tree-view/JsonTreeRow.d.ts +50 -0
- package/dist/components/ui/json-tree-view/JsonTreeRow.js +244 -0
- package/dist/components/ui/json-tree-view/JsonTreeToolbar.cjs +209 -0
- package/dist/components/ui/json-tree-view/JsonTreeToolbar.d.ts +35 -0
- package/dist/components/ui/json-tree-view/JsonTreeToolbar.js +175 -0
- package/dist/components/ui/json-tree-view/JsonTreeTooltip.cjs +84 -0
- package/dist/components/ui/json-tree-view/JsonTreeTooltip.d.ts +21 -0
- package/dist/components/ui/json-tree-view/JsonTreeTooltip.js +47 -0
- package/dist/components/ui/json-tree-view/JsonTypeBadge.cjs +70 -0
- package/dist/components/ui/json-tree-view/JsonTypeBadge.d.ts +17 -0
- package/dist/components/ui/json-tree-view/JsonTypeBadge.js +36 -0
- package/dist/components/ui/json-tree-view/NodeKey.cjs +77 -0
- package/dist/components/ui/json-tree-view/NodeKey.d.ts +16 -0
- package/dist/components/ui/json-tree-view/NodeKey.js +43 -0
- package/dist/components/ui/json-tree-view/RowActions.cjs +120 -0
- package/dist/components/ui/json-tree-view/RowActions.d.ts +15 -0
- package/dist/components/ui/json-tree-view/RowActions.js +86 -0
- package/dist/components/ui/json-tree-view/ScalarValueCell.cjs +112 -0
- package/dist/components/ui/json-tree-view/ScalarValueCell.d.ts +18 -0
- package/dist/components/ui/json-tree-view/ScalarValueCell.js +75 -0
- package/dist/components/ui/json-tree-view/buildJsonTree.cjs +324 -0
- package/dist/components/ui/json-tree-view/buildJsonTree.d.ts +75 -0
- package/dist/components/ui/json-tree-view/buildJsonTree.js +257 -0
- package/dist/components/ui/json-tree-view/clipboard.cjs +63 -0
- package/dist/components/ui/json-tree-view/clipboard.d.ts +6 -0
- package/dist/components/ui/json-tree-view/clipboard.js +29 -0
- package/dist/components/ui/json-tree-view/index.cjs +175 -0
- package/dist/components/ui/json-tree-view/index.d.ts +10 -0
- package/dist/components/ui/json-tree-view/index.js +11 -0
- package/dist/components/ui/json-tree-view/leafEditTypes.cjs +74 -0
- package/dist/components/ui/json-tree-view/leafEditTypes.d.ts +12 -0
- package/dist/components/ui/json-tree-view/leafEditTypes.js +34 -0
- package/dist/components/ui/json-tree-view/strings.cjs +122 -0
- package/dist/components/ui/json-tree-view/strings.d.ts +65 -0
- package/dist/components/ui/json-tree-view/strings.js +79 -0
- package/dist/components/ui/prompt-value-control.cjs +70 -0
- package/dist/components/ui/prompt-value-control.d.ts +28 -0
- package/dist/components/ui/prompt-value-control.js +36 -0
- package/dist/components/ui/sheet.d.ts +1 -1
- package/dist/components/ui/spinner.d.ts +1 -1
- package/dist/components/ui/switch.d.ts +2 -2
- package/dist/components/ui/textarea.cjs +1 -1
- package/dist/components/ui/textarea.js +1 -1
- package/dist/components/ui/toggle-group.d.ts +2 -2
- package/dist/components/ui/toggle.d.ts +2 -2
- package/dist/components/ui/variable-value-control.cjs +98 -0
- package/dist/components/ui/variable-value-control.d.ts +35 -0
- package/dist/components/ui/variable-value-control.js +64 -0
- package/dist/index.cjs +145 -16
- package/dist/index.d.ts +21 -3
- package/dist/index.js +11 -2
- package/dist/lib/index.cjs +4 -1
- package/dist/lib/index.d.ts +1 -1
- package/dist/lib/index.js +2 -2
- package/dist/lib/utils.cjs +21 -1
- package/dist/lib/utils.d.ts +8 -0
- package/dist/lib/utils.js +18 -1
- package/dist/styles.css +279 -0
- package/package.json +1 -1
|
@@ -4,6 +4,7 @@ export * from './alert-dialog';
|
|
|
4
4
|
export * from './aspect-ratio';
|
|
5
5
|
export * from './avatar';
|
|
6
6
|
export * from './badge';
|
|
7
|
+
export * from './boolean-radio-group';
|
|
7
8
|
export * from './breadcrumb';
|
|
8
9
|
export * from './button';
|
|
9
10
|
export * from './button-group';
|
|
@@ -30,6 +31,7 @@ export * from './form-field';
|
|
|
30
31
|
export * from './hover-card';
|
|
31
32
|
export * from './info-tooltip';
|
|
32
33
|
export * from './input';
|
|
34
|
+
export * from './json-tree-view';
|
|
33
35
|
export * from './input-group';
|
|
34
36
|
export * from './label';
|
|
35
37
|
export * from './layout';
|
|
@@ -41,6 +43,7 @@ export * from './popover';
|
|
|
41
43
|
export * from './portal-container';
|
|
42
44
|
export * from './progress';
|
|
43
45
|
export * from './prompt-editor';
|
|
46
|
+
export * from './prompt-value-control';
|
|
44
47
|
export * from './quick-form-field';
|
|
45
48
|
export * from './radio-group';
|
|
46
49
|
export * from './resizable';
|
|
@@ -65,3 +68,4 @@ export * from './tooltip';
|
|
|
65
68
|
export type { FileTreeViewIconMap, FileTreeViewItem, FileTreeViewItemAction, FileTreeViewMenuItem, FileTreeViewProps, FileTreeViewSelectionMode, TreeViewIconMap, TreeViewItem, TreeViewItemAction, TreeViewMenuItem, TreeViewProps, TreeViewSelectionMode, } from './tree-view';
|
|
66
69
|
export { default as FileTreeView, TreeView } from './tree-view';
|
|
67
70
|
export * from './variable-picker';
|
|
71
|
+
export * from './variable-value-control';
|
|
@@ -5,6 +5,7 @@ export * from "./alert-dialog.js";
|
|
|
5
5
|
export * from "./aspect-ratio.js";
|
|
6
6
|
export * from "./avatar.js";
|
|
7
7
|
export * from "./badge.js";
|
|
8
|
+
export * from "./boolean-radio-group.js";
|
|
8
9
|
export * from "./breadcrumb.js";
|
|
9
10
|
export * from "./button.js";
|
|
10
11
|
export * from "./button-group.js";
|
|
@@ -31,6 +32,7 @@ export * from "./form-field.js";
|
|
|
31
32
|
export * from "./hover-card.js";
|
|
32
33
|
export * from "./info-tooltip.js";
|
|
33
34
|
export * from "./input.js";
|
|
35
|
+
export * from "./json-tree-view/index.js";
|
|
34
36
|
export * from "./input-group.js";
|
|
35
37
|
export * from "./label.js";
|
|
36
38
|
export * from "./layout/index.js";
|
|
@@ -42,6 +44,7 @@ export * from "./popover.js";
|
|
|
42
44
|
export * from "./portal-container.js";
|
|
43
45
|
export * from "./progress.js";
|
|
44
46
|
export * from "./prompt-editor/index.js";
|
|
47
|
+
export * from "./prompt-value-control.js";
|
|
45
48
|
export * from "./quick-form-field/index.js";
|
|
46
49
|
export * from "./radio-group.js";
|
|
47
50
|
export * from "./resizable.js";
|
|
@@ -64,4 +67,5 @@ export * from "./toggle.js";
|
|
|
64
67
|
export * from "./toggle-group.js";
|
|
65
68
|
export * from "./tooltip.js";
|
|
66
69
|
export * from "./variable-picker/index.js";
|
|
70
|
+
export * from "./variable-value-control.js";
|
|
67
71
|
export { tree_view as FileTreeView, TreeView };
|
|
@@ -55,12 +55,14 @@ const ROW_LAYOUTS = [
|
|
|
55
55
|
];
|
|
56
56
|
const FILLED = [
|
|
57
57
|
'default',
|
|
58
|
-
'ghost'
|
|
58
|
+
'ghost',
|
|
59
|
+
'agent'
|
|
59
60
|
];
|
|
60
61
|
const BOXED = [
|
|
61
62
|
'default',
|
|
62
63
|
'ghost',
|
|
63
|
-
'outline'
|
|
64
|
+
'outline',
|
|
65
|
+
'agent'
|
|
64
66
|
];
|
|
65
67
|
const inputGroupVariants = (0, external_class_variance_authority_namespaceObject.cva)([
|
|
66
68
|
'group/input-group relative flex w-full items-center gap-2 transition-colors has-[>textarea]:h-auto has-[>textarea]:items-start',
|
|
@@ -81,7 +83,8 @@ const inputGroupVariants = (0, external_class_variance_authority_namespaceObject
|
|
|
81
83
|
default: 'border border-input bg-transparent future:border-0 future:bg-surface-overlay',
|
|
82
84
|
ghost: 'border-0 bg-surface-overlay',
|
|
83
85
|
outline: 'border border-input bg-transparent shadow-none future:border future:border-input future:bg-transparent future:has-[[data-slot][aria-invalid=true]]:border-error',
|
|
84
|
-
none: 'border-0 bg-transparent shadow-none future:bg-transparent'
|
|
86
|
+
none: 'border-0 bg-transparent shadow-none future:bg-transparent',
|
|
87
|
+
agent: 'border border-gradient-agent-start/60 bg-linear-to-r from-gradient-agent-start/25 to-gradient-agent-end/25 future:border-0 future:inset-ring-1 future:inset-ring-gradient-agent-start/60 future:bg-linear-to-r future:from-gradient-agent-start/25 future:to-gradient-agent-end/25'
|
|
85
88
|
},
|
|
86
89
|
invalid: {
|
|
87
90
|
true: '',
|
|
@@ -9,9 +9,10 @@ export interface InputGroupProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
9
9
|
/**
|
|
10
10
|
* `default` paints the field box, `ghost` a borderless fill, `outline` a border with no fill and
|
|
11
11
|
* no ring, and `none` nothing at all while keeping the row's height and right-hand padding, so an
|
|
12
|
-
* unboxed control still lines up with the boxed fields around it.
|
|
12
|
+
* unboxed control still lines up with the boxed fields around it. `agent` tints the box for a
|
|
13
|
+
* value an agent fills in, such as a prompt.
|
|
13
14
|
*/
|
|
14
|
-
variant?: 'default' | 'ghost' | 'outline' | 'none';
|
|
15
|
+
variant?: 'default' | 'ghost' | 'outline' | 'none' | 'agent';
|
|
15
16
|
size?: 'default' | 'xs';
|
|
16
17
|
/**
|
|
17
18
|
* `row` is one control row. `grow` keeps that as a minimum and lets the content grow it. `block`
|
|
@@ -30,15 +31,15 @@ export interface InputGroupProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
30
31
|
}
|
|
31
32
|
declare const inputGroupVariants: (props?: ({
|
|
32
33
|
size?: "default" | "xs" | null | undefined;
|
|
33
|
-
layout?: "
|
|
34
|
-
variant?: "default" | "outline" | "ghost" | "none" | null | undefined;
|
|
34
|
+
layout?: "row" | "fill" | "grow" | "block" | null | undefined;
|
|
35
|
+
variant?: "default" | "outline" | "ghost" | "none" | "agent" | null | undefined;
|
|
35
36
|
invalid?: boolean | null | undefined;
|
|
36
37
|
disabled?: boolean | null | undefined;
|
|
37
38
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
38
39
|
declare const InputGroup: React.ForwardRefExoticComponent<InputGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
39
40
|
declare const inputGroupAddonVariants: (props?: ({
|
|
40
41
|
align?: "inline-end" | "inline-start" | null | undefined;
|
|
41
|
-
layout?: "
|
|
42
|
+
layout?: "row" | "fill" | "grow" | "block" | null | undefined;
|
|
42
43
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
43
44
|
export interface InputGroupAddonProps extends React.HTMLAttributes<HTMLDivElement>, Pick<VariantProps<typeof inputGroupAddonVariants>, 'align'> {
|
|
44
45
|
/**
|
|
@@ -16,12 +16,14 @@ const ROW_LAYOUTS = [
|
|
|
16
16
|
];
|
|
17
17
|
const FILLED = [
|
|
18
18
|
'default',
|
|
19
|
-
'ghost'
|
|
19
|
+
'ghost',
|
|
20
|
+
'agent'
|
|
20
21
|
];
|
|
21
22
|
const BOXED = [
|
|
22
23
|
'default',
|
|
23
24
|
'ghost',
|
|
24
|
-
'outline'
|
|
25
|
+
'outline',
|
|
26
|
+
'agent'
|
|
25
27
|
];
|
|
26
28
|
const inputGroupVariants = cva([
|
|
27
29
|
'group/input-group relative flex w-full items-center gap-2 transition-colors has-[>textarea]:h-auto has-[>textarea]:items-start',
|
|
@@ -42,7 +44,8 @@ const inputGroupVariants = cva([
|
|
|
42
44
|
default: 'border border-input bg-transparent future:border-0 future:bg-surface-overlay',
|
|
43
45
|
ghost: 'border-0 bg-surface-overlay',
|
|
44
46
|
outline: 'border border-input bg-transparent shadow-none future:border future:border-input future:bg-transparent future:has-[[data-slot][aria-invalid=true]]:border-error',
|
|
45
|
-
none: 'border-0 bg-transparent shadow-none future:bg-transparent'
|
|
47
|
+
none: 'border-0 bg-transparent shadow-none future:bg-transparent',
|
|
48
|
+
agent: 'border border-gradient-agent-start/60 bg-linear-to-r from-gradient-agent-start/25 to-gradient-agent-end/25 future:border-0 future:inset-ring-1 future:inset-ring-gradient-agent-start/60 future:bg-linear-to-r future:from-gradient-agent-start/25 future:to-gradient-agent-end/25'
|
|
46
49
|
},
|
|
47
50
|
invalid: {
|
|
48
51
|
true: '',
|
|
@@ -0,0 +1,81 @@
|
|
|
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
|
+
DecorationChip: ()=>DecorationChip
|
|
28
|
+
});
|
|
29
|
+
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
30
|
+
const index_cjs_namespaceObject = require("../../../lib/index.cjs");
|
|
31
|
+
const external_JsonTreeTooltip_cjs_namespaceObject = require("./JsonTreeTooltip.cjs");
|
|
32
|
+
const CHIP_TONE_TEXT_CLASS = {
|
|
33
|
+
neutral: 'text-foreground-subtle',
|
|
34
|
+
info: 'text-info',
|
|
35
|
+
warning: 'text-warning',
|
|
36
|
+
error: 'text-error'
|
|
37
|
+
};
|
|
38
|
+
const CHIP_TONE_BORDER_CLASS = {
|
|
39
|
+
neutral: 'border-border',
|
|
40
|
+
info: 'border-info/40',
|
|
41
|
+
warning: 'border-warning/40',
|
|
42
|
+
error: 'border-error/40'
|
|
43
|
+
};
|
|
44
|
+
function DecorationChip({ decoration }) {
|
|
45
|
+
const chip = decoration?.chip;
|
|
46
|
+
if (!chip || null == chip.label && null == chip.icon) return null;
|
|
47
|
+
const tone = chip.tone ?? 'neutral';
|
|
48
|
+
const content = chip.label ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("span", {
|
|
49
|
+
className: (0, index_cjs_namespaceObject.cn)('flex min-w-0 items-center gap-1 truncate rounded-full border px-1.5 py-px text-[10px] font-medium leading-none', CHIP_TONE_BORDER_CLASS[tone], CHIP_TONE_TEXT_CLASS[tone]),
|
|
50
|
+
children: [
|
|
51
|
+
chip.icon && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
|
|
52
|
+
className: "shrink-0",
|
|
53
|
+
children: chip.icon
|
|
54
|
+
}),
|
|
55
|
+
chip.label
|
|
56
|
+
]
|
|
57
|
+
}) : /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
|
|
58
|
+
className: (0, index_cjs_namespaceObject.cn)('flex shrink-0 items-center', CHIP_TONE_TEXT_CLASS[tone]),
|
|
59
|
+
...chip.tooltip ? {
|
|
60
|
+
role: 'img',
|
|
61
|
+
'aria-label': chip.tooltip
|
|
62
|
+
} : {},
|
|
63
|
+
children: chip.icon
|
|
64
|
+
});
|
|
65
|
+
if (!chip.tooltip) return content;
|
|
66
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_JsonTreeTooltip_cjs_namespaceObject.JsonTreeTooltip, {
|
|
67
|
+
placement: "top",
|
|
68
|
+
content: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
|
|
69
|
+
className: "text-xs",
|
|
70
|
+
children: chip.tooltip
|
|
71
|
+
}),
|
|
72
|
+
children: content
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
exports.DecorationChip = __webpack_exports__.DecorationChip;
|
|
76
|
+
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
77
|
+
"DecorationChip"
|
|
78
|
+
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
79
|
+
Object.defineProperty(exports, '__esModule', {
|
|
80
|
+
value: true
|
|
81
|
+
});
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from "../../../lib/index.js";
|
|
3
|
+
import { JsonTreeTooltip } from "./JsonTreeTooltip.js";
|
|
4
|
+
const CHIP_TONE_TEXT_CLASS = {
|
|
5
|
+
neutral: 'text-foreground-subtle',
|
|
6
|
+
info: 'text-info',
|
|
7
|
+
warning: 'text-warning',
|
|
8
|
+
error: 'text-error'
|
|
9
|
+
};
|
|
10
|
+
const CHIP_TONE_BORDER_CLASS = {
|
|
11
|
+
neutral: 'border-border',
|
|
12
|
+
info: 'border-info/40',
|
|
13
|
+
warning: 'border-warning/40',
|
|
14
|
+
error: 'border-error/40'
|
|
15
|
+
};
|
|
16
|
+
function DecorationChip({ decoration }) {
|
|
17
|
+
const chip = decoration?.chip;
|
|
18
|
+
if (!chip || null == chip.label && null == chip.icon) return null;
|
|
19
|
+
const tone = chip.tone ?? 'neutral';
|
|
20
|
+
const content = chip.label ? /*#__PURE__*/ jsxs("span", {
|
|
21
|
+
className: cn('flex min-w-0 items-center gap-1 truncate rounded-full border px-1.5 py-px text-[10px] font-medium leading-none', CHIP_TONE_BORDER_CLASS[tone], CHIP_TONE_TEXT_CLASS[tone]),
|
|
22
|
+
children: [
|
|
23
|
+
chip.icon && /*#__PURE__*/ jsx("span", {
|
|
24
|
+
className: "shrink-0",
|
|
25
|
+
children: chip.icon
|
|
26
|
+
}),
|
|
27
|
+
chip.label
|
|
28
|
+
]
|
|
29
|
+
}) : /*#__PURE__*/ jsx("span", {
|
|
30
|
+
className: cn('flex shrink-0 items-center', CHIP_TONE_TEXT_CLASS[tone]),
|
|
31
|
+
...chip.tooltip ? {
|
|
32
|
+
role: 'img',
|
|
33
|
+
'aria-label': chip.tooltip
|
|
34
|
+
} : {},
|
|
35
|
+
children: chip.icon
|
|
36
|
+
});
|
|
37
|
+
if (!chip.tooltip) return content;
|
|
38
|
+
return /*#__PURE__*/ jsx(JsonTreeTooltip, {
|
|
39
|
+
placement: "top",
|
|
40
|
+
content: /*#__PURE__*/ jsx("span", {
|
|
41
|
+
className: "text-xs",
|
|
42
|
+
children: chip.tooltip
|
|
43
|
+
}),
|
|
44
|
+
children: content
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
export { DecorationChip };
|
|
@@ -0,0 +1,88 @@
|
|
|
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
|
+
EditorActions: ()=>EditorActions,
|
|
28
|
+
EditorTextarea: ()=>EditorTextarea
|
|
29
|
+
});
|
|
30
|
+
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
31
|
+
const external_button_cjs_namespaceObject = require("../button.cjs");
|
|
32
|
+
const index_cjs_namespaceObject = require("../../../lib/index.cjs");
|
|
33
|
+
const external_react_namespaceObject = require("react");
|
|
34
|
+
const external_strings_cjs_namespaceObject = require("./strings.cjs");
|
|
35
|
+
function EditorActions({ onApply, onCancel, applyDisabled = false }) {
|
|
36
|
+
const strings = (0, external_strings_cjs_namespaceObject.useJsonTreeViewStrings)();
|
|
37
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
38
|
+
className: "flex items-center gap-1.5",
|
|
39
|
+
children: [
|
|
40
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_button_cjs_namespaceObject.Button, {
|
|
41
|
+
size: "3xs",
|
|
42
|
+
onClick: onApply,
|
|
43
|
+
disabled: applyDisabled,
|
|
44
|
+
children: strings.apply
|
|
45
|
+
}),
|
|
46
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_button_cjs_namespaceObject.Button, {
|
|
47
|
+
size: "3xs",
|
|
48
|
+
variant: "ghost",
|
|
49
|
+
onClick: onCancel,
|
|
50
|
+
children: strings.cancel
|
|
51
|
+
})
|
|
52
|
+
]
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
function EditorTextarea({ value, onChange, onApply, onCancel, invalid, rows, ariaLabel, placeholder, className }) {
|
|
56
|
+
const textareaRef = (0, external_react_namespaceObject.useRef)(null);
|
|
57
|
+
(0, external_react_namespaceObject.useEffect)(()=>{
|
|
58
|
+
textareaRef.current?.focus();
|
|
59
|
+
}, []);
|
|
60
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("textarea", {
|
|
61
|
+
ref: textareaRef,
|
|
62
|
+
value: value,
|
|
63
|
+
onChange: (e)=>onChange(e.target.value),
|
|
64
|
+
onKeyDown: (e)=>{
|
|
65
|
+
if ('Escape' === e.key) {
|
|
66
|
+
e.preventDefault();
|
|
67
|
+
e.stopPropagation();
|
|
68
|
+
onCancel();
|
|
69
|
+
}
|
|
70
|
+
if ('Enter' === e.key && (e.metaKey || e.ctrlKey)) onApply();
|
|
71
|
+
},
|
|
72
|
+
rows: rows,
|
|
73
|
+
spellCheck: false,
|
|
74
|
+
"aria-label": ariaLabel,
|
|
75
|
+
"aria-invalid": invalid || void 0,
|
|
76
|
+
placeholder: placeholder,
|
|
77
|
+
className: (0, index_cjs_namespaceObject.cn)('w-full resize-y rounded-lg border bg-surface p-2 font-mono text-xs leading-5 text-foreground outline-none', invalid ? 'border-error' : 'border-border-subtle focus:border-brand', className)
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
exports.EditorActions = __webpack_exports__.EditorActions;
|
|
81
|
+
exports.EditorTextarea = __webpack_exports__.EditorTextarea;
|
|
82
|
+
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
83
|
+
"EditorActions",
|
|
84
|
+
"EditorTextarea"
|
|
85
|
+
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
86
|
+
Object.defineProperty(exports, '__esModule', {
|
|
87
|
+
value: true
|
|
88
|
+
});
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/** Apply/Cancel row shared by the multiline editors. */
|
|
2
|
+
export declare function EditorActions({ onApply, onCancel, applyDisabled, }: {
|
|
3
|
+
onApply: () => void;
|
|
4
|
+
onCancel: () => void;
|
|
5
|
+
applyDisabled?: boolean;
|
|
6
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export interface EditorTextareaProps {
|
|
8
|
+
value: string;
|
|
9
|
+
onChange: (value: string) => void;
|
|
10
|
+
/** Bound to Ctrl/Cmd+Enter. */
|
|
11
|
+
onApply: () => void;
|
|
12
|
+
/** Bound to Escape (contained so a host dialog does not also close). */
|
|
13
|
+
onCancel: () => void;
|
|
14
|
+
invalid: boolean;
|
|
15
|
+
rows: number;
|
|
16
|
+
ariaLabel: string;
|
|
17
|
+
placeholder?: string;
|
|
18
|
+
className?: string;
|
|
19
|
+
}
|
|
20
|
+
/** Multiline editing surface shared by the leaf and container editors. */
|
|
21
|
+
export declare function EditorTextarea({ value, onChange, onApply, onCancel, invalid, rows, ariaLabel, placeholder, className, }: EditorTextareaProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Button } from "../button.js";
|
|
3
|
+
import { cn } from "../../../lib/index.js";
|
|
4
|
+
import { useEffect, useRef } from "react";
|
|
5
|
+
import { useJsonTreeViewStrings } from "./strings.js";
|
|
6
|
+
function EditorActions({ onApply, onCancel, applyDisabled = false }) {
|
|
7
|
+
const strings = useJsonTreeViewStrings();
|
|
8
|
+
return /*#__PURE__*/ jsxs("div", {
|
|
9
|
+
className: "flex items-center gap-1.5",
|
|
10
|
+
children: [
|
|
11
|
+
/*#__PURE__*/ jsx(Button, {
|
|
12
|
+
size: "3xs",
|
|
13
|
+
onClick: onApply,
|
|
14
|
+
disabled: applyDisabled,
|
|
15
|
+
children: strings.apply
|
|
16
|
+
}),
|
|
17
|
+
/*#__PURE__*/ jsx(Button, {
|
|
18
|
+
size: "3xs",
|
|
19
|
+
variant: "ghost",
|
|
20
|
+
onClick: onCancel,
|
|
21
|
+
children: strings.cancel
|
|
22
|
+
})
|
|
23
|
+
]
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
function EditorTextarea({ value, onChange, onApply, onCancel, invalid, rows, ariaLabel, placeholder, className }) {
|
|
27
|
+
const textareaRef = useRef(null);
|
|
28
|
+
useEffect(()=>{
|
|
29
|
+
textareaRef.current?.focus();
|
|
30
|
+
}, []);
|
|
31
|
+
return /*#__PURE__*/ jsx("textarea", {
|
|
32
|
+
ref: textareaRef,
|
|
33
|
+
value: value,
|
|
34
|
+
onChange: (e)=>onChange(e.target.value),
|
|
35
|
+
onKeyDown: (e)=>{
|
|
36
|
+
if ('Escape' === e.key) {
|
|
37
|
+
e.preventDefault();
|
|
38
|
+
e.stopPropagation();
|
|
39
|
+
onCancel();
|
|
40
|
+
}
|
|
41
|
+
if ('Enter' === e.key && (e.metaKey || e.ctrlKey)) onApply();
|
|
42
|
+
},
|
|
43
|
+
rows: rows,
|
|
44
|
+
spellCheck: false,
|
|
45
|
+
"aria-label": ariaLabel,
|
|
46
|
+
"aria-invalid": invalid || void 0,
|
|
47
|
+
placeholder: placeholder,
|
|
48
|
+
className: cn('w-full resize-y rounded-lg border bg-surface p-2 font-mono text-xs leading-5 text-foreground outline-none', invalid ? 'border-error' : 'border-border-subtle focus:border-brand', className)
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
export { EditorActions, EditorTextarea };
|
|
@@ -0,0 +1,95 @@
|
|
|
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
|
+
JsonContainerEditor: ()=>JsonContainerEditor
|
|
28
|
+
});
|
|
29
|
+
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
30
|
+
const external_react_namespaceObject = require("react");
|
|
31
|
+
const external_form_field_cjs_namespaceObject = require("../form-field.cjs");
|
|
32
|
+
const index_cjs_namespaceObject = require("../../../lib/index.cjs");
|
|
33
|
+
const external_EditorChrome_cjs_namespaceObject = require("./EditorChrome.cjs");
|
|
34
|
+
const external_strings_cjs_namespaceObject = require("./strings.cjs");
|
|
35
|
+
function isValidJson(raw) {
|
|
36
|
+
try {
|
|
37
|
+
JSON.parse(raw);
|
|
38
|
+
return true;
|
|
39
|
+
} catch {
|
|
40
|
+
return false;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
function JsonContainerEditor({ node, onCommit, onCancel, renderCodeEditor, className }) {
|
|
44
|
+
const strings = (0, external_strings_cjs_namespaceObject.useJsonTreeViewStrings)();
|
|
45
|
+
const initialValue = node.value ?? ('array' === node.type ? [] : {});
|
|
46
|
+
const [raw, setRaw] = (0, external_react_namespaceObject.useState)(()=>JSON.stringify(initialValue, null, 2));
|
|
47
|
+
const [error, setError] = (0, external_react_namespaceObject.useState)(null);
|
|
48
|
+
const handleChange = (value)=>{
|
|
49
|
+
setRaw(value);
|
|
50
|
+
setError(null);
|
|
51
|
+
};
|
|
52
|
+
const apply = ()=>{
|
|
53
|
+
try {
|
|
54
|
+
onCommit(JSON.parse(raw));
|
|
55
|
+
} catch (error) {
|
|
56
|
+
setError(error instanceof Error ? `${strings.invalidJson}: ${error.message}` : strings.invalidJson);
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
60
|
+
className: (0, index_cjs_namespaceObject.cn)('flex flex-col gap-1.5 [&>[data-slot=form-field-error]]:mt-0', className),
|
|
61
|
+
children: [
|
|
62
|
+
renderCodeEditor ? renderCodeEditor({
|
|
63
|
+
value: raw,
|
|
64
|
+
onChange: handleChange,
|
|
65
|
+
onApply: apply,
|
|
66
|
+
onCancel,
|
|
67
|
+
invalid: !isValidJson(raw),
|
|
68
|
+
language: 'json',
|
|
69
|
+
autoFocus: true
|
|
70
|
+
}) : /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_EditorChrome_cjs_namespaceObject.EditorTextarea, {
|
|
71
|
+
value: raw,
|
|
72
|
+
onChange: handleChange,
|
|
73
|
+
onApply: apply,
|
|
74
|
+
onCancel: onCancel,
|
|
75
|
+
invalid: !!error,
|
|
76
|
+
rows: Math.min(12, Math.max(3, raw.split('\n').length)),
|
|
77
|
+
ariaLabel: strings.editJsonOf(node.key)
|
|
78
|
+
}),
|
|
79
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_form_field_cjs_namespaceObject.FormFieldError, {
|
|
80
|
+
children: error
|
|
81
|
+
}),
|
|
82
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_EditorChrome_cjs_namespaceObject.EditorActions, {
|
|
83
|
+
onApply: apply,
|
|
84
|
+
onCancel: onCancel
|
|
85
|
+
})
|
|
86
|
+
]
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
exports.JsonContainerEditor = __webpack_exports__.JsonContainerEditor;
|
|
90
|
+
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
91
|
+
"JsonContainerEditor"
|
|
92
|
+
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
93
|
+
Object.defineProperty(exports, '__esModule', {
|
|
94
|
+
value: true
|
|
95
|
+
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { JsonTreeNode, JsonValue, RenderCodeEditor } from './JsonTree.types';
|
|
2
|
+
export interface JsonContainerEditorProps {
|
|
3
|
+
node: JsonTreeNode;
|
|
4
|
+
onCommit: (value: JsonValue) => void;
|
|
5
|
+
onCancel: () => void;
|
|
6
|
+
/**
|
|
7
|
+
* Renders the editing surface as a code editor instead of the plain
|
|
8
|
+
* textarea. The Apply/Cancel chrome and error message stay owned here.
|
|
9
|
+
*/
|
|
10
|
+
renderCodeEditor?: RenderCodeEditor;
|
|
11
|
+
className?: string;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Multiline JSON editor for object/array nodes. Applies with the Apply button
|
|
15
|
+
* or Ctrl/Cmd+Enter; Escape cancels. Parse errors block the commit. Consumers
|
|
16
|
+
* can swap the textarea for a real code editor via `renderCodeEditor`.
|
|
17
|
+
*/
|
|
18
|
+
export declare function JsonContainerEditor({ node, onCommit, onCancel, renderCodeEditor, className, }: JsonContainerEditorProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useState } from "react";
|
|
3
|
+
import { FormFieldError } from "../form-field.js";
|
|
4
|
+
import { cn } from "../../../lib/index.js";
|
|
5
|
+
import { EditorActions, EditorTextarea } from "./EditorChrome.js";
|
|
6
|
+
import { useJsonTreeViewStrings } from "./strings.js";
|
|
7
|
+
function isValidJson(raw) {
|
|
8
|
+
try {
|
|
9
|
+
JSON.parse(raw);
|
|
10
|
+
return true;
|
|
11
|
+
} catch {
|
|
12
|
+
return false;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
function JsonContainerEditor({ node, onCommit, onCancel, renderCodeEditor, className }) {
|
|
16
|
+
const strings = useJsonTreeViewStrings();
|
|
17
|
+
const initialValue = node.value ?? ('array' === node.type ? [] : {});
|
|
18
|
+
const [raw, setRaw] = useState(()=>JSON.stringify(initialValue, null, 2));
|
|
19
|
+
const [error, setError] = useState(null);
|
|
20
|
+
const handleChange = (value)=>{
|
|
21
|
+
setRaw(value);
|
|
22
|
+
setError(null);
|
|
23
|
+
};
|
|
24
|
+
const apply = ()=>{
|
|
25
|
+
try {
|
|
26
|
+
onCommit(JSON.parse(raw));
|
|
27
|
+
} catch (error) {
|
|
28
|
+
setError(error instanceof Error ? `${strings.invalidJson}: ${error.message}` : strings.invalidJson);
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
return /*#__PURE__*/ jsxs("div", {
|
|
32
|
+
className: cn('flex flex-col gap-1.5 [&>[data-slot=form-field-error]]:mt-0', className),
|
|
33
|
+
children: [
|
|
34
|
+
renderCodeEditor ? renderCodeEditor({
|
|
35
|
+
value: raw,
|
|
36
|
+
onChange: handleChange,
|
|
37
|
+
onApply: apply,
|
|
38
|
+
onCancel,
|
|
39
|
+
invalid: !isValidJson(raw),
|
|
40
|
+
language: 'json',
|
|
41
|
+
autoFocus: true
|
|
42
|
+
}) : /*#__PURE__*/ jsx(EditorTextarea, {
|
|
43
|
+
value: raw,
|
|
44
|
+
onChange: handleChange,
|
|
45
|
+
onApply: apply,
|
|
46
|
+
onCancel: onCancel,
|
|
47
|
+
invalid: !!error,
|
|
48
|
+
rows: Math.min(12, Math.max(3, raw.split('\n').length)),
|
|
49
|
+
ariaLabel: strings.editJsonOf(node.key)
|
|
50
|
+
}),
|
|
51
|
+
/*#__PURE__*/ jsx(FormFieldError, {
|
|
52
|
+
children: error
|
|
53
|
+
}),
|
|
54
|
+
/*#__PURE__*/ jsx(EditorActions, {
|
|
55
|
+
onApply: apply,
|
|
56
|
+
onCancel: onCancel
|
|
57
|
+
})
|
|
58
|
+
]
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
export { JsonContainerEditor };
|