@uipath/apollo-react 6.19.2 → 6.20.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/RowActions.cjs +11 -4
- package/dist/canvas/components/JsonTree/RowActions.d.ts.map +1 -1
- package/dist/canvas/components/JsonTree/RowActions.js +11 -4
- package/dist/canvas/components/NodePropertyPanel/ExpressionField.cjs +6 -18
- package/dist/canvas/components/NodePropertyPanel/ExpressionField.d.ts +4 -1
- package/dist/canvas/components/NodePropertyPanel/ExpressionField.d.ts.map +1 -1
- package/dist/canvas/components/NodePropertyPanel/ExpressionField.js +7 -19
- package/dist/canvas/components/StageNode/tasks/TaskMockedChip.cjs +1 -0
- package/dist/canvas/components/StageNode/tasks/TaskMockedChip.js +1 -0
- package/dist/canvas/styles/tailwind.canvas.css +1 -1
- package/package.json +3 -3
|
@@ -29,6 +29,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
29
29
|
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
30
30
|
const apollo_wind_namespaceObject = require("@uipath/apollo-wind");
|
|
31
31
|
const external_lucide_react_namespaceObject = require("lucide-react");
|
|
32
|
+
const external_react_namespaceObject = require("react");
|
|
32
33
|
const index_cjs_namespaceObject = require("../../../i18n/index.cjs");
|
|
33
34
|
const external_CanvasTooltip_cjs_namespaceObject = require("../CanvasTooltip.cjs");
|
|
34
35
|
const ACTION_BUTTON_CLASS = 'shrink-0 rounded text-foreground-subtle opacity-0 hover:text-foreground hover:bg-surface-raised group-hover:opacity-100 focus-visible:opacity-100';
|
|
@@ -40,10 +41,11 @@ const ACTION_TONE_CLASS = {
|
|
|
40
41
|
};
|
|
41
42
|
function RowActions({ node, actions, maxInline }) {
|
|
42
43
|
const { _ } = (0, index_cjs_namespaceObject.useSafeLingui)();
|
|
44
|
+
const [menuOpen, setMenuOpen] = (0, external_react_namespaceObject.useState)(false);
|
|
43
45
|
if (0 === actions.length) return null;
|
|
44
46
|
const overflowing = actions.length > maxInline;
|
|
45
|
-
const inline = overflowing ?
|
|
46
|
-
const overflow = overflowing ? actions
|
|
47
|
+
const inline = overflowing ? [] : actions;
|
|
48
|
+
const overflow = overflowing ? actions : [];
|
|
47
49
|
const moreLabel = _({
|
|
48
50
|
id: 'canvas.json_value_panel.more_actions',
|
|
49
51
|
message: 'More actions'
|
|
@@ -67,11 +69,14 @@ function RowActions({ node, actions, maxInline }) {
|
|
|
67
69
|
})
|
|
68
70
|
}, action.id)),
|
|
69
71
|
overflow.length > 0 && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(apollo_wind_namespaceObject.DropdownMenu, {
|
|
72
|
+
open: menuOpen,
|
|
73
|
+
onOpenChange: setMenuOpen,
|
|
70
74
|
children: [
|
|
71
75
|
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_CanvasTooltip_cjs_namespaceObject.CanvasTooltip, {
|
|
72
76
|
content: moreLabel,
|
|
73
77
|
placement: "top",
|
|
74
78
|
delay: true,
|
|
79
|
+
hide: menuOpen,
|
|
75
80
|
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(apollo_wind_namespaceObject.DropdownMenuTrigger, {
|
|
76
81
|
asChild: true,
|
|
77
82
|
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(apollo_wind_namespaceObject.Button, {
|
|
@@ -79,13 +84,15 @@ function RowActions({ node, actions, maxInline }) {
|
|
|
79
84
|
size: "4xs",
|
|
80
85
|
icon: true,
|
|
81
86
|
"aria-label": moreLabel,
|
|
82
|
-
className: (0, apollo_wind_namespaceObject.cn)(ACTION_BUTTON_CLASS, '[&_svg]:size-2.75'),
|
|
87
|
+
className: (0, apollo_wind_namespaceObject.cn)(ACTION_BUTTON_CLASS, '[&_svg]:size-2.75', menuOpen && 'opacity-100'),
|
|
83
88
|
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.MoreHorizontal, {})
|
|
84
89
|
})
|
|
85
90
|
})
|
|
86
91
|
}),
|
|
87
92
|
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(apollo_wind_namespaceObject.DropdownMenuContent, {
|
|
88
|
-
|
|
93
|
+
side: "left",
|
|
94
|
+
align: "start",
|
|
95
|
+
sideOffset: -12,
|
|
89
96
|
className: "min-w-40",
|
|
90
97
|
children: overflow.map((action)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(apollo_wind_namespaceObject.DropdownMenuItem, {
|
|
91
98
|
disabled: action.disabled,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RowActions.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/JsonTree/RowActions.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RowActions.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/JsonTree/RowActions.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,YAAY,EAAE,UAAU,EAAsB,MAAM,kBAAkB,CAAC;AAYrF,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,YAAY,CAAC;IAEnB,OAAO,EAAE,UAAU,EAAE,CAAC;IAEtB,SAAS,EAAE,MAAM,CAAC;CACnB;AAQD,wBAAgB,UAAU,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,EAAE,eAAe,kDA6EvE"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Button, DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger, cn } from "@uipath/apollo-wind";
|
|
3
3
|
import { MoreHorizontal } from "lucide-react";
|
|
4
|
+
import { useState } from "react";
|
|
4
5
|
import { useSafeLingui } from "../../../i18n/index.js";
|
|
5
6
|
import { CanvasTooltip } from "../CanvasTooltip.js";
|
|
6
7
|
const ACTION_BUTTON_CLASS = 'shrink-0 rounded text-foreground-subtle opacity-0 hover:text-foreground hover:bg-surface-raised group-hover:opacity-100 focus-visible:opacity-100';
|
|
@@ -12,10 +13,11 @@ const ACTION_TONE_CLASS = {
|
|
|
12
13
|
};
|
|
13
14
|
function RowActions({ node, actions, maxInline }) {
|
|
14
15
|
const { _ } = useSafeLingui();
|
|
16
|
+
const [menuOpen, setMenuOpen] = useState(false);
|
|
15
17
|
if (0 === actions.length) return null;
|
|
16
18
|
const overflowing = actions.length > maxInline;
|
|
17
|
-
const inline = overflowing ?
|
|
18
|
-
const overflow = overflowing ? actions
|
|
19
|
+
const inline = overflowing ? [] : actions;
|
|
20
|
+
const overflow = overflowing ? actions : [];
|
|
19
21
|
const moreLabel = _({
|
|
20
22
|
id: 'canvas.json_value_panel.more_actions',
|
|
21
23
|
message: 'More actions'
|
|
@@ -39,11 +41,14 @@ function RowActions({ node, actions, maxInline }) {
|
|
|
39
41
|
})
|
|
40
42
|
}, action.id)),
|
|
41
43
|
overflow.length > 0 && /*#__PURE__*/ jsxs(DropdownMenu, {
|
|
44
|
+
open: menuOpen,
|
|
45
|
+
onOpenChange: setMenuOpen,
|
|
42
46
|
children: [
|
|
43
47
|
/*#__PURE__*/ jsx(CanvasTooltip, {
|
|
44
48
|
content: moreLabel,
|
|
45
49
|
placement: "top",
|
|
46
50
|
delay: true,
|
|
51
|
+
hide: menuOpen,
|
|
47
52
|
children: /*#__PURE__*/ jsx(DropdownMenuTrigger, {
|
|
48
53
|
asChild: true,
|
|
49
54
|
children: /*#__PURE__*/ jsx(Button, {
|
|
@@ -51,13 +56,15 @@ function RowActions({ node, actions, maxInline }) {
|
|
|
51
56
|
size: "4xs",
|
|
52
57
|
icon: true,
|
|
53
58
|
"aria-label": moreLabel,
|
|
54
|
-
className: cn(ACTION_BUTTON_CLASS, '[&_svg]:size-2.75'),
|
|
59
|
+
className: cn(ACTION_BUTTON_CLASS, '[&_svg]:size-2.75', menuOpen && 'opacity-100'),
|
|
55
60
|
children: /*#__PURE__*/ jsx(MoreHorizontal, {})
|
|
56
61
|
})
|
|
57
62
|
})
|
|
58
63
|
}),
|
|
59
64
|
/*#__PURE__*/ jsx(DropdownMenuContent, {
|
|
60
|
-
|
|
65
|
+
side: "left",
|
|
66
|
+
align: "start",
|
|
67
|
+
sideOffset: -12,
|
|
61
68
|
className: "min-w-40",
|
|
62
69
|
children: overflow.map((action)=>/*#__PURE__*/ jsxs(DropdownMenuItem, {
|
|
63
70
|
disabled: action.disabled,
|
|
@@ -27,8 +27,9 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
27
27
|
ExpressionField: ()=>ExpressionField
|
|
28
28
|
});
|
|
29
29
|
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
30
|
+
const apollo_wind_namespaceObject = require("@uipath/apollo-wind");
|
|
30
31
|
const external_lucide_react_namespaceObject = require("lucide-react");
|
|
31
|
-
function ExpressionField({ label, value, mode = 'expr', description, onModeChange }) {
|
|
32
|
+
function ExpressionField({ label, value, mode = 'expr', description, onModeChange, variables = [], onInsertVariable }) {
|
|
32
33
|
const expression = value ?? '';
|
|
33
34
|
const activeMode = mode;
|
|
34
35
|
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
@@ -53,23 +54,10 @@ function ExpressionField({ label, value, mode = 'expr', description, onModeChang
|
|
|
53
54
|
size: 12
|
|
54
55
|
})
|
|
55
56
|
}),
|
|
56
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
className: "flex h-7 items-center gap-1 rounded-lg px-2 text-[11px] text-foreground-subtle transition hover:bg-surface-overlay hover:text-foreground",
|
|
61
|
-
children: [
|
|
62
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
|
|
63
|
-
className: "font-mono text-[10px]",
|
|
64
|
-
children: '{x}'
|
|
65
|
-
}),
|
|
66
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
|
|
67
|
-
children: "Insert"
|
|
68
|
-
}),
|
|
69
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.ChevronDown, {
|
|
70
|
-
size: 9
|
|
71
|
-
})
|
|
72
|
-
]
|
|
57
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(apollo_wind_namespaceObject.VariablePicker, {
|
|
58
|
+
items: variables,
|
|
59
|
+
onSelect: (variable)=>onInsertVariable?.(variable),
|
|
60
|
+
disabled: 0 === variables.length || !onInsertVariable
|
|
73
61
|
})
|
|
74
62
|
]
|
|
75
63
|
})
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type VariablePickerItem } from '@uipath/apollo-wind';
|
|
1
2
|
export type ExpressionMode = 'expr' | 'json';
|
|
2
3
|
export interface ExpressionFieldProps {
|
|
3
4
|
label?: string;
|
|
@@ -5,6 +6,8 @@ export interface ExpressionFieldProps {
|
|
|
5
6
|
mode?: ExpressionMode;
|
|
6
7
|
description?: string;
|
|
7
8
|
onModeChange?: (mode: ExpressionMode) => void;
|
|
9
|
+
variables?: VariablePickerItem[];
|
|
10
|
+
onInsertVariable?: (variable: VariablePickerItem) => void;
|
|
8
11
|
}
|
|
9
|
-
export declare function ExpressionField({ label, value, mode, description, onModeChange, }: ExpressionFieldProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export declare function ExpressionField({ label, value, mode, description, onModeChange, variables, onInsertVariable, }: ExpressionFieldProps): import("react/jsx-runtime").JSX.Element;
|
|
10
13
|
//# sourceMappingURL=ExpressionField.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExpressionField.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/NodePropertyPanel/ExpressionField.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ExpressionField.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/NodePropertyPanel/ExpressionField.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAkB,KAAK,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAG9E,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,MAAM,CAAC;AAE7C,MAAM,WAAW,oBAAoB;IAEnC,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,IAAI,CAAC,EAAE,cAAc,CAAC;IAEtB,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,cAAc,KAAK,IAAI,CAAC;IAE9C,SAAS,CAAC,EAAE,kBAAkB,EAAE,CAAC;IAEjC,gBAAgB,CAAC,EAAE,CAAC,QAAQ,EAAE,kBAAkB,KAAK,IAAI,CAAC;CAC3D;AAWD,wBAAgB,eAAe,CAAC,EAC9B,KAAK,EACL,KAAK,EACL,IAAa,EACb,WAAW,EACX,YAAY,EACZ,SAAc,EACd,gBAAgB,GACjB,EAAE,oBAAoB,2CA4GtB"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
|
|
2
|
+
import { VariablePicker } from "@uipath/apollo-wind";
|
|
3
|
+
import { Maximize2, Redo2, Sparkles, Undo2 } from "lucide-react";
|
|
4
|
+
function ExpressionField({ label, value, mode = 'expr', description, onModeChange, variables = [], onInsertVariable }) {
|
|
4
5
|
const expression = value ?? '';
|
|
5
6
|
const activeMode = mode;
|
|
6
7
|
return /*#__PURE__*/ jsxs("div", {
|
|
@@ -25,23 +26,10 @@ function ExpressionField({ label, value, mode = 'expr', description, onModeChang
|
|
|
25
26
|
size: 12
|
|
26
27
|
})
|
|
27
28
|
}),
|
|
28
|
-
/*#__PURE__*/
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
className: "flex h-7 items-center gap-1 rounded-lg px-2 text-[11px] text-foreground-subtle transition hover:bg-surface-overlay hover:text-foreground",
|
|
33
|
-
children: [
|
|
34
|
-
/*#__PURE__*/ jsx("span", {
|
|
35
|
-
className: "font-mono text-[10px]",
|
|
36
|
-
children: '{x}'
|
|
37
|
-
}),
|
|
38
|
-
/*#__PURE__*/ jsx("span", {
|
|
39
|
-
children: "Insert"
|
|
40
|
-
}),
|
|
41
|
-
/*#__PURE__*/ jsx(ChevronDown, {
|
|
42
|
-
size: 9
|
|
43
|
-
})
|
|
44
|
-
]
|
|
29
|
+
/*#__PURE__*/ jsx(VariablePicker, {
|
|
30
|
+
items: variables,
|
|
31
|
+
onSelect: (variable)=>onInsertVariable?.(variable),
|
|
32
|
+
disabled: 0 === variables.length || !onInsertVariable
|
|
45
33
|
})
|
|
46
34
|
]
|
|
47
35
|
})
|
|
@@ -51,6 +51,7 @@ function TaskMockedChipInner({ mocked, taskId }) {
|
|
|
51
51
|
className: "h-3.5 w-3.5 justify-center rounded-full border-0 bg-primary p-0 text-primary-foreground [&>svg]:size-2.5",
|
|
52
52
|
"data-testid": `stage-task-mocked-${taskId}`,
|
|
53
53
|
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.FlaskConical, {
|
|
54
|
+
size: 10,
|
|
54
55
|
"aria-hidden": true
|
|
55
56
|
})
|
|
56
57
|
})
|
|
@@ -23,6 +23,7 @@ function TaskMockedChipInner({ mocked, taskId }) {
|
|
|
23
23
|
className: "h-3.5 w-3.5 justify-center rounded-full border-0 bg-primary p-0 text-primary-foreground [&>svg]:size-2.5",
|
|
24
24
|
"data-testid": `stage-task-mocked-${taskId}`,
|
|
25
25
|
children: /*#__PURE__*/ jsx(FlaskConical, {
|
|
26
|
+
size: 10,
|
|
26
27
|
"aria-hidden": true
|
|
27
28
|
})
|
|
28
29
|
})
|