@ballistix.digital/react-components 7.1.3-rc-66.0 → 7.1.3-rc-68.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.
package/dist/index.js CHANGED
@@ -633,10 +633,12 @@ var $29a51bd84954e590$export$2e2bcd8739ae039 = $29a51bd84954e590$var$AlertElemen
633
633
 
634
634
 
635
635
 
636
+
636
637
  var $ede6d6a597d91170$var$base = {
637
638
  container: 'inline-flex items-center font-medium py-0.5',
638
639
  indicator: '',
639
- button: 'shrink-0 ml-0.5 h-4 w-4 rounded-full inline-flex items-center justify-center focus:text-white focus:outline-hidden'
640
+ button: 'shrink-0 ml-0.5 h-4 w-4 rounded-full inline-flex items-center justify-center focus:text-white focus:outline-hidden cursor-pointer',
641
+ closeIcon: ''
640
642
  };
641
643
  var $ede6d6a597d91170$var$normal = {
642
644
  container: 'px-2.5'
@@ -743,7 +745,7 @@ var $ede6d6a597d91170$export$2e2bcd8739ae039 = $ede6d6a597d91170$var$styles;
743
745
 
744
746
 
745
747
  var $0b842d364fa010cf$var$BadgeElement = function(props) {
746
- var children = props.children, _a = props.color, color = _a === void 0 ? 'gray' : _a, _b = props.type, type = _b === void 0 ? 'normal' : _b, _c = props.size, size = _c === void 0 ? 'sm' : _c, _d = props.figure, figure = _d === void 0 ? 'block' : _d, isDisabled = props.isDisabled, isLoading = props.isLoading, onClose = props.onClose, stylesOverrides = props.styles, dataCy = props.dataCy;
748
+ var children = props.children, _a = props.color, color = _a === void 0 ? 'gray' : _a, _b = props.type, type = _b === void 0 ? 'normal' : _b, _c = props.size, size = _c === void 0 ? 'sm' : _c, _d = props.figure, figure = _d === void 0 ? 'block' : _d, isDisabled = props.isDisabled, isLoading = props.isLoading, onClick = props.onClick, onClose = props.onClose, stylesOverrides = props.styles, dataCy = props.dataCy;
747
749
  var handleGenerateStyle = function() {
748
750
  var result = (0, $f0c671820c340322$export$e2d2075c69d9100d)((0, $ede6d6a597d91170$export$2e2bcd8739ae039).base);
749
751
  var keys = (0, $27f90b0cff19565d$export$be5d6ab3c5b84767)((0, $ede6d6a597d91170$export$2e2bcd8739ae039).base);
@@ -753,17 +755,33 @@ var $0b842d364fa010cf$var$BadgeElement = function(props) {
753
755
  return result;
754
756
  };
755
757
  var styles = handleGenerateStyle();
756
- var xIcon = (0, $iA2ta$reactjsxruntime.jsx)("svg", {
757
- className: "h-2 w-2",
758
- stroke: "currentColor",
759
- fill: "none",
760
- viewBox: "0 0 8 8",
761
- children: (0, $iA2ta$reactjsxruntime.jsx)("path", {
762
- strokeLinecap: "round",
763
- strokeWidth: "1.5",
764
- d: "M1 1l6 6m0-6L1 7"
765
- })
766
- });
758
+ var closeButton = (0, $iA2ta$react.useMemo)(function() {
759
+ if (type !== 'close' || !onClose) return null;
760
+ var handleClose = function(e) {
761
+ e.stopPropagation();
762
+ onClose(e);
763
+ };
764
+ return (0, $iA2ta$reactjsxruntime.jsxs)("div", {
765
+ className: styles.button,
766
+ onClick: handleClose,
767
+ children: [
768
+ (0, $iA2ta$reactjsxruntime.jsx)("span", {
769
+ className: "sr-only",
770
+ children: "Remove large option"
771
+ }),
772
+ (0, $iA2ta$reactjsxruntime.jsx)((0, $2125901b4a9afff9$export$2e2bcd8739ae039), {
773
+ className: styles.closeIcon,
774
+ type: "regular",
775
+ accessor: "times"
776
+ })
777
+ ]
778
+ });
779
+ }, [
780
+ type,
781
+ onClose,
782
+ styles.button,
783
+ styles.closeIcon
784
+ ]);
767
785
  if (isLoading) return (0, $iA2ta$reactjsxruntime.jsx)("span", {
768
786
  className: (0, $622cd2936b18c771$export$4370d69198e9314a)(styles.container, 'h-4 w-12 animate-pulse'),
769
787
  children: type === 'indicator' && (0, $iA2ta$reactjsxruntime.jsx)("svg", {
@@ -778,8 +796,9 @@ var $0b842d364fa010cf$var$BadgeElement = function(props) {
778
796
  })
779
797
  });
780
798
  return (0, $iA2ta$reactjsxruntime.jsxs)("span", {
781
- className: styles.container,
799
+ className: (0, $622cd2936b18c771$export$4370d69198e9314a)(styles.container, !!onClick && 'cursor-pointer'),
782
800
  "data-cy": dataCy,
801
+ onClick: onClick,
783
802
  children: [
784
803
  type === 'indicator' && (0, $iA2ta$reactjsxruntime.jsx)("svg", {
785
804
  className: styles.indicator,
@@ -792,18 +811,7 @@ var $0b842d364fa010cf$var$BadgeElement = function(props) {
792
811
  })
793
812
  }),
794
813
  children,
795
- type === 'close' && (0, $iA2ta$reactjsxruntime.jsxs)("button", {
796
- type: "button",
797
- className: styles.button,
798
- onClick: onClose,
799
- children: [
800
- (0, $iA2ta$reactjsxruntime.jsx)("span", {
801
- className: "sr-only",
802
- children: "Remove large option"
803
- }),
804
- xIcon
805
- ]
806
- })
814
+ closeButton
807
815
  ]
808
816
  });
809
817
  };
@@ -3382,12 +3390,13 @@ var $51d5596368acf759$var$__spreadArray = undefined && undefined.__spreadArray |
3382
3390
  return to.concat(ar || Array.prototype.slice.call(from));
3383
3391
  };
3384
3392
  var $51d5596368acf759$var$TableList2 = function(props) {
3385
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7;
3393
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8;
3386
3394
  var id = props.id, config = props.table, head = props.head, foot = props.foot, leftSide = props.leftSide, isLoading = props.isLoading, onRowClick = props.onRowClick, onChange = props.onChange, stylesOverrides = props.styles, dragConfig = props.dragConfig;
3387
- var _8 = (0, $iA2ta$react.useState)({}), columnVisibility = _8[0], setColumnVisibility = _8[1];
3388
- var _9 = (0, $iA2ta$react.useState)([]), columnOrder = _9[0], setColumnOrder = _9[1];
3389
- var _10 = (0, $iA2ta$react.useState)((_b = (_a = config.options) === null || _a === void 0 ? void 0 : _a.defaultSorting) !== null && _b !== void 0 ? _b : []), sorting = _10[0], setSorting = _10[1];
3390
- var _11 = (0, $iA2ta$react.useState)((_e = (_d = (_c = config.options) === null || _c === void 0 ? void 0 : _c.grouping) === null || _d === void 0 ? void 0 : _d.defaultGrouping) !== null && _e !== void 0 ? _e : []), grouping = _11[0], setGrouping = _11[1];
3395
+ var _9 = (0, $iA2ta$react.useState)({}), columnVisibility = _9[0], setColumnVisibility = _9[1];
3396
+ var _10 = (0, $iA2ta$react.useState)([]), columnOrder = _10[0], setColumnOrder = _10[1];
3397
+ var _11 = (0, $iA2ta$react.useState)((_b = (_a = config.options) === null || _a === void 0 ? void 0 : _a.defaultSorting) !== null && _b !== void 0 ? _b : []), sorting = _11[0], setSorting = _11[1];
3398
+ var _12 = (0, $iA2ta$react.useState)((_e = (_d = (_c = config.options) === null || _c === void 0 ? void 0 : _c.grouping) === null || _d === void 0 ? void 0 : _d.defaultGrouping) !== null && _e !== void 0 ? _e : []), grouping = _12[0], setGrouping = _12[1];
3399
+ var _13 = (0, $iA2ta$react.useState)({}), expanded = _13[0], setExpanded = _13[1];
3391
3400
  var handleGenerateStyle = function() {
3392
3401
  var result = (0, $f0c671820c340322$export$e2d2075c69d9100d)((0, $ad4435d9ab2ba956$export$2e2bcd8739ae039).base);
3393
3402
  var keys = (0, $27f90b0cff19565d$export$be5d6ab3c5b84767)((0, $ad4435d9ab2ba956$export$2e2bcd8739ae039).base);
@@ -3449,6 +3458,7 @@ var $51d5596368acf759$var$TableList2 = function(props) {
3449
3458
  getExpandedRowModel: (0, $iA2ta$tanstackreacttable.getExpandedRowModel)(),
3450
3459
  getGroupedRowModel: (0, $iA2ta$tanstackreacttable.getGroupedRowModel)(),
3451
3460
  getCoreRowModel: (0, $iA2ta$tanstackreacttable.getCoreRowModel)(),
3461
+ getSubRows: (_g = config.options) === null || _g === void 0 ? void 0 : _g.getSubRows,
3452
3462
  columns: isDraggable ? $51d5596368acf759$var$__spreadArray([
3453
3463
  {
3454
3464
  id: 'drag-handle',
@@ -3467,7 +3477,8 @@ var $51d5596368acf759$var$TableList2 = function(props) {
3467
3477
  sorting: sorting,
3468
3478
  columnVisibility: columnVisibility,
3469
3479
  columnOrder: columnOrder,
3470
- grouping: grouping
3480
+ grouping: grouping,
3481
+ expanded: expanded
3471
3482
  },
3472
3483
  initialState: {
3473
3484
  columnVisibility: isDraggable ? $51d5596368acf759$var$__assign({
@@ -3475,13 +3486,13 @@ var $51d5596368acf759$var$TableList2 = function(props) {
3475
3486
  }, initialVisibilityState) : initialVisibilityState,
3476
3487
  columnOrder: isDraggable ? $51d5596368acf759$var$__spreadArray([
3477
3488
  'drag-handle'
3478
- ], (_h = (_g = config.options) === null || _g === void 0 ? void 0 : _g.defaultOrder) !== null && _h !== void 0 ? _h : [], true) : (_j = config.options) === null || _j === void 0 ? void 0 : _j.defaultOrder,
3489
+ ], (_j = (_h = config.options) === null || _h === void 0 ? void 0 : _h.defaultOrder) !== null && _j !== void 0 ? _j : [], true) : (_k = config.options) === null || _k === void 0 ? void 0 : _k.defaultOrder,
3479
3490
  columnPinning: {
3480
- left: (_m = (0, $iA2ta$lodash.map)((_l = (_k = config.options) === null || _k === void 0 ? void 0 : _k.columnPinning) === null || _l === void 0 ? void 0 : _l.left, 'name')) !== null && _m !== void 0 ? _m : [],
3481
- right: (_q = (0, $iA2ta$lodash.map)((_p = (_o = config.options) === null || _o === void 0 ? void 0 : _o.columnPinning) === null || _p === void 0 ? void 0 : _p.right, 'name')) !== null && _q !== void 0 ? _q : []
3491
+ left: (_o = (0, $iA2ta$lodash.map)((_m = (_l = config.options) === null || _l === void 0 ? void 0 : _l.columnPinning) === null || _m === void 0 ? void 0 : _m.left, 'name')) !== null && _o !== void 0 ? _o : [],
3492
+ right: (_r = (0, $iA2ta$lodash.map)((_q = (_p = config.options) === null || _p === void 0 ? void 0 : _p.columnPinning) === null || _q === void 0 ? void 0 : _q.right, 'name')) !== null && _r !== void 0 ? _r : []
3482
3493
  },
3483
- grouping: (_s = (_r = config.options) === null || _r === void 0 ? void 0 : _r.grouping) === null || _s === void 0 ? void 0 : _s.defaultGrouping,
3484
- expanded: (_u = (_t = config.options) === null || _t === void 0 ? void 0 : _t.grouping) === null || _u === void 0 ? void 0 : _u.defaultExpanded
3494
+ grouping: (_t = (_s = config.options) === null || _s === void 0 ? void 0 : _s.grouping) === null || _t === void 0 ? void 0 : _t.defaultGrouping,
3495
+ expanded: (_v = (_u = config.options) === null || _u === void 0 ? void 0 : _u.grouping) === null || _v === void 0 ? void 0 : _v.defaultExpanded
3485
3496
  },
3486
3497
  manualPagination: true,
3487
3498
  manualSorting: true,
@@ -3489,6 +3500,7 @@ var $51d5596368acf759$var$TableList2 = function(props) {
3489
3500
  onColumnVisibilityChange: setColumnVisibility,
3490
3501
  onColumnOrderChange: setColumnOrder,
3491
3502
  onGroupingChange: setGrouping,
3503
+ onExpandedChange: setExpanded,
3492
3504
  getRowId: function(row) {
3493
3505
  return (0, $iA2ta$lodash.get)(row, dragConfig === null || dragConfig === void 0 ? void 0 : dragConfig.rowIdentifierKey);
3494
3506
  }
@@ -3545,7 +3557,7 @@ var $51d5596368acf759$var$TableList2 = function(props) {
3545
3557
  setColumnVisibility(visibility_1);
3546
3558
  }
3547
3559
  }, [
3548
- (_v = config === null || config === void 0 ? void 0 : config.options) === null || _v === void 0 ? void 0 : _v.defaultVisibility,
3560
+ (_w = config === null || config === void 0 ? void 0 : config.options) === null || _w === void 0 ? void 0 : _w.defaultVisibility,
3549
3561
  id,
3550
3562
  table
3551
3563
  ]);
@@ -3570,10 +3582,13 @@ var $51d5596368acf759$var$TableList2 = function(props) {
3570
3582
  }
3571
3583
  }, [
3572
3584
  config.columns,
3573
- (_w = config === null || config === void 0 ? void 0 : config.options) === null || _w === void 0 ? void 0 : _w.defaultOrder,
3585
+ (_x = config === null || config === void 0 ? void 0 : config.options) === null || _x === void 0 ? void 0 : _x.defaultOrder,
3574
3586
  id,
3575
3587
  isDraggable
3576
3588
  ]);
3589
+ var handleFlexRender = function(cell) {
3590
+ return (0, $iA2ta$tanstackreacttable.flexRender)(cell.column.columnDef.cell, cell.getContext());
3591
+ };
3577
3592
  // Write state to local storage when it changes
3578
3593
  (0, $iA2ta$react.useEffect)(function() {
3579
3594
  if (state) (0, $9ed0b3989f82e70a$export$c0b214a25c581b2a)(id, state);
@@ -3652,7 +3667,7 @@ var $51d5596368acf759$var$TableList2 = function(props) {
3652
3667
  return acc + size;
3653
3668
  }, 0);
3654
3669
  }, [
3655
- (_x = config.options) === null || _x === void 0 ? void 0 : _x.columnPinning
3670
+ (_y = config.options) === null || _y === void 0 ? void 0 : _y.columnPinning
3656
3671
  ]);
3657
3672
  var getCommonPinningStyles = (0, $iA2ta$react.useCallback)(function(column) {
3658
3673
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
@@ -3673,10 +3688,10 @@ var $51d5596368acf759$var$TableList2 = function(props) {
3673
3688
  right: isPinned === 'right' ? "".concat(getPinnedColumnsWidth('right', column.id), "px") : undefined
3674
3689
  };
3675
3690
  }, [
3676
- (_z = (_y = config.options) === null || _y === void 0 ? void 0 : _y.columnPinning) === null || _z === void 0 ? void 0 : _z.customShadow,
3677
- (_1 = (_0 = config.options) === null || _0 === void 0 ? void 0 : _0.columnPinning) === null || _1 === void 0 ? void 0 : _1.disableShadow,
3678
- (_3 = (_2 = config.options) === null || _2 === void 0 ? void 0 : _2.columnPinning) === null || _3 === void 0 ? void 0 : _3.left,
3679
- (_5 = (_4 = config.options) === null || _4 === void 0 ? void 0 : _4.columnPinning) === null || _5 === void 0 ? void 0 : _5.right,
3691
+ (_0 = (_z = config.options) === null || _z === void 0 ? void 0 : _z.columnPinning) === null || _0 === void 0 ? void 0 : _0.customShadow,
3692
+ (_2 = (_1 = config.options) === null || _1 === void 0 ? void 0 : _1.columnPinning) === null || _2 === void 0 ? void 0 : _2.disableShadow,
3693
+ (_4 = (_3 = config.options) === null || _3 === void 0 ? void 0 : _3.columnPinning) === null || _4 === void 0 ? void 0 : _4.left,
3694
+ (_6 = (_5 = config.options) === null || _5 === void 0 ? void 0 : _5.columnPinning) === null || _6 === void 0 ? void 0 : _6.right,
3680
3695
  styles.body.table.pinnedColumns.left,
3681
3696
  styles.body.table.pinnedColumns.right,
3682
3697
  getPinnedColumnsWidth
@@ -3785,8 +3800,7 @@ var $51d5596368acf759$var$TableList2 = function(props) {
3785
3800
  className: row.getIsExpanded() ? styles.body.table.body.groupedRowIcon.collapse : styles.body.table.body.groupedRowIcon.expand,
3786
3801
  accessor: row.getIsExpanded() ? (_f = (_e = (_d = config === null || config === void 0 ? void 0 : config.options) === null || _d === void 0 ? void 0 : _d.grouping) === null || _e === void 0 ? void 0 : _e.collapseIconAccessor) !== null && _f !== void 0 ? _f : 'chevron-down' : (_j = (_h = (_g = config === null || config === void 0 ? void 0 : config.options) === null || _g === void 0 ? void 0 : _g.grouping) === null || _h === void 0 ? void 0 : _h.expandIconAccessor) !== null && _j !== void 0 ? _j : 'chevron-right'
3787
3802
  }),
3788
- ' ',
3789
- (0, $iA2ta$tanstackreacttable.flexRender)(cell.column.columnDef.cell, cell.getContext()),
3803
+ handleFlexRender(cell),
3790
3804
  " (",
3791
3805
  row.subRows.length,
3792
3806
  ")"
@@ -3803,7 +3817,7 @@ var $51d5596368acf759$var$TableList2 = function(props) {
3803
3817
  ]
3804
3818
  }),
3805
3819
  (0, $iA2ta$lodash.isEmpty)(table === null || table === void 0 ? void 0 : table.getRowModel().rows) && !isLoading && (0, $iA2ta$reactjsxruntime.jsx)((0, $iA2ta$reactjsxruntime.Fragment), {
3806
- children: ((_6 = config === null || config === void 0 ? void 0 : config.options) === null || _6 === void 0 ? void 0 : _6.emptyComponent) ? (_7 = config === null || config === void 0 ? void 0 : config.options) === null || _7 === void 0 ? void 0 : _7.emptyComponent : (0, $iA2ta$reactjsxruntime.jsx)("div", {
3820
+ children: ((_7 = config === null || config === void 0 ? void 0 : config.options) === null || _7 === void 0 ? void 0 : _7.emptyComponent) ? (_8 = config === null || config === void 0 ? void 0 : config.options) === null || _8 === void 0 ? void 0 : _8.emptyComponent : (0, $iA2ta$reactjsxruntime.jsx)("div", {
3807
3821
  className: (0, $ad4435d9ab2ba956$export$2e2bcd8739ae039).empty,
3808
3822
  children: "There is no data to show..."
3809
3823
  })
@@ -4749,7 +4763,7 @@ var $4d17f0429978b255$var$ModalOverlay = function(props) {
4749
4763
  ]);
4750
4764
  return (0, $iA2ta$reactjsxruntime.jsxs)((0, $iA2ta$reactjsxruntime.Fragment), {
4751
4765
  children: [
4752
- (0, $iA2ta$reactjsxruntime.jsx)((0, $iA2ta$headlessuireact.Transition).Root, {
4766
+ (0, $iA2ta$reactjsxruntime.jsx)((0, $iA2ta$headlessuireact.Transition), {
4753
4767
  show: isOpen,
4754
4768
  as: (0, $iA2ta$react.Fragment),
4755
4769
  children: (0, $iA2ta$reactjsxruntime.jsxs)((0, $iA2ta$headlessuireact.Dialog), {
@@ -4757,7 +4771,7 @@ var $4d17f0429978b255$var$ModalOverlay = function(props) {
4757
4771
  className: styles.container,
4758
4772
  onClose: handleClose,
4759
4773
  children: [
4760
- (0, $iA2ta$reactjsxruntime.jsx)((0, $iA2ta$headlessuireact.Transition).Child, {
4774
+ (0, $iA2ta$reactjsxruntime.jsx)((0, $iA2ta$headlessuireact.TransitionChild), {
4761
4775
  as: (0, $iA2ta$react.Fragment),
4762
4776
  enter: styles.background.transition.enter,
4763
4777
  enterFrom: styles.background.transition.enterFrom,
@@ -4774,7 +4788,7 @@ var $4d17f0429978b255$var$ModalOverlay = function(props) {
4774
4788
  children: (0, $iA2ta$reactjsxruntime.jsx)("div", {
4775
4789
  className: styles.layout.content,
4776
4790
  "data-cy": dataCy,
4777
- children: (0, $iA2ta$reactjsxruntime.jsx)((0, $iA2ta$headlessuireact.Transition).Child, {
4791
+ children: (0, $iA2ta$reactjsxruntime.jsx)((0, $iA2ta$headlessuireact.TransitionChild), {
4778
4792
  as: (0, $iA2ta$react.Fragment),
4779
4793
  enter: styles.panel.transition.enter,
4780
4794
  enterFrom: styles.panel.transition.enterFrom,
@@ -5156,7 +5170,7 @@ var $4bd12ae33d8a86aa$var$TableColumnOptionsCustom = function(props) {
5156
5170
  return (0, $iA2ta$reactjsxruntime.jsxs)((0, $iA2ta$headlessuireact.Popover), {
5157
5171
  children: [
5158
5172
  (0, $iA2ta$reactjsxruntime.jsx)((0, $iA2ta$headlessuireact.PopoverButton), {
5159
- as: 'div',
5173
+ as: "div",
5160
5174
  children: trigger
5161
5175
  }),
5162
5176
  (0, $iA2ta$reactjsxruntime.jsxs)((0, $iA2ta$headlessuireact.PopoverPanel), {
@@ -7054,10 +7068,10 @@ var $5f561ce307b5bbb8$var$getDateString = function(date) {
7054
7068
  return (0, $dbcba7ef8eeead3b$export$b7c4e1545c61edee)(date.value);
7055
7069
  };
7056
7070
  var $5f561ce307b5bbb8$var$useColumnHelpers = function(t) {
7057
- var accessor = (0, $iA2ta$react.useMemo)(function() {
7071
+ var _a = (0, $iA2ta$react.useMemo)(function() {
7058
7072
  return (0, $iA2ta$tanstackreacttable.createColumnHelper)();
7059
- }, []).accessor;
7060
- var _a = (0, $c1b6e62d8639d990$export$2e2bcd8739ae039)(t), toStringCell = _a.toStringCell, toOptionCell = _a.toOptionCell;
7073
+ }, []), accessor = _a.accessor, display = _a.display;
7074
+ var _b = (0, $c1b6e62d8639d990$export$2e2bcd8739ae039)(t), toStringCell = _b.toStringCell, toOptionCell = _b.toOptionCell;
7061
7075
  var getClassName = (0, $iA2ta$react.useCallback)(function(size) {
7062
7076
  var sizes = {
7063
7077
  sm: 'max-w-20',
@@ -7068,21 +7082,29 @@ var $5f561ce307b5bbb8$var$useColumnHelpers = function(t) {
7068
7082
  return "overflow-hidden text-ellipsis ".concat((0, $iA2ta$lodash.get)(sizes, size, ''), " block");
7069
7083
  }, []);
7070
7084
  var createAccessor = (0, $iA2ta$react.useCallback)(function(key, getCellContent, excelMapper, options) {
7071
- var _a;
7072
- return accessor(key, {
7085
+ var _a, _b;
7086
+ var column = {
7073
7087
  header: (_a = options === null || options === void 0 ? void 0 : options.header) !== null && _a !== void 0 ? _a : t("component.form.label.".concat(key)),
7074
7088
  enableSorting: (0, $iA2ta$lodash.get)(options, 'enableSorting', true),
7075
- cell: function(cell) {
7089
+ cell: (_b = options === null || options === void 0 ? void 0 : options.cell) !== null && _b !== void 0 ? _b : function(cell) {
7076
7090
  return getCellContent(cell, options);
7077
7091
  },
7092
+ aggregatedCell: options === null || options === void 0 ? void 0 : options.aggregateCell,
7078
7093
  meta: {
7079
7094
  excel: excelMapper
7080
7095
  }
7081
- });
7096
+ };
7097
+ if (options === null || options === void 0 ? void 0 : options.aggregationFn) (0, $iA2ta$lodash.set)(column, 'aggregationFn', options.aggregationFn);
7098
+ return accessor(key, column);
7082
7099
  }, [
7083
7100
  accessor,
7084
7101
  t
7085
7102
  ]);
7103
+ var createDisplay = (0, $iA2ta$react.useCallback)(function(column) {
7104
+ return display(column);
7105
+ }, [
7106
+ display
7107
+ ]);
7086
7108
  var baseCellRenderer = function(value, options) {
7087
7109
  var _a;
7088
7110
  var content = (0, $iA2ta$reactjsxruntime.jsx)("p", {
@@ -7090,7 +7112,7 @@ var $5f561ce307b5bbb8$var$useColumnHelpers = function(t) {
7090
7112
  children: value
7091
7113
  });
7092
7114
  return (options === null || options === void 0 ? void 0 : options.hasTooltip) ? (0, $iA2ta$reactjsxruntime.jsx)((0, $1c4aa673c4ad6947$export$2e2bcd8739ae039), {
7093
- placement: (_a = options === null || options === void 0 ? void 0 : options.tooltipPlacement) !== null && _a !== void 0 ? _a : "bottom-end",
7115
+ placement: (_a = options === null || options === void 0 ? void 0 : options.tooltipPlacement) !== null && _a !== void 0 ? _a : 'bottom-end',
7094
7116
  content: value,
7095
7117
  children: content
7096
7118
  }) : content;
@@ -7108,7 +7130,7 @@ var $5f561ce307b5bbb8$var$useColumnHelpers = function(t) {
7108
7130
  var content = value.href ? (0, $iA2ta$reactjsxruntime.jsx)("a", {
7109
7131
  href: value.href,
7110
7132
  className: (0, $622cd2936b18c771$export$4370d69198e9314a)((options === null || options === void 0 ? void 0 : options.size) && getClassName(options.size), options === null || options === void 0 ? void 0 : options.className),
7111
- target: (options === null || options === void 0 ? void 0 : options.openInNewTab) ? "_blank" : undefined,
7133
+ target: (options === null || options === void 0 ? void 0 : options.openInNewTab) ? '_blank' : undefined,
7112
7134
  children: value.label
7113
7135
  }) : value.label;
7114
7136
  return (options === null || options === void 0 ? void 0 : options.hasTooltip) ? (0, $iA2ta$reactjsxruntime.jsx)((0, $1c4aa673c4ad6947$export$2e2bcd8739ae039), {
@@ -7129,7 +7151,7 @@ var $5f561ce307b5bbb8$var$useColumnHelpers = function(t) {
7129
7151
  children: value.label
7130
7152
  });
7131
7153
  return (options === null || options === void 0 ? void 0 : options.hasTooltip) ? (0, $iA2ta$reactjsxruntime.jsx)((0, $1c4aa673c4ad6947$export$2e2bcd8739ae039), {
7132
- placement: (_a = options === null || options === void 0 ? void 0 : options.tooltipPlacement) !== null && _a !== void 0 ? _a : "bottom-end",
7154
+ placement: (_a = options === null || options === void 0 ? void 0 : options.tooltipPlacement) !== null && _a !== void 0 ? _a : 'bottom-end',
7133
7155
  content: value.label,
7134
7156
  children: content
7135
7157
  }) : content;
@@ -7148,7 +7170,7 @@ var $5f561ce307b5bbb8$var$useColumnHelpers = function(t) {
7148
7170
  children: value.label
7149
7171
  });
7150
7172
  return (options === null || options === void 0 ? void 0 : options.hasTooltip) ? (0, $iA2ta$reactjsxruntime.jsx)((0, $1c4aa673c4ad6947$export$2e2bcd8739ae039), {
7151
- placement: (_a = options === null || options === void 0 ? void 0 : options.tooltipPlacement) !== null && _a !== void 0 ? _a : "bottom-end",
7173
+ placement: (_a = options === null || options === void 0 ? void 0 : options.tooltipPlacement) !== null && _a !== void 0 ? _a : 'bottom-end',
7152
7174
  content: value.label,
7153
7175
  children: content
7154
7176
  }) : content;
@@ -7183,13 +7205,23 @@ var $5f561ce307b5bbb8$var$useColumnHelpers = function(t) {
7183
7205
  return toStringCell((cell === null || cell === void 0 ? void 0 : cell.value) !== undefined ? t("label.boolean.".concat(cell.value)) : t('label.boolean.unclear'));
7184
7206
  }, options);
7185
7207
  };
7208
+ var displayAccessor = function(key, cell, options) {
7209
+ var _a;
7210
+ return createDisplay({
7211
+ id: key,
7212
+ header: (_a = options === null || options === void 0 ? void 0 : options.header) !== null && _a !== void 0 ? _a : t("component.form.label.".concat(key)),
7213
+ cell: cell,
7214
+ aggregatedCell: options === null || options === void 0 ? void 0 : options.aggregatedCell
7215
+ });
7216
+ };
7186
7217
  return {
7187
7218
  stringAccessor: stringAccessor,
7188
7219
  linkAccessor: linkAccessor,
7189
7220
  buttonAccessor: buttonAccessor,
7190
7221
  badgeAccessor: badgeAccessor,
7191
7222
  dateAccessor: dateAccessor,
7192
- booleanAccessor: booleanAccessor
7223
+ booleanAccessor: booleanAccessor,
7224
+ displayAccessor: displayAccessor
7193
7225
  };
7194
7226
  };
7195
7227
  var $5f561ce307b5bbb8$export$2e2bcd8739ae039 = $5f561ce307b5bbb8$var$useColumnHelpers;