@economic/taco 2.58.2-EC-64961.3 → 2.58.2-EC-64961.5
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 +12 -10
- package/dist/taco.cjs.map +1 -1
- package/dist/taco.d.ts +1 -1
- package/dist/taco.js +12 -10
- package/dist/taco.js.map +1 -1
- package/package.json +2 -2
package/dist/taco.cjs
CHANGED
@@ -33333,6 +33333,7 @@ function resetHighlightedColumnIndexes(searchQuery, table, localization) {
|
|
33333
33333
|
columns.forEach((column, columnIndex) => {
|
33334
33334
|
var _a, _b;
|
33335
33335
|
try {
|
33336
|
+
const key = column.columnDef.accessorKey;
|
33336
33337
|
let allowSearch = true;
|
33337
33338
|
if (rowGrouping == null ? void 0 : rowGrouping.length) {
|
33338
33339
|
if (row.getIsGrouped()) {
|
@@ -33342,7 +33343,7 @@ function resetHighlightedColumnIndexes(searchQuery, table, localization) {
|
|
33342
33343
|
}
|
33343
33344
|
}
|
33344
33345
|
if (column.getIsVisible() && column.columnDef.enableGlobalFilter && allowSearch) {
|
33345
|
-
const cellValue = get(row.original,
|
33346
|
+
const cellValue = get(row.original, key);
|
33346
33347
|
const dataType = (_a = column.columnDef.meta) == null ? void 0 : _a.dataType;
|
33347
33348
|
const dataTypeOptions = (_b = column.columnDef.meta) == null ? void 0 : _b.dataTypeOptions;
|
33348
33349
|
if (isMatched(searchQuery, cellValue, row.original, dataType, dataTypeOptions, localization)) {
|
@@ -33383,11 +33384,11 @@ const getCellMinWidth = (fontSize = "medium") => {
|
|
33383
33384
|
return 72;
|
33384
33385
|
}
|
33385
33386
|
};
|
33386
|
-
function isCellHighlighted(query, value, dataType, localization) {
|
33387
|
+
function isCellHighlighted(query, value, row, dataType, dataTypeOptions, localization) {
|
33387
33388
|
if (value === void 0 || value === null) {
|
33388
33389
|
return false;
|
33389
33390
|
}
|
33390
|
-
return isMatched(query, value, dataType, localization);
|
33391
|
+
return isMatched(query, value, row, dataType, dataTypeOptions, localization);
|
33391
33392
|
}
|
33392
33393
|
function orderColumn(column, { orderingDisabled, orderingEnabled }) {
|
33393
33394
|
var _a;
|
@@ -33512,8 +33513,8 @@ function processChildren(child, columns, defaultSizing, defaultSorting, defaultV
|
|
33512
33513
|
);
|
33513
33514
|
} else if (React.isValidElement(child) && (child.props.accessor || child.props.id)) {
|
33514
33515
|
const {
|
33515
|
-
|
33516
|
-
|
33516
|
+
accessor,
|
33517
|
+
id: id2 = accessor,
|
33517
33518
|
// renderers
|
33518
33519
|
renderer: renderer2,
|
33519
33520
|
aggregate,
|
@@ -33538,7 +33539,6 @@ function processChildren(child, columns, defaultSizing, defaultSorting, defaultV
|
|
33538
33539
|
sortFn,
|
33539
33540
|
...meta
|
33540
33541
|
} = child.props;
|
33541
|
-
const id2 = untypedId;
|
33542
33542
|
const dataTypeProperties = getDataTypeProperties(child.props.dataType);
|
33543
33543
|
if (defaultHidden && enableHiding) {
|
33544
33544
|
defaultVisibility[id2] = false;
|
@@ -33555,10 +33555,10 @@ function processChildren(child, columns, defaultSizing, defaultSorting, defaultV
|
|
33555
33555
|
}
|
33556
33556
|
const column = {
|
33557
33557
|
id: id2,
|
33558
|
-
accessorKey,
|
33558
|
+
accessorKey: accessor,
|
33559
33559
|
// To avoid errors caused by undefined row data values, we pass accessorFn as a preventive measure
|
33560
|
-
//
|
33561
|
-
accessorFn: (row) => get(row,
|
33560
|
+
// accessor can be dot notated strings, so we use lodash.get to access deeply nested children
|
33561
|
+
accessorFn: accessor ? (row) => get(row, accessor) : void 0,
|
33562
33562
|
// The header can be either a string or a JSX.Element, but react-table expects it to be a string or a
|
33563
33563
|
// renderer function, so `() => header` ensures compatibility when header is a JSX.Element.
|
33564
33564
|
// If we just pass `() => header`, then we will loose truncation for string headers.
|
@@ -33615,7 +33615,7 @@ function processChildren(child, columns, defaultSizing, defaultSorting, defaultV
|
|
33615
33615
|
if (enableGrouping) {
|
33616
33616
|
column.aggregationFn = aggregationFn;
|
33617
33617
|
if (typeof aggregate === "function") {
|
33618
|
-
column.aggregatedCell = (info) => aggregate(
|
33618
|
+
column.aggregatedCell = (info) => aggregate(rendererArgs(info));
|
33619
33619
|
}
|
33620
33620
|
}
|
33621
33621
|
if (enableSorting) {
|
@@ -36471,7 +36471,9 @@ function useSearchHighlighting(cell, cellIndex, ref) {
|
|
36471
36471
|
isHighlighted2 = isCellHighlighted(
|
36472
36472
|
context.table.getState().globalFilter,
|
36473
36473
|
cell.getValue(),
|
36474
|
+
cell.row.original,
|
36474
36475
|
columnMeta.dataType,
|
36476
|
+
columnMeta.dataTypeOptions,
|
36475
36477
|
localization
|
36476
36478
|
);
|
36477
36479
|
}
|