@formio/js 5.0.0-dev.5625.9910504 → 5.0.0-dev.5631.2d9a450
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/dist/formio.form.js +50 -38
- package/dist/formio.form.min.js +1 -1
- package/dist/formio.full.js +54 -42
- package/dist/formio.full.min.js +1 -1
- package/dist/formio.js +2 -2
- package/dist/formio.min.js +1 -1
- package/dist/formio.utils.js +1 -1
- package/dist/formio.utils.min.js +1 -1
- package/lib/cjs/Formio.js +11 -0
- package/lib/cjs/Webform.d.ts +1 -1
- package/lib/cjs/Webform.js +12 -8
- package/lib/cjs/WebformBuilder.d.ts +1 -1
- package/lib/cjs/WebformBuilder.js +11 -11
- package/lib/cjs/components/_classes/component/Component.js +1 -1
- package/lib/cjs/components/button/Button.d.ts +1 -1
- package/lib/cjs/components/button/Button.js +7 -7
- package/lib/cjs/components/recaptcha/ReCaptcha.d.ts +1 -8
- package/lib/cjs/components/recaptcha/ReCaptcha.form.d.ts +1 -1
- package/lib/cjs/components/recaptcha/ReCaptcha.form.js +2 -2
- package/lib/cjs/components/recaptcha/ReCaptcha.js +1 -8
- package/lib/cjs/components/recaptcha/editForm/ReCaptcha.edit.display.d.ts +28 -2
- package/lib/cjs/components/recaptcha/editForm/ReCaptcha.edit.display.js +10 -2
- package/lib/cjs/components/select/editForm/Select.edit.data.js +16 -2
- package/lib/cjs/components/select/fixtures/comp22.js +1 -1
- package/lib/cjs/components/select/fixtures/comp23.d.ts +26 -15
- package/lib/cjs/components/select/fixtures/comp23.js +28 -19
- package/lib/cjs/components/select/fixtures/comp24.d.ts +47 -0
- package/lib/cjs/components/select/fixtures/comp24.js +40 -0
- package/lib/cjs/components/select/fixtures/index.d.ts +2 -1
- package/lib/cjs/components/select/fixtures/index.js +3 -1
- package/lib/mjs/Formio.js +11 -0
- package/lib/mjs/Webform.d.ts +1 -1
- package/lib/mjs/Webform.js +13 -9
- package/lib/mjs/WebformBuilder.d.ts +1 -1
- package/lib/mjs/WebformBuilder.js +11 -11
- package/lib/mjs/components/_classes/component/Component.js +1 -1
- package/lib/mjs/components/button/Button.d.ts +1 -1
- package/lib/mjs/components/button/Button.js +7 -7
- package/lib/mjs/components/recaptcha/ReCaptcha.d.ts +1 -8
- package/lib/mjs/components/recaptcha/ReCaptcha.form.d.ts +1 -1
- package/lib/mjs/components/recaptcha/ReCaptcha.form.js +2 -2
- package/lib/mjs/components/recaptcha/ReCaptcha.js +1 -8
- package/lib/mjs/components/recaptcha/editForm/ReCaptcha.edit.display.d.ts +28 -2
- package/lib/mjs/components/recaptcha/editForm/ReCaptcha.edit.display.js +10 -2
- package/lib/mjs/components/select/editForm/Select.edit.data.js +16 -2
- package/lib/mjs/components/select/fixtures/comp22.js +1 -1
- package/lib/mjs/components/select/fixtures/comp23.d.ts +26 -15
- package/lib/mjs/components/select/fixtures/comp23.js +28 -19
- package/lib/mjs/components/select/fixtures/comp24.d.ts +47 -0
- package/lib/mjs/components/select/fixtures/comp24.js +38 -0
- package/lib/mjs/components/select/fixtures/index.d.ts +2 -1
- package/lib/mjs/components/select/fixtures/index.js +2 -1
- package/package.json +2 -2
package/lib/mjs/Webform.js
CHANGED
|
@@ -7,7 +7,7 @@ import i18nDefaults from './i18n';
|
|
|
7
7
|
import { Formio } from './Formio';
|
|
8
8
|
import Components from './components/Components';
|
|
9
9
|
import NestedDataComponent from './components/_classes/nesteddata/NestedDataComponent';
|
|
10
|
-
import { fastCloneDeep, currentTimezone, unescapeHTML, getStringFromComponentPath,
|
|
10
|
+
import { fastCloneDeep, currentTimezone, unescapeHTML, getStringFromComponentPath, convertStringToHTMLElement, getArrayFromComponentPath, } from './utils/utils';
|
|
11
11
|
import { eachComponent } from './utils/formUtils';
|
|
12
12
|
// Initialize the available forms.
|
|
13
13
|
Formio.forms = {};
|
|
@@ -657,7 +657,7 @@ export default class Webform extends NestedDataComponent {
|
|
|
657
657
|
const rebuild = this.rebuild() || Promise.resolve();
|
|
658
658
|
return rebuild.then(() => {
|
|
659
659
|
this.emit('formLoad', form);
|
|
660
|
-
this.
|
|
660
|
+
this.triggerCaptcha();
|
|
661
661
|
// Make sure to trigger onChange after a render event occurs to speed up form rendering.
|
|
662
662
|
setTimeout(() => {
|
|
663
663
|
this.onChange(flags);
|
|
@@ -834,7 +834,9 @@ export default class Webform extends NestedDataComponent {
|
|
|
834
834
|
};
|
|
835
835
|
}
|
|
836
836
|
// Metadata needs to be available before setValue
|
|
837
|
-
this._submission.metadata = submission.metadata
|
|
837
|
+
this._submission.metadata = submission.metadata
|
|
838
|
+
? _.cloneDeep(submission.metadata)
|
|
839
|
+
: {};
|
|
838
840
|
this.editing = !!submission._id;
|
|
839
841
|
// Set the timezone in the options if available.
|
|
840
842
|
if (!this.options.submissionTimezone &&
|
|
@@ -1489,16 +1491,18 @@ export default class Webform extends NestedDataComponent {
|
|
|
1489
1491
|
return console.warn('You should add a URL to this button.');
|
|
1490
1492
|
}
|
|
1491
1493
|
}
|
|
1492
|
-
|
|
1494
|
+
triggerCaptcha() {
|
|
1493
1495
|
if (!this || !this.components) {
|
|
1494
1496
|
return;
|
|
1495
1497
|
}
|
|
1496
|
-
const
|
|
1497
|
-
|
|
1498
|
-
|
|
1498
|
+
const captchaComponent = [];
|
|
1499
|
+
eachComponent(this.components, (component) => {
|
|
1500
|
+
if (/^(re)?captcha$/.test(component.type) && component.component.eventType === 'formLoad') {
|
|
1501
|
+
captchaComponent.push(component);
|
|
1502
|
+
}
|
|
1499
1503
|
});
|
|
1500
|
-
if (
|
|
1501
|
-
|
|
1504
|
+
if (captchaComponent.length > 0) {
|
|
1505
|
+
captchaComponent[0].verify(`${this.form.name ? this.form.name : 'form'}Load`);
|
|
1502
1506
|
}
|
|
1503
1507
|
}
|
|
1504
1508
|
set nosubmit(value) {
|
|
@@ -72,7 +72,7 @@ export default class WebformBuilder extends Component {
|
|
|
72
72
|
onDrop(element: any, target: any, source: any, sibling: any): any;
|
|
73
73
|
setForm(form: any): any;
|
|
74
74
|
keyboardActionsEnabled: any;
|
|
75
|
-
|
|
75
|
+
populateCaptchaSettings(form: any): void;
|
|
76
76
|
removeComponent(component: any, parent: any, original: any, componentInstance: any): boolean | undefined;
|
|
77
77
|
replaceDoubleQuotes(data: any, fieldsToRemoveDoubleQuotes?: any[]): any;
|
|
78
78
|
updateComponent(component: any, changed: any): void;
|
|
@@ -472,7 +472,7 @@ export default class WebformBuilder extends Component {
|
|
|
472
472
|
}
|
|
473
473
|
attach(element) {
|
|
474
474
|
this.on('change', (form) => {
|
|
475
|
-
this.
|
|
475
|
+
this.populateCaptchaSettings(form);
|
|
476
476
|
this.webform.setAlert(false);
|
|
477
477
|
});
|
|
478
478
|
return super.attach(element).then(() => {
|
|
@@ -923,24 +923,24 @@ export default class WebformBuilder extends Component {
|
|
|
923
923
|
}
|
|
924
924
|
return Promise.resolve(form);
|
|
925
925
|
}
|
|
926
|
-
|
|
927
|
-
//populate isEnabled for
|
|
928
|
-
let
|
|
926
|
+
populateCaptchaSettings(form) {
|
|
927
|
+
//populate isEnabled for captcha form settings
|
|
928
|
+
let isCaptchaEnabled = false;
|
|
929
929
|
if (this.form.components) {
|
|
930
930
|
eachComponent(form.components, component => {
|
|
931
|
-
if (
|
|
931
|
+
if (isCaptchaEnabled) {
|
|
932
932
|
return;
|
|
933
933
|
}
|
|
934
|
-
if (component.type === '
|
|
935
|
-
|
|
934
|
+
if (component.type === 'captcha') {
|
|
935
|
+
isCaptchaEnabled = true;
|
|
936
936
|
return false;
|
|
937
937
|
}
|
|
938
938
|
});
|
|
939
|
-
if (
|
|
940
|
-
_.set(form, 'settings.
|
|
939
|
+
if (isCaptchaEnabled) {
|
|
940
|
+
_.set(form, 'settings.captcha.isEnabled', true);
|
|
941
941
|
}
|
|
942
|
-
else if (_.get(form, 'settings.
|
|
943
|
-
_.set(form, 'settings.
|
|
942
|
+
else if (_.get(form, 'settings.captcha.isEnabled')) {
|
|
943
|
+
_.set(form, 'settings.captcha.isEnabled', false);
|
|
944
944
|
}
|
|
945
945
|
}
|
|
946
946
|
}
|
|
@@ -2530,7 +2530,7 @@ export default class Component extends Element {
|
|
|
2530
2530
|
}
|
|
2531
2531
|
this.calculatedValue = fastCloneDeep(calculatedValue);
|
|
2532
2532
|
if (changed) {
|
|
2533
|
-
if (!flags.noPristineChangeOnModified
|
|
2533
|
+
if (!flags.noPristineChangeOnModified) {
|
|
2534
2534
|
this.pristine = false;
|
|
2535
2535
|
}
|
|
2536
2536
|
flags.triggeredComponentId = this.id;
|
|
@@ -262,7 +262,7 @@ export default class ButtonComponent extends Field {
|
|
|
262
262
|
super.detach();
|
|
263
263
|
}
|
|
264
264
|
onClick(event) {
|
|
265
|
-
this.
|
|
265
|
+
this.triggerCaptcha();
|
|
266
266
|
// Don't click if disabled or in builder mode.
|
|
267
267
|
if (this.disabled || this.options.attachMode === 'builder') {
|
|
268
268
|
return;
|
|
@@ -448,20 +448,20 @@ export default class ButtonComponent extends Field {
|
|
|
448
448
|
this.refs.button.focus();
|
|
449
449
|
}
|
|
450
450
|
}
|
|
451
|
-
|
|
451
|
+
triggerCaptcha() {
|
|
452
452
|
if (!this.root) {
|
|
453
453
|
return;
|
|
454
454
|
}
|
|
455
|
-
let
|
|
455
|
+
let captchaComponent;
|
|
456
456
|
this.root.everyComponent((component) => {
|
|
457
|
-
if (component.component.type
|
|
457
|
+
if (/^(re)?captcha$/.test(component.component.type) &&
|
|
458
458
|
component.component.eventType === 'buttonClick' &&
|
|
459
459
|
component.component.buttonKey === this.component.key) {
|
|
460
|
-
|
|
460
|
+
captchaComponent = component;
|
|
461
461
|
}
|
|
462
462
|
});
|
|
463
|
-
if (
|
|
464
|
-
|
|
463
|
+
if (captchaComponent) {
|
|
464
|
+
captchaComponent.verify(`${this.component.key}Click`);
|
|
465
465
|
}
|
|
466
466
|
}
|
|
467
467
|
}
|
|
@@ -1,12 +1,5 @@
|
|
|
1
1
|
export default class ReCaptchaComponent extends Component {
|
|
2
|
-
static get builderInfo(): {
|
|
3
|
-
title: string;
|
|
4
|
-
group: string;
|
|
5
|
-
icon: string;
|
|
6
|
-
documentation: string;
|
|
7
|
-
weight: number;
|
|
8
|
-
schema: any;
|
|
9
|
-
};
|
|
2
|
+
static get builderInfo(): {};
|
|
10
3
|
static savedValueTypes(): never[];
|
|
11
4
|
render(): any;
|
|
12
5
|
recaptchaResult: any;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import Components from '../Components';
|
|
2
2
|
import ReCaptchaEditDisplay from './editForm/ReCaptcha.edit.display';
|
|
3
|
-
export default function () {
|
|
3
|
+
export default function (...extend) {
|
|
4
4
|
return Components.baseEditForm([
|
|
5
5
|
{
|
|
6
6
|
key: 'display',
|
|
@@ -22,5 +22,5 @@ export default function () {
|
|
|
22
22
|
key: 'logic',
|
|
23
23
|
ignore: true
|
|
24
24
|
},
|
|
25
|
-
]);
|
|
25
|
+
], ...extend);
|
|
26
26
|
}
|
|
@@ -12,14 +12,7 @@ export default class ReCaptchaComponent extends Component {
|
|
|
12
12
|
}, ...extend);
|
|
13
13
|
}
|
|
14
14
|
static get builderInfo() {
|
|
15
|
-
return {
|
|
16
|
-
title: 'reCAPTCHA',
|
|
17
|
-
group: 'premium',
|
|
18
|
-
icon: 'refresh',
|
|
19
|
-
documentation: '/userguide/form-building/premium-components#recaptcha',
|
|
20
|
-
weight: 40,
|
|
21
|
-
schema: ReCaptchaComponent.schema()
|
|
22
|
-
};
|
|
15
|
+
return {};
|
|
23
16
|
}
|
|
24
17
|
static savedValueTypes() {
|
|
25
18
|
return [];
|
|
@@ -1,4 +1,21 @@
|
|
|
1
1
|
declare const _default: ({
|
|
2
|
+
key: string;
|
|
3
|
+
weight: number;
|
|
4
|
+
type: string;
|
|
5
|
+
tag: string;
|
|
6
|
+
className: string;
|
|
7
|
+
content: string;
|
|
8
|
+
label?: undefined;
|
|
9
|
+
tooltip?: undefined;
|
|
10
|
+
values?: undefined;
|
|
11
|
+
validate?: undefined;
|
|
12
|
+
input?: undefined;
|
|
13
|
+
dataSrc?: undefined;
|
|
14
|
+
valueProperty?: undefined;
|
|
15
|
+
customConditional?: undefined;
|
|
16
|
+
data?: undefined;
|
|
17
|
+
ignore?: undefined;
|
|
18
|
+
} | {
|
|
2
19
|
key: string;
|
|
3
20
|
label: string;
|
|
4
21
|
tooltip: string;
|
|
@@ -11,6 +28,9 @@ declare const _default: ({
|
|
|
11
28
|
required: boolean;
|
|
12
29
|
};
|
|
13
30
|
weight: number;
|
|
31
|
+
tag?: undefined;
|
|
32
|
+
className?: undefined;
|
|
33
|
+
content?: undefined;
|
|
14
34
|
input?: undefined;
|
|
15
35
|
dataSrc?: undefined;
|
|
16
36
|
valueProperty?: undefined;
|
|
@@ -30,18 +50,24 @@ declare const _default: ({
|
|
|
30
50
|
data: {
|
|
31
51
|
custom(context: any): any[];
|
|
32
52
|
};
|
|
53
|
+
tag?: undefined;
|
|
54
|
+
className?: undefined;
|
|
55
|
+
content?: undefined;
|
|
33
56
|
values?: undefined;
|
|
34
57
|
validate?: undefined;
|
|
35
58
|
ignore?: undefined;
|
|
36
59
|
} | {
|
|
37
60
|
key: string;
|
|
38
61
|
ignore: boolean;
|
|
62
|
+
weight?: undefined;
|
|
63
|
+
type?: undefined;
|
|
64
|
+
tag?: undefined;
|
|
65
|
+
className?: undefined;
|
|
66
|
+
content?: undefined;
|
|
39
67
|
label?: undefined;
|
|
40
68
|
tooltip?: undefined;
|
|
41
|
-
type?: undefined;
|
|
42
69
|
values?: undefined;
|
|
43
70
|
validate?: undefined;
|
|
44
|
-
weight?: undefined;
|
|
45
71
|
input?: undefined;
|
|
46
72
|
dataSrc?: undefined;
|
|
47
73
|
valueProperty?: undefined;
|
|
@@ -1,9 +1,17 @@
|
|
|
1
1
|
import { getContextButtons } from '../../../utils/utils';
|
|
2
2
|
export default [
|
|
3
|
+
{
|
|
4
|
+
key: 'recaptchaInfo',
|
|
5
|
+
weight: -10,
|
|
6
|
+
type: 'htmlelement',
|
|
7
|
+
tag: 'div',
|
|
8
|
+
className: 'alert alert-danger',
|
|
9
|
+
content: 'This component has been deprecated and will be removed. Use the CAPTCHA component instead.',
|
|
10
|
+
},
|
|
3
11
|
{
|
|
4
12
|
key: 'eventType',
|
|
5
13
|
label: 'Type of event',
|
|
6
|
-
tooltip: 'Specify type of event that this
|
|
14
|
+
tooltip: 'Specify type of event that this CAPTCHA would react to. If Button Click is selected, then the CAPTCHA widget will be displayed and verification will occur after clicking on the button.',
|
|
7
15
|
type: 'radio',
|
|
8
16
|
values: [
|
|
9
17
|
{
|
|
@@ -27,7 +35,7 @@ export default [
|
|
|
27
35
|
key: 'buttonKey',
|
|
28
36
|
dataSrc: 'custom',
|
|
29
37
|
valueProperty: 'value',
|
|
30
|
-
tooltip: 'Specify key of button on this form that this
|
|
38
|
+
tooltip: 'Specify key of button on this form that this CAPTCHA should react to',
|
|
31
39
|
weight: 660,
|
|
32
40
|
customConditional(context) {
|
|
33
41
|
return context.data.eventType === 'buttonClick';
|
|
@@ -1,14 +1,28 @@
|
|
|
1
1
|
import _ from 'lodash';
|
|
2
2
|
import { eachComponent } from '../../../utils/utils';
|
|
3
|
-
const
|
|
3
|
+
const calculateSingleSelectData = (context, defaultValue) => {
|
|
4
4
|
const { instance, data } = context;
|
|
5
|
-
const rawDefaultValue = instance.downloadedResources.find(resource => _.get(resource, data.valueProperty) ===
|
|
5
|
+
const rawDefaultValue = instance.downloadedResources.find(resource => _.get(resource, data.valueProperty) === defaultValue);
|
|
6
6
|
const options = { data: {}, noeval: true };
|
|
7
7
|
instance.interpolate(data.template, {
|
|
8
8
|
item: rawDefaultValue,
|
|
9
9
|
}, options);
|
|
10
10
|
return options.data.item;
|
|
11
11
|
};
|
|
12
|
+
const calculateSelectData = (context) => {
|
|
13
|
+
const { instance } = context;
|
|
14
|
+
const defaultValue = instance.getValue();
|
|
15
|
+
if (instance.component.multiple) {
|
|
16
|
+
const multiSelectData = {};
|
|
17
|
+
(defaultValue ?? []).forEach((defaultValueItem) => {
|
|
18
|
+
multiSelectData[defaultValueItem] = calculateSingleSelectData(context, defaultValueItem);
|
|
19
|
+
});
|
|
20
|
+
return multiSelectData;
|
|
21
|
+
}
|
|
22
|
+
else {
|
|
23
|
+
return calculateSingleSelectData(context, defaultValue);
|
|
24
|
+
}
|
|
25
|
+
};
|
|
12
26
|
const setSelectData = (context) => {
|
|
13
27
|
// Wait before downloadedResources will be set
|
|
14
28
|
setTimeout(() => {
|
|
@@ -10,20 +10,30 @@ declare namespace _default {
|
|
|
10
10
|
tableView: boolean;
|
|
11
11
|
dataSrc: string;
|
|
12
12
|
data: {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
13
|
+
url: string;
|
|
14
|
+
headers: {
|
|
15
|
+
key: string;
|
|
16
|
+
value: string;
|
|
17
|
+
}[];
|
|
18
18
|
};
|
|
19
|
+
multiple: boolean;
|
|
20
|
+
valueProperty: string;
|
|
21
|
+
validateWhenHidden: boolean;
|
|
19
22
|
key: string;
|
|
20
23
|
type: string;
|
|
21
|
-
searchField: string;
|
|
22
24
|
input: boolean;
|
|
25
|
+
defaultValue: string[];
|
|
26
|
+
selectValues: string;
|
|
27
|
+
disableLimit: boolean;
|
|
23
28
|
noRefreshOnScroll: boolean;
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
29
|
+
selectData: {
|
|
30
|
+
value1: {
|
|
31
|
+
label: string;
|
|
32
|
+
};
|
|
33
|
+
value3: {
|
|
34
|
+
label: string;
|
|
35
|
+
};
|
|
36
|
+
};
|
|
27
37
|
disableOnInvalid?: undefined;
|
|
28
38
|
} | {
|
|
29
39
|
type: string;
|
|
@@ -35,13 +45,14 @@ declare namespace _default {
|
|
|
35
45
|
widget?: undefined;
|
|
36
46
|
dataSrc?: undefined;
|
|
37
47
|
data?: undefined;
|
|
38
|
-
|
|
39
|
-
validate?: undefined;
|
|
40
|
-
searchField?: undefined;
|
|
41
|
-
noRefreshOnScroll?: undefined;
|
|
42
|
-
addResource?: undefined;
|
|
43
|
-
reference?: undefined;
|
|
48
|
+
multiple?: undefined;
|
|
44
49
|
valueProperty?: undefined;
|
|
50
|
+
validateWhenHidden?: undefined;
|
|
51
|
+
defaultValue?: undefined;
|
|
52
|
+
selectValues?: undefined;
|
|
53
|
+
disableLimit?: undefined;
|
|
54
|
+
noRefreshOnScroll?: undefined;
|
|
55
|
+
selectData?: undefined;
|
|
45
56
|
})[];
|
|
46
57
|
}
|
|
47
58
|
export default _default;
|
|
@@ -1,38 +1,47 @@
|
|
|
1
1
|
export default {
|
|
2
|
-
title: 'FIO-
|
|
3
|
-
name: '
|
|
4
|
-
path: '
|
|
2
|
+
title: 'FIO-8281',
|
|
3
|
+
name: 'fio8281',
|
|
4
|
+
path: 'fio8281',
|
|
5
5
|
type: 'form',
|
|
6
6
|
display: 'form',
|
|
7
|
-
components: [
|
|
8
|
-
{
|
|
7
|
+
components: [{
|
|
9
8
|
label: 'Select',
|
|
10
9
|
widget: 'choicesjs',
|
|
11
10
|
tableView: true,
|
|
12
|
-
dataSrc: '
|
|
11
|
+
dataSrc: 'url',
|
|
13
12
|
data: {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
13
|
+
url: 'https://fake_url.com',
|
|
14
|
+
headers: [
|
|
15
|
+
{
|
|
16
|
+
key: '',
|
|
17
|
+
value: ''
|
|
18
|
+
},
|
|
19
|
+
],
|
|
19
20
|
},
|
|
21
|
+
multiple: true,
|
|
22
|
+
valueProperty: 'value',
|
|
23
|
+
validateWhenHidden: false,
|
|
20
24
|
key: 'select',
|
|
21
25
|
type: 'select',
|
|
22
|
-
searchField: 'data.textField2__regex',
|
|
23
26
|
input: true,
|
|
27
|
+
defaultValue: ['value1', 'value3'],
|
|
28
|
+
selectValues: 'data',
|
|
29
|
+
disableLimit: false,
|
|
24
30
|
noRefreshOnScroll: false,
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
31
|
+
selectData: {
|
|
32
|
+
value1: {
|
|
33
|
+
label: 'Label 1',
|
|
34
|
+
},
|
|
35
|
+
value3: {
|
|
36
|
+
label: 'Label 3',
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
}, {
|
|
30
40
|
type: 'button',
|
|
31
41
|
label: 'Submit',
|
|
32
42
|
key: 'submit',
|
|
33
43
|
disableOnInvalid: true,
|
|
34
44
|
input: true,
|
|
35
45
|
tableView: false,
|
|
36
|
-
}
|
|
37
|
-
],
|
|
46
|
+
}]
|
|
38
47
|
};
|
|
@@ -0,0 +1,47 @@
|
|
|
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
|
+
widget: string;
|
|
10
|
+
tableView: boolean;
|
|
11
|
+
dataSrc: string;
|
|
12
|
+
data: {
|
|
13
|
+
resource: string;
|
|
14
|
+
};
|
|
15
|
+
template: string;
|
|
16
|
+
validate: {
|
|
17
|
+
select: boolean;
|
|
18
|
+
};
|
|
19
|
+
key: string;
|
|
20
|
+
type: string;
|
|
21
|
+
searchField: string;
|
|
22
|
+
input: boolean;
|
|
23
|
+
noRefreshOnScroll: boolean;
|
|
24
|
+
addResource: boolean;
|
|
25
|
+
reference: boolean;
|
|
26
|
+
valueProperty: string;
|
|
27
|
+
disableOnInvalid?: undefined;
|
|
28
|
+
} | {
|
|
29
|
+
type: string;
|
|
30
|
+
label: string;
|
|
31
|
+
key: string;
|
|
32
|
+
disableOnInvalid: boolean;
|
|
33
|
+
input: boolean;
|
|
34
|
+
tableView: boolean;
|
|
35
|
+
widget?: undefined;
|
|
36
|
+
dataSrc?: undefined;
|
|
37
|
+
data?: undefined;
|
|
38
|
+
template?: undefined;
|
|
39
|
+
validate?: undefined;
|
|
40
|
+
searchField?: undefined;
|
|
41
|
+
noRefreshOnScroll?: undefined;
|
|
42
|
+
addResource?: undefined;
|
|
43
|
+
reference?: undefined;
|
|
44
|
+
valueProperty?: undefined;
|
|
45
|
+
})[];
|
|
46
|
+
}
|
|
47
|
+
export default _default;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
title: 'FIO-8234',
|
|
3
|
+
name: 'fio8234',
|
|
4
|
+
path: 'fio8234',
|
|
5
|
+
type: 'form',
|
|
6
|
+
display: 'form',
|
|
7
|
+
components: [
|
|
8
|
+
{
|
|
9
|
+
label: 'Select',
|
|
10
|
+
widget: 'choicesjs',
|
|
11
|
+
tableView: true,
|
|
12
|
+
dataSrc: 'resource',
|
|
13
|
+
data: {
|
|
14
|
+
resource: '665446284c9b0163c3e0c7e6',
|
|
15
|
+
},
|
|
16
|
+
template: '<span>{{ item.data.textField1 }}</span>',
|
|
17
|
+
validate: {
|
|
18
|
+
select: false,
|
|
19
|
+
},
|
|
20
|
+
key: 'select',
|
|
21
|
+
type: 'select',
|
|
22
|
+
searchField: 'data.textField2__regex',
|
|
23
|
+
input: true,
|
|
24
|
+
noRefreshOnScroll: false,
|
|
25
|
+
addResource: false,
|
|
26
|
+
reference: false,
|
|
27
|
+
valueProperty: 'data.textField2',
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
type: 'button',
|
|
31
|
+
label: 'Submit',
|
|
32
|
+
key: 'submit',
|
|
33
|
+
disableOnInvalid: true,
|
|
34
|
+
input: true,
|
|
35
|
+
tableView: false,
|
|
36
|
+
},
|
|
37
|
+
],
|
|
38
|
+
};
|
|
@@ -20,5 +20,6 @@ import comp20 from './comp20';
|
|
|
20
20
|
import comp21 from './comp21';
|
|
21
21
|
import comp22 from './comp22';
|
|
22
22
|
import comp23 from './comp23';
|
|
23
|
-
|
|
23
|
+
import comp24 from './comp24';
|
|
24
|
+
export { comp1, comp2, comp4, comp5, comp6, comp7, comp8, comp9, comp10, comp11, comp12, comp13, comp14, comp15, comp16, comp17, comp18, comp19, comp20, comp21, comp22, comp23, comp24 };
|
|
24
25
|
export { multiSelect, multiSelectOptions } from "./comp3";
|
|
@@ -21,4 +21,5 @@ import comp20 from './comp20';
|
|
|
21
21
|
import comp21 from './comp21';
|
|
22
22
|
import comp22 from './comp22';
|
|
23
23
|
import comp23 from './comp23';
|
|
24
|
-
|
|
24
|
+
import comp24 from './comp24';
|
|
25
|
+
export { comp1, comp2, comp4, comp5, comp6, comp7, comp8, comp9, comp10, comp11, comp12, comp13, comp14, comp15, comp16, comp17, comp18, comp19, comp20, comp21, comp22, comp23, comp24 };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@formio/js",
|
|
3
|
-
"version": "5.0.0-dev.
|
|
3
|
+
"version": "5.0.0-dev.5631.2d9a450",
|
|
4
4
|
"description": "JavaScript powered Forms with JSON Form Builder",
|
|
5
5
|
"main": "lib/cjs/index.js",
|
|
6
6
|
"exports": {
|
|
@@ -77,7 +77,7 @@
|
|
|
77
77
|
"dependencies": {
|
|
78
78
|
"@formio/bootstrap": "^3.0.0-rc.22",
|
|
79
79
|
"@formio/choices.js": "^10.2.1",
|
|
80
|
-
"@formio/core": "
|
|
80
|
+
"@formio/core": "2.0.0-dev.102.df37631",
|
|
81
81
|
"@formio/text-mask-addons": "^3.8.0-formio.2",
|
|
82
82
|
"@formio/vanilla-text-mask": "^5.1.1-formio.1",
|
|
83
83
|
"abortcontroller-polyfill": "^1.7.5",
|