@fctc/sme-widget-ui 1.5.2 → 1.5.3

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.js CHANGED
@@ -32993,13 +32993,16 @@ var FloatField = (props) => {
32993
32993
  value !== void 0 && value !== null ? formatFloatNumber(value) : ""
32994
32994
  );
32995
32995
  (0, import_react55.useEffect)(() => {
32996
- if (value !== void 0 && value !== null && value !== parseFloat(inputValue?.replace(/,/g, ""))) {
32996
+ if (propValue !== void 0 && propValue !== null && propValue !== parseFloat(inputValue?.replace(/,/g, ""))) {
32997
+ setInputValue(formatFloatNumber(propValue));
32998
+ clearErrors(name2);
32999
+ } else if (value !== void 0 && value !== null && value !== parseFloat(inputValue?.replace(/,/g, ""))) {
32997
33000
  setInputValue(formatFloatNumber(value));
32998
33001
  clearErrors(name2);
32999
33002
  } else if (value === null || value === void 0) {
33000
33003
  setInputValue("");
33001
33004
  }
33002
- }, [value, name2, clearErrors]);
33005
+ }, [value, name2, clearErrors, propValue]);
33003
33006
  const isDirtyRef = (0, import_react55.useRef)(false);
33004
33007
  const inputRef = (0, import_react55.useRef)(null);
33005
33008
  const lastCommittedValueRef = (0, import_react55.useRef)(null);
package/dist/index.mjs CHANGED
@@ -32874,13 +32874,16 @@ var FloatField = (props) => {
32874
32874
  value !== void 0 && value !== null ? formatFloatNumber(value) : ""
32875
32875
  );
32876
32876
  useEffect17(() => {
32877
- if (value !== void 0 && value !== null && value !== parseFloat(inputValue?.replace(/,/g, ""))) {
32877
+ if (propValue !== void 0 && propValue !== null && propValue !== parseFloat(inputValue?.replace(/,/g, ""))) {
32878
+ setInputValue(formatFloatNumber(propValue));
32879
+ clearErrors(name2);
32880
+ } else if (value !== void 0 && value !== null && value !== parseFloat(inputValue?.replace(/,/g, ""))) {
32878
32881
  setInputValue(formatFloatNumber(value));
32879
32882
  clearErrors(name2);
32880
32883
  } else if (value === null || value === void 0) {
32881
32884
  setInputValue("");
32882
32885
  }
32883
- }, [value, name2, clearErrors]);
32886
+ }, [value, name2, clearErrors, propValue]);
32884
32887
  const isDirtyRef = useRef15(false);
32885
32888
  const inputRef = useRef15(null);
32886
32889
  const lastCommittedValueRef = useRef15(null);
package/dist/widgets.js CHANGED
@@ -32619,13 +32619,16 @@ var FloatField = (props) => {
32619
32619
  value !== void 0 && value !== null ? formatFloatNumber(value) : ""
32620
32620
  );
32621
32621
  (0, import_react55.useEffect)(() => {
32622
- if (value !== void 0 && value !== null && value !== parseFloat(inputValue?.replace(/,/g, ""))) {
32622
+ if (propValue !== void 0 && propValue !== null && propValue !== parseFloat(inputValue?.replace(/,/g, ""))) {
32623
+ setInputValue(formatFloatNumber(propValue));
32624
+ clearErrors(name2);
32625
+ } else if (value !== void 0 && value !== null && value !== parseFloat(inputValue?.replace(/,/g, ""))) {
32623
32626
  setInputValue(formatFloatNumber(value));
32624
32627
  clearErrors(name2);
32625
32628
  } else if (value === null || value === void 0) {
32626
32629
  setInputValue("");
32627
32630
  }
32628
- }, [value, name2, clearErrors]);
32631
+ }, [value, name2, clearErrors, propValue]);
32629
32632
  const isDirtyRef = (0, import_react55.useRef)(false);
32630
32633
  const inputRef = (0, import_react55.useRef)(null);
32631
32634
  const lastCommittedValueRef = (0, import_react55.useRef)(null);
package/dist/widgets.mjs CHANGED
@@ -32556,13 +32556,16 @@ var FloatField = (props) => {
32556
32556
  value !== void 0 && value !== null ? formatFloatNumber(value) : ""
32557
32557
  );
32558
32558
  useEffect17(() => {
32559
- if (value !== void 0 && value !== null && value !== parseFloat(inputValue?.replace(/,/g, ""))) {
32559
+ if (propValue !== void 0 && propValue !== null && propValue !== parseFloat(inputValue?.replace(/,/g, ""))) {
32560
+ setInputValue(formatFloatNumber(propValue));
32561
+ clearErrors(name2);
32562
+ } else if (value !== void 0 && value !== null && value !== parseFloat(inputValue?.replace(/,/g, ""))) {
32560
32563
  setInputValue(formatFloatNumber(value));
32561
32564
  clearErrors(name2);
32562
32565
  } else if (value === null || value === void 0) {
32563
32566
  setInputValue("");
32564
32567
  }
32565
- }, [value, name2, clearErrors]);
32568
+ }, [value, name2, clearErrors, propValue]);
32566
32569
  const isDirtyRef = useRef15(false);
32567
32570
  const inputRef = useRef15(null);
32568
32571
  const lastCommittedValueRef = useRef15(null);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fctc/sme-widget-ui",
3
- "version": "1.5.2",
3
+ "version": "1.5.3",
4
4
  "main": "dist/index.cjs",
5
5
  "module": "dist/index.mjs",
6
6
  "types": "dist/index.d.ts",