@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/cjs/index.js
CHANGED
|
@@ -22373,12 +22373,16 @@ var TableCell = /*#__PURE__*/React.forwardRef(function TableCell(props, ref) {
|
|
|
22373
22373
|
sticky = props.sticky,
|
|
22374
22374
|
sort = props.sort,
|
|
22375
22375
|
onSort = props.onSort,
|
|
22376
|
+
sortValue = props.sortValue,
|
|
22376
22377
|
html = props.html,
|
|
22377
22378
|
json = props.json;
|
|
22378
|
-
var _useState = React.useState('
|
|
22379
|
+
var _useState = React.useState('default'),
|
|
22379
22380
|
_useState2 = _slicedToArray(_useState, 2),
|
|
22380
22381
|
sortState = _useState2[0],
|
|
22381
22382
|
setSortState = _useState2[1];
|
|
22383
|
+
React.useEffect(function () {
|
|
22384
|
+
setSortState((sortValue === null || sortValue === void 0 ? void 0 : sortValue[id]) || 'default');
|
|
22385
|
+
}, [sortValue]);
|
|
22382
22386
|
var spanElement = /*#__PURE__*/jsxRuntime.jsx("span", _objectSpread2(_objectSpread2({}, _objectSpread2(_objectSpread2({}, cellTitle != null ? {
|
|
22383
22387
|
title: cellTitle
|
|
22384
22388
|
} : {}), {}, {
|
|
@@ -22400,7 +22404,7 @@ var TableCell = /*#__PURE__*/React.forwardRef(function TableCell(props, ref) {
|
|
|
22400
22404
|
}
|
|
22401
22405
|
return /*#__PURE__*/jsxRuntime.jsx(BaseCell, {
|
|
22402
22406
|
ref: ref,
|
|
22403
|
-
className: classes(modules_7ba8d001.root, modules_7ba8d001["".concat(type, "-cell")], modules_7ba8d001["sticky-".concat(sticky)], modules_7ba8d001["sort-".concat(
|
|
22407
|
+
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),
|
|
22404
22408
|
attrs: _objectSpread2({
|
|
22405
22409
|
style: style
|
|
22406
22410
|
}, attrs),
|
|
@@ -22476,6 +22480,7 @@ var TableRow = /*#__PURE__*/React.forwardRef(function BaseTable(props, ref) {
|
|
|
22476
22480
|
Expandable = props.expandable,
|
|
22477
22481
|
_props$onSort = props.onSort,
|
|
22478
22482
|
onSort = _props$onSort === void 0 ? function () {} : _props$onSort,
|
|
22483
|
+
sortValue = props.sortValue,
|
|
22479
22484
|
_props$rowHeight = props.rowHeight,
|
|
22480
22485
|
rowHeight = _props$rowHeight === void 0 ? 'md' : _props$rowHeight,
|
|
22481
22486
|
_toggleDrawer = props.toggleDrawer,
|
|
@@ -22524,6 +22529,7 @@ var TableRow = /*#__PURE__*/React.forwardRef(function BaseTable(props, ref) {
|
|
|
22524
22529
|
cellTitle: cellContent,
|
|
22525
22530
|
type: type,
|
|
22526
22531
|
onSort: onSort,
|
|
22532
|
+
sortValue: sortValue,
|
|
22527
22533
|
rowHeight: rowHeight,
|
|
22528
22534
|
toggleDrawer: function toggleDrawer(index, standalone) {
|
|
22529
22535
|
_toggleDrawer({
|
|
@@ -22801,6 +22807,7 @@ var TableHeader = function TableHeader(props) {
|
|
|
22801
22807
|
customCells = props.customCells,
|
|
22802
22808
|
expandable = props.expandable,
|
|
22803
22809
|
onSort = props.onSort,
|
|
22810
|
+
sortValue = props.sortValue,
|
|
22804
22811
|
rowHeight = props.rowHeight,
|
|
22805
22812
|
_props$theme = props.theme,
|
|
22806
22813
|
theme = _props$theme === void 0 ? '' : _props$theme,
|
|
@@ -22821,6 +22828,7 @@ var TableHeader = function TableHeader(props) {
|
|
|
22821
22828
|
customCells: customCells,
|
|
22822
22829
|
expandable: expandable,
|
|
22823
22830
|
onSort: onSort,
|
|
22831
|
+
sortValue: sortValue,
|
|
22824
22832
|
rowHeight: rowHeight,
|
|
22825
22833
|
onRowClick: onRowClick,
|
|
22826
22834
|
theme: theme,
|
|
@@ -23031,6 +23039,7 @@ var BaseTable = /*#__PURE__*/React.forwardRef(function BaseTable(props, ref) {
|
|
|
23031
23039
|
onRowClick = props.onRowClick,
|
|
23032
23040
|
expandable = props.expandable,
|
|
23033
23041
|
onSort = props.onSort,
|
|
23042
|
+
sortValue = props.sortValue,
|
|
23034
23043
|
rowHeight = props.rowHeight,
|
|
23035
23044
|
theme = props.theme,
|
|
23036
23045
|
placeholder = props.placeholder,
|
|
@@ -23066,6 +23075,7 @@ var BaseTable = /*#__PURE__*/React.forwardRef(function BaseTable(props, ref) {
|
|
|
23066
23075
|
customCells: customCells,
|
|
23067
23076
|
expandable: expandable,
|
|
23068
23077
|
onSort: onSort,
|
|
23078
|
+
sortValue: sortValue,
|
|
23069
23079
|
onRowClick: onRowClick,
|
|
23070
23080
|
onCheck: onCheck,
|
|
23071
23081
|
checkedRows: checkedRows,
|
|
@@ -23963,6 +23973,8 @@ var Table = function Table(props) {
|
|
|
23963
23973
|
rightActions = _props$rightActions === void 0 ? null : _props$rightActions,
|
|
23964
23974
|
_props$onSort = props.onSort,
|
|
23965
23975
|
onSort = _props$onSort === void 0 ? function () {} : _props$onSort,
|
|
23976
|
+
_props$sortValue = props.sortValue,
|
|
23977
|
+
sortValue = _props$sortValue === void 0 ? 'asc' : _props$sortValue,
|
|
23966
23978
|
_props$rowHeight = props.rowHeight,
|
|
23967
23979
|
rowHeight = _props$rowHeight === void 0 ? 'md' : _props$rowHeight,
|
|
23968
23980
|
_props$theme = props.theme,
|
|
@@ -24147,6 +24159,7 @@ var Table = function Table(props) {
|
|
|
24147
24159
|
customCells: customCells,
|
|
24148
24160
|
className: modules_2e8406c7.table,
|
|
24149
24161
|
onSort: onSort,
|
|
24162
|
+
sortValue: sortValue,
|
|
24150
24163
|
rowHeight: rowHeight,
|
|
24151
24164
|
onRowClick: onRowClick,
|
|
24152
24165
|
defaultActiveIndex: defaultActiveIndex,
|