@visns-studio/visns-components 2.7.11 → 2.7.13

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.
@@ -427,32 +427,28 @@ function Form({
427
427
  if (validation !== '') {
428
428
  toast.error(<div>{parse(validation)}</div>);
429
429
  } else {
430
- let url = '';
431
- let method = '';
430
+ let url = formSettings.url;
431
+ let method = 'POST';
432
432
  let fileUpload = false;
433
433
  let fileKey = '';
434
434
 
435
- switch (formType) {
436
- case 'create':
437
- url = formSettings.url;
438
- method = 'POST';
439
- break;
440
- case 'update':
441
- url =
442
- formSettings.url +
443
- '/' +
444
- formData[formSettings.primaryKey];
445
- method = 'PUT';
446
- break;
447
- case 'delete':
448
- url =
449
- formSettings.url +
450
- '/' +
451
- formData[formSettings.primaryKey];
452
- method = 'DELETE';
453
- break;
454
- default:
455
- break;
435
+ if (formSettings.customUrl && formSettings.customMethod) {
436
+ url = formSettings.customUrl;
437
+ if (formSettings.customDataId) {
438
+ url += `/${formData[formSettings.primaryKey]}`;
439
+ }
440
+ method = formSettings.customMethod;
441
+ } else {
442
+ switch (formType) {
443
+ case 'create':
444
+ // URL and method are already set to default values
445
+ break;
446
+ case 'update':
447
+ case 'delete':
448
+ url += `/${formData[formSettings.primaryKey]}`;
449
+ method = formType === 'update' ? 'PUT' : 'DELETE';
450
+ break;
451
+ }
456
452
  }
457
453
 
458
454
  if (!_.isEmpty(formData)) {
package/package.json CHANGED
@@ -5,9 +5,9 @@
5
5
  "akar-icons": "^1.9.30",
6
6
  "array-move": "^4.0.0",
7
7
  "awesome-debounce-promise": "^2.1.0",
8
- "axios": "^1.6.0",
8
+ "axios": "^1.6.1",
9
9
  "framer-motion": "^10.16.4",
10
- "html-react-parser": "^5.0.4",
10
+ "html-react-parser": "^5.0.6",
11
11
  "lodash": "^4.17.21",
12
12
  "moment": "^2.29.4",
13
13
  "motion": "^10.16.4",
@@ -23,7 +23,7 @@
23
23
  "react-promise-tracker": "^2.1.1",
24
24
  "react-quill": "^2.0.0",
25
25
  "react-reveal": "^1.2.2",
26
- "react-select": "^5.7.7",
26
+ "react-select": "^5.8.0",
27
27
  "react-slugify": "^3.0.3",
28
28
  "react-sortable-hoc": "^2.0.0",
29
29
  "react-toastify": "^9.1.3",
@@ -44,7 +44,7 @@
44
44
  "react-dom": "^17.0.1"
45
45
  },
46
46
  "name": "@visns-studio/visns-components",
47
- "version": "2.7.11",
47
+ "version": "2.7.13",
48
48
  "description": "Various packages to assist in the development of our Custom Applications.",
49
49
  "main": "index.js",
50
50
  "scripts": {