@formio/js 5.0.0-dev.5599.1585c47 → 5.0.0-dev.5600.70c970a

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.
@@ -757,7 +757,7 @@ class Webform extends NestedDataComponent_1.default {
757
757
  }
758
758
  const draft = (0, utils_1.fastCloneDeep)(this.submission);
759
759
  draft.state = 'draft';
760
- if (!this.savingDraft) {
760
+ if (!this.savingDraft && !this.submitting) {
761
761
  this.emit('saveDraftBegin');
762
762
  this.savingDraft = true;
763
763
  this.formio.saveSubmission(draft).then((sub) => {
@@ -206,9 +206,6 @@ class FormComponent extends Component_1.default {
206
206
  if (this.options.saveDraftThrottle) {
207
207
  options.saveDraftThrottle = this.options.saveDraftThrottle;
208
208
  }
209
- if (this.options.skipDraftRestore) {
210
- options.skipDraftRestore = this.options.skipDraftRestore;
211
- }
212
209
  return options;
213
210
  }
214
211
  /* eslint-enable max-statements */
@@ -5,6 +5,4 @@ import comp3 from './comp3';
5
5
  import comp4 from './comp4';
6
6
  import comp5 from './comp5';
7
7
  import comp6 from './comp6';
8
- import comp7 from './comp7';
9
- import comp8 from './comp8';
10
- export { formModalEdit, comp1, comp2, comp3, comp4, comp5, comp6, comp7, comp8 };
8
+ export { formModalEdit, comp1, comp2, comp3, comp4, comp5, comp6 };
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.comp8 = exports.comp7 = exports.comp6 = exports.comp5 = exports.comp4 = exports.comp3 = exports.comp2 = exports.comp1 = exports.formModalEdit = void 0;
6
+ exports.comp6 = exports.comp5 = exports.comp4 = exports.comp3 = exports.comp2 = exports.comp1 = exports.formModalEdit = void 0;
7
7
  const formModalEdit_1 = __importDefault(require("./formModalEdit"));
8
8
  exports.formModalEdit = formModalEdit_1.default;
9
9
  const comp1_1 = __importDefault(require("./comp1"));
@@ -18,7 +18,3 @@ const comp5_1 = __importDefault(require("./comp5"));
18
18
  exports.comp5 = comp5_1.default;
19
19
  const comp6_1 = __importDefault(require("./comp6"));
20
20
  exports.comp6 = comp6_1.default;
21
- const comp7_1 = __importDefault(require("./comp7"));
22
- exports.comp7 = comp7_1.default;
23
- const comp8_1 = __importDefault(require("./comp8"));
24
- exports.comp8 = comp8_1.default;
@@ -761,7 +761,7 @@ export default class Webform extends NestedDataComponent {
761
761
  }
762
762
  const draft = fastCloneDeep(this.submission);
763
763
  draft.state = 'draft';
764
- if (!this.savingDraft) {
764
+ if (!this.savingDraft && !this.submitting) {
765
765
  this.emit('saveDraftBegin');
766
766
  this.savingDraft = true;
767
767
  this.formio.saveSubmission(draft).then((sub) => {
@@ -200,9 +200,6 @@ export default class FormComponent extends Component {
200
200
  if (this.options.saveDraftThrottle) {
201
201
  options.saveDraftThrottle = this.options.saveDraftThrottle;
202
202
  }
203
- if (this.options.skipDraftRestore) {
204
- options.skipDraftRestore = this.options.skipDraftRestore;
205
- }
206
203
  return options;
207
204
  }
208
205
  /* eslint-enable max-statements */
@@ -5,6 +5,4 @@ import comp3 from './comp3';
5
5
  import comp4 from './comp4';
6
6
  import comp5 from './comp5';
7
7
  import comp6 from './comp6';
8
- import comp7 from './comp7';
9
- import comp8 from './comp8';
10
- export { formModalEdit, comp1, comp2, comp3, comp4, comp5, comp6, comp7, comp8 };
8
+ export { formModalEdit, comp1, comp2, comp3, comp4, comp5, comp6 };
@@ -5,6 +5,4 @@ import comp3 from './comp3';
5
5
  import comp4 from './comp4';
6
6
  import comp5 from './comp5';
7
7
  import comp6 from './comp6';
8
- import comp7 from './comp7';
9
- import comp8 from './comp8';
10
- export { formModalEdit, comp1, comp2, comp3, comp4, comp5, comp6, comp7, comp8 };
8
+ export { formModalEdit, comp1, comp2, comp3, comp4, comp5, comp6 };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@formio/js",
3
- "version": "5.0.0-dev.5599.1585c47",
3
+ "version": "5.0.0-dev.5600.70c970a",
4
4
  "description": "JavaScript powered Forms with JSON Form Builder",
5
5
  "main": "lib/cjs/index.js",
6
6
  "exports": {
@@ -1,36 +0,0 @@
1
- declare namespace _default {
2
- let _id: string;
3
- let title: string;
4
- let name: string;
5
- let path: string;
6
- let type: string;
7
- let display: string;
8
- let components: ({
9
- label: string;
10
- tableView: boolean;
11
- key: string;
12
- type: string;
13
- input: boolean;
14
- src?: undefined;
15
- disableOnInvalid?: undefined;
16
- } | {
17
- label: string;
18
- tableView: boolean;
19
- src: string;
20
- key: string;
21
- type: string;
22
- input: boolean;
23
- disableOnInvalid?: undefined;
24
- } | {
25
- type: string;
26
- label: string;
27
- key: string;
28
- disableOnInvalid: boolean;
29
- input: boolean;
30
- tableView: boolean;
31
- src?: undefined;
32
- })[];
33
- let project: string;
34
- let machineName: string;
35
- }
36
- export default _default;
@@ -1,37 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.default = {
4
- _id: '66051dae494c977c47028fac',
5
- title: 'test draft parent',
6
- name: 'testDraftParent',
7
- path: 'testdraftparent',
8
- type: 'form',
9
- display: 'form',
10
- components: [
11
- {
12
- label: 'Parent Form Field',
13
- tableView: true,
14
- key: 'parent',
15
- type: 'textfield',
16
- input: true,
17
- },
18
- {
19
- label: 'Form',
20
- tableView: true,
21
- src: 'http://localhost:3000/idwqwhclwioyqbw/testdraftnested',
22
- key: 'form',
23
- type: 'form',
24
- input: true,
25
- },
26
- {
27
- type: 'button',
28
- label: 'Submit',
29
- key: 'submit',
30
- disableOnInvalid: true,
31
- input: true,
32
- tableView: false,
33
- },
34
- ],
35
- project: '63cead09be0090345b109e22',
36
- machineName: 'idwqwhclwioyqbw:testdraftparent'
37
- };
@@ -1,26 +0,0 @@
1
- declare namespace _default {
2
- let _id: string;
3
- let title: string;
4
- let name: string;
5
- let path: string;
6
- let type: string;
7
- let display: string;
8
- let components: ({
9
- label: string;
10
- tableView: boolean;
11
- key: string;
12
- type: string;
13
- input: boolean;
14
- disableOnInvalid?: undefined;
15
- } | {
16
- type: string;
17
- label: string;
18
- key: string;
19
- disableOnInvalid: boolean;
20
- input: boolean;
21
- tableView: boolean;
22
- })[];
23
- let project: string;
24
- let machineName: string;
25
- }
26
- export default _default;
@@ -1,29 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.default = {
4
- _id: '63e4deda12b88c4f05c125cf',
5
- title: 'test draft nested',
6
- name: 'testDraftNested',
7
- path: 'testdraftnested',
8
- type: 'form',
9
- display: 'form',
10
- components: [
11
- {
12
- label: 'Nested Form Field',
13
- tableView: true,
14
- key: 'nested',
15
- type: 'textfield',
16
- input: true,
17
- },
18
- {
19
- type: 'button',
20
- label: 'Submit',
21
- key: 'submit',
22
- disableOnInvalid: true,
23
- input: true,
24
- tableView: false,
25
- },
26
- ],
27
- project: '63cead09be0090345b109e22',
28
- machineName: 'idwqwhclwioyqbw:testdraftparent'
29
- };
@@ -1,36 +0,0 @@
1
- declare namespace _default {
2
- let _id: string;
3
- let title: string;
4
- let name: string;
5
- let path: string;
6
- let type: string;
7
- let display: string;
8
- let components: ({
9
- label: string;
10
- tableView: boolean;
11
- key: string;
12
- type: string;
13
- input: boolean;
14
- src?: undefined;
15
- disableOnInvalid?: undefined;
16
- } | {
17
- label: string;
18
- tableView: boolean;
19
- src: string;
20
- key: string;
21
- type: string;
22
- input: boolean;
23
- disableOnInvalid?: undefined;
24
- } | {
25
- type: string;
26
- label: string;
27
- key: string;
28
- disableOnInvalid: boolean;
29
- input: boolean;
30
- tableView: boolean;
31
- src?: undefined;
32
- })[];
33
- let project: string;
34
- let machineName: string;
35
- }
36
- export default _default;
@@ -1,35 +0,0 @@
1
- export default {
2
- _id: '66051dae494c977c47028fac',
3
- title: 'test draft parent',
4
- name: 'testDraftParent',
5
- path: 'testdraftparent',
6
- type: 'form',
7
- display: 'form',
8
- components: [
9
- {
10
- label: 'Parent Form Field',
11
- tableView: true,
12
- key: 'parent',
13
- type: 'textfield',
14
- input: true,
15
- },
16
- {
17
- label: 'Form',
18
- tableView: true,
19
- src: 'http://localhost:3000/idwqwhclwioyqbw/testdraftnested',
20
- key: 'form',
21
- type: 'form',
22
- input: true,
23
- },
24
- {
25
- type: 'button',
26
- label: 'Submit',
27
- key: 'submit',
28
- disableOnInvalid: true,
29
- input: true,
30
- tableView: false,
31
- },
32
- ],
33
- project: '63cead09be0090345b109e22',
34
- machineName: 'idwqwhclwioyqbw:testdraftparent'
35
- };
@@ -1,26 +0,0 @@
1
- declare namespace _default {
2
- let _id: string;
3
- let title: string;
4
- let name: string;
5
- let path: string;
6
- let type: string;
7
- let display: string;
8
- let components: ({
9
- label: string;
10
- tableView: boolean;
11
- key: string;
12
- type: string;
13
- input: boolean;
14
- disableOnInvalid?: undefined;
15
- } | {
16
- type: string;
17
- label: string;
18
- key: string;
19
- disableOnInvalid: boolean;
20
- input: boolean;
21
- tableView: boolean;
22
- })[];
23
- let project: string;
24
- let machineName: string;
25
- }
26
- export default _default;
@@ -1,27 +0,0 @@
1
- export default {
2
- _id: '63e4deda12b88c4f05c125cf',
3
- title: 'test draft nested',
4
- name: 'testDraftNested',
5
- path: 'testdraftnested',
6
- type: 'form',
7
- display: 'form',
8
- components: [
9
- {
10
- label: 'Nested Form Field',
11
- tableView: true,
12
- key: 'nested',
13
- type: 'textfield',
14
- input: true,
15
- },
16
- {
17
- type: 'button',
18
- label: 'Submit',
19
- key: 'submit',
20
- disableOnInvalid: true,
21
- input: true,
22
- tableView: false,
23
- },
24
- ],
25
- project: '63cead09be0090345b109e22',
26
- machineName: 'idwqwhclwioyqbw:testdraftparent'
27
- };