@majoo-ui/react 1.58.20-rc.4 → 1.59.0

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.
Files changed (3) hide show
  1. package/index.esm.js +249 -244
  2. package/index.umd.js +337 -332
  3. package/package.json +1 -1
package/index.umd.js CHANGED
@@ -22885,7 +22885,6 @@
22885
22885
  pointerEvents: 'none',
22886
22886
  boxSizing: 'border'
22887
22887
  };
22888
-
22889
22888
  var stickyShadowStyling = function stickyShadowStyling(column, tableScrollPosition, scrollAreaWidth) {
22890
22889
  if ((column === null || column === void 0 ? void 0 : column.sticky) && (column === null || column === void 0 ? void 0 : column.shadow)) {
22891
22890
  return column.sticky === 'left' ? {
@@ -23109,37 +23108,37 @@
23109
23108
  return [state, setState];
23110
23109
  };
23111
23110
  function Table(_a) {
23112
- var _b, _c, _d, _e, _f;
23111
+ var _b, _c, _d, _e;
23113
23112
  var columns = _a.columns,
23114
23113
  rawData = _a.data,
23115
- _g = _a.keyId,
23116
- keyId = _g === void 0 ? 'id' : _g,
23117
- _h = _a.pageIndex,
23118
- controlledPageIndex = _h === void 0 ? 0 : _h,
23114
+ _f = _a.keyId,
23115
+ keyId = _f === void 0 ? 'id' : _f,
23116
+ _g = _a.pageIndex,
23117
+ controlledPageIndex = _g === void 0 ? 0 : _g,
23119
23118
  totalPage = _a.totalPage,
23120
- _j = _a.totalData,
23121
- totalData = _j === void 0 ? 0 : _j,
23119
+ _h = _a.totalData,
23120
+ totalData = _h === void 0 ? 0 : _h,
23122
23121
  fetchData = _a.fetchData,
23123
- _k = _a.hideDataInfo,
23124
- hideDataInfo = _k === void 0 ? false : _k,
23125
- _l = _a.rowsPerPageOptions,
23126
- rowsPerPageOptions = _l === void 0 ? [10, 25, 50, 100] : _l;
23122
+ _j = _a.hideDataInfo,
23123
+ hideDataInfo = _j === void 0 ? false : _j,
23124
+ _k = _a.rowsPerPageOptions,
23125
+ rowsPerPageOptions = _k === void 0 ? [10, 25, 50, 100] : _k;
23127
23126
  _a.emptyDataMessage;
23128
23127
  var emptyDataProps = _a.customEmptyDataProps,
23129
- _o = _a.isLoading,
23130
- isLoading = _o === void 0 ? false : _o,
23128
+ _m = _a.isLoading,
23129
+ isLoading = _m === void 0 ? false : _m,
23131
23130
  css = _a.css,
23132
23131
  headerCss = _a.headerCss,
23133
23132
  hideHeader = _a.hideHeader,
23134
23133
  onSelectedChange = _a.onSelectedChange,
23135
- _p = _a.isInfiniteScroll,
23136
- isInfiniteScroll = _p === void 0 ? false : _p,
23137
- _q = _a.hasMoreItems,
23138
- hasMoreItems = _q === void 0 ? true : _q,
23139
- _r = _a.rowLimit,
23140
- rowLimit = _r === void 0 ? 10 : _r,
23141
- _s = _a.cellAlign,
23142
- cellAlign = _s === void 0 ? 'center' : _s,
23134
+ _o = _a.isInfiniteScroll,
23135
+ isInfiniteScroll = _o === void 0 ? false : _o,
23136
+ _p = _a.hasMoreItems,
23137
+ hasMoreItems = _p === void 0 ? true : _p,
23138
+ _q = _a.rowLimit,
23139
+ rowLimit = _q === void 0 ? 10 : _q,
23140
+ _r = _a.cellAlign,
23141
+ cellAlign = _r === void 0 ? 'center' : _r,
23143
23142
  selectedIds = _a.selectedIds,
23144
23143
  rowGroup = _a.rowGroup,
23145
23144
  decoration = _a.decoration,
@@ -23149,35 +23148,35 @@
23149
23148
  isMobileLayout = _a.isMobileLayout,
23150
23149
  showDuplicatedData = _a.showDuplicatedData,
23151
23150
  onRowClick = _a.onRowClick,
23152
- _t = _a.hidePagination,
23153
- hidePagination = _t === void 0 ? false : _t,
23151
+ _s = _a.hidePagination,
23152
+ hidePagination = _s === void 0 ? false : _s,
23154
23153
  searchQuery = _a.searchQuery,
23155
- _u = _a.additionalExceptionIds,
23156
- additionalExceptionIds = _u === void 0 ? [] : _u,
23154
+ _t = _a.additionalExceptionIds,
23155
+ additionalExceptionIds = _t === void 0 ? [] : _t,
23157
23156
  onExpand = _a.onExpand,
23158
- _v = _a.id,
23159
- id = _v === void 0 ? null : _v;
23160
- var _w = React.useState(false),
23161
- openMenu = _w[0],
23162
- setOpen = _w[1];
23163
- var _x = React.useState(rowLimit),
23164
- limit = _x[0],
23165
- setLimit = _x[1];
23166
- var _y = React.useState({}),
23167
- dataRow = _y[0],
23168
- setDataRow = _y[1];
23169
- var _z = React.useState('start'),
23170
- tableScrollPosition = _z[0],
23171
- setTableScrollPosition = _z[1];
23172
- var _0 = React.useState(0),
23173
- scrollAreaWidth = _0[0],
23174
- setScrollAreaWidth = _0[1];
23175
- var _1 = React.useState([]),
23176
- stateSelectedRowIds = _1[0],
23177
- setStateSelectedRowIds = _1[1];
23178
- var _2 = useLocalStorageState("menu:".concat(id), []),
23179
- filterHeader = _2[0],
23180
- setFilterHeader = _2[1];
23157
+ _u = _a.id,
23158
+ id = _u === void 0 ? null : _u;
23159
+ var _v = React.useState(false),
23160
+ openMenu = _v[0],
23161
+ setOpen = _v[1];
23162
+ var _w = React.useState(rowLimit),
23163
+ limit = _w[0],
23164
+ setLimit = _w[1];
23165
+ var _x = React.useState({}),
23166
+ dataRow = _x[0],
23167
+ setDataRow = _x[1];
23168
+ var _y = React.useState('start'),
23169
+ tableScrollPosition = _y[0],
23170
+ setTableScrollPosition = _y[1];
23171
+ var _z = React.useState(0),
23172
+ scrollAreaWidth = _z[0],
23173
+ setScrollAreaWidth = _z[1];
23174
+ var _0 = React.useState([]),
23175
+ stateSelectedRowIds = _0[0],
23176
+ setStateSelectedRowIds = _0[1];
23177
+ var _1 = useLocalStorageState("menu:".concat(id), []),
23178
+ filterHeader = _1[0],
23179
+ setFilterHeader = _1[1];
23181
23180
  var t = reactI18next.useTranslation('MajooUI/table').t;
23182
23181
  var isMobile = useMediaQuery(isMobileLayout === undefined ? '(max-width: 1024px)' : isMobileLayout ? '(max-width: 8000px)' : '(max-width: 0px)');
23183
23182
  var customEmptyDataProps = searchQuery ? defaultEmptySearchProps(t, isMobile, searchQuery) : emptyDataProps || defaultEmptyDataProps(t, isMobile);
@@ -23223,12 +23222,12 @@
23223
23222
  setPageSize = instance.setPageSize,
23224
23223
  toggleRowSelected = instance.toggleRowSelected,
23225
23224
  toggleAllRowsSelected = instance.toggleAllRowsSelected,
23226
- _3 = instance.state,
23227
- pageIndex = _3.pageIndex,
23228
- pageSize = _3.pageSize,
23229
- sortBy = _3.sortBy,
23230
- selectedRowIds = _3.selectedRowIds,
23231
- expanded = _3.expanded,
23225
+ _2 = instance.state,
23226
+ pageIndex = _2.pageIndex,
23227
+ pageSize = _2.pageSize,
23228
+ sortBy = _2.sortBy,
23229
+ selectedRowIds = _2.selectedRowIds,
23230
+ expanded = _2.expanded,
23232
23231
  setHiddenColumns = instance.setHiddenColumns,
23233
23232
  setColumnOrder = instance.setColumnOrder;
23234
23233
  var scrollerRef = React.useRef(null);
@@ -23553,7 +23552,6 @@
23553
23552
  var cssTableCell = {
23554
23553
  backgroundColor: 'white'
23555
23554
  };
23556
- var tableHeight = (_d = document.getElementById('table-container')) === null || _d === void 0 ? void 0 : _d.offsetHeight;
23557
23555
  return jsxRuntime.jsxs(Box, __assign({
23558
23556
  css: {
23559
23557
  position: 'relative',
@@ -23581,298 +23579,305 @@
23581
23579
  children: "Loading .... "
23582
23580
  }), void 0)
23583
23581
  }), void 0), !isMobile || id ? jsxRuntime.jsxs(jsxRuntime.Fragment, {
23584
- children: [jsxRuntime.jsxs(TableContainer$3, __assign({
23585
- id: "table-container",
23586
- css: css,
23587
- ref: scrollerRef,
23588
- decoration: Boolean(decoration),
23589
- onScroll: function (e) {
23590
- var scrollPosition = e.currentTarget.scrollLeft;
23591
- if (scrollPosition < 3) {
23592
- setTableScrollPosition('start');
23593
- } else if (scrollPosition > scrollAreaWidth - 3) {
23594
- setTableScrollPosition('end');
23595
- } else {
23596
- setTableScrollPosition('between');
23597
- }
23582
+ children: [jsxRuntime.jsxs(Box, __assign({
23583
+ css: {
23584
+ position: 'relative'
23598
23585
  }
23599
23586
  }, {
23600
- children: [jsxRuntime.jsx(ConditionalWrapper, __assign({
23601
- condition: !decoration,
23602
- wrapper: function (child) {
23603
- return renderInfiniteScrollWrapper(child);
23587
+ children: [jsxRuntime.jsxs(TableContainer$3, __assign({
23588
+ id: "table-container",
23589
+ css: css,
23590
+ ref: scrollerRef,
23591
+ decoration: Boolean(decoration),
23592
+ onScroll: function (e) {
23593
+ var scrollPosition = e.currentTarget.scrollLeft;
23594
+ if (scrollPosition < 3) {
23595
+ setTableScrollPosition('start');
23596
+ } else if (scrollPosition > scrollAreaWidth - 3) {
23597
+ setTableScrollPosition('end');
23598
+ } else {
23599
+ setTableScrollPosition('between');
23600
+ }
23604
23601
  }
23605
23602
  }, {
23606
- children: jsxRuntime.jsxs(TableContent$3, __assign({}, getTableProps(), {
23607
- children: [jsxRuntime.jsx(TableHead$3, __assign({
23608
- hiddenHeader: hideHeader,
23609
- css: headerCss,
23610
- isInfiniteScroll: isInfiniteScroll
23611
- }, {
23612
- children: headerGroups.map(function (headerGroup) {
23613
- var visibleHeaders = headerGroup.headers.filter(function (column) {
23614
- return !column.isSubRow;
23615
- });
23616
- if (filterHeader.length > 0) {
23617
- visibleHeaders = visibleHeaders.filter(function (item) {
23618
- return filterHeader.includes(item.id);
23603
+ children: [jsxRuntime.jsx(ConditionalWrapper, __assign({
23604
+ condition: !decoration,
23605
+ wrapper: function (child) {
23606
+ return renderInfiniteScrollWrapper(child);
23607
+ }
23608
+ }, {
23609
+ children: jsxRuntime.jsxs(TableContent$3, __assign({}, getTableProps(), {
23610
+ children: [jsxRuntime.jsx(TableHead$3, __assign({
23611
+ hiddenHeader: hideHeader,
23612
+ css: headerCss,
23613
+ isInfiniteScroll: isInfiniteScroll
23614
+ }, {
23615
+ children: headerGroups.map(function (headerGroup) {
23616
+ var visibleHeaders = headerGroup.headers.filter(function (column) {
23617
+ return !column.isSubRow;
23619
23618
  });
23620
- }
23621
- return jsxRuntime.jsx(TableHeadRow$3, __assign({
23622
- css: cssTableCell
23623
- }, headerGroup.getHeaderGroupProps(), {
23624
- children: visibleHeaders.map(function (column, index) {
23625
- var headerRender = column.render('Header');
23626
- return jsxRuntime.jsx(TableHeadCell$3, __assign({}, column.getHeaderProps(function (props) {
23627
- return [props, !column.unsortable ? column.getSortByToggleProps({
23628
- title: t('sortColumnTitle', 'Urutkan') || 'Urutkan'
23629
- }) : {
23630
- onClick: column.onToggle
23619
+ if (filterHeader.length > 0) {
23620
+ visibleHeaders = visibleHeaders.filter(function (item) {
23621
+ return filterHeader.includes(item.id);
23622
+ });
23623
+ }
23624
+ return jsxRuntime.jsx(TableHeadRow$3, __assign({
23625
+ css: cssTableCell
23626
+ }, headerGroup.getHeaderGroupProps(), {
23627
+ children: visibleHeaders.map(function (column, index) {
23628
+ var headerRender = column.render('Header');
23629
+ return jsxRuntime.jsx(TableHeadCell$3, __assign({}, column.getHeaderProps(function (props) {
23630
+ return [props, !column.unsortable ? column.getSortByToggleProps({
23631
+ title: t('sortColumnTitle', 'Urutkan') || 'Urutkan'
23632
+ }) : {
23633
+ onClick: column.onToggle
23634
+ }, {
23635
+ style: {
23636
+ width: column.colWidth,
23637
+ maxWidth: column.colMaxWidth,
23638
+ minWidth: column.colMinWidth
23639
+ }
23640
+ }];
23641
+ }), {
23642
+ css: __assign(__assign(__assign(__assign({}, cssTableCell), stickyPositionStyling(column)), stickyShadowStyling(column, tableScrollPosition, scrollAreaWidth)), column.headerCss)
23631
23643
  }, {
23632
- style: {
23633
- width: column.colWidth,
23634
- maxWidth: column.colMaxWidth,
23635
- minWidth: column.colMinWidth
23644
+ children: typeof headerRender === 'string' ? jsxRuntime.jsx(TableHeaderCellContainer, __assign({
23645
+ isSortedDesc: column.isSortedDesc,
23646
+ unsortable: id ? true : column.unsortable,
23647
+ isToggleable: !!column.onToggle,
23648
+ isToggled: column.isToggled
23649
+ }, {
23650
+ children: jsxRuntime.jsx(TableHeadCellContent, __assign({
23651
+ heading: "headerTable"
23652
+ }, {
23653
+ children: headerRender.toUpperCase()
23654
+ }), void 0)
23655
+ }), void 0) : headerRender
23656
+ }), void 0);
23657
+ })
23658
+ }), void 0);
23659
+ })
23660
+ }), void 0), jsxRuntime.jsxs(TableBody$3, __assign({}, getTableBodyProps(), {
23661
+ children: [isInfiniteScroll && paddingTop > 0 && jsxRuntime.jsx("tr", {
23662
+ children: jsxRuntime.jsx("td", {
23663
+ style: {
23664
+ height: "".concat(paddingTop, "px")
23665
+ }
23666
+ }, void 0)
23667
+ }, void 0), (_d = decoration === null || decoration === void 0 ? void 0 : decoration.headerRender) === null || _d === void 0 ? void 0 : _d.call(decoration), decoration && page.map(function (row, i) {
23668
+ var _a;
23669
+ prepareRow(row);
23670
+ var isContextMenu = (_a = row.cells.filter(function (cell) {
23671
+ var _a, _b;
23672
+ return (_b = (_a = cell.column) === null || _a === void 0 ? void 0 : _a.options) === null || _b === void 0 ? void 0 : _b.length;
23673
+ })) === null || _a === void 0 ? void 0 : _a.length;
23674
+ return i < 1 && renderRowDecorationReference(row, isContextMenu, i);
23675
+ }), jsxRuntime.jsx(ConditionalWrapper, __assign({
23676
+ condition: Boolean(decoration),
23677
+ wrapper: function (child) {
23678
+ return jsxRuntime.jsx(TableRow$3, __assign({
23679
+ css: {
23680
+ '&:hover': {
23681
+ backgroundColor: 'unset'
23636
23682
  }
23637
- }];
23638
- }), {
23639
- css: __assign(__assign(__assign(__assign({}, cssTableCell), stickyPositionStyling(column)), stickyShadowStyling(column, tableScrollPosition, scrollAreaWidth)), column.headerCss)
23683
+ }
23640
23684
  }, {
23641
- children: typeof headerRender === 'string' ? jsxRuntime.jsx(TableHeaderCellContainer, __assign({
23642
- isSortedDesc: column.isSortedDesc,
23643
- unsortable: id ? true : column.unsortable,
23644
- isToggleable: !!column.onToggle,
23645
- isToggled: column.isToggled
23685
+ children: jsxRuntime.jsx(TableCell$3, __assign({
23686
+ colSpan: (decoration === null || decoration === void 0 ? void 0 : decoration.colSpan) || 12
23646
23687
  }, {
23647
- children: jsxRuntime.jsx(TableHeadCellContent, __assign({
23648
- heading: "headerTable"
23688
+ children: jsxRuntime.jsx(Box, __assign({
23689
+ css: __assign({
23690
+ height: 300,
23691
+ overflow: 'auto'
23692
+ }, decoration === null || decoration === void 0 ? void 0 : decoration.css)
23649
23693
  }, {
23650
- children: headerRender.toUpperCase()
23694
+ children: renderInfiniteScrollWrapper(renderTableDecorationChild(child))
23651
23695
  }), void 0)
23652
- }), void 0) : headerRender
23696
+ }), void 0)
23653
23697
  }), void 0);
23654
- })
23655
- }), void 0);
23656
- })
23657
- }), void 0), jsxRuntime.jsxs(TableBody$3, __assign({}, getTableBodyProps(), {
23658
- children: [isInfiniteScroll && paddingTop > 0 && jsxRuntime.jsx("tr", {
23659
- children: jsxRuntime.jsx("td", {
23660
- style: {
23661
- height: "".concat(paddingTop, "px")
23662
23698
  }
23663
- }, void 0)
23664
- }, void 0), (_e = decoration === null || decoration === void 0 ? void 0 : decoration.headerRender) === null || _e === void 0 ? void 0 : _e.call(decoration), decoration && page.map(function (row, i) {
23665
- var _a;
23666
- prepareRow(row);
23667
- var isContextMenu = (_a = row.cells.filter(function (cell) {
23668
- var _a, _b;
23669
- return (_b = (_a = cell.column) === null || _a === void 0 ? void 0 : _a.options) === null || _b === void 0 ? void 0 : _b.length;
23670
- })) === null || _a === void 0 ? void 0 : _a.length;
23671
- return i < 1 && renderRowDecorationReference(row, isContextMenu, i);
23672
- }), jsxRuntime.jsx(ConditionalWrapper, __assign({
23673
- condition: Boolean(decoration),
23674
- wrapper: function (child) {
23675
- return jsxRuntime.jsx(TableRow$3, __assign({
23676
- css: {
23677
- '&:hover': {
23678
- backgroundColor: 'unset'
23679
- }
23680
- }
23681
- }, {
23682
- children: jsxRuntime.jsx(TableCell$3, __assign({
23683
- colSpan: (decoration === null || decoration === void 0 ? void 0 : decoration.colSpan) || 12
23684
- }, {
23685
- children: jsxRuntime.jsx(Box, __assign({
23686
- css: __assign({
23687
- height: 300,
23688
- overflow: 'auto'
23689
- }, decoration === null || decoration === void 0 ? void 0 : decoration.css)
23690
- }, {
23691
- children: renderInfiniteScrollWrapper(renderTableDecorationChild(child))
23692
- }), void 0)
23693
- }), void 0)
23694
- }), void 0);
23695
- }
23696
- }, {
23697
- children: tableRowData.map(function (dataRow, i) {
23698
- var _a, _b, _c, _d;
23699
- var row = isInfiniteScroll ? page === null || page === void 0 ? void 0 : page[dataRow === null || dataRow === void 0 ? void 0 : dataRow.index] : dataRow;
23700
- prepareRow(row);
23701
- var subRowCells = row.cells.filter(function (cell) {
23702
- return cell.column.isSubRow;
23703
- });
23704
- var leftAddOnCells = (_a = row.cells.filter(function (cell) {
23705
- return ['expander', 'multiple-expander', 'selection'].includes(cell.column.id);
23706
- })) !== null && _a !== void 0 ? _a : [];
23707
- var notNullHeaderColumns = visibleColumns.filter(function (column) {
23708
- return typeof column.Header !== 'function' && column.Header !== null && !column.isSubRow;
23709
- });
23710
- var isContextMenu = Boolean((_b = row.cells.filter(function (cell) {
23711
- var _a, _b;
23712
- return (_b = (_a = cell.column) === null || _a === void 0 ? void 0 : _a.options) === null || _b === void 0 ? void 0 : _b.length;
23713
- })) === null || _b === void 0 ? void 0 : _b.length);
23714
- var customStyle = {};
23715
- var hideRowMenuColumn = false;
23716
- if (customRowsStyle && customRowsStyle(row.original).length) {
23717
- for (var i_2 = 0; i_2 < customRowsStyle(row.original).length; i_2++) {
23718
- if (customRowsStyle(row.original)[i_2].predicate) {
23719
- var customRowCss = (_c = customRowsStyle(row.original)[i_2]) === null || _c === void 0 ? void 0 : _c.css;
23720
- customStyle = customRowCss || {};
23721
- if ((_d = customRowsStyle(row.original)[i_2]) === null || _d === void 0 ? void 0 : _d.hideRowMenuColumn) {
23722
- isContextMenu = false;
23723
- hideRowMenuColumn = true;
23699
+ }, {
23700
+ children: tableRowData.map(function (dataRow, i) {
23701
+ var _a, _b, _c, _d;
23702
+ var row = isInfiniteScroll ? page === null || page === void 0 ? void 0 : page[dataRow === null || dataRow === void 0 ? void 0 : dataRow.index] : dataRow;
23703
+ prepareRow(row);
23704
+ var subRowCells = row.cells.filter(function (cell) {
23705
+ return cell.column.isSubRow;
23706
+ });
23707
+ var leftAddOnCells = (_a = row.cells.filter(function (cell) {
23708
+ return ['expander', 'multiple-expander', 'selection'].includes(cell.column.id);
23709
+ })) !== null && _a !== void 0 ? _a : [];
23710
+ var notNullHeaderColumns = visibleColumns.filter(function (column) {
23711
+ return typeof column.Header !== 'function' && column.Header !== null && !column.isSubRow;
23712
+ });
23713
+ var isContextMenu = Boolean((_b = row.cells.filter(function (cell) {
23714
+ var _a, _b;
23715
+ return (_b = (_a = cell.column) === null || _a === void 0 ? void 0 : _a.options) === null || _b === void 0 ? void 0 : _b.length;
23716
+ })) === null || _b === void 0 ? void 0 : _b.length);
23717
+ var customStyle = {};
23718
+ var hideRowMenuColumn = false;
23719
+ if (customRowsStyle && customRowsStyle(row.original).length) {
23720
+ for (var i_2 = 0; i_2 < customRowsStyle(row.original).length; i_2++) {
23721
+ if (customRowsStyle(row.original)[i_2].predicate) {
23722
+ var customRowCss = (_c = customRowsStyle(row.original)[i_2]) === null || _c === void 0 ? void 0 : _c.css;
23723
+ customStyle = customRowCss || {};
23724
+ if ((_d = customRowsStyle(row.original)[i_2]) === null || _d === void 0 ? void 0 : _d.hideRowMenuColumn) {
23725
+ isContextMenu = false;
23726
+ hideRowMenuColumn = true;
23727
+ }
23724
23728
  }
23725
23729
  }
23726
23730
  }
23727
- }
23728
- return jsxRuntime.jsxs(React__namespace.Fragment, {
23729
- children: [((rowGroup === null || rowGroup === void 0 ? void 0 : rowGroup.showGroupingWhenSorted) || sortBy.length <= 0) && row.original['isTopChild'] && ((rowGroup === null || rowGroup === void 0 ? void 0 : rowGroup.headerRender) ? rowGroup === null || rowGroup === void 0 ? void 0 : rowGroup.headerRender(row, {
23730
- getCellProps: function (cellProps) {
23731
- return {
23732
- css: __assign(__assign(__assign({}, stickyPositionStyling({
23733
- sticky: cellProps === null || cellProps === void 0 ? void 0 : cellProps.sticky,
23734
- stickyPosition: cellProps === null || cellProps === void 0 ? void 0 : cellProps.stickyPosition
23735
- })), stickyShadowStyling({
23736
- sticky: cellProps === null || cellProps === void 0 ? void 0 : cellProps.sticky,
23737
- shadow: cellProps === null || cellProps === void 0 ? void 0 : cellProps.shadow
23738
- }, tableScrollPosition, scrollAreaWidth)), cellProps === null || cellProps === void 0 ? void 0 : cellProps.css)
23739
- };
23740
- }
23741
- }) : jsxRuntime.jsx(Text$1, __assign({
23742
- variant: "contentButton"
23743
- }, {
23744
- children: row.cells[0].render('Cell')
23745
- }), void 0)), jsxRuntime.jsx(TableRow$3, __assign({
23746
- css: customStyle
23747
- }, row && row.getRowProps ? row.getRowProps() : {}, {
23748
- children: row.cells.filter(function (cell) {
23749
- return filterHeader.length > 0 ? filterHeader.includes(cell.column.id) : cell;
23750
- }).filter(function (cell) {
23751
- return !cell.column.isSubRow;
23752
- }).map(function (cell, index, row) {
23753
- var _a, _b, _c;
23754
- var visibleHeaders = (_a = headerGroups === null || headerGroups === void 0 ? void 0 : headerGroups[0]) === null || _a === void 0 ? void 0 : _a.headers.filter(function (column) {
23755
- return !column.isSubRow;
23756
- });
23757
- if (filterHeader.length > 0) {
23758
- visibleHeaders = visibleHeaders.filter(function (item) {
23759
- return filterHeader.includes(item.id);
23760
- });
23731
+ return jsxRuntime.jsxs(React__namespace.Fragment, {
23732
+ children: [((rowGroup === null || rowGroup === void 0 ? void 0 : rowGroup.showGroupingWhenSorted) || sortBy.length <= 0) && row.original['isTopChild'] && ((rowGroup === null || rowGroup === void 0 ? void 0 : rowGroup.headerRender) ? rowGroup === null || rowGroup === void 0 ? void 0 : rowGroup.headerRender(row, {
23733
+ getCellProps: function (cellProps) {
23734
+ return {
23735
+ css: __assign(__assign(__assign({}, stickyPositionStyling({
23736
+ sticky: cellProps === null || cellProps === void 0 ? void 0 : cellProps.sticky,
23737
+ stickyPosition: cellProps === null || cellProps === void 0 ? void 0 : cellProps.stickyPosition
23738
+ })), stickyShadowStyling({
23739
+ sticky: cellProps === null || cellProps === void 0 ? void 0 : cellProps.sticky,
23740
+ shadow: cellProps === null || cellProps === void 0 ? void 0 : cellProps.shadow
23741
+ }, tableScrollPosition, scrollAreaWidth)), cellProps === null || cellProps === void 0 ? void 0 : cellProps.css)
23742
+ };
23761
23743
  }
23762
- var collId = (_b = cell === null || cell === void 0 ? void 0 : cell.column) === null || _b === void 0 ? void 0 : _b.id;
23763
- var exceptionId = (_c = ['expander', 'multiple-expander', 'selection', 'menu', 'eye'].concat(additionalExceptionIds)) === null || _c === void 0 ? void 0 : _c.includes(collId);
23764
- return jsxRuntime.jsx(TableCell$3, __assign({}, cell.getCellProps(addOnCellStyle(cell.column.id)), {
23765
- css: __assign(__assign(__assign(__assign(__assign({}, cssTableCell), {
23766
- padding: !isContextMenu || exceptionId ? collId === 'expander' || collId === 'multiple-expander' ? '20px 4px' : '20px 8px' : '',
23767
- verticalAlign: cell.column.accessor ? cellAlign : 'center',
23768
- cursor: onRowClick ? 'pointer' : 'unset'
23769
- }), stickyPositionStyling(cell.column)), stickyShadowStyling(cell.column, tableScrollPosition, scrollAreaWidth)), {
23770
- paddingRight: row.length === index + 1 ? 30 : null
23771
- }),
23772
- onClick: function () {
23773
- if (!exceptionId) {
23774
- handleRowClick(row, i);
23775
- }
23744
+ }) : jsxRuntime.jsx(Text$1, __assign({
23745
+ variant: "contentButton"
23746
+ }, {
23747
+ children: row.cells[0].render('Cell')
23748
+ }), void 0)), jsxRuntime.jsx(TableRow$3, __assign({
23749
+ css: customStyle
23750
+ }, row && row.getRowProps ? row.getRowProps() : {}, {
23751
+ children: row.cells.filter(function (cell) {
23752
+ return filterHeader.length > 0 ? filterHeader.includes(cell.column.id) : cell;
23753
+ }).filter(function (cell) {
23754
+ return !cell.column.isSubRow;
23755
+ }).map(function (cell, index, row) {
23756
+ var _a, _b, _c;
23757
+ var visibleHeaders = (_a = headerGroups === null || headerGroups === void 0 ? void 0 : headerGroups[0]) === null || _a === void 0 ? void 0 : _a.headers.filter(function (column) {
23758
+ return !column.isSubRow;
23759
+ });
23760
+ if (filterHeader.length > 0) {
23761
+ visibleHeaders = visibleHeaders.filter(function (item) {
23762
+ return filterHeader.includes(item.id);
23763
+ });
23776
23764
  }
23777
- }, {
23778
- children: jsxRuntime.jsx(ConditionalWrapper, __assign({
23779
- condition: isContextMenu && !exceptionId,
23780
- wrapper: function (children) {
23781
- return jsxRuntime.jsx(ContextMenuTrigger, __assign({
23782
- id: "context-menu-table",
23783
- triggerSide: "left"
23784
- }, {
23785
- children: jsxRuntime.jsx(Box, __assign({
23786
- css: {
23787
- cursor: 'pointer',
23788
- padding: cell.column.accessor ? '20px 8px' : '20px 20px'
23789
- },
23790
- onClick: function () {
23791
- return handleRowClick(row, i);
23792
- }
23793
- }, {
23794
- children: children
23795
- }), void 0)
23796
- }), void 0);
23765
+ var collId = (_b = cell === null || cell === void 0 ? void 0 : cell.column) === null || _b === void 0 ? void 0 : _b.id;
23766
+ var exceptionId = (_c = ['expander', 'multiple-expander', 'selection', 'menu', 'eye'].concat(additionalExceptionIds)) === null || _c === void 0 ? void 0 : _c.includes(collId);
23767
+ return jsxRuntime.jsx(TableCell$3, __assign({}, cell.getCellProps(addOnCellStyle(cell.column.id)), {
23768
+ css: __assign(__assign(__assign(__assign(__assign({}, cssTableCell), {
23769
+ padding: !isContextMenu || exceptionId ? collId === 'expander' || collId === 'multiple-expander' ? '20px 4px' : '20px 8px' : '',
23770
+ verticalAlign: cell.column.accessor ? cellAlign : 'center',
23771
+ cursor: onRowClick ? 'pointer' : 'unset'
23772
+ }), stickyPositionStyling(cell.column)), stickyShadowStyling(cell.column, tableScrollPosition, scrollAreaWidth)), {
23773
+ paddingRight: index + 1 === row.length ? 30 : null,
23774
+ paddingLeft: index + 1 === row.length ? 30 : null
23775
+ }),
23776
+ onClick: function () {
23777
+ if (!exceptionId) {
23778
+ handleRowClick(row, i);
23779
+ }
23797
23780
  }
23798
23781
  }, {
23799
- children: jsxRuntime.jsx(Box, __assign({
23800
- css: {
23801
- visibility: hideRowMenuColumn && collId === 'menu' ? 'hidden' : 'visible'
23782
+ children: jsxRuntime.jsx(ConditionalWrapper, __assign({
23783
+ condition: isContextMenu && !exceptionId,
23784
+ wrapper: function (children) {
23785
+ return jsxRuntime.jsx(ContextMenuTrigger, __assign({
23786
+ id: "context-menu-table",
23787
+ triggerSide: "left"
23788
+ }, {
23789
+ children: jsxRuntime.jsx(Box, __assign({
23790
+ css: {
23791
+ cursor: 'pointer',
23792
+ padding: cell.column.accessor ? '20px 8px' : '20px 20px'
23793
+ },
23794
+ onClick: function () {
23795
+ return handleRowClick(row, i);
23796
+ }
23797
+ }, {
23798
+ children: children
23799
+ }), void 0)
23800
+ }), void 0);
23802
23801
  }
23803
23802
  }, {
23804
- children: cell.render('Cell')
23803
+ children: jsxRuntime.jsx(Box, __assign({
23804
+ css: {
23805
+ visibility: hideRowMenuColumn && collId === 'menu' ? 'hidden' : 'visible'
23806
+ }
23807
+ }, {
23808
+ children: cell.render('Cell')
23809
+ }), void 0)
23805
23810
  }), void 0)
23806
- }), void 0)
23807
- }), void 0);
23808
- })
23809
- }), void 0), row.isExpanded ? subRowCells.map(function (cell, index) {
23810
- return jsxRuntime.jsxs(TableRow$3, __assign({
23811
- subRow: true
23812
- }, {
23813
- children: [leftAddOnCells.map(function (_, index) {
23814
- return jsxRuntime.jsx("td", {
23815
- style: {
23816
- backgroundColor: colors$8.bgGray
23817
- }
23818
- }, index);
23819
- }), jsxRuntime.jsxs(React__namespace.Fragment, {
23820
- children: [jsxRuntime.jsx(TableCell$3, __assign({
23821
- subCell: true,
23822
- colSpan: notNullHeaderColumns.length > 5 ? 2 : 1,
23823
- headerSubCell: true,
23824
- css: __assign(__assign({
23825
- paddingTop: "".concat(index === 0 ? '24px' : '13px', " !important"),
23826
- paddingBottom: "".concat(index === subRowCells.length - 1 ? '24px' : '13px', " !important"),
23827
- backgroundColor: '$bgGray'
23828
- }, stickyPositionStyling(cell.column)), cell.column.headerCss)
23829
- }, {
23830
- children: jsxRuntime.jsx(Paragraph, __assign({
23831
- paragraph: "shortContentBold"
23811
+ }), void 0);
23812
+ })
23813
+ }), void 0), row.isExpanded ? subRowCells.map(function (cell, index) {
23814
+ return jsxRuntime.jsxs(TableRow$3, __assign({
23815
+ subRow: true
23816
+ }, {
23817
+ children: [leftAddOnCells.map(function (_, index) {
23818
+ return jsxRuntime.jsx("td", {
23819
+ style: {
23820
+ backgroundColor: colors$8.bgGray
23821
+ }
23822
+ }, index);
23823
+ }), jsxRuntime.jsxs(React__namespace.Fragment, {
23824
+ children: [jsxRuntime.jsx(TableCell$3, __assign({
23825
+ subCell: true,
23826
+ colSpan: notNullHeaderColumns.length > 5 ? 2 : 1,
23827
+ headerSubCell: true,
23828
+ css: __assign(__assign({
23829
+ paddingTop: "".concat(index === 0 ? '24px' : '13px', " !important"),
23830
+ paddingBottom: "".concat(index === subRowCells.length - 1 ? '24px' : '13px', " !important"),
23831
+ backgroundColor: '$bgGray'
23832
+ }, stickyPositionStyling(cell.column)), cell.column.headerCss)
23832
23833
  }, {
23833
- children: cell.column.Header
23834
- }), void 0)
23835
- }), void 0), jsxRuntime.jsx(TableCell$3, __assign({
23836
- subCell: true,
23837
- colSpan: visibleColumns.length - subRowCells.length,
23838
- css: {
23839
- paddingTop: "".concat(index === 0 ? '24px' : '13px', " !important"),
23840
- paddingBottom: "".concat(index === subRowCells.length - 1 ? '24px' : '13px', " !important")
23841
- }
23842
- }, {
23843
- children: jsxRuntime.jsx(Paragraph, __assign({
23844
- paragraph: "shortContentRegular"
23834
+ children: jsxRuntime.jsx(Paragraph, __assign({
23835
+ paragraph: "shortContentBold"
23836
+ }, {
23837
+ children: cell.column.Header
23838
+ }), void 0)
23839
+ }), void 0), jsxRuntime.jsx(TableCell$3, __assign({
23840
+ subCell: true,
23841
+ colSpan: visibleColumns.length - subRowCells.length,
23842
+ css: {
23843
+ paddingTop: "".concat(index === 0 ? '24px' : '13px', " !important"),
23844
+ paddingBottom: "".concat(index === subRowCells.length - 1 ? '24px' : '13px', " !important")
23845
+ }
23845
23846
  }, {
23846
- children: cell.render('Cell')
23847
- }), void 0)
23848
- }), void 0)]
23849
- }, cell.column.id)]
23850
- }), cell.column.id);
23851
- }) : null, ((rowGroup === null || rowGroup === void 0 ? void 0 : rowGroup.showGroupingWhenSorted) || sortBy.length <= 0) && row.original['isBottomChild'] && !!(rowGroup === null || rowGroup === void 0 ? void 0 : rowGroup.footerRender) && (rowGroup === null || rowGroup === void 0 ? void 0 : rowGroup.footerRender(row, {
23852
- getCellProps: function (cellProps) {
23853
- return {
23854
- css: __assign(__assign(__assign({}, stickyPositionStyling({
23855
- sticky: cellProps === null || cellProps === void 0 ? void 0 : cellProps.sticky,
23856
- stickyPosition: cellProps === null || cellProps === void 0 ? void 0 : cellProps.stickyPosition
23857
- })), stickyShadowStyling({
23858
- sticky: cellProps === null || cellProps === void 0 ? void 0 : cellProps.sticky,
23859
- shadow: cellProps === null || cellProps === void 0 ? void 0 : cellProps.shadow
23860
- }, tableScrollPosition, scrollAreaWidth)), cellProps === null || cellProps === void 0 ? void 0 : cellProps.css)
23861
- };
23862
- }
23863
- }))]
23864
- }, row.id);
23865
- })
23866
- }), void 0), (_f = decoration === null || decoration === void 0 ? void 0 : decoration.footerRender) === null || _f === void 0 ? void 0 : _f.call(decoration), isInfiniteScroll && paddingBottom > 0 && jsxRuntime.jsx("tr", {
23867
- children: jsxRuntime.jsx("td", {
23868
- style: {
23869
- height: "".concat(paddingBottom, "px")
23870
- }
23871
- }, void 0)
23872
- }, void 0)]
23873
- }), void 0)]
23874
- }), void 0)
23875
- }), void 0), renderContextMenu(), id && jsxRuntime.jsxs(jsxRuntime.Fragment, {
23847
+ children: jsxRuntime.jsx(Paragraph, __assign({
23848
+ paragraph: "shortContentRegular"
23849
+ }, {
23850
+ children: cell.render('Cell')
23851
+ }), void 0)
23852
+ }), void 0)]
23853
+ }, cell.column.id)]
23854
+ }), cell.column.id);
23855
+ }) : null, ((rowGroup === null || rowGroup === void 0 ? void 0 : rowGroup.showGroupingWhenSorted) || sortBy.length <= 0) && row.original['isBottomChild'] && !!(rowGroup === null || rowGroup === void 0 ? void 0 : rowGroup.footerRender) && (rowGroup === null || rowGroup === void 0 ? void 0 : rowGroup.footerRender(row, {
23856
+ getCellProps: function (cellProps) {
23857
+ return {
23858
+ css: __assign(__assign(__assign({}, stickyPositionStyling({
23859
+ sticky: cellProps === null || cellProps === void 0 ? void 0 : cellProps.sticky,
23860
+ stickyPosition: cellProps === null || cellProps === void 0 ? void 0 : cellProps.stickyPosition
23861
+ })), stickyShadowStyling({
23862
+ sticky: cellProps === null || cellProps === void 0 ? void 0 : cellProps.sticky,
23863
+ shadow: cellProps === null || cellProps === void 0 ? void 0 : cellProps.shadow
23864
+ }, tableScrollPosition, scrollAreaWidth)), cellProps === null || cellProps === void 0 ? void 0 : cellProps.css)
23865
+ };
23866
+ }
23867
+ }))]
23868
+ }, row.id);
23869
+ })
23870
+ }), void 0), (_e = decoration === null || decoration === void 0 ? void 0 : decoration.footerRender) === null || _e === void 0 ? void 0 : _e.call(decoration), isInfiniteScroll && paddingBottom > 0 && jsxRuntime.jsx("tr", {
23871
+ children: jsxRuntime.jsx("td", {
23872
+ style: {
23873
+ height: "".concat(paddingBottom, "px")
23874
+ }
23875
+ }, void 0)
23876
+ }, void 0)]
23877
+ }), void 0)]
23878
+ }), void 0)
23879
+ }), void 0), renderContextMenu()]
23880
+ }), void 0), id && jsxRuntime.jsxs(jsxRuntime.Fragment, {
23876
23881
  children: [jsxRuntime.jsx(HeaderMenuOption, __assign({
23877
23882
  rowData: tableRowData,
23878
23883
  open: openMenu,
@@ -23887,13 +23892,13 @@
23887
23892
  children: jsxRuntime.jsx(IconButton, __assign({
23888
23893
  css: {
23889
23894
  zIndex: '$docked',
23890
- position: 'fixed',
23891
- top: 20,
23892
- right: 10,
23895
+ position: 'absolute',
23896
+ top: '20px',
23897
+ right: '10px',
23893
23898
  '&:hover': {
23894
- backgroundColor: 'unset'
23899
+ backgroundColor: '#585f5f !important'
23895
23900
  },
23896
- backgroundColor: '#c0c4c4',
23901
+ backgroundColor: '#c0c4c4 !important',
23897
23902
  padding: 0,
23898
23903
  boxShadow: '0px 22px 43px 0px rgba(0, 0, 0, 0.08), 0px 9px 24px 0px rgba(0, 0, 0, 0.09), 0px 3px 9px 0px rgba(0, 0, 0, 0.13)'
23899
23904
  },
@@ -23908,13 +23913,13 @@
23908
23913
  }), void 0)
23909
23914
  }), void 0), jsxRuntime.jsx(Box, {
23910
23915
  css: {
23911
- backgroundColor: 'white',
23912
- position: 'fixed',
23916
+ position: 'absolute',
23913
23917
  top: 0,
23914
- height: tableHeight - 1,
23915
23918
  right: 0,
23916
23919
  width: 20,
23917
- boxShadow: ' -2px 0px 5px 0px #00000026'
23920
+ height: '100%',
23921
+ boxShadow: '-5px 0px 5px -3px #00000026',
23922
+ backgroundColor: 'white'
23918
23923
  }
23919
23924
  }, void 0)]
23920
23925
  }, void 0)]