@formio/js 5.1.0-rc.28 → 5.1.0-rc.29
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.embed.js +1 -1
- package/dist/formio.embed.min.js +1 -1
- package/dist/formio.embed.min.js.LICENSE.txt +1 -1
- package/dist/formio.form.js +4 -4
- package/dist/formio.form.min.js +1 -1
- package/dist/formio.form.min.js.LICENSE.txt +1 -1
- package/dist/formio.full.js +6 -6
- package/dist/formio.full.min.js +1 -1
- package/dist/formio.full.min.js.LICENSE.txt +1 -1
- package/dist/formio.js +2 -2
- package/dist/formio.min.js +1 -1
- package/dist/formio.min.js.LICENSE.txt +1 -1
- package/dist/formio.utils.min.js.LICENSE.txt +1 -1
- package/lib/cjs/Embed.js +1 -1
- package/lib/cjs/Formio.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 +1 -1
- package/lib/cjs/components/select/editForm/Select.edit.data.js +1 -0
- package/lib/cjs/components/unknown/Unknown.form.d.ts +1 -0
- package/lib/cjs/components/unknown/Unknown.form.js +1 -0
- package/lib/mjs/Embed.js +1 -1
- package/lib/mjs/Formio.js +1 -1
- 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 +1 -1
- package/lib/mjs/components/select/editForm/Select.edit.data.js +1 -0
- package/lib/mjs/components/unknown/Unknown.form.d.ts +1 -0
- package/lib/mjs/components/unknown/Unknown.form.js +1 -0
- package/package.json +1 -1
@@ -20,7 +20,7 @@
|
|
20
20
|
|
21
21
|
/*! @license DOMPurify 3.2.4 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.4/LICENSE */
|
22
22
|
|
23
|
-
/*! formiojs v5.1.0-rc.
|
23
|
+
/*! formiojs v5.1.0-rc.29 | https://unpkg.com/formiojs@5.1.0-rc.29/LICENSE.txt */
|
24
24
|
|
25
25
|
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
|
26
26
|
|
@@ -20,7 +20,7 @@
|
|
20
20
|
|
21
21
|
/*! @license DOMPurify 3.2.4 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.4/LICENSE */
|
22
22
|
|
23
|
-
/*! formiojs v5.1.0-rc.
|
23
|
+
/*! formiojs v5.1.0-rc.29 | https://unpkg.com/formiojs@5.1.0-rc.29/LICENSE.txt */
|
24
24
|
|
25
25
|
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
|
26
26
|
|
package/lib/cjs/Embed.js
CHANGED
@@ -418,7 +418,7 @@ Formio.formioReady = new Promise((ready, reject) => {
|
|
418
418
|
_a._formioReady = ready;
|
419
419
|
_a._formioReadyReject = reject;
|
420
420
|
});
|
421
|
-
Formio.version = '5.1.0-rc.
|
421
|
+
Formio.version = '5.1.0-rc.29';
|
422
422
|
// Create a report.
|
423
423
|
Formio.Report = {
|
424
424
|
create: (element, submission, options = {}) => __awaiter(void 0, void 0, void 0, function* () {
|
package/lib/cjs/Formio.js
CHANGED
@@ -11,7 +11,7 @@ const CDN_1 = __importDefault(require("./CDN"));
|
|
11
11
|
const providers_1 = __importDefault(require("./providers"));
|
12
12
|
sdk_1.Formio.cdn = new CDN_1.default();
|
13
13
|
sdk_1.Formio.Providers = providers_1.default;
|
14
|
-
sdk_1.Formio.version = '5.1.0-rc.
|
14
|
+
sdk_1.Formio.version = '5.1.0-rc.29';
|
15
15
|
CDN_1.default.defaultCDN = sdk_1.Formio.version.includes('rc') ? 'https://cdn.test-form.io' : 'https://cdn.form.io';
|
16
16
|
const isNil = (val) => val === null || val === undefined;
|
17
17
|
sdk_1.Formio.prototype.uploadFile = function (storage, file, fileName, dir, progressCallback, url, options, fileKey, groupPermissions, groupId, uploadStartCallback, abortCallback, multipartOptions) {
|
@@ -1010,9 +1010,10 @@ declare class Component extends Element {
|
|
1010
1010
|
* @param {boolean} dirty - If the component is dirty.
|
1011
1011
|
* @param {boolean} ignoreCondition - If conditions for the component should be ignored when checking validity.
|
1012
1012
|
* @param {*} row - Contextual row data for this component.
|
1013
|
+
* @param {*} options - Additional options for validation.
|
1013
1014
|
* @returns {string} - The message to show when the component is invalid.
|
1014
1015
|
*/
|
1015
|
-
invalidMessage(data: any, dirty: boolean, ignoreCondition: boolean, row: any): string;
|
1016
|
+
invalidMessage(data: any, dirty: boolean, ignoreCondition: boolean, row: any, options?: any): string;
|
1016
1017
|
/**
|
1017
1018
|
* Returns if the component is valid or not.
|
1018
1019
|
* @param {*} data - The data to check if the component is valid.
|
@@ -2976,10 +2976,12 @@ class Component extends Element_1.default {
|
|
2976
2976
|
* @param {boolean} dirty - If the component is dirty.
|
2977
2977
|
* @param {boolean} ignoreCondition - If conditions for the component should be ignored when checking validity.
|
2978
2978
|
* @param {*} row - Contextual row data for this component.
|
2979
|
+
* @param {*} options - Additional options for validation.
|
2979
2980
|
* @returns {string} - The message to show when the component is invalid.
|
2980
2981
|
*/
|
2981
|
-
invalidMessage(data, dirty, ignoreCondition, row) {
|
2982
|
+
invalidMessage(data, dirty, ignoreCondition, row, options = {}) {
|
2982
2983
|
var _a;
|
2984
|
+
const { local } = options;
|
2983
2985
|
if (!row) {
|
2984
2986
|
row = (0, utils_1.getContextualRowData)(this.component, data, this.paths);
|
2985
2987
|
}
|
@@ -2999,6 +3001,7 @@ class Component extends Element_1.default {
|
|
2999
3001
|
component: this.component,
|
3000
3002
|
data,
|
3001
3003
|
row,
|
3004
|
+
local,
|
3002
3005
|
path: this.path || this.component.key,
|
3003
3006
|
parent: (_a = this.parent) === null || _a === void 0 ? void 0 : _a.component,
|
3004
3007
|
paths: this.paths,
|
@@ -3177,7 +3180,7 @@ class Component extends Element_1.default {
|
|
3177
3180
|
row = row || this.data;
|
3178
3181
|
// Some components (for legacy reasons) have calls to "checkData" in inappropriate places such
|
3179
3182
|
// as setValue. Historically, this was bypassed by a series of cached states around the data model
|
3180
|
-
// which caused its own problems. We need to ensure that premium and custom components do not fall into
|
3183
|
+
// which caused its own problems. We need to ensure that premium and custom components do not fall into
|
3181
3184
|
// an infinite loop by only checking this component once.
|
3182
3185
|
if (this.checkingData) {
|
3183
3186
|
return;
|
@@ -1089,7 +1089,9 @@ class EditGridComponent extends NestedArrayComponent_1.default {
|
|
1089
1089
|
errors.push(...this._errors);
|
1090
1090
|
return false;
|
1091
1091
|
}
|
1092
|
-
|
1092
|
+
// TODO: this is the only place invalidMessage gets called, and it's not clear why it's needed - we already validate the editGrid
|
1093
|
+
// component above with super.checkComponentValidity
|
1094
|
+
const message = this.invalid || this.invalidMessage(data, dirty, false, row, options);
|
1093
1095
|
if (allRowErrors.length && ((_b = this.root) === null || _b === void 0 ? void 0 : _b.submitted) && !message) {
|
1094
1096
|
this._errors = this.setCustomValidity(message, dirty);
|
1095
1097
|
errors.push(...this._errors);
|
@@ -172,6 +172,7 @@ declare const _default: ({
|
|
172
172
|
key: string;
|
173
173
|
tooltip: string;
|
174
174
|
weight: number;
|
175
|
+
defaultValue: boolean;
|
175
176
|
conditional: {
|
176
177
|
json: {
|
177
178
|
and: ({
|
@@ -192,7 +193,6 @@ declare const _default: ({
|
|
192
193
|
data?: undefined;
|
193
194
|
as?: undefined;
|
194
195
|
editor?: undefined;
|
195
|
-
defaultValue?: undefined;
|
196
196
|
description?: undefined;
|
197
197
|
reorder?: undefined;
|
198
198
|
components?: undefined;
|
@@ -119,6 +119,7 @@ exports.default = [
|
|
119
119
|
key: 'lazyLoad',
|
120
120
|
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.',
|
121
121
|
weight: 11,
|
122
|
+
defaultValue: true,
|
122
123
|
conditional: {
|
123
124
|
json: {
|
124
125
|
and: [
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const Unknown_edit_display_1 = __importDefault(require("./editForm/Unknown.edit.display"));
|
7
7
|
/**
|
8
8
|
* Unknown Component schema.
|
9
|
+
* @param {...any} extend
|
9
10
|
* @returns {object} - The Unknown Component edit form.
|
10
11
|
*/
|
11
12
|
function default_1() {
|
package/lib/mjs/Embed.js
CHANGED
@@ -14,7 +14,7 @@ export class Formio {
|
|
14
14
|
Formio._formioReady = ready;
|
15
15
|
Formio._formioReadyReject = reject;
|
16
16
|
});
|
17
|
-
static version = '5.1.0-rc.
|
17
|
+
static version = '5.1.0-rc.29';
|
18
18
|
static setLicense(license, norecurse = false) {
|
19
19
|
Formio.license = license;
|
20
20
|
if (!norecurse && Formio.FormioClass) {
|
package/lib/mjs/Formio.js
CHANGED
@@ -4,7 +4,7 @@ import CDN from './CDN';
|
|
4
4
|
import Providers from './providers';
|
5
5
|
FormioCore.cdn = new CDN();
|
6
6
|
FormioCore.Providers = Providers;
|
7
|
-
FormioCore.version = '5.1.0-rc.
|
7
|
+
FormioCore.version = '5.1.0-rc.29';
|
8
8
|
CDN.defaultCDN = FormioCore.version.includes('rc') ? 'https://cdn.test-form.io' : 'https://cdn.form.io';
|
9
9
|
const isNil = (val) => val === null || val === undefined;
|
10
10
|
FormioCore.prototype.uploadFile = function (storage, file, fileName, dir, progressCallback, url, options, fileKey, groupPermissions, groupId, uploadStartCallback, abortCallback, multipartOptions) {
|
@@ -1010,9 +1010,10 @@ declare class Component extends Element {
|
|
1010
1010
|
* @param {boolean} dirty - If the component is dirty.
|
1011
1011
|
* @param {boolean} ignoreCondition - If conditions for the component should be ignored when checking validity.
|
1012
1012
|
* @param {*} row - Contextual row data for this component.
|
1013
|
+
* @param {*} options - Additional options for validation.
|
1013
1014
|
* @returns {string} - The message to show when the component is invalid.
|
1014
1015
|
*/
|
1015
|
-
invalidMessage(data: any, dirty: boolean, ignoreCondition: boolean, row: any): string;
|
1016
|
+
invalidMessage(data: any, dirty: boolean, ignoreCondition: boolean, row: any, options?: any): string;
|
1016
1017
|
/**
|
1017
1018
|
* Returns if the component is valid or not.
|
1018
1019
|
* @param {*} data - The data to check if the component is valid.
|
@@ -2955,9 +2955,11 @@ export default class Component extends Element {
|
|
2955
2955
|
* @param {boolean} dirty - If the component is dirty.
|
2956
2956
|
* @param {boolean} ignoreCondition - If conditions for the component should be ignored when checking validity.
|
2957
2957
|
* @param {*} row - Contextual row data for this component.
|
2958
|
+
* @param {*} options - Additional options for validation.
|
2958
2959
|
* @returns {string} - The message to show when the component is invalid.
|
2959
2960
|
*/
|
2960
|
-
invalidMessage(data, dirty, ignoreCondition, row) {
|
2961
|
+
invalidMessage(data, dirty, ignoreCondition, row, options = {}) {
|
2962
|
+
const { local } = options;
|
2961
2963
|
if (!row) {
|
2962
2964
|
row = getContextualRowData(this.component, data, this.paths);
|
2963
2965
|
}
|
@@ -2977,6 +2979,7 @@ export default class Component extends Element {
|
|
2977
2979
|
component: this.component,
|
2978
2980
|
data,
|
2979
2981
|
row,
|
2982
|
+
local,
|
2980
2983
|
path: this.path || this.component.key,
|
2981
2984
|
parent: this.parent?.component,
|
2982
2985
|
paths: this.paths,
|
@@ -3153,7 +3156,7 @@ export default class Component extends Element {
|
|
3153
3156
|
row = row || this.data;
|
3154
3157
|
// Some components (for legacy reasons) have calls to "checkData" in inappropriate places such
|
3155
3158
|
// as setValue. Historically, this was bypassed by a series of cached states around the data model
|
3156
|
-
// which caused its own problems. We need to ensure that premium and custom components do not fall into
|
3159
|
+
// which caused its own problems. We need to ensure that premium and custom components do not fall into
|
3157
3160
|
// an infinite loop by only checking this component once.
|
3158
3161
|
if (this.checkingData) {
|
3159
3162
|
return;
|
@@ -1081,7 +1081,9 @@ export default class EditGridComponent extends NestedArrayComponent {
|
|
1081
1081
|
errors.push(...this._errors);
|
1082
1082
|
return false;
|
1083
1083
|
}
|
1084
|
-
|
1084
|
+
// TODO: this is the only place invalidMessage gets called, and it's not clear why it's needed - we already validate the editGrid
|
1085
|
+
// component above with super.checkComponentValidity
|
1086
|
+
const message = this.invalid || this.invalidMessage(data, dirty, false, row, options);
|
1085
1087
|
if (allRowErrors.length && this.root?.submitted && !message) {
|
1086
1088
|
this._errors = this.setCustomValidity(message, dirty);
|
1087
1089
|
errors.push(...this._errors);
|
@@ -172,6 +172,7 @@ declare const _default: ({
|
|
172
172
|
key: string;
|
173
173
|
tooltip: string;
|
174
174
|
weight: number;
|
175
|
+
defaultValue: boolean;
|
175
176
|
conditional: {
|
176
177
|
json: {
|
177
178
|
and: ({
|
@@ -192,7 +193,6 @@ declare const _default: ({
|
|
192
193
|
data?: undefined;
|
193
194
|
as?: undefined;
|
194
195
|
editor?: undefined;
|
195
|
-
defaultValue?: undefined;
|
196
196
|
description?: undefined;
|
197
197
|
reorder?: undefined;
|
198
198
|
components?: undefined;
|
@@ -113,6 +113,7 @@ export default [
|
|
113
113
|
key: 'lazyLoad',
|
114
114
|
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.',
|
115
115
|
weight: 11,
|
116
|
+
defaultValue: true,
|
116
117
|
conditional: {
|
117
118
|
json: {
|
118
119
|
and: [
|