@majoo-ui/react 1.58.20-rc.3 → 1.58.20-rc.5

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/index.umd.js CHANGED
@@ -22885,25 +22885,6 @@
22885
22885
  pointerEvents: 'none',
22886
22886
  boxSizing: 'border'
22887
22887
  };
22888
- var cssBtnCustom = {
22889
- position: 'sticky',
22890
- top: 0,
22891
- right: 0,
22892
- display: 'flex',
22893
- justifyContent: 'center',
22894
- alignItems: 'center',
22895
- '@sm': {
22896
- zIndex: 3
22897
- },
22898
- '@md': {
22899
- zIndex: 'unset'
22900
- },
22901
- backgroundColor: 'white',
22902
- '&::after': __assign(__assign({}, cssAfter), {
22903
- right: '50%',
22904
- boxShadow: 'inset -10px 0 10px -10px #00000026'
22905
- })
22906
- };
22907
22888
  var stickyShadowStyling = function stickyShadowStyling(column, tableScrollPosition, scrollAreaWidth) {
22908
22889
  if ((column === null || column === void 0 ? void 0 : column.sticky) && (column === null || column === void 0 ? void 0 : column.shadow)) {
22909
22890
  return column.sticky === 'left' ? {
@@ -22998,8 +22979,8 @@
22998
22979
  children = props.children,
22999
22980
  headerGroups = props.headerGroups;
23000
22981
  props.id;
23001
- var items = props.filterHeader,
23002
- rowData = props.rowData;
22982
+ var items = props.filterHeader;
22983
+ props.rowData;
23003
22984
  var headers = (headerGroups === null || headerGroups === void 0 ? void 0 : headerGroups[0]).headers;
23004
22985
  var visibleHeaders = headers.filter(function (column) {
23005
22986
  return !column.isSubRow;
@@ -23047,7 +23028,7 @@
23047
23028
  label: item.Header,
23048
23029
  value: item.id,
23049
23030
  disabled: index === 0
23050
- }, void 0), row.length !== index + 1 && jsxRuntime.jsx(Separator$2, {}, void 0)]
23031
+ }, index), row.length !== index + 1 && jsxRuntime.jsx(Separator$2, {}, void 0)]
23051
23032
  }, void 0);
23052
23033
  })
23053
23034
  }), void 0)
@@ -23069,8 +23050,8 @@
23069
23050
  portalled: true,
23070
23051
  isMobile: false,
23071
23052
  style: {
23072
- right: '100%',
23073
- left: 'unset'
23053
+ right: 20,
23054
+ left: null
23074
23055
  }
23075
23056
  }, {
23076
23057
  children: jsxRuntime.jsx(Flex$1, __assign({
@@ -23081,12 +23062,11 @@
23081
23062
  boxShadow: '$medium',
23082
23063
  backgroundColor: 'white',
23083
23064
  maxHeight: 440,
23084
- height: rowData.length <= 5 ? 300 : 'fit-content',
23085
23065
  minWidth: 167,
23086
- width: 'fit-content',
23066
+ width: 'max-content',
23087
23067
  overflowY: visibleHeaders.filter(function (val) {
23088
23068
  return typeof val.Header === 'string';
23089
- }).length > 7 || rowData.length <= 5 ? 'scroll' : 'none'
23069
+ }).length > 7 ? 'scroll' : 'none'
23090
23070
  }
23091
23071
  }, {
23092
23072
  children: jsxRuntime.jsx(CheckboxGroup, __assign({
@@ -23107,7 +23087,7 @@
23107
23087
  label: item.Header,
23108
23088
  value: item.id,
23109
23089
  disabled: index === 0
23110
- }, void 0), row.length !== index + 1 && jsxRuntime.jsx(Separator$2, {}, void 0)]
23090
+ }, index), row.length !== index + 1 && jsxRuntime.jsx(Separator$2, {}, void 0)]
23111
23091
  }, void 0);
23112
23092
  })
23113
23093
  }), void 0)
@@ -23173,31 +23153,30 @@
23173
23153
  searchQuery = _a.searchQuery,
23174
23154
  _t = _a.additionalExceptionIds,
23175
23155
  additionalExceptionIds = _t === void 0 ? [] : _t,
