@banyan_cloud/roots 1.0.27 → 1.0.29
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 +32 -12
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +32 -12
- package/dist/esm/index.js.map +1 -1
- package/dist/index.js +32 -12
- package/package.json +1 -1
package/dist/cjs/index.js
CHANGED
|
@@ -36462,7 +36462,8 @@ var TableFilters = function TableFilters(props) {
|
|
|
36462
36462
|
headerData = props.headerData,
|
|
36463
36463
|
hiddenColumns = props.hiddenColumns,
|
|
36464
36464
|
setHiddenColumns = props.setHiddenColumns,
|
|
36465
|
-
loading = props.loading
|
|
36465
|
+
loading = props.loading,
|
|
36466
|
+
disabledFilterOptions = props.disabledFilterOptions;
|
|
36466
36467
|
var _useState = React.useState(false),
|
|
36467
36468
|
_useState2 = _slicedToArray(_useState, 2),
|
|
36468
36469
|
openColumns = _useState2[0],
|
|
@@ -36471,6 +36472,11 @@ var TableFilters = function TableFilters(props) {
|
|
|
36471
36472
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
36472
36473
|
anchorEl = _useState4[0],
|
|
36473
36474
|
setAnchorEl = _useState4[1];
|
|
36475
|
+
var disabledFilterButton = disabledFilterOptions.filterButton,
|
|
36476
|
+
disabledRefresh = disabledFilterOptions.refresh,
|
|
36477
|
+
disabledColumnFilter = disabledFilterOptions.columnFilter,
|
|
36478
|
+
disabledSettings = disabledFilterOptions.settings;
|
|
36479
|
+
var hideRightOptions = disabledColumnFilter && disabledRefresh && disabledSettings;
|
|
36474
36480
|
if (loading) {
|
|
36475
36481
|
return /*#__PURE__*/jsxRuntime.jsx(TableFiltersSkeleton, {});
|
|
36476
36482
|
}
|
|
@@ -36480,7 +36486,7 @@ var TableFilters = function TableFilters(props) {
|
|
|
36480
36486
|
attrs: {
|
|
36481
36487
|
style: style
|
|
36482
36488
|
},
|
|
36483
|
-
component1: /*#__PURE__*/jsxRuntime.jsx(Button, {
|
|
36489
|
+
component1: !disabledFilterButton && /*#__PURE__*/jsxRuntime.jsx(Button, {
|
|
36484
36490
|
className: modules_a0fe63f9.left,
|
|
36485
36491
|
title: "Filter",
|
|
36486
36492
|
variant: "outlined",
|
|
@@ -36510,10 +36516,10 @@ var TableFilters = function TableFilters(props) {
|
|
|
36510
36516
|
},
|
|
36511
36517
|
placeholder: "Search"
|
|
36512
36518
|
}),
|
|
36513
|
-
component3: /*#__PURE__*/jsxRuntime.jsx(BaseCell, {
|
|
36519
|
+
component3: !hideRightOptions && /*#__PURE__*/jsxRuntime.jsx(BaseCell, {
|
|
36514
36520
|
flexible: true,
|
|
36515
36521
|
className: modules_a0fe63f9.right,
|
|
36516
|
-
component1: /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
36522
|
+
component1: !disabledColumnFilter && /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
36517
36523
|
children: [/*#__PURE__*/jsxRuntime.jsx(Button, {
|
|
36518
36524
|
ref: function ref(el) {
|
|
36519
36525
|
setAnchorEl(el);
|
|
@@ -36540,7 +36546,7 @@ var TableFilters = function TableFilters(props) {
|
|
|
36540
36546
|
setHiddenColumns: setHiddenColumns
|
|
36541
36547
|
})]
|
|
36542
36548
|
}),
|
|
36543
|
-
component2: /*#__PURE__*/jsxRuntime.jsx(Button, {
|
|
36549
|
+
component2: !disabledRefresh && /*#__PURE__*/jsxRuntime.jsx(Button, {
|
|
36544
36550
|
size: "auto",
|
|
36545
36551
|
className: modules_a0fe63f9['icon-button'],
|
|
36546
36552
|
variant: "text",
|
|
@@ -36551,7 +36557,7 @@ var TableFilters = function TableFilters(props) {
|
|
|
36551
36557
|
});
|
|
36552
36558
|
}
|
|
36553
36559
|
}),
|
|
36554
|
-
component3: /*#__PURE__*/jsxRuntime.jsx(Button, {
|
|
36560
|
+
component3: !disabledSettings && /*#__PURE__*/jsxRuntime.jsx(Button, {
|
|
36555
36561
|
size: "auto",
|
|
36556
36562
|
className: modules_a0fe63f9['icon-button'],
|
|
36557
36563
|
variant: "text",
|
|
@@ -36610,7 +36616,8 @@ var Table = function Table(props) {
|
|
|
36610
36616
|
chipsData = props.chipsData,
|
|
36611
36617
|
filtersData = props.filtersData,
|
|
36612
36618
|
paginationData = props.paginationData,
|
|
36613
|
-
loading = props.loading
|
|
36619
|
+
loading = props.loading,
|
|
36620
|
+
disabledFilterOptions = props.disabledFilterOptions;
|
|
36614
36621
|
var ref = React.useRef(null);
|
|
36615
36622
|
var paginationRef = React.useRef(null);
|
|
36616
36623
|
var _useState = React.useState(false),
|
|
@@ -36628,7 +36635,7 @@ var Table = function Table(props) {
|
|
|
36628
36635
|
// for pagination docking using intersection observer
|
|
36629
36636
|
React.useEffect(function () {
|
|
36630
36637
|
var tableElem = ref.current;
|
|
36631
|
-
if (tableElem) {
|
|
36638
|
+
if (tableElem && !loading) {
|
|
36632
36639
|
var lastRow = tableElem.querySelector('[data-elem="table-body"] [data-elem="table-row"]:last-child');
|
|
36633
36640
|
if (lastRow) {
|
|
36634
36641
|
var lastRowHeight = parseInt(getComputedStyle(lastRow).height.slice(0, -2), 10);
|
|
@@ -36655,7 +36662,7 @@ var Table = function Table(props) {
|
|
|
36655
36662
|
// for dynamically resizing table vertically acc to provided addons
|
|
36656
36663
|
React.useEffect(function () {
|
|
36657
36664
|
var tableElem = ref.current;
|
|
36658
|
-
if (tableElem) {
|
|
36665
|
+
if (tableElem && !loading) {
|
|
36659
36666
|
var totalAddons = [chipsData, filtersData].filter(Boolean).length;
|
|
36660
36667
|
tableElem.style.height = "calc(100% - ".concat(totalAddons * 3, "rem)");
|
|
36661
36668
|
}
|
|
@@ -36664,7 +36671,7 @@ var Table = function Table(props) {
|
|
|
36664
36671
|
// setting body and header min-width to allow horizontal sticky column beyond viewport width
|
|
36665
36672
|
React.useEffect(function () {
|
|
36666
36673
|
var tableElem = ref.current;
|
|
36667
|
-
if (tableElem) {
|
|
36674
|
+
if (tableElem && !loading) {
|
|
36668
36675
|
var tableHeaderElem = tableElem.querySelector('[data-elem="table-header"]');
|
|
36669
36676
|
var tableBodyElem = tableElem.querySelector('[data-elem="table-body"]');
|
|
36670
36677
|
if (tableHeaderElem && tableBodyElem) {
|
|
@@ -36691,6 +36698,7 @@ var Table = function Table(props) {
|
|
|
36691
36698
|
})), filtersData != null && /*#__PURE__*/jsxRuntime.jsx(TableFilters, _objectSpread2(_objectSpread2({
|
|
36692
36699
|
className: modules_2e8406c7.filters
|
|
36693
36700
|
}, _objectSpread2(_objectSpread2({}, filtersData), {}, {
|
|
36701
|
+
disabledFilterOptions: disabledFilterOptions,
|
|
36694
36702
|
headerData: headerData,
|
|
36695
36703
|
hiddenColumns: hiddenColumns,
|
|
36696
36704
|
setHiddenColumns: setHiddenColumns
|
|
@@ -36736,7 +36744,13 @@ Table.propTypes = {
|
|
|
36736
36744
|
chipsData: propTypes$1.exports.shape(_objectSpread2({}, TableChips.propTypes)),
|
|
36737
36745
|
filtersData: propTypes$1.exports.shape(_objectSpread2({}, TableFilters.propTypes)),
|
|
36738
36746
|
paginationData: propTypes$1.exports.shape(_objectSpread2({}, Pagination.propTypes)),
|
|
36739
|
-
loading: propTypes$1.exports.bool
|
|
36747
|
+
loading: propTypes$1.exports.bool,
|
|
36748
|
+
disabledFilterOptions: propTypes$1.exports.shape({
|
|
36749
|
+
filterButton: propTypes$1.exports.bool,
|
|
36750
|
+
refresh: propTypes$1.exports.bool,
|
|
36751
|
+
columnFilter: propTypes$1.exports.bool,
|
|
36752
|
+
settings: propTypes$1.exports.bool
|
|
36753
|
+
})
|
|
36740
36754
|
};
|
|
36741
36755
|
Table.defaultProps = {
|
|
36742
36756
|
className: '',
|
|
@@ -36752,7 +36766,13 @@ Table.defaultProps = {
|
|
|
36752
36766
|
chipsData: null,
|
|
36753
36767
|
filtersData: null,
|
|
36754
36768
|
paginationData: null,
|
|
36755
|
-
loading: null
|
|
36769
|
+
loading: null,
|
|
36770
|
+
disabledFilterOptions: {
|
|
36771
|
+
filterButton: false,
|
|
36772
|
+
refresh: false,
|
|
36773
|
+
columnFilter: false,
|
|
36774
|
+
settings: false
|
|
36775
|
+
}
|
|
36756
36776
|
};
|
|
36757
36777
|
|
|
36758
36778
|
var css$8 = ".Tabs_module_root__df3be7a0 {\n display: flex;\n flex-direction: row;\n justify-content: flex-start;\n align-items: center;\n}\n\n.Tabs_module_tabView__df3be7a0, .Tabs_module_tabViewSelected__df3be7a0 {\n cursor: pointer;\n margin-right: 0.25rem;\n padding: 0.5rem 0rem 0.5rem 0.5rem;\n text-align: left;\n font-size: 1rem;\n font-weight: 500;\n color: var(--dark-grey);\n}\n.Tabs_module_tabView__df3be7a0 .Tabs_module_content__df3be7a0, .Tabs_module_tabViewSelected__df3be7a0 .Tabs_module_content__df3be7a0 {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n align-items: center;\n}\n.Tabs_module_tabView__df3be7a0 .Tabs_module_content__df3be7a0 .Tabs_module_left__df3be7a0, .Tabs_module_tabViewSelected__df3be7a0 .Tabs_module_content__df3be7a0 .Tabs_module_left__df3be7a0 {\n display: flex;\n flex-direction: row;\n justify-content: flex-start;\n align-items: center;\n}\n.Tabs_module_tabView__df3be7a0 .Tabs_module_content__df3be7a0 .Tabs_module_left__df3be7a0 .Tabs_module_iconContainer__df3be7a0, .Tabs_module_tabViewSelected__df3be7a0 .Tabs_module_content__df3be7a0 .Tabs_module_left__df3be7a0 .Tabs_module_iconContainer__df3be7a0 {\n display: flex;\n flex-direction: row;\n justify-content: flex-start;\n align-items: center;\n}\n.Tabs_module_tabView__df3be7a0 .Tabs_module_content__df3be7a0 .Tabs_module_left__df3be7a0 .Tabs_module_iconContainer__df3be7a0 .Tabs_module_icon__df3be7a0, .Tabs_module_tabViewSelected__df3be7a0 .Tabs_module_content__df3be7a0 .Tabs_module_left__df3be7a0 .Tabs_module_iconContainer__df3be7a0 .Tabs_module_icon__df3be7a0 {\n width: 1.5rem;\n height: 1.5rem;\n fill: var(--dark-grey);\n}\n.Tabs_module_tabView__df3be7a0 .Tabs_module_content__df3be7a0 .Tabs_module_right__df3be7a0, .Tabs_module_tabViewSelected__df3be7a0 .Tabs_module_content__df3be7a0 .Tabs_module_right__df3be7a0 {\n display: flex;\n flex-direction: row;\n justify-content: flex-start;\n align-items: center;\n}\n.Tabs_module_tabView__df3be7a0 .Tabs_module_content__df3be7a0 .Tabs_module_right__df3be7a0 .Tabs_module_saperator__df3be7a0, .Tabs_module_tabViewSelected__df3be7a0 .Tabs_module_content__df3be7a0 .Tabs_module_right__df3be7a0 .Tabs_module_saperator__df3be7a0 {\n border-right: 0.031rem solid var(--grey3);\n border-radius: 0.625rem;\n height: 1.438rem;\n margin: 0rem 0rem 0rem 1rem;\n}\n.Tabs_module_tabView__df3be7a0 .Tabs_module_content__df3be7a0 .Tabs_module_right__df3be7a0 .Tabs_module_iconContainer__df3be7a0, .Tabs_module_tabViewSelected__df3be7a0 .Tabs_module_content__df3be7a0 .Tabs_module_right__df3be7a0 .Tabs_module_iconContainer__df3be7a0 {\n display: flex;\n flex-direction: row;\n justify-content: center;\n align-items: center;\n}\n.Tabs_module_tabView__df3be7a0 .Tabs_module_content__df3be7a0 .Tabs_module_right__df3be7a0 .Tabs_module_iconContainer__df3be7a0 .Tabs_module_icon__df3be7a0, .Tabs_module_tabViewSelected__df3be7a0 .Tabs_module_content__df3be7a0 .Tabs_module_right__df3be7a0 .Tabs_module_iconContainer__df3be7a0 .Tabs_module_icon__df3be7a0 {\n width: 1.5rem;\n height: 1.5rem;\n fill: var(--dark-grey);\n}\n.Tabs_module_tabView__df3be7a0:hover, .Tabs_module_tabViewSelected__df3be7a0:hover {\n background-color: var(--background);\n border-radius: 0.25rem;\n color: var(--highlight);\n}\n.Tabs_module_tabView__df3be7a0:hover .Tabs_module_content__df3be7a0 .Tabs_module_left__df3be7a0 .Tabs_module_iconContainer__df3be7a0 .Tabs_module_icon__df3be7a0, .Tabs_module_tabViewSelected__df3be7a0:hover .Tabs_module_content__df3be7a0 .Tabs_module_left__df3be7a0 .Tabs_module_iconContainer__df3be7a0 .Tabs_module_icon__df3be7a0 {\n width: 1.5rem;\n height: 1.5rem;\n fill: var(--highlight);\n}\n.Tabs_module_tabView__df3be7a0:hover .Tabs_module_content__df3be7a0 .Tabs_module_right__df3be7a0 .Tabs_module_saperator__df3be7a0, .Tabs_module_tabViewSelected__df3be7a0:hover .Tabs_module_content__df3be7a0 .Tabs_module_right__df3be7a0 .Tabs_module_saperator__df3be7a0 {\n border-right: 0.031rem solid var(--highlight);\n border-radius: 0.625rem;\n height: 1.438rem;\n margin: 0rem 0rem 0rem 1rem;\n}\n.Tabs_module_tabView__df3be7a0:hover .Tabs_module_content__df3be7a0 .Tabs_module_right__df3be7a0 .Tabs_module_iconContainer__df3be7a0 .Tabs_module_icon__df3be7a0, .Tabs_module_tabViewSelected__df3be7a0:hover .Tabs_module_content__df3be7a0 .Tabs_module_right__df3be7a0 .Tabs_module_iconContainer__df3be7a0 .Tabs_module_icon__df3be7a0 {\n width: 1.5rem;\n height: 1.5rem;\n fill: var(--highlight);\n}\n\n.Tabs_module_tabViewSelected__df3be7a0 {\n color: var(--highlight);\n border-bottom: 0.125rem solid var(--highlight);\n}\n.Tabs_module_tabViewSelected__df3be7a0 .Tabs_module_content__df3be7a0 .Tabs_module_left__df3be7a0 .Tabs_module_iconContainer__df3be7a0 .Tabs_module_icon__df3be7a0 {\n width: 1.5rem;\n height: 1.5rem;\n fill: var(--highlight);\n}\n.Tabs_module_tabViewSelected__df3be7a0 .Tabs_module_content__df3be7a0 .Tabs_module_right__df3be7a0 .Tabs_module_saperator__df3be7a0 {\n border-right: 0.031rem solid var(--highlight);\n border-radius: 0.625rem;\n height: 1.438rem;\n margin: 0rem 0rem 0rem 1rem;\n}\n.Tabs_module_tabViewSelected__df3be7a0 .Tabs_module_content__df3be7a0 .Tabs_module_right__df3be7a0 .Tabs_module_iconContainer__df3be7a0 .Tabs_module_icon__df3be7a0 {\n width: 1.5rem;\n height: 1.5rem;\n fill: var(--highlight);\n}";
|