@formio/js 5.0.0-dev.5595.8e56e8f → 5.0.0-dev.5599.1585c47
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/Changelog.md +2 -0
- package/dist/formio.form.js +3 -3
- package/dist/formio.form.min.js +1 -1
- package/dist/formio.full.js +4 -4
- package/dist/formio.full.min.js +1 -1
- package/lib/cjs/Webform.js +12 -5
- package/lib/cjs/components/checkbox/Checkbox.js +2 -9
- package/lib/cjs/components/checkbox/fixtures/comp5.d.ts +34 -0
- package/lib/cjs/components/checkbox/fixtures/comp5.js +55 -0
- package/lib/cjs/components/checkbox/fixtures/index.d.ts +2 -1
- package/lib/cjs/components/checkbox/fixtures/index.js +3 -1
- package/lib/cjs/components/form/Form.js +3 -0
- package/lib/cjs/components/form/fixtures/comp7.d.ts +36 -0
- package/lib/cjs/components/form/fixtures/comp7.js +37 -0
- package/lib/cjs/components/form/fixtures/comp8.d.ts +26 -0
- package/lib/cjs/components/form/fixtures/comp8.js +29 -0
- package/lib/cjs/components/form/fixtures/index.d.ts +3 -1
- package/lib/cjs/components/form/fixtures/index.js +5 -1
- package/lib/cjs/components/recaptcha/editForm/ReCaptcha.edit.display.d.ts +0 -5
- package/lib/cjs/components/recaptcha/editForm/ReCaptcha.edit.display.js +0 -3
- package/lib/mjs/Webform.js +12 -5
- package/lib/mjs/components/checkbox/Checkbox.js +2 -9
- package/lib/mjs/components/checkbox/fixtures/comp5.d.ts +34 -0
- package/lib/mjs/components/checkbox/fixtures/comp5.js +53 -0
- package/lib/mjs/components/checkbox/fixtures/index.d.ts +2 -1
- package/lib/mjs/components/checkbox/fixtures/index.js +2 -1
- package/lib/mjs/components/form/Form.js +3 -0
- package/lib/mjs/components/form/fixtures/comp7.d.ts +36 -0
- package/lib/mjs/components/form/fixtures/comp7.js +35 -0
- package/lib/mjs/components/form/fixtures/comp8.d.ts +26 -0
- package/lib/mjs/components/form/fixtures/comp8.js +27 -0
- package/lib/mjs/components/form/fixtures/index.d.ts +3 -1
- package/lib/mjs/components/form/fixtures/index.js +3 -1
- package/lib/mjs/components/recaptcha/editForm/ReCaptcha.edit.display.d.ts +0 -5
- package/lib/mjs/components/recaptcha/editForm/ReCaptcha.edit.display.js +0 -3
- package/package.json +1 -1
package/lib/cjs/Webform.js
CHANGED
|
@@ -291,12 +291,19 @@ class Webform extends NestedDataComponent_1.default {
|
|
|
291
291
|
// Set language after everything is established.
|
|
292
292
|
this.language = this.i18next.language;
|
|
293
293
|
// See if we need to restore the draft from a user.
|
|
294
|
-
if (this.options.saveDraft
|
|
294
|
+
if (this.options.saveDraft) {
|
|
295
295
|
this.formReady.then(() => {
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
296
|
+
if (!this.options.skipDraftRestore) {
|
|
297
|
+
const user = Formio_1.Formio.getUser();
|
|
298
|
+
// Only restore a draft if the submission isn't explicitly set.
|
|
299
|
+
if (user && !this.submissionSet) {
|
|
300
|
+
this.restoreDraft(user._id);
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
else {
|
|
304
|
+
// Enable drafts
|
|
305
|
+
this.draftEnabled = true;
|
|
306
|
+
this.savingDraft = false;
|
|
300
307
|
}
|
|
301
308
|
});
|
|
302
309
|
}
|
|
@@ -179,15 +179,8 @@ class CheckBoxComponent extends Field_1.default {
|
|
|
179
179
|
return value;
|
|
180
180
|
}
|
|
181
181
|
setValue(value, flags = {}) {
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
const changed = this.updateValue(value, flags);
|
|
185
|
-
if (this.isHtmlRenderMode() && flags && flags.fromSubmission && changed) {
|
|
186
|
-
this.redraw();
|
|
187
|
-
}
|
|
188
|
-
return changed;
|
|
189
|
-
}
|
|
190
|
-
return false;
|
|
182
|
+
this.setCheckedState(value);
|
|
183
|
+
return super.setValue(value, flags);
|
|
191
184
|
}
|
|
192
185
|
getValueAsString(value) {
|
|
193
186
|
const { name: componentName, value: componentValue } = this.component;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
declare namespace _default {
|
|
2
|
+
let title: string;
|
|
3
|
+
let name: string;
|
|
4
|
+
let path: string;
|
|
5
|
+
let type: string;
|
|
6
|
+
let display: string;
|
|
7
|
+
let components: ({
|
|
8
|
+
label: string;
|
|
9
|
+
tableView: boolean;
|
|
10
|
+
validateWhenHidden: boolean;
|
|
11
|
+
key: string;
|
|
12
|
+
conditional: {
|
|
13
|
+
show: boolean;
|
|
14
|
+
conjunction: string;
|
|
15
|
+
conditions: {
|
|
16
|
+
component: string;
|
|
17
|
+
operator: string;
|
|
18
|
+
}[];
|
|
19
|
+
};
|
|
20
|
+
type: string;
|
|
21
|
+
input: boolean;
|
|
22
|
+
applyMaskOn?: undefined;
|
|
23
|
+
} | {
|
|
24
|
+
label: string;
|
|
25
|
+
applyMaskOn: string;
|
|
26
|
+
tableView: boolean;
|
|
27
|
+
key: string;
|
|
28
|
+
type: string;
|
|
29
|
+
input: boolean;
|
|
30
|
+
validateWhenHidden?: undefined;
|
|
31
|
+
conditional?: undefined;
|
|
32
|
+
})[];
|
|
33
|
+
}
|
|
34
|
+
export default _default;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = {
|
|
4
|
+
title: '7595',
|
|
5
|
+
name: '7595',
|
|
6
|
+
path: '7595',
|
|
7
|
+
type: 'form',
|
|
8
|
+
display: 'form',
|
|
9
|
+
components: [
|
|
10
|
+
{
|
|
11
|
+
label: 'Checkbox',
|
|
12
|
+
tableView: false,
|
|
13
|
+
validateWhenHidden: false,
|
|
14
|
+
key: 'checkboxBefore',
|
|
15
|
+
conditional: {
|
|
16
|
+
show: true,
|
|
17
|
+
conjunction: 'all',
|
|
18
|
+
conditions: [
|
|
19
|
+
{
|
|
20
|
+
component: 'textField',
|
|
21
|
+
operator: 'isNotEmpty'
|
|
22
|
+
}
|
|
23
|
+
]
|
|
24
|
+
},
|
|
25
|
+
type: 'checkbox',
|
|
26
|
+
input: true
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
label: 'Text Field',
|
|
30
|
+
applyMaskOn: 'change',
|
|
31
|
+
tableView: true,
|
|
32
|
+
key: 'textField',
|
|
33
|
+
type: 'textfield',
|
|
34
|
+
input: true
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
label: 'Checkbox',
|
|
38
|
+
tableView: false,
|
|
39
|
+
validateWhenHidden: false,
|
|
40
|
+
key: 'checkboxAfter',
|
|
41
|
+
conditional: {
|
|
42
|
+
show: true,
|
|
43
|
+
conjunction: 'all',
|
|
44
|
+
conditions: [
|
|
45
|
+
{
|
|
46
|
+
component: 'textField',
|
|
47
|
+
operator: 'isNotEmpty'
|
|
48
|
+
}
|
|
49
|
+
]
|
|
50
|
+
},
|
|
51
|
+
type: 'checkbox',
|
|
52
|
+
input: true
|
|
53
|
+
},
|
|
54
|
+
]
|
|
55
|
+
};
|
|
@@ -2,5 +2,6 @@ import comp1 from './comp1';
|
|
|
2
2
|
import comp2 from './comp2';
|
|
3
3
|
import comp3 from './comp3';
|
|
4
4
|
import comp4 from './comp4';
|
|
5
|
+
import comp5 from './comp5';
|
|
5
6
|
import customDefaultComponent from './customDefaultComponent';
|
|
6
|
-
export { comp1, comp2, comp3, comp4, customDefaultComponent };
|
|
7
|
+
export { comp1, comp2, comp3, comp4, comp5, customDefaultComponent };
|
|
@@ -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.customDefaultComponent = exports.comp4 = exports.comp3 = exports.comp2 = exports.comp1 = void 0;
|
|
6
|
+
exports.customDefaultComponent = exports.comp5 = exports.comp4 = exports.comp3 = exports.comp2 = exports.comp1 = void 0;
|
|
7
7
|
const comp1_1 = __importDefault(require("./comp1"));
|
|
8
8
|
exports.comp1 = comp1_1.default;
|
|
9
9
|
const customDefaultComponent_1 = __importDefault(require("./customDefaultComponent"));
|
|
@@ -14,3 +14,5 @@ const comp3_1 = __importDefault(require("./comp3"));
|
|
|
14
14
|
exports.comp3 = comp3_1.default;
|
|
15
15
|
const comp4_1 = __importDefault(require("./comp4"));
|
|
16
16
|
exports.comp4 = comp4_1.default;
|
|
17
|
+
const comp5_1 = __importDefault(require("./comp5"));
|
|
18
|
+
exports.comp5 = comp5_1.default;
|
|
@@ -206,6 +206,9 @@ 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
|
+
}
|
|
209
212
|
return options;
|
|
210
213
|
}
|
|
211
214
|
/* eslint-enable max-statements */
|
|
@@ -0,0 +1,36 @@
|
|
|
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;
|
|
@@ -0,0 +1,37 @@
|
|
|
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
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
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;
|
|
@@ -0,0 +1,29 @@
|
|
|
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
|
+
};
|
|
@@ -5,4 +5,6 @@ import comp3 from './comp3';
|
|
|
5
5
|
import comp4 from './comp4';
|
|
6
6
|
import comp5 from './comp5';
|
|
7
7
|
import comp6 from './comp6';
|
|
8
|
-
|
|
8
|
+
import comp7 from './comp7';
|
|
9
|
+
import comp8 from './comp8';
|
|
10
|
+
export { formModalEdit, comp1, comp2, comp3, comp4, comp5, comp6, comp7, comp8 };
|
|
@@ -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.comp6 = exports.comp5 = exports.comp4 = exports.comp3 = exports.comp2 = exports.comp1 = exports.formModalEdit = void 0;
|
|
6
|
+
exports.comp8 = exports.comp7 = 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,3 +18,7 @@ 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;
|
|
@@ -7,9 +7,6 @@ declare const _default: ({
|
|
|
7
7
|
label: string;
|
|
8
8
|
value: string;
|
|
9
9
|
}[];
|
|
10
|
-
validate: {
|
|
11
|
-
required: boolean;
|
|
12
|
-
};
|
|
13
10
|
weight: number;
|
|
14
11
|
input?: undefined;
|
|
15
12
|
dataSrc?: undefined;
|
|
@@ -31,7 +28,6 @@ declare const _default: ({
|
|
|
31
28
|
custom(context: any): any[];
|
|
32
29
|
};
|
|
33
30
|
values?: undefined;
|
|
34
|
-
validate?: undefined;
|
|
35
31
|
ignore?: undefined;
|
|
36
32
|
} | {
|
|
37
33
|
key: string;
|
|
@@ -40,7 +36,6 @@ declare const _default: ({
|
|
|
40
36
|
tooltip?: undefined;
|
|
41
37
|
type?: undefined;
|
|
42
38
|
values?: undefined;
|
|
43
|
-
validate?: undefined;
|
|
44
39
|
weight?: undefined;
|
|
45
40
|
input?: undefined;
|
|
46
41
|
dataSrc?: undefined;
|
package/lib/mjs/Webform.js
CHANGED
|
@@ -263,12 +263,19 @@ export default class Webform extends NestedDataComponent {
|
|
|
263
263
|
// Set language after everything is established.
|
|
264
264
|
this.language = this.i18next.language;
|
|
265
265
|
// See if we need to restore the draft from a user.
|
|
266
|
-
if (this.options.saveDraft
|
|
266
|
+
if (this.options.saveDraft) {
|
|
267
267
|
this.formReady.then(() => {
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
268
|
+
if (!this.options.skipDraftRestore) {
|
|
269
|
+
const user = Formio.getUser();
|
|
270
|
+
// Only restore a draft if the submission isn't explicitly set.
|
|
271
|
+
if (user && !this.submissionSet) {
|
|
272
|
+
this.restoreDraft(user._id);
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
else {
|
|
276
|
+
// Enable drafts
|
|
277
|
+
this.draftEnabled = true;
|
|
278
|
+
this.savingDraft = false;
|
|
272
279
|
}
|
|
273
280
|
});
|
|
274
281
|
}
|
|
@@ -178,15 +178,8 @@ export default class CheckBoxComponent extends Field {
|
|
|
178
178
|
return value;
|
|
179
179
|
}
|
|
180
180
|
setValue(value, flags = {}) {
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
const changed = this.updateValue(value, flags);
|
|
184
|
-
if (this.isHtmlRenderMode() && flags && flags.fromSubmission && changed) {
|
|
185
|
-
this.redraw();
|
|
186
|
-
}
|
|
187
|
-
return changed;
|
|
188
|
-
}
|
|
189
|
-
return false;
|
|
181
|
+
this.setCheckedState(value);
|
|
182
|
+
return super.setValue(value, flags);
|
|
190
183
|
}
|
|
191
184
|
getValueAsString(value) {
|
|
192
185
|
const { name: componentName, value: componentValue } = this.component;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
declare namespace _default {
|
|
2
|
+
let title: string;
|
|
3
|
+
let name: string;
|
|
4
|
+
let path: string;
|
|
5
|
+
let type: string;
|
|
6
|
+
let display: string;
|
|
7
|
+
let components: ({
|
|
8
|
+
label: string;
|
|
9
|
+
tableView: boolean;
|
|
10
|
+
validateWhenHidden: boolean;
|
|
11
|
+
key: string;
|
|
12
|
+
conditional: {
|
|
13
|
+
show: boolean;
|
|
14
|
+
conjunction: string;
|
|
15
|
+
conditions: {
|
|
16
|
+
component: string;
|
|
17
|
+
operator: string;
|
|
18
|
+
}[];
|
|
19
|
+
};
|
|
20
|
+
type: string;
|
|
21
|
+
input: boolean;
|
|
22
|
+
applyMaskOn?: undefined;
|
|
23
|
+
} | {
|
|
24
|
+
label: string;
|
|
25
|
+
applyMaskOn: string;
|
|
26
|
+
tableView: boolean;
|
|
27
|
+
key: string;
|
|
28
|
+
type: string;
|
|
29
|
+
input: boolean;
|
|
30
|
+
validateWhenHidden?: undefined;
|
|
31
|
+
conditional?: undefined;
|
|
32
|
+
})[];
|
|
33
|
+
}
|
|
34
|
+
export default _default;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
title: '7595',
|
|
3
|
+
name: '7595',
|
|
4
|
+
path: '7595',
|
|
5
|
+
type: 'form',
|
|
6
|
+
display: 'form',
|
|
7
|
+
components: [
|
|
8
|
+
{
|
|
9
|
+
label: 'Checkbox',
|
|
10
|
+
tableView: false,
|
|
11
|
+
validateWhenHidden: false,
|
|
12
|
+
key: 'checkboxBefore',
|
|
13
|
+
conditional: {
|
|
14
|
+
show: true,
|
|
15
|
+
conjunction: 'all',
|
|
16
|
+
conditions: [
|
|
17
|
+
{
|
|
18
|
+
component: 'textField',
|
|
19
|
+
operator: 'isNotEmpty'
|
|
20
|
+
}
|
|
21
|
+
]
|
|
22
|
+
},
|
|
23
|
+
type: 'checkbox',
|
|
24
|
+
input: true
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
label: 'Text Field',
|
|
28
|
+
applyMaskOn: 'change',
|
|
29
|
+
tableView: true,
|
|
30
|
+
key: 'textField',
|
|
31
|
+
type: 'textfield',
|
|
32
|
+
input: true
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
label: 'Checkbox',
|
|
36
|
+
tableView: false,
|
|
37
|
+
validateWhenHidden: false,
|
|
38
|
+
key: 'checkboxAfter',
|
|
39
|
+
conditional: {
|
|
40
|
+
show: true,
|
|
41
|
+
conjunction: 'all',
|
|
42
|
+
conditions: [
|
|
43
|
+
{
|
|
44
|
+
component: 'textField',
|
|
45
|
+
operator: 'isNotEmpty'
|
|
46
|
+
}
|
|
47
|
+
]
|
|
48
|
+
},
|
|
49
|
+
type: 'checkbox',
|
|
50
|
+
input: true
|
|
51
|
+
},
|
|
52
|
+
]
|
|
53
|
+
};
|
|
@@ -2,5 +2,6 @@ import comp1 from './comp1';
|
|
|
2
2
|
import comp2 from './comp2';
|
|
3
3
|
import comp3 from './comp3';
|
|
4
4
|
import comp4 from './comp4';
|
|
5
|
+
import comp5 from './comp5';
|
|
5
6
|
import customDefaultComponent from './customDefaultComponent';
|
|
6
|
-
export { comp1, comp2, comp3, comp4, customDefaultComponent };
|
|
7
|
+
export { comp1, comp2, comp3, comp4, comp5, customDefaultComponent };
|
|
@@ -3,4 +3,5 @@ import customDefaultComponent from './customDefaultComponent';
|
|
|
3
3
|
import comp2 from './comp2';
|
|
4
4
|
import comp3 from './comp3';
|
|
5
5
|
import comp4 from './comp4';
|
|
6
|
-
|
|
6
|
+
import comp5 from './comp5';
|
|
7
|
+
export { comp1, comp2, comp3, comp4, comp5, customDefaultComponent };
|
|
@@ -200,6 +200,9 @@ 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
|
+
}
|
|
203
206
|
return options;
|
|
204
207
|
}
|
|
205
208
|
/* eslint-enable max-statements */
|
|
@@ -0,0 +1,36 @@
|
|
|
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;
|
|
@@ -0,0 +1,35 @@
|
|
|
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
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
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;
|
|
@@ -0,0 +1,27 @@
|
|
|
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
|
+
};
|
|
@@ -5,4 +5,6 @@ import comp3 from './comp3';
|
|
|
5
5
|
import comp4 from './comp4';
|
|
6
6
|
import comp5 from './comp5';
|
|
7
7
|
import comp6 from './comp6';
|
|
8
|
-
|
|
8
|
+
import comp7 from './comp7';
|
|
9
|
+
import comp8 from './comp8';
|
|
10
|
+
export { formModalEdit, comp1, comp2, comp3, comp4, comp5, comp6, comp7, comp8 };
|