@economic/taco 2.58.2-EC-64961.1 → 2.58.2-EC-64961.3
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 +40 -13
- package/dist/taco.cjs.map +1 -1
- package/dist/taco.d.ts +5 -2
- package/dist/taco.js +40 -13
- 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,19 +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
|
-
};
|
33106
|
+
};
|
33107
|
+
}
|
33083
33108
|
function createNumberDataType(align, defaultOptions2) {
|
33084
33109
|
return {
|
33085
33110
|
align,
|
@@ -33108,7 +33133,9 @@ function createNumberDataType(align, defaultOptions2) {
|
|
33108
33133
|
minimumFractionDigits: (dataTypeOptions == null ? void 0 : dataTypeOptions.decimals) ?? (defaultOptions2 == null ? void 0 : defaultOptions2.decimals),
|
33109
33134
|
maximumFractionDigits: (dataTypeOptions == null ? void 0 : dataTypeOptions.decimals) ?? (defaultOptions2 == null ? void 0 : defaultOptions2.decimals)
|
33110
33135
|
};
|
33111
|
-
if (
|
33136
|
+
if (defaultOptions2 == null ? void 0 : defaultOptions2.percent) {
|
33137
|
+
numberFormatOptions.style = "percent";
|
33138
|
+
} else if (dataTypeOptions == null ? void 0 : dataTypeOptions.currency) {
|
33112
33139
|
numberFormatOptions.style = "currency";
|
33113
33140
|
numberFormatOptions.currency = dataTypeOptions.currency;
|
33114
33141
|
numberFormatOptions.currencyDisplay = "code";
|