@fctc/sme-widget-ui 3.10.1 → 3.10.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
@@ -17038,13 +17038,7 @@ var BinaryField = (props) => {
17038
17038
  name: name ?? "",
17039
17039
  control: methods?.control,
17040
17040
  rules: {
17041
- required: required && !invisible ? { value: true, message: `${string} ${t3("must_required")}` } : false,
17042
- validate: {
17043
- fileValidate: (value2) => {
17044
- if (!value2) return true;
17045
- return validateFile(value2);
17046
- }
17047
- }
17041
+ required: required && !invisible ? { value: true, message: `${string} ${t3("must_required")}` } : false
17048
17042
  },
17049
17043
  render: ({ fieldState: { error: error2 } }) => {
17050
17044
  console.log("error", error2);
@@ -31798,9 +31792,14 @@ var DateField = (props) => {
31798
31792
  });
31799
31793
  return;
31800
31794
  }
31801
- const formattedDate = adjustedDate.subtract(7, "hours").format(formatDateParse);
31802
31795
  field.onChange(adjustedDate.format(formatDateParse));
31803
- handleOnchange && handleOnchange(name ?? "", formattedDate);
31796
+ if (showTime) {
31797
+ const formattedDate = adjustedDate.subtract(7, "hours").format(formatDateParse);
31798
+ handleOnchange && handleOnchange(name ?? "", formattedDate);
31799
+ } else {
31800
+ const formattedDateWithoutTime = adjustedDate.format(formatDateParse);
31801
+ handleOnchange && handleOnchange(name ?? "", formattedDateWithoutTime);
31802
+ }
31804
31803
  clearErrors(name);
31805
31804
  } else {
31806
31805
  field.onChange(null);
package/dist/index.mjs CHANGED
@@ -16911,13 +16911,7 @@ var BinaryField = (props) => {
16911
16911
  name: name ?? "",
16912
16912
  control: methods?.control,
16913
16913
  rules: {
16914
- required: required && !invisible ? { value: true, message: `${string} ${t3("must_required")}` } : false,
16915
- validate: {
16916
- fileValidate: (value2) => {
16917
- if (!value2) return true;
16918
- return validateFile(value2);
16919
- }
16920
- }
16914
+ required: required && !invisible ? { value: true, message: `${string} ${t3("must_required")}` } : false
16921
16915
  },
16922
16916
  render: ({ fieldState: { error: error2 } }) => {
16923
16917
  console.log("error", error2);
@@ -31671,9 +31665,14 @@ var DateField = (props) => {
31671
31665
  });
31672
31666
  return;
31673
31667
  }
31674
- const formattedDate = adjustedDate.subtract(7, "hours").format(formatDateParse);
31675
31668
  field.onChange(adjustedDate.format(formatDateParse));
31676
- handleOnchange && handleOnchange(name ?? "", formattedDate);
31669
+ if (showTime) {
31670
+ const formattedDate = adjustedDate.subtract(7, "hours").format(formatDateParse);
31671
+ handleOnchange && handleOnchange(name ?? "", formattedDate);
31672
+ } else {
31673
+ const formattedDateWithoutTime = adjustedDate.format(formatDateParse);
31674
+ handleOnchange && handleOnchange(name ?? "", formattedDateWithoutTime);
31675
+ }
31677
31676
  clearErrors(name);
31678
31677
  } else {
31679
31678
  field.onChange(null);
package/dist/widgets.js CHANGED
@@ -16266,13 +16266,7 @@ var BinaryField = (props) => {
16266
16266
  name: name ?? "",
16267
16267
  control: methods?.control,
16268
16268
  rules: {
16269
- required: required && !invisible ? { value: true, message: `${string} ${t3("must_required")}` } : false,
16270
- validate: {
16271
- fileValidate: (value2) => {
16272
- if (!value2) return true;
16273
- return validateFile(value2);
16274
- }
16275
- }
16269
+ required: required && !invisible ? { value: true, message: `${string} ${t3("must_required")}` } : false
16276
16270
  },
16277
16271
  render: ({ fieldState: { error: error2 } }) => {
16278
16272
  console.log("error", error2);
@@ -31026,9 +31020,14 @@ var DateField = (props) => {
31026
31020
  });
31027
31021
  return;
31028
31022
  }
31029
- const formattedDate = adjustedDate.subtract(7, "hours").format(formatDateParse);
31030
31023
  field.onChange(adjustedDate.format(formatDateParse));
31031
- handleOnchange && handleOnchange(name ?? "", formattedDate);
31024
+ if (showTime) {
31025
+ const formattedDate = adjustedDate.subtract(7, "hours").format(formatDateParse);
31026
+ handleOnchange && handleOnchange(name ?? "", formattedDate);
31027
+ } else {
31028
+ const formattedDateWithoutTime = adjustedDate.format(formatDateParse);
31029
+ handleOnchange && handleOnchange(name ?? "", formattedDateWithoutTime);
31030
+ }
31032
31031
  clearErrors(name);
31033
31032
  } else {
31034
31033
  field.onChange(null);
package/dist/widgets.mjs CHANGED
@@ -16203,13 +16203,7 @@ var BinaryField = (props) => {
16203
16203
  name: name ?? "",
16204
16204
  control: methods?.control,
16205
16205
  rules: {
16206
- required: required && !invisible ? { value: true, message: `${string} ${t3("must_required")}` } : false,
16207
- validate: {
16208
- fileValidate: (value2) => {
16209
- if (!value2) return true;
16210
- return validateFile(value2);
16211
- }
16212
- }
16206
+ required: required && !invisible ? { value: true, message: `${string} ${t3("must_required")}` } : false
16213
16207
  },
16214
16208
  render: ({ fieldState: { error: error2 } }) => {
16215
16209
  console.log("error", error2);
@@ -30963,9 +30957,14 @@ var DateField = (props) => {
30963
30957
  });
30964
30958
  return;
30965
30959
  }
30966
- const formattedDate = adjustedDate.subtract(7, "hours").format(formatDateParse);
30967
30960
  field.onChange(adjustedDate.format(formatDateParse));
30968
- handleOnchange && handleOnchange(name ?? "", formattedDate);
30961
+ if (showTime) {
30962
+ const formattedDate = adjustedDate.subtract(7, "hours").format(formatDateParse);
30963
+ handleOnchange && handleOnchange(name ?? "", formattedDate);
30964
+ } else {
30965
+ const formattedDateWithoutTime = adjustedDate.format(formatDateParse);
30966
+ handleOnchange && handleOnchange(name ?? "", formattedDateWithoutTime);
30967
+ }
30969
30968
  clearErrors(name);
30970
30969
  } else {
30971
30970
  field.onChange(null);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fctc/sme-widget-ui",
3
- "version": "3.10.1",
3
+ "version": "3.10.3",
4
4
  "main": "dist/index.cjs",
5
5
  "module": "dist/index.mjs",
6
6
  "types": "dist/index.d.ts",