@banyan_cloud/roots 1.0.341 → 1.0.342
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 +15 -2
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +15 -2
- package/dist/esm/index.js.map +1 -1
- package/dist/index.js +15 -2
- package/package.json +1 -1
package/dist/esm/index.js
CHANGED
|
@@ -22352,12 +22352,16 @@ var TableCell = /*#__PURE__*/forwardRef(function TableCell(props, ref) {
|
|
|
22352
22352
|
sticky = props.sticky,
|
|
22353
22353
|
sort = props.sort,
|
|
22354
22354
|
onSort = props.onSort,
|
|
22355
|
+
sortValue = props.sortValue,
|
|
22355
22356
|
html = props.html,
|
|
22356
22357
|
json = props.json;
|
|
22357
|
-
var _useState = useState('
|
|
22358
|
+
var _useState = useState('default'),
|
|
22358
22359
|
_useState2 = _slicedToArray(_useState, 2),
|
|
22359
22360
|
sortState = _useState2[0],
|
|
22360
22361
|
setSortState = _useState2[1];
|
|
22362
|
+
useEffect(function () {
|
|
22363
|
+
setSortState((sortValue === null || sortValue === void 0 ? void 0 : sortValue[id]) || 'default');
|
|
22364
|
+
}, [sortValue]);
|
|
22361
22365
|
var spanElement = /*#__PURE__*/jsx("span", _objectSpread2(_objectSpread2({}, _objectSpread2(_objectSpread2({}, cellTitle != null ? {
|
|
22362
22366
|
title: cellTitle
|
|
22363
22367
|
} : {}), {}, {
|
|
@@ -22379,7 +22383,7 @@ var TableCell = /*#__PURE__*/forwardRef(function TableCell(props, ref) {
|
|
|
22379
22383
|
}
|
|
22380
22384
|
return /*#__PURE__*/jsx(BaseCell, {
|
|
22381
22385
|
ref: ref,
|
|
22382
|
-
className: classes(modules_7ba8d001.root, modules_7ba8d001["".concat(type, "-cell")], modules_7ba8d001["sticky-".concat(sticky)], modules_7ba8d001["sort-".concat(
|
|
22386
|
+
className: classes(modules_7ba8d001.root, modules_7ba8d001["".concat(type, "-cell")], modules_7ba8d001["sticky-".concat(sticky)], modules_7ba8d001["sort-".concat(sortState)], sortState != null ? modules_7ba8d001.sortable : '', className),
|
|
22383
22387
|
attrs: _objectSpread2({
|
|
22384
22388
|
style: style
|
|
22385
22389
|
}, attrs),
|
|
@@ -22455,6 +22459,7 @@ var TableRow = /*#__PURE__*/forwardRef(function BaseTable(props, ref) {
|
|
|
22455
22459
|
Expandable = props.expandable,
|
|
22456
22460
|
_props$onSort = props.onSort,
|
|
22457
22461
|
onSort = _props$onSort === void 0 ? function () {} : _props$onSort,
|
|
22462
|
+
sortValue = props.sortValue,
|
|
22458
22463
|
_props$rowHeight = props.rowHeight,
|
|
22459
22464
|
rowHeight = _props$rowHeight === void 0 ? 'md' : _props$rowHeight,
|
|
22460
22465
|
_toggleDrawer = props.toggleDrawer,
|
|
@@ -22503,6 +22508,7 @@ var TableRow = /*#__PURE__*/forwardRef(function BaseTable(props, ref) {
|
|
|
22503
22508
|
cellTitle: cellContent,
|
|
22504
22509
|
type: type,
|
|
22505
22510
|
onSort: onSort,
|
|
22511
|
+
sortValue: sortValue,
|
|
22506
22512
|
rowHeight: rowHeight,
|
|
22507
22513
|
toggleDrawer: function toggleDrawer(index, standalone) {
|
|
22508
22514
|
_toggleDrawer({
|
|
@@ -22780,6 +22786,7 @@ var TableHeader = function TableHeader(props) {
|
|
|
22780
22786
|
customCells = props.customCells,
|
|
22781
22787
|
expandable = props.expandable,
|
|
22782
22788
|
onSort = props.onSort,
|
|
22789
|
+
sortValue = props.sortValue,
|
|
22783
22790
|
rowHeight = props.rowHeight,
|
|
22784
22791
|
_props$theme = props.theme,
|
|
22785
22792
|
theme = _props$theme === void 0 ? '' : _props$theme,
|
|
@@ -22800,6 +22807,7 @@ var TableHeader = function TableHeader(props) {
|
|
|
22800
22807
|
customCells: customCells,
|
|
22801
22808
|
expandable: expandable,
|
|
22802
22809
|
onSort: onSort,
|
|
22810
|
+
sortValue: sortValue,
|
|
22803
22811
|
rowHeight: rowHeight,
|
|
22804
22812
|
onRowClick: onRowClick,
|
|
22805
22813
|
theme: theme,
|
|
@@ -23010,6 +23018,7 @@ var BaseTable = /*#__PURE__*/forwardRef(function BaseTable(props, ref) {
|
|
|
23010
23018
|
onRowClick = props.onRowClick,
|
|
23011
23019
|
expandable = props.expandable,
|
|
23012
23020
|
onSort = props.onSort,
|
|
23021
|
+
sortValue = props.sortValue,
|
|
23013
23022
|
rowHeight = props.rowHeight,
|
|
23014
23023
|
theme = props.theme,
|
|
23015
23024
|
placeholder = props.placeholder,
|
|
@@ -23045,6 +23054,7 @@ var BaseTable = /*#__PURE__*/forwardRef(function BaseTable(props, ref) {
|
|
|
23045
23054
|
customCells: customCells,
|
|
23046
23055
|
expandable: expandable,
|
|
23047
23056
|
onSort: onSort,
|
|
23057
|
+
sortValue: sortValue,
|
|
23048
23058
|
onRowClick: onRowClick,
|
|
23049
23059
|
onCheck: onCheck,
|
|
23050
23060
|
checkedRows: checkedRows,
|
|
@@ -23942,6 +23952,8 @@ var Table = function Table(props) {
|
|
|
23942
23952
|
rightActions = _props$rightActions === void 0 ? null : _props$rightActions,
|
|
23943
23953
|
_props$onSort = props.onSort,
|
|
23944
23954
|
onSort = _props$onSort === void 0 ? function () {} : _props$onSort,
|
|
23955
|
+
_props$sortValue = props.sortValue,
|
|
23956
|
+
sortValue = _props$sortValue === void 0 ? 'asc' : _props$sortValue,
|
|
23945
23957
|
_props$rowHeight = props.rowHeight,
|
|
23946
23958
|
rowHeight = _props$rowHeight === void 0 ? 'md' : _props$rowHeight,
|
|
23947
23959
|
_props$theme = props.theme,
|
|
@@ -24126,6 +24138,7 @@ var Table = function Table(props) {
|
|
|
24126
24138
|
customCells: customCells,
|
|
24127
24139
|
className: modules_2e8406c7.table,
|
|
24128
24140
|
onSort: onSort,
|
|
24141
|
+
sortValue: sortValue,
|
|
24129
24142
|
rowHeight: rowHeight,
|
|
24130
24143
|
onRowClick: onRowClick,
|
|
24131
24144
|
defaultActiveIndex: defaultActiveIndex,
|