@banyan_cloud/roots 1.0.110 → 1.0.112
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/cjs/index.js +28 -37
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +28 -37
- package/dist/esm/index.js.map +1 -1
- package/dist/index.js +28 -37
- package/package.json +1 -1
package/dist/cjs/index.js
CHANGED
|
@@ -46819,8 +46819,8 @@ HierarchyBrowser.defaultProps = {
|
|
|
46819
46819
|
title: 'Browser'
|
|
46820
46820
|
};
|
|
46821
46821
|
|
|
46822
|
-
var css$F = ".
|
|
46823
|
-
var modules_f23ae002 = {"root":"
|
|
46822
|
+
var css$F = ".BaseModal_module_root__22dbeb47 {\n display: flex;\n flex-direction: column;\n justify-content: flex-start;\n align-items: stretch;\n top: 50%;\n left: 50%;\n right: auto;\n bottom: auto;\n transform: translate(-50%, -50%);\n max-height: 100%;\n height: 43.75rem;\n width: 62.5rem;\n position: fixed;\n background: #ffffff;\n box-shadow: 4px 4px 4px rgba(0, 0, 0, 0.13);\n border-radius: 8px;\n outline: none;\n}\n.BaseModal_module_root__22dbeb47 .BaseModal_module_body__22dbeb47 {\n overflow-y: scroll;\n padding: 1rem 2rem 1rem 2rem;\n}\n.BaseModal_module_root__22dbeb47 .BaseModal_module_header__22dbeb47,\n.BaseModal_module_root__22dbeb47 .BaseModal_module_footer__22dbeb47 {\n padding: 1rem;\n}\n.BaseModal_module_root__22dbeb47 .BaseModal_module_header__22dbeb47 {\n font-weight: 500;\n font-size: 1.375rem;\n border-bottom: 1px solid var(--grey4);\n}\n.BaseModal_module_root__22dbeb47 .BaseModal_module_footer__22dbeb47 {\n margin-top: auto;\n background: var(--grey6);\n border-radius: 0 0 8px 8px;\n display: flex;\n flex-direction: row;\n justify-content: flex-end;\n align-items: center;\n gap: 0.625rem;\n}\n.BaseModal_module_root__22dbeb47 button.BaseModal_module_close__22dbeb47 {\n position: absolute;\n right: 1rem;\n top: 1rem;\n padding: 0.25rem;\n height: auto;\n background: var(--grey6);\n}\n.BaseModal_module_root__22dbeb47 button.BaseModal_module_close__22dbeb47 .BaseModal_module_icon__22dbeb47 {\n width: 1.5rem;\n height: 1.5rem;\n fill: var(--black);\n}";
|
|
46823
|
+
var modules_f23ae002 = {"root":"BaseModal_module_root__22dbeb47","body":"BaseModal_module_body__22dbeb47","header":"BaseModal_module_header__22dbeb47","footer":"BaseModal_module_footer__22dbeb47","close":"BaseModal_module_close__22dbeb47","icon":"BaseModal_module_icon__22dbeb47"};
|
|
46824
46824
|
n(css$F,{});
|
|
46825
46825
|
|
|
46826
46826
|
var BaseModal = function BaseModal(props) {
|
|
@@ -47632,8 +47632,8 @@ TableCell.defaultProps = _objectSpread2(_objectSpread2({}, BaseCell.defaultProps
|
|
|
47632
47632
|
onSort: function onSort() {}
|
|
47633
47633
|
});
|
|
47634
47634
|
|
|
47635
|
-
var css$x = ".
|
|
47636
|
-
var modules_f6618a87 = {"root":"
|
|
47635
|
+
var css$x = ".TableRow_module_root__56f50f2c {\n display: flex;\n flex-direction: row;\n justify-content: flex-start;\n align-items: center;\n}\n.TableRow_module_root__56f50f2c.TableRow_module_headerRow__56f50f2c {\n background: var(--grey6);\n}\n.TableRow_module_root__56f50f2c.TableRow_module_headerRow__56f50f2c > [data-elem=base-cell].TableRow_module_expandableCell__56f50f2c {\n background: transparent;\n}\n.TableRow_module_root__56f50f2c.TableRow_module_headerRow__56f50f2c > [data-elem=base-cell].TableRow_module_expandableCell__56f50f2c > [data-elem=component2] {\n width: 3rem;\n visibility: hidden;\n}\n.TableRow_module_root__56f50f2c.TableRow_module_bodyRow__56f50f2c {\n background: var(--white);\n}\n.TableRow_module_root__56f50f2c.TableRow_module_bodyRow__56f50f2c > [data-elem=base-cell] {\n background: var(--white);\n}\n.TableRow_module_root__56f50f2c.TableRow_module_bodyRow__56f50f2c:hover > [data-elem=base-cell] {\n background: var(--info-bg);\n}\n.TableRow_module_root__56f50f2c.TableRow_module_bodyRow__56f50f2c[data-active=true] > [data-elem=base-cell] {\n background: var(--background);\n}\n.TableRow_module_root__56f50f2c > [data-elem=base-cell]:first-child {\n padding-left: 1rem;\n}\n.TableRow_module_root__56f50f2c > [data-elem=base-cell]:last-child {\n padding-right: 1rem;\n}\n.TableRow_module_root__56f50f2c.TableRow_module_rowHeightMd__56f50f2c > td[data-elem=base-cell] {\n height: 3rem;\n}\n.TableRow_module_root__56f50f2c.TableRow_module_rowHeightLg__56f50f2c > td[data-elem=base-cell] {\n height: 4rem;\n}\n.TableRow_module_root__56f50f2c > [data-elem=base-cell].TableRow_module_expandableCell__56f50f2c {\n padding-left: 0.9rem;\n padding-right: 0.1rem;\n overflow: visible;\n}\n.TableRow_module_root__56f50f2c > [data-elem=base-cell].TableRow_module_expandableCell__56f50f2c > [data-elem=component2] {\n overflow: visible;\n}\n.TableRow_module_root__56f50f2c > [data-elem=base-cell].TableRow_module_expandableCell__56f50f2c > [data-elem=component2] > [data-elem=text] {\n overflow: visible;\n}\n.TableRow_module_root__56f50f2c button.TableRow_module_button__56f50f2c[data-elem=base-cell] .TableRow_module_icon__56f50f2c {\n width: 1.5rem;\n height: 1.5rem;\n}\n.TableRow_module_root__56f50f2c button.TableRow_module_button__56f50f2c[data-elem=base-cell]:disabled {\n cursor: default;\n}\n.TableRow_module_root__56f50f2c button.TableRow_module_button__56f50f2c[data-elem=base-cell]:disabled .TableRow_module_icon__56f50f2c {\n visibility: hidden;\n}\n.TableRow_module_root__56f50f2c .TableRow_module_expanded__56f50f2c .TableRow_module_button__56f50f2c .TableRow_module_icon__56f50f2c {\n transform: rotate(180deg);\n}";
|
|
47636
|
+
var modules_f6618a87 = {"root":"TableRow_module_root__56f50f2c","header-row":"TableRow_module_headerRow__56f50f2c","expandable-cell":"TableRow_module_expandableCell__56f50f2c","body-row":"TableRow_module_bodyRow__56f50f2c","row-height-md":"TableRow_module_rowHeightMd__56f50f2c","row-height-lg":"TableRow_module_rowHeightLg__56f50f2c","button":"TableRow_module_button__56f50f2c","icon":"TableRow_module_icon__56f50f2c","expanded":"TableRow_module_expanded__56f50f2c"};
|
|
47637
47637
|
n(css$x,{});
|
|
47638
47638
|
|
|
47639
47639
|
var TableRow = /*#__PURE__*/React.forwardRef(function BaseTable(props, ref) {
|
|
@@ -47652,6 +47652,19 @@ var TableRow = /*#__PURE__*/React.forwardRef(function BaseTable(props, ref) {
|
|
|
47652
47652
|
_useState2 = _slicedToArray(_useState, 2),
|
|
47653
47653
|
expanded = _useState2[0],
|
|
47654
47654
|
setExpanded = _useState2[1];
|
|
47655
|
+
var expandableProps = Expandable ? {
|
|
47656
|
+
_expanded: expanded,
|
|
47657
|
+
_setExpanded: setExpanded,
|
|
47658
|
+
disabled: !Expandable({
|
|
47659
|
+
datum: datum,
|
|
47660
|
+
index: _index
|
|
47661
|
+
}),
|
|
47662
|
+
onClick: function onClick() {
|
|
47663
|
+
setExpanded(function (prev) {
|
|
47664
|
+
return !prev;
|
|
47665
|
+
});
|
|
47666
|
+
}
|
|
47667
|
+
} : {};
|
|
47655
47668
|
var tableCells = headerData === null || headerData === void 0 ? void 0 : (_headerData$map = headerData.map) === null || _headerData$map === void 0 ? void 0 : _headerData$map.call(headerData, function (item) {
|
|
47656
47669
|
var _getCustomCell;
|
|
47657
47670
|
var cellContent = null;
|
|
@@ -47662,6 +47675,7 @@ var TableRow = /*#__PURE__*/React.forwardRef(function BaseTable(props, ref) {
|
|
|
47662
47675
|
}
|
|
47663
47676
|
var cellProps = _objectSpread2(_objectSpread2(_objectSpread2({}, props), item), {}, {
|
|
47664
47677
|
_index: _index,
|
|
47678
|
+
expandableProps: expandableProps,
|
|
47665
47679
|
setActiveId: setActiveId,
|
|
47666
47680
|
key: item.id,
|
|
47667
47681
|
datum: datum,
|
|
@@ -47684,38 +47698,12 @@ var TableRow = /*#__PURE__*/React.forwardRef(function BaseTable(props, ref) {
|
|
|
47684
47698
|
);
|
|
47685
47699
|
});
|
|
47686
47700
|
return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
47687
|
-
children: [/*#__PURE__*/jsxRuntime.
|
|
47701
|
+
children: [/*#__PURE__*/jsxRuntime.jsx("tr", {
|
|
47688
47702
|
ref: ref,
|
|
47689
47703
|
tabIndex: -1,
|
|
47690
47704
|
"data-elem": "table-row",
|
|
47691
|
-
className: classes(className, modules_f6618a87.root, modules_f6618a87["".concat(type, "-row")], modules_f6618a87["row-height-".concat(rowHeight)]
|
|
47692
|
-
children:
|
|
47693
|
-
className: classes(modules_f6618a87['expandable-cell'], expanded ? modules_f6618a87.expanded : ''),
|
|
47694
|
-
size: "auto",
|
|
47695
|
-
cellContent: null
|
|
47696
|
-
}), Expandable && type === 'body' && /*#__PURE__*/jsxRuntime.jsx(TableCell, {
|
|
47697
|
-
className: classes(modules_f6618a87['expandable-cell'], expanded ? modules_f6618a87.expanded : ''),
|
|
47698
|
-
size: "auto",
|
|
47699
|
-
cellContent: /*#__PURE__*/jsxRuntime.jsx(Button, {
|
|
47700
|
-
className: modules_f6618a87.button,
|
|
47701
|
-
size: "auto",
|
|
47702
|
-
variant: "text",
|
|
47703
|
-
disabled: !Expandable({
|
|
47704
|
-
datum: datum,
|
|
47705
|
-
index: _index
|
|
47706
|
-
}),
|
|
47707
|
-
onClick: function onClick() {
|
|
47708
|
-
setExpanded(function (prev) {
|
|
47709
|
-
return !prev;
|
|
47710
|
-
});
|
|
47711
|
-
},
|
|
47712
|
-
leftComponent: function leftComponent() {
|
|
47713
|
-
return /*#__PURE__*/jsxRuntime.jsx(Caret, {
|
|
47714
|
-
className: modules_f6618a87.icon
|
|
47715
|
-
});
|
|
47716
|
-
}
|
|
47717
|
-
})
|
|
47718
|
-
}), tableCells]
|
|
47705
|
+
className: classes(className, modules_f6618a87.root, modules_f6618a87["".concat(type, "-row")], modules_f6618a87["row-height-".concat(rowHeight)]),
|
|
47706
|
+
children: tableCells
|
|
47719
47707
|
}), Expandable && expanded && /*#__PURE__*/jsxRuntime.jsx("tr", {
|
|
47720
47708
|
children: /*#__PURE__*/jsxRuntime.jsx(Expandable, {
|
|
47721
47709
|
datum: datum,
|
|
@@ -47781,13 +47769,16 @@ var TableBody = function TableBody(props) {
|
|
|
47781
47769
|
var key = datum === null || datum === void 0 ? void 0 : datum.uuid;
|
|
47782
47770
|
var setActiveId = function setActiveId() {
|
|
47783
47771
|
var reset = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
|
47772
|
+
var multiSelect = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
47784
47773
|
if (reset) {
|
|
47785
47774
|
listRef.current[_index].removeAttribute('data-active');
|
|
47786
47775
|
} else {
|
|
47787
|
-
|
|
47788
|
-
|
|
47789
|
-
|
|
47790
|
-
|
|
47776
|
+
if (!multiSelect) {
|
|
47777
|
+
var _listRef$current;
|
|
47778
|
+
(_listRef$current = listRef.current) === null || _listRef$current === void 0 ? void 0 : _listRef$current.forEach(function (elem) {
|
|
47779
|
+
elem.removeAttribute('data-active');
|
|
47780
|
+
});
|
|
47781
|
+
}
|
|
47791
47782
|
listRef.current[_index].setAttribute('data-active', true);
|
|
47792
47783
|
}
|
|
47793
47784
|
};
|