23176
- onExpand = _a.onExpand;
23177
- _a.id;
23178
- var _v = _a.customizableColumn,
23179
- customizableColumn = _v === void 0 ? null : _v;
23180
- var _w = React.useState(false),
23181
- openMenu = _w[0],
23182
- setOpen = _w[1];
23183
- var _x = React.useState(rowLimit),
23184
- limit = _x[0],
23185
- setLimit = _x[1];
23186
- var _y = React.useState({}),
23187
- dataRow = _y[0],
23188
- setDataRow = _y[1];
23189
- var _z = React.useState('start'),
23190
- tableScrollPosition = _z[0],
23191
- setTableScrollPosition = _z[1];
23192
- var _0 = React.useState(0),
23193
- scrollAreaWidth = _0[0],
23194
- setScrollAreaWidth = _0[1];
23195
- var _1 = React.useState([]),
23196
- stateSelectedRowIds = _1[0],
23197
- setStateSelectedRowIds = _1[1];
23198
- var _2 = useLocalStorageState("menu:".concat(customizableColumn), []),
23199
- filterHeader = _2[0],
23200
- setFilterHeader = _2[1];
23156
+ onExpand = _a.onExpand,
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];
23201
23180
  var t = reactI18next.useTranslation('MajooUI/table').t;
23202
23181
  var isMobile = useMediaQuery(isMobileLayout === undefined ? '(max-width: 1024px)' : isMobileLayout ? '(max-width: 8000px)' : '(max-width: 0px)');
23203
23182
  var customEmptyDataProps = searchQuery ? defaultEmptySearchProps(t, isMobile, searchQuery) : emptyDataProps || defaultEmptyDataProps(t, isMobile);
@@ -23243,12 +23222,12 @@
23243
23222
  setPageSize = instance.setPageSize,
23244
23223
  toggleRowSelected = instance.toggleRowSelected,
23245
23224
  toggleAllRowsSelected = instance.toggleAllRowsSelected,
23246
- _3 = instance.state,
23247
- pageIndex = _3.pageIndex,
23248
- pageSize = _3.pageSize,
23249
- sortBy = _3.sortBy,
23250
- selectedRowIds = _3.selectedRowIds,
23251
- 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,
23252
23231
  setHiddenColumns = instance.setHiddenColumns,
23253
23232
  setColumnOrder = instance.setColumnOrder;
23254
23233
  var scrollerRef = React.useRef(null);
@@ -23599,336 +23578,351 @@
23599
23578
  }, {
23600
23579
  children: "Loading .... "
23601
23580
  }), void 0)
