@economic/taco 2.26.8 → 2.26.9

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.
@@ -9594,7 +9594,8 @@ function processChildren(child, columns, defaultSizing, defaultSorting, defaultV
9594
9594
  enableOrdering: isGrouped ? false : enableOrdering,
9595
9595
  enablePrinting,
9596
9596
  enableTruncate,
9597
- header
9597
+ header,
9598
+ renderer
9598
9599
  }
9599
9600
  };
9600
9601
  // renderers
@@ -11490,7 +11491,7 @@ const renderer = {
11490
11491
  renderer: Cell,
11491
11492
  meta: {
11492
11493
  align: 'right',
11493
- className: /*#__PURE__*/cn('print:opacity-0 !px-0 !pr-1 overflow-hidden [table_&]:group-[[data-row-active="true"]]/row:sticky [table[data-table-pause-hover="false"]_&]:group-hover/row:sticky right-0', 'group-[[data-row-active="true"][data-selected="false"]]/row:text-grey-200', 'group-[[data-row-selected="true"]]/row:text-blue-100', 'group-[[data-row-selected="false"]:hover]/row:text-grey-100'),
11494
+ className: /*#__PURE__*/cn('print:opacity-0 !px-0 !pr-1 overflow-hidden [table_&]:group-[[data-row-active="true"]]/row:sticky right-0', 'group-[[data-row-active="true"][data-selected="false"]]/row:text-grey-200', 'group-[[data-row-selected="true"]]/row:text-blue-100', 'group-[[data-row-selected="false"]:hover]/row:text-grey-100'),
11494
11495
  // TODO: remove when table3 is migrated, this satisfies the legacy table3 type
11495
11496
  enableSearch: false,
11496
11497
  header: ''
@@ -11892,6 +11893,7 @@ function useSearchHighlighting(cell, cellIndex, ref) {
11892
11893
  }
11893
11894
 
11894
11895
  function GroupedCell(props) {
11896
+ var _ref, _columnMeta$renderer, _columnMeta$renderer2;
11895
11897
  const {
11896
11898
  cell,
11897
11899
  cellRef,
@@ -11899,6 +11901,7 @@ function GroupedCell(props) {
11899
11901
  isHighlighted
11900
11902
  } = props;
11901
11903
  const tableMeta = cell.getContext().table.options.meta;
11904
+ const columnMeta = cell.column.columnDef.meta;
11902
11905
  const attributes = getCellAttributes(cell, index, isHighlighted);
11903
11906
  const {
11904
11907
  isHovered,
@@ -11906,25 +11909,31 @@ function GroupedCell(props) {
11906
11909
  } = React__default.useContext(RowContext);
11907
11910
  const isActiveRow = tableMeta.rowActive.rowActiveIndex === rowIndex;
11908
11911
  const canShowActions = isActiveRow || isHovered && !tableMeta.rowActive.isHoverStatePaused;
11912
+ const colSpan = cell.row.getVisibleCells().filter(c => !isInternalColumn(c.column.id)).length - 1;
11913
+ const content = (_ref = (_columnMeta$renderer = (_columnMeta$renderer2 = columnMeta.renderer) === null || _columnMeta$renderer2 === void 0 ? void 0 : _columnMeta$renderer2.call(columnMeta, cell.getValue(), cell.row.original)) !== null && _columnMeta$renderer !== void 0 ? _columnMeta$renderer : cell.getValue()) !== null && _ref !== void 0 ? _ref : null;
11914
+ const subRows = cell.getContext().row.subRows.map(row => row.original);
11909
11915
  return /*#__PURE__*/React__default.createElement(MemoedGroupedCell, Object.assign({}, attributes, {
11910
- cell: cell,
11911
- cellRef: cellRef,
11912
11916
  canShowActions: canShowActions,
11917
+ cellRef: cellRef,
11918
+ colSpan: colSpan,
11913
11919
  fontSize: tableMeta.fontSize.size,
11914
- rowActions: tableMeta.rowGroups.rowActionsForGroup
11915
- }));
11920
+ rowActions: tableMeta.rowGroups.rowActionsForGroup,
11921
+ rowId: cell.row.id,
11922
+ subRows: subRows
11923
+ }), content);
11916
11924
  }
11917
11925
  const MemoedGroupedCell = /*#__PURE__*/React__default.memo(function MemoedGroupedCell(props) {
11918
11926
  const {
11919
11927
  canShowActions,
11920
- cell,
11921
11928
  cellRef,
11929
+ children,
11930
+ colSpan,
11922
11931
  fontSize,
11923
11932
  rowActions,
11933
+ rowId,
11934
+ subRows,
11924
11935
  ...attributes
11925
11936
  } = props;
11926
- const colSpan = cell.row.getVisibleCells().filter(c => !isInternalColumn(c.column.id)).length - 1;
11927
- const subRows = cell.getContext().row.subRows.map(row => row.original);
11928
11937
  return /*#__PURE__*/React__default.createElement("td", Object.assign({}, attributes, {
11929
11938
  ref: cellRef,
11930
11939
  style: {
@@ -11932,13 +11941,13 @@ const MemoedGroupedCell = /*#__PURE__*/React__default.memo(function MemoedGroupe
11932
11941
  }
11933
11942
  }), /*#__PURE__*/React__default.createElement("span", {
11934
11943
  className: "grow"
11935
- }, reactTable.flexRender(cell.column.columnDef.cell, cell.getContext())), rowActions !== null && rowActions !== void 0 && rowActions.length && canShowActions ? ( /*#__PURE__*/React__default.createElement(Actions$1, {
11944
+ }, children), rowActions !== null && rowActions !== void 0 && rowActions.length && canShowActions ? ( /*#__PURE__*/React__default.createElement(Actions$1, {
11936
11945
  actions: rowActions,
11937
11946
  actionsLength: 4,
11938
11947
  data: subRows,
11939
11948
  fontSize: fontSize,
11940
11949
  isActiveRow: true,
11941
- rowId: cell.row.id
11950
+ rowId: rowId
11942
11951
  })) : null);
11943
11952
  });
11944
11953
 
@@ -12080,7 +12089,7 @@ function useSetVirtualisedRowHeight(measureRow, rowEl, expansionEl, isExpanded)
12080
12089
  }, [isExpanded, rowEl, expansionEl]);
12081
12090
  }
