@visns-studio/visns-components 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.
|
@@ -65,7 +65,15 @@ const VisnsAutocomplete = (props) => {
|
|
|
65
65
|
});
|
|
66
66
|
|
|
67
67
|
const handleItemClicked = (place) => {
|
|
68
|
-
|
|
68
|
+
const address =
|
|
69
|
+
place.address !== undefined && place.address !== null
|
|
70
|
+
? place.address
|
|
71
|
+
: "";
|
|
72
|
+
const text =
|
|
73
|
+
place.text !== undefined && place.text !== null ? place.text : "";
|
|
74
|
+
|
|
75
|
+
const search = address && text ? `${address} ${text}` : text;
|
|
76
|
+
setSearch(search);
|
|
69
77
|
setResults([]);
|
|
70
78
|
onSelect(place, field);
|
|
71
79
|
};
|
|
@@ -269,22 +269,18 @@ function Form(props) {
|
|
|
269
269
|
|
|
270
270
|
const autocompleteSelect = (place, id) => {
|
|
271
271
|
const { address, text, context } = place;
|
|
272
|
-
const address1 =
|
|
273
|
-
address !== undefined && address ? address + " " + text : text;
|
|
274
|
-
let address2 = "";
|
|
275
|
-
let suburb = "";
|
|
276
|
-
let postcode = "";
|
|
277
|
-
let state = "";
|
|
278
|
-
let country = "";
|
|
279
|
-
|
|
280
|
-
if (context[1]) {
|
|
281
|
-
suburb = context[1].text;
|
|
282
|
-
}
|
|
283
272
|
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
273
|
+
const address1 = address
|
|
274
|
+
? text
|
|
275
|
+
? `${address} ${text}`
|
|
276
|
+
: address
|
|
277
|
+
: text;
|
|
278
|
+
const address2 = "";
|
|
279
|
+
const suburb = context[1]?.text || "";
|
|
280
|
+
const postcode = context[0]?.text || "";
|
|
287
281
|
|
|
282
|
+
let state = "";
|
|
283
|
+
let country = "";
|
|
288
284
|
if (context.length === 5) {
|
|
289
285
|
[state, country] = [context[3]?.text, context[4]?.text];
|
|
290
286
|
} else {
|
|
@@ -300,34 +296,19 @@ function Form(props) {
|
|
|
300
296
|
country,
|
|
301
297
|
};
|
|
302
298
|
|
|
303
|
-
if (formData.same_address === true) {
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
postal_postcode: postcode,
|
|
311
|
-
postal_state: state,
|
|
312
|
-
postal_country: country,
|
|
313
|
-
}));
|
|
314
|
-
} else if (id === "address1") {
|
|
315
|
-
setFormData((prevState) => ({
|
|
316
|
-
...prevState,
|
|
317
|
-
...formDataUpdate,
|
|
318
|
-
}));
|
|
319
|
-
} else {
|
|
320
|
-
setFormData((prevState) => ({
|
|
321
|
-
...prevState,
|
|
322
|
-
...formDataUpdate,
|
|
323
|
-
postal_address1: address1,
|
|
324
|
-
postal_address2: address2,
|
|
325
|
-
postal_suburb: suburb,
|
|
326
|
-
postal_postcode: postcode,
|
|
327
|
-
postal_state: state,
|
|
328
|
-
postal_country: country,
|
|
329
|
-
}));
|
|
299
|
+
if (formData.same_address === true || id !== "address1") {
|
|
300
|
+
formDataUpdate.postal_address1 = address1;
|
|
301
|
+
formDataUpdate.postal_address2 = address2;
|
|
302
|
+
formDataUpdate.postal_suburb = suburb;
|
|
303
|
+
formDataUpdate.postal_postcode = postcode;
|
|
304
|
+
formDataUpdate.postal_state = state;
|
|
305
|
+
formDataUpdate.postal_country = country;
|
|
330
306
|
}
|
|
307
|
+
|
|
308
|
+
setFormData((prevState) => ({
|
|
309
|
+
...prevState,
|
|
310
|
+
...formDataUpdate,
|
|
311
|
+
}));
|
|
331
312
|
};
|
|
332
313
|
|
|
333
314
|
const handleSubmit = (e) => {
|
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
import React, { useEffect, useState } from "react";
|
|
2
2
|
import { Link, useLocation } from "react-router-dom";
|
|
3
3
|
import {
|
|
4
|
+
ArrowCycle,
|
|
5
|
+
BookClose,
|
|
4
6
|
Bug,
|
|
7
|
+
Calendar,
|
|
8
|
+
Clipboard,
|
|
5
9
|
DoubleSword,
|
|
6
10
|
Draft,
|
|
7
11
|
Grid,
|
|
12
|
+
LightBulb,
|
|
8
13
|
PeopleGroup,
|
|
9
14
|
Person,
|
|
10
15
|
SettingsVertical,
|
|
@@ -33,6 +38,7 @@ function Navigation({ logo, logout, navConfig, setSystemAuth, userProfile }) {
|
|
|
33
38
|
const renderSetting = (n) => {
|
|
34
39
|
const iconComponents = {
|
|
35
40
|
bug: Bug,
|
|
41
|
+
calendar: Calendar,
|
|
36
42
|
person: Person,
|
|
37
43
|
shield: Shield,
|
|
38
44
|
signOut: SignOut,
|
|
@@ -68,6 +74,7 @@ function Navigation({ logo, logout, navConfig, setSystemAuth, userProfile }) {
|
|
|
68
74
|
data-tooltip-id="system-tooltip"
|
|
69
75
|
data-tooltip-content={n.label}
|
|
70
76
|
className="tooltip"
|
|
77
|
+
target={n.target ? n.target : "_self"}
|
|
71
78
|
>
|
|
72
79
|
<IconComponent size={19} strokeWidth={2} />
|
|
73
80
|
</Link>
|
|
@@ -78,9 +85,14 @@ function Navigation({ logo, logout, navConfig, setSystemAuth, userProfile }) {
|
|
|
78
85
|
|
|
79
86
|
const renderNav = (n) => {
|
|
80
87
|
const iconComponents = {
|
|
88
|
+
arrowCycle: ArrowCycle,
|
|
89
|
+
bookClose: BookClose,
|
|
90
|
+
calendar: Calendar,
|
|
91
|
+
clipboard: Clipboard,
|
|
81
92
|
doubleSword: DoubleSword,
|
|
82
93
|
draft: Draft,
|
|
83
94
|
grid: Grid,
|
|
95
|
+
lightBulb: LightBulb,
|
|
84
96
|
peopleGroup: PeopleGroup,
|
|
85
97
|
settingsVertical: SettingsVertical,
|
|
86
98
|
ticket: Ticket,
|
package/package.json
CHANGED
|
@@ -1,55 +1,55 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
2
|
+
"dependencies": {
|
|
3
|
+
"@inovua/reactdatagrid-community": "^5.9.4",
|
|
4
|
+
"@inovua/reactdatagrid-enterprise": "^5.9.4",
|
|
5
|
+
"akar-icons": "^1.9.28",
|
|
6
|
+
"awesome-debounce-promise": "^2.1.0",
|
|
7
|
+
"axios": "^1.4.0",
|
|
8
|
+
"framer-motion": "^10.12.16",
|
|
9
|
+
"html-react-parser": "^4.0.0",
|
|
10
|
+
"lodash": "^4.17.21",
|
|
11
|
+
"moment": "^2.29.4",
|
|
12
|
+
"numeral": "^2.0.6",
|
|
13
|
+
"quill-image-uploader": "^1.3.0",
|
|
14
|
+
"react-confirm-alert": "^3.0.6",
|
|
15
|
+
"react-datepicker": "^4.14.0",
|
|
16
|
+
"react-dropzone": "^14.2.3",
|
|
17
|
+
"react-number-format": "^5.2.2",
|
|
18
|
+
"react-promise-tracker": "^2.1.1",
|
|
19
|
+
"react-quill": "^2.0.0",
|
|
20
|
+
"react-select": "^5.7.3",
|
|
21
|
+
"react-slugify": "^3.0.2",
|
|
22
|
+
"react-sortable-hoc": "^2.0.0",
|
|
23
|
+
"react-toastify": "^9.1.3",
|
|
24
|
+
"react-toggle": "^4.1.3",
|
|
25
|
+
"react-tooltip": "^5.14.0",
|
|
26
|
+
"react-window": "^1.8.9",
|
|
27
|
+
"reactjs-popup": "^2.0.5"
|
|
28
|
+
},
|
|
29
|
+
"devDependecies": {
|
|
30
|
+
"react": "^18.2.0",
|
|
31
|
+
"react-dom": "^18.2.0"
|
|
32
|
+
},
|
|
33
|
+
"peerDependencies": {
|
|
34
|
+
"react": "^17.0.1",
|
|
35
|
+
"react-dom": "^17.0.1"
|
|
36
|
+
},
|
|
37
|
+
"name": "@visns-studio/visns-components",
|
|
38
|
+
"version": "1.5.3",
|
|
39
|
+
"description": "Various packages to assist in the development of our Custom Applications.",
|
|
40
|
+
"main": "index.js",
|
|
41
|
+
"devDependencies": {},
|
|
42
|
+
"scripts": {
|
|
43
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
|
44
|
+
},
|
|
45
|
+
"repository": {
|
|
46
|
+
"type": "git",
|
|
47
|
+
"url": "git+https://github.com/visnsstudio/visns-components.git"
|
|
48
|
+
},
|
|
49
|
+
"author": "Visns Studio",
|
|
50
|
+
"license": "ISC",
|
|
51
|
+
"bugs": {
|
|
52
|
+
"url": "https://github.com/visnsstudio/visns-components/issues"
|
|
53
|
+
},
|
|
54
|
+
"homepage": "https://github.com/visnsstudio/visns-components#readme"
|
|
55
55
|
}
|