@dmsi/wedgekit-react 0.0.536 → 0.0.538
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/{chunk-UV53RKAQ.js → chunk-BKBJOF4J.js} +1 -1
- package/dist/{chunk-U6W5E3XW.js → chunk-I5BV7UPG.js} +1 -1
- package/dist/{chunk-PMNNRB6S.js → chunk-NWTVBVBC.js} +44 -2
- package/dist/{chunk-UFGH5V7K.js → chunk-RB7F6QWD.js} +4 -4
- package/dist/{chunk-YHFOOBE2.js → chunk-Y3EFHKAG.js} +1 -1
- package/dist/components/CalendarRange.cjs +44 -2
- package/dist/components/CalendarRange.js +5 -5
- package/dist/components/DataGrid/ColumnSelectorHeaderCell/ColumnSelectorMenuOption.cjs +44 -2
- package/dist/components/DataGrid/ColumnSelectorHeaderCell/ColumnSelectorMenuOption.js +5 -5
- package/dist/components/DataGrid/ColumnSelectorHeaderCell/index.cjs +44 -2
- package/dist/components/DataGrid/ColumnSelectorHeaderCell/index.js +5 -5
- package/dist/components/DataGrid/PinnedColumns.cjs +44 -2
- package/dist/components/DataGrid/PinnedColumns.js +5 -5
- package/dist/components/DataGrid/TableBody/LoadingCell.cjs +44 -2
- package/dist/components/DataGrid/TableBody/LoadingCell.js +5 -5
- package/dist/components/DataGrid/TableBody/TableBodyRow.cjs +44 -2
- package/dist/components/DataGrid/TableBody/TableBodyRow.js +5 -5
- package/dist/components/DataGrid/TableBody/index.cjs +44 -2
- package/dist/components/DataGrid/TableBody/index.js +5 -5
- package/dist/components/DataGrid/index.cjs +44 -2
- package/dist/components/DataGrid/index.js +5 -5
- package/dist/components/DataGrid/utils.cjs +44 -2
- package/dist/components/DataGrid/utils.js +5 -5
- package/dist/components/DataGridCell.cjs +44 -2
- package/dist/components/DataGridCell.js +3 -3
- package/dist/components/DateInput.cjs +44 -2
- package/dist/components/DateInput.js +5 -5
- package/dist/components/DateRangeInput.cjs +44 -2
- package/dist/components/DateRangeInput.js +5 -5
- package/dist/components/FilterGroup.cjs +44 -2
- package/dist/components/FilterGroup.js +2 -2
- package/dist/components/Input.cjs +44 -2
- package/dist/components/Input.js +1 -1
- package/dist/components/MobileDataGrid/ColumnSelector/index.cjs +44 -2
- package/dist/components/MobileDataGrid/ColumnSelector/index.js +5 -5
- package/dist/components/MobileDataGrid/MobileDataGridHeader.cjs +44 -2
- package/dist/components/MobileDataGrid/MobileDataGridHeader.js +5 -5
- package/dist/components/MobileDataGrid/index.cjs +44 -2
- package/dist/components/MobileDataGrid/index.js +5 -5
- package/dist/components/Password.cjs +44 -2
- package/dist/components/Password.js +1 -1
- package/dist/components/Search.cjs +44 -2
- package/dist/components/Search.js +2 -2
- package/dist/components/Select.cjs +44 -2
- package/dist/components/Select.js +2 -2
- package/dist/components/Stepper.cjs +44 -2
- package/dist/components/Stepper.js +1 -1
- package/dist/components/Time.cjs +44 -2
- package/dist/components/Time.js +1 -1
- package/dist/components/index.cjs +44 -2
- package/dist/components/index.js +5 -5
- package/package.json +1 -1
- package/src/components/Input.tsx +62 -4
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
LoadingCell
|
|
3
|
-
} from "../../../chunk-
|
|
3
|
+
} from "../../../chunk-RB7F6QWD.js";
|
|
4
4
|
import "../../../chunk-M7INAUAJ.js";
|
|
5
5
|
import "../../../chunk-ZIPJMN2E.js";
|
|
6
6
|
import "../../../chunk-FJFZBIRG.js";
|
|
@@ -23,7 +23,7 @@ import "../../../chunk-L3BXRDLP.js";
|
|
|
23
23
|
import "../../../chunk-34VEVX5H.js";
|
|
24
24
|
import "../../../chunk-LB7UT6F3.js";
|
|
25
25
|
import "../../../chunk-MDB26F6T.js";
|
|
26
|
-
import "../../../chunk-
|
|
26
|
+
import "../../../chunk-I5BV7UPG.js";
|
|
27
27
|
import "../../../chunk-JADOJNBI.js";
|
|
28
28
|
import "../../../chunk-4RJKB7LC.js";
|
|
29
29
|
import "../../../chunk-WVVEOCEH.js";
|
|
@@ -33,12 +33,12 @@ import "../../../chunk-AKJUBFJK.js";
|
|
|
33
33
|
import "../../../chunk-Z2QAJY5I.js";
|
|
34
34
|
import "../../../chunk-BWPNXY7T.js";
|
|
35
35
|
import "../../../chunk-QVWYTQKL.js";
|
|
36
|
-
import "../../../chunk-
|
|
36
|
+
import "../../../chunk-Y3EFHKAG.js";
|
|
37
37
|
import "../../../chunk-HGLOO52X.js";
|
|
38
38
|
import "../../../chunk-MPYAHORM.js";
|
|
39
39
|
import "../../../chunk-EZ4KZYKG.js";
|
|
40
|
-
import "../../../chunk-
|
|
41
|
-
import "../../../chunk-
|
|
40
|
+
import "../../../chunk-BKBJOF4J.js";
|
|
41
|
+
import "../../../chunk-NWTVBVBC.js";
|
|
42
42
|
import "../../../chunk-HXGJVYGQ.js";
|
|
43
43
|
import "../../../chunk-WVUIIBRR.js";
|
|
44
44
|
import "../../../chunk-75USUR3I.js";
|
|
@@ -1868,7 +1868,7 @@ var Input = (_a) => {
|
|
|
1868
1868
|
const formatted = formatDecimalValue(stringValue, decimals != null ? decimals : 2);
|
|
1869
1869
|
setInternalValue(formatted);
|
|
1870
1870
|
setDisplayValue(formatCurrencyDisplay(formatted));
|
|
1871
|
-
}, [
|
|
1871
|
+
}, []);
|
|
1872
1872
|
const getInputProps = () => {
|
|
1873
1873
|
var _a2;
|
|
1874
1874
|
const baseProps = __spreadProps(__spreadValues(__spreadProps(__spreadValues({}, props), {
|
|
@@ -1953,6 +1953,7 @@ var Input = (_a) => {
|
|
|
1953
1953
|
};
|
|
1954
1954
|
const handleChange = (e) => {
|
|
1955
1955
|
const rawValue = e.target.value;
|
|
1956
|
+
const maxNumber = props.max != null ? Number(String(props.max).replace(/,/g, "")) : void 0;
|
|
1956
1957
|
if (variant === "currency") {
|
|
1957
1958
|
const raw = rawValue.replace(/,/g, "");
|
|
1958
1959
|
if (raw === "") {
|
|
@@ -1971,9 +1972,25 @@ var Input = (_a) => {
|
|
|
1971
1972
|
const parts = raw.split(".");
|
|
1972
1973
|
const currentDecimals = decimals != null ? decimals : 2;
|
|
1973
1974
|
if (parts.length === 2 && parts[1].length > currentDecimals) return;
|
|
1975
|
+
const asNumber = Number(raw);
|
|
1976
|
+
if (!isNaN(asNumber) && maxNumber != null && asNumber > maxNumber) {
|
|
1977
|
+
const clamped = maxNumber;
|
|
1978
|
+
const formattedClamped = formatDecimalValue(
|
|
1979
|
+
clamped.toString(),
|
|
1980
|
+
currentDecimals
|
|
1981
|
+
);
|
|
1982
|
+
setInternalValue(formattedClamped);
|
|
1983
|
+
setDisplayValue(formatCurrencyDisplay(formattedClamped));
|
|
1984
|
+
if (onChange) {
|
|
1985
|
+
const syntheticEvent = __spreadProps(__spreadValues({}, e), {
|
|
1986
|
+
target: __spreadProps(__spreadValues({}, e.target), { value: clamped.toString() })
|
|
1987
|
+
});
|
|
1988
|
+
onChange(syntheticEvent);
|
|
1989
|
+
}
|
|
1990
|
+
return;
|
|
1991
|
+
}
|
|
1974
1992
|
setInternalValue(raw);
|
|
1975
1993
|
setDisplayValue(formatCurrencyDisplay(raw));
|
|
1976
|
-
const asNumber = Number(raw);
|
|
1977
1994
|
if (!isNaN(asNumber) && onChange) {
|
|
1978
1995
|
const syntheticEvent = __spreadProps(__spreadValues({}, e), {
|
|
1979
1996
|
target: __spreadProps(__spreadValues({}, e.target), { value: asNumber.toString() })
|
|
@@ -1982,6 +1999,31 @@ var Input = (_a) => {
|
|
|
1982
1999
|
}
|
|
1983
2000
|
return;
|
|
1984
2001
|
}
|
|
2002
|
+
if ((variant === "percentage" || variant === "uom") && e.target.type === "number") {
|
|
2003
|
+
const numeric = Number(rawValue);
|
|
2004
|
+
if (!isNaN(numeric) && maxNumber != null && numeric > maxNumber) {
|
|
2005
|
+
const clamped = maxNumber;
|
|
2006
|
+
const formattedClamped = formatDecimalValue(
|
|
2007
|
+
clamped.toString(),
|
|
2008
|
+
decimals != null ? decimals : 0
|
|
2009
|
+
);
|
|
2010
|
+
setInternalValue(formattedClamped);
|
|
2011
|
+
setDisplayValue(formattedClamped);
|
|
2012
|
+
if (typeof onChange === "function") {
|
|
2013
|
+
const syntheticEvent = __spreadProps(__spreadValues({}, e), {
|
|
2014
|
+
target: __spreadProps(__spreadValues({}, e.target), { value: clamped.toString() })
|
|
2015
|
+
});
|
|
2016
|
+
onChange(syntheticEvent);
|
|
2017
|
+
}
|
|
2018
|
+
return;
|
|
2019
|
+
}
|
|
2020
|
+
setInternalValue(rawValue);
|
|
2021
|
+
setDisplayValue(rawValue);
|
|
2022
|
+
if (typeof onChange === "function") {
|
|
2023
|
+
onChange(e);
|
|
2024
|
+
}
|
|
2025
|
+
return;
|
|
2026
|
+
}
|
|
1985
2027
|
setInternalValue(rawValue);
|
|
1986
2028
|
setDisplayValue(rawValue);
|
|
1987
2029
|
if (typeof onChange === "function") {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
TableBodyRow
|
|
3
|
-
} from "../../../chunk-
|
|
3
|
+
} from "../../../chunk-RB7F6QWD.js";
|
|
4
4
|
import "../../../chunk-M7INAUAJ.js";
|
|
5
5
|
import "../../../chunk-ZIPJMN2E.js";
|
|
6
6
|
import "../../../chunk-FJFZBIRG.js";
|
|
@@ -23,7 +23,7 @@ import "../../../chunk-L3BXRDLP.js";
|
|
|
23
23
|
import "../../../chunk-34VEVX5H.js";
|
|
24
24
|
import "../../../chunk-LB7UT6F3.js";
|
|
25
25
|
import "../../../chunk-MDB26F6T.js";
|
|
26
|
-
import "../../../chunk-
|
|
26
|
+
import "../../../chunk-I5BV7UPG.js";
|
|
27
27
|
import "../../../chunk-JADOJNBI.js";
|
|
28
28
|
import "../../../chunk-4RJKB7LC.js";
|
|
29
29
|
import "../../../chunk-WVVEOCEH.js";
|
|
@@ -33,12 +33,12 @@ import "../../../chunk-AKJUBFJK.js";
|
|
|
33
33
|
import "../../../chunk-Z2QAJY5I.js";
|
|
34
34
|
import "../../../chunk-BWPNXY7T.js";
|
|
35
35
|
import "../../../chunk-QVWYTQKL.js";
|
|
36
|
-
import "../../../chunk-
|
|
36
|
+
import "../../../chunk-Y3EFHKAG.js";
|
|
37
37
|
import "../../../chunk-HGLOO52X.js";
|
|
38
38
|
import "../../../chunk-MPYAHORM.js";
|
|
39
39
|
import "../../../chunk-EZ4KZYKG.js";
|
|
40
|
-
import "../../../chunk-
|
|
41
|
-
import "../../../chunk-
|
|
40
|
+
import "../../../chunk-BKBJOF4J.js";
|
|
41
|
+
import "../../../chunk-NWTVBVBC.js";
|
|
42
42
|
import "../../../chunk-HXGJVYGQ.js";
|
|
43
43
|
import "../../../chunk-WVUIIBRR.js";
|
|
44
44
|
import "../../../chunk-75USUR3I.js";
|
|
@@ -1866,7 +1866,7 @@ var Input = (_a) => {
|
|
|
1866
1866
|
const formatted = formatDecimalValue(stringValue, decimals != null ? decimals : 2);
|
|
1867
1867
|
setInternalValue(formatted);
|
|
1868
1868
|
setDisplayValue(formatCurrencyDisplay(formatted));
|
|
1869
|
-
}, [
|
|
1869
|
+
}, []);
|
|
1870
1870
|
const getInputProps = () => {
|
|
1871
1871
|
var _a2;
|
|
1872
1872
|
const baseProps = __spreadProps(__spreadValues(__spreadProps(__spreadValues({}, props), {
|
|
@@ -1951,6 +1951,7 @@ var Input = (_a) => {
|
|
|
1951
1951
|
};
|
|
1952
1952
|
const handleChange = (e) => {
|
|
1953
1953
|
const rawValue = e.target.value;
|
|
1954
|
+
const maxNumber = props.max != null ? Number(String(props.max).replace(/,/g, "")) : void 0;
|
|
1954
1955
|
if (variant === "currency") {
|
|
1955
1956
|
const raw = rawValue.replace(/,/g, "");
|
|
1956
1957
|
if (raw === "") {
|
|
@@ -1969,9 +1970,25 @@ var Input = (_a) => {
|
|
|
1969
1970
|
const parts = raw.split(".");
|
|
1970
1971
|
const currentDecimals = decimals != null ? decimals : 2;
|
|
1971
1972
|
if (parts.length === 2 && parts[1].length > currentDecimals) return;
|
|
1973
|
+
const asNumber = Number(raw);
|
|
1974
|
+
if (!isNaN(asNumber) && maxNumber != null && asNumber > maxNumber) {
|
|
1975
|
+
const clamped = maxNumber;
|
|
1976
|
+
const formattedClamped = formatDecimalValue(
|
|
1977
|
+
clamped.toString(),
|
|
1978
|
+
currentDecimals
|
|
1979
|
+
);
|
|
1980
|
+
setInternalValue(formattedClamped);
|
|
1981
|
+
setDisplayValue(formatCurrencyDisplay(formattedClamped));
|
|
1982
|
+
if (onChange) {
|
|
1983
|
+
const syntheticEvent = __spreadProps(__spreadValues({}, e), {
|
|
1984
|
+
target: __spreadProps(__spreadValues({}, e.target), { value: clamped.toString() })
|
|
1985
|
+
});
|
|
1986
|
+
onChange(syntheticEvent);
|
|
1987
|
+
}
|
|
1988
|
+
return;
|
|
1989
|
+
}
|
|
1972
1990
|
setInternalValue(raw);
|
|
1973
1991
|
setDisplayValue(formatCurrencyDisplay(raw));
|
|
1974
|
-
const asNumber = Number(raw);
|
|
1975
1992
|
if (!isNaN(asNumber) && onChange) {
|
|
1976
1993
|
const syntheticEvent = __spreadProps(__spreadValues({}, e), {
|
|
1977
1994
|
target: __spreadProps(__spreadValues({}, e.target), { value: asNumber.toString() })
|
|
@@ -1980,6 +1997,31 @@ var Input = (_a) => {
|
|
|
1980
1997
|
}
|
|
1981
1998
|
return;
|
|
1982
1999
|
}
|
|
2000
|
+
if ((variant === "percentage" || variant === "uom") && e.target.type === "number") {
|
|
2001
|
+
const numeric = Number(rawValue);
|
|
2002
|
+
if (!isNaN(numeric) && maxNumber != null && numeric > maxNumber) {
|
|
2003
|
+
const clamped = maxNumber;
|
|
2004
|
+
const formattedClamped = formatDecimalValue(
|
|
2005
|
+
clamped.toString(),
|
|
2006
|
+
decimals != null ? decimals : 0
|
|
2007
|
+
);
|
|
2008
|
+
setInternalValue(formattedClamped);
|
|
2009
|
+
setDisplayValue(formattedClamped);
|
|
2010
|
+
if (typeof onChange === "function") {
|
|
2011
|
+
const syntheticEvent = __spreadProps(__spreadValues({}, e), {
|
|
2012
|
+
target: __spreadProps(__spreadValues({}, e.target), { value: clamped.toString() })
|
|
2013
|
+
});
|
|
2014
|
+
onChange(syntheticEvent);
|
|
2015
|
+
}
|
|
2016
|
+
return;
|
|
2017
|
+
}
|
|
2018
|
+
setInternalValue(rawValue);
|
|
2019
|
+
setDisplayValue(rawValue);
|
|
2020
|
+
if (typeof onChange === "function") {
|
|
2021
|
+
onChange(e);
|
|
2022
|
+
}
|
|
2023
|
+
return;
|
|
2024
|
+
}
|
|
1983
2025
|
setInternalValue(rawValue);
|
|
1984
2026
|
setDisplayValue(rawValue);
|
|
1985
2027
|
if (typeof onChange === "function") {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
TableBody
|
|
3
|
-
} from "../../../chunk-
|
|
3
|
+
} from "../../../chunk-RB7F6QWD.js";
|
|
4
4
|
import "../../../chunk-M7INAUAJ.js";
|
|
5
5
|
import "../../../chunk-ZIPJMN2E.js";
|
|
6
6
|
import "../../../chunk-FJFZBIRG.js";
|
|
@@ -23,7 +23,7 @@ import "../../../chunk-L3BXRDLP.js";
|
|
|
23
23
|
import "../../../chunk-34VEVX5H.js";
|
|
24
24
|
import "../../../chunk-LB7UT6F3.js";
|
|
25
25
|
import "../../../chunk-MDB26F6T.js";
|
|
26
|
-
import "../../../chunk-
|
|
26
|
+
import "../../../chunk-I5BV7UPG.js";
|
|
27
27
|
import "../../../chunk-JADOJNBI.js";
|
|
28
28
|
import "../../../chunk-4RJKB7LC.js";
|
|
29
29
|
import "../../../chunk-WVVEOCEH.js";
|
|
@@ -33,12 +33,12 @@ import "../../../chunk-AKJUBFJK.js";
|
|
|
33
33
|
import "../../../chunk-Z2QAJY5I.js";
|
|
34
34
|
import "../../../chunk-BWPNXY7T.js";
|
|
35
35
|
import "../../../chunk-QVWYTQKL.js";
|
|
36
|
-
import "../../../chunk-
|
|
36
|
+
import "../../../chunk-Y3EFHKAG.js";
|
|
37
37
|
import "../../../chunk-HGLOO52X.js";
|
|
38
38
|
import "../../../chunk-MPYAHORM.js";
|
|
39
39
|
import "../../../chunk-EZ4KZYKG.js";
|
|
40
|
-
import "../../../chunk-
|
|
41
|
-
import "../../../chunk-
|
|
40
|
+
import "../../../chunk-BKBJOF4J.js";
|
|
41
|
+
import "../../../chunk-NWTVBVBC.js";
|
|
42
42
|
import "../../../chunk-HXGJVYGQ.js";
|
|
43
43
|
import "../../../chunk-WVUIIBRR.js";
|
|
44
44
|
import "../../../chunk-75USUR3I.js";
|
|
@@ -1867,7 +1867,7 @@ var Input = (_a) => {
|
|
|
1867
1867
|
const formatted = formatDecimalValue(stringValue, decimals != null ? decimals : 2);
|
|
1868
1868
|
setInternalValue(formatted);
|
|
1869
1869
|
setDisplayValue(formatCurrencyDisplay(formatted));
|
|
1870
|
-
}, [
|
|
1870
|
+
}, []);
|
|
1871
1871
|
const getInputProps = () => {
|
|
1872
1872
|
var _a2;
|
|
1873
1873
|
const baseProps = __spreadProps(__spreadValues(__spreadProps(__spreadValues({}, props), {
|
|
@@ -1952,6 +1952,7 @@ var Input = (_a) => {
|
|
|
1952
1952
|
};
|
|
1953
1953
|
const handleChange = (e) => {
|
|
1954
1954
|
const rawValue = e.target.value;
|
|
1955
|
+
const maxNumber = props.max != null ? Number(String(props.max).replace(/,/g, "")) : void 0;
|
|
1955
1956
|
if (variant === "currency") {
|
|
1956
1957
|
const raw = rawValue.replace(/,/g, "");
|
|
1957
1958
|
if (raw === "") {
|
|
@@ -1970,9 +1971,25 @@ var Input = (_a) => {
|
|
|
1970
1971
|
const parts = raw.split(".");
|
|
1971
1972
|
const currentDecimals = decimals != null ? decimals : 2;
|
|
1972
1973
|
if (parts.length === 2 && parts[1].length > currentDecimals) return;
|
|
1974
|
+
const asNumber = Number(raw);
|
|
1975
|
+
if (!isNaN(asNumber) && maxNumber != null && asNumber > maxNumber) {
|
|
1976
|
+
const clamped = maxNumber;
|
|
1977
|
+
const formattedClamped = formatDecimalValue(
|
|
1978
|
+
clamped.toString(),
|
|
1979
|
+
currentDecimals
|
|
1980
|
+
);
|
|
1981
|
+
setInternalValue(formattedClamped);
|
|
1982
|
+
setDisplayValue(formatCurrencyDisplay(formattedClamped));
|
|
1983
|
+
if (onChange) {
|
|
1984
|
+
const syntheticEvent = __spreadProps(__spreadValues({}, e), {
|
|
1985
|
+
target: __spreadProps(__spreadValues({}, e.target), { value: clamped.toString() })
|
|
1986
|
+
});
|
|
1987
|
+
onChange(syntheticEvent);
|
|
1988
|
+
}
|
|
1989
|
+
return;
|
|
1990
|
+
}
|
|
1973
1991
|
setInternalValue(raw);
|
|
1974
1992
|
setDisplayValue(formatCurrencyDisplay(raw));
|
|
1975
|
-
const asNumber = Number(raw);
|
|
1976
1993
|
if (!isNaN(asNumber) && onChange) {
|
|
1977
1994
|
const syntheticEvent = __spreadProps(__spreadValues({}, e), {
|
|
1978
1995
|
target: __spreadProps(__spreadValues({}, e.target), { value: asNumber.toString() })
|
|
@@ -1981,6 +1998,31 @@ var Input = (_a) => {
|
|
|
1981
1998
|
}
|
|
1982
1999
|
return;
|
|
1983
2000
|
}
|
|
2001
|
+
if ((variant === "percentage" || variant === "uom") && e.target.type === "number") {
|
|
2002
|
+
const numeric = Number(rawValue);
|
|
2003
|
+
if (!isNaN(numeric) && maxNumber != null && numeric > maxNumber) {
|
|
2004
|
+
const clamped = maxNumber;
|
|
2005
|
+
const formattedClamped = formatDecimalValue(
|
|
2006
|
+
clamped.toString(),
|
|
2007
|
+
decimals != null ? decimals : 0
|
|
2008
|
+
);
|
|
2009
|
+
setInternalValue(formattedClamped);
|
|
2010
|
+
setDisplayValue(formattedClamped);
|
|
2011
|
+
if (typeof onChange === "function") {
|
|
2012
|
+
const syntheticEvent = __spreadProps(__spreadValues({}, e), {
|
|
2013
|
+
target: __spreadProps(__spreadValues({}, e.target), { value: clamped.toString() })
|
|
2014
|
+
});
|
|
2015
|
+
onChange(syntheticEvent);
|
|
2016
|
+
}
|
|
2017
|
+
return;
|
|
2018
|
+
}
|
|
2019
|
+
setInternalValue(rawValue);
|
|
2020
|
+
setDisplayValue(rawValue);
|
|
2021
|
+
if (typeof onChange === "function") {
|
|
2022
|
+
onChange(e);
|
|
2023
|
+
}
|
|
2024
|
+
return;
|
|
2025
|
+
}
|
|
1984
2026
|
setInternalValue(rawValue);
|
|
1985
2027
|
setDisplayValue(rawValue);
|
|
1986
2028
|
if (typeof onChange === "function") {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import {
|
|
3
3
|
DataGrid,
|
|
4
4
|
DataGrid_default
|
|
5
|
-
} from "../../chunk-
|
|
5
|
+
} from "../../chunk-RB7F6QWD.js";
|
|
6
6
|
import "../../chunk-M7INAUAJ.js";
|
|
7
7
|
import "../../chunk-ZIPJMN2E.js";
|
|
8
8
|
import "../../chunk-FJFZBIRG.js";
|
|
@@ -25,7 +25,7 @@ import "../../chunk-L3BXRDLP.js";
|
|
|
25
25
|
import "../../chunk-34VEVX5H.js";
|
|
26
26
|
import "../../chunk-LB7UT6F3.js";
|
|
27
27
|
import "../../chunk-MDB26F6T.js";
|
|
28
|
-
import "../../chunk-
|
|
28
|
+
import "../../chunk-I5BV7UPG.js";
|
|
29
29
|
import "../../chunk-JADOJNBI.js";
|
|
30
30
|
import "../../chunk-4RJKB7LC.js";
|
|
31
31
|
import "../../chunk-WVVEOCEH.js";
|
|
@@ -35,12 +35,12 @@ import "../../chunk-AKJUBFJK.js";
|
|
|
35
35
|
import "../../chunk-Z2QAJY5I.js";
|
|
36
36
|
import "../../chunk-BWPNXY7T.js";
|
|
37
37
|
import "../../chunk-QVWYTQKL.js";
|
|
38
|
-
import "../../chunk-
|
|
38
|
+
import "../../chunk-Y3EFHKAG.js";
|
|
39
39
|
import "../../chunk-HGLOO52X.js";
|
|
40
40
|
import "../../chunk-MPYAHORM.js";
|
|
41
41
|
import "../../chunk-EZ4KZYKG.js";
|
|
42
|
-
import "../../chunk-
|
|
43
|
-
import "../../chunk-
|
|
42
|
+
import "../../chunk-BKBJOF4J.js";
|
|
43
|
+
import "../../chunk-NWTVBVBC.js";
|
|
44
44
|
import "../../chunk-HXGJVYGQ.js";
|
|
45
45
|
import "../../chunk-WVUIIBRR.js";
|
|
46
46
|
import "../../chunk-75USUR3I.js";
|
|
@@ -1866,7 +1866,7 @@ var Input = (_a) => {
|
|
|
1866
1866
|
const formatted = formatDecimalValue(stringValue, decimals != null ? decimals : 2);
|
|
1867
1867
|
setInternalValue(formatted);
|
|
1868
1868
|
setDisplayValue(formatCurrencyDisplay(formatted));
|
|
1869
|
-
}, [
|
|
1869
|
+
}, []);
|
|
1870
1870
|
const getInputProps = () => {
|
|
1871
1871
|
var _a2;
|
|
1872
1872
|
const baseProps = __spreadProps(__spreadValues(__spreadProps(__spreadValues({}, props), {
|
|
@@ -1951,6 +1951,7 @@ var Input = (_a) => {
|
|
|
1951
1951
|
};
|
|
1952
1952
|
const handleChange = (e) => {
|
|
1953
1953
|
const rawValue = e.target.value;
|
|
1954
|
+
const maxNumber = props.max != null ? Number(String(props.max).replace(/,/g, "")) : void 0;
|
|
1954
1955
|
if (variant === "currency") {
|
|
1955
1956
|
const raw = rawValue.replace(/,/g, "");
|
|
1956
1957
|
if (raw === "") {
|
|
@@ -1969,9 +1970,25 @@ var Input = (_a) => {
|
|
|
1969
1970
|
const parts = raw.split(".");
|
|
1970
1971
|
const currentDecimals = decimals != null ? decimals : 2;
|
|
1971
1972
|
if (parts.length === 2 && parts[1].length > currentDecimals) return;
|
|
1973
|
+
const asNumber = Number(raw);
|
|
1974
|
+
if (!isNaN(asNumber) && maxNumber != null && asNumber > maxNumber) {
|
|
1975
|
+
const clamped = maxNumber;
|
|
1976
|
+
const formattedClamped = formatDecimalValue(
|
|
1977
|
+
clamped.toString(),
|
|
1978
|
+
currentDecimals
|
|
1979
|
+
);
|
|
1980
|
+
setInternalValue(formattedClamped);
|
|
1981
|
+
setDisplayValue(formatCurrencyDisplay(formattedClamped));
|
|
1982
|
+
if (onChange) {
|
|
1983
|
+
const syntheticEvent = __spreadProps(__spreadValues({}, e), {
|
|
1984
|
+
target: __spreadProps(__spreadValues({}, e.target), { value: clamped.toString() })
|
|
1985
|
+
});
|
|
1986
|
+
onChange(syntheticEvent);
|
|
1987
|
+
}
|
|
1988
|
+
return;
|
|
1989
|
+
}
|
|
1972
1990
|
setInternalValue(raw);
|
|
1973
1991
|
setDisplayValue(formatCurrencyDisplay(raw));
|
|
1974
|
-
const asNumber = Number(raw);
|
|
1975
1992
|
if (!isNaN(asNumber) && onChange) {
|
|
1976
1993
|
const syntheticEvent = __spreadProps(__spreadValues({}, e), {
|
|
1977
1994
|
target: __spreadProps(__spreadValues({}, e.target), { value: asNumber.toString() })
|
|
@@ -1980,6 +1997,31 @@ var Input = (_a) => {
|
|
|
1980
1997
|
}
|
|
1981
1998
|
return;
|
|
1982
1999
|
}
|
|
2000
|
+
if ((variant === "percentage" || variant === "uom") && e.target.type === "number") {
|
|
2001
|
+
const numeric = Number(rawValue);
|
|
2002
|
+
if (!isNaN(numeric) && maxNumber != null && numeric > maxNumber) {
|
|
2003
|
+
const clamped = maxNumber;
|
|
2004
|
+
const formattedClamped = formatDecimalValue(
|
|
2005
|
+
clamped.toString(),
|
|
2006
|
+
decimals != null ? decimals : 0
|
|
2007
|
+
);
|
|
2008
|
+
setInternalValue(formattedClamped);
|
|
2009
|
+
setDisplayValue(formattedClamped);
|
|
2010
|
+
if (typeof onChange === "function") {
|
|
2011
|
+
const syntheticEvent = __spreadProps(__spreadValues({}, e), {
|
|
2012
|
+
target: __spreadProps(__spreadValues({}, e.target), { value: clamped.toString() })
|
|
2013
|
+
});
|
|
2014
|
+
onChange(syntheticEvent);
|
|
2015
|
+
}
|
|
2016
|
+
return;
|
|
2017
|
+
}
|
|
2018
|
+
setInternalValue(rawValue);
|
|
2019
|
+
setDisplayValue(rawValue);
|
|
2020
|
+
if (typeof onChange === "function") {
|
|
2021
|
+
onChange(e);
|
|
2022
|
+
}
|
|
2023
|
+
return;
|
|
2024
|
+
}
|
|
1983
2025
|
setInternalValue(rawValue);
|
|
1984
2026
|
setDisplayValue(rawValue);
|
|
1985
2027
|
if (typeof onChange === "function") {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getSortIcon
|
|
3
|
-
} from "../../chunk-
|
|
3
|
+
} from "../../chunk-RB7F6QWD.js";
|
|
4
4
|
import "../../chunk-M7INAUAJ.js";
|
|
5
5
|
import "../../chunk-ZIPJMN2E.js";
|
|
6
6
|
import "../../chunk-FJFZBIRG.js";
|
|
@@ -23,7 +23,7 @@ import "../../chunk-L3BXRDLP.js";
|
|
|
23
23
|
import "../../chunk-34VEVX5H.js";
|
|
24
24
|
import "../../chunk-LB7UT6F3.js";
|
|
25
25
|
import "../../chunk-MDB26F6T.js";
|
|
26
|
-
import "../../chunk-
|
|
26
|
+
import "../../chunk-I5BV7UPG.js";
|
|
27
27
|
import "../../chunk-JADOJNBI.js";
|
|
28
28
|
import "../../chunk-4RJKB7LC.js";
|
|
29
29
|
import "../../chunk-WVVEOCEH.js";
|
|
@@ -33,12 +33,12 @@ import "../../chunk-AKJUBFJK.js";
|
|
|
33
33
|
import "../../chunk-Z2QAJY5I.js";
|
|
34
34
|
import "../../chunk-BWPNXY7T.js";
|
|
35
35
|
import "../../chunk-QVWYTQKL.js";
|
|
36
|
-
import "../../chunk-
|
|
36
|
+
import "../../chunk-Y3EFHKAG.js";
|
|
37
37
|
import "../../chunk-HGLOO52X.js";
|
|
38
38
|
import "../../chunk-MPYAHORM.js";
|
|
39
39
|
import "../../chunk-EZ4KZYKG.js";
|
|
40
|
-
import "../../chunk-
|
|
41
|
-
import "../../chunk-
|
|
40
|
+
import "../../chunk-BKBJOF4J.js";
|
|
41
|
+
import "../../chunk-NWTVBVBC.js";
|
|
42
42
|
import "../../chunk-HXGJVYGQ.js";
|
|
43
43
|
import "../../chunk-WVUIIBRR.js";
|
|
44
44
|
import "../../chunk-75USUR3I.js";
|
|
@@ -1655,7 +1655,7 @@ var Input = (_a) => {
|
|
|
1655
1655
|
const formatted = formatDecimalValue(stringValue, decimals != null ? decimals : 2);
|
|
1656
1656
|
setInternalValue(formatted);
|
|
1657
1657
|
setDisplayValue(formatCurrencyDisplay(formatted));
|
|
1658
|
-
}, [
|
|
1658
|
+
}, []);
|
|
1659
1659
|
const getInputProps = () => {
|
|
1660
1660
|
var _a2;
|
|
1661
1661
|
const baseProps = __spreadProps(__spreadValues(__spreadProps(__spreadValues({}, props), {
|
|
@@ -1740,6 +1740,7 @@ var Input = (_a) => {
|
|
|
1740
1740
|
};
|
|
1741
1741
|
const handleChange = (e) => {
|
|
1742
1742
|
const rawValue = e.target.value;
|
|
1743
|
+
const maxNumber = props.max != null ? Number(String(props.max).replace(/,/g, "")) : void 0;
|
|
1743
1744
|
if (variant === "currency") {
|
|
1744
1745
|
const raw = rawValue.replace(/,/g, "");
|
|
1745
1746
|
if (raw === "") {
|
|
@@ -1758,9 +1759,25 @@ var Input = (_a) => {
|
|
|
1758
1759
|
const parts = raw.split(".");
|
|
1759
1760
|
const currentDecimals = decimals != null ? decimals : 2;
|
|
1760
1761
|
if (parts.length === 2 && parts[1].length > currentDecimals) return;
|
|
1762
|
+
const asNumber = Number(raw);
|
|
1763
|
+
if (!isNaN(asNumber) && maxNumber != null && asNumber > maxNumber) {
|
|
1764
|
+
const clamped = maxNumber;
|
|
1765
|
+
const formattedClamped = formatDecimalValue(
|
|
1766
|
+
clamped.toString(),
|
|
1767
|
+
currentDecimals
|
|
1768
|
+
);
|
|
1769
|
+
setInternalValue(formattedClamped);
|
|
1770
|
+
setDisplayValue(formatCurrencyDisplay(formattedClamped));
|
|
1771
|
+
if (onChange) {
|
|
1772
|
+
const syntheticEvent = __spreadProps(__spreadValues({}, e), {
|
|
1773
|
+
target: __spreadProps(__spreadValues({}, e.target), { value: clamped.toString() })
|
|
1774
|
+
});
|
|
1775
|
+
onChange(syntheticEvent);
|
|
1776
|
+
}
|
|
1777
|
+
return;
|
|
1778
|
+
}
|
|
1761
1779
|
setInternalValue(raw);
|
|
1762
1780
|
setDisplayValue(formatCurrencyDisplay(raw));
|
|
1763
|
-
const asNumber = Number(raw);
|
|
1764
1781
|
if (!isNaN(asNumber) && onChange) {
|
|
1765
1782
|
const syntheticEvent = __spreadProps(__spreadValues({}, e), {
|
|
1766
1783
|
target: __spreadProps(__spreadValues({}, e.target), { value: asNumber.toString() })
|
|
@@ -1769,6 +1786,31 @@ var Input = (_a) => {
|
|
|
1769
1786
|
}
|
|
1770
1787
|
return;
|
|
1771
1788
|
}
|
|
1789
|
+
if ((variant === "percentage" || variant === "uom") && e.target.type === "number") {
|
|
1790
|
+
const numeric = Number(rawValue);
|
|
1791
|
+
if (!isNaN(numeric) && maxNumber != null && numeric > maxNumber) {
|
|
1792
|
+
const clamped = maxNumber;
|
|
1793
|
+
const formattedClamped = formatDecimalValue(
|
|
1794
|
+
clamped.toString(),
|
|
1795
|
+
decimals != null ? decimals : 0
|
|
1796
|
+
);
|
|
1797
|
+
setInternalValue(formattedClamped);
|
|
1798
|
+
setDisplayValue(formattedClamped);
|
|
1799
|
+
if (typeof onChange === "function") {
|
|
1800
|
+
const syntheticEvent = __spreadProps(__spreadValues({}, e), {
|
|
1801
|
+
target: __spreadProps(__spreadValues({}, e.target), { value: clamped.toString() })
|
|
1802
|
+
});
|
|
1803
|
+
onChange(syntheticEvent);
|
|
1804
|
+
}
|
|
1805
|
+
return;
|
|
1806
|
+
}
|
|
1807
|
+
setInternalValue(rawValue);
|
|
1808
|
+
setDisplayValue(rawValue);
|
|
1809
|
+
if (typeof onChange === "function") {
|
|
1810
|
+
onChange(e);
|
|
1811
|
+
}
|
|
1812
|
+
return;
|
|
1813
|
+
}
|
|
1772
1814
|
setInternalValue(rawValue);
|
|
1773
1815
|
setDisplayValue(rawValue);
|
|
1774
1816
|
if (typeof onChange === "function") {
|
|
@@ -4,12 +4,12 @@ import {
|
|
|
4
4
|
DataGridCell,
|
|
5
5
|
DragAlongCell,
|
|
6
6
|
DraggableCellHeader
|
|
7
|
-
} from "../chunk-
|
|
7
|
+
} from "../chunk-Y3EFHKAG.js";
|
|
8
8
|
import "../chunk-HGLOO52X.js";
|
|
9
9
|
import "../chunk-MPYAHORM.js";
|
|
10
10
|
import "../chunk-EZ4KZYKG.js";
|
|
11
|
-
import "../chunk-
|
|
12
|
-
import "../chunk-
|
|
11
|
+
import "../chunk-BKBJOF4J.js";
|
|
12
|
+
import "../chunk-NWTVBVBC.js";
|
|
13
13
|
import "../chunk-HXGJVYGQ.js";
|
|
14
14
|
import "../chunk-WVUIIBRR.js";
|
|
15
15
|
import "../chunk-PS6UJZVH.js";
|
|
@@ -611,7 +611,7 @@ var Input = (_a) => {
|
|
|
611
611
|
const formatted = formatDecimalValue(stringValue, decimals != null ? decimals : 2);
|
|
612
612
|
setInternalValue(formatted);
|
|
613
613
|
setDisplayValue(formatCurrencyDisplay(formatted));
|
|
614
|
-
}, [
|
|
614
|
+
}, []);
|
|
615
615
|
const getInputProps = () => {
|
|
616
616
|
var _a2;
|
|
617
617
|
const baseProps = __spreadProps(__spreadValues(__spreadProps(__spreadValues({}, props), {
|
|
@@ -696,6 +696,7 @@ var Input = (_a) => {
|
|
|
696
696
|
};
|
|
697
697
|
const handleChange = (e) => {
|
|
698
698
|
const rawValue = e.target.value;
|
|
699
|
+
const maxNumber = props.max != null ? Number(String(props.max).replace(/,/g, "")) : void 0;
|
|
699
700
|
if (variant === "currency") {
|
|
700
701
|
const raw = rawValue.replace(/,/g, "");
|
|
701
702
|
if (raw === "") {
|
|
@@ -714,9 +715,25 @@ var Input = (_a) => {
|
|
|
714
715
|
const parts = raw.split(".");
|
|
715
716
|
const currentDecimals = decimals != null ? decimals : 2;
|
|
716
717
|
if (parts.length === 2 && parts[1].length > currentDecimals) return;
|
|
718
|
+
const asNumber = Number(raw);
|
|
719
|
+
if (!isNaN(asNumber) && maxNumber != null && asNumber > maxNumber) {
|
|
720
|
+
const clamped = maxNumber;
|
|
721
|
+
const formattedClamped = formatDecimalValue(
|
|
722
|
+
clamped.toString(),
|
|
723
|
+
currentDecimals
|
|
724
|
+
);
|
|
725
|
+
setInternalValue(formattedClamped);
|
|
726
|
+
setDisplayValue(formatCurrencyDisplay(formattedClamped));
|
|
727
|
+
if (onChange) {
|
|
728
|
+
const syntheticEvent = __spreadProps(__spreadValues({}, e), {
|
|
729
|
+
target: __spreadProps(__spreadValues({}, e.target), { value: clamped.toString() })
|
|
730
|
+
});
|
|
731
|
+
onChange(syntheticEvent);
|
|
732
|
+
}
|
|
733
|
+
return;
|
|
734
|
+
}
|
|
717
735
|
setInternalValue(raw);
|
|
718
736
|
setDisplayValue(formatCurrencyDisplay(raw));
|
|
719
|
-
const asNumber = Number(raw);
|
|
720
737
|
if (!isNaN(asNumber) && onChange) {
|
|
721
738
|
const syntheticEvent = __spreadProps(__spreadValues({}, e), {
|
|
722
739
|
target: __spreadProps(__spreadValues({}, e.target), { value: asNumber.toString() })
|
|
@@ -725,6 +742,31 @@ var Input = (_a) => {
|
|
|
725
742
|
}
|
|
726
743
|
return;
|
|
727
744
|
}
|
|
745
|
+
if ((variant === "percentage" || variant === "uom") && e.target.type === "number") {
|
|
746
|
+
const numeric = Number(rawValue);
|
|
747
|
+
if (!isNaN(numeric) && maxNumber != null && numeric > maxNumber) {
|
|
748
|
+
const clamped = maxNumber;
|
|
749
|
+
const formattedClamped = formatDecimalValue(
|
|
750
|
+
clamped.toString(),
|
|
751
|
+
decimals != null ? decimals : 0
|
|
752
|
+
);
|
|
753
|
+
setInternalValue(formattedClamped);
|
|
754
|
+
setDisplayValue(formattedClamped);
|
|
755
|
+
if (typeof onChange === "function") {
|
|
756
|
+
const syntheticEvent = __spreadProps(__spreadValues({}, e), {
|
|
757
|
+
target: __spreadProps(__spreadValues({}, e.target), { value: clamped.toString() })
|
|
758
|
+
});
|
|
759
|
+
onChange(syntheticEvent);
|
|
760
|
+
}
|
|
761
|
+
return;
|
|
762
|
+
}
|
|
763
|
+
setInternalValue(rawValue);
|
|
764
|
+
setDisplayValue(rawValue);
|
|
765
|
+
if (typeof onChange === "function") {
|
|
766
|
+
onChange(e);
|
|
767
|
+
}
|
|
768
|
+
return;
|
|
769
|
+
}
|
|
728
770
|
setInternalValue(rawValue);
|
|
729
771
|
setDisplayValue(rawValue);
|
|
730
772
|
if (typeof onChange === "function") {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DateInput
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-RB7F6QWD.js";
|
|
4
4
|
import "../chunk-M7INAUAJ.js";
|
|
5
5
|
import "../chunk-ZIPJMN2E.js";
|
|
6
6
|
import "../chunk-FJFZBIRG.js";
|
|
@@ -23,7 +23,7 @@ import "../chunk-L3BXRDLP.js";
|
|
|
23
23
|
import "../chunk-34VEVX5H.js";
|
|
24
24
|
import "../chunk-LB7UT6F3.js";
|
|
25
25
|
import "../chunk-MDB26F6T.js";
|
|
26
|
-
import "../chunk-
|
|
26
|
+
import "../chunk-I5BV7UPG.js";
|
|
27
27
|
import "../chunk-JADOJNBI.js";
|
|
28
28
|
import "../chunk-4RJKB7LC.js";
|
|
29
29
|
import "../chunk-WVVEOCEH.js";
|
|
@@ -33,12 +33,12 @@ import "../chunk-AKJUBFJK.js";
|
|
|
33
33
|
import "../chunk-Z2QAJY5I.js";
|
|
34
34
|
import "../chunk-BWPNXY7T.js";
|
|
35
35
|
import "../chunk-QVWYTQKL.js";
|
|
36
|
-
import "../chunk-
|
|
36
|
+
import "../chunk-Y3EFHKAG.js";
|
|
37
37
|
import "../chunk-HGLOO52X.js";
|
|
38
38
|
import "../chunk-MPYAHORM.js";
|
|
39
39
|
import "../chunk-EZ4KZYKG.js";
|
|
40
|
-
import "../chunk-
|
|
41
|
-
import "../chunk-
|
|
40
|
+
import "../chunk-BKBJOF4J.js";
|
|
41
|
+
import "../chunk-NWTVBVBC.js";
|
|
42
42
|
import "../chunk-HXGJVYGQ.js";
|
|
43
43
|
import "../chunk-WVUIIBRR.js";
|
|
44
44
|
import "../chunk-75USUR3I.js";
|