@economic/taco 2.58.2-EC-64961.2 → 2.58.2-EC-64961.4
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 +42 -16
- package/dist/taco.cjs.map +1 -1
- package/dist/taco.d.ts +2 -2
- package/dist/taco.js +42 -16
- package/dist/taco.js.map +1 -1
- package/package.json +2 -2
package/dist/taco.cjs
CHANGED
@@ -33054,7 +33054,34 @@ const dataTypes = {
|
|
33054
33054
|
TableFilterComparator.IsNotEmpty
|
33055
33055
|
]
|
33056
33056
|
},
|
33057
|
-
|
33057
|
+
boolean: {
|
33058
|
+
sortingFn: "basic",
|
33059
|
+
filterComparators: [TableFilterComparator.IsEqualTo, TableFilterComparator.IsNotEqualTo]
|
33060
|
+
},
|
33061
|
+
// dates
|
33062
|
+
date: createDatetimeDataType({
|
33063
|
+
day: "2-digit",
|
33064
|
+
month: "2-digit",
|
33065
|
+
year: "2-digit"
|
33066
|
+
}),
|
33067
|
+
time: createDatetimeDataType({
|
33068
|
+
hour: "2-digit",
|
33069
|
+
minute: "2-digit"
|
33070
|
+
}),
|
33071
|
+
datetime: createDatetimeDataType({
|
33072
|
+
day: "2-digit",
|
33073
|
+
month: "2-digit",
|
33074
|
+
year: "2-digit",
|
33075
|
+
hour: "2-digit",
|
33076
|
+
minute: "2-digit"
|
33077
|
+
}),
|
33078
|
+
// numbers
|
33079
|
+
number: createNumberDataType("left"),
|
33080
|
+
amount: createNumberDataType("right", { decimals: 2, useGrouping: true }),
|
33081
|
+
percentage: createNumberDataType("right", { useGrouping: true, percent: true })
|
33082
|
+
};
|
33083
|
+
function createDatetimeDataType(defaultOptions2) {
|
33084
|
+
return {
|
33058
33085
|
sortingFn: "datetime",
|
33059
33086
|
filterComparators: [
|
33060
33087
|
TableFilterComparator.IsEqualTo,
|
@@ -33067,20 +33094,17 @@ const dataTypes = {
|
|
33067
33094
|
TableFilterComparator.IsEmpty,
|
33068
33095
|
TableFilterComparator.IsNotEmpty
|
33069
33096
|
],
|
33070
|
-
getDisplayValue: (value,
|
33097
|
+
getDisplayValue: (value, row, options) => {
|
33071
33098
|
var _a;
|
33072
|
-
|
33099
|
+
if (value === void 0) {
|
33100
|
+
return "";
|
33101
|
+
}
|
33102
|
+
return new Intl.DateTimeFormat((_a = options == null ? void 0 : options.localization) == null ? void 0 : _a.locale, defaultOptions2).format(
|
33103
|
+
typeof value === "string" ? Date.parse(value) : value
|
33104
|
+
);
|
33073
33105
|
}
|
33074
|
-
}
|
33075
|
-
|
33076
|
-
sortingFn: "basic",
|
33077
|
-
filterComparators: [TableFilterComparator.IsEqualTo, TableFilterComparator.IsNotEqualTo]
|
33078
|
-
},
|
33079
|
-
// numbers
|
33080
|
-
number: createNumberDataType("left"),
|
33081
|
-
amount: createNumberDataType("right", { decimals: 2, useGrouping: true }),
|
33082
|
-
percentage: createNumberDataType("right", { useGrouping: true, percent: true })
|
33083
|
-
};
|
33106
|
+
};
|
33107
|
+
}
|
33084
33108
|
function createNumberDataType(align, defaultOptions2) {
|
33085
33109
|
return {
|
33086
33110
|
align,
|
@@ -33359,11 +33383,11 @@ const getCellMinWidth = (fontSize = "medium") => {
|
|
33359
33383
|
return 72;
|
33360
33384
|
}
|
33361
33385
|
};
|
33362
|
-
function isCellHighlighted(query, value, dataType, localization) {
|
33386
|
+
function isCellHighlighted(query, value, row, dataType, dataTypeOptions, localization) {
|
33363
33387
|
if (value === void 0 || value === null) {
|
33364
33388
|
return false;
|
33365
33389
|
}
|
33366
|
-
return isMatched(query, value, dataType, localization);
|
33390
|
+
return isMatched(query, value, row, dataType, dataTypeOptions, localization);
|
33367
33391
|
}
|
33368
33392
|
function orderColumn(column, { orderingDisabled, orderingEnabled }) {
|
33369
33393
|
var _a;
|
@@ -33514,7 +33538,7 @@ function processChildren(child, columns, defaultSizing, defaultSorting, defaultV
|
|
33514
33538
|
sortFn,
|
33515
33539
|
...meta
|
33516
33540
|
} = child.props;
|
33517
|
-
const id2 = untypedId;
|
33541
|
+
const id2 = untypedId ?? accessorKey;
|
33518
33542
|
const dataTypeProperties = getDataTypeProperties(child.props.dataType);
|
33519
33543
|
if (defaultHidden && enableHiding) {
|
33520
33544
|
defaultVisibility[id2] = false;
|
@@ -36447,7 +36471,9 @@ function useSearchHighlighting(cell, cellIndex, ref) {
|
|
36447
36471
|
isHighlighted2 = isCellHighlighted(
|
36448
36472
|
context.table.getState().globalFilter,
|
36449
36473
|
cell.getValue(),
|
36474
|
+
cell.row.original,
|
36450
36475
|
columnMeta.dataType,
|
36476
|
+
columnMeta.dataTypeOptions,
|
36451
36477
|
localization
|
36452
36478
|
);
|
36453
36479
|
}
|