@economic/taco 2.58.1 → 2.58.2-EC-64962.1
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/taco.cjs +20 -27
- package/dist/taco.cjs.map +1 -1
- package/dist/taco.d.ts +50 -40
- package/dist/taco.js +20 -27
- package/dist/taco.js.map +1 -1
- package/package.json +2 -2
package/dist/taco.cjs
CHANGED
@@ -33534,23 +33534,27 @@ function processChildren(child, columns, defaultSizing, defaultSorting, defaultV
|
|
33534
33534
|
enablePrinting,
|
33535
33535
|
enableTruncate,
|
33536
33536
|
enableEditing,
|
33537
|
-
header
|
33538
|
-
renderer: renderer2
|
33537
|
+
header
|
33539
33538
|
}
|
33540
33539
|
};
|
33540
|
+
const formattedValueRenderer = (value) => {
|
33541
|
+
var _a;
|
33542
|
+
const displayValue = (_a = dataTypeProperties.getDisplayValue) == null ? void 0 : _a.call(dataTypeProperties, value, { localization });
|
33543
|
+
const safeValue = value !== void 0 && value !== null ? String(value) : value;
|
33544
|
+
if (Array.isArray(displayValue)) {
|
33545
|
+
return displayValue[0] ?? safeValue;
|
33546
|
+
}
|
33547
|
+
return displayValue ?? safeValue;
|
33548
|
+
};
|
33549
|
+
const rendererArgs = (info) => ({
|
33550
|
+
formattedValue: formattedValueRenderer(info.getValue()),
|
33551
|
+
row: info.row.original,
|
33552
|
+
value: info.getValue()
|
33553
|
+
});
|
33541
33554
|
if (typeof renderer2 === "function") {
|
33542
|
-
column.cell = (info) => renderer2(
|
33543
|
-
} else
|
33544
|
-
|
33545
|
-
var _a;
|
33546
|
-
const displayValue = (_a = dataTypeProperties.getDisplayValue) == null ? void 0 : _a.call(dataTypeProperties, value, { localization });
|
33547
|
-
if (Array.isArray(displayValue)) {
|
33548
|
-
return displayValue[0] ?? value;
|
33549
|
-
}
|
33550
|
-
return displayValue ?? value;
|
33551
|
-
};
|
33552
|
-
column.cell = (info) => dataTypeRenderer(info.getValue());
|
33553
|
-
column.meta.renderer = dataTypeRenderer;
|
33555
|
+
column.cell = (info) => renderer2(rendererArgs(info));
|
33556
|
+
} else {
|
33557
|
+
column.cell = (info) => formattedValueRenderer(info.getValue());
|
33554
33558
|
}
|
33555
33559
|
if (typeof footer === "function") {
|
33556
33560
|
column.footer = (info) => footer(info.table.getRowModel().rows.flatMap((row) => row.original !== void 0 ? row.original : []));
|
@@ -36458,17 +36462,14 @@ function useSearchHighlighting(cell, cellIndex, ref) {
|
|
36458
36462
|
return isHighlighted;
|
36459
36463
|
}
|
36460
36464
|
function GroupedCell(props) {
|
36461
|
-
var _a;
|
36462
36465
|
const { cell, cellRef, index: index2, isHighlighted } = props;
|
36463
36466
|
const { table } = cell.getContext();
|
36464
36467
|
const tableMeta = table.options.meta;
|
36465
|
-
const columnMeta = cell.column.columnDef.meta;
|
36466
36468
|
const attributes = getCellAttributes(cell, index2, isHighlighted);
|
36467
36469
|
const { isHovered, rowIndex } = React.useContext(RowContext);
|
36468
36470
|
const isActiveRow = tableMeta.rowActive.rowActiveIndex === rowIndex;
|
36469
36471
|
const canShowActions = isActiveRow || isHovered && !tableMeta.rowActive.isHoverStatePaused;
|
36470
36472
|
const colSpan = cell.row.getVisibleCells().filter((c3) => c3.column.id === "__actions" || !isInternalColumn(c3.column.id)).length - 1;
|
36471
|
-
const content = ((_a = columnMeta.renderer) == null ? void 0 : _a.call(columnMeta, cell.getValue(), cell.row.original)) ?? cell.getValue() ?? null;
|
36472
36473
|
const subRows = cell.getContext().row.subRows.map((row) => row.original);
|
36473
36474
|
return /* @__PURE__ */ React.createElement(
|
36474
36475
|
MemoedGroupedCell,
|
@@ -36482,7 +36483,7 @@ function GroupedCell(props) {
|
|
36482
36483
|
subRows,
|
36483
36484
|
table
|
36484
36485
|
},
|
36485
|
-
|
36486
|
+
flexRender(cell.column.columnDef.cell, cell.getContext())
|
36486
36487
|
);
|
36487
36488
|
}
|
36488
36489
|
const MemoedGroupedCell = React.memo(function MemoedGroupedCell2(props) {
|
@@ -36628,19 +36629,11 @@ const DisplayRow = React.memo(function DisplayRow2(props) {
|
|
36628
36629
|
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("tr", { ...attributes, className, ref }, children, row.getVisibleCells().filter((cell) => !(isGrouped && cell.column.id === "__actions")).map((cell, cellIndex) => /* @__PURE__ */ React.createElement(Cell$2, { key: cell.id, cell, index: cellIndex, renderer: CellRenderer }))), expandedRow ? /* @__PURE__ */ React.createElement("tr", { "data-row-parent-id": row.id, ref: expansionRef }, /* @__PURE__ */ React.createElement("td", { className: "col-span-full" }, expandedRow)) : null);
|
36629
36630
|
});
|
36630
36631
|
function DisplayCell(props) {
|
36631
|
-
var _a;
|
36632
36632
|
const { cell, cellRef, index: index2, isHighlighted, ...cellAttributes } = props;
|
36633
36633
|
const columnMeta = cell.column.columnDef.meta;
|
36634
36634
|
const attributes = getCellAttributes(cell, index2, isHighlighted);
|
36635
36635
|
const isTruncated = !!columnMeta.enableTruncate;
|
36636
|
-
|
36637
|
-
let content;
|
36638
|
-
if (isInternalColumn(cell.column.id)) {
|
36639
|
-
content = flexRender(cell.column.columnDef.cell, cell.getContext());
|
36640
|
-
} else {
|
36641
|
-
content = ((_a = columnMeta.renderer) == null ? void 0 : _a.call(columnMeta, value, cell.row.original)) ?? value ?? null;
|
36642
|
-
}
|
36643
|
-
return /* @__PURE__ */ React.createElement(MemoedDisplayCell, { ...cellAttributes, ...attributes, cellRef, isTruncated }, content);
|
36636
|
+
return /* @__PURE__ */ React.createElement(MemoedDisplayCell, { ...cellAttributes, ...attributes, cellRef, isTruncated }, flexRender(cell.column.columnDef.cell, cell.getContext()));
|
36644
36637
|
}
|
36645
36638
|
const MemoedDisplayCell = React.memo(function MemoedDisplayCell2(props) {
|
36646
36639
|
const { cellRef, children, isTruncated, ...cellAttributes } = props;
|