@economic/taco 2.58.2-EC-64961.6 → 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 +12 -10
- package/dist/taco.cjs.map +1 -1
- package/dist/taco.js +12 -10
- package/dist/taco.js.map +1 -1
- package/package.json +2 -2
package/dist/taco.js
CHANGED
@@ -33122,16 +33122,18 @@ function createNumberDataType(align, defaultOptions2) {
|
|
33122
33122
|
numberFormatOptions.currency = dataTypeOptions.currency;
|
33123
33123
|
numberFormatOptions.currencyDisplay = "code";
|
33124
33124
|
}
|
33125
|
-
|
33126
|
-
Number(value)
|
33127
|
-
);
|
33125
|
+
let localisedValue = new Intl.NumberFormat((_a = options == null ? void 0 : options.localization) == null ? void 0 : _a.locale, numberFormatOptions).format(Number(value));
|
33128
33126
|
if (!numberFormatOptions.useGrouping) {
|
33129
33127
|
return localisedValue;
|
33130
33128
|
}
|
33131
|
-
|
33129
|
+
let localisedValueWithoutThousandsSeperator = new Intl.NumberFormat((_b = options == null ? void 0 : options.localization) == null ? void 0 : _b.locale, {
|
33132
33130
|
...numberFormatOptions,
|
33133
33131
|
useGrouping: false
|
33134
33132
|
}).format(Number(value));
|
33133
|
+
if (numberFormatOptions.style === "percent" || numberFormatOptions.style === "currency") {
|
33134
|
+
localisedValue = localisedValue.replace(/\u00A0/g, " ");
|
33135
|
+
localisedValueWithoutThousandsSeperator = localisedValueWithoutThousandsSeperator.replace(/\u00A0/g, " ");
|
33136
|
+
}
|
33135
33137
|
return [localisedValue, localisedValueWithoutThousandsSeperator];
|
33136
33138
|
}
|
33137
33139
|
};
|
@@ -33495,8 +33497,8 @@ function processChildren(child, columns, defaultSizing, defaultSorting, defaultV
|
|
33495
33497
|
);
|
33496
33498
|
} else if (React__default.isValidElement(child) && (child.props.accessor || child.props.id)) {
|
33497
33499
|
const {
|
33498
|
-
|
33499
|
-
|
33500
|
+
id: untypedId,
|
33501
|
+
accessor: accessorKey,
|
33500
33502
|
// renderers
|
33501
33503
|
renderer: renderer2,
|
33502
33504
|
aggregate,
|
@@ -33521,6 +33523,7 @@ function processChildren(child, columns, defaultSizing, defaultSorting, defaultV
|
|
33521
33523
|
sortFn,
|
33522
33524
|
...meta
|
33523
33525
|
} = child.props;
|
33526
|
+
const id2 = untypedId ?? accessorKey;
|
33524
33527
|
const dataTypeProperties = getDataTypeProperties(child.props.dataType);
|
33525
33528
|
if (defaultHidden && enableHiding) {
|
33526
33529
|
defaultVisibility[id2] = false;
|
@@ -33537,10 +33540,9 @@ function processChildren(child, columns, defaultSizing, defaultSorting, defaultV
|
|
33537
33540
|
}
|
33538
33541
|
const column = {
|
33539
33542
|
id: id2,
|
33540
|
-
accessorKey
|
33541
|
-
//
|
33542
|
-
|
33543
|
-
accessorFn: accessor ? (row) => get(row, accessor) : void 0,
|
33543
|
+
accessorKey,
|
33544
|
+
// dot notated accessors will throw if they return null or undefined, so we have to add an accessorFn to avoid that
|
33545
|
+
accessorFn: accessorKey && String(accessorKey).includes(".") ? (row) => get(row, accessorKey) : void 0,
|
33544
33546
|
// The header can be either a string or a JSX.Element, but react-table expects it to be a string or a
|
33545
33547
|
// renderer function, so `() => header` ensures compatibility when header is a JSX.Element.
|
33546
33548
|
// If we just pass `() => header`, then we will loose truncation for string headers.
|