@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.esm.js CHANGED
@@ -11,7 +11,7 @@ import {fas as $4MPRY$fas} from "@fortawesome/pro-solid-svg-icons";
11
11
  import {fat as $4MPRY$fat} from "@fortawesome/pro-thin-svg-icons";
12
12
  import {FontAwesomeIcon as $4MPRY$FontAwesomeIcon} from "@fortawesome/react-fontawesome";
13
13
  import {useFloating as $4MPRY$useFloating, offset as $4MPRY$offset, flip as $4MPRY$flip, shift as $4MPRY$shift, arrow as $4MPRY$arrow, autoUpdate as $4MPRY$autoUpdate, useHover as $4MPRY$useHover, useFocus as $4MPRY$useFocus, useDismiss as $4MPRY$useDismiss, useRole as $4MPRY$useRole, useInteractions as $4MPRY$useInteractions, FloatingArrow as $4MPRY$FloatingArrow} from "@floating-ui/react";
14
- import {Menu as $4MPRY$Menu, MenuButton as $4MPRY$MenuButton, Transition as $4MPRY$Transition, MenuItems as $4MPRY$MenuItems, Dialog as $4MPRY$Dialog, Popover as $4MPRY$Popover, PopoverButton as $4MPRY$PopoverButton, PopoverPanel as $4MPRY$PopoverPanel, Switch as $4MPRY$Switch} from "@headlessui/react";
14
+ import {Menu as $4MPRY$Menu, MenuButton as $4MPRY$MenuButton, Transition as $4MPRY$Transition, MenuItems as $4MPRY$MenuItems, Dialog as $4MPRY$Dialog, TransitionChild as $4MPRY$TransitionChild, Popover as $4MPRY$Popover, PopoverButton as $4MPRY$PopoverButton, PopoverPanel as $4MPRY$PopoverPanel, Switch as $4MPRY$Switch} from "@headlessui/react";
15
15
  import {useMask as $4MPRY$useMask} from "@react-input/mask";
16
16
  import {ViewColumnsIcon as $4MPRY$ViewColumnsIcon, ChevronDownIcon as $4MPRY$ChevronDownIcon1, TableCellsIcon as $4MPRY$TableCellsIcon, XMarkIcon as $4MPRY$XMarkIcon, PlusIcon as $4MPRY$PlusIcon} from "@heroicons/react/24/outline";
17
17
  import {useReactTable as $4MPRY$useReactTable, getCoreRowModel as $4MPRY$getCoreRowModel, flexRender as $4MPRY$flexRender, getExpandedRowModel as $4MPRY$getExpandedRowModel, getGroupedRowModel as $4MPRY$getGroupedRowModel, createColumnHelper as $4MPRY$createColumnHelper} from "@tanstack/react-table";
@@ -564,10 +564,12 @@ var $9a29d5e0e3b54abe$export$2e2bcd8739ae039 = $9a29d5e0e3b54abe$var$AlertElemen
564
564
 
565
565
 
566
566
 
567
+
567
568
  var $0b2d04c7befe535a$var$base = {
568
569
  container: 'inline-flex items-center font-medium py-0.5',
569
570
  indicator: '',
570
- button: 'shrink-0 ml-0.5 h-4 w-4 rounded-full inline-flex items-center justify-center focus:text-white focus:outline-hidden'
571
+ 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',
572
+ closeIcon: ''
571
573
  };
