@formio/js 5.1.0-dev.6069.caec01d → 5.1.0-dev.6070.c51663f
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 +4 -4
- package/dist/formio.form.min.js +1 -1
- package/dist/formio.full.js +6 -6
- package/dist/formio.full.min.js +1 -1
- package/lib/cjs/components/_classes/component/Component.d.ts +2 -1
- package/lib/cjs/components/_classes/component/Component.js +5 -2
- package/lib/cjs/components/editgrid/EditGrid.js +3 -1
- package/lib/cjs/components/select/editForm/Select.edit.data.d.ts +18 -18
- package/lib/cjs/components/select/editForm/Select.edit.data.js +1 -0
- package/lib/cjs/components/survey/Survey.js +1 -1
- package/lib/cjs/components/textarea/TextArea.js +9 -1
- package/lib/cjs/components/unknown/Unknown.form.d.ts +2 -1
- package/lib/cjs/components/unknown/Unknown.form.js +13 -9
- package/lib/mjs/components/_classes/component/Component.d.ts +2 -1
- package/lib/mjs/components/_classes/component/Component.js +5 -2
- package/lib/mjs/components/editgrid/EditGrid.js +3 -1
- package/lib/mjs/components/select/editForm/Select.edit.data.d.ts +18 -18
- package/lib/mjs/components/select/editForm/Select.edit.data.js +1 -0
- package/lib/mjs/components/survey/Survey.js +1 -1
- package/lib/mjs/components/textarea/TextArea.js +9 -1
- package/lib/mjs/components/unknown/Unknown.form.d.ts +2 -1
- package/lib/mjs/components/unknown/Unknown.form.js +13 -9
- package/package.json +1 -1
@@ -1011,9 +1011,10 @@ declare class Component extends Element {
|
|
1011
1011
|
* @param {boolean} dirty - If the component is dirty.
|
1012
1012
|
* @param {boolean} ignoreCondition - If conditions for the component should be ignored when checking validity.
|
1013
1013
|
* @param {*} row - Contextual row data for this component.
|
1014
|
+
* @param {*} options - Additional options for validation.
|
1014
1015
|
* @returns {string} - The message to show when the component is invalid.
|
1015
1016
|
*/
|
1016
|
-
invalidMessage(data: any, dirty: boolean, ignoreCondition: boolean, row: any): string;
|
1017
|
+
invalidMessage(data: any, dirty: boolean, ignoreCondition: boolean, row: any, options?: any): string;
|
1017
1018
|
/**
|
1018
1019
|
* Returns if the component is valid or not.
|
1019
1020
|
* @param {*} data - The data to check if the component is valid.
|
@@ -2999,10 +2999,12 @@ class Component extends Element_1.default {
|
|
2999
2999
|
* @param {boolean} dirty - If the component is dirty.
|
3000
3000
|
* @param {boolean} ignoreCondition - If conditions for the component should be ignored when checking validity.
|
3001
3001
|
* @param {*} row - Contextual row data for this component.
|
3002
|
+
* @param {*} options - Additional options for validation.
|
3002
3003
|
* @returns {string} - The message to show when the component is invalid.
|
3003
3004
|
*/
|
3004
|
-
invalidMessage(data, dirty, ignoreCondition, row) {
|
3005
|
+
invalidMessage(data, dirty, ignoreCondition, row, options = {}) {
|
3005
3006
|
var _a;
|
3007
|
+
const { local } = options;
|
3006
3008
|
if (!row) {
|
3007
3009
|
row = (0, utils_1.getContextualRowData)(this.component, data, this.paths);
|
3008
3010
|
}
|
@@ -3022,6 +3024,7 @@ class Component extends Element_1.default {
|
|
3022
3024
|
component: this.component,
|
3023
3025
|
data,
|
3024
3026
|
row,
|
3027
|
+
local,
|
3025
3028
|
path: this.path || this.component.key,
|
3026
3029
|
parent: (_a = this.parent) === null || _a === void 0 ? void 0 : _a.component,
|
3027
3030
|
paths: this.paths,
|
@@ -3200,7 +3203,7 @@ class Component extends Element_1.default {
|
|
3200
3203
|
row = row || this.data;
|
3201
3204
|
// Some components (for legacy reasons) have calls to "checkData" in inappropriate places such
|
3202
3205
|
// as setValue. Historically, this was bypassed by a series of cached states around the data model
|
3203
|
-
// which caused its own problems. We need to ensure that premium and custom components do not fall into
|
3206
|
+
// which caused its own problems. We need to ensure that premium and custom components do not fall into
|
3204
3207
|
// an infinite loop by only checking this component once.
|
3205
3208
|
if (this.checkingData) {
|
3206
3209
|
return;
|
@@ -1107,7 +1107,9 @@ class EditGridComponent extends NestedArrayComponent_1.default {
|
|
1107
1107
|
errors.push(...this._errors);
|
1108
1108
|
return false;
|
1109
1109
|
}
|
1110
|
-
|
1110
|
+
// TODO: this is the only place invalidMessage gets called, and it's not clear why it's needed - we already validate the editGrid
|
1111
|
+
// component above with super.checkComponentValidity
|
1112
|
+
const message = this.invalid || this.invalidMessage(data, dirty, false, row, options);
|
1111
1113
|
if (allRowErrors.length && ((_b = this.root) === null || _b === void 0 ? void 0 : _b.submitted) && !message) {
|
1112
1114
|
this._errors = this.setCustomValidity(message, dirty);
|
1113
1115
|
errors.push(...this._errors);
|
@@ -17,8 +17,8 @@ declare const _default: ({
|
|
17
17
|
tooltip?: undefined;
|
18
18
|
description?: undefined;
|
19
19
|
conditional?: undefined;
|
20
|
-
reorder?: undefined;
|
21
20
|
defaultValue?: undefined;
|
21
|
+
reorder?: undefined;
|
22
22
|
components?: undefined;
|
23
23
|
dataSrc?: undefined;
|
24
24
|
authenticate?: undefined;
|
@@ -59,8 +59,8 @@ declare const _default: ({
|
|
59
59
|
};
|
60
60
|
};
|
61
61
|
data?: undefined;
|
62
|
-
reorder?: undefined;
|
63
62
|
defaultValue?: undefined;
|
63
|
+
reorder?: undefined;
|
64
64
|
components?: undefined;
|
65
65
|
dataSrc?: undefined;
|
66
66
|
authenticate?: undefined;
|
@@ -88,6 +88,7 @@ declare const _default: ({
|
|
88
88
|
key: string;
|
89
89
|
tooltip: string;
|
90
90
|
weight: number;
|
91
|
+
defaultValue: boolean;
|
91
92
|
conditional: {
|
92
93
|
json: {
|
93
94
|
and: ({
|
@@ -110,7 +111,6 @@ declare const _default: ({
|
|
110
111
|
editor?: undefined;
|
111
112
|
description?: undefined;
|
112
113
|
reorder?: undefined;
|
113
|
-
defaultValue?: undefined;
|
114
114
|
components?: undefined;
|
115
115
|
dataSrc?: undefined;
|
116
116
|
authenticate?: undefined;
|
@@ -220,8 +220,8 @@ declare const _default: ({
|
|
220
220
|
as?: undefined;
|
221
221
|
editor?: undefined;
|
222
222
|
description?: undefined;
|
223
|
-
reorder?: undefined;
|
224
223
|
defaultValue?: undefined;
|
224
|
+
reorder?: undefined;
|
225
225
|
components?: undefined;
|
226
226
|
skipMerge?: undefined;
|
227
227
|
refreshOn?: undefined;
|
@@ -256,8 +256,8 @@ declare const _default: ({
|
|
256
256
|
data?: undefined;
|
257
257
|
as?: undefined;
|
258
258
|
editor?: undefined;
|
259
|
-
reorder?: undefined;
|
260
259
|
defaultValue?: undefined;
|
260
|
+
reorder?: undefined;
|
261
261
|
components?: undefined;
|
262
262
|
dataSrc?: undefined;
|
263
263
|
authenticate?: undefined;
|
@@ -328,8 +328,8 @@ declare const _default: ({
|
|
328
328
|
as?: undefined;
|
329
329
|
editor?: undefined;
|
330
330
|
description?: undefined;
|
331
|
-
reorder?: undefined;
|
332
331
|
defaultValue?: undefined;
|
332
|
+
reorder?: undefined;
|
333
333
|
components?: undefined;
|
334
334
|
authenticate?: undefined;
|
335
335
|
placeholder?: undefined;
|
@@ -363,8 +363,8 @@ declare const _default: ({
|
|
363
363
|
editor?: undefined;
|
364
364
|
description?: undefined;
|
365
365
|
conditional?: undefined;
|
366
|
-
reorder?: undefined;
|
367
366
|
defaultValue?: undefined;
|
367
|
+
reorder?: undefined;
|
368
368
|
components?: undefined;
|
369
369
|
authenticate?: undefined;
|
370
370
|
valueProperty?: undefined;
|
@@ -395,8 +395,8 @@ declare const _default: ({
|
|
395
395
|
editor?: undefined;
|
396
396
|
description?: undefined;
|
397
397
|
conditional?: undefined;
|
398
|
-
reorder?: undefined;
|
399
398
|
defaultValue?: undefined;
|
399
|
+
reorder?: undefined;
|
400
400
|
components?: undefined;
|
401
401
|
dataSrc?: undefined;
|
402
402
|
authenticate?: undefined;
|
@@ -436,8 +436,8 @@ declare const _default: ({
|
|
436
436
|
as?: undefined;
|
437
437
|
editor?: undefined;
|
438
438
|
description?: undefined;
|
439
|
-
reorder?: undefined;
|
440
439
|
defaultValue?: undefined;
|
440
|
+
reorder?: undefined;
|
441
441
|
components?: undefined;
|
442
442
|
dataSrc?: undefined;
|
443
443
|
authenticate?: undefined;
|
@@ -478,8 +478,8 @@ declare const _default: ({
|
|
478
478
|
data?: undefined;
|
479
479
|
as?: undefined;
|
480
480
|
editor?: undefined;
|
481
|
-
reorder?: undefined;
|
482
481
|
defaultValue?: undefined;
|
482
|
+
reorder?: undefined;
|
483
483
|
components?: undefined;
|
484
484
|
dataSrc?: undefined;
|
485
485
|
authenticate?: undefined;
|
@@ -626,8 +626,8 @@ declare const _default: ({
|
|
626
626
|
data?: undefined;
|
627
627
|
as?: undefined;
|
628
628
|
editor?: undefined;
|
629
|
-
reorder?: undefined;
|
630
629
|
defaultValue?: undefined;
|
630
|
+
reorder?: undefined;
|
631
631
|
components?: undefined;
|
632
632
|
dataSrc?: undefined;
|
633
633
|
authenticate?: undefined;
|
@@ -669,8 +669,8 @@ declare const _default: ({
|
|
669
669
|
data?: undefined;
|
670
670
|
as?: undefined;
|
671
671
|
description?: undefined;
|
672
|
-
reorder?: undefined;
|
673
672
|
defaultValue?: undefined;
|
673
|
+
reorder?: undefined;
|
674
674
|
components?: undefined;
|
675
675
|
dataSrc?: undefined;
|
676
676
|
authenticate?: undefined;
|
@@ -718,8 +718,8 @@ declare const _default: ({
|
|
718
718
|
as?: undefined;
|
719
719
|
editor?: undefined;
|
720
720
|
description?: undefined;
|
721
|
-
reorder?: undefined;
|
722
721
|
defaultValue?: undefined;
|
722
|
+
reorder?: undefined;
|
723
723
|
components?: undefined;
|
724
724
|
authenticate?: undefined;
|
725
725
|
template?: undefined;
|
@@ -932,8 +932,8 @@ declare const _default: ({
|
|
932
932
|
as?: undefined;
|
933
933
|
editor?: undefined;
|
934
934
|
description?: undefined;
|
935
|
-
reorder?: undefined;
|
936
935
|
defaultValue?: undefined;
|
936
|
+
reorder?: undefined;
|
937
937
|
components?: undefined;
|
938
938
|
dataSrc?: undefined;
|
939
939
|
authenticate?: undefined;
|
@@ -965,8 +965,8 @@ declare const _default: ({
|
|
965
965
|
editor?: undefined;
|
966
966
|
description?: undefined;
|
967
967
|
conditional?: undefined;
|
968
|
-
reorder?: undefined;
|
969
968
|
defaultValue?: undefined;
|
969
|
+
reorder?: undefined;
|
970
970
|
components?: undefined;
|
971
971
|
dataSrc?: undefined;
|
972
972
|
authenticate?: undefined;
|
@@ -1035,8 +1035,8 @@ declare const _default: ({
|
|
1035
1035
|
tooltip?: undefined;
|
1036
1036
|
description?: undefined;
|
1037
1037
|
conditional?: undefined;
|
1038
|
-
reorder?: undefined;
|
1039
1038
|
defaultValue?: undefined;
|
1039
|
+
reorder?: undefined;
|
1040
1040
|
components?: undefined;
|
1041
1041
|
dataSrc?: undefined;
|
1042
1042
|
authenticate?: undefined;
|
@@ -1115,8 +1115,8 @@ declare const _default: ({
|
|
1115
1115
|
label?: undefined;
|
1116
1116
|
tooltip?: undefined;
|
1117
1117
|
description?: undefined;
|
1118
|
-
reorder?: undefined;
|
1119
1118
|
defaultValue?: undefined;
|
1119
|
+
reorder?: undefined;
|
1120
1120
|
components?: undefined;
|
1121
1121
|
dataSrc?: undefined;
|
1122
1122
|
authenticate?: undefined;
|
@@ -1150,8 +1150,8 @@ declare const _default: ({
|
|
1150
1150
|
tooltip?: undefined;
|
1151
1151
|
description?: undefined;
|
1152
1152
|
conditional?: undefined;
|
1153
|
-
reorder?: undefined;
|
1154
1153
|
defaultValue?: undefined;
|
1154
|
+
reorder?: undefined;
|
1155
1155
|
components?: undefined;
|
1156
1156
|
dataSrc?: undefined;
|
1157
1157
|
authenticate?: undefined;
|
@@ -83,6 +83,7 @@ exports.default = [
|
|
83
83
|
key: 'lazyLoad',
|
84
84
|
tooltip: 'When set, this will not fire off the request to the URL until this control is within focus. This can improve performance if you have many Select dropdowns on your form where the API\'s will only fire when the control is activated.',
|
85
85
|
weight: 11,
|
86
|
+
defaultValue: true,
|
86
87
|
conditional: {
|
87
88
|
json: {
|
88
89
|
and: [
|
@@ -120,7 +120,7 @@ class SurveyComponent extends Field_1.default {
|
|
120
120
|
return this.component.questions.reduce((result, question) => result && Boolean(value[question.value]), true);
|
121
121
|
}
|
122
122
|
getInputName(question) {
|
123
|
-
return `${this.options.name}[${question.value}]`;
|
123
|
+
return `${this.options.name}[${question.value}][${this.id}]`;
|
124
124
|
}
|
125
125
|
getValueAsString(value, options) {
|
126
126
|
if (options === null || options === void 0 ? void 0 : options.email) {
|
@@ -62,7 +62,15 @@ class TextAreaComponent extends TextField_1.default {
|
|
62
62
|
info.content = value;
|
63
63
|
if ((this.options.readOnly || this.disabled) && !this.isHtmlRenderMode()) {
|
64
64
|
const elementStyle = this.info.attr.style || '';
|
65
|
-
const children =
|
65
|
+
const children = `
|
66
|
+
<div ${this._referenceAttributeName}="input"
|
67
|
+
class="formio-editor-read-only-content"
|
68
|
+
${elementStyle ? `style='${elementStyle}'` : ''}
|
69
|
+
role="textbox"
|
70
|
+
aria-multiline="true"
|
71
|
+
aria-readonly="true"
|
72
|
+
>
|
73
|
+
</div>`;
|
66
74
|
return this.renderTemplate('well', {
|
67
75
|
children,
|
68
76
|
nestedKey: this.key,
|
@@ -3,25 +3,29 @@ 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
|
+
const lodash_1 = require("lodash");
|
6
7
|
const Unknown_edit_display_1 = __importDefault(require("./editForm/Unknown.edit.display"));
|
8
|
+
const utils_1 = __importDefault(require("../../components/_classes/component/editForm/utils"));
|
7
9
|
/**
|
8
10
|
* Unknown Component schema.
|
11
|
+
* @param {...any} extend
|
9
12
|
* @returns {object} - The Unknown Component edit form.
|
10
13
|
*/
|
11
|
-
function default_1() {
|
14
|
+
function default_1(...extend) {
|
15
|
+
const components = [
|
16
|
+
{
|
17
|
+
label: 'Custom',
|
18
|
+
key: 'display',
|
19
|
+
weight: 0,
|
20
|
+
components: Unknown_edit_display_1.default
|
21
|
+
}
|
22
|
+
].concat(...extend);
|
12
23
|
return {
|
13
24
|
components: [
|
14
25
|
{
|
15
26
|
type: 'tabs',
|
16
27
|
key: 'tabs',
|
17
|
-
components:
|
18
|
-
{
|
19
|
-
label: 'Custom',
|
20
|
-
key: 'display',
|
21
|
-
weight: 0,
|
22
|
-
components: Unknown_edit_display_1.default
|
23
|
-
}
|
24
|
-
]
|
28
|
+
components: (0, lodash_1.unionWith)(components, utils_1.default.unifyComponents)
|
25
29
|
}
|
26
30
|
]
|
27
31
|
};
|
@@ -1011,9 +1011,10 @@ declare class Component extends Element {
|
|
1011
1011
|
* @param {boolean} dirty - If the component is dirty.
|
1012
1012
|
* @param {boolean} ignoreCondition - If conditions for the component should be ignored when checking validity.
|
1013
1013
|
* @param {*} row - Contextual row data for this component.
|
1014
|
+
* @param {*} options - Additional options for validation.
|
1014
1015
|
* @returns {string} - The message to show when the component is invalid.
|
1015
1016
|
*/
|
1016
|
-
invalidMessage(data: any, dirty: boolean, ignoreCondition: boolean, row: any): string;
|
1017
|
+
invalidMessage(data: any, dirty: boolean, ignoreCondition: boolean, row: any, options?: any): string;
|
1017
1018
|
/**
|
1018
1019
|
* Returns if the component is valid or not.
|
1019
1020
|
* @param {*} data - The data to check if the component is valid.
|
@@ -2967,9 +2967,11 @@ export default class Component extends Element {
|
|
2967
2967
|
* @param {boolean} dirty - If the component is dirty.
|
2968
2968
|
* @param {boolean} ignoreCondition - If conditions for the component should be ignored when checking validity.
|
2969
2969
|
* @param {*} row - Contextual row data for this component.
|
2970
|
+
* @param {*} options - Additional options for validation.
|
2970
2971
|
* @returns {string} - The message to show when the component is invalid.
|
2971
2972
|
*/
|
2972
|
-
invalidMessage(data, dirty, ignoreCondition, row) {
|
2973
|
+
invalidMessage(data, dirty, ignoreCondition, row, options = {}) {
|
2974
|
+
const { local } = options;
|
2973
2975
|
if (!row) {
|
2974
2976
|
row = getContextualRowData(this.component, data, this.paths);
|
2975
2977
|
}
|
@@ -2989,6 +2991,7 @@ export default class Component extends Element {
|
|
2989
2991
|
component: this.component,
|
2990
2992
|
data,
|
2991
2993
|
row,
|
2994
|
+
local,
|
2992
2995
|
path: this.path || this.component.key,
|
2993
2996
|
parent: this.parent?.component,
|
2994
2997
|
paths: this.paths,
|
@@ -3165,7 +3168,7 @@ export default class Component extends Element {
|
|
3165
3168
|
row = row || this.data;
|
3166
3169
|
// Some components (for legacy reasons) have calls to "checkData" in inappropriate places such
|
3167
3170
|
// as setValue. Historically, this was bypassed by a series of cached states around the data model
|
3168
|
-
// which caused its own problems. We need to ensure that premium and custom components do not fall into
|
3171
|
+
// which caused its own problems. We need to ensure that premium and custom components do not fall into
|
3169
3172
|
// an infinite loop by only checking this component once.
|
3170
3173
|
if (this.checkingData) {
|
3171
3174
|
return;
|
@@ -1099,7 +1099,9 @@ export default class EditGridComponent extends NestedArrayComponent {
|
|
1099
1099
|
errors.push(...this._errors);
|
1100
1100
|
return false;
|
1101
1101
|
}
|
1102
|
-
|
1102
|
+
// TODO: this is the only place invalidMessage gets called, and it's not clear why it's needed - we already validate the editGrid
|
1103
|
+
// component above with super.checkComponentValidity
|
1104
|
+
const message = this.invalid || this.invalidMessage(data, dirty, false, row, options);
|
1103
1105
|
if (allRowErrors.length && this.root?.submitted && !message) {
|
1104
1106
|
this._errors = this.setCustomValidity(message, dirty);
|
1105
1107
|
errors.push(...this._errors);
|
@@ -17,8 +17,8 @@ declare const _default: ({
|
|
17
17
|
tooltip?: undefined;
|
18
18
|
description?: undefined;
|
19
19
|
conditional?: undefined;
|
20
|
-
reorder?: undefined;
|
21
20
|
defaultValue?: undefined;
|
21
|
+
reorder?: undefined;
|
22
22
|
components?: undefined;
|
23
23
|
dataSrc?: undefined;
|
24
24
|
authenticate?: undefined;
|
@@ -59,8 +59,8 @@ declare const _default: ({
|
|
59
59
|
};
|
60
60
|
};
|
61
61
|
data?: undefined;
|
62
|
-
reorder?: undefined;
|
63
62
|
defaultValue?: undefined;
|
63
|
+
reorder?: undefined;
|
64
64
|
components?: undefined;
|
65
65
|
dataSrc?: undefined;
|
66
66
|
authenticate?: undefined;
|
@@ -88,6 +88,7 @@ declare const _default: ({
|
|
88
88
|
key: string;
|
89
89
|
tooltip: string;
|
90
90
|
weight: number;
|
91
|
+
defaultValue: boolean;
|
91
92
|
conditional: {
|
92
93
|
json: {
|
93
94
|
and: ({
|
@@ -110,7 +111,6 @@ declare const _default: ({
|
|
110
111
|
editor?: undefined;
|
111
112
|
description?: undefined;
|
112
113
|
reorder?: undefined;
|
113
|
-
defaultValue?: undefined;
|
114
114
|
components?: undefined;
|
115
115
|
dataSrc?: undefined;
|
116
116
|
authenticate?: undefined;
|
@@ -220,8 +220,8 @@ declare const _default: ({
|
|
220
220
|
as?: undefined;
|
221
221
|
editor?: undefined;
|
222
222
|
description?: undefined;
|
223
|
-
reorder?: undefined;
|
224
223
|
defaultValue?: undefined;
|
224
|
+
reorder?: undefined;
|
225
225
|
components?: undefined;
|
226
226
|
skipMerge?: undefined;
|
227
227
|
refreshOn?: undefined;
|
@@ -256,8 +256,8 @@ declare const _default: ({
|
|
256
256
|
data?: undefined;
|
257
257
|
as?: undefined;
|
258
258
|
editor?: undefined;
|
259
|
-
reorder?: undefined;
|
260
259
|
defaultValue?: undefined;
|
260
|
+
reorder?: undefined;
|
261
261
|
components?: undefined;
|
262
262
|
dataSrc?: undefined;
|
263
263
|
authenticate?: undefined;
|
@@ -328,8 +328,8 @@ declare const _default: ({
|
|
328
328
|
as?: undefined;
|
329
329
|
editor?: undefined;
|
330
330
|
description?: undefined;
|
331
|
-
reorder?: undefined;
|
332
331
|
defaultValue?: undefined;
|
332
|
+
reorder?: undefined;
|
333
333
|
components?: undefined;
|
334
334
|
authenticate?: undefined;
|
335
335
|
placeholder?: undefined;
|
@@ -363,8 +363,8 @@ declare const _default: ({
|
|
363
363
|
editor?: undefined;
|
364
364
|
description?: undefined;
|
365
365
|
conditional?: undefined;
|
366
|
-
reorder?: undefined;
|
367
366
|
defaultValue?: undefined;
|
367
|
+
reorder?: undefined;
|
368
368
|
components?: undefined;
|
369
369
|
authenticate?: undefined;
|
370
370
|
valueProperty?: undefined;
|
@@ -395,8 +395,8 @@ declare const _default: ({
|
|
395
395
|
editor?: undefined;
|
396
396
|
description?: undefined;
|
397
397
|
conditional?: undefined;
|
398
|
-
reorder?: undefined;
|
399
398
|
defaultValue?: undefined;
|
399
|
+
reorder?: undefined;
|
400
400
|
components?: undefined;
|
401
401
|
dataSrc?: undefined;
|
402
402
|
authenticate?: undefined;
|
@@ -436,8 +436,8 @@ declare const _default: ({
|
|
436
436
|
as?: undefined;
|
437
437
|
editor?: undefined;
|
438
438
|
description?: undefined;
|
439
|
-
reorder?: undefined;
|
440
439
|
defaultValue?: undefined;
|
440
|
+
reorder?: undefined;
|
441
441
|
components?: undefined;
|
442
442
|
dataSrc?: undefined;
|
443
443
|
authenticate?: undefined;
|
@@ -478,8 +478,8 @@ declare const _default: ({
|
|
478
478
|
data?: undefined;
|
479
479
|
as?: undefined;
|
480
480
|
editor?: undefined;
|
481
|
-
reorder?: undefined;
|
482
481
|
defaultValue?: undefined;
|
482
|
+
reorder?: undefined;
|
483
483
|
components?: undefined;
|
484
484
|
dataSrc?: undefined;
|
485
485
|
authenticate?: undefined;
|
@@ -626,8 +626,8 @@ declare const _default: ({
|
|
626
626
|
data?: undefined;
|
627
627
|
as?: undefined;
|
628
628
|
editor?: undefined;
|
629
|
-
reorder?: undefined;
|
630
629
|
defaultValue?: undefined;
|
630
|
+
reorder?: undefined;
|
631
631
|
components?: undefined;
|
632
632
|
dataSrc?: undefined;
|
633
633
|
authenticate?: undefined;
|
@@ -669,8 +669,8 @@ declare const _default: ({
|
|
669
669
|
data?: undefined;
|
670
670
|
as?: undefined;
|
671
671
|
description?: undefined;
|
672
|
-
reorder?: undefined;
|
673
672
|
defaultValue?: undefined;
|
673
|
+
reorder?: undefined;
|
674
674
|
components?: undefined;
|
675
675
|
dataSrc?: undefined;
|
676
676
|
authenticate?: undefined;
|
@@ -718,8 +718,8 @@ declare const _default: ({
|
|
718
718
|
as?: undefined;
|
719
719
|
editor?: undefined;
|
720
720
|
description?: undefined;
|
721
|
-
reorder?: undefined;
|
722
721
|
defaultValue?: undefined;
|
722
|
+
reorder?: undefined;
|
723
723
|
components?: undefined;
|
724
724
|
authenticate?: undefined;
|
725
725
|
template?: undefined;
|
@@ -932,8 +932,8 @@ declare const _default: ({
|
|
932
932
|
as?: undefined;
|
933
933
|
editor?: undefined;
|
934
934
|
description?: undefined;
|
935
|
-
reorder?: undefined;
|
936
935
|
defaultValue?: undefined;
|
936
|
+
reorder?: undefined;
|
937
937
|
components?: undefined;
|
938
938
|
dataSrc?: undefined;
|
939
939
|
authenticate?: undefined;
|
@@ -965,8 +965,8 @@ declare const _default: ({
|
|
965
965
|
editor?: undefined;
|
966
966
|
description?: undefined;
|
967
967
|
conditional?: undefined;
|
968
|
-
reorder?: undefined;
|
969
968
|
defaultValue?: undefined;
|
969
|
+
reorder?: undefined;
|
970
970
|
components?: undefined;
|
971
971
|
dataSrc?: undefined;
|
972
972
|
authenticate?: undefined;
|
@@ -1035,8 +1035,8 @@ declare const _default: ({
|
|
1035
1035
|
tooltip?: undefined;
|
1036
1036
|
description?: undefined;
|
1037
1037
|
conditional?: undefined;
|
1038
|
-
reorder?: undefined;
|
1039
1038
|
defaultValue?: undefined;
|
1039
|
+
reorder?: undefined;
|
1040
1040
|
components?: undefined;
|
1041
1041
|
dataSrc?: undefined;
|
1042
1042
|
authenticate?: undefined;
|
@@ -1115,8 +1115,8 @@ declare const _default: ({
|
|
1115
1115
|
label?: undefined;
|
1116
1116
|
tooltip?: undefined;
|
1117
1117
|
description?: undefined;
|
1118
|
-
reorder?: undefined;
|
1119
1118
|
defaultValue?: undefined;
|
1119
|
+
reorder?: undefined;
|
1120
1120
|
components?: undefined;
|
1121
1121
|
dataSrc?: undefined;
|
1122
1122
|
authenticate?: undefined;
|
@@ -1150,8 +1150,8 @@ declare const _default: ({
|
|
1150
1150
|
tooltip?: undefined;
|
1151
1151
|
description?: undefined;
|
1152
1152
|
conditional?: undefined;
|
1153
|
-
reorder?: undefined;
|
1154
1153
|
defaultValue?: undefined;
|
1154
|
+
reorder?: undefined;
|
1155
1155
|
components?: undefined;
|
1156
1156
|
dataSrc?: undefined;
|
1157
1157
|
authenticate?: undefined;
|
@@ -77,6 +77,7 @@ export default [
|
|
77
77
|
key: 'lazyLoad',
|
78
78
|
tooltip: 'When set, this will not fire off the request to the URL until this control is within focus. This can improve performance if you have many Select dropdowns on your form where the API\'s will only fire when the control is activated.',
|
79
79
|
weight: 11,
|
80
|
+
defaultValue: true,
|
80
81
|
conditional: {
|
81
82
|
json: {
|
82
83
|
and: [
|
@@ -118,7 +118,7 @@ export default class SurveyComponent extends Field {
|
|
118
118
|
return this.component.questions.reduce((result, question) => result && Boolean(value[question.value]), true);
|
119
119
|
}
|
120
120
|
getInputName(question) {
|
121
|
-
return `${this.options.name}[${question.value}]`;
|
121
|
+
return `${this.options.name}[${question.value}][${this.id}]`;
|
122
122
|
}
|
123
123
|
getValueAsString(value, options) {
|
124
124
|
if (options?.email) {
|
@@ -57,7 +57,15 @@ export default class TextAreaComponent extends TextFieldComponent {
|
|
57
57
|
info.content = value;
|
58
58
|
if ((this.options.readOnly || this.disabled) && !this.isHtmlRenderMode()) {
|
59
59
|
const elementStyle = this.info.attr.style || '';
|
60
|
-
const children =
|
60
|
+
const children = `
|
61
|
+
<div ${this._referenceAttributeName}="input"
|
62
|
+
class="formio-editor-read-only-content"
|
63
|
+
${elementStyle ? `style='${elementStyle}'` : ''}
|
64
|
+
role="textbox"
|
65
|
+
aria-multiline="true"
|
66
|
+
aria-readonly="true"
|
67
|
+
>
|
68
|
+
</div>`;
|
61
69
|
return this.renderTemplate('well', {
|
62
70
|
children,
|
63
71
|
nestedKey: this.key,
|
@@ -1,22 +1,26 @@
|
|
1
|
+
import { unionWith } from 'lodash';
|
1
2
|
import UnknownEditDisplay from './editForm/Unknown.edit.display';
|
3
|
+
import EditFormUtils from '../../components/_classes/component/editForm/utils';
|
2
4
|
/**
|
3
5
|
* Unknown Component schema.
|
6
|
+
* @param {...any} extend
|
4
7
|
* @returns {object} - The Unknown Component edit form.
|
5
8
|
*/
|
6
|
-
export default function () {
|
9
|
+
export default function (...extend) {
|
10
|
+
const components = [
|
11
|
+
{
|
12
|
+
label: 'Custom',
|
13
|
+
key: 'display',
|
14
|
+
weight: 0,
|
15
|
+
components: UnknownEditDisplay
|
16
|
+
}
|
17
|
+
].concat(...extend);
|
7
18
|
return {
|
8
19
|
components: [
|
9
20
|
{
|
10
21
|
type: 'tabs',
|
11
22
|
key: 'tabs',
|
12
|
-
components:
|
13
|
-
{
|
14
|
-
label: 'Custom',
|
15
|
-
key: 'display',
|
16
|
-
weight: 0,
|
17
|
-
components: UnknownEditDisplay
|
18
|
-
}
|
19
|
-
]
|
23
|
+
components: unionWith(components, EditFormUtils.unifyComponents)
|
20
24
|
}
|
21
25
|
]
|
22
26
|
};
|