@pdg/react-form 1.2.6 → 1.2.7

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 CHANGED
@@ -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(69);
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
- if ($[19] !== strValueRef) {
4818
- t2 = function t2(newValue) {
4819
- _setStrValue(newValue);
4820
- strValueRef.current = newValue;
4817
+ var t3;
4818
+ if ($[19] !== initValue) {
4819
+ t2 = function t2() {
4820
+ return _setStrValue(initValue !== undefined ? "".concat(initValue) : "");
4821
4821
  };
4822
- $[19] = strValueRef;
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 = t2;
4842
+ var setStrValue = t4;
4828
4843
  var newSlotProps;
4829
- if ($[21] !== allowDecimal || $[22] !== allowNegative || $[23] !== decimalScale || $[24] !== initSlotProps || $[25] !== prefix || $[26] !== readOnly || $[27] !== suffix || $[28] !== tabIndex || $[29] !== thousandSeparator) {
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 ($[31] !== allowDecimal || $[32] !== decimalScale || $[33] !== prefix || $[34] !== suffix || $[35] !== _t2 || $[36] !== _t3 || $[37] !== _t4 || $[38] !== _t5 || $[39] !== thousandSeparator) {
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
- $[31] = allowDecimal;
4855
- $[32] = decimalScale;
4856
- $[33] = prefix;
4857
- $[34] = suffix;
4858
- $[35] = _t2;
4859
- $[36] = _t3;
4860
- $[37] = _t4;
4861
- $[38] = _t5;
4862
- $[39] = thousandSeparator;
4863
- $[40] = inputProps;
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 = $[40];
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
- $[21] = allowDecimal;
4872
- $[22] = allowNegative;
4873
- $[23] = decimalScale;
4874
- $[24] = initSlotProps;
4875
- $[25] = prefix;
4876
- $[26] = readOnly;
4877
- $[27] = suffix;
4878
- $[28] = tabIndex;
4879
- $[29] = thousandSeparator;
4880
- $[30] = newSlotProps;
4881
- } else {
4882
- newSlotProps = $[30];
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 t3;
4887
- if ($[41] !== onChangeRef || $[42] !== setStrValue || $[43] !== strValueRef) {
4888
- t3 = function t3(value_0) {
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
- $[41] = onChangeRef;
4919
- $[42] = setStrValue;
4920
- $[43] = strValueRef;
4921
- $[44] = t3;
4933
+ $[44] = onChangeRef;
4934
+ $[45] = setStrValue;
4935
+ $[46] = strValueRef;
4936
+ $[47] = t5;
4922
4937
  } else {
4923
- t3 = $[44];
4938
+ t5 = $[47];
4924
4939
  }
4925
- var handleChange = t3;
4926
- var t4;
4927
- if ($[45] !== onValueRef) {
4928
- t4 = function t4(value_1) {
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
- $[45] = onValueRef;
4936
- $[46] = t4;
4950
+ $[48] = onValueRef;
4951
+ $[49] = t6;
4937
4952
  } else {
4938
- t4 = $[46];
4953
+ t6 = $[49];
4939
4954
  }
4940
- var handleValue = t4;
4941
- var t5;
4942
- if ($[47] !== onValidateRef) {
4943
- t5 = function t5(value_2) {
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
- $[47] = onValidateRef;
4952
- $[48] = t5;
4966
+ $[50] = onValidateRef;
4967
+ $[51] = t7;
4953
4968
  } else {
4954
- t5 = $[48];
4969
+ t7 = $[51];
4955
4970
  }
4956
- var handleValidate = t5;
4957
- var t6;
4958
- if ($[49] !== initValueRef || $[50] !== onChangeRef || $[51] !== ref || $[52] !== setStrValue || $[53] !== strValueRef) {
4959
- t6 = function t6(commands) {
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
- $[49] = initValueRef;
4987
- $[50] = onChangeRef;
4988
- $[51] = ref;
4989
- $[52] = setStrValue;
4990
- $[53] = strValueRef;
4991
- $[54] = t6;
5001
+ $[52] = initValueRef;
5002
+ $[53] = onChangeRef;
5003
+ $[54] = ref;
5004
+ $[55] = setStrValue;
5005
+ $[56] = strValueRef;
5006
+ $[57] = t8;
4992
5007
  } else {
4993
- t6 = $[54];
5008
+ t8 = $[57];
4994
5009
  }
4995
- var handleRef = t6;
4996
- var t7;
4997
- if ($[55] !== className) {
4998
- t7 = classNames(className, "PFormNumber");
4999
- $[55] = className;
5000
- $[56] = t7;
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
- t7 = $[56];
5017
+ t9 = $[59];
5003
5018
  }
5004
- var t8 = strValue === "" || strValue === undefined ? labelShrink : true;
5005
- var t9;
5006
- if ($[57] !== clear || $[58] !== handleChange || $[59] !== handleRef || $[60] !== handleValidate || $[61] !== handleValue || $[62] !== props || $[63] !== readOnly || $[64] !== slotProps || $[65] !== strValue || $[66] !== t7 || $[67] !== t8) {
5007
- t9 = /*#__PURE__*/React.createElement(PFormTextField, _extends({
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: t7,
5024
+ className: t9,
5010
5025
  disableReturnKey: true,
5011
- labelShrink: t8,
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
- $[57] = clear;
5021
- $[58] = handleChange;
5022
- $[59] = handleRef;
5023
- $[60] = handleValidate;
5024
- $[61] = handleValue;
5025
- $[62] = props;
5026
- $[63] = readOnly;
5027
- $[64] = slotProps;
5028
- $[65] = strValue;
5029
- $[66] = t7;
5030
- $[67] = t8;
5031
- $[68] = t9;
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
- t9 = $[68];
5048
+ t11 = $[71];
5034
5049
  }
5035
- return t9;
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
@@ -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(69);
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
- if ($[19] !== strValueRef) {
4818
- t2 = function t2(newValue) {
4819
- _setStrValue(newValue);
4820
- strValueRef.current = newValue;
4817
+ var t3;
4818
+ if ($[19] !== initValue) {
4819
+ t2 = function t2() {
4820
+ return _setStrValue(initValue !== undefined ? "".concat(initValue) : "");
4821
4821
  };
4822
- $[19] = strValueRef;
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 = t2;
4842
+ var setStrValue = t4;
4828
4843
  var newSlotProps;
4829
- if ($[21] !== allowDecimal || $[22] !== allowNegative || $[23] !== decimalScale || $[24] !== initSlotProps || $[25] !== prefix || $[26] !== readOnly || $[27] !== suffix || $[28] !== tabIndex || $[29] !== thousandSeparator) {
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 ($[31] !== allowDecimal || $[32] !== decimalScale || $[33] !== prefix || $[34] !== suffix || $[35] !== _t2 || $[36] !== _t3 || $[37] !== _t4 || $[38] !== _t5 || $[39] !== thousandSeparator) {
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
- $[31] = allowDecimal;
4855
- $[32] = decimalScale;
4856
- $[33] = prefix;
4857
- $[34] = suffix;
4858
- $[35] = _t2;
4859
- $[36] = _t3;
4860
- $[37] = _t4;
4861
- $[38] = _t5;
4862
- $[39] = thousandSeparator;
4863
- $[40] = inputProps;
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 = $[40];
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
- $[21] = allowDecimal;
4872
- $[22] = allowNegative;
4873
- $[23] = decimalScale;
4874
- $[24] = initSlotProps;
4875
- $[25] = prefix;
4876
- $[26] = readOnly;
4877
- $[27] = suffix;
4878
- $[28] = tabIndex;
4879
- $[29] = thousandSeparator;
4880
- $[30] = newSlotProps;
4881
- } else {
4882
- newSlotProps = $[30];
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 t3;
4887
- if ($[41] !== onChangeRef || $[42] !== setStrValue || $[43] !== strValueRef) {
4888
- t3 = function t3(value_0) {
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
- $[41] = onChangeRef;
4919
- $[42] = setStrValue;
4920
- $[43] = strValueRef;
4921
- $[44] = t3;
4933
+ $[44] = onChangeRef;
4934
+ $[45] = setStrValue;
4935
+ $[46] = strValueRef;
4936
+ $[47] = t5;
4922
4937
  } else {
4923
- t3 = $[44];
4938
+ t5 = $[47];
4924
4939
  }
4925
- var handleChange = t3;
4926
- var t4;
4927
- if ($[45] !== onValueRef) {
4928
- t4 = function t4(value_1) {
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
- $[45] = onValueRef;
4936
- $[46] = t4;
4950
+ $[48] = onValueRef;
4951
+ $[49] = t6;
4937
4952
  } else {
4938
- t4 = $[46];
4953
+ t6 = $[49];
4939
4954
  }
4940
- var handleValue = t4;
4941
- var t5;
4942
- if ($[47] !== onValidateRef) {
4943
- t5 = function t5(value_2) {
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
- $[47] = onValidateRef;
4952
- $[48] = t5;
4966
+ $[50] = onValidateRef;
4967
+ $[51] = t7;
4953
4968
  } else {
4954
- t5 = $[48];
4969
+ t7 = $[51];
4955
4970
  }
4956
- var handleValidate = t5;
4957
- var t6;
4958
- if ($[49] !== initValueRef || $[50] !== onChangeRef || $[51] !== ref || $[52] !== setStrValue || $[53] !== strValueRef) {
4959
- t6 = function t6(commands) {
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
- $[49] = initValueRef;
4987
- $[50] = onChangeRef;
4988
- $[51] = ref;
4989
- $[52] = setStrValue;
4990
- $[53] = strValueRef;
4991
- $[54] = t6;
5001
+ $[52] = initValueRef;
5002
+ $[53] = onChangeRef;
5003
+ $[54] = ref;
5004
+ $[55] = setStrValue;
5005
+ $[56] = strValueRef;
5006
+ $[57] = t8;
4992
5007
  } else {
4993
- t6 = $[54];
5008
+ t8 = $[57];
4994
5009
  }
4995
- var handleRef = t6;
4996
- var t7;
4997
- if ($[55] !== className) {
4998
- t7 = classNames(className, "PFormNumber");
4999
- $[55] = className;
5000
- $[56] = t7;
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
- t7 = $[56];
5017
+ t9 = $[59];
5003
5018
  }
5004
- var t8 = strValue === "" || strValue === undefined ? labelShrink : true;
5005
- var t9;
5006
- if ($[57] !== clear || $[58] !== handleChange || $[59] !== handleRef || $[60] !== handleValidate || $[61] !== handleValue || $[62] !== props || $[63] !== readOnly || $[64] !== slotProps || $[65] !== strValue || $[66] !== t7 || $[67] !== t8) {
5007
- t9 = /*#__PURE__*/React.createElement(PFormTextField, _extends({
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: t7,
5024
+ className: t9,
5010
5025
  disableReturnKey: true,
5011
- labelShrink: t8,
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
- $[57] = clear;
5021
- $[58] = handleChange;
5022
- $[59] = handleRef;
5023
- $[60] = handleValidate;
5024
- $[61] = handleValue;
5025
- $[62] = props;
5026
- $[63] = readOnly;
5027
- $[64] = slotProps;
5028
- $[65] = strValue;
5029
- $[66] = t7;
5030
- $[67] = t8;
5031
- $[68] = t9;
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
- t9 = $[68];
5048
+ t11 = $[71];
5034
5049
  }
5035
- return t9;
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
@@ -2,7 +2,7 @@
2
2
  "name": "@pdg/react-form",
3
3
  "title": "Typescript React Form Module",
4
4
  "description": "Typescript React Form Module",
5
- "version": "1.2.6",
5
+ "version": "1.2.7",
6
6
  "type": "module",
7
7
  "main": "./dist/index.js",
8
8
  "module": "./dist/index.esm.js",