@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/cjs/Formio.js
CHANGED
|
@@ -114,3 +114,14 @@ sdk_1.Formio.createForm = Embed_1.Formio.createForm;
|
|
|
114
114
|
sdk_1.Formio.submitDone = Embed_1.Formio.submitDone;
|
|
115
115
|
sdk_1.Formio.addLibrary = Embed_1.Formio.addLibrary;
|
|
116
116
|
sdk_1.Formio.addLoader = Embed_1.Formio.addLoader;
|
|
117
|
+
sdk_1.Formio.addToGlobal = (global) => {
|
|
118
|
+
if (typeof global === 'object' && !global.Formio) {
|
|
119
|
+
global.Formio = sdk_1.Formio;
|
|
120
|
+
}
|
|
121
|
+
};
|
|
122
|
+
if (typeof global !== 'undefined') {
|
|
123
|
+
sdk_1.Formio.addToGlobal(global);
|
|
124
|
+
}
|
|
125
|
+
if (typeof window !== 'undefined') {
|
|
126
|
+
sdk_1.Formio.addToGlobal(window);
|
|
127
|
+
}
|
package/lib/cjs/Webform.d.ts
CHANGED
|
@@ -471,7 +471,7 @@ declare class Webform extends NestedDataComponent {
|
|
|
471
471
|
*/
|
|
472
472
|
submit(before: boolean, options?: {}): Promise<any>;
|
|
473
473
|
submitUrl(URL: any, headers: any): void;
|
|
474
|
-
|
|
474
|
+
triggerCaptcha(): void;
|
|
475
475
|
_nosubmit: any;
|
|
476
476
|
get conditions(): any;
|
|
477
477
|
get variables(): any;
|
package/lib/cjs/Webform.js
CHANGED
|
@@ -659,7 +659,7 @@ class Webform extends NestedDataComponent_1.default {
|
|
|
659
659
|
const rebuild = this.rebuild() || Promise.resolve();
|
|
660
660
|
return rebuild.then(() => {
|
|
661
661
|
this.emit('formLoad', form);
|
|
662
|
-
this.
|
|
662
|
+
this.triggerCaptcha();
|
|
663
663
|
// Make sure to trigger onChange after a render event occurs to speed up form rendering.
|
|
664
664
|
setTimeout(() => {
|
|
665
665
|
this.onChange(flags);
|
|
@@ -830,7 +830,9 @@ class Webform extends NestedDataComponent_1.default {
|
|
|
830
830
|
};
|
|
831
831
|
}
|
|
832
832
|
// Metadata needs to be available before setValue
|
|
833
|
-
this._submission.metadata = submission.metadata
|
|
833
|
+
this._submission.metadata = submission.metadata
|
|
834
|
+
? lodash_1.default.cloneDeep(submission.metadata)
|
|
835
|
+
: {};
|
|
834
836
|
this.editing = !!submission._id;
|
|
835
837
|
// Set the timezone in the options if available.
|
|
836
838
|
if (!this.options.submissionTimezone &&
|
|
@@ -1489,16 +1491,18 @@ class Webform extends NestedDataComponent_1.default {
|
|
|
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
|
+
(0, formUtils_1.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;
|
|
@@ -486,7 +486,7 @@ class WebformBuilder extends Component_1.default {
|
|
|
486
486
|
}
|
|
487
487
|
attach(element) {
|
|
488
488
|
this.on('change', (form) => {
|
|
489
|
-
this.
|
|
489
|
+
this.populateCaptchaSettings(form);
|
|
490
490
|
this.webform.setAlert(false);
|
|
491
491
|
});
|
|
492
492
|
return super.attach(element).then(() => {
|
|
@@ -939,24 +939,24 @@ class WebformBuilder extends Component_1.default {
|
|
|
939
939
|
}
|
|
940
940
|
return Promise.resolve(form);
|
|
941
941
|
}
|
|
942
|
-
|
|
943
|
-
//populate isEnabled for
|
|
944
|
-
let
|
|
942
|
+
populateCaptchaSettings(form) {
|
|
943
|
+
//populate isEnabled for captcha form settings
|
|
944
|
+
let isCaptchaEnabled = false;
|
|
945
945
|
if (this.form.components) {
|
|
946
946
|
(0, formUtils_1.eachComponent)(form.components, component => {
|
|
947
|
-
if (
|
|
947
|
+
if (isCaptchaEnabled) {
|
|
948
948
|
return;
|
|
949
949
|
}
|
|
950
|
-
if (component.type === '
|
|
951
|
-
|
|
950
|
+
if (component.type === 'captcha') {
|
|
951
|
+
isCaptchaEnabled = true;
|
|
952
952
|
return false;
|
|
953
953
|
}
|
|
954
954
|
});
|
|
955
|
-
if (
|
|
956
|
-
lodash_1.default.set(form, 'settings.
|
|
955
|
+
if (isCaptchaEnabled) {
|
|
956
|
+
lodash_1.default.set(form, 'settings.captcha.isEnabled', true);
|
|
957
957
|
}
|
|
958
|
-
else if (lodash_1.default.get(form, 'settings.
|
|
959
|
-
lodash_1.default.set(form, 'settings.
|
|
958
|
+
else if (lodash_1.default.get(form, 'settings.captcha.isEnabled')) {
|
|
959
|
+
lodash_1.default.set(form, 'settings.captcha.isEnabled', false);
|
|
960
960
|
}
|
|
961
961
|
}
|
|
962
962
|
}
|
|
@@ -2562,7 +2562,7 @@ class Component extends Element_1.default {
|
|
|
2562
2562
|
}
|
|
2563
2563
|
this.calculatedValue = (0, utils_1.fastCloneDeep)(calculatedValue);
|
|
2564
2564
|
if (changed) {
|
|
2565
|
-
if (!flags.noPristineChangeOnModified
|
|
2565
|
+
if (!flags.noPristineChangeOnModified) {
|
|
2566
2566
|
this.pristine = false;
|
|
2567
2567
|
}
|
|
2568
2568
|
flags.triggeredComponentId = this.id;
|
|
@@ -268,7 +268,7 @@ class ButtonComponent extends Field_1.default {
|
|
|
268
268
|
super.detach();
|
|
269
269
|
}
|
|
270
270
|
onClick(event) {
|
|
271
|
-
this.
|
|
271
|
+
this.triggerCaptcha();
|
|
272
272
|
// Don't click if disabled or in builder mode.
|
|
273
273
|
if (this.disabled || this.options.attachMode === 'builder') {
|
|
274
274
|
return;
|
|
@@ -454,20 +454,20 @@ class ButtonComponent extends Field_1.default {
|
|
|
454
454
|
this.refs.button.focus();
|
|
455
455
|
}
|
|
456
456
|
}
|
|
457
|
-
|
|
457
|
+
triggerCaptcha() {
|
|
458
458
|
if (!this.root) {
|
|
459
459
|
return;
|
|
460
460
|
}
|
|
461
|
-
let
|
|
461
|
+
let captchaComponent;
|
|
462
462
|
this.root.everyComponent((component) => {
|
|
463
|
-
if (component.component.type
|
|
463
|
+
if (/^(re)?captcha$/.test(component.component.type) &&
|
|
464
464
|
component.component.eventType === 'buttonClick' &&
|
|
465
465
|
component.component.buttonKey === this.component.key) {
|
|
466
|
-
|
|
466
|
+
captchaComponent = component;
|
|
467
467
|
}
|
|
468
468
|
});
|
|
469
|
-
if (
|
|
470
|
-
|
|
469
|
+
if (captchaComponent) {
|
|
470
|
+
captchaComponent.verify(`${this.component.key}Click`);
|
|
471
471
|
}
|
|
472
472
|
}
|
|
473
473
|
}
|
|
@@ -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;
|
|
@@ -5,7 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const Components_1 = __importDefault(require("../Components"));
|
|
7
7
|
const ReCaptcha_edit_display_1 = __importDefault(require("./editForm/ReCaptcha.edit.display"));
|
|
8
|
-
function default_1() {
|
|
8
|
+
function default_1(...extend) {
|
|
9
9
|
return Components_1.default.baseEditForm([
|
|
10
10
|
{
|
|
11
11
|
key: 'display',
|
|
@@ -27,6 +27,6 @@ function default_1() {
|
|
|
27
27
|
key: 'logic',
|
|
28
28
|
ignore: true
|
|
29
29
|
},
|
|
30
|
-
]);
|
|
30
|
+
], ...extend);
|
|
31
31
|
}
|
|
32
32
|
exports.default = default_1;
|
|
@@ -26,14 +26,7 @@ class ReCaptchaComponent extends Component_1.default {
|
|
|
26
26
|
}, ...extend);
|
|
27
27
|
}
|
|
28
28
|
static get builderInfo() {
|
|
29
|
-
return {
|
|
30
|
-
title: 'reCAPTCHA',
|
|
31
|
-
group: 'premium',
|
|
32
|
-
icon: 'refresh',
|
|
33
|
-
documentation: '/userguide/form-building/premium-components#recaptcha',
|
|
34
|
-
weight: 40,
|
|
35
|
-
schema: ReCaptchaComponent.schema()
|
|
36
|
-
};
|
|
29
|
+
return {};
|
|
37
30
|
}
|
|
38
31
|
static savedValueTypes() {
|
|
39
32
|
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;
|
|
@@ -2,10 +2,18 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const utils_1 = require("../../../utils/utils");
|
|
4
4
|
exports.default = [
|
|
5
|
+
{
|
|
6
|
+
key: 'recaptchaInfo',
|
|
7
|
+
weight: -10,
|
|
8
|
+
type: 'htmlelement',
|
|
9
|
+
tag: 'div',
|
|
10
|
+
className: 'alert alert-danger',
|
|
11
|
+
content: 'This component has been deprecated and will be removed. Use the CAPTCHA component instead.',
|
|
12
|
+
},
|
|
5
13
|
{
|
|
6
14
|
key: 'eventType',
|
|
7
15
|
label: 'Type of event',
|
|
8
|
-
tooltip: 'Specify type of event that this
|
|
16
|
+
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.',
|
|
9
17
|
type: 'radio',
|
|
10
18
|
values: [
|
|
11
19
|
{
|
|
@@ -29,7 +37,7 @@ exports.default = [
|
|
|
29
37
|
key: 'buttonKey',
|
|
30
38
|
dataSrc: 'custom',
|
|
31
39
|
valueProperty: 'value',
|
|
32
|
-
tooltip: 'Specify key of button on this form that this
|
|
40
|
+
tooltip: 'Specify key of button on this form that this CAPTCHA should react to',
|
|
33
41
|
weight: 660,
|
|
34
42
|
customConditional(context) {
|
|
35
43
|
return context.data.eventType === 'buttonClick';
|
|
@@ -5,15 +5,29 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const lodash_1 = __importDefault(require("lodash"));
|
|
7
7
|
const utils_1 = require("../../../utils/utils");
|
|
8
|
-
const
|
|
8
|
+
const calculateSingleSelectData = (context, defaultValue) => {
|
|
9
9
|
const { instance, data } = context;
|
|
10
|
-
const rawDefaultValue = instance.downloadedResources.find(resource => lodash_1.default.get(resource, data.valueProperty) ===
|
|
10
|
+
const rawDefaultValue = instance.downloadedResources.find(resource => lodash_1.default.get(resource, data.valueProperty) === defaultValue);
|
|
11
11
|
const options = { data: {}, noeval: true };
|
|
12
12
|
instance.interpolate(data.template, {
|
|
13
13
|
item: rawDefaultValue,
|
|
14
14
|
}, options);
|
|
15
15
|
return options.data.item;
|
|
16
16
|
};
|
|
17
|
+
const calculateSelectData = (context) => {
|
|
18
|
+
const { instance } = context;
|
|
19
|
+
const defaultValue = instance.getValue();
|
|
20
|
+
if (instance.component.multiple) {
|
|
21
|
+
const multiSelectData = {};
|
|
22
|
+
(defaultValue !== null && defaultValue !== void 0 ? defaultValue : []).forEach((defaultValueItem) => {
|
|
23
|
+
multiSelectData[defaultValueItem] = calculateSingleSelectData(context, defaultValueItem);
|
|
24
|
+
});
|
|
25
|
+
return multiSelectData;
|
|
26
|
+
}
|
|
27
|
+
else {
|
|
28
|
+
return calculateSingleSelectData(context, defaultValue);
|
|
29
|
+
}
|
|
30
|
+
};
|
|
17
31
|
const setSelectData = (context) => {
|
|
18
32
|
// Wait before downloadedResources will be set
|
|
19
33
|
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,40 +1,49 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.default = {
|
|
4
|
-
title: 'FIO-
|
|
5
|
-
name: '
|
|
6
|
-
path: '
|
|
4
|
+
title: 'FIO-8281',
|
|
5
|
+
name: 'fio8281',
|
|
6
|
+
path: 'fio8281',
|
|
7
7
|
type: 'form',
|
|
8
8
|
display: 'form',
|
|
9
|
-
components: [
|
|
10
|
-
{
|
|
9
|
+
components: [{
|
|
11
10
|
label: 'Select',
|
|
12
11
|
widget: 'choicesjs',
|
|
13
12
|
tableView: true,
|
|
14
|
-
dataSrc: '
|
|
13
|
+
dataSrc: 'url',
|
|
15
14
|
data: {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
15
|
+
url: 'https://fake_url.com',
|
|
16
|
+
headers: [
|
|
17
|
+
{
|
|
18
|
+
key: '',
|
|
19
|
+
value: ''
|
|
20
|
+
},
|
|
21
|
+
],
|
|
21
22
|
},
|
|
23
|
+
multiple: true,
|
|
24
|
+
valueProperty: 'value',
|
|
25
|
+
validateWhenHidden: false,
|
|
22
26
|
key: 'select',
|
|
23
27
|
type: 'select',
|
|
24
|
-
searchField: 'data.textField2__regex',
|
|
25
28
|
input: true,
|
|
29
|
+
defaultValue: ['value1', 'value3'],
|
|
30
|
+
selectValues: 'data',
|
|
31
|
+
disableLimit: false,
|
|
26
32
|
noRefreshOnScroll: false,
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
33
|
+
selectData: {
|
|
34
|
+
value1: {
|
|
35
|
+
label: 'Label 1',
|
|
36
|
+
},
|
|
37
|
+
value3: {
|
|
38
|
+
label: 'Label 3',
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
}, {
|
|
32
42
|
type: 'button',
|
|
33
43
|
label: 'Submit',
|
|
34
44
|
key: 'submit',
|
|
35
45
|
disableOnInvalid: true,
|
|
36
46
|
input: true,
|
|
37
47
|
tableView: false,
|
|
38
|
-
}
|
|
39
|
-
],
|
|
48
|
+
}]
|
|
40
49
|
};
|
|
@@ -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,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = {
|
|
4
|
+
title: 'FIO-8234',
|
|
5
|
+
name: 'fio8234',
|
|
6
|
+
path: 'fio8234',
|
|
7
|
+
type: 'form',
|
|
8
|
+
display: 'form',
|
|
9
|
+
components: [
|
|
10
|
+
{
|
|
11
|
+
label: 'Select',
|
|
12
|
+
widget: 'choicesjs',
|
|
13
|
+
tableView: true,
|
|
14
|
+
dataSrc: 'resource',
|
|
15
|
+
data: {
|
|
16
|
+
resource: '665446284c9b0163c3e0c7e6',
|
|
17
|
+
},
|
|
18
|
+
template: '<span>{{ item.data.textField1 }}</span>',
|
|
19
|
+
validate: {
|
|
20
|
+
select: false,
|
|
21
|
+
},
|
|
22
|
+
key: 'select',
|
|
23
|
+
type: 'select',
|
|
24
|
+
searchField: 'data.textField2__regex',
|
|
25
|
+
input: true,
|
|
26
|
+
noRefreshOnScroll: false,
|
|
27
|
+
addResource: false,
|
|
28
|
+
reference: false,
|
|
29
|
+
valueProperty: 'data.textField2',
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
type: 'button',
|
|
33
|
+
label: 'Submit',
|
|
34
|
+
key: 'submit',
|
|
35
|
+
disableOnInvalid: true,
|
|
36
|
+
input: true,
|
|
37
|
+
tableView: false,
|
|
38
|
+
},
|
|
39
|
+
],
|
|
40
|
+
};
|
|
@@ -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";
|
|
@@ -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.comp23 = exports.comp22 = exports.comp21 = exports.comp20 = exports.comp19 = exports.comp18 = exports.comp17 = exports.comp16 = exports.comp15 = exports.comp14 = exports.comp13 = exports.comp12 = exports.comp11 = exports.comp10 = exports.comp9 = exports.comp8 = exports.comp7 = exports.comp6 = exports.comp5 = exports.comp4 = exports.comp2 = exports.comp1 = exports.multiSelectOptions = exports.multiSelect = void 0;
|
|
6
|
+
exports.comp24 = exports.comp23 = exports.comp22 = exports.comp21 = exports.comp20 = exports.comp19 = exports.comp18 = exports.comp17 = exports.comp16 = exports.comp15 = exports.comp14 = exports.comp13 = exports.comp12 = exports.comp11 = exports.comp10 = exports.comp9 = exports.comp8 = exports.comp7 = exports.comp6 = exports.comp5 = exports.comp4 = exports.comp2 = exports.comp1 = exports.multiSelectOptions = exports.multiSelect = void 0;
|
|
7
7
|
const comp1_1 = __importDefault(require("./comp1"));
|
|
8
8
|
exports.comp1 = comp1_1.default;
|
|
9
9
|
const comp2_1 = __importDefault(require("./comp2"));
|
|
@@ -51,3 +51,5 @@ const comp22_1 = __importDefault(require("./comp22"));
|
|
|
51
51
|
exports.comp22 = comp22_1.default;
|
|
52
52
|
const comp23_1 = __importDefault(require("./comp23"));
|
|
53
53
|
exports.comp23 = comp23_1.default;
|
|
54
|
+
const comp24_1 = __importDefault(require("./comp24"));
|
|
55
|
+
exports.comp24 = comp24_1.default;
|
package/lib/mjs/Formio.js
CHANGED
|
@@ -107,4 +107,15 @@ FormioCore.createForm = FormioEmbed.createForm;
|
|
|
107
107
|
FormioCore.submitDone = FormioEmbed.submitDone;
|
|
108
108
|
FormioCore.addLibrary = FormioEmbed.addLibrary;
|
|
109
109
|
FormioCore.addLoader = FormioEmbed.addLoader;
|
|
110
|
+
FormioCore.addToGlobal = (global) => {
|
|
111
|
+
if (typeof global === 'object' && !global.Formio) {
|
|
112
|
+
global.Formio = FormioCore;
|
|
113
|
+
}
|
|
114
|
+
};
|
|
115
|
+
if (typeof global !== 'undefined') {
|
|
116
|
+
FormioCore.addToGlobal(global);
|
|
117
|
+
}
|
|
118
|
+
if (typeof window !== 'undefined') {
|
|
119
|
+
FormioCore.addToGlobal(window);
|
|
120
|
+
}
|
|
110
121
|
export { FormioCore as Formio };
|
package/lib/mjs/Webform.d.ts
CHANGED
|
@@ -471,7 +471,7 @@ declare class Webform extends NestedDataComponent {
|
|
|
471
471
|
*/
|
|
472
472
|
submit(before: boolean, options?: {}): Promise<any>;
|
|
473
473
|
submitUrl(URL: any, headers: any): void;
|
|
474
|
-
|
|
474
|
+
triggerCaptcha(): void;
|
|
475
475
|
_nosubmit: any;
|
|
476
476
|
get conditions(): any;
|
|
477
477
|
get variables(): any;
|