@uipath/apollo-react 3.28.0 → 3.29.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.
|
@@ -52,7 +52,7 @@ const external_StickyNoteNode_types_cjs_namespaceObject = require("./StickyNoteN
|
|
|
52
52
|
const minWidth = 8 * external_constants_cjs_namespaceObject.GRID_SPACING;
|
|
53
53
|
const minHeight = 8 * external_constants_cjs_namespaceObject.GRID_SPACING;
|
|
54
54
|
const StickyNoteNodeComponent = ({ id, data, selected, dragging, placeholder = 'Add text', renderPlaceholderOnSelect = false })=>{
|
|
55
|
-
const { updateNodeData } = (0, react_cjs_namespaceObject.useReactFlow)();
|
|
55
|
+
const { updateNodeData, deleteElements } = (0, react_cjs_namespaceObject.useReactFlow)();
|
|
56
56
|
const [isEditing, setIsEditing] = (0, external_react_namespaceObject.useState)(data.autoFocus ?? false);
|
|
57
57
|
const [isResizing, setIsResizing] = (0, external_react_namespaceObject.useState)(false);
|
|
58
58
|
const [isColorPickerOpen, setIsColorPickerOpen] = (0, external_react_namespaceObject.useState)(false);
|
|
@@ -146,6 +146,18 @@ const StickyNoteNodeComponent = ({ id, data, selected, dragging, placeholder = '
|
|
|
146
146
|
}
|
|
147
147
|
}, 0);
|
|
148
148
|
}, []);
|
|
149
|
+
const handleDelete = (0, external_react_namespaceObject.useCallback)(()=>{
|
|
150
|
+
deleteElements({
|
|
151
|
+
nodes: [
|
|
152
|
+
{
|
|
153
|
+
id
|
|
154
|
+
}
|
|
155
|
+
]
|
|
156
|
+
});
|
|
157
|
+
}, [
|
|
158
|
+
id,
|
|
159
|
+
deleteElements
|
|
160
|
+
]);
|
|
149
161
|
const markdownComponents = (0, external_react_namespaceObject.useMemo)(()=>({
|
|
150
162
|
a: ({ href, children, ...props })=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("a", {
|
|
151
163
|
...props,
|
|
@@ -163,6 +175,15 @@ const StickyNoteNodeComponent = ({ id, data, selected, dragging, placeholder = '
|
|
|
163
175
|
}), []);
|
|
164
176
|
const toolbarConfig = (0, external_react_namespaceObject.useMemo)(()=>{
|
|
165
177
|
const actions = [
|
|
178
|
+
{
|
|
179
|
+
id: 'delete',
|
|
180
|
+
icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(index_cjs_namespaceObject.ApIcon, {
|
|
181
|
+
variant: "outlined",
|
|
182
|
+
name: "delete"
|
|
183
|
+
}),
|
|
184
|
+
label: 'Delete',
|
|
185
|
+
onAction: handleDelete
|
|
186
|
+
},
|
|
166
187
|
{
|
|
167
188
|
id: 'edit',
|
|
168
189
|
icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(index_cjs_namespaceObject.ApIcon, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StickyNoteNode.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/StickyNoteNode/StickyNoteNode.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,0CAA0C,CAAC;AAuB1E,OAAO,KAAK,EAAmB,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAG9E,MAAM,WAAW,mBAAoB,SAAQ,SAAS;IACpD,IAAI,EAAE,cAAc,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,yBAAyB,CAAC,EAAE,OAAO,CAAC;CACrC;
|
|
1
|
+
{"version":3,"file":"StickyNoteNode.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/StickyNoteNode/StickyNoteNode.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,0CAA0C,CAAC;AAuB1E,OAAO,KAAK,EAAmB,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAG9E,MAAM,WAAW,mBAAoB,SAAQ,SAAS;IACpD,IAAI,EAAE,cAAc,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,yBAAyB,CAAC,EAAE,OAAO,CAAC;CACrC;AA8TD,eAAO,MAAM,cAAc,kHAlTxB,mBAAmB,6CAkTqC,CAAC"}
|
|
@@ -13,7 +13,7 @@ import { STICKY_NOTE_COLORS, withAlpha } from "./StickyNoteNode.types.js";
|
|
|
13
13
|
const minWidth = 8 * GRID_SPACING;
|
|
14
14
|
const minHeight = 8 * GRID_SPACING;
|
|
15
15
|
const StickyNoteNodeComponent = ({ id, data, selected, dragging, placeholder = 'Add text', renderPlaceholderOnSelect = false })=>{
|
|
16
|
-
const { updateNodeData } = useReactFlow();
|
|
16
|
+
const { updateNodeData, deleteElements } = useReactFlow();
|
|
17
17
|
const [isEditing, setIsEditing] = useState(data.autoFocus ?? false);
|
|
18
18
|
const [isResizing, setIsResizing] = useState(false);
|
|
19
19
|
const [isColorPickerOpen, setIsColorPickerOpen] = useState(false);
|
|
@@ -107,6 +107,18 @@ const StickyNoteNodeComponent = ({ id, data, selected, dragging, placeholder = '
|
|
|
107
107
|
}
|
|
108
108
|
}, 0);
|
|
109
109
|
}, []);
|
|
110
|
+
const handleDelete = useCallback(()=>{
|
|
111
|
+
deleteElements({
|
|
112
|
+
nodes: [
|
|
113
|
+
{
|
|
114
|
+
id
|
|
115
|
+
}
|
|
116
|
+
]
|
|
117
|
+
});
|
|
118
|
+
}, [
|
|
119
|
+
id,
|
|
120
|
+
deleteElements
|
|
121
|
+
]);
|
|
110
122
|
const markdownComponents = useMemo(()=>({
|
|
111
123
|
a: ({ href, children, ...props })=>/*#__PURE__*/ jsx("a", {
|
|
112
124
|
...props,
|
|
@@ -124,6 +136,15 @@ const StickyNoteNodeComponent = ({ id, data, selected, dragging, placeholder = '
|
|
|
124
136
|
}), []);
|
|
125
137
|
const toolbarConfig = useMemo(()=>{
|
|
126
138
|
const actions = [
|
|
139
|
+
{
|
|
140
|
+
id: 'delete',
|
|
141
|
+
icon: /*#__PURE__*/ jsx(ApIcon, {
|
|
142
|
+
variant: "outlined",
|
|
143
|
+
name: "delete"
|
|
144
|
+
}),
|
|
145
|
+
label: 'Delete',
|
|
146
|
+
onAction: handleDelete
|
|
147
|
+
},
|
|
127
148
|
{
|
|
128
149
|
id: 'edit',
|
|
129
150
|
icon: /*#__PURE__*/ jsx(ApIcon, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uipath/apollo-react",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.29.0",
|
|
4
4
|
"description": "Apollo Design System - React component library with Material UI theming",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -199,7 +199,7 @@
|
|
|
199
199
|
"zod": "^4.3.5",
|
|
200
200
|
"zustand": "^5.0.9",
|
|
201
201
|
"@uipath/apollo-core": "5.7.0",
|
|
202
|
-
"@uipath/apollo-wind": "0.8.
|
|
202
|
+
"@uipath/apollo-wind": "0.8.1"
|
|
203
203
|
},
|
|
204
204
|
"devDependencies": {
|
|
205
205
|
"@lingui/cli": "^5.6.1",
|