@mcurros2/microm 1.1.116-0 → 1.1.117-0
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/index.d.ts.map +1 -1
- package/dist/index.js +8 -8
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -47459,9 +47459,10 @@ $parcel$export(module.exports, "moneyParser", function () { return $e6ae5c737c0a
|
|
|
47459
47459
|
function $e6ae5c737c0a29bb$export$78a4376af2fcf213(value, currencySymbol) {
|
|
47460
47460
|
const numericValue = parseFloat(value.replace(/[^\d.-]/g, ""));
|
|
47461
47461
|
if (Number.isNaN(numericValue)) return currencySymbol;
|
|
47462
|
-
|
|
47463
|
-
if (numericValue >=
|
|
47464
|
-
return `${
|
|
47462
|
+
const currency = currencySymbol ? `${currencySymbol} ` : "";
|
|
47463
|
+
if (numericValue >= 1000000) return `${currency}${numericValue / 1000000} M`;
|
|
47464
|
+
if (numericValue >= 1000) return `${currency}${numericValue / 1000} K`;
|
|
47465
|
+
return `${currency}${numericValue.toLocaleString()}`;
|
|
47465
47466
|
}
|
|
47466
47467
|
function $e6ae5c737c0a29bb$export$b287540975433c0(value) {
|
|
47467
47468
|
if (value.toUpperCase().endsWith("K")) return (parseFloat(value.replace(/[^\d.-]/g, "")) * 1000).toString();
|
|
@@ -47506,12 +47507,10 @@ function $62b3483ba35d005f$export$35626b90bc912862(props) {
|
|
|
47506
47507
|
"step"
|
|
47507
47508
|
]);
|
|
47508
47509
|
const formatter = (0, $b4te3$react.useCallback)((value)=>{
|
|
47509
|
-
const formattedValue = (0, $jNUqj.moneyFormatter)(value,
|
|
47510
|
+
const formattedValue = (0, $jNUqj.moneyFormatter)(value, "");
|
|
47510
47511
|
column.valueDescription = formattedValue;
|
|
47511
47512
|
return formattedValue;
|
|
47512
|
-
}, [
|
|
47513
|
-
currencySymbol
|
|
47514
|
-
]);
|
|
47513
|
+
}, []);
|
|
47515
47514
|
const variable_step = (0, $b4te3$react.useMemo)(()=>{
|
|
47516
47515
|
const value = entityForm.form.values[column.name];
|
|
47517
47516
|
return value >= 1000000 ? millionsStep : value >= 1000 ? thousandsStep : step || 1;
|
|
@@ -47529,7 +47528,8 @@ function $62b3483ba35d005f$export$35626b90bc912862(props) {
|
|
|
47529
47528
|
formatter: formatter,
|
|
47530
47529
|
step: variable_step,
|
|
47531
47530
|
stepHoldDelay: 500,
|
|
47532
|
-
stepHoldInterval: (t)=>Math.max(1000 / t ** 2, 25)
|
|
47531
|
+
stepHoldInterval: (t)=>Math.max(1000 / t ** 2, 25),
|
|
47532
|
+
icon: currencySymbol
|
|
47533
47533
|
}));
|
|
47534
47534
|
}
|
|
47535
47535
|
|