@economic/taco 2.58.2-EC-64961.7 → 2.58.2-EC-64961.8
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 +159 -157
- package/dist/taco.cjs.map +1 -1
- package/dist/taco.js +159 -157
- package/dist/taco.js.map +1 -1
- package/package.json +2 -2
package/dist/taco.cjs
CHANGED
@@ -32319,163 +32319,6 @@ function useReactTable(options) {
|
|
32319
32319
|
}));
|
32320
32320
|
return tableRef.current;
|
32321
32321
|
}
|
32322
|
-
var TableFilterComparator = /* @__PURE__ */ ((TableFilterComparator2) => {
|
32323
|
-
TableFilterComparator2[TableFilterComparator2["Contains"] = 0] = "Contains";
|
32324
|
-
TableFilterComparator2[TableFilterComparator2["DoesNotContain"] = 1] = "DoesNotContain";
|
32325
|
-
TableFilterComparator2[TableFilterComparator2["IsEqualTo"] = 2] = "IsEqualTo";
|
32326
|
-
TableFilterComparator2[TableFilterComparator2["IsNotEqualTo"] = 3] = "IsNotEqualTo";
|
32327
|
-
TableFilterComparator2[TableFilterComparator2["IsGreaterThan"] = 4] = "IsGreaterThan";
|
32328
|
-
TableFilterComparator2[TableFilterComparator2["IsLessThan"] = 5] = "IsLessThan";
|
32329
|
-
TableFilterComparator2[TableFilterComparator2["IsBetween"] = 6] = "IsBetween";
|
32330
|
-
TableFilterComparator2[TableFilterComparator2["IsEmpty"] = 7] = "IsEmpty";
|
32331
|
-
TableFilterComparator2[TableFilterComparator2["IsNotEmpty"] = 8] = "IsNotEmpty";
|
32332
|
-
TableFilterComparator2[TableFilterComparator2["IsLessThanOrEqualTo"] = 9] = "IsLessThanOrEqualTo";
|
32333
|
-
TableFilterComparator2[TableFilterComparator2["IsGreaterThanOrEqualTo"] = 10] = "IsGreaterThanOrEqualTo";
|
32334
|
-
TableFilterComparator2[TableFilterComparator2["HasAnyOf"] = 11] = "HasAnyOf";
|
32335
|
-
TableFilterComparator2[TableFilterComparator2["HasAllOf"] = 12] = "HasAllOf";
|
32336
|
-
TableFilterComparator2[TableFilterComparator2["HasNoneOf"] = 13] = "HasNoneOf";
|
32337
|
-
TableFilterComparator2[TableFilterComparator2["IsOneOf"] = 14] = "IsOneOf";
|
32338
|
-
TableFilterComparator2[TableFilterComparator2["IsNoneOf"] = 15] = "IsNoneOf";
|
32339
|
-
return TableFilterComparator2;
|
32340
|
-
})(TableFilterComparator || {});
|
32341
|
-
const dataTypes = {
|
32342
|
-
auto: {
|
32343
|
-
sortingFn: "auto",
|
32344
|
-
filterComparators: [
|
32345
|
-
TableFilterComparator.Contains,
|
32346
|
-
TableFilterComparator.DoesNotContain,
|
32347
|
-
TableFilterComparator.IsEqualTo,
|
32348
|
-
TableFilterComparator.IsNotEqualTo,
|
32349
|
-
TableFilterComparator.IsEmpty,
|
32350
|
-
TableFilterComparator.IsNotEmpty
|
32351
|
-
]
|
32352
|
-
},
|
32353
|
-
// base
|
32354
|
-
text: {
|
32355
|
-
sortingFn: "alphanumeric",
|
32356
|
-
filterComparators: [
|
32357
|
-
TableFilterComparator.Contains,
|
32358
|
-
TableFilterComparator.DoesNotContain,
|
32359
|
-
TableFilterComparator.IsEqualTo,
|
32360
|
-
TableFilterComparator.IsNotEqualTo,
|
32361
|
-
TableFilterComparator.IsEmpty,
|
32362
|
-
TableFilterComparator.IsNotEmpty
|
32363
|
-
]
|
32364
|
-
},
|
32365
|
-
boolean: {
|
32366
|
-
sortingFn: "basic",
|
32367
|
-
filterComparators: [TableFilterComparator.IsEqualTo, TableFilterComparator.IsNotEqualTo]
|
32368
|
-
},
|
32369
|
-
// dates
|
32370
|
-
date: createDatetimeDataType({
|
32371
|
-
day: "2-digit",
|
32372
|
-
month: "2-digit",
|
32373
|
-
year: "2-digit"
|
32374
|
-
}),
|
32375
|
-
time: createDatetimeDataType({
|
32376
|
-
hour: "2-digit",
|
32377
|
-
minute: "2-digit"
|
32378
|
-
}),
|
32379
|
-
datetime: createDatetimeDataType({
|
32380
|
-
day: "2-digit",
|
32381
|
-
month: "2-digit",
|
32382
|
-
year: "2-digit",
|
32383
|
-
hour: "2-digit",
|
32384
|
-
minute: "2-digit"
|
32385
|
-
}),
|
32386
|
-
// numbers
|
32387
|
-
number: createNumberDataType("left"),
|
32388
|
-
amount: createNumberDataType("right", { decimals: 2, useGrouping: true }),
|
32389
|
-
percentage: createNumberDataType("right", { useGrouping: true, percent: true })
|
32390
|
-
};
|
32391
|
-
function createDatetimeDataType(defaultOptions2) {
|
32392
|
-
return {
|
32393
|
-
sortingFn: "datetime",
|
32394
|
-
filterComparators: [
|
32395
|
-
TableFilterComparator.IsEqualTo,
|
32396
|
-
TableFilterComparator.IsNotEqualTo,
|
32397
|
-
TableFilterComparator.IsGreaterThan,
|
32398
|
-
TableFilterComparator.IsLessThan,
|
32399
|
-
TableFilterComparator.IsGreaterThanOrEqualTo,
|
32400
|
-
TableFilterComparator.IsLessThanOrEqualTo,
|
32401
|
-
TableFilterComparator.IsBetween,
|
32402
|
-
TableFilterComparator.IsEmpty,
|
32403
|
-
TableFilterComparator.IsNotEmpty
|
32404
|
-
],
|
32405
|
-
getDisplayValue: (value, row, options) => {
|
32406
|
-
var _a;
|
32407
|
-
if (value === void 0) {
|
32408
|
-
return "";
|
32409
|
-
}
|
32410
|
-
return new Intl.DateTimeFormat((_a = options == null ? void 0 : options.localization) == null ? void 0 : _a.locale, defaultOptions2).format(
|
32411
|
-
typeof value === "string" ? Date.parse(value) : value
|
32412
|
-
);
|
32413
|
-
}
|
32414
|
-
};
|
32415
|
-
}
|
32416
|
-
function createNumberDataType(align, defaultOptions2) {
|
32417
|
-
return {
|
32418
|
-
align,
|
32419
|
-
sortingFn: "basic",
|
32420
|
-
filterComparators: [
|
32421
|
-
TableFilterComparator.IsEqualTo,
|
32422
|
-
TableFilterComparator.IsNotEqualTo,
|
32423
|
-
TableFilterComparator.IsGreaterThan,
|
32424
|
-
TableFilterComparator.IsLessThan,
|
32425
|
-
TableFilterComparator.IsGreaterThanOrEqualTo,
|
32426
|
-
TableFilterComparator.IsLessThanOrEqualTo,
|
32427
|
-
TableFilterComparator.IsBetween,
|
32428
|
-
TableFilterComparator.IsEmpty,
|
32429
|
-
TableFilterComparator.IsNotEmpty
|
32430
|
-
],
|
32431
|
-
getDisplayValue: (value, row, options) => {
|
32432
|
-
var _a, _b;
|
32433
|
-
if (value === void 0) {
|
32434
|
-
return "";
|
32435
|
-
}
|
32436
|
-
const dataTypeOptions = typeof (options == null ? void 0 : options.dataTypeOptions) === "function" ? options == null ? void 0 : options.dataTypeOptions(row) : options == null ? void 0 : options.dataTypeOptions;
|
32437
|
-
const numberFormatOptions = {
|
32438
|
-
// format
|
32439
|
-
useGrouping: (dataTypeOptions == null ? void 0 : dataTypeOptions.useGrouping) ?? (defaultOptions2 == null ? void 0 : defaultOptions2.useGrouping) ?? false,
|
32440
|
-
// decimals
|
32441
|
-
minimumFractionDigits: (dataTypeOptions == null ? void 0 : dataTypeOptions.decimals) ?? (defaultOptions2 == null ? void 0 : defaultOptions2.decimals),
|
32442
|
-
maximumFractionDigits: (dataTypeOptions == null ? void 0 : dataTypeOptions.decimals) ?? (defaultOptions2 == null ? void 0 : defaultOptions2.decimals)
|
32443
|
-
};
|
32444
|
-
if (defaultOptions2 == null ? void 0 : defaultOptions2.percent) {
|
32445
|
-
numberFormatOptions.style = "percent";
|
32446
|
-
} else if (dataTypeOptions == null ? void 0 : dataTypeOptions.currency) {
|
32447
|
-
numberFormatOptions.style = "currency";
|
32448
|
-
numberFormatOptions.currency = dataTypeOptions.currency;
|
32449
|
-
numberFormatOptions.currencyDisplay = "code";
|
32450
|
-
}
|
32451
|
-
let localisedValue = new Intl.NumberFormat((_a = options == null ? void 0 : options.localization) == null ? void 0 : _a.locale, numberFormatOptions).format(Number(value));
|
32452
|
-
if (!numberFormatOptions.useGrouping) {
|
32453
|
-
return localisedValue;
|
32454
|
-
}
|
32455
|
-
let localisedValueWithoutThousandsSeperator = new Intl.NumberFormat((_b = options == null ? void 0 : options.localization) == null ? void 0 : _b.locale, {
|
32456
|
-
...numberFormatOptions,
|
32457
|
-
useGrouping: false
|
32458
|
-
}).format(Number(value));
|
32459
|
-
if (numberFormatOptions.style === "percent" || numberFormatOptions.style === "currency") {
|
32460
|
-
localisedValue = localisedValue.replace(/\u00A0/g, " ");
|
32461
|
-
localisedValueWithoutThousandsSeperator = localisedValueWithoutThousandsSeperator.replace(/\u00A0/g, " ");
|
32462
|
-
}
|
32463
|
-
return [localisedValue, localisedValueWithoutThousandsSeperator];
|
32464
|
-
}
|
32465
|
-
};
|
32466
|
-
}
|
32467
|
-
function getDataTypeProperties(dataType) {
|
32468
|
-
return dataTypes[dataType ?? "text"] ?? dataTypes.text;
|
32469
|
-
}
|
32470
|
-
function getSortingFn(dataType, customFnOrBuiltIn) {
|
32471
|
-
if (typeof customFnOrBuiltIn === "function") {
|
32472
|
-
return (rowA, rowB, columnId) => customFnOrBuiltIn(rowA.original, rowB.original, columnId);
|
32473
|
-
}
|
32474
|
-
if (customFnOrBuiltIn) {
|
32475
|
-
return customFnOrBuiltIn;
|
32476
|
-
}
|
32477
|
-
return getDataTypeProperties(dataType).sortingFn;
|
32478
|
-
}
|
32479
32322
|
var isArray_1;
|
32480
32323
|
var hasRequiredIsArray;
|
32481
32324
|
function requireIsArray() {
|
@@ -33168,6 +33011,163 @@ function requireGet() {
|
|
33168
33011
|
}
|
33169
33012
|
var getExports = requireGet();
|
33170
33013
|
const get = /* @__PURE__ */ getDefaultExportFromCjs(getExports);
|
33014
|
+
var TableFilterComparator = /* @__PURE__ */ ((TableFilterComparator2) => {
|
33015
|
+
TableFilterComparator2[TableFilterComparator2["Contains"] = 0] = "Contains";
|
33016
|
+
TableFilterComparator2[TableFilterComparator2["DoesNotContain"] = 1] = "DoesNotContain";
|
33017
|
+
TableFilterComparator2[TableFilterComparator2["IsEqualTo"] = 2] = "IsEqualTo";
|
33018
|
+
TableFilterComparator2[TableFilterComparator2["IsNotEqualTo"] = 3] = "IsNotEqualTo";
|
33019
|
+
TableFilterComparator2[TableFilterComparator2["IsGreaterThan"] = 4] = "IsGreaterThan";
|
33020
|
+
TableFilterComparator2[TableFilterComparator2["IsLessThan"] = 5] = "IsLessThan";
|
33021
|
+
TableFilterComparator2[TableFilterComparator2["IsBetween"] = 6] = "IsBetween";
|
33022
|
+
TableFilterComparator2[TableFilterComparator2["IsEmpty"] = 7] = "IsEmpty";
|
33023
|
+
TableFilterComparator2[TableFilterComparator2["IsNotEmpty"] = 8] = "IsNotEmpty";
|
33024
|
+
TableFilterComparator2[TableFilterComparator2["IsLessThanOrEqualTo"] = 9] = "IsLessThanOrEqualTo";
|
33025
|
+
TableFilterComparator2[TableFilterComparator2["IsGreaterThanOrEqualTo"] = 10] = "IsGreaterThanOrEqualTo";
|
33026
|
+
TableFilterComparator2[TableFilterComparator2["HasAnyOf"] = 11] = "HasAnyOf";
|
33027
|
+
TableFilterComparator2[TableFilterComparator2["HasAllOf"] = 12] = "HasAllOf";
|
33028
|
+
TableFilterComparator2[TableFilterComparator2["HasNoneOf"] = 13] = "HasNoneOf";
|
33029
|
+
TableFilterComparator2[TableFilterComparator2["IsOneOf"] = 14] = "IsOneOf";
|
33030
|
+
TableFilterComparator2[TableFilterComparator2["IsNoneOf"] = 15] = "IsNoneOf";
|
33031
|
+
return TableFilterComparator2;
|
33032
|
+
})(TableFilterComparator || {});
|
33033
|
+
const dataTypes = {
|
33034
|
+
auto: {
|
33035
|
+
sortingFn: "auto",
|
33036
|
+
filterComparators: [
|
33037
|
+
TableFilterComparator.Contains,
|
33038
|
+
TableFilterComparator.DoesNotContain,
|
33039
|
+
TableFilterComparator.IsEqualTo,
|
33040
|
+
TableFilterComparator.IsNotEqualTo,
|
33041
|
+
TableFilterComparator.IsEmpty,
|
33042
|
+
TableFilterComparator.IsNotEmpty
|
33043
|
+
]
|
33044
|
+
},
|
33045
|
+
// base
|
33046
|
+
text: {
|
33047
|
+
sortingFn: "alphanumeric",
|
33048
|
+
filterComparators: [
|
33049
|
+
TableFilterComparator.Contains,
|
33050
|
+
TableFilterComparator.DoesNotContain,
|
33051
|
+
TableFilterComparator.IsEqualTo,
|
33052
|
+
TableFilterComparator.IsNotEqualTo,
|
33053
|
+
TableFilterComparator.IsEmpty,
|
33054
|
+
TableFilterComparator.IsNotEmpty
|
33055
|
+
]
|
33056
|
+
},
|
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 {
|
33085
|
+
sortingFn: "datetime",
|
33086
|
+
filterComparators: [
|
33087
|
+
TableFilterComparator.IsEqualTo,
|
33088
|
+
TableFilterComparator.IsNotEqualTo,
|
33089
|
+
TableFilterComparator.IsGreaterThan,
|
33090
|
+
TableFilterComparator.IsLessThan,
|
33091
|
+
TableFilterComparator.IsGreaterThanOrEqualTo,
|
33092
|
+
TableFilterComparator.IsLessThanOrEqualTo,
|
33093
|
+
TableFilterComparator.IsBetween,
|
33094
|
+
TableFilterComparator.IsEmpty,
|
33095
|
+
TableFilterComparator.IsNotEmpty
|
33096
|
+
],
|
33097
|
+
getDisplayValue: (value, row, options) => {
|
33098
|
+
var _a;
|
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
|
+
);
|
33105
|
+
}
|
33106
|
+
};
|
33107
|
+
}
|
33108
|
+
function createNumberDataType(align, defaultOptions2) {
|
33109
|
+
return {
|
33110
|
+
align,
|
33111
|
+
sortingFn: "basic",
|
33112
|
+
filterComparators: [
|
33113
|
+
TableFilterComparator.IsEqualTo,
|
33114
|
+
TableFilterComparator.IsNotEqualTo,
|
33115
|
+
TableFilterComparator.IsGreaterThan,
|
33116
|
+
TableFilterComparator.IsLessThan,
|
33117
|
+
TableFilterComparator.IsGreaterThanOrEqualTo,
|
33118
|
+
TableFilterComparator.IsLessThanOrEqualTo,
|
33119
|
+
TableFilterComparator.IsBetween,
|
33120
|
+
TableFilterComparator.IsEmpty,
|
33121
|
+
TableFilterComparator.IsNotEmpty
|
33122
|
+
],
|
33123
|
+
getDisplayValue: (value, row, options) => {
|
33124
|
+
var _a, _b;
|
33125
|
+
if (value === void 0) {
|
33126
|
+
return "";
|
33127
|
+
}
|
33128
|
+
const dataTypeOptions = typeof (options == null ? void 0 : options.dataTypeOptions) === "function" ? options == null ? void 0 : options.dataTypeOptions(row) : options == null ? void 0 : options.dataTypeOptions;
|
33129
|
+
const numberFormatOptions = {
|
33130
|
+
// format
|
33131
|
+
useGrouping: (dataTypeOptions == null ? void 0 : dataTypeOptions.useGrouping) ?? (defaultOptions2 == null ? void 0 : defaultOptions2.useGrouping) ?? false,
|
33132
|
+
// decimals
|
33133
|
+
minimumFractionDigits: (dataTypeOptions == null ? void 0 : dataTypeOptions.decimals) ?? (defaultOptions2 == null ? void 0 : defaultOptions2.decimals),
|
33134
|
+
maximumFractionDigits: (dataTypeOptions == null ? void 0 : dataTypeOptions.decimals) ?? (defaultOptions2 == null ? void 0 : defaultOptions2.decimals)
|
33135
|
+
};
|
33136
|
+
if (defaultOptions2 == null ? void 0 : defaultOptions2.percent) {
|
33137
|
+
numberFormatOptions.style = "percent";
|
33138
|
+
} else if (dataTypeOptions == null ? void 0 : dataTypeOptions.currency) {
|
33139
|
+
numberFormatOptions.style = "currency";
|
33140
|
+
numberFormatOptions.currency = dataTypeOptions.currency;
|
33141
|
+
numberFormatOptions.currencyDisplay = "code";
|
33142
|
+
}
|
33143
|
+
let localisedValue = new Intl.NumberFormat((_a = options == null ? void 0 : options.localization) == null ? void 0 : _a.locale, numberFormatOptions).format(Number(value));
|
33144
|
+
if (!numberFormatOptions.useGrouping) {
|
33145
|
+
return localisedValue;
|
33146
|
+
}
|
33147
|
+
let localisedValueWithoutThousandsSeperator = new Intl.NumberFormat((_b = options == null ? void 0 : options.localization) == null ? void 0 : _b.locale, {
|
33148
|
+
...numberFormatOptions,
|
33149
|
+
useGrouping: false
|
33150
|
+
}).format(Number(value));
|
33151
|
+
if (numberFormatOptions.style === "percent" || numberFormatOptions.style === "currency") {
|
33152
|
+
localisedValue = localisedValue.replace(/\u00A0/g, " ");
|
33153
|
+
localisedValueWithoutThousandsSeperator = localisedValueWithoutThousandsSeperator.replace(/\u00A0/g, " ");
|
33154
|
+
}
|
33155
|
+
return [localisedValue, localisedValueWithoutThousandsSeperator];
|
33156
|
+
}
|
33157
|
+
};
|
33158
|
+
}
|
33159
|
+
function getDataTypeProperties(dataType) {
|
33160
|
+
return dataTypes[dataType ?? "text"] ?? dataTypes.text;
|
33161
|
+
}
|
33162
|
+
function getSortingFn(dataType, customFnOrBuiltIn) {
|
33163
|
+
if (typeof customFnOrBuiltIn === "function") {
|
33164
|
+
return (rowA, rowB, columnId) => customFnOrBuiltIn(rowA.original, rowB.original, columnId);
|
33165
|
+
}
|
33166
|
+
if (customFnOrBuiltIn) {
|
33167
|
+
return customFnOrBuiltIn;
|
33168
|
+
}
|
33169
|
+
return getDataTypeProperties(dataType).sortingFn;
|
33170
|
+
}
|
33171
33171
|
const toLowerCase = (value) => String(value ?? "").toLocaleLowerCase();
|
33172
33172
|
const isWeakContains = (left, right) => toLowerCase(left).includes(toLowerCase(right));
|
33173
33173
|
const isWeakEqual = (left, right) => toLowerCase(left) === toLowerCase(right);
|
@@ -33559,6 +33559,8 @@ function processChildren(child, columns, defaultSizing, defaultSorting, defaultV
|
|
33559
33559
|
const column = {
|
33560
33560
|
id: id2,
|
33561
33561
|
accessorKey,
|
33562
|
+
// dot notated accessors will throw if they return null or undefined, so we have to add an accessorFn to avoid that
|
33563
|
+
accessorFn: accessorKey && String(accessorKey).includes(".") ? (row) => get(row, accessorKey) : void 0,
|
33562
33564
|
// The header can be either a string or a JSX.Element, but react-table expects it to be a string or a
|
33563
33565
|
// renderer function, so `() => header` ensures compatibility when header is a JSX.Element.
|
33564
33566
|
// If we just pass `() => header`, then we will loose truncation for string headers.
|