572
574
  var $0b2d04c7befe535a$var$normal = {
573
575
  container: 'px-2.5'
@@ -674,7 +676,7 @@ var $0b2d04c7befe535a$export$2e2bcd8739ae039 = $0b2d04c7befe535a$var$styles;
674
676
 
675
677
 
676
678
  var $a5045567c9b3a96e$var$BadgeElement = function(props) {
677
- 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;
679
+ 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;
678
680
  var handleGenerateStyle = function() {
679
681
  var result = (0, $b3fc44f26b625a32$export$e2d2075c69d9100d)((0, $0b2d04c7befe535a$export$2e2bcd8739ae039).base);
680
682
  var keys = (0, $ba1db6dce71c3f25$export$be5d6ab3c5b84767)((0, $0b2d04c7befe535a$export$2e2bcd8739ae039).base);
@@ -684,17 +686,33 @@ var $a5045567c9b3a96e$var$BadgeElement = function(props) {
684
686
  return result;
685
687
  };
686
688
  var styles = handleGenerateStyle();
687
- var xIcon = (0, $4MPRY$jsx)("svg", {
688
- className: "h-2 w-2",
689
- stroke: "currentColor",
690
- fill: "none",
691
- viewBox: "0 0 8 8",
692
- children: (0, $4MPRY$jsx)("path", {
693
- strokeLinecap: "round",
694
- strokeWidth: "1.5",
695
- d: "M1 1l6 6m0-6L1 7"
696
- })
697
- });
689
+ var closeButton = (0, $4MPRY$useMemo)(function() {
690
+ if (type !== 'close' || !onClose) return null;
691
+ var handleClose = function(e) {
692
+ e.stopPropagation();
693
+ onClose(e);
694
+ };
695
+ return (0, $4MPRY$jsxs)("div", {
696
+ className: styles.button,
697
+ onClick: handleClose,
698
+ children: [
699
+ (0, $4MPRY$jsx)("span", {
700
+ className: "sr-only",
701
+ children: "Remove large option"
702
+ }),
703
+ (0, $4MPRY$jsx)((0, $77cd4416ca4a0639$export$2e2bcd8739ae039), {
704
+ className: styles.closeIcon,
705
+ type: "regular",
706
+ accessor: "times"
707
+ })
708
+ ]
709
+ });
710
+ }, [
711
+ type,
712
+ onClose,
713
+ styles.button,
714
+ styles.closeIcon
715
+ ]);
698
716
  if (isLoading) return (0, $4MPRY$jsx)("span", {
699
717
  className: (0, $66c3dcaaa74b5389$export$4370d69198e9314a)(styles.container, 'h-4 w-12 animate-pulse'),
700
718
  children: type === 'indicator' && (0, $4MPRY$jsx)("svg", {
@@ -709,8 +727,9 @@ var $a5045567c9b3a96e$var$BadgeElement = function(props) {
709
727
  })
710
728
  });
711
729
  return (0, $4MPRY$jsxs)("span", {
712
- className: styles.container,
730
+ className: (0, $66c3dcaaa74b5389$export$4370d69198e9314a)(styles.container, !!onClick && 'cursor-pointer'),
713
731
  "data-cy": dataCy,
732
+ onClick: onClick,
714
733
  children: [
715
734
  type === 'indicator' && (0, $4MPRY$jsx)("svg", {
716
735
  className: styles.indicator,
@@ -723,18 +742,7 @@ var $a5045567c9b3a96e$var$BadgeElement = function(props) {
723
742
  })
724
743
  }),
725
744
  children,
726
- type === 'close' && (0, $4MPRY$jsxs)("button", {
727
- type: "button",
728
- className: styles.button,
729
- onClick: onClose,
730
- children: [
731
- (0, $4MPRY$jsx)("span", {
732
- className: "sr-only",
733
- children: "Remove large option"
734
- }),
735
- xIcon
736
- ]
737
- })
745
+ closeButton
738
746
  ]
739
747
  });
740
748
  };
@@ -3313,12 +3321,13 @@ var $df469b72efb8986e$var$__spreadArray = undefined && undefined.__spreadArray |
3313
3321
  return to.concat(ar || Array.prototype.slice.call(from));
3314
3322
  };
3315
3323
  var $df469b72efb8986e$var$TableList2 = function(props) {
3316
- 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;
3324
+ 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;
3317
3325
  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;
3318
- var _8 = (0, $4MPRY$useState)({}), columnVisibility = _8[0], setColumnVisibility = _8[1];
3319
- var _9 = (0, $4MPRY$useState)([]), columnOrder = _9[0], setColumnOrder = _9[1];
3320
- var _10 = (0, $4MPRY$useState)((_b = (_a = config.options) === null || _a === void 0 ? void 0 : _a.defaultSorting) !== null && _b !== void 0 ? _b : []), sorting = _10[0], setSorting = _10[1];
3321
- var _11 = (0, $4MPRY$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];
3326
+ var _9 = (0, $4MPRY$useState)({}), columnVisibility = _9[0], setColumnVisibility = _9[1];
3327
+ var _10 = (0, $4MPRY$useState)([]), columnOrder = _10[0], setColumnOrder = _10[1];
3328
+ var _11 = (0, $4MPRY$useState)((_b = (_a = config.options) === null || _a === void 0 ? void 0 : _a.defaultSorting) !== null && _b !== void 0 ? _b : []), sorting = _11[0], setSorting = _11[1];
3329
+ var _12 = (0, $4MPRY$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];
3330
+ var _13 = (0, $4MPRY$useState)({}), expanded = _13[0], setExpanded = _13[1];
3322
3331
  var handleGenerateStyle = function() {
3323
3332
  var result = (0, $b3fc44f26b625a32$export$e2d2075c69d9100d)((0, $a159f18e2839f1e6$export$2e2bcd8739ae039).base);
3324
3333
  var keys = (0, $ba1db6dce71c3f25$export$be5d6ab3c5b84767)((0, $a159f18e2839f1e6$export$2e2bcd8739ae039).base);
@@ -3380,6 +3389,7 @@ var $df469b72efb8986e$var$TableList2 = function(props) {
3380
3389
  getExpandedRowModel: (0, $4MPRY$getExpandedRowModel)(),
3381
3390
  getGroupedRowModel: (0, $4MPRY$getGroupedRowModel)(),
3382
3391
  getCoreRowModel: (0, $4MPRY$getCoreRowModel)(),
3392
+ getSubRows: (_g = config.options) === null || _g === void 0 ? void 0 : _g.getSubRows,
3383
3393
  columns: isDraggable ? $df469b72efb8986e$var$__spreadArray([
3384
3394
  {
3385
3395
  id: 'drag-handle',
@@ -3398,7 +3408,8 @@ var $df469b72efb8986e$var$TableList2 = function(props) {
3398
3408
  sorting: sorting,
3399
3409
  columnVisibility: columnVisibility,
3400
3410
  columnOrder: columnOrder,
3401
- grouping: grouping
3411
+ grouping: grouping,
3412
+ expanded: expanded
3402
3413
  },
3403
3414
  initialState: {
3404
3415
  columnVisibility: isDraggable ? $df469b72efb8986e$var$__assign({
@@ -3406,13 +3417,13 @@ var $df469b72efb8986e$var$TableList2 = function(props) {
3406
3417
  }, initialVisibilityState) : initialVisibilityState,
3407
3418
  columnOrder: isDraggable ? $df469b72efb8986e$var$__spreadArray([
3408
3419
  'drag-handle'
3409
- ], (_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,
3420
+ ], (_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,
3410
3421
  columnPinning: {
3411
- left: (_m = (0, $4MPRY$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 : [],
3412
- right: (_q = (0, $4MPRY$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 : []
3422
+ left: (_o = (0, $4MPRY$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 : [],
3423
+ right: (_r = (0, $4MPRY$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 : []
3413
3424
  },
3414
- grouping: (_s = (_r = config.options) === null || _r === void 0 ? void 0 : _r.grouping) === null || _s === void 0 ? void 0 : _s.defaultGrouping,
3415
- expanded: (_u = (_t = config.options) === null || _t === void 0 ? void 0 : _t.grouping) === null || _u === void 0 ? void 0 : _u.defaultExpanded
3425
+ grouping: (_t = (_s = config.options) === null || _s === void 0 ? void 0 : _s.grouping) === null || _t === void 0 ? void 0 : _t.defaultGrouping,
3426
+ expanded: (_v = (_u = config.options) === null || _u === void 0 ? void 0 : _u.grouping) === null || _v === void 0 ? void 0 : _v.defaultExpanded
3416
3427
  },
3417
3428
  manualPagination: true,
3418
3429
  manualSorting: true,
@@ -3420,6 +3431,7 @@ var $df469b72efb8986e$var$TableList2 = function(props) {
3420
3431
  onColumnVisibilityChange: setColumnVisibility,
3421
3432
  onColumnOrderChange: setColumnOrder,
3422
3433
  onGroupingChange: setGrouping,
3434
+ onExpandedChange: setExpanded,
3423
3435
  getRowId: function(row) {
3424
3436
  return (0, $4MPRY$get)(row, dragConfig === null || dragConfig === void 0 ? void 0 : dragConfig.rowIdentifierKey);
3425
3437
  }
@@ -3476,7 +3488,7 @@ var $df469b72efb8986e$var$TableList2 = function(props) {
3476
3488
  setColumnVisibility(visibility_1);
3477
3489
  }
3478
3490
  }, [
3479
- (_v = config === null || config === void 0 ? void 0 : config.options) === null || _v === void 0 ? void 0 : _v.defaultVisibility,
3491
+ (_w = config === null || config === void 0 ? void 0 : config.options) === null || _w === void 0 ? void 0 : _w.defaultVisibility,
3480
3492
  id,
3481
3493
  table
3482
3494
  ]);
@@ -3501,10 +3513,13 @@ var $df469b72efb8986e$var$TableList2 = function(props) {
3501
3513
  }
3502
3514
  }, [
3503
3515
  config.columns,
3504
- (_w = config === null || config === void 0 ? void 0 : config.options) === null || _w === void 0 ? void 0 : _w.defaultOrder,
3516
+ (_x = config === null || config === void 0 ? void 0 : config.options) === null || _x === void 0 ? void 0 : _x.defaultOrder,
3505
3517
  id,
3506
3518
  isDraggable
3507
3519
  ]);
3520
+ var handleFlexRender = function(cell) {
3521
+ return (0, $4MPRY$flexRender)(cell.column.columnDef.cell, cell.getContext());
3522
+ };
3508
3523
  // Write state to local storage when it changes
3509
3524
  (0, $4MPRY$useEffect)(function() {
3510
3525
  if (state) (0, $b77b4b93ae627775$export$c0b214a25c581b2a)(id, state);
@@ -3583,7 +3598,7 @@ var $df469b72efb8986e$var$TableList2 = function(props) {
3583
3598
  return acc + size;
3584
3599
  }, 0);
3585
3600
  }, [
3586
- (_x = config.options) === null || _x === void 0 ? void 0 : _x.columnPinning
3601
+ (_y = config.options) === null || _y === void 0 ? void 0 : _y.columnPinning
3587
3602
  ]);
3588
3603
  var getCommonPinningStyles = (0, $4MPRY$useCallback)(function(column) {
3589
3604
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
@@ -3604,10 +3619,10 @@ var $df469b72efb8986e$var$TableList2 = function(props) {
3604
3619
  right: isPinned === 'right' ? "".concat(getPinnedColumnsWidth('right', column.id), "px") : undefined
3605
3620
  };
3606
3621
  }, [
3607
- (_z = (_y = config.options) === null || _y === void 0 ? void 0 : _y.columnPinning) === null || _z === void 0 ? void 0 : _z.customShadow,
3608
- (_1 = (_0 = config.options) === null || _0 === void 0 ? void 0 : _0.columnPinning) === null || _1 === void 0 ? void 0 : _1.disableShadow,
3609
- (_3 = (_2 = config.options) === null || _2 === void 0 ? void 0 : _2.columnPinning) === null || _3 === void 0 ? void 0 : _3.left,
3610
- (_5 = (_4 = config.options) === null || _4 === void 0 ? void 0 : _4.columnPinning) === null || _5 === void 0 ? void 0 : _5.right,
3622
+ (_0 = (_z = config.options) === null || _z === void 0 ? void 0 : _z.columnPinning) === null || _0 === void 0 ? void 0 : _0.customShadow,
3623
+ (_2 = (_1 = config.options) === null || _1 === void 0 ? void 0 : _1.columnPinning) === null || _2 === void 0 ? void 0 : _2.disableShadow,
3624
+ (_4 = (_3 = config.options) === null || _3 === void 0 ? void 0 : _3.columnPinning) === null || _4 === void 0 ? void 0 : _4.left,
3625
+ (_6 = (_5 = config.options) === null || _5 === void 0 ? void 0 : _5.columnPinning) === null || _6 === void 0 ? void 0 : _6.right,
3611
3626
  styles.body.table.pinnedColumns.left,
3612
3627
  styles.body.table.pinnedColumns.right,
3613
3628
  getPinnedColumnsWidth
@@ -3716,8 +3731,7 @@ var $df469b72efb8986e$var$TableList2 = function(props) {
3716
3731
  className: row.getIsExpanded() ? styles.body.table.body.groupedRowIcon.collapse : styles.body.table.body.groupedRowIcon.expand,
3717
3732
  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'
3718
3733
  }),
3719
- ' ',
3720
- (0, $4MPRY$flexRender)(cell.column.columnDef.cell, cell.getContext()),
3734
+ handleFlexRender(cell),
3721
3735
  " (",
3722
3736
  row.subRows.length,
3723
3737
  ")"
@@ -3734,7 +3748,7 @@ var $df469b72efb8986e$var$TableList2 = function(props) {
3734
3748
  ]
3735
3749
  }),
3736
3750
  (0, $4MPRY$isEmpty)(table === null || table === void 0 ? void 0 : table.getRowModel().rows) && !isLoading && (0, $4MPRY$jsx)((0, $4MPRY$Fragment), {
3737
- 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, $4MPRY$jsx)("div", {
3751
+ 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, $4MPRY$jsx)("div", {
3738
3752
  className: (0, $a159f18e2839f1e6$export$2e2bcd8739ae039).empty,
3739
3753
  children: "There is no data to show..."
3740
3754
  })
@@ -4680,7 +4694,7 @@ var $d467f992ffa88739$var$ModalOverlay = function(props) {
4680
4694
  ]);
4681
4695
  return (0, $4MPRY$jsxs)((0, $4MPRY$Fragment), {
4682
4696
  children: [
4683
- (0, $4MPRY$jsx)((0, $4MPRY$Transition).Root, {
4697
+ (0, $4MPRY$jsx)((0, $4MPRY$Transition), {
4684
4698
  show: isOpen,
4685
4699
  as: (0, $4MPRY$Fragment1),
4686
4700
  children: (0, $4MPRY$jsxs)((0, $4MPRY$Dialog), {
@@ -4688,7 +4702,7 @@ var $d467f992ffa88739$var$ModalOverlay = function(props) {
4688
4702
  className: styles.container,
4689
4703
  onClose: handleClose,
4690
4704
  children: [
4691
- (0, $4MPRY$jsx)((0, $4MPRY$Transition).Child, {
4705
+ (0, $4MPRY$jsx)((0, $4MPRY$TransitionChild), {
4692
4706
  as: (0, $4MPRY$Fragment1),
4693
4707
  enter: styles.background.transition.enter,
4694
4708
  enterFrom: styles.background.transition.enterFrom,
@@ -4705,7 +4719,7 @@ var $d467f992ffa88739$var$ModalOverlay = function(props) {
4705
4719
  children: (0, $4MPRY$jsx)("div", {
4706
4720
  className: styles.layout.content,
4707
4721
  "data-cy": dataCy,
4708
- children: (0, $4MPRY$jsx)((0, $4MPRY$Transition).Child, {
4722
+ children: (0, $4MPRY$jsx)((0, $4MPRY$TransitionChild), {
4709
4723
  as: (0, $4MPRY$Fragment1),
4710
4724
  enter: styles.panel.transition.enter,
4711
4725
  enterFrom: styles.panel.transition.enterFrom,
@@ -5087,7 +5101,7 @@ var $28232825d538e297$var$TableColumnOptionsCustom = function(props) {
5087
5101
  return (0, $4MPRY$jsxs)((0, $4MPRY$Popover), {
5088
5102
  children: [
5089
5103
  (0, $4MPRY$jsx)((0, $4MPRY$PopoverButton), {
5090
- as: 'div',
5104
+ as: "div",
5091
5105
  children: trigger
5092
5106
  }),
5093
5107
  (0, $4MPRY$jsxs)((0, $4MPRY$PopoverPanel), {
@@ -6985,10 +6999,10 @@ var $3f6ca002faff40a3$var$getDateString = function(date) {
6985
6999
  return (0, $4e61e073e8ab55ca$export$b7c4e1545c61edee)(date.value);
6986
7000
  };
6987
7001
  var $3f6ca002faff40a3$var$useColumnHelpers = function(t) {
6988
- var accessor = (0, $4MPRY$useMemo)(function() {
7002
+ var _a = (0, $4MPRY$useMemo)(function() {
6989
7003
  return (0, $4MPRY$createColumnHelper)();
6990
- }, []).accessor;
6991
- var _a = (0, $48d5b0ffa682dc0b$export$2e2bcd8739ae039)(t), toStringCell = _a.toStringCell, toOptionCell = _a.toOptionCell;
7004
+ }, []), accessor = _a.accessor, display = _a.display;
7005
+ var _b = (0, $48d5b0ffa682dc0b$export$2e2bcd8739ae039)(t), toStringCell = _b.toStringCell, toOptionCell = _b.toOptionCell;
6992
7006
  var getClassName = (0, $4MPRY$useCallback)(function(size) {
6993
7007
  var sizes = {
6994
7008
  sm: 'max-w-20',
@@ -6999,21 +7013,29 @@ var $3f6ca002faff40a3$var$useColumnHelpers = function(t) {
6999
7013
  return "overflow-hidden text-ellipsis ".concat((0, $4MPRY$get)(sizes, size, ''), " block");
7000
7014
  }, []);
7001
7015
  var createAccessor = (0, $4MPRY$useCallback)(function(key, getCellContent, excelMapper, options) {
7002
- var _a;
7003
- return accessor(key, {
7016
+ var _a, _b;
7017
+ var column = {
7004
7018
  header: (_a = options === null || options === void 0 ? void 0 : options.header) !== null && _a !== void 0 ? _a : t("component.form.label.".concat(key)),
7005
7019
  enableSorting: (0, $4MPRY$get)(options, 'enableSorting', true),
7006
- cell: function(cell) {
7020
+ cell: (_b = options === null || options === void 0 ? void 0 : options.cell) !== null && _b !== void 0 ? _b : function(cell) {
7007
7021
  return getCellContent(cell, options);
7008
7022
  },
7023
+ aggregatedCell: options === null || options === void 0 ? void 0 : options.aggregateCell,
7009
7024
  meta: {
7010
7025
  excel: excelMapper
7011
7026
  }
7012
- });
7027
+ };
7028
+ if (options === null || options === void 0 ? void 0 : options.aggregationFn) (0, $4MPRY$set)(column, 'aggregationFn', options.aggregationFn);
7029
+ return accessor(key, column);
7013
7030
  }, [
7014
7031
  accessor,
7015
7032
  t
7016
7033
  ]);
7034
+ var createDisplay = (0, $4MPRY$useCallback)(function(column) {
7035
+ return display(column);
7036
+ }, [
7037
+ display
7038
+ ]);
7017
7039
  var baseCellRenderer = function(value, options) {
7018
7040
  var _a;
7019
7041
  var content = (0, $4MPRY$jsx)("p", {
@@ -7021,7 +7043,7 @@ var $3f6ca002faff40a3$var$useColumnHelpers = function(t) {
7021
7043
  children: value
7022
7044
  });
7023
7045
  return (options === null || options === void 0 ? void 0 : options.hasTooltip) ? (0, $4MPRY$jsx)((0, $b237e6d2d86a5c92$export$2e2bcd8739ae039), {
7024
- placement: (_a = options === null || options === void 0 ? void 0 : options.tooltipPlacement) !== null && _a !== void 0 ? _a : "bottom-end",
7046
+ placement: (_a = options === null || options === void 0 ? void 0 : options.tooltipPlacement) !== null && _a !== void 0 ? _a : 'bottom-end',
7025
7047
  content: value,
7026
7048
  children: content
7027
7049
  }) : content;
@@ -7039,7 +7061,7 @@ var $3f6ca002faff40a3$var$useColumnHelpers = function(t) {
7039
7061
  var content = value.href ? (0, $4MPRY$jsx)("a", {
7040
7062
  href: value.href,
7041
7063
  className: (0, $66c3dcaaa74b5389$export$4370d69198e9314a)((options === null || options === void 0 ? void 0 : options.size) && getClassName(options.size), options === null || options === void 0 ? void 0 : options.className),
7042
- target: (options === null || options === void 0 ? void 0 : options.openInNewTab) ? "_blank" : undefined,
7064
+ target: (options === null || options === void 0 ? void 0 : options.openInNewTab) ? '_blank' : undefined,
7043
7065
  children: value.label
7044
7066
  }) : value.label;
7045
7067
  return (options === null || options === void 0 ? void 0 : options.hasTooltip) ? (0, $4MPRY$jsx)((0, $b237e6d2d86a5c92$export$2e2bcd8739ae039), {
@@ -7060,7 +7082,7 @@ var $3f6ca002faff40a3$var$useColumnHelpers = function(t) {
7060
7082
  children: value.label
7061
7083
  });
7062
7084
  return (options === null || options === void 0 ? void 0 : options.hasTooltip) ? (0, $4MPRY$jsx)((0, $b237e6d2d86a5c92$export$2e2bcd8739ae039), {
7063
- placement: (_a = options === null || options === void 0 ? void 0 : options.tooltipPlacement) !== null && _a !== void 0 ? _a : "bottom-end",
7085
+ placement: (_a = options === null || options === void 0 ? void 0 : options.tooltipPlacement) !== null && _a !== void 0 ? _a : 'bottom-end',
7064
7086
  content: value.label,
7065
7087
  children: content
7066
7088
  }) : content;
@@ -7079,7 +7101,7 @@ var $3f6ca002faff40a3$var$useColumnHelpers = function(t) {
7079
7101
  children: value.label
7080
7102
  });
7081
7103
  return (options === null || options === void 0 ? void 0 : options.hasTooltip) ? (0, $4MPRY$jsx)((0, $b237e6d2d86a5c92$export$2e2bcd8739ae039), {
7082
- placement: (_a = options === null || options === void 0 ? void 0 : options.tooltipPlacement) !== null && _a !== void 0 ? _a : "bottom-end",
7104
+ placement: (_a = options === null || options === void 0 ? void 0 : options.tooltipPlacement) !== null && _a !== void 0 ? _a : 'bottom-end',
7083
7105
  content: value.label,
7084
7106
  children: content
7085
7107
  }) : content;
@@ -7114,13 +7136,23 @@ var $3f6ca002faff40a3$var$useColumnHelpers = function(t) {
7114
7136
  return toStringCell((cell === null || cell === void 0 ? void 0 : cell.value) !== undefined ? t("label.boolean.".concat(cell.value)) : t('label.boolean.unclear'));
7115
7137
  }, options);
7116
7138
  };
7139
+ var displayAccessor = function(key, cell, options) {
7140
+ var _a;
7141
+ return createDisplay({
7142
+ id: key,
7143
+ header: (_a = options === null || options === void 0 ? void 0 : options.header) !== null && _a !== void 0 ? _a : t("component.form.label.".concat(key)),
7144
+ cell: cell,
7145
+ aggregatedCell: options === null || options === void 0 ? void 0 : options.aggregatedCell
7146
+ });
7147
+ };
7117
7148
  return {
7118
7149
  stringAccessor: stringAccessor,
7119
7150
  linkAccessor: linkAccessor,
7120
7151
  buttonAccessor: buttonAccessor,
7121
7152
  badgeAccessor: badgeAccessor,
7122
7153
  dateAccessor: dateAccessor,
7123
- booleanAccessor: booleanAccessor
7154
+ booleanAccessor: booleanAccessor,
7155
+ displayAccessor: displayAccessor
7124
7156
  };
7125
7157
  };
7126
7158
  var $3f6ca002faff40a3$export$2e2bcd8739ae039 = $3f6ca002faff40a3$var$useColumnHelpers;