@oliasoft-open-source/react-ui-library 3.9.21 → 3.9.23
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/index.js +30 -9
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -16121,7 +16121,8 @@ const Drawer = ({
|
|
|
16121
16121
|
setActiveTab: setActiveTabProp,
|
|
16122
16122
|
testId,
|
|
16123
16123
|
onResize,
|
|
16124
|
-
getActiveTab
|
|
16124
|
+
getActiveTab,
|
|
16125
|
+
onClose
|
|
16125
16126
|
}) => {
|
|
16126
16127
|
const isStandardButton = button2 === true;
|
|
16127
16128
|
const isCustomButton = !isStandardButton && isValidElement(button2);
|
|
@@ -16132,6 +16133,7 @@ const Drawer = ({
|
|
|
16132
16133
|
const handleTabClick = (index2) => {
|
|
16133
16134
|
if (activeTab === index2 && open) {
|
|
16134
16135
|
setOpen(false);
|
|
16136
|
+
onClose(index2);
|
|
16135
16137
|
} else if (!open) {
|
|
16136
16138
|
setOpen(true);
|
|
16137
16139
|
if (onResize && width < MIN_OPEN_WIDTH) {
|
|
@@ -16210,7 +16212,8 @@ Drawer.defaultProps = {
|
|
|
16210
16212
|
setActiveTab: void 0,
|
|
16211
16213
|
testId: void 0,
|
|
16212
16214
|
onResize: null,
|
|
16213
|
-
getActiveTab: null
|
|
16215
|
+
getActiveTab: null,
|
|
16216
|
+
onClose: null
|
|
16214
16217
|
};
|
|
16215
16218
|
Drawer.propTypes = {
|
|
16216
16219
|
background: propTypes$1.exports.string,
|
|
@@ -16245,7 +16248,8 @@ Drawer.propTypes = {
|
|
|
16245
16248
|
activeTab: propTypes$1.exports.number,
|
|
16246
16249
|
setActiveTab: propTypes$1.exports.func,
|
|
16247
16250
|
onResize: propTypes$1.exports.func,
|
|
16248
|
-
getActiveTab: propTypes$1.exports.func
|
|
16251
|
+
getActiveTab: propTypes$1.exports.func,
|
|
16252
|
+
onClose: propTypes$1.exports.func
|
|
16249
16253
|
};
|
|
16250
16254
|
const empty$2 = "_empty_1pswm_335";
|
|
16251
16255
|
const text$2 = "_text_1pswm_345";
|
|
@@ -74119,7 +74123,8 @@ const TreeItem = ({
|
|
|
74119
74123
|
hasChild,
|
|
74120
74124
|
draggable: draggable2
|
|
74121
74125
|
}) => {
|
|
74122
|
-
const {
|
|
74126
|
+
const { id: id2, data } = node;
|
|
74127
|
+
const { active: active2, testId, onClick } = data;
|
|
74123
74128
|
const handleToggle = (e2) => {
|
|
74124
74129
|
e2.stopPropagation();
|
|
74125
74130
|
onToggle(id2);
|
|
@@ -74158,7 +74163,7 @@ const TreeItem = ({
|
|
|
74158
74163
|
})
|
|
74159
74164
|
}),
|
|
74160
74165
|
/* @__PURE__ */ jsxRuntime.exports.jsx(MetaContent, {
|
|
74161
|
-
item:
|
|
74166
|
+
item: data
|
|
74162
74167
|
}),
|
|
74163
74168
|
/* @__PURE__ */ jsxRuntime.exports.jsx("div", {
|
|
74164
74169
|
className: listStyles.actions,
|
|
@@ -74186,14 +74191,30 @@ const Tree = ({
|
|
|
74186
74191
|
}) => {
|
|
74187
74192
|
const handleDrop = (newTree) => {
|
|
74188
74193
|
if (onListReorder) {
|
|
74189
|
-
|
|
74194
|
+
const newList = newTree.map(({ id: id2, parent, droppable: droppable2, data }) => ({
|
|
74195
|
+
id: id2,
|
|
74196
|
+
parent,
|
|
74197
|
+
droppable: droppable2,
|
|
74198
|
+
...data
|
|
74199
|
+
}));
|
|
74200
|
+
onListReorder(newList);
|
|
74190
74201
|
}
|
|
74191
74202
|
};
|
|
74192
74203
|
const handleOpen = (id2) => {
|
|
74193
|
-
if (
|
|
74204
|
+
if (onChangeOpen) {
|
|
74194
74205
|
onChangeOpen(id2);
|
|
74195
74206
|
}
|
|
74196
74207
|
};
|
|
74208
|
+
const tree2 = list2.items.map(({ id: id2, droppable: droppable2, parent, name: name2, ...rest }) => ({
|
|
74209
|
+
id: id2,
|
|
74210
|
+
text: name2,
|
|
74211
|
+
droppable: droppable2,
|
|
74212
|
+
parent,
|
|
74213
|
+
data: {
|
|
74214
|
+
name: name2,
|
|
74215
|
+
...rest
|
|
74216
|
+
}
|
|
74217
|
+
}));
|
|
74197
74218
|
return /* @__PURE__ */ jsxRuntime.exports.jsxs("div", {
|
|
74198
74219
|
"data-testid": testId,
|
|
74199
74220
|
children: [
|
|
@@ -74209,11 +74230,11 @@ const Tree = ({
|
|
|
74209
74230
|
context: window,
|
|
74210
74231
|
children: /* @__PURE__ */ jsxRuntime.exports.jsx(Tree$1, {
|
|
74211
74232
|
ref: treeRef,
|
|
74212
|
-
tree:
|
|
74233
|
+
tree: tree2,
|
|
74213
74234
|
sort: false,
|
|
74214
74235
|
insertDroppableFirst: false,
|
|
74215
74236
|
canDrag: () => draggable2,
|
|
74216
|
-
canDrop: (
|
|
74237
|
+
canDrop: (tree22, { dragSource, dropTargetId }) => {
|
|
74217
74238
|
if ((dragSource == null ? void 0 : dragSource.parent) === dropTargetId) {
|
|
74218
74239
|
return true;
|
|
74219
74240
|
}
|