@fctc/sme-widget-ui 1.5.1 → 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
@@ -32946,7 +32946,7 @@ var FileUploadField = (props) => {
32946
32946
  model,
32947
32947
  widget,
32948
32948
  useUploadImage,
32949
- useUploadFile: useUploadFileExcel
32949
+ useUploadFileExcel
32950
32950
  }
32951
32951
  ),
32952
32952
  error2 && /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message })
@@ -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
@@ -32827,7 +32827,7 @@ var FileUploadField = (props) => {
32827
32827
  model,
32828
32828
  widget,
32829
32829
  useUploadImage,
32830
- useUploadFile: useUploadFileExcel
32830
+ useUploadFileExcel
32831
32831
  }
32832
32832
  ),
32833
32833
  error2 && /* @__PURE__ */ jsx85("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message })
@@ -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
@@ -32572,7 +32572,7 @@ var FileUploadField = (props) => {
32572
32572
  model,
32573
32573
  widget,
32574
32574
  useUploadImage,
32575
- useUploadFile: useUploadFileExcel
32575
+ useUploadFileExcel
32576
32576
  }
32577
32577
  ),
32578
32578
  error2 && /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message })
@@ -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
@@ -32509,7 +32509,7 @@ var FileUploadField = (props) => {
32509
32509
  model,
32510
32510
  widget,
32511
32511
  useUploadImage,
32512
- useUploadFile: useUploadFileExcel
32512
+ useUploadFileExcel
32513
32513
  }
32514
32514
  ),
32515
32515
  error2 && /* @__PURE__ */ jsx85("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message })
@@ -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.1",
3
+ "version": "1.5.3",
4
4
  "main": "dist/index.cjs",
5
5
  "module": "dist/index.mjs",
6
6
  "types": "dist/index.d.ts",