12082
12091
 
12083
- const DisplayCell = /*#__PURE__*/React__default.memo(function DisplayCell(props) {
12092
+ function DisplayCell(props) {
12084
12093
  const {
12085
12094
  cell,
12086
12095
  cellRef,
@@ -12088,15 +12097,37 @@ const DisplayCell = /*#__PURE__*/React__default.memo(function DisplayCell(props)
12088
12097
  isHighlighted,
12089
12098
  ...cellAttributes
12090
12099
  } = props;
12100
+ const {
12101
+ isHovered
12102
+ } = React__default.useContext(RowContext);
12091
12103
  const columnMeta = cell.column.columnDef.meta;
12092
12104
  const attributes = getCellAttributes(cell, index, isHighlighted);
12093
12105
  const isTruncated = !!columnMeta.enableTruncate;
12094
- const content = reactTable.flexRender(cell.column.columnDef.cell, cell.getContext());
12095
- return /*#__PURE__*/React__default.createElement("td", Object.assign({}, cellAttributes, attributes, {
12106
+ let content;
12107
+ if (isInternalColumn(cell.column.id)) {
12108
+ content = reactTable.flexRender(cell.column.columnDef.cell, cell.getContext());
12109
+ } else {
12110
+ var _ref, _columnMeta$renderer, _columnMeta$renderer2;
12111
+ content = (_ref = (_columnMeta$renderer = (_columnMeta$renderer2 = columnMeta.renderer) === null || _columnMeta$renderer2 === void 0 ? void 0 : _columnMeta$renderer2.call(columnMeta, cell.getValue(), cell.row.original)) !== null && _columnMeta$renderer !== void 0 ? _columnMeta$renderer : cell.getValue()) !== null && _ref !== void 0 ? _ref : null;
12112
+ }
12113
+ return /*#__PURE__*/React__default.createElement(MemoedDisplayCell, Object.assign({}, cellAttributes, attributes, {
12114
+ cellRef: cellRef,
12115
+ isTruncated: isTruncated,
12116
+ key: `${cell.id}_${isHovered}`
12117
+ }), content);
12118
+ }
12119
+ const MemoedDisplayCell = /*#__PURE__*/React__default.memo(function MemoedDisplayCell(props) {
12120
+ const {
12121
+ cellRef,
12122
+ children,
12123
+ isTruncated,
12124
+ ...cellAttributes
12125
+ } = props;
12126
+ return /*#__PURE__*/React__default.createElement("td", Object.assign({}, cellAttributes, {
12096
12127
  ref: cellRef
12097
12128
  }), isTruncated ? /*#__PURE__*/React__default.createElement("span", {
12098
12129
  className: "truncate print:overflow-visible print:whitespace-normal"
12099
- }, content) : content);
12130
+ }, children) : children);
12100
12131
  });
12101
12132
 
12102
12133
  const RENDERERS = {