23602
- }), void 0), !isMobile || customizableColumn ? jsxRuntime.jsxs(jsxRuntime.Fragment, {
23603
- children: [jsxRuntime.jsxs(TableContainer$3, __assign({
23604
- css: css,
23605
- ref: scrollerRef,
23606
- decoration: Boolean(decoration),
23607
- onScroll: function (e) {
23608
- var scrollPosition = e.currentTarget.scrollLeft;
23609
- if (scrollPosition < 3) {
23610
- setTableScrollPosition('start');
23611
- } else if (scrollPosition > scrollAreaWidth - 3) {
23612
- setTableScrollPosition('end');
23613
- } else {
23614
- setTableScrollPosition('between');
23615
- }
23581
+ }), void 0), !isMobile || id ? jsxRuntime.jsxs(jsxRuntime.Fragment, {
23582
+ children: [jsxRuntime.jsxs(Box, __assign({
23583
+ css: {
23584
+ position: 'relative'
23616
23585
  }
23617
23586
  }, {
23618
- children: [jsxRuntime.jsx(ConditionalWrapper, __assign({
23619
- condition: !decoration,
23620
- wrapper: function (child) {
23621
- 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
+ }
23622
23601
  }
23623
23602
  }, {
23624
- children: jsxRuntime.jsxs(TableContent$3, __assign({}, getTableProps(), {
23625
- children: [jsxRuntime.jsx(TableHead$3, __assign({
23626
- hiddenHeader: hideHeader,
23627
- css: headerCss,
23628
- isInfiniteScroll: isInfiniteScroll
23629
- }, {
23630
- children: headerGroups.map(function (headerGroup) {
23631
- var visibleHeaders = headerGroup.headers.filter(function (column) {
23632
- return !column.isSubRow;
23633
- });
23634
- if (filterHeader.length > 0) {
23635
- visibleHeaders = visibleHeaders.filter(function (item) {
23636
- 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;
23637
23618
  });
23638
- }
23639
- return jsxRuntime.jsxs(TableHeadRow$3, __assign({
23640
- css: cssTableCell
23641
- }, headerGroup.getHeaderGroupProps(), {
23642
- children: [visibleHeaders.map(function (column, index) {
23643
- var headerRender = column.render('Header');
23644
- return jsxRuntime.jsx(TableHeadCell$3, __assign({}, column.getHeaderProps(function (props) {
23645
- return [props, !column.unsortable ? column.getSortByToggleProps({
23646
- title: t('sortColumnTitle', 'Urutkan') || 'Urutkan'
23647
- }) : {
23648
- 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)
23649
23643
  }, {
23650
- style: {
23651
- width: column.colWidth,
23652
- maxWidth: column.colMaxWidth,
23653
- 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'
23654
23682
  }
23655
- }];
23656
- }), {
23657
- css: __assign(__assign(__assign(__assign({}, cssTableCell), stickyPositionStyling(column)), stickyShadowStyling(column, tableScrollPosition, scrollAreaWidth)), column.headerCss)
23683
+ }
23658
23684
  }, {
23659
- children: typeof headerRender === 'string' ? jsxRuntime.jsx(TableHeaderCellContainer, __assign({
23660
- isSortedDesc: column.isSortedDesc,
23661
- unsortable: customizableColumn ? true : column.unsortable,
23662
- isToggleable: !!column.onToggle,
23663
- isToggled: column.isToggled
23685
+ children: jsxRuntime.jsx(TableCell$3, __assign({
23686
+ colSpan: (decoration === null || decoration === void 0 ? void 0 : decoration.colSpan) || 12
23664
23687
  }, {
23665
- children: jsxRuntime.jsx(TableHeadCellContent, __assign({
23666
- 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)
23667
23693
  }, {
23668
- children: headerRender.toUpperCase()
23694
+ children: renderInfiniteScrollWrapper(renderTableDecorationChild(child))
23669
23695
  }), void 0)
23670
- }), void 0) : headerRender
23671
- }), void 0);
23672
- }), customizableColumn && jsxRuntime.jsx(TableHeadCell$3, __assign({
23673
- css: cssBtnCustom
23674
- }, {
23675
- children: jsxRuntime.jsx(HeaderMenuOption, __assign({
23676
- rowData: tableRowData,
23677
- open: openMenu,
23678
- id: customizableColumn,
23679
- onOpenChange: setOpen,
23680
- onChange: React.useCallback(function (items) {
23681
- setFilterHeader(items);
23682
- }, [filterHeader]),
23683
- headerGroups: headerGroups,
23684
- filterHeader: filterHeader
23685
- }, {
23686
- children: jsxRuntime.jsx(IconButton, __assign({
23687
- css: {
23688
- '&:hover': {
23689
- backgroundColor: 'unset'
23690
- },
23691
- backgroundColor: '#c0c4c4',
23692
- padding: 0,
23693
- 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)'
23694
- },
23695
- onClick: function () {
23696
- return setOpen(!openMenu);
23697
- },
23698
- buttonType: "secondary"
23699
- }, {
23700
- children: jsxRuntime.jsx(icons.PlusPrimitive, {
23701
- size: "20"
23702
- }, void 0)
23703
23696
  }), void 0)
23704
- }), void 0)
23705
- }), void 0)]
23706
- }), void 0);
23707
- })
23708
- }), void 0), jsxRuntime.jsxs(TableBody$3, __assign({}, getTableBodyProps(), {
23709
- children: [isInfiniteScroll && paddingTop > 0 && jsxRuntime.jsx("tr", {
23710
- children: jsxRuntime.jsx("td", {
23711
- style: {
23712
- height: "".concat(paddingTop, "px")
23697
+ }), void 0);
23713
23698
  }
23714
- }, void 0)
23715
- }, 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) {
23716
- var _a;
23717
- prepareRow(row);
23718
- var isContextMenu = (_a = row.cells.filter(function (cell) {
23719
- var _a, _b;
23720
- return (_b = (_a = cell.column) === null || _a === void 0 ? void 0 : _a.options) === null || _b === void 0 ? void 0 : _b.length;
23721
- })) === null || _a === void 0 ? void 0 : _a.length;
23722
- return i < 1 && renderRowDecorationReference(row, isContextMenu, i);
23723
- }), jsxRuntime.jsx(ConditionalWrapper, __assign({
23724
- condition: Boolean(decoration),
23725
- wrapper: function (child) {
23726
- return jsxRuntime.jsx(TableRow$3, __assign({
23727
- css: {
23728
- '&:hover': {
23729
- backgroundColor: 'unset'
23730
- }
23731
- }
23732
- }, {
23733
- children: jsxRuntime.jsx(TableCell$3, __assign({
23734
- colSpan: (decoration === null || decoration === void 0 ? void 0 : decoration.colSpan) || 12
23735
- }, {
23736
- children: jsxRuntime.jsx(Box, __assign({
23737
- css: __assign({
23738
- height: 300,
23739
- overflow: 'auto'
23740
- }, decoration === null || decoration === void 0 ? void 0 : decoration.css)
23741
- }, {
23742
- children: renderInfiniteScrollWrapper(renderTableDecorationChild(child))
23743
- }), void 0)
23744
- }), void 0)
23745
- }), void 0);
23746
- }
23747
- }, {
23748
- children: tableRowData.map(function (dataRow, i) {
23749
- var _a, _b, _c, _d;
23750
- var row = isInfiniteScroll ? page === null || page === void 0 ? void 0 : page[dataRow === null || dataRow === void 0 ? void 0 : dataRow.index] : dataRow;
23751
- prepareRow(row);
23752
- var subRowCells = row.cells.filter(function (cell) {
23753
- return cell.column.isSubRow;
23754
- });
23755
- var leftAddOnCells = (_a = row.cells.filter(function (cell) {
23756
- return ['expander', 'multiple-expander', 'selection'].includes(cell.column.id);
23757
- })) !== null && _a !== void 0 ? _a : [];
23758
- var notNullHeaderColumns = visibleColumns.filter(function (column) {
23759
- return typeof column.Header !== 'function' && column.Header !== null && !column.isSubRow;
23760
- });
23761
- var isContextMenu = Boolean((_b = row.cells.filter(function (cell) {
23762
- var _a, _b;
23763
- return (_b = (_a = cell.column) === null || _a === void 0 ? void 0 : _a.options) === null || _b === void 0 ? void 0 : _b.length;
23764
- })) === null || _b === void 0 ? void 0 : _b.length);
23765
- var customStyle = {};
23766
- var hideRowMenuColumn = false;
23767
- if (customRowsStyle && customRowsStyle(row.original).length) {
23768
- for (var i_2 = 0; i_2 < customRowsStyle(row.original).length; i_2++) {
23769
- if (customRowsStyle(row.original)[i_2].predicate) {
23770
- var customRowCss = (_c = customRowsStyle(row.original)[i_2]) === null || _c === void 0 ? void 0 : _c.css;
23771
- customStyle = customRowCss || {};
23772
- if ((_d = customRowsStyle(row.original)[i_2]) === null || _d === void 0 ? void 0 : _d.hideRowMenuColumn) {
23773
- isContextMenu = false;
23774
- 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
+ }
23775
23728
  }
23776
23729
  }
23777
23730
  }
23778
- }
23779
- return jsxRuntime.jsxs(React__namespace.Fragment, {
23780
- 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, {
23781
- getCellProps: function (cellProps) {
23782
- return {
23783
- css: __assign(__assign(__assign({}, stickyPositionStyling({
23784
- sticky: cellProps === null || cellProps === void 0 ? void 0 : cellProps.sticky,
23785
- stickyPosition: cellProps === null || cellProps === void 0 ? void 0 : cellProps.stickyPosition
23786
- })), stickyShadowStyling({
23787
- sticky: cellProps === null || cellProps === void 0 ? void 0 : cellProps.sticky,
23788
- shadow: cellProps === null || cellProps === void 0 ? void 0 : cellProps.shadow
23789
- }, tableScrollPosition, scrollAreaWidth)), cellProps === null || cellProps === void 0 ? void 0 : cellProps.css)
23790
- };
23791
- }
23792
- }) : jsxRuntime.jsx(Text$1, __assign({
23793
- variant: "contentButton"
23794
- }, {
23795
- children: row.cells[0].render('Cell')
23796
- }), void 0)), jsxRuntime.jsxs(TableRow$3, __assign({
23797
- css: customStyle
23798
- }, row && row.getRowProps ? row.getRowProps() : {}, {
23799
- children: [row.cells.filter(function (cell) {
23800
- return filterHeader.length > 0 ? filterHeader.includes(cell.column.id) : cell;
23801
- }).filter(function (cell) {
23802
- return !cell.column.isSubRow;
23803
- }).map(function (cell) {
23804
- var _a, _b, _c;
23805
- var visibleHeaders = (_a = headerGroups === null || headerGroups === void 0 ? void 0 : headerGroups[0]) === null || _a === void 0 ? void 0 : _a.headers.filter(function (column) {
23806
- return !column.isSubRow;
23807
- });
23808
- if (filterHeader.length > 0) {
23809
- visibleHeaders = visibleHeaders.filter(function (item) {
23810
- return filterHeader.includes(item.id);
23811
- });
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
+ };
23812
23743
  }
23813
- var collId = (_b = cell === null || cell === void 0 ? void 0 : cell.column) === null || _b === void 0 ? void 0 : _b.id;
23814
- var exceptionId = (_c = ['expander', 'multiple-expander', 'selection', 'menu', 'eye'].concat(additionalExceptionIds)) === null || _c === void 0 ? void 0 : _c.includes(collId);
23815
- return jsxRuntime.jsx(TableCell$3, __assign({}, cell.getCellProps(addOnCellStyle(cell.column.id)), {
23816
- css: __assign(__assign(__assign(__assign({}, cssTableCell), {
23817
- padding: !isContextMenu || exceptionId ? collId === 'expander' || collId === 'multiple-expander' ? '20px 4px' : '20px 8px' : '',
23818
- verticalAlign: cell.column.accessor ? cellAlign : 'center',
23819
- cursor: onRowClick ? 'pointer' : 'unset'
23820
- }), stickyPositionStyling(cell.column)), stickyShadowStyling(cell.column, tableScrollPosition, scrollAreaWidth)),
23821
- onClick: function () {
23822
- if (!exceptionId) {
23823
- handleRowClick(row, i);
23824
- }
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
+ });
23825
23764
  }
23826
- }, {
23827
- children: jsxRuntime.jsx(ConditionalWrapper, __assign({
23828
- condition: isContextMenu && !exceptionId,
23829
- wrapper: function (children) {
23830
- return jsxRuntime.jsx(ContextMenuTrigger, __assign({
23831
- id: "context-menu-table",
23832
- triggerSide: "left"
23833
- }, {
23834
- children: jsxRuntime.jsx(Box, __assign({
23835
- css: {
23836
- cursor: 'pointer',
23837
- padding: cell.column.accessor ? '20px 8px' : '20px 20px'
23838
- },
23839
- onClick: function () {
23840
- return handleRowClick(row, i);
23841
- }
23842
- }, {
23843
- children: children
23844
- }), void 0)
23845
- }), 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
+ }
23846
23780
  }
23847
23781
  }, {
23848
- children: jsxRuntime.jsx(Box, __assign({
23849
- css: {
23850
- 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);
23851
23801
  }
23852
23802
  }, {
23853
- 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)
23854
23810
  }), void 0)
23855
- }), void 0)
23856
- }), void 0);
23857
- }), customizableColumn && jsxRuntime.jsx(TableCell$3, {
23858
- css: __assign(__assign({}, cssBtnCustom), {
23859
- maxHeight: 100,
23860
- '&::after': __assign(__assign({}, cssBtnCustom['&::after']), {
23861
- height: 100
23862
- })
23811
+ }), void 0);
23863
23812
  })
23864
- }, void 0)]
23865
- }), void 0), row.isExpanded ? subRowCells.map(function (cell, index) {
23866
- return jsxRuntime.jsxs(TableRow$3, __assign({
23867
- subRow: true
23868
- }, {
23869
- children: [leftAddOnCells.map(function (_, index) {
23870
- return jsxRuntime.jsx("td", {
23871
- style: {
23872
- backgroundColor: colors$8.bgGray
23873
- }
23874
- }, index);
23875
- }), jsxRuntime.jsxs(React__namespace.Fragment, {
23876
- children: [jsxRuntime.jsx(TableCell$3, __assign({
23877
- subCell: true,
23878
- colSpan: notNullHeaderColumns.length > 5 ? 2 : 1,
23879
- headerSubCell: true,
23880
- css: __assign(__assign({
23881
- paddingTop: "".concat(index === 0 ? '24px' : '13px', " !important"),
23882
- paddingBottom: "".concat(index === subRowCells.length - 1 ? '24px' : '13px', " !important"),
23883
- backgroundColor: '$bgGray'
23884
- }, stickyPositionStyling(cell.column)), cell.column.headerCss)
23885
- }, {
23886
- children: jsxRuntime.jsx(Paragraph, __assign({
23887
- paragraph: "shortContentBold"
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)
23888
23833
  }, {
23889
- children: cell.column.Header
23890
- }), void 0)
23891
- }), void 0), jsxRuntime.jsx(TableCell$3, __assign({
23892
- subCell: true,
23893
- colSpan: visibleColumns.length - subRowCells.length,
23894
- css: {
23895
- paddingTop: "".concat(index === 0 ? '24px' : '13px', " !important"),
23896
- paddingBottom: "".concat(index === subRowCells.length - 1 ? '24px' : '13px', " !important")
23897
- }
23898
- }, {
23899
- children: jsxRuntime.jsx(Paragraph, __assign({
23900
- 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
+ }
23901
23846
  }, {
23902
- children: cell.render('Cell')
23903
- }), void 0)
23904
- }), void 0)]
23905
- }, cell.column.id)]
23906
- }), cell.column.id);
23907
- }) : 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, {
23908
- getCellProps: function (cellProps) {
23909
- return {
23910
- css: __assign(__assign(__assign({}, stickyPositionStyling({
23911
- sticky: cellProps === null || cellProps === void 0 ? void 0 : cellProps.sticky,
23912
- stickyPosition: cellProps === null || cellProps === void 0 ? void 0 : cellProps.stickyPosition
23913
- })), stickyShadowStyling({
23914
- sticky: cellProps === null || cellProps === void 0 ? void 0 : cellProps.sticky,
23915
- shadow: cellProps === null || cellProps === void 0 ? void 0 : cellProps.shadow
23916
- }, tableScrollPosition, scrollAreaWidth)), cellProps === null || cellProps === void 0 ? void 0 : cellProps.css)
23917
- };
23918
- }
23919
- }))]
23920
- }, row.id);
23921
- })
23922
- }), 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", {
23923
- children: jsxRuntime.jsx("td", {
23924
- style: {
23925
- height: "".concat(paddingBottom, "px")
23926
- }
23927
- }, void 0)
23928
- }, void 0)]
23929
- }), void 0)]
23930
- }), void 0)
23931
- }), void 0), renderContextMenu()]
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, {
23881
+ children: [jsxRuntime.jsx(HeaderMenuOption, __assign({
23882
+ rowData: tableRowData,
23883
+ open: openMenu,
23884
+ id: id,
23885
+ onOpenChange: setOpen,
23886
+ onChange: React.useCallback(function (items) {
23887
+ setFilterHeader(items);
23888
+ }, [filterHeader]),
23889
+ headerGroups: headerGroups,
23890
+ filterHeader: filterHeader
23891
+ }, {
23892
+ children: jsxRuntime.jsx(IconButton, __assign({
23893
+ css: {
23894
+ zIndex: '$docked',
23895
+ position: 'absolute',
23896
+ top: '20px',
23897
+ right: '10px',
23898
+ '&:hover': {
23899
+ backgroundColor: '#585f5f'
23900
+ },
23901
+ backgroundColor: '#c0c4c4',
23902
+ padding: 0,
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)'
23904
+ },
23905
+ onClick: function () {
23906
+ return setOpen(!openMenu);
23907
+ },
23908
+ buttonType: "secondary"
23909
+ }, {
23910
+ children: jsxRuntime.jsx(icons.PlusPrimitive, {
23911
+ size: "20"
23912
+ }, void 0)
23913
+ }), void 0)
23914
+ }), void 0), jsxRuntime.jsx(Box, {
23915
+ css: {
23916
+ position: 'absolute',
23917
+ top: 0,
23918
+ right: 0,
23919
+ width: 20,
23920
+ height: '100%',
23921
+ boxShadow: '-5px 0px 5px -3px #00000026',
23922
+ backgroundColor: 'white'
23923
+ }
23924
+ }, void 0)]
23925
+ }, void 0)]
23932
23926
  }), void 0), !isInfiniteScroll && jsxRuntime.jsx(Box, __assign({
23933
23927
  css: {
23934
23928
  width: '100%'