@majoo-ui/react 1.55.37 → 1.55.38

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 +339 -193
  2. package/index.umd.js +365 -207
  3. package/package.json +2 -2
package/index.esm.js CHANGED
@@ -2264,7 +2264,7 @@ Flex$1.defaultProps = {
2264
2264
  };
2265
2265
  Flex$1.displayName = 'Flex';
2266
2266
 
2267
- const _excluded$B = ["children"],
2267
+ const _excluded$C = ["children"],
2268
2268
  _excluded2$4 = ["children"];
2269
2269
  var _jsxFileName$12 = "/Users/apple/Documents/project/majoo/majoo-ui/packages/react/src/layout/grid/Grid.js";
2270
2270
  const GridComponent = styled('div', {
@@ -2440,7 +2440,7 @@ const Grid = _ref => {
2440
2440
  let {
2441
2441
  children
2442
2442
  } = _ref,
2443
- props = _objectWithoutPropertiesLoose(_ref, _excluded$B);
2443
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$C);
2444
2444
  return /*#__PURE__*/React__default.createElement(GridComponent, _extends({}, props, {
2445
2445
  css: Object.assign({}, props.css, {
2446
2446
  gridAutoColumns: props.autoColumns,
@@ -2520,7 +2520,7 @@ GridItem.propTypes = {
2520
2520
  };
2521
2521
  GridItem.displayName = 'Grid Item';
2522
2522
 
2523
- const _excluded$A = ["children", "isCollapse", "css", "contentHeader"];
2523
+ const _excluded$B = ["children", "isCollapse", "css", "contentHeader"];
2524
2524
  var _jsxFileName$11 = "/Users/apple/Documents/project/majoo/majoo-ui/packages/react/src/layout/pageContainer/PageContainer.js";
2525
2525
  const StyledDiv$2 = styled(Flex$1, {
2526
2526
  justifyContent: 'center',
@@ -2549,7 +2549,7 @@ const PageContainer = _ref => {
2549
2549
  css,
2550
2550
  contentHeader
2551
2551
  } = _ref,
2552
- props = _objectWithoutPropertiesLoose(_ref, _excluded$A);
2552
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$B);
2553
2553
  return /*#__PURE__*/React__default.createElement(StyledDiv$2, _extends({
2554
2554
  id: "retina-container",
2555
2555
  css: Object.assign({
@@ -2878,7 +2878,7 @@ const Link = /*#__PURE__*/React.forwardRef((_a, forwardedRef) => {
2878
2878
  }), void 0);
2879
2879
  });
2880
2880
 
2881
- const _excluded$z = ["id", "title", "description", "position", "dismissAfter", "variant", "onClick", "onRemove", "isExternalOfAction", "onClickOfAction", "captionOfAction", "hrefOfAction"];
2881
+ const _excluded$A = ["id", "title", "description", "position", "dismissAfter", "variant", "onClick", "onRemove", "isExternalOfAction", "onClickOfAction", "captionOfAction", "hrefOfAction"];
2882
2882
  var _jsxFileName$10 = "/Users/apple/Documents/project/majoo/majoo-ui/packages/react/src/components/toast/Toast.js";
2883
2883
  const TOAST_WIDTH = 576;
2884
2884
  const ANIMATION_DURATION = 400;
@@ -3046,7 +3046,7 @@ const Toast = _ref => {
3046
3046
  captionOfAction,
3047
3047
  hrefOfAction
3048
3048
  } = _ref,
3049
- rest = _objectWithoutPropertiesLoose(_ref, _excluded$z);
3049
+ rest = _objectWithoutPropertiesLoose(_ref, _excluded$A);
3050
3050
  const [isOpen, setIsOpen] = React.useState(false);
3051
3051
  const close = React.useCallback(() => {
3052
3052
  setIsOpen(false);
@@ -3226,6 +3226,7 @@ Toast.defaultProps = {
3226
3226
 
3227
3227
  const ToastContext = /*#__PURE__*/React.createContext({});
3228
3228
 
3229
+ const _excluded$z = ["preventDuplicate"];
3229
3230
  var _jsxFileName$$ = "/Users/apple/Documents/project/majoo/majoo-ui/packages/react/src/components/toast/ToastContainer.js";
3230
3231
  const ToastBox = styled(Flex$1, {
3231
3232
  position: 'fixed',
@@ -3285,15 +3286,19 @@ const ToastContainer = ({
3285
3286
  lineNumber: 44,
3286
3287
  columnNumber: 7
3287
3288
  }
3288
- }, toasts.map(toast => {
3289
+ }, toasts.map((item, index) => {
3290
+ const {
3291
+ preventDuplicate
3292
+ } = item,
3293
+ toast = _objectWithoutPropertiesLoose(item, _excluded$z);
3289
3294
  return /*#__PURE__*/React.createElement(Toast, _extends({
3290
- key: toast.id,
3295
+ key: preventDuplicate ? toast.id : `${toast.id}-${index}`,
3291
3296
  onRemove: () => removeToast(toast.id)
3292
3297
  }, toast, {
3293
3298
  __self: undefined,
3294
3299
  __source: {
3295
3300
  fileName: _jsxFileName$$,
3296
- lineNumber: 46,
3301
+ lineNumber: 47,
3297
3302
  columnNumber: 18
3298
3303
  }
3299
3304
  }));
@@ -3323,9 +3328,12 @@ const ToastProvider = ({
3323
3328
  };
3324
3329
  const addToast = React.useCallback(toast => {
3325
3330
  const toastInstance = createToastInstance(toast);
3326
- if (!toasts.some(currToast => toast.id === currToast.id) || !toast.preventDuplicate) {
3327
- setToasts(toastItems => [...toastItems, toastInstance]);
3328
- }
3331
+ setToasts(toastItems => {
3332
+ if (!toastItems.some(currToast => toast.id === currToast.id) || !toast.preventDuplicate) {
3333
+ return [...toastItems, toastInstance];
3334
+ }
3335
+ return toastItems;
3336
+ });
3329
3337
  return toastInstance;
3330
3338
  }, [toasts, setToasts]);
3331
3339
  const removeToast = React.useCallback(id => {
@@ -3339,7 +3347,7 @@ const ToastProvider = ({
3339
3347
  __self: undefined,
3340
3348
  __source: {
3341
3349
  fileName: _jsxFileName$_,
3342
- lineNumber: 43,
3350
+ lineNumber: 47,
3343
3351
  columnNumber: 5
3344
3352
  }
3345
3353
  }, children, /*#__PURE__*/React.createElement(ToastContainer, {
@@ -3348,7 +3356,7 @@ const ToastProvider = ({
3348
3356
  __self: undefined,
3349
3357
  __source: {
3350
3358
  fileName: _jsxFileName$_,
3351
- lineNumber: 45,
3359
+ lineNumber: 49,
3352
3360
  columnNumber: 7
3353
3361
  }
3354
3362
  }), /*#__PURE__*/React.createElement(ToastContainer, {
@@ -3357,7 +3365,7 @@ const ToastProvider = ({
3357
3365
  __self: undefined,
3358
3366
  __source: {
3359
3367
  fileName: _jsxFileName$_,
3360
- lineNumber: 49,
3368
+ lineNumber: 53,
3361
3369
  columnNumber: 7
3362
3370
  }
3363
3371
  }), /*#__PURE__*/React.createElement(ToastContainer, {
@@ -3366,7 +3374,7 @@ const ToastProvider = ({
3366
3374
  __self: undefined,
3367
3375
  __source: {
3368
3376
  fileName: _jsxFileName$_,
3369
- lineNumber: 53,
3377
+ lineNumber: 57,
3370
3378
  columnNumber: 7
3371
3379
  }
3372
3380
  }), /*#__PURE__*/React.createElement(ToastContainer, {
@@ -3375,7 +3383,7 @@ const ToastProvider = ({
3375
3383
  __self: undefined,
3376
3384
  __source: {
3377
3385
  fileName: _jsxFileName$_,
3378
- lineNumber: 57,
3386
+ lineNumber: 61,
3379
3387
  columnNumber: 7
3380
3388
  }
3381
3389
  }));
@@ -9923,7 +9931,7 @@ const TagWrapper$1 = styled(Box, {
9923
9931
  const OptionWrapper$1 = styled('div', {
9924
9932
  display: 'none',
9925
9933
  overflow: 'hidden',
9926
- zIndex: 1,
9934
+ zIndex: 12,
9927
9935
  borderRadius: '$sm',
9928
9936
  backgroundColor: '$bgWhite',
9929
9937
  boxShadow: '0px 2px 12px #00000014',
@@ -10526,78 +10534,82 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
10526
10534
  lineNumber: 671,
10527
10535
  columnNumber: 13
10528
10536
  }
10529
- }), isOpen && items.map((item, index) => /*#__PURE__*/React__default.createElement(ItemWrapper$1, _extends({
10530
- key: item.id
10531
- }, getItemProps({
10532
- item,
10533
- index: index,
10534
- disabled: item.isDisabled
10535
- }), {
10536
- css: {
10537
- backgroundColor: highlightedIndex === index ? '$bgGray' : 'white',
10538
- cursor: item.isDisabled ? 'not-allowed' : 'pointer',
10539
- color: item.isDisabled ? '$textDisable' : 'textPrimary'
10540
- },
10541
- __self: undefined,
10542
- __source: {
10543
- fileName: _jsxFileName$w,
10544
- lineNumber: 674,
10545
- columnNumber: 19
10546
- }
10547
- }), /*#__PURE__*/React__default.createElement(IconWrapper, {
10548
- css: {
10549
- width: '16px',
10550
- height: '16px',
10551
- border: '1px solid $bgBorder',
10552
- cursor: item.isDisabled ? 'not-allowed' : 'pointer'
10553
- },
10554
- __self: undefined,
10555
- __source: {
10556
- fileName: _jsxFileName$w,
10557
- lineNumber: 687,
10558
- columnNumber: 21
10559
- }
10560
- }, item.isDisabled ? /*#__PURE__*/React__default.createElement(CheckOutline, {
10561
- color: colors$5.iconDisable,
10562
- __self: undefined,
10563
- __source: {
10564
- fileName: _jsxFileName$w,
10565
- lineNumber: 696,
10566
- columnNumber: 25
10567
- }
10568
- }) : selectedValue.includes(item.id) && (item.isDisabled === false || item.isDisabled === undefined) && /*#__PURE__*/React__default.createElement(CheckOutline, {
10569
- color: colors$5.iconGreen,
10570
- __self: undefined,
10571
- __source: {
10572
- fileName: _jsxFileName$w,
10573
- lineNumber: 700,
10574
- columnNumber: 27
10575
- }
10576
- }), showSelectAll && (item === null || item === void 0 ? void 0 : item.id) === '!all' && selectedValue !== null && selectedValue !== void 0 && selectedValue.length && (selectedValue === null || selectedValue === void 0 ? void 0 : selectedValue.length) < (items === null || items === void 0 ? void 0 : items.length) ? /*#__PURE__*/React__default.createElement(IndeterminateFilled, {
10577
- __self: undefined,
10578
- __source: {
10579
- fileName: _jsxFileName$w,
10580
- lineNumber: 707,
10581
- columnNumber: 25
10582
- }
10583
- }, "-") : /*#__PURE__*/React__default.createElement("div", {
10584
- __self: undefined,
10585
- __source: {
10586
- fileName: _jsxFileName$w,
10587
- lineNumber: 709,
10588
- columnNumber: 25
10589
- }
10590
- })), /*#__PURE__*/React__default.createElement(Item$3, {
10591
- css: {
10592
- backgroundColor: 'unset'
10593
- },
10594
- __self: undefined,
10595
- __source: {
10596
- fileName: _jsxFileName$w,
10597
- lineNumber: 712,
10598
- columnNumber: 21
10599
- }
10600
- }, item.name)))) : /*#__PURE__*/React__default.createElement(Option, _extends({
10537
+ }), isOpen && items.map((item, index) => {
10538
+ var _item$render;
10539
+ return /*#__PURE__*/React__default.createElement(ItemWrapper$1, _extends({
10540
+ key: item.id
10541
+ }, getItemProps({
10542
+ item,
10543
+ index: index,
10544
+ disabled: item.isDisabled
10545
+ }), {
10546
+ css: {
10547
+ backgroundColor: highlightedIndex === index ? '$bgGray' : 'white',
10548
+ cursor: item.isDisabled ? 'not-allowed' : 'pointer',
10549
+ color: item.isDisabled ? '$textDisable' : 'textPrimary'
10550
+ },
10551
+ __self: undefined,
10552
+ __source: {
10553
+ fileName: _jsxFileName$w,
10554
+ lineNumber: 674,
10555
+ columnNumber: 19
10556
+ }
10557
+ }), /*#__PURE__*/React__default.createElement(IconWrapper, {
10558
+ css: {
10559
+ width: '16px',
10560
+ height: '16px',
10561
+ border: '1px solid $bgBorder',
10562
+ cursor: item.isDisabled ? 'not-allowed' : 'pointer'
10563
+ },
10564
+ __self: undefined,
10565
+ __source: {
10566
+ fileName: _jsxFileName$w,
10567
+ lineNumber: 687,
10568
+ columnNumber: 21
10569
+ }
10570
+ }, item.isDisabled ? /*#__PURE__*/React__default.createElement(CheckOutline, {
10571
+ color: colors$5.iconDisable,
10572
+ __self: undefined,
10573
+ __source: {
10574
+ fileName: _jsxFileName$w,
10575
+ lineNumber: 696,
10576
+ columnNumber: 25
10577
+ }
10578
+ }) : selectedValue.includes(item.id) && (item.isDisabled === false || item.isDisabled === undefined) && /*#__PURE__*/React__default.createElement(CheckOutline, {
10579
+ color: colors$5.iconGreen,
10580
+ __self: undefined,
10581
+ __source: {
10582
+ fileName: _jsxFileName$w,
10583
+ lineNumber: 700,
10584
+ columnNumber: 27
10585
+ }
10586
+ }), showSelectAll && (item === null || item === void 0 ? void 0 : item.id) === '!all' && selectedValue !== null && selectedValue !== void 0 && selectedValue.length && (selectedValue === null || selectedValue === void 0 ? void 0 : selectedValue.length) < (items === null || items === void 0 ? void 0 : items.length) ? /*#__PURE__*/React__default.createElement(IndeterminateFilled, {
10587
+ __self: undefined,
10588
+ __source: {
10589
+ fileName: _jsxFileName$w,
10590
+ lineNumber: 707,
10591
+ columnNumber: 25
10592
+ }
10593
+ }, "-") : /*#__PURE__*/React__default.createElement("div", {
10594
+ __self: undefined,
10595
+ __source: {
10596
+ fileName: _jsxFileName$w,
10597
+ lineNumber: 709,
10598
+ columnNumber: 25
10599
+ }
10600
+ })), /*#__PURE__*/React__default.createElement(Item$3, {
10601
+ css: {
10602
+ backgroundColor: 'unset',
10603
+ width: '100%'
10604
+ },
10605
+ __self: undefined,
10606
+ __source: {
10607
+ fileName: _jsxFileName$w,
10608
+ lineNumber: 712,
10609
+ columnNumber: 21
10610
+ }
10611
+ }, item.render ? (_item$render = item.render) === null || _item$render === void 0 ? void 0 : _item$render.call(item, item.name) : item.name));
10612
+ })) : /*#__PURE__*/React__default.createElement(Option, _extends({
10601
10613
  css: {
10602
10614
  height: 'auto'
10603
10615
  }
@@ -10607,14 +10619,14 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
10607
10619
  __self: undefined,
10608
10620
  __source: {
10609
10621
  fileName: _jsxFileName$w,
10610
- lineNumber: 717,
10622
+ lineNumber: 719,
10611
10623
  columnNumber: 13
10612
10624
  }
10613
10625
  }), /*#__PURE__*/React__default.createElement(StyledDiv, {
10614
10626
  __self: undefined,
10615
10627
  __source: {
10616
10628
  fileName: _jsxFileName$w,
10617
- lineNumber: 718,
10629
+ lineNumber: 720,
10618
10630
  columnNumber: 15
10619
10631
  }
10620
10632
  }, /*#__PURE__*/React__default.createElement("div", {
@@ -10624,7 +10636,7 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
10624
10636
  __self: undefined,
10625
10637
  __source: {
10626
10638
  fileName: _jsxFileName$w,
10627
- lineNumber: 719,
10639
+ lineNumber: 721,
10628
10640
  columnNumber: 17
10629
10641
  }
10630
10642
  }, /*#__PURE__*/React__default.createElement(CircleInfoOutline, {
@@ -10636,7 +10648,7 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
10636
10648
  __self: undefined,
10637
10649
  __source: {
10638
10650
  fileName: _jsxFileName$w,
10639
- lineNumber: 720,
10651
+ lineNumber: 722,
10640
10652
  columnNumber: 19
10641
10653
  }
10642
10654
  })), textEmptyItem != null ? textEmptyItem : t('emptyItemText', 'Item tidak ditemukan')))));
@@ -18724,7 +18736,14 @@ const TableContainer$3 = styled('div', {
18724
18736
  maxWidth: '100%',
18725
18737
  position: 'relative',
18726
18738
  height: '100%',
18727
- overflow: 'auto'
18739
+ overflow: 'auto',
18740
+ variants: {
18741
+ decoration: {
18742
+ true: {
18743
+ overflow: 'unset'
18744
+ }
18745
+ }
18746
+ }
18728
18747
  });
18729
18748
  const TableContent$3 = styled('table', {
18730
18749
  width: '100%',
@@ -18750,12 +18769,8 @@ const TableHead$3 = styled('thead', {
18750
18769
  hiddenHeader: {
18751
18770
  true: {
18752
18771
  opacity: 0,
18753
- '& > tr > th': {
18754
- height: '0px !important',
18755
- '& > div': {
18756
- marginTop: '-50px'
18757
- }
18758
- }
18772
+ zIndex: -100,
18773
+ border: 'none'
18759
18774
  }
18760
18775
  }
18761
18776
  }
@@ -19249,6 +19264,104 @@ function Table({
19249
19264
  })
19250
19265
  }), void 0);
19251
19266
  };
19267
+ const renderRowDecorationReference = (row, isContextMenu, i) => {
19268
+ return jsx(TableRow$3, Object.assign({
19269
+ css: {
19270
+ display: 'none'
19271
+ }
19272
+ }, row.getRowProps(), {
19273
+ children: row.cells.filter(cell => !cell.column.isSubRow).map(cell => {
19274
+ var _a, _b;
19275
+ const collId = (_a = cell === null || cell === void 0 ? void 0 : cell.column) === null || _a === void 0 ? void 0 : _a.id;
19276
+ const exceptionId = (_b = ['expander', 'selection', 'menu', 'eye'].concat(additionalExceptionIds)) === null || _b === void 0 ? void 0 : _b.includes(collId);
19277
+ return jsx(TableCell$3, Object.assign({}, cell.getCellProps(addOnCellStyle(cell.column.id)), {
19278
+ css: Object.assign(Object.assign({
19279
+ padding: !isContextMenu || exceptionId ? collId === 'expander' ? '20px 4px' : '20px 8px' : '',
19280
+ verticalAlign: cell.column.accessor ? cellAlign : 'center',
19281
+ cursor: onRowClick ? 'pointer' : 'unset'
19282
+ }, stickyPositionStyling(cell.column)), stickyShadowStyling(cell.column, tableScrollPosition, scrollAreaWidth)),
19283
+ onClick: () => {
19284
+ if (!exceptionId) {
19285
+ handleRowClick(row, i);
19286
+ }
19287
+ }
19288
+ }, {
19289
+ children: jsx(ConditionalWrapper, Object.assign({
19290
+ condition: isContextMenu && !exceptionId,
19291
+ wrapper: children => jsx(ContextMenuTrigger, Object.assign({
19292
+ id: "context-menu-table",
19293
+ triggerSide: "left"
19294
+ }, {
19295
+ children: jsx(Box, Object.assign({
19296
+ css: {
19297
+ cursor: 'pointer',
19298
+ padding: cell.column.accessor ? '20px 8px' : '20px 20px'
19299
+ },
19300
+ onClick: () => handleRowClick(row, i)
19301
+ }, {
19302
+ children: children
19303
+ }), void 0)
19304
+ }), void 0)
19305
+ }, {
19306
+ children: cell.render('Cell')
19307
+ }), void 0)
19308
+ }), void 0);
19309
+ })
19310
+ }), void 0);
19311
+ };
19312
+ const renderTableDecorationChild = child => {
19313
+ return jsxs(TableContent$3, {
19314
+ children: [jsx(TableHead$3, Object.assign({
19315
+ css: {
19316
+ '& > tr > th': {
19317
+ height: '0px !important',
19318
+ '& > div': {
19319
+ marginTop: '-50px'
19320
+ }
19321
+ }
19322
+ },
19323
+ hiddenHeader: true,
19324
+ isInfiniteScroll: isInfiniteScroll
19325
+ }, {
19326
+ children: headerGroups.map(headerGroup => {
19327
+ const visibleHeaders = headerGroup.headers.filter(column => !column.isSubRow);
19328
+ return jsx(TableHeadRow$3, Object.assign({}, headerGroup.getHeaderGroupProps(), {
19329
+ children: visibleHeaders.map((column, index) => {
19330
+ const headerRender = column.render('Header');
19331
+ return jsx(TableHeadCell$3, Object.assign({}, column.getHeaderProps(props => [props, !column.unsortable ? column.getSortByToggleProps({
19332
+ title: t('sortColumnTitle', 'Urutkan') || 'Urutkan'
19333
+ }) : {
19334
+ onClick: column.onToggle
19335
+ }, {
19336
+ style: {
19337
+ width: column.colWidth,
19338
+ maxWidth: column.colMaxWidth,
19339
+ minWidth: column.colMinWidth
19340
+ }
19341
+ }]), {
19342
+ css: Object.assign(Object.assign(Object.assign({}, stickyPositionStyling(column)), stickyShadowStyling(column, tableScrollPosition, scrollAreaWidth)), column.headerCss)
19343
+ }, {
19344
+ children: typeof headerRender === 'string' ? jsx(TableHeaderCellContainer, Object.assign({
19345
+ isSortedDesc: column.isSortedDesc,
19346
+ unsortable: column.unsortable,
19347
+ isToggleable: !!column.onToggle,
19348
+ isToggled: column.isToggled
19349
+ }, {
19350
+ children: jsx(TableHeadCellContent, Object.assign({
19351
+ heading: "headerTable"
19352
+ }, {
19353
+ children: headerRender.toUpperCase()
19354
+ }), void 0)
19355
+ }), void 0) : headerRender
19356
+ }), void 0);
19357
+ })
19358
+ }), void 0);
19359
+ })
19360
+ }), void 0), jsx(TableBody$3, Object.assign({}, getTableBodyProps(), {
19361
+ children: child
19362
+ }), void 0)]
19363
+ }, void 0);
19364
+ };
19252
19365
  const handleRowClick = (row, i) => {
19253
19366
  var _a, _b, _c, _d;
19254
19367
  let clickable = false;
@@ -19343,6 +19456,7 @@ function Table({
19343
19456
  children: [jsxs(TableContainer$3, Object.assign({
19344
19457
  css: css,
19345
19458
  ref: scrollerRef,
19459
+ decoration: Boolean(decoration),
19346
19460
  onScroll: e => {
19347
19461
  const scrollPosition = e.currentTarget.scrollLeft;
19348
19462
  if (scrollPosition < 3) {
@@ -19395,110 +19509,142 @@ function Table({
19395
19509
  }), void 0);
19396
19510
  })
19397
19511
  }), void 0), jsxs(TableBody$3, Object.assign({}, getTableBodyProps(), {
19398
- children: [(_a = decoration === null || decoration === void 0 ? void 0 : decoration.headerRender) === null || _a === void 0 ? void 0 : _a.call(decoration), page.map((row, i) => {
19399
- var _a, _b;
19512
+ children: [(_a = decoration === null || decoration === void 0 ? void 0 : decoration.headerRender) === null || _a === void 0 ? void 0 : _a.call(decoration), decoration && page.map((row, i) => {
19513
+ var _a;
19400
19514
  prepareRow(row);
19401
- const subRowCells = row.cells.filter(cell => cell.column.isSubRow);
19402
- const leftAddOnCells = (_a = row.cells.filter(cell => ['expander', 'selection'].includes(cell.column.id))) !== null && _a !== void 0 ? _a : [];
19403
- const notNullHeaderColumns = visibleColumns.filter(column => typeof column.Header !== 'function' && column.Header !== null && !column.isSubRow);
19404
- const isContextMenu = (_b = row.cells.filter(cell => {
19515
+ const isContextMenu = (_a = row.cells.filter(cell => {
19405
19516
  var _a, _b;
19406
19517
  return (_b = (_a = cell.column) === null || _a === void 0 ? void 0 : _a.options) === null || _b === void 0 ? void 0 : _b.length;
19407
- })) === null || _b === void 0 ? void 0 : _b.length;
19408
- let customStyle = {};
19409
- if (customRowsStyle && customRowsStyle(row.original).length) {
19410
- for (let _i2 = 0; _i2 < customRowsStyle(row.original).length; _i2++) {
19411
- if (customRowsStyle(row.original)[_i2].predicate) {
19412
- customStyle = customRowsStyle(row.original)[_i2].css;
19518
+ })) === null || _a === void 0 ? void 0 : _a.length;
19519
+ return i < 1 && renderRowDecorationReference(row, isContextMenu, i);
19520
+ }), jsx(ConditionalWrapper, Object.assign({
19521
+ condition: Boolean(decoration),
19522
+ wrapper: child => jsx(TableRow$3, Object.assign({
19523
+ css: {
19524
+ '&:hover': {
19525
+ backgroundColor: 'unset'
19413
19526
  }
19414
19527
  }
19415
- }
19416
- return jsxs(React.Fragment, {
19417
- 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) : jsx(Text$1, Object.assign({
19418
- variant: "contentButton"
19528
+ }, {
19529
+ children: jsx(TableCell$3, Object.assign({
19530
+ colSpan: 12
19419
19531
  }, {
19420
- children: row.cells[0].render('Cell')
19421
- }), void 0)), jsx(TableRow$3, Object.assign({
19422
- css: customStyle
19423
- }, row.getRowProps(), {
19424
- children: row.cells.filter(cell => !cell.column.isSubRow).map(cell => {
19425
- var _a, _b;
19426
- const collId = (_a = cell === null || cell === void 0 ? void 0 : cell.column) === null || _a === void 0 ? void 0 : _a.id;
19427
- const exceptionId = (_b = ['expander', 'selection', 'menu', 'eye'].concat(additionalExceptionIds)) === null || _b === void 0 ? void 0 : _b.includes(collId);
19428
- return jsx(TableCell$3, Object.assign({}, cell.getCellProps(addOnCellStyle(cell.column.id)), {
19429
- css: Object.assign(Object.assign({
19430
- padding: !isContextMenu || exceptionId ? collId === 'expander' ? '20px 4px' : '20px 8px' : '',
19431
- verticalAlign: cell.column.accessor ? cellAlign : 'center',
19432
- cursor: onRowClick ? 'pointer' : 'unset'
19433
- }, stickyPositionStyling(cell.column)), stickyShadowStyling(cell.column, tableScrollPosition, scrollAreaWidth)),
19434
- onClick: () => {
19435
- if (!exceptionId) {
19436
- handleRowClick(row, i);
19532
+ children: jsx(Box, Object.assign({
19533
+ css: {
19534
+ height: 300,
19535
+ overflow: 'auto'
19536
+ }
19537
+ }, {
19538
+ children: renderInfiniteScrollWrapper(renderTableDecorationChild(child))
19539
+ }), void 0)
19540
+ }), void 0)
19541
+ }), void 0)
19542
+ }, {
19543
+ children: page.map((row, i) => {
19544
+ var _a, _b;
19545
+ prepareRow(row);
19546
+ const subRowCells = row.cells.filter(cell => cell.column.isSubRow);
19547
+ const leftAddOnCells = (_a = row.cells.filter(cell => ['expander', 'selection'].includes(cell.column.id))) !== null && _a !== void 0 ? _a : [];
19548
+ const notNullHeaderColumns = visibleColumns.filter(column => typeof column.Header !== 'function' && column.Header !== null && !column.isSubRow);
19549
+ const isContextMenu = (_b = row.cells.filter(cell => {
19550
+ var _a, _b;
19551
+ return (_b = (_a = cell.column) === null || _a === void 0 ? void 0 : _a.options) === null || _b === void 0 ? void 0 : _b.length;
19552
+ })) === null || _b === void 0 ? void 0 : _b.length;
19553
+ let customStyle = {};
19554
+ if (customRowsStyle && customRowsStyle(row.original).length) {
19555
+ for (let _i2 = 0; _i2 < customRowsStyle(row.original).length; _i2++) {
19556
+ if (customRowsStyle(row.original)[_i2].predicate) {
19557
+ customStyle = customRowsStyle(row.original)[_i2].css;
19558
+ }
19559
+ }
19560
+ }
19561
+ return jsxs(React.Fragment, {
19562
+ 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) : jsx(Text$1, Object.assign({
19563
+ variant: "contentButton"
19564
+ }, {
19565
+ children: row.cells[0].render('Cell')
19566
+ }), void 0)), jsx(TableRow$3, Object.assign({
19567
+ css: customStyle
19568
+ }, row.getRowProps(), {
19569
+ children: row.cells.filter(cell => !cell.column.isSubRow).map(cell => {
19570
+ var _a, _b;
19571
+ const collId = (_a = cell === null || cell === void 0 ? void 0 : cell.column) === null || _a === void 0 ? void 0 : _a.id;
19572
+ const exceptionId = (_b = ['expander', 'selection', 'menu', 'eye'].concat(additionalExceptionIds)) === null || _b === void 0 ? void 0 : _b.includes(collId);
19573
+ return jsx(TableCell$3, Object.assign({}, cell.getCellProps(addOnCellStyle(cell.column.id)), {
19574
+ css: Object.assign(Object.assign({
19575
+ padding: !isContextMenu || exceptionId ? collId === 'expander' ? '20px 4px' : '20px 8px' : '',
19576
+ verticalAlign: cell.column.accessor ? cellAlign : 'center',
19577
+ cursor: onRowClick ? 'pointer' : 'unset'
19578
+ }, stickyPositionStyling(cell.column)), stickyShadowStyling(cell.column, tableScrollPosition, scrollAreaWidth)),
19579
+ onClick: () => {
19580
+ if (!exceptionId) {
19581
+ handleRowClick(row, i);
19582
+ }
19437
19583
  }
19438
- }
19439
- }, {
19440
- children: jsx(ConditionalWrapper, Object.assign({
19441
- condition: isContextMenu && !exceptionId,
19442
- wrapper: children => jsx(ContextMenuTrigger, Object.assign({
19443
- id: "context-menu-table",
19444
- triggerSide: "left"
19445
- }, {
19446
- children: jsx(Box, Object.assign({
19447
- css: {
19448
- cursor: 'pointer',
19449
- padding: cell.column.accessor ? '20px 8px' : '20px 20px'
19450
- },
19451
- onClick: () => handleRowClick(row, i)
19584
+ }, {
19585
+ children: jsx(ConditionalWrapper, Object.assign({
19586
+ condition: isContextMenu && !exceptionId,
19587
+ wrapper: children => jsx(ContextMenuTrigger, Object.assign({
19588
+ id: "context-menu-table",
19589
+ triggerSide: "left"
19452
19590
  }, {
19453
- children: children
19591
+ children: jsx(Box, Object.assign({
19592
+ css: {
19593
+ cursor: 'pointer',
19594
+ padding: cell.column.accessor ? '20px 8px' : '20px 20px'
19595
+ },
19596
+ onClick: () => handleRowClick(row, i)
19597
+ }, {
19598
+ children: children
19599
+ }), void 0)
19454
19600
  }), void 0)
19601
+ }, {
19602
+ children: cell.render('Cell')
19455
19603
  }), void 0)
19456
- }, {
19457
- children: cell.render('Cell')
19458
- }), void 0)
19459
- }), void 0);
19460
- })
19461
- }), void 0), row.isExpanded ? subRowCells.map((cell, index) => jsxs(TableRow$3, Object.assign({
19462
- subRow: true
19463
- }, {
19464
- children: [leftAddOnCells.map((_, index) => jsx("td", {
19465
- style: {
19466
- backgroundColor: colors$5.bgGray
19467
- }
19468
- }, index)), jsxs(React.Fragment, {
19469
- children: [jsx(TableCell$3, Object.assign({
19470
- subCell: true,
19471
- colSpan: notNullHeaderColumns.length > 5 ? 2 : 1,
19472
- headerSubCell: true,
19473
- css: Object.assign(Object.assign({
19474
- paddingTop: `${index === 0 ? '24px' : '13px'} !important`,
19475
- paddingBottom: `${index === subRowCells.length - 1 ? '24px' : '13px'} !important`,
19476
- backgroundColor: '$bgGray'
19477
- }, stickyPositionStyling(cell.column)), cell.column.headerCss)
19478
- }, {
19479
- children: jsx(Paragraph, Object.assign({
19480
- paragraph: "shortContentBold"
19481
- }, {
19482
- children: cell.column.Header
19483
- }), void 0)
19484
- }), void 0), jsx(TableCell$3, Object.assign({
19485
- subCell: true,
19486
- colSpan: visibleColumns.length - subRowCells.length,
19487
- css: {
19488
- paddingTop: `${index === 0 ? '24px' : '13px'} !important`,
19489
- paddingBottom: `${index === subRowCells.length - 1 ? '24px' : '13px'} !important`
19604
+ }), void 0);
19605
+ })
19606
+ }), void 0), row.isExpanded ? subRowCells.map((cell, index) => jsxs(TableRow$3, Object.assign({
19607
+ subRow: true
19608
+ }, {
19609
+ children: [leftAddOnCells.map((_, index) => jsx("td", {
19610
+ style: {
19611
+ backgroundColor: colors$5.bgGray
19490
19612
  }
19491
- }, {
19492
- children: jsx(Paragraph, Object.assign({
19493
- paragraph: "shortContentRegular"
19613
+ }, index)), jsxs(React.Fragment, {
19614
+ children: [jsx(TableCell$3, Object.assign({
19615
+ subCell: true,
19616
+ colSpan: notNullHeaderColumns.length > 5 ? 2 : 1,
19617
+ headerSubCell: true,
19618
+ css: Object.assign(Object.assign({
19619
+ paddingTop: `${index === 0 ? '24px' : '13px'} !important`,
19620
+ paddingBottom: `${index === subRowCells.length - 1 ? '24px' : '13px'} !important`,
19621
+ backgroundColor: '$bgGray'
19622
+ }, stickyPositionStyling(cell.column)), cell.column.headerCss)
19494
19623
  }, {
19495
- children: cell.render('Cell')
19496
- }), void 0)
19497
- }), void 0)]
19498
- }, cell.column.id)]
19499
- }), cell.column.id)) : 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))]
19500
- }, row.id);
19501
- }), (_b = decoration === null || decoration === void 0 ? void 0 : decoration.footerRender) === null || _b === void 0 ? void 0 : _b.call(decoration)]
19624
+ children: jsx(Paragraph, Object.assign({
19625
+ paragraph: "shortContentBold"
19626
+ }, {
19627
+ children: cell.column.Header
19628
+ }), void 0)
19629
+ }), void 0), jsx(TableCell$3, Object.assign({
19630
+ subCell: true,
19631
+ colSpan: visibleColumns.length - subRowCells.length,
19632
+ css: {
19633
+ paddingTop: `${index === 0 ? '24px' : '13px'} !important`,
19634
+ paddingBottom: `${index === subRowCells.length - 1 ? '24px' : '13px'} !important`
19635
+ }
19636
+ }, {
19637
+ children: jsx(Paragraph, Object.assign({
19638
+ paragraph: "shortContentRegular"
19639
+ }, {
19640
+ children: cell.render('Cell')
19641
+ }), void 0)
19642
+ }), void 0)]
19643
+ }, cell.column.id)]
19644
+ }), cell.column.id)) : 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))]
19645
+ }, row.id);
19646
+ })
19647
+ }), void 0), (_b = decoration === null || decoration === void 0 ? void 0 : decoration.footerRender) === null || _b === void 0 ? void 0 : _b.call(decoration)]
19502
19648
  }), void 0)]
19503
19649
  }), void 0)), renderContextMenu()]
19504
19650
  }), void 0), !isInfiniteScroll && jsx(Box, Object.assign({