@cakemail-org/ui-components-v2 2.2.35 → 2.2.36
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 +18 -16
- package/dist/esm/index.js +18 -16
- package/package.json +1 -1
package/dist/cjs/index.js
CHANGED
|
@@ -8966,22 +8966,24 @@ function ColManager(_a) {
|
|
|
8966
8966
|
|
|
8967
8967
|
function DataTable(_a) {
|
|
8968
8968
|
var rows = _a.rows, columnsData = _a.columnsData, className = _a.className, onRowClick = _a.onRowClick, onRowSelect = _a.onRowSelect, onPaginationChange = _a.onPaginationChange, onSortChange = _a.onSortChange, _b = _a.showHead, showHead = _b === void 0 ? true : _b, _c = _a.showRowSelection, showRowSelection = _c === void 0 ? false : _c, _d = _a.rowIdMap, rowIdMap = _d === void 0 ? "id" : _d, _e = _a.rowsPerPageOptions, rowsPerPageOptions = _e === void 0 ? [25, 50, 100] : _e, totalCount = _a.totalCount, controlledState = _a.controlledState, initState = _a.initState, _f = _a.stickyHeader, stickyHeader = _f === void 0 ? false : _f, tableContainerSX = _a.tableContainerSX, sx = _a.sx, stickyFirstCol = _a.stickyFirstCol, stickyLastCol = _a.stickyLastCol, _g = _a.showCollapsibleContent, showCollapsibleContent = _g === void 0 ? false : _g, _h = _a.showPagination, showPagination = _h === void 0 ? true : _h, hasMore = _a.hasMore; _a.showLineSeparator; var _k = _a.useSortMemo, useSortMemo = _k === void 0 ? false : _k;
|
|
8969
|
-
var _l = React.useState((
|
|
8970
|
-
var _m = React.useState((
|
|
8971
|
-
var _o = React.useState((
|
|
8972
|
-
var _p = React.useState((
|
|
8973
|
-
var _q = React.useState((
|
|
8974
|
-
|
|
8975
|
-
|
|
8976
|
-
|
|
8977
|
-
|
|
8978
|
-
|
|
8979
|
-
|
|
8980
|
-
|
|
8981
|
-
|
|
8982
|
-
|
|
8983
|
-
|
|
8984
|
-
|
|
8969
|
+
var _l = React.useState((initState === null || initState === void 0 ? void 0 : initState.order) || "asc"), cOrder = _l[0], setOrder = _l[1];
|
|
8970
|
+
var _m = React.useState((initState === null || initState === void 0 ? void 0 : initState.orderBy) || ""), cOrderBy = _m[0], setOrderBy = _m[1];
|
|
8971
|
+
var _o = React.useState((initState === null || initState === void 0 ? void 0 : initState.selected) || []), cSelected = _o[0], setSelected = _o[1];
|
|
8972
|
+
var _p = React.useState((initState === null || initState === void 0 ? void 0 : initState.page) || 0), cPage = _p[0], setPage = _p[1];
|
|
8973
|
+
var _q = React.useState((initState === null || initState === void 0 ? void 0 : initState.rowsPerPage) || 50), cRowsPerPage = _q[0], setRowsPerPage = _q[1];
|
|
8974
|
+
var isControlled = areAllPropertiesEmpty(controlledState);
|
|
8975
|
+
var order = cOrder;
|
|
8976
|
+
var orderBy = cOrderBy;
|
|
8977
|
+
var selected = cSelected;
|
|
8978
|
+
var page = cPage;
|
|
8979
|
+
var rowsPerPage = cRowsPerPage;
|
|
8980
|
+
if (isControlled) {
|
|
8981
|
+
order = (controlledState === null || controlledState === void 0 ? void 0 : controlledState.order) || "asc";
|
|
8982
|
+
orderBy = (controlledState === null || controlledState === void 0 ? void 0 : controlledState.orderBy) || "";
|
|
8983
|
+
selected = (controlledState === null || controlledState === void 0 ? void 0 : controlledState.selected) || [];
|
|
8984
|
+
page = (controlledState === null || controlledState === void 0 ? void 0 : controlledState.page) || 0;
|
|
8985
|
+
rowsPerPage = (controlledState === null || controlledState === void 0 ? void 0 : controlledState.rowsPerPage) || 50;
|
|
8986
|
+
}
|
|
8985
8987
|
function handleRequestSort(event, property) {
|
|
8986
8988
|
var isAsc = orderBy === property && order === 'asc';
|
|
8987
8989
|
var cOrder = isAsc ? 'desc' : 'asc';
|
package/dist/esm/index.js
CHANGED
|
@@ -8946,22 +8946,24 @@ function ColManager(_a) {
|
|
|
8946
8946
|
|
|
8947
8947
|
function DataTable(_a) {
|
|
8948
8948
|
var rows = _a.rows, columnsData = _a.columnsData, className = _a.className, onRowClick = _a.onRowClick, onRowSelect = _a.onRowSelect, onPaginationChange = _a.onPaginationChange, onSortChange = _a.onSortChange, _b = _a.showHead, showHead = _b === void 0 ? true : _b, _c = _a.showRowSelection, showRowSelection = _c === void 0 ? false : _c, _d = _a.rowIdMap, rowIdMap = _d === void 0 ? "id" : _d, _e = _a.rowsPerPageOptions, rowsPerPageOptions = _e === void 0 ? [25, 50, 100] : _e, totalCount = _a.totalCount, controlledState = _a.controlledState, initState = _a.initState, _f = _a.stickyHeader, stickyHeader = _f === void 0 ? false : _f, tableContainerSX = _a.tableContainerSX, sx = _a.sx, stickyFirstCol = _a.stickyFirstCol, stickyLastCol = _a.stickyLastCol, _g = _a.showCollapsibleContent, showCollapsibleContent = _g === void 0 ? false : _g, _h = _a.showPagination, showPagination = _h === void 0 ? true : _h, hasMore = _a.hasMore; _a.showLineSeparator; var _k = _a.useSortMemo, useSortMemo = _k === void 0 ? false : _k;
|
|
8949
|
-
var _l = useState((
|
|
8950
|
-
var _m = useState((
|
|
8951
|
-
var _o = useState((
|
|
8952
|
-
var _p = useState((
|
|
8953
|
-
var _q = useState((
|
|
8954
|
-
|
|
8955
|
-
|
|
8956
|
-
|
|
8957
|
-
|
|
8958
|
-
|
|
8959
|
-
|
|
8960
|
-
|
|
8961
|
-
|
|
8962
|
-
|
|
8963
|
-
|
|
8964
|
-
|
|
8949
|
+
var _l = useState((initState === null || initState === void 0 ? void 0 : initState.order) || "asc"), cOrder = _l[0], setOrder = _l[1];
|
|
8950
|
+
var _m = useState((initState === null || initState === void 0 ? void 0 : initState.orderBy) || ""), cOrderBy = _m[0], setOrderBy = _m[1];
|
|
8951
|
+
var _o = useState((initState === null || initState === void 0 ? void 0 : initState.selected) || []), cSelected = _o[0], setSelected = _o[1];
|
|
8952
|
+
var _p = useState((initState === null || initState === void 0 ? void 0 : initState.page) || 0), cPage = _p[0], setPage = _p[1];
|
|
8953
|
+
var _q = useState((initState === null || initState === void 0 ? void 0 : initState.rowsPerPage) || 50), cRowsPerPage = _q[0], setRowsPerPage = _q[1];
|
|
8954
|
+
var isControlled = areAllPropertiesEmpty(controlledState);
|
|
8955
|
+
var order = cOrder;
|
|
8956
|
+
var orderBy = cOrderBy;
|
|
8957
|
+
var selected = cSelected;
|
|
8958
|
+
var page = cPage;
|
|
8959
|
+
var rowsPerPage = cRowsPerPage;
|
|
8960
|
+
if (isControlled) {
|
|
8961
|
+
order = (controlledState === null || controlledState === void 0 ? void 0 : controlledState.order) || "asc";
|
|
8962
|
+
orderBy = (controlledState === null || controlledState === void 0 ? void 0 : controlledState.orderBy) || "";
|
|
8963
|
+
selected = (controlledState === null || controlledState === void 0 ? void 0 : controlledState.selected) || [];
|
|
8964
|
+
page = (controlledState === null || controlledState === void 0 ? void 0 : controlledState.page) || 0;
|
|
8965
|
+
rowsPerPage = (controlledState === null || controlledState === void 0 ? void 0 : controlledState.rowsPerPage) || 50;
|
|
8966
|
+
}
|
|
8965
8967
|
function handleRequestSort(event, property) {
|
|
8966
8968
|
var isAsc = orderBy === property && order === 'asc';
|
|
8967
8969
|
var cOrder = isAsc ? 'desc' : 'asc';
|