@pdg/react-form 1.2.6 → 1.2.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/index.esm.js +108 -93
- package/dist/index.js +108 -93
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -2498,7 +2498,7 @@ var StyledContentDiv = styled('div')(_templateObject2$7 || (_templateObject2$7 =
|
|
|
2498
2498
|
t5 = $[12];
|
|
2499
2499
|
}
|
|
2500
2500
|
return t5;
|
|
2501
|
-
};insertStyle(".PFormTextField{min-width:200px}.PFormTextField .clear-icon-button-wrap{
|
|
2501
|
+
};insertStyle(".PFormTextField{min-width:200px}.PFormTextField .clear-icon-button-wrap{display:none}.PFormTextField.variant-filled .clear-icon-button-wrap{margin-top:9px;margin-bottom:-9px}.PFormTextField:hover .clear-icon-button-wrap.show,.PFormTextField .MuiInputBase-root.Mui-focused .clear-icon-button-wrap.show{display:block}");var _excluded$y = ["ref", "variant", "size", "color", "focused", "labelShrink", "fullWidth", "submitWhenReturnKey", "name", "required", "value", "data", "icon", "labelIcon", "label", "error", "helperText", "exceptValue", "readOnly", "tabIndex", "disabled", "placeholder", "maxLength", "clear", "width", "slotProps", "inputRef", "select", "multiline", "validPattern", "invalidPattern", "startAdornment", "endAdornment", "noFormValueItem", "hidden", "disableReturnKey", "onChange", "onValue", "onValidate", "onBlur", "onKeyDown", "className", "style"];
|
|
2502
2502
|
function PFormTextField(t0) {
|
|
2503
2503
|
var _initSlotProps, _initSlotProps4;
|
|
2504
2504
|
var $ = c(216);
|
|
@@ -4725,7 +4725,7 @@ var NumberFormatCustom = function NumberFormatCustom(t0) {
|
|
|
4725
4725
|
return t2;
|
|
4726
4726
|
};var _excluded$o = ["ref", "className", "allowNegative", "thousandSeparator", "allowDecimal", "decimalScale", "prefix", "suffix", "readOnly", "tabIndex", "labelShrink", "clear", "slotProps", "value", "onChange", "onValue", "onValidate"];
|
|
4727
4727
|
var PFormNumber = function PFormNumber(t0) {
|
|
4728
|
-
var $ = c(
|
|
4728
|
+
var $ = c(72);
|
|
4729
4729
|
var allowDecimal;
|
|
4730
4730
|
var allowNegative;
|
|
4731
4731
|
var className;
|
|
@@ -4814,19 +4814,34 @@ var PFormNumber = function PFormNumber(t0) {
|
|
|
4814
4814
|
_setStrValue = _useState2[1];
|
|
4815
4815
|
var strValueRef = useAutoUpdateRef(strValue);
|
|
4816
4816
|
var t2;
|
|
4817
|
-
|
|
4818
|
-
|
|
4819
|
-
|
|
4820
|
-
|
|
4817
|
+
var t3;
|
|
4818
|
+
if ($[19] !== initValue) {
|
|
4819
|
+
t2 = function t2() {
|
|
4820
|
+
return _setStrValue(initValue !== undefined ? "".concat(initValue) : "");
|
|
4821
4821
|
};
|
|
4822
|
-
|
|
4822
|
+
t3 = [initValue];
|
|
4823
|
+
$[19] = initValue;
|
|
4823
4824
|
$[20] = t2;
|
|
4825
|
+
$[21] = t3;
|
|
4824
4826
|
} else {
|
|
4825
4827
|
t2 = $[20];
|
|
4828
|
+
t3 = $[21];
|
|
4829
|
+
}
|
|
4830
|
+
useFirstSkipChanged(t2, t3);
|
|
4831
|
+
var t4;
|
|
4832
|
+
if ($[22] !== strValueRef) {
|
|
4833
|
+
t4 = function t4(newValue) {
|
|
4834
|
+
_setStrValue(newValue);
|
|
4835
|
+
strValueRef.current = newValue;
|
|
4836
|
+
};
|
|
4837
|
+
$[22] = strValueRef;
|
|
4838
|
+
$[23] = t4;
|
|
4839
|
+
} else {
|
|
4840
|
+
t4 = $[23];
|
|
4826
4841
|
}
|
|
4827
|
-
var setStrValue =
|
|
4842
|
+
var setStrValue = t4;
|
|
4828
4843
|
var newSlotProps;
|
|
4829
|
-
if ($[
|
|
4844
|
+
if ($[24] !== allowDecimal || $[25] !== allowNegative || $[26] !== decimalScale || $[27] !== initSlotProps || $[28] !== prefix || $[29] !== readOnly || $[30] !== suffix || $[31] !== tabIndex || $[32] !== thousandSeparator) {
|
|
4830
4845
|
var _newSlotProps$input;
|
|
4831
4846
|
newSlotProps = _objectSpread2({}, initSlotProps);
|
|
4832
4847
|
var _t2 = readOnly ? "Mui-disabled" : undefined;
|
|
@@ -4834,7 +4849,7 @@ var PFormNumber = function PFormNumber(t0) {
|
|
|
4834
4849
|
var _t4 = !!readOnly;
|
|
4835
4850
|
var _t5 = readOnly ? -1 : tabIndex;
|
|
4836
4851
|
var inputProps;
|
|
4837
|
-
if ($[
|
|
4852
|
+
if ($[34] !== allowDecimal || $[35] !== decimalScale || $[36] !== prefix || $[37] !== suffix || $[38] !== _t2 || $[39] !== _t3 || $[40] !== _t4 || $[41] !== _t5 || $[42] !== thousandSeparator) {
|
|
4838
4853
|
inputProps = {
|
|
4839
4854
|
className: _t2,
|
|
4840
4855
|
allowNegative: _t3,
|
|
@@ -4851,41 +4866,41 @@ var PFormNumber = function PFormNumber(t0) {
|
|
|
4851
4866
|
} else {
|
|
4852
4867
|
inputProps.decimalScale = 0;
|
|
4853
4868
|
}
|
|
4854
|
-
$[
|
|
4855
|
-
$[
|
|
4856
|
-
$[
|
|
4857
|
-
$[
|
|
4858
|
-
$[
|
|
4859
|
-
$[
|
|
4860
|
-
$[
|
|
4861
|
-
$[
|
|
4862
|
-
$[
|
|
4863
|
-
$[
|
|
4869
|
+
$[34] = allowDecimal;
|
|
4870
|
+
$[35] = decimalScale;
|
|
4871
|
+
$[36] = prefix;
|
|
4872
|
+
$[37] = suffix;
|
|
4873
|
+
$[38] = _t2;
|
|
4874
|
+
$[39] = _t3;
|
|
4875
|
+
$[40] = _t4;
|
|
4876
|
+
$[41] = _t5;
|
|
4877
|
+
$[42] = thousandSeparator;
|
|
4878
|
+
$[43] = inputProps;
|
|
4864
4879
|
} else {
|
|
4865
|
-
inputProps = $[
|
|
4880
|
+
inputProps = $[43];
|
|
4866
4881
|
}
|
|
4867
4882
|
newSlotProps.input = _objectSpread2(_objectSpread2({}, newSlotProps.input), {}, {
|
|
4868
4883
|
inputComponent: NumberFormatCustom,
|
|
4869
4884
|
inputProps: _objectSpread2(_objectSpread2({}, (_newSlotProps$input = newSlotProps.input) === null || _newSlotProps$input === void 0 ? void 0 : _newSlotProps$input.inputProps), inputProps)
|
|
4870
4885
|
});
|
|
4871
|
-
$[
|
|
4872
|
-
$[
|
|
4873
|
-
$[
|
|
4874
|
-
$[
|
|
4875
|
-
$[
|
|
4876
|
-
$[
|
|
4877
|
-
$[
|
|
4878
|
-
$[
|
|
4879
|
-
$[
|
|
4880
|
-
$[
|
|
4881
|
-
} else {
|
|
4882
|
-
newSlotProps = $[
|
|
4886
|
+
$[24] = allowDecimal;
|
|
4887
|
+
$[25] = allowNegative;
|
|
4888
|
+
$[26] = decimalScale;
|
|
4889
|
+
$[27] = initSlotProps;
|
|
4890
|
+
$[28] = prefix;
|
|
4891
|
+
$[29] = readOnly;
|
|
4892
|
+
$[30] = suffix;
|
|
4893
|
+
$[31] = tabIndex;
|
|
4894
|
+
$[32] = thousandSeparator;
|
|
4895
|
+
$[33] = newSlotProps;
|
|
4896
|
+
} else {
|
|
4897
|
+
newSlotProps = $[33];
|
|
4883
4898
|
}
|
|
4884
4899
|
var slotProps = newSlotProps;
|
|
4885
4900
|
var getFinalValue = _temp$t;
|
|
4886
|
-
var
|
|
4887
|
-
if ($[
|
|
4888
|
-
|
|
4901
|
+
var t5;
|
|
4902
|
+
if ($[44] !== onChangeRef || $[45] !== setStrValue || $[46] !== strValueRef) {
|
|
4903
|
+
t5 = function t5(value_0) {
|
|
4889
4904
|
if (Number(value_0) > Number.MAX_SAFE_INTEGER) {
|
|
4890
4905
|
var _onChangeRef$current;
|
|
4891
4906
|
var newValue_0 = Number.MAX_SAFE_INTEGER;
|
|
@@ -4915,32 +4930,32 @@ var PFormNumber = function PFormNumber(t0) {
|
|
|
4915
4930
|
}
|
|
4916
4931
|
}
|
|
4917
4932
|
};
|
|
4918
|
-
$[
|
|
4919
|
-
$[
|
|
4920
|
-
$[
|
|
4921
|
-
$[
|
|
4933
|
+
$[44] = onChangeRef;
|
|
4934
|
+
$[45] = setStrValue;
|
|
4935
|
+
$[46] = strValueRef;
|
|
4936
|
+
$[47] = t5;
|
|
4922
4937
|
} else {
|
|
4923
|
-
|
|
4938
|
+
t5 = $[47];
|
|
4924
4939
|
}
|
|
4925
|
-
var handleChange =
|
|
4926
|
-
var
|
|
4927
|
-
if ($[
|
|
4928
|
-
|
|
4940
|
+
var handleChange = t5;
|
|
4941
|
+
var t6;
|
|
4942
|
+
if ($[48] !== onValueRef) {
|
|
4943
|
+
t6 = function t6(value_1) {
|
|
4929
4944
|
var finalValue = empty(value_1) || value_1 === "-" || value_1 === "." ? undefined : Number(value_1);
|
|
4930
4945
|
if (onValueRef.current) {
|
|
4931
4946
|
finalValue = onValueRef.current(finalValue);
|
|
4932
4947
|
}
|
|
4933
4948
|
return finalValue !== undefined ? finalValue.toString() : "";
|
|
4934
4949
|
};
|
|
4935
|
-
$[
|
|
4936
|
-
$[
|
|
4950
|
+
$[48] = onValueRef;
|
|
4951
|
+
$[49] = t6;
|
|
4937
4952
|
} else {
|
|
4938
|
-
|
|
4953
|
+
t6 = $[49];
|
|
4939
4954
|
}
|
|
4940
|
-
var handleValue =
|
|
4941
|
-
var
|
|
4942
|
-
if ($[
|
|
4943
|
-
|
|
4955
|
+
var handleValue = t6;
|
|
4956
|
+
var t7;
|
|
4957
|
+
if ($[50] !== onValidateRef) {
|
|
4958
|
+
t7 = function t7(value_2) {
|
|
4944
4959
|
if (onValidateRef.current) {
|
|
4945
4960
|
var finalValue_0 = empty(value_2) || value_2 === "-" || value_2 === "." ? undefined : Number(value_2);
|
|
4946
4961
|
return onValidateRef.current(finalValue_0);
|
|
@@ -4948,15 +4963,15 @@ var PFormNumber = function PFormNumber(t0) {
|
|
|
4948
4963
|
return true;
|
|
4949
4964
|
}
|
|
4950
4965
|
};
|
|
4951
|
-
$[
|
|
4952
|
-
$[
|
|
4966
|
+
$[50] = onValidateRef;
|
|
4967
|
+
$[51] = t7;
|
|
4953
4968
|
} else {
|
|
4954
|
-
|
|
4969
|
+
t7 = $[51];
|
|
4955
4970
|
}
|
|
4956
|
-
var handleValidate =
|
|
4957
|
-
var
|
|
4958
|
-
if ($[
|
|
4959
|
-
|
|
4971
|
+
var handleValidate = t7;
|
|
4972
|
+
var t8;
|
|
4973
|
+
if ($[52] !== initValueRef || $[53] !== onChangeRef || $[54] !== ref || $[55] !== setStrValue || $[56] !== strValueRef) {
|
|
4974
|
+
t8 = function t8(commands) {
|
|
4960
4975
|
if (ref) {
|
|
4961
4976
|
var finalCommands = commands ? _objectSpread2(_objectSpread2({}, commands), {}, {
|
|
4962
4977
|
getReset: function getReset() {
|
|
@@ -4983,32 +4998,32 @@ var PFormNumber = function PFormNumber(t0) {
|
|
|
4983
4998
|
}
|
|
4984
4999
|
}
|
|
4985
5000
|
};
|
|
4986
|
-
$[
|
|
4987
|
-
$[
|
|
4988
|
-
$[
|
|
4989
|
-
$[
|
|
4990
|
-
$[
|
|
4991
|
-
$[
|
|
5001
|
+
$[52] = initValueRef;
|
|
5002
|
+
$[53] = onChangeRef;
|
|
5003
|
+
$[54] = ref;
|
|
5004
|
+
$[55] = setStrValue;
|
|
5005
|
+
$[56] = strValueRef;
|
|
5006
|
+
$[57] = t8;
|
|
4992
5007
|
} else {
|
|
4993
|
-
|
|
5008
|
+
t8 = $[57];
|
|
4994
5009
|
}
|
|
4995
|
-
var handleRef =
|
|
4996
|
-
var
|
|
4997
|
-
if ($[
|
|
4998
|
-
|
|
4999
|
-
$[
|
|
5000
|
-
$[
|
|
5010
|
+
var handleRef = t8;
|
|
5011
|
+
var t9;
|
|
5012
|
+
if ($[58] !== className) {
|
|
5013
|
+
t9 = classNames(className, "PFormNumber");
|
|
5014
|
+
$[58] = className;
|
|
5015
|
+
$[59] = t9;
|
|
5001
5016
|
} else {
|
|
5002
|
-
|
|
5017
|
+
t9 = $[59];
|
|
5003
5018
|
}
|
|
5004
|
-
var
|
|
5005
|
-
var
|
|
5006
|
-
if ($[
|
|
5007
|
-
|
|
5019
|
+
var t10 = strValue === "" || strValue === undefined ? labelShrink : true;
|
|
5020
|
+
var t11;
|
|
5021
|
+
if ($[60] !== clear || $[61] !== handleChange || $[62] !== handleRef || $[63] !== handleValidate || $[64] !== handleValue || $[65] !== props || $[66] !== readOnly || $[67] !== slotProps || $[68] !== strValue || $[69] !== t10 || $[70] !== t9) {
|
|
5022
|
+
t11 = /*#__PURE__*/React.createElement(PFormTextField, _extends({
|
|
5008
5023
|
ref: handleRef,
|
|
5009
|
-
className:
|
|
5024
|
+
className: t9,
|
|
5010
5025
|
disableReturnKey: true,
|
|
5011
|
-
labelShrink:
|
|
5026
|
+
labelShrink: t10,
|
|
5012
5027
|
slotProps: slotProps,
|
|
5013
5028
|
readOnly: readOnly,
|
|
5014
5029
|
clear: clear,
|
|
@@ -5017,22 +5032,22 @@ var PFormNumber = function PFormNumber(t0) {
|
|
|
5017
5032
|
onValue: handleValue,
|
|
5018
5033
|
onValidate: handleValidate
|
|
5019
5034
|
}, props));
|
|
5020
|
-
$[
|
|
5021
|
-
$[
|
|
5022
|
-
$[
|
|
5023
|
-
$[
|
|
5024
|
-
$[
|
|
5025
|
-
$[
|
|
5026
|
-
$[
|
|
5027
|
-
$[
|
|
5028
|
-
$[
|
|
5029
|
-
$[
|
|
5030
|
-
$[
|
|
5031
|
-
$[
|
|
5035
|
+
$[60] = clear;
|
|
5036
|
+
$[61] = handleChange;
|
|
5037
|
+
$[62] = handleRef;
|
|
5038
|
+
$[63] = handleValidate;
|
|
5039
|
+
$[64] = handleValue;
|
|
5040
|
+
$[65] = props;
|
|
5041
|
+
$[66] = readOnly;
|
|
5042
|
+
$[67] = slotProps;
|
|
5043
|
+
$[68] = strValue;
|
|
5044
|
+
$[69] = t10;
|
|
5045
|
+
$[70] = t9;
|
|
5046
|
+
$[71] = t11;
|
|
5032
5047
|
} else {
|
|
5033
|
-
|
|
5048
|
+
t11 = $[71];
|
|
5034
5049
|
}
|
|
5035
|
-
return
|
|
5050
|
+
return t11;
|
|
5036
5051
|
};
|
|
5037
5052
|
function _temp$t(value) {
|
|
5038
5053
|
return empty(value) || value === "-" || value === "." ? undefined : Number(value);
|
package/dist/index.js
CHANGED
|
@@ -2498,7 +2498,7 @@ var StyledContentDiv = material.styled('div')(_templateObject2$7 || (_templateOb
|
|
|
2498
2498
|
t5 = $[12];
|
|
2499
2499
|
}
|
|
2500
2500
|
return t5;
|
|
2501
|
-
};insertStyle(".PFormTextField{min-width:200px}.PFormTextField .clear-icon-button-wrap{
|
|
2501
|
+
};insertStyle(".PFormTextField{min-width:200px}.PFormTextField .clear-icon-button-wrap{display:none}.PFormTextField.variant-filled .clear-icon-button-wrap{margin-top:9px;margin-bottom:-9px}.PFormTextField:hover .clear-icon-button-wrap.show,.PFormTextField .MuiInputBase-root.Mui-focused .clear-icon-button-wrap.show{display:block}");var _excluded$y = ["ref", "variant", "size", "color", "focused", "labelShrink", "fullWidth", "submitWhenReturnKey", "name", "required", "value", "data", "icon", "labelIcon", "label", "error", "helperText", "exceptValue", "readOnly", "tabIndex", "disabled", "placeholder", "maxLength", "clear", "width", "slotProps", "inputRef", "select", "multiline", "validPattern", "invalidPattern", "startAdornment", "endAdornment", "noFormValueItem", "hidden", "disableReturnKey", "onChange", "onValue", "onValidate", "onBlur", "onKeyDown", "className", "style"];
|
|
2502
2502
|
function PFormTextField(t0) {
|
|
2503
2503
|
var _initSlotProps, _initSlotProps4;
|
|
2504
2504
|
var $ = compilerRuntime.c(216);
|
|
@@ -4725,7 +4725,7 @@ var NumberFormatCustom = function NumberFormatCustom(t0) {
|
|
|
4725
4725
|
return t2;
|
|
4726
4726
|
};var _excluded$o = ["ref", "className", "allowNegative", "thousandSeparator", "allowDecimal", "decimalScale", "prefix", "suffix", "readOnly", "tabIndex", "labelShrink", "clear", "slotProps", "value", "onChange", "onValue", "onValidate"];
|
|
4727
4727
|
var PFormNumber = function PFormNumber(t0) {
|
|
4728
|
-
var $ = compilerRuntime.c(
|
|
4728
|
+
var $ = compilerRuntime.c(72);
|
|
4729
4729
|
var allowDecimal;
|
|
4730
4730
|
var allowNegative;
|
|
4731
4731
|
var className;
|
|
@@ -4814,19 +4814,34 @@ var PFormNumber = function PFormNumber(t0) {
|
|
|
4814
4814
|
_setStrValue = _useState2[1];
|
|
4815
4815
|
var strValueRef = reactHook.useAutoUpdateRef(strValue);
|
|
4816
4816
|
var t2;
|
|
4817
|
-
|
|
4818
|
-
|
|
4819
|
-
|
|
4820
|
-
|
|
4817
|
+
var t3;
|
|
4818
|
+
if ($[19] !== initValue) {
|
|
4819
|
+
t2 = function t2() {
|
|
4820
|
+
return _setStrValue(initValue !== undefined ? "".concat(initValue) : "");
|
|
4821
4821
|
};
|
|
4822
|
-
|
|
4822
|
+
t3 = [initValue];
|
|
4823
|
+
$[19] = initValue;
|
|
4823
4824
|
$[20] = t2;
|
|
4825
|
+
$[21] = t3;
|
|
4824
4826
|
} else {
|
|
4825
4827
|
t2 = $[20];
|
|
4828
|
+
t3 = $[21];
|
|
4829
|
+
}
|
|
4830
|
+
reactHook.useFirstSkipChanged(t2, t3);
|
|
4831
|
+
var t4;
|
|
4832
|
+
if ($[22] !== strValueRef) {
|
|
4833
|
+
t4 = function t4(newValue) {
|
|
4834
|
+
_setStrValue(newValue);
|
|
4835
|
+
strValueRef.current = newValue;
|
|
4836
|
+
};
|
|
4837
|
+
$[22] = strValueRef;
|
|
4838
|
+
$[23] = t4;
|
|
4839
|
+
} else {
|
|
4840
|
+
t4 = $[23];
|
|
4826
4841
|
}
|
|
4827
|
-
var setStrValue =
|
|
4842
|
+
var setStrValue = t4;
|
|
4828
4843
|
var newSlotProps;
|
|
4829
|
-
if ($[
|
|
4844
|
+
if ($[24] !== allowDecimal || $[25] !== allowNegative || $[26] !== decimalScale || $[27] !== initSlotProps || $[28] !== prefix || $[29] !== readOnly || $[30] !== suffix || $[31] !== tabIndex || $[32] !== thousandSeparator) {
|
|
4830
4845
|
var _newSlotProps$input;
|
|
4831
4846
|
newSlotProps = _objectSpread2({}, initSlotProps);
|
|
4832
4847
|
var _t2 = readOnly ? "Mui-disabled" : undefined;
|
|
@@ -4834,7 +4849,7 @@ var PFormNumber = function PFormNumber(t0) {
|
|
|
4834
4849
|
var _t4 = !!readOnly;
|
|
4835
4850
|
var _t5 = readOnly ? -1 : tabIndex;
|
|
4836
4851
|
var inputProps;
|
|
4837
|
-
if ($[
|
|
4852
|
+
if ($[34] !== allowDecimal || $[35] !== decimalScale || $[36] !== prefix || $[37] !== suffix || $[38] !== _t2 || $[39] !== _t3 || $[40] !== _t4 || $[41] !== _t5 || $[42] !== thousandSeparator) {
|
|
4838
4853
|
inputProps = {
|
|
4839
4854
|
className: _t2,
|
|
4840
4855
|
allowNegative: _t3,
|
|
@@ -4851,41 +4866,41 @@ var PFormNumber = function PFormNumber(t0) {
|
|
|
4851
4866
|
} else {
|
|
4852
4867
|
inputProps.decimalScale = 0;
|
|
4853
4868
|
}
|
|
4854
|
-
$[
|
|
4855
|
-
$[
|
|
4856
|
-
$[
|
|
4857
|
-
$[
|
|
4858
|
-
$[
|
|
4859
|
-
$[
|
|
4860
|
-
$[
|
|
4861
|
-
$[
|
|
4862
|
-
$[
|
|
4863
|
-
$[
|
|
4869
|
+
$[34] = allowDecimal;
|
|
4870
|
+
$[35] = decimalScale;
|
|
4871
|
+
$[36] = prefix;
|
|
4872
|
+
$[37] = suffix;
|
|
4873
|
+
$[38] = _t2;
|
|
4874
|
+
$[39] = _t3;
|
|
4875
|
+
$[40] = _t4;
|
|
4876
|
+
$[41] = _t5;
|
|
4877
|
+
$[42] = thousandSeparator;
|
|
4878
|
+
$[43] = inputProps;
|
|
4864
4879
|
} else {
|
|
4865
|
-
inputProps = $[
|
|
4880
|
+
inputProps = $[43];
|
|
4866
4881
|
}
|
|
4867
4882
|
newSlotProps.input = _objectSpread2(_objectSpread2({}, newSlotProps.input), {}, {
|
|
4868
4883
|
inputComponent: NumberFormatCustom,
|
|
4869
4884
|
inputProps: _objectSpread2(_objectSpread2({}, (_newSlotProps$input = newSlotProps.input) === null || _newSlotProps$input === void 0 ? void 0 : _newSlotProps$input.inputProps), inputProps)
|
|
4870
4885
|
});
|
|
4871
|
-
$[
|
|
4872
|
-
$[
|
|
4873
|
-
$[
|
|
4874
|
-
$[
|
|
4875
|
-
$[
|
|
4876
|
-
$[
|
|
4877
|
-
$[
|
|
4878
|
-
$[
|
|
4879
|
-
$[
|
|
4880
|
-
$[
|
|
4881
|
-
} else {
|
|
4882
|
-
newSlotProps = $[
|
|
4886
|
+
$[24] = allowDecimal;
|
|
4887
|
+
$[25] = allowNegative;
|
|
4888
|
+
$[26] = decimalScale;
|
|
4889
|
+
$[27] = initSlotProps;
|
|
4890
|
+
$[28] = prefix;
|
|
4891
|
+
$[29] = readOnly;
|
|
4892
|
+
$[30] = suffix;
|
|
4893
|
+
$[31] = tabIndex;
|
|
4894
|
+
$[32] = thousandSeparator;
|
|
4895
|
+
$[33] = newSlotProps;
|
|
4896
|
+
} else {
|
|
4897
|
+
newSlotProps = $[33];
|
|
4883
4898
|
}
|
|
4884
4899
|
var slotProps = newSlotProps;
|
|
4885
4900
|
var getFinalValue = _temp$t;
|
|
4886
|
-
var
|
|
4887
|
-
if ($[
|
|
4888
|
-
|
|
4901
|
+
var t5;
|
|
4902
|
+
if ($[44] !== onChangeRef || $[45] !== setStrValue || $[46] !== strValueRef) {
|
|
4903
|
+
t5 = function t5(value_0) {
|
|
4889
4904
|
if (Number(value_0) > Number.MAX_SAFE_INTEGER) {
|
|
4890
4905
|
var _onChangeRef$current;
|
|
4891
4906
|
var newValue_0 = Number.MAX_SAFE_INTEGER;
|
|
@@ -4915,32 +4930,32 @@ var PFormNumber = function PFormNumber(t0) {
|
|
|
4915
4930
|
}
|
|
4916
4931
|
}
|
|
4917
4932
|
};
|
|
4918
|
-
$[
|
|
4919
|
-
$[
|
|
4920
|
-
$[
|
|
4921
|
-
$[
|
|
4933
|
+
$[44] = onChangeRef;
|
|
4934
|
+
$[45] = setStrValue;
|
|
4935
|
+
$[46] = strValueRef;
|
|
4936
|
+
$[47] = t5;
|
|
4922
4937
|
} else {
|
|
4923
|
-
|
|
4938
|
+
t5 = $[47];
|
|
4924
4939
|
}
|
|
4925
|
-
var handleChange =
|
|
4926
|
-
var
|
|
4927
|
-
if ($[
|
|
4928
|
-
|
|
4940
|
+
var handleChange = t5;
|
|
4941
|
+
var t6;
|
|
4942
|
+
if ($[48] !== onValueRef) {
|
|
4943
|
+
t6 = function t6(value_1) {
|
|
4929
4944
|
var finalValue = compare.empty(value_1) || value_1 === "-" || value_1 === "." ? undefined : Number(value_1);
|
|
4930
4945
|
if (onValueRef.current) {
|
|
4931
4946
|
finalValue = onValueRef.current(finalValue);
|
|
4932
4947
|
}
|
|
4933
4948
|
return finalValue !== undefined ? finalValue.toString() : "";
|
|
4934
4949
|
};
|
|
4935
|
-
$[
|
|
4936
|
-
$[
|
|
4950
|
+
$[48] = onValueRef;
|
|
4951
|
+
$[49] = t6;
|
|
4937
4952
|
} else {
|
|
4938
|
-
|
|
4953
|
+
t6 = $[49];
|
|
4939
4954
|
}
|
|
4940
|
-
var handleValue =
|
|
4941
|
-
var
|
|
4942
|
-
if ($[
|
|
4943
|
-
|
|
4955
|
+
var handleValue = t6;
|
|
4956
|
+
var t7;
|
|
4957
|
+
if ($[50] !== onValidateRef) {
|
|
4958
|
+
t7 = function t7(value_2) {
|
|
4944
4959
|
if (onValidateRef.current) {
|
|
4945
4960
|
var finalValue_0 = compare.empty(value_2) || value_2 === "-" || value_2 === "." ? undefined : Number(value_2);
|
|
4946
4961
|
return onValidateRef.current(finalValue_0);
|
|
@@ -4948,15 +4963,15 @@ var PFormNumber = function PFormNumber(t0) {
|
|
|
4948
4963
|
return true;
|
|
4949
4964
|
}
|
|
4950
4965
|
};
|
|
4951
|
-
$[
|
|
4952
|
-
$[
|
|
4966
|
+
$[50] = onValidateRef;
|
|
4967
|
+
$[51] = t7;
|
|
4953
4968
|
} else {
|
|
4954
|
-
|
|
4969
|
+
t7 = $[51];
|
|
4955
4970
|
}
|
|
4956
|
-
var handleValidate =
|
|
4957
|
-
var
|
|
4958
|
-
if ($[
|
|
4959
|
-
|
|
4971
|
+
var handleValidate = t7;
|
|
4972
|
+
var t8;
|
|
4973
|
+
if ($[52] !== initValueRef || $[53] !== onChangeRef || $[54] !== ref || $[55] !== setStrValue || $[56] !== strValueRef) {
|
|
4974
|
+
t8 = function t8(commands) {
|
|
4960
4975
|
if (ref) {
|
|
4961
4976
|
var finalCommands = commands ? _objectSpread2(_objectSpread2({}, commands), {}, {
|
|
4962
4977
|
getReset: function getReset() {
|
|
@@ -4983,32 +4998,32 @@ var PFormNumber = function PFormNumber(t0) {
|
|
|
4983
4998
|
}
|
|
4984
4999
|
}
|
|
4985
5000
|
};
|
|
4986
|
-
$[
|
|
4987
|
-
$[
|
|
4988
|
-
$[
|
|
4989
|
-
$[
|
|
4990
|
-
$[
|
|
4991
|
-
$[
|
|
5001
|
+
$[52] = initValueRef;
|
|
5002
|
+
$[53] = onChangeRef;
|
|
5003
|
+
$[54] = ref;
|
|
5004
|
+
$[55] = setStrValue;
|
|
5005
|
+
$[56] = strValueRef;
|
|
5006
|
+
$[57] = t8;
|
|
4992
5007
|
} else {
|
|
4993
|
-
|
|
5008
|
+
t8 = $[57];
|
|
4994
5009
|
}
|
|
4995
|
-
var handleRef =
|
|
4996
|
-
var
|
|
4997
|
-
if ($[
|
|
4998
|
-
|
|
4999
|
-
$[
|
|
5000
|
-
$[
|
|
5010
|
+
var handleRef = t8;
|
|
5011
|
+
var t9;
|
|
5012
|
+
if ($[58] !== className) {
|
|
5013
|
+
t9 = classNames(className, "PFormNumber");
|
|
5014
|
+
$[58] = className;
|
|
5015
|
+
$[59] = t9;
|
|
5001
5016
|
} else {
|
|
5002
|
-
|
|
5017
|
+
t9 = $[59];
|
|
5003
5018
|
}
|
|
5004
|
-
var
|
|
5005
|
-
var
|
|
5006
|
-
if ($[
|
|
5007
|
-
|
|
5019
|
+
var t10 = strValue === "" || strValue === undefined ? labelShrink : true;
|
|
5020
|
+
var t11;
|
|
5021
|
+
if ($[60] !== clear || $[61] !== handleChange || $[62] !== handleRef || $[63] !== handleValidate || $[64] !== handleValue || $[65] !== props || $[66] !== readOnly || $[67] !== slotProps || $[68] !== strValue || $[69] !== t10 || $[70] !== t9) {
|
|
5022
|
+
t11 = /*#__PURE__*/React.createElement(PFormTextField, _extends({
|
|
5008
5023
|
ref: handleRef,
|
|
5009
|
-
className:
|
|
5024
|
+
className: t9,
|
|
5010
5025
|
disableReturnKey: true,
|
|
5011
|
-
labelShrink:
|
|
5026
|
+
labelShrink: t10,
|
|
5012
5027
|
slotProps: slotProps,
|
|
5013
5028
|
readOnly: readOnly,
|
|
5014
5029
|
clear: clear,
|
|
@@ -5017,22 +5032,22 @@ var PFormNumber = function PFormNumber(t0) {
|
|
|
5017
5032
|
onValue: handleValue,
|
|
5018
5033
|
onValidate: handleValidate
|
|
5019
5034
|
}, props));
|
|
5020
|
-
$[
|
|
5021
|
-
$[
|
|
5022
|
-
$[
|
|
5023
|
-
$[
|
|
5024
|
-
$[
|
|
5025
|
-
$[
|
|
5026
|
-
$[
|
|
5027
|
-
$[
|
|
5028
|
-
$[
|
|
5029
|
-
$[
|
|
5030
|
-
$[
|
|
5031
|
-
$[
|
|
5035
|
+
$[60] = clear;
|
|
5036
|
+
$[61] = handleChange;
|
|
5037
|
+
$[62] = handleRef;
|
|
5038
|
+
$[63] = handleValidate;
|
|
5039
|
+
$[64] = handleValue;
|
|
5040
|
+
$[65] = props;
|
|
5041
|
+
$[66] = readOnly;
|
|
5042
|
+
$[67] = slotProps;
|
|
5043
|
+
$[68] = strValue;
|
|
5044
|
+
$[69] = t10;
|
|
5045
|
+
$[70] = t9;
|
|
5046
|
+
$[71] = t11;
|
|
5032
5047
|
} else {
|
|
5033
|
-
|
|
5048
|
+
t11 = $[71];
|
|
5034
5049
|
}
|
|
5035
|
-
return
|
|
5050
|
+
return t11;
|
|
5036
5051
|
};
|
|
5037
5052
|
function _temp$t(value) {
|
|
5038
5053
|
return compare.empty(value) || value === "-" || value === "." ? undefined : Number(value);
|
package/package.json
CHANGED