@visns-studio/visns-components 3.8.6 → 3.8.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.
@@ -701,11 +701,9 @@ function Field({
701
701
  : true
702
702
  }
703
703
  decimalSeparator={
704
- settings.type === 'decimal' ? '.' : undefined
705
- }
706
- decimalScale={
707
- settings.type === 'decimal' ? 2 : undefined
704
+ settings.type === 'decimal' ? '.' : '.'
708
705
  }
706
+ decimalScale={settings.type === 'decimal' ? 2 : 2}
709
707
  value={
710
708
  inputValue && inputValue !== 'null'
711
709
  ? inputValue
@@ -920,12 +918,28 @@ function Field({
920
918
  alignItems: 'center',
921
919
  }}
922
920
  >
921
+ <label
922
+ htmlFor={settings.id}
923
+ style={{
924
+ padding: '6px 12px',
925
+ border: '1px solid #ccc',
926
+ display: 'inline-block',
927
+ backgroundColor: '#f8f8f8',
928
+ cursor: 'pointer',
929
+ }}
930
+ >
931
+ Choose file...
932
+ </label>
923
933
  <input
934
+ id={settings.id}
924
935
  type="file"
925
- data-name={settings.id}
926
- className={inputClass[settings.id]}
936
+ className={inputClass[settings.id]} // Ensure inputClass is defined or passed
927
937
  onChange={onChange}
928
- />{' '}
938
+ style={{ display: 'none' }}
939
+ />
940
+ <span style={{ marginLeft: '10px' }}>
941
+ {inputValue.filename}
942
+ </span>
929
943
  {inputValue &&
930
944
  inputValue.key &&
931
945
  inputValue.uuid && (
@@ -940,7 +954,6 @@ function Field({
940
954
  }
941
955
  onClick={(e) => {
942
956
  e.preventDefault();
943
-
944
957
  onFileDownload(inputValue);
945
958
  }}
946
959
  >
@@ -208,6 +208,10 @@ const GenericDynamic = ({
208
208
  setActiveForm((prevState) => updateField(prevState, id, value));
209
209
  };
210
210
 
211
+ const handleChangeNumberFormat = (value, id) => {
212
+ setActiveForm((prevState) => updateField(prevState, id, value.value));
213
+ };
214
+
211
215
  const handleChangeToggle = (e) => {
212
216
  if (!e) {
213
217
  return;
@@ -648,6 +652,9 @@ const GenericDynamic = ({
648
652
  onChangeDate={
649
653
  handleChangeDate
650
654
  }
655
+ onChangeNumberFormat={
656
+ handleChangeNumberFormat
657
+ }
651
658
  onChangeToggle={
652
659
  handleChangeToggle
653
660
  }
package/package.json CHANGED
@@ -12,7 +12,7 @@
12
12
  "awesome-debounce-promise": "^2.1.0",
13
13
  "axios": "^1.6.8",
14
14
  "file-saver": "^2.0.5",
15
- "framer-motion": "^11.0.24",
15
+ "framer-motion": "^11.1.7",
16
16
  "html-react-parser": "^5.1.10",
17
17
  "lodash": "^4.17.21",
18
18
  "lodash.debounce": "^4.0.8",
@@ -24,7 +24,7 @@
24
24
  "react-color": "^2.19.3",
25
25
  "react-confirm-alert": "^3.0.6",
26
26
  "react-copy-to-clipboard": "^5.1.0",
27
- "react-datepicker": "^6.6.0",
27
+ "react-datepicker": "^6.9.0",
28
28
  "react-dropzone": "^14.2.3",
29
29
  "react-number-format": "^5.3.4",
30
30
  "react-password-strength-bar": "^0.4.1",
@@ -54,7 +54,7 @@
54
54
  "react-dom": "^17.0.1"
55
55
  },
56
56
  "name": "@visns-studio/visns-components",
57
- "version": "3.8.6",
57
+ "version": "3.8.7",
58
58
  "description": "Various packages to assist in the development of our Custom Applications.",
59
59
  "main": "index.js",
60
60
  "scripts": {