@uipath/apollo-react 4.51.0 → 4.52.1
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/NodePropertyPanel/ExpressionField.cjs +187 -0
- package/dist/canvas/components/NodePropertyPanel/ExpressionField.d.ts +10 -0
- package/dist/canvas/components/NodePropertyPanel/ExpressionField.d.ts.map +1 -0
- package/dist/canvas/components/NodePropertyPanel/ExpressionField.js +153 -0
- package/dist/canvas/components/NodePropertyPanel/NodePropertyPanel.cjs +16 -12
- package/dist/canvas/components/NodePropertyPanel/NodePropertyPanel.d.ts +1 -1
- package/dist/canvas/components/NodePropertyPanel/NodePropertyPanel.d.ts.map +1 -1
- package/dist/canvas/components/NodePropertyPanel/NodePropertyPanel.js +16 -12
- package/dist/canvas/components/NodePropertyPanel/NodePropertyPanel.types.d.ts +1 -0
- package/dist/canvas/components/NodePropertyPanel/NodePropertyPanel.types.d.ts.map +1 -1
- package/dist/canvas/components/NodePropertyPanel/index.cjs +5 -1
- package/dist/canvas/components/NodePropertyPanel/index.d.ts +2 -0
- package/dist/canvas/components/NodePropertyPanel/index.d.ts.map +1 -1
- package/dist/canvas/components/NodePropertyPanel/index.js +2 -1
- package/dist/canvas/styles/tailwind.canvas.css +1 -1
- package/dist/material/components/ap-rich-text-editor/ApRichTextEditor.cjs +1 -2
- package/dist/material/components/ap-rich-text-editor/ApRichTextEditor.js +1 -1
- package/package.json +14 -13
|
@@ -0,0 +1,187 @@
|
|
|
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
|
+
ExpressionField: ()=>ExpressionField
|
|
28
|
+
});
|
|
29
|
+
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
30
|
+
const external_lucide_react_namespaceObject = require("lucide-react");
|
|
31
|
+
function ExpressionField({ label, value, mode = 'expr', description, onModeChange }) {
|
|
32
|
+
const expression = value ?? '';
|
|
33
|
+
const activeMode = mode;
|
|
34
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
35
|
+
className: "flex flex-col gap-2",
|
|
36
|
+
children: [
|
|
37
|
+
label && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
38
|
+
className: "flex items-center justify-between",
|
|
39
|
+
children: [
|
|
40
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
|
|
41
|
+
className: "text-xs font-medium text-foreground-muted",
|
|
42
|
+
children: label
|
|
43
|
+
}),
|
|
44
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
45
|
+
className: "flex items-center gap-0.5",
|
|
46
|
+
children: [
|
|
47
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("button", {
|
|
48
|
+
type: "button",
|
|
49
|
+
title: "AI assist",
|
|
50
|
+
"aria-label": "AI assist",
|
|
51
|
+
className: "grid size-7 place-items-center rounded-lg text-foreground-subtle transition hover:bg-surface-overlay hover:text-foreground",
|
|
52
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.Sparkles, {
|
|
53
|
+
size: 12
|
|
54
|
+
})
|
|
55
|
+
}),
|
|
56
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("button", {
|
|
57
|
+
type: "button",
|
|
58
|
+
title: "Insert variable",
|
|
59
|
+
"aria-label": "Insert variable",
|
|
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
|
+
]
|
|
73
|
+
})
|
|
74
|
+
]
|
|
75
|
+
})
|
|
76
|
+
]
|
|
77
|
+
}),
|
|
78
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
79
|
+
className: "overflow-hidden rounded-xl border border-border-subtle bg-surface-raised",
|
|
80
|
+
children: [
|
|
81
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
82
|
+
className: "flex items-center justify-between border-b border-border-subtle bg-surface px-3 py-2",
|
|
83
|
+
children: [
|
|
84
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
|
|
85
|
+
className: "font-mono text-xs text-foreground-muted",
|
|
86
|
+
children: "result"
|
|
87
|
+
}),
|
|
88
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("button", {
|
|
89
|
+
type: "button",
|
|
90
|
+
title: "Expand editor",
|
|
91
|
+
"aria-label": "Expand editor",
|
|
92
|
+
className: "grid size-6 place-items-center rounded text-foreground-subtle transition hover:text-foreground",
|
|
93
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.Maximize2, {
|
|
94
|
+
size: 11
|
|
95
|
+
})
|
|
96
|
+
})
|
|
97
|
+
]
|
|
98
|
+
}),
|
|
99
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
100
|
+
className: "flex items-center gap-1 border-b border-border-subtle bg-surface px-2.5 py-1.5",
|
|
101
|
+
children: [
|
|
102
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("button", {
|
|
103
|
+
type: "button",
|
|
104
|
+
title: "Undo",
|
|
105
|
+
"aria-label": "Undo",
|
|
106
|
+
className: "grid size-6 place-items-center rounded text-foreground-subtle transition hover:text-foreground",
|
|
107
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.Undo2, {
|
|
108
|
+
size: 12
|
|
109
|
+
})
|
|
110
|
+
}),
|
|
111
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("button", {
|
|
112
|
+
type: "button",
|
|
113
|
+
title: "Redo",
|
|
114
|
+
"aria-label": "Redo",
|
|
115
|
+
className: "grid size-6 place-items-center rounded text-foreground-subtle transition hover:text-foreground",
|
|
116
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.Redo2, {
|
|
117
|
+
size: 12
|
|
118
|
+
})
|
|
119
|
+
}),
|
|
120
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
121
|
+
className: "mx-1 h-3 w-px shrink-0 bg-border-subtle"
|
|
122
|
+
}),
|
|
123
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("button", {
|
|
124
|
+
type: "button",
|
|
125
|
+
onClick: ()=>onModeChange?.('expr'),
|
|
126
|
+
"aria-pressed": 'expr' === activeMode,
|
|
127
|
+
className: "rounded px-2 py-0.5 text-[11px] transition",
|
|
128
|
+
style: {
|
|
129
|
+
color: 'expr' === activeMode ? 'var(--foreground)' : 'var(--foreground-subtle)',
|
|
130
|
+
fontWeight: 'expr' === activeMode ? 600 : 400
|
|
131
|
+
},
|
|
132
|
+
children: "expr"
|
|
133
|
+
}),
|
|
134
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("button", {
|
|
135
|
+
type: "button",
|
|
136
|
+
onClick: ()=>onModeChange?.('json'),
|
|
137
|
+
"aria-pressed": 'json' === activeMode,
|
|
138
|
+
className: "rounded px-2 py-0.5 text-[11px] transition",
|
|
139
|
+
style: {
|
|
140
|
+
color: 'json' === activeMode ? 'var(--foreground)' : 'var(--foreground-subtle)',
|
|
141
|
+
fontWeight: 'json' === activeMode ? 600 : 400
|
|
142
|
+
},
|
|
143
|
+
children: "json"
|
|
144
|
+
})
|
|
145
|
+
]
|
|
146
|
+
}),
|
|
147
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("pre", {
|
|
148
|
+
className: "overflow-auto whitespace-pre-wrap bg-surface-raised p-3 text-xs font-mono leading-5 text-foreground",
|
|
149
|
+
children: expression || '// Enter expression…'
|
|
150
|
+
}),
|
|
151
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
152
|
+
className: "flex items-center justify-between border-t border-border-subtle bg-surface px-3 py-1.5",
|
|
153
|
+
children: [
|
|
154
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
155
|
+
className: "flex items-center gap-1.5",
|
|
156
|
+
children: [
|
|
157
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
|
|
158
|
+
className: "size-1.5 shrink-0 rounded-full bg-[--success]"
|
|
159
|
+
}),
|
|
160
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
|
|
161
|
+
className: "text-[10px] text-foreground-subtle",
|
|
162
|
+
children: "No errors"
|
|
163
|
+
})
|
|
164
|
+
]
|
|
165
|
+
}),
|
|
166
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
|
|
167
|
+
className: "text-[10px] text-foreground-subtle",
|
|
168
|
+
children: "Ln 1, Col 1"
|
|
169
|
+
})
|
|
170
|
+
]
|
|
171
|
+
})
|
|
172
|
+
]
|
|
173
|
+
}),
|
|
174
|
+
description && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
|
|
175
|
+
className: "block text-[11px] leading-4 text-foreground-subtle",
|
|
176
|
+
children: description
|
|
177
|
+
})
|
|
178
|
+
]
|
|
179
|
+
});
|
|
180
|
+
}
|
|
181
|
+
exports.ExpressionField = __webpack_exports__.ExpressionField;
|
|
182
|
+
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
183
|
+
"ExpressionField"
|
|
184
|
+
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
185
|
+
Object.defineProperty(exports, '__esModule', {
|
|
186
|
+
value: true
|
|
187
|
+
});
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export type ExpressionMode = 'expr' | 'json';
|
|
2
|
+
export interface ExpressionFieldProps {
|
|
3
|
+
label?: string;
|
|
4
|
+
value?: string;
|
|
5
|
+
mode?: ExpressionMode;
|
|
6
|
+
description?: string;
|
|
7
|
+
onModeChange?: (mode: ExpressionMode) => void;
|
|
8
|
+
}
|
|
9
|
+
export declare function ExpressionField({ label, value, mode, description, onModeChange, }: ExpressionFieldProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
//# sourceMappingURL=ExpressionField.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExpressionField.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/NodePropertyPanel/ExpressionField.tsx"],"names":[],"mappings":"AAEA,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;CAC/C;AAWD,wBAAgB,eAAe,CAAC,EAC9B,KAAK,EACL,KAAK,EACL,IAAa,EACb,WAAW,EACX,YAAY,GACb,EAAE,oBAAoB,2CAiHtB"}
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { ChevronDown, Maximize2, Redo2, Sparkles, Undo2 } from "lucide-react";
|
|
3
|
+
function ExpressionField({ label, value, mode = 'expr', description, onModeChange }) {
|
|
4
|
+
const expression = value ?? '';
|
|
5
|
+
const activeMode = mode;
|
|
6
|
+
return /*#__PURE__*/ jsxs("div", {
|
|
7
|
+
className: "flex flex-col gap-2",
|
|
8
|
+
children: [
|
|
9
|
+
label && /*#__PURE__*/ jsxs("div", {
|
|
10
|
+
className: "flex items-center justify-between",
|
|
11
|
+
children: [
|
|
12
|
+
/*#__PURE__*/ jsx("span", {
|
|
13
|
+
className: "text-xs font-medium text-foreground-muted",
|
|
14
|
+
children: label
|
|
15
|
+
}),
|
|
16
|
+
/*#__PURE__*/ jsxs("div", {
|
|
17
|
+
className: "flex items-center gap-0.5",
|
|
18
|
+
children: [
|
|
19
|
+
/*#__PURE__*/ jsx("button", {
|
|
20
|
+
type: "button",
|
|
21
|
+
title: "AI assist",
|
|
22
|
+
"aria-label": "AI assist",
|
|
23
|
+
className: "grid size-7 place-items-center rounded-lg text-foreground-subtle transition hover:bg-surface-overlay hover:text-foreground",
|
|
24
|
+
children: /*#__PURE__*/ jsx(Sparkles, {
|
|
25
|
+
size: 12
|
|
26
|
+
})
|
|
27
|
+
}),
|
|
28
|
+
/*#__PURE__*/ jsxs("button", {
|
|
29
|
+
type: "button",
|
|
30
|
+
title: "Insert variable",
|
|
31
|
+
"aria-label": "Insert variable",
|
|
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
|
+
]
|
|
45
|
+
})
|
|
46
|
+
]
|
|
47
|
+
})
|
|
48
|
+
]
|
|
49
|
+
}),
|
|
50
|
+
/*#__PURE__*/ jsxs("div", {
|
|
51
|
+
className: "overflow-hidden rounded-xl border border-border-subtle bg-surface-raised",
|
|
52
|
+
children: [
|
|
53
|
+
/*#__PURE__*/ jsxs("div", {
|
|
54
|
+
className: "flex items-center justify-between border-b border-border-subtle bg-surface px-3 py-2",
|
|
55
|
+
children: [
|
|
56
|
+
/*#__PURE__*/ jsx("span", {
|
|
57
|
+
className: "font-mono text-xs text-foreground-muted",
|
|
58
|
+
children: "result"
|
|
59
|
+
}),
|
|
60
|
+
/*#__PURE__*/ jsx("button", {
|
|
61
|
+
type: "button",
|
|
62
|
+
title: "Expand editor",
|
|
63
|
+
"aria-label": "Expand editor",
|
|
64
|
+
className: "grid size-6 place-items-center rounded text-foreground-subtle transition hover:text-foreground",
|
|
65
|
+
children: /*#__PURE__*/ jsx(Maximize2, {
|
|
66
|
+
size: 11
|
|
67
|
+
})
|
|
68
|
+
})
|
|
69
|
+
]
|
|
70
|
+
}),
|
|
71
|
+
/*#__PURE__*/ jsxs("div", {
|
|
72
|
+
className: "flex items-center gap-1 border-b border-border-subtle bg-surface px-2.5 py-1.5",
|
|
73
|
+
children: [
|
|
74
|
+
/*#__PURE__*/ jsx("button", {
|
|
75
|
+
type: "button",
|
|
76
|
+
title: "Undo",
|
|
77
|
+
"aria-label": "Undo",
|
|
78
|
+
className: "grid size-6 place-items-center rounded text-foreground-subtle transition hover:text-foreground",
|
|
79
|
+
children: /*#__PURE__*/ jsx(Undo2, {
|
|
80
|
+
size: 12
|
|
81
|
+
})
|
|
82
|
+
}),
|
|
83
|
+
/*#__PURE__*/ jsx("button", {
|
|
84
|
+
type: "button",
|
|
85
|
+
title: "Redo",
|
|
86
|
+
"aria-label": "Redo",
|
|
87
|
+
className: "grid size-6 place-items-center rounded text-foreground-subtle transition hover:text-foreground",
|
|
88
|
+
children: /*#__PURE__*/ jsx(Redo2, {
|
|
89
|
+
size: 12
|
|
90
|
+
})
|
|
91
|
+
}),
|
|
92
|
+
/*#__PURE__*/ jsx("div", {
|
|
93
|
+
className: "mx-1 h-3 w-px shrink-0 bg-border-subtle"
|
|
94
|
+
}),
|
|
95
|
+
/*#__PURE__*/ jsx("button", {
|
|
96
|
+
type: "button",
|
|
97
|
+
onClick: ()=>onModeChange?.('expr'),
|
|
98
|
+
"aria-pressed": 'expr' === activeMode,
|
|
99
|
+
className: "rounded px-2 py-0.5 text-[11px] transition",
|
|
100
|
+
style: {
|
|
101
|
+
color: 'expr' === activeMode ? 'var(--foreground)' : 'var(--foreground-subtle)',
|
|
102
|
+
fontWeight: 'expr' === activeMode ? 600 : 400
|
|
103
|
+
},
|
|
104
|
+
children: "expr"
|
|
105
|
+
}),
|
|
106
|
+
/*#__PURE__*/ jsx("button", {
|
|
107
|
+
type: "button",
|
|
108
|
+
onClick: ()=>onModeChange?.('json'),
|
|
109
|
+
"aria-pressed": 'json' === activeMode,
|
|
110
|
+
className: "rounded px-2 py-0.5 text-[11px] transition",
|
|
111
|
+
style: {
|
|
112
|
+
color: 'json' === activeMode ? 'var(--foreground)' : 'var(--foreground-subtle)',
|
|
113
|
+
fontWeight: 'json' === activeMode ? 600 : 400
|
|
114
|
+
},
|
|
115
|
+
children: "json"
|
|
116
|
+
})
|
|
117
|
+
]
|
|
118
|
+
}),
|
|
119
|
+
/*#__PURE__*/ jsx("pre", {
|
|
120
|
+
className: "overflow-auto whitespace-pre-wrap bg-surface-raised p-3 text-xs font-mono leading-5 text-foreground",
|
|
121
|
+
children: expression || '// Enter expression…'
|
|
122
|
+
}),
|
|
123
|
+
/*#__PURE__*/ jsxs("div", {
|
|
124
|
+
className: "flex items-center justify-between border-t border-border-subtle bg-surface px-3 py-1.5",
|
|
125
|
+
children: [
|
|
126
|
+
/*#__PURE__*/ jsxs("div", {
|
|
127
|
+
className: "flex items-center gap-1.5",
|
|
128
|
+
children: [
|
|
129
|
+
/*#__PURE__*/ jsx("span", {
|
|
130
|
+
className: "size-1.5 shrink-0 rounded-full bg-[--success]"
|
|
131
|
+
}),
|
|
132
|
+
/*#__PURE__*/ jsx("span", {
|
|
133
|
+
className: "text-[10px] text-foreground-subtle",
|
|
134
|
+
children: "No errors"
|
|
135
|
+
})
|
|
136
|
+
]
|
|
137
|
+
}),
|
|
138
|
+
/*#__PURE__*/ jsx("span", {
|
|
139
|
+
className: "text-[10px] text-foreground-subtle",
|
|
140
|
+
children: "Ln 1, Col 1"
|
|
141
|
+
})
|
|
142
|
+
]
|
|
143
|
+
})
|
|
144
|
+
]
|
|
145
|
+
}),
|
|
146
|
+
description && /*#__PURE__*/ jsx("span", {
|
|
147
|
+
className: "block text-[11px] leading-4 text-foreground-subtle",
|
|
148
|
+
children: description
|
|
149
|
+
})
|
|
150
|
+
]
|
|
151
|
+
});
|
|
152
|
+
}
|
|
153
|
+
export { ExpressionField };
|
|
@@ -33,7 +33,7 @@ const external_react_namespaceObject = require("react");
|
|
|
33
33
|
const SURFACE_REMAP = {
|
|
34
34
|
'--surface-raised': 'var(--surface-overlay)'
|
|
35
35
|
};
|
|
36
|
-
function NodePropertyPanel({ panelTitle, onClose, nodeIcon, nodeLabel, nodeCategory, action, schema, plugins, onSubmit, disabled, resetKey, className, contentInset = '1.5rem' }) {
|
|
36
|
+
function NodePropertyPanel({ panelTitle, onClose, nodeIcon, nodeLabel, nodeCategory, action, schema, plugins, onSubmit, disabled, resetKey, className, contentInset = '1.5rem', children }) {
|
|
37
37
|
const hasNodeHeader = !!(nodeLabel || nodeCategory || nodeIcon || action);
|
|
38
38
|
const formSchema = (0, external_react_namespaceObject.useMemo)(()=>schema && void 0 === schema.actions ? {
|
|
39
39
|
...schema,
|
|
@@ -43,9 +43,12 @@ function NodePropertyPanel({ panelTitle, onClose, nodeIcon, nodeLabel, nodeCateg
|
|
|
43
43
|
]);
|
|
44
44
|
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
45
45
|
className: (0, apollo_wind_namespaceObject.cn)('flex min-h-0 flex-col bg-surface-raised', className),
|
|
46
|
+
style: {
|
|
47
|
+
'--mf-content-inset': contentInset
|
|
48
|
+
},
|
|
46
49
|
children: [
|
|
47
50
|
panelTitle && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
48
|
-
className: "flex h-10 shrink-0 items-center justify-between
|
|
51
|
+
className: "flex h-10 shrink-0 items-center justify-between px-2",
|
|
49
52
|
children: [
|
|
50
53
|
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
51
54
|
className: "flex items-center gap-1",
|
|
@@ -75,10 +78,10 @@ function NodePropertyPanel({ panelTitle, onClose, nodeIcon, nodeLabel, nodeCateg
|
|
|
75
78
|
]
|
|
76
79
|
}),
|
|
77
80
|
hasNodeHeader && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
78
|
-
className: "flex shrink-0 items-center justify-between gap-4
|
|
81
|
+
className: "flex shrink-0 items-center justify-between gap-4 py-4 [padding-inline:var(--mf-content-inset,1.5rem)]",
|
|
79
82
|
children: [
|
|
80
83
|
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
81
|
-
className: "flex min-w-0 flex-1 items-center gap-3",
|
|
84
|
+
className: "flex min-w-0 flex-1 items-center gap-3.5",
|
|
82
85
|
children: [
|
|
83
86
|
nodeIcon && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
84
87
|
className: "grid size-11 shrink-0 place-items-center rounded-xl bg-surface-overlay text-foreground-subtle [&>svg]:size-5",
|
|
@@ -88,11 +91,11 @@ function NodePropertyPanel({ panelTitle, onClose, nodeIcon, nodeLabel, nodeCateg
|
|
|
88
91
|
className: "flex min-w-0 flex-1 flex-col justify-center",
|
|
89
92
|
children: [
|
|
90
93
|
nodeLabel && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
|
|
91
|
-
className: "block truncate text-
|
|
94
|
+
className: "block truncate text-base font-semibold leading-5 tracking-[-0.3px] text-foreground",
|
|
92
95
|
children: nodeLabel
|
|
93
96
|
}),
|
|
94
97
|
nodeCategory && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
|
|
95
|
-
className: "block truncate text-
|
|
98
|
+
className: "block truncate text-xs leading-4 text-foreground-muted",
|
|
96
99
|
children: nodeCategory
|
|
97
100
|
})
|
|
98
101
|
]
|
|
@@ -105,13 +108,14 @@ function NodePropertyPanel({ panelTitle, onClose, nodeIcon, nodeLabel, nodeCateg
|
|
|
105
108
|
})
|
|
106
109
|
]
|
|
107
110
|
}),
|
|
108
|
-
|
|
111
|
+
children ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
112
|
+
className: "min-h-0 flex-1 overflow-auto",
|
|
113
|
+
style: SURFACE_REMAP,
|
|
114
|
+
children: children
|
|
115
|
+
}) : formSchema ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
109
116
|
className: "min-h-0 flex-1 overflow-auto",
|
|
110
117
|
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
111
|
-
style:
|
|
112
|
-
...SURFACE_REMAP,
|
|
113
|
-
'--mf-content-inset': contentInset
|
|
114
|
-
},
|
|
118
|
+
style: SURFACE_REMAP,
|
|
115
119
|
className: "[&_label]:text-foreground-muted",
|
|
116
120
|
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(apollo_wind_namespaceObject.MetadataForm, {
|
|
117
121
|
schema: formSchema,
|
|
@@ -123,7 +127,7 @@ function NodePropertyPanel({ panelTitle, onClose, nodeIcon, nodeLabel, nodeCateg
|
|
|
123
127
|
}, resetKey)
|
|
124
128
|
})
|
|
125
129
|
}) : /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
126
|
-
className: "
|
|
130
|
+
className: "py-4 text-xs text-foreground-subtle [padding-inline:var(--mf-content-inset,1.5rem)]",
|
|
127
131
|
children: "No form schema defined for this node."
|
|
128
132
|
})
|
|
129
133
|
]
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { NodePropertyPanelProps } from './NodePropertyPanel.types';
|
|
2
|
-
export declare function NodePropertyPanel({ panelTitle, onClose, nodeIcon, nodeLabel, nodeCategory, action, schema, plugins, onSubmit, disabled, resetKey, className, contentInset, }: NodePropertyPanelProps): import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare function NodePropertyPanel({ panelTitle, onClose, nodeIcon, nodeLabel, nodeCategory, action, schema, plugins, onSubmit, disabled, resetKey, className, contentInset, children, }: NodePropertyPanelProps): import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
//# sourceMappingURL=NodePropertyPanel.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NodePropertyPanel.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/NodePropertyPanel/NodePropertyPanel.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AAiCxE,wBAAgB,iBAAiB,CAAC,EAChC,UAAU,EACV,OAAO,EACP,QAAQ,EACR,SAAS,EACT,YAAY,EACZ,MAAM,EACN,MAAM,EACN,OAAO,EACP,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,SAAS,EACT,YAAuB,
|
|
1
|
+
{"version":3,"file":"NodePropertyPanel.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/NodePropertyPanel/NodePropertyPanel.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AAiCxE,wBAAgB,iBAAiB,CAAC,EAChC,UAAU,EACV,OAAO,EACP,QAAQ,EACR,SAAS,EACT,YAAY,EACZ,MAAM,EACN,MAAM,EACN,OAAO,EACP,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,SAAS,EACT,YAAuB,EACvB,QAAQ,GACT,EAAE,sBAAsB,2CA6FxB"}
|
|
@@ -5,7 +5,7 @@ import { useMemo } from "react";
|
|
|
5
5
|
const SURFACE_REMAP = {
|
|
6
6
|
'--surface-raised': 'var(--surface-overlay)'
|
|
7
7
|
};
|
|
8
|
-
function NodePropertyPanel({ panelTitle, onClose, nodeIcon, nodeLabel, nodeCategory, action, schema, plugins, onSubmit, disabled, resetKey, className, contentInset = '1.5rem' }) {
|
|
8
|
+
function NodePropertyPanel({ panelTitle, onClose, nodeIcon, nodeLabel, nodeCategory, action, schema, plugins, onSubmit, disabled, resetKey, className, contentInset = '1.5rem', children }) {
|
|
9
9
|
const hasNodeHeader = !!(nodeLabel || nodeCategory || nodeIcon || action);
|
|
10
10
|
const formSchema = useMemo(()=>schema && void 0 === schema.actions ? {
|
|
11
11
|
...schema,
|
|
@@ -15,9 +15,12 @@ function NodePropertyPanel({ panelTitle, onClose, nodeIcon, nodeLabel, nodeCateg
|
|
|
15
15
|
]);
|
|
16
16
|
return /*#__PURE__*/ jsxs("div", {
|
|
17
17
|
className: cn('flex min-h-0 flex-col bg-surface-raised', className),
|
|
18
|
+
style: {
|
|
19
|
+
'--mf-content-inset': contentInset
|
|
20
|
+
},
|
|
18
21
|
children: [
|
|
19
22
|
panelTitle && /*#__PURE__*/ jsxs("div", {
|
|
20
|
-
className: "flex h-10 shrink-0 items-center justify-between
|
|
23
|
+
className: "flex h-10 shrink-0 items-center justify-between px-2",
|
|
21
24
|
children: [
|
|
22
25
|
/*#__PURE__*/ jsxs("div", {
|
|
23
26
|
className: "flex items-center gap-1",
|
|
@@ -47,10 +50,10 @@ function NodePropertyPanel({ panelTitle, onClose, nodeIcon, nodeLabel, nodeCateg
|
|
|
47
50
|
]
|
|
48
51
|
}),
|
|
49
52
|
hasNodeHeader && /*#__PURE__*/ jsxs("div", {
|
|
50
|
-
className: "flex shrink-0 items-center justify-between gap-4
|
|
53
|
+
className: "flex shrink-0 items-center justify-between gap-4 py-4 [padding-inline:var(--mf-content-inset,1.5rem)]",
|
|
51
54
|
children: [
|
|
52
55
|
/*#__PURE__*/ jsxs("div", {
|
|
53
|
-
className: "flex min-w-0 flex-1 items-center gap-3",
|
|
56
|
+
className: "flex min-w-0 flex-1 items-center gap-3.5",
|
|
54
57
|
children: [
|
|
55
58
|
nodeIcon && /*#__PURE__*/ jsx("div", {
|
|
56
59
|
className: "grid size-11 shrink-0 place-items-center rounded-xl bg-surface-overlay text-foreground-subtle [&>svg]:size-5",
|
|
@@ -60,11 +63,11 @@ function NodePropertyPanel({ panelTitle, onClose, nodeIcon, nodeLabel, nodeCateg
|
|
|
60
63
|
className: "flex min-w-0 flex-1 flex-col justify-center",
|
|
61
64
|
children: [
|
|
62
65
|
nodeLabel && /*#__PURE__*/ jsx("span", {
|
|
63
|
-
className: "block truncate text-
|
|
66
|
+
className: "block truncate text-base font-semibold leading-5 tracking-[-0.3px] text-foreground",
|
|
64
67
|
children: nodeLabel
|
|
65
68
|
}),
|
|
66
69
|
nodeCategory && /*#__PURE__*/ jsx("span", {
|
|
67
|
-
className: "block truncate text-
|
|
70
|
+
className: "block truncate text-xs leading-4 text-foreground-muted",
|
|
68
71
|
children: nodeCategory
|
|
69
72
|
})
|
|
70
73
|
]
|
|
@@ -77,13 +80,14 @@ function NodePropertyPanel({ panelTitle, onClose, nodeIcon, nodeLabel, nodeCateg
|
|
|
77
80
|
})
|
|
78
81
|
]
|
|
79
82
|
}),
|
|
80
|
-
|
|
83
|
+
children ? /*#__PURE__*/ jsx("div", {
|
|
84
|
+
className: "min-h-0 flex-1 overflow-auto",
|
|
85
|
+
style: SURFACE_REMAP,
|
|
86
|
+
children: children
|
|
87
|
+
}) : formSchema ? /*#__PURE__*/ jsx("div", {
|
|
81
88
|
className: "min-h-0 flex-1 overflow-auto",
|
|
82
89
|
children: /*#__PURE__*/ jsx("div", {
|
|
83
|
-
style:
|
|
84
|
-
...SURFACE_REMAP,
|
|
85
|
-
'--mf-content-inset': contentInset
|
|
86
|
-
},
|
|
90
|
+
style: SURFACE_REMAP,
|
|
87
91
|
className: "[&_label]:text-foreground-muted",
|
|
88
92
|
children: /*#__PURE__*/ jsx(MetadataForm, {
|
|
89
93
|
schema: formSchema,
|
|
@@ -95,7 +99,7 @@ function NodePropertyPanel({ panelTitle, onClose, nodeIcon, nodeLabel, nodeCateg
|
|
|
95
99
|
}, resetKey)
|
|
96
100
|
})
|
|
97
101
|
}) : /*#__PURE__*/ jsx("div", {
|
|
98
|
-
className: "
|
|
102
|
+
className: "py-4 text-xs text-foreground-subtle [padding-inline:var(--mf-content-inset,1.5rem)]",
|
|
99
103
|
children: "No form schema defined for this node."
|
|
100
104
|
})
|
|
101
105
|
]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NodePropertyPanel.types.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/NodePropertyPanel/NodePropertyPanel.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAClE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,MAAM,WAAW,sBAAsB;IAKrC,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IAErB,QAAQ,CAAC,EAAE,SAAS,CAAC;IAErB,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB,MAAM,CAAC,EAAE,SAAS,CAAC;IAMnB,MAAM,CAAC,EAAE,UAAU,CAAC;IAMpB,OAAO,CAAC,EAAE,UAAU,EAAE,CAAC;IAEvB,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAEnD,QAAQ,CAAC,EAAE,OAAO,CAAC;IAMnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IAMnB,YAAY,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"NodePropertyPanel.types.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/NodePropertyPanel/NodePropertyPanel.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAClE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,MAAM,WAAW,sBAAsB;IAKrC,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IAErB,QAAQ,CAAC,EAAE,SAAS,CAAC;IAErB,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB,MAAM,CAAC,EAAE,SAAS,CAAC;IAMnB,MAAM,CAAC,EAAE,UAAU,CAAC;IAMpB,OAAO,CAAC,EAAE,UAAU,EAAE,CAAC;IAEvB,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAEnD,QAAQ,CAAC,EAAE,OAAO,CAAC;IAMnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IAMnB,YAAY,CAAC,EAAE,MAAM,CAAC;IAQtB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB"}
|
|
@@ -24,11 +24,15 @@ var __webpack_require__ = {};
|
|
|
24
24
|
var __webpack_exports__ = {};
|
|
25
25
|
__webpack_require__.r(__webpack_exports__);
|
|
26
26
|
__webpack_require__.d(__webpack_exports__, {
|
|
27
|
-
NodePropertyPanel: ()=>external_NodePropertyPanel_cjs_namespaceObject.NodePropertyPanel
|
|
27
|
+
NodePropertyPanel: ()=>external_NodePropertyPanel_cjs_namespaceObject.NodePropertyPanel,
|
|
28
|
+
ExpressionField: ()=>external_ExpressionField_cjs_namespaceObject.ExpressionField
|
|
28
29
|
});
|
|
30
|
+
const external_ExpressionField_cjs_namespaceObject = require("./ExpressionField.cjs");
|
|
29
31
|
const external_NodePropertyPanel_cjs_namespaceObject = require("./NodePropertyPanel.cjs");
|
|
32
|
+
exports.ExpressionField = __webpack_exports__.ExpressionField;
|
|
30
33
|
exports.NodePropertyPanel = __webpack_exports__.NodePropertyPanel;
|
|
31
34
|
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
35
|
+
"ExpressionField",
|
|
32
36
|
"NodePropertyPanel"
|
|
33
37
|
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
34
38
|
Object.defineProperty(exports, '__esModule', {
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
export type { ExpressionFieldProps, ExpressionMode } from './ExpressionField';
|
|
2
|
+
export { ExpressionField } from './ExpressionField';
|
|
1
3
|
export { NodePropertyPanel } from './NodePropertyPanel';
|
|
2
4
|
export type { NodePropertyPanelProps } from './NodePropertyPanel.types';
|
|
3
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/NodePropertyPanel/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,YAAY,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/NodePropertyPanel/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,oBAAoB,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAC9E,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,YAAY,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC"}
|