@visns-studio/visns-components 5.13.6 → 5.13.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/package.json
CHANGED
|
@@ -24,19 +24,20 @@
|
|
|
24
24
|
"dayjs": "^1.11.13",
|
|
25
25
|
"fabric": "^6.7.0",
|
|
26
26
|
"file-saver": "^2.0.5",
|
|
27
|
-
"framer-motion": "^12.23.
|
|
27
|
+
"framer-motion": "^12.23.1",
|
|
28
28
|
"html-react-parser": "^5.2.5",
|
|
29
29
|
"lodash": "^4.17.21",
|
|
30
30
|
"lodash.debounce": "^4.0.8",
|
|
31
31
|
"lucide-react": "^0.525.0",
|
|
32
32
|
"moment": "^2.30.1",
|
|
33
|
-
"motion": "^12.23.
|
|
33
|
+
"motion": "^12.23.1",
|
|
34
34
|
"numeral": "^2.0.6",
|
|
35
35
|
"pluralize": "^8.0.0",
|
|
36
36
|
"qrcode.react": "^4.2.0",
|
|
37
37
|
"quill-image-uploader": "^1.3.0",
|
|
38
38
|
"react-big-calendar": "^1.19.4",
|
|
39
39
|
"react-copy-to-clipboard": "^5.1.0",
|
|
40
|
+
"react-currency-input-field": "^3.10.0",
|
|
40
41
|
"react-datepicker": "^8.4.0",
|
|
41
42
|
"react-dropzone": "^14.3.8",
|
|
42
43
|
"react-grid-gallery": "^1.0.1",
|
|
@@ -87,7 +88,7 @@
|
|
|
87
88
|
"react-dom": "^17.0.0 || ^18.0.0"
|
|
88
89
|
},
|
|
89
90
|
"name": "@visns-studio/visns-components",
|
|
90
|
-
"version": "5.13.
|
|
91
|
+
"version": "5.13.7",
|
|
91
92
|
"description": "Various packages to assist in the development of our Custom Applications.",
|
|
92
93
|
"main": "src/index.js",
|
|
93
94
|
"files": [
|
|
@@ -5,6 +5,7 @@ import { toast } from 'react-toastify';
|
|
|
5
5
|
import { Trash2, ArrowUp, ArrowDown, Copy, Droplets } from 'lucide-react';
|
|
6
6
|
import { Compact } from '@uiw/react-color';
|
|
7
7
|
import { confirmDialog } from '../utils/ConfirmDialog';
|
|
8
|
+
import CurrencyInput from 'react-currency-input-field';
|
|
8
9
|
|
|
9
10
|
import CustomFetch from '../Fetch';
|
|
10
11
|
import MultiSelect from '../MultiSelect';
|
|
@@ -920,6 +921,27 @@ const GenericEditableTable = ({
|
|
|
920
921
|
// For other colour columns, picker is rendered in the action column
|
|
921
922
|
return null;
|
|
922
923
|
case 'currency':
|
|
924
|
+
return (
|
|
925
|
+
<CurrencyInput
|
|
926
|
+
id={`currency-${column.id}-${keyCounter}`}
|
|
927
|
+
name={column.id}
|
|
928
|
+
placeholder="$0.00"
|
|
929
|
+
defaultValue={entry[column.id] || ''}
|
|
930
|
+
decimalsLimit={2}
|
|
931
|
+
prefix="$"
|
|
932
|
+
decimalSeparator="."
|
|
933
|
+
groupSeparator=","
|
|
934
|
+
onValueChange={(value) =>
|
|
935
|
+
handleFieldChange(
|
|
936
|
+
value || '',
|
|
937
|
+
column.id,
|
|
938
|
+
keyCounter
|
|
939
|
+
)
|
|
940
|
+
}
|
|
941
|
+
style={{ textAlign: 'right', width: '100%' }}
|
|
942
|
+
readOnly={column.readOnly || false}
|
|
943
|
+
/>
|
|
944
|
+
);
|
|
923
945
|
case 'number':
|
|
924
946
|
return (
|
|
925
947
|
<input
|
|
@@ -1076,6 +1098,26 @@ const GenericEditableTable = ({
|
|
|
1076
1098
|
// For other colour columns, picker is rendered in the action column
|
|
1077
1099
|
return null;
|
|
1078
1100
|
case 'currency':
|
|
1101
|
+
return (
|
|
1102
|
+
<CurrencyInput
|
|
1103
|
+
id={`new-currency-${column.id}-${groupId || 'default'}`}
|
|
1104
|
+
name={column.id}
|
|
1105
|
+
placeholder="$0.00"
|
|
1106
|
+
defaultValue={value || ''}
|
|
1107
|
+
decimalsLimit={2}
|
|
1108
|
+
prefix="$"
|
|
1109
|
+
decimalSeparator="."
|
|
1110
|
+
groupSeparator=","
|
|
1111
|
+
onValueChange={(value) =>
|
|
1112
|
+
handleNewFieldChange(
|
|
1113
|
+
value || '',
|
|
1114
|
+
column.id,
|
|
1115
|
+
groupId
|
|
1116
|
+
)
|
|
1117
|
+
}
|
|
1118
|
+
style={{ textAlign: 'right', width: '100%' }}
|
|
1119
|
+
/>
|
|
1120
|
+
);
|
|
1079
1121
|
case 'number':
|
|
1080
1122
|
return (
|
|
1081
1123
|
<input
|