@formio/js 5.0.0-dev.5732.56033f1 → 5.0.0-dev.5734.79d4f47
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 +4 -4
- package/dist/formio.full.min.js +1 -1
- package/lib/cjs/Form.d.ts +2 -2
- package/lib/cjs/Form.js +3 -9
- package/lib/cjs/components/_classes/nested/NestedComponent.js +1 -0
- package/lib/cjs/components/datagrid/DataGrid.d.ts +0 -1
- package/lib/cjs/components/datagrid/DataGrid.js +0 -8
- package/lib/cjs/components/editgrid/EditGrid.js +1 -5
- package/lib/mjs/Form.d.ts +2 -2
- package/lib/mjs/Form.js +3 -9
- package/lib/mjs/components/_classes/nested/NestedComponent.js +1 -0
- package/lib/mjs/components/datagrid/DataGrid.d.ts +0 -1
- package/lib/mjs/components/datagrid/DataGrid.js +0 -8
- package/lib/mjs/components/editgrid/EditGrid.js +1 -5
- package/package.json +1 -1
package/lib/cjs/Form.d.ts
CHANGED
|
@@ -398,10 +398,10 @@ export default class Form extends Element {
|
|
|
398
398
|
getFormInitOptions(url: string, form: import('@formio/core').Form): object;
|
|
399
399
|
/**
|
|
400
400
|
* Sets the form to the JSON schema of a form.
|
|
401
|
-
* @param {import('@formio/core').Form
|
|
401
|
+
* @param {import('@formio/core').Form} formParam - The form JSON to set this form to.
|
|
402
402
|
* @returns {Promise<Webform|Wizard|PDF>} - The webform instance that was created.
|
|
403
403
|
*/
|
|
404
|
-
setForm(formParam: import('@formio/core').Form
|
|
404
|
+
setForm(formParam: import('@formio/core').Form): Promise<Webform | Wizard | PDF>;
|
|
405
405
|
_form: any;
|
|
406
406
|
getSubmission(formio: any, opts: any): any;
|
|
407
407
|
/**
|
package/lib/cjs/Form.js
CHANGED
|
@@ -195,7 +195,7 @@ class Form extends Element_1.default {
|
|
|
195
195
|
}
|
|
196
196
|
/**
|
|
197
197
|
* Sets the form to the JSON schema of a form.
|
|
198
|
-
* @param {import('@formio/core').Form
|
|
198
|
+
* @param {import('@formio/core').Form} formParam - The form JSON to set this form to.
|
|
199
199
|
* @returns {Promise<Webform|Wizard|PDF>} - The webform instance that was created.
|
|
200
200
|
*/
|
|
201
201
|
setForm(formParam) {
|
|
@@ -222,14 +222,8 @@ class Form extends Element_1.default {
|
|
|
222
222
|
}
|
|
223
223
|
this.loading = false;
|
|
224
224
|
this.instance = this.instance || this.create(form.display);
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
const options = this.getFormInitOptions(formParam, form);
|
|
228
|
-
this.instance.setUrl(formParam, options);
|
|
229
|
-
}
|
|
230
|
-
else {
|
|
231
|
-
this.instance.url = formParam;
|
|
232
|
-
}
|
|
225
|
+
const options = this.getFormInitOptions(formParam, form);
|
|
226
|
+
this.instance.setUrl(formParam, options);
|
|
233
227
|
this.instance.nosubmit = false;
|
|
234
228
|
this._form = this.instance.form = form;
|
|
235
229
|
if (submission) {
|
|
@@ -497,6 +497,7 @@ class NestedComponent extends Field_1.default {
|
|
|
497
497
|
header: 'single',
|
|
498
498
|
collapsed: this.collapsed,
|
|
499
499
|
[this.nestedKey]: 'single',
|
|
500
|
+
messageContainer: 'single-scope',
|
|
500
501
|
});
|
|
501
502
|
let childPromise = Promise.resolve();
|
|
502
503
|
if (this.refs[this.nestedKey]) {
|
|
@@ -263,13 +263,6 @@ class DataGridComponent extends NestedArrayComponent_1.default {
|
|
|
263
263
|
return hasHeader || ((col.label || col.title) && !col.hideLabel);
|
|
264
264
|
}, false);
|
|
265
265
|
}
|
|
266
|
-
loadRefs(element, refs) {
|
|
267
|
-
super.loadRefs(element, refs);
|
|
268
|
-
if (refs['messageContainer'] === 'single') {
|
|
269
|
-
const container = lodash_1.default.last(element.querySelectorAll(`[${this._referenceAttributeName}=messageContainer]`));
|
|
270
|
-
this.refs['messageContainer'] = container || this.refs['messageContainer'];
|
|
271
|
-
}
|
|
272
|
-
}
|
|
273
266
|
attach(element) {
|
|
274
267
|
this.loadRefs(element, {
|
|
275
268
|
[`${this.datagridKey}-row`]: 'multiple',
|
|
@@ -278,7 +271,6 @@ class DataGridComponent extends NestedArrayComponent_1.default {
|
|
|
278
271
|
[`${this.datagridKey}-removeRow`]: 'multiple',
|
|
279
272
|
[`${this.datagridKey}-group-header`]: 'multiple',
|
|
280
273
|
[this.datagridKey]: 'multiple',
|
|
281
|
-
'messageContainer': 'single'
|
|
282
274
|
});
|
|
283
275
|
if (this.allowReorder) {
|
|
284
276
|
this.refs[`${this.datagridKey}-row`].forEach((row, index) => {
|
|
@@ -490,11 +490,7 @@ class EditGridComponent extends NestedArrayComponent_1.default {
|
|
|
490
490
|
else {
|
|
491
491
|
this.removeClass(this.refs.component, `formio-component-${this.component.type}-row-open`);
|
|
492
492
|
}
|
|
493
|
-
|
|
494
|
-
this.loadRefs(element, {
|
|
495
|
-
messageContainer: 'single-scope',
|
|
496
|
-
});
|
|
497
|
-
return superAttach;
|
|
493
|
+
return super.attach(element);
|
|
498
494
|
}
|
|
499
495
|
flattenRowDataValue(dataValue) {
|
|
500
496
|
const flattened = {};
|
package/lib/mjs/Form.d.ts
CHANGED
|
@@ -398,10 +398,10 @@ export default class Form extends Element {
|
|
|
398
398
|
getFormInitOptions(url: string, form: import('@formio/core').Form): object;
|
|
399
399
|
/**
|
|
400
400
|
* Sets the form to the JSON schema of a form.
|
|
401
|
-
* @param {import('@formio/core').Form
|
|
401
|
+
* @param {import('@formio/core').Form} formParam - The form JSON to set this form to.
|
|
402
402
|
* @returns {Promise<Webform|Wizard|PDF>} - The webform instance that was created.
|
|
403
403
|
*/
|
|
404
|
-
setForm(formParam: import('@formio/core').Form
|
|
404
|
+
setForm(formParam: import('@formio/core').Form): Promise<Webform | Wizard | PDF>;
|
|
405
405
|
_form: any;
|
|
406
406
|
getSubmission(formio: any, opts: any): any;
|
|
407
407
|
/**
|
package/lib/mjs/Form.js
CHANGED
|
@@ -264,7 +264,7 @@ export default class Form extends Element {
|
|
|
264
264
|
}
|
|
265
265
|
/**
|
|
266
266
|
* Sets the form to the JSON schema of a form.
|
|
267
|
-
* @param {import('@formio/core').Form
|
|
267
|
+
* @param {import('@formio/core').Form} formParam - The form JSON to set this form to.
|
|
268
268
|
* @returns {Promise<Webform|Wizard|PDF>} - The webform instance that was created.
|
|
269
269
|
*/
|
|
270
270
|
setForm(formParam) {
|
|
@@ -291,14 +291,8 @@ export default class Form extends Element {
|
|
|
291
291
|
}
|
|
292
292
|
this.loading = false;
|
|
293
293
|
this.instance = this.instance || this.create(form.display);
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
const options = this.getFormInitOptions(formParam, form);
|
|
297
|
-
this.instance.setUrl(formParam, options);
|
|
298
|
-
}
|
|
299
|
-
else {
|
|
300
|
-
this.instance.url = formParam;
|
|
301
|
-
}
|
|
294
|
+
const options = this.getFormInitOptions(formParam, form);
|
|
295
|
+
this.instance.setUrl(formParam, options);
|
|
302
296
|
this.instance.nosubmit = false;
|
|
303
297
|
this._form = this.instance.form = form;
|
|
304
298
|
if (submission) {
|
|
@@ -493,6 +493,7 @@ export default class NestedComponent extends Field {
|
|
|
493
493
|
header: 'single',
|
|
494
494
|
collapsed: this.collapsed,
|
|
495
495
|
[this.nestedKey]: 'single',
|
|
496
|
+
messageContainer: 'single-scope',
|
|
496
497
|
});
|
|
497
498
|
let childPromise = Promise.resolve();
|
|
498
499
|
if (this.refs[this.nestedKey]) {
|
|
@@ -260,13 +260,6 @@ export default class DataGridComponent extends NestedArrayComponent {
|
|
|
260
260
|
return hasHeader || ((col.label || col.title) && !col.hideLabel);
|
|
261
261
|
}, false);
|
|
262
262
|
}
|
|
263
|
-
loadRefs(element, refs) {
|
|
264
|
-
super.loadRefs(element, refs);
|
|
265
|
-
if (refs['messageContainer'] === 'single') {
|
|
266
|
-
const container = _.last(element.querySelectorAll(`[${this._referenceAttributeName}=messageContainer]`));
|
|
267
|
-
this.refs['messageContainer'] = container || this.refs['messageContainer'];
|
|
268
|
-
}
|
|
269
|
-
}
|
|
270
263
|
attach(element) {
|
|
271
264
|
this.loadRefs(element, {
|
|
272
265
|
[`${this.datagridKey}-row`]: 'multiple',
|
|
@@ -275,7 +268,6 @@ export default class DataGridComponent extends NestedArrayComponent {
|
|
|
275
268
|
[`${this.datagridKey}-removeRow`]: 'multiple',
|
|
276
269
|
[`${this.datagridKey}-group-header`]: 'multiple',
|
|
277
270
|
[this.datagridKey]: 'multiple',
|
|
278
|
-
'messageContainer': 'single'
|
|
279
271
|
});
|
|
280
272
|
if (this.allowReorder) {
|
|
281
273
|
this.refs[`${this.datagridKey}-row`].forEach((row, index) => {
|
|
@@ -484,11 +484,7 @@ export default class EditGridComponent extends NestedArrayComponent {
|
|
|
484
484
|
else {
|
|
485
485
|
this.removeClass(this.refs.component, `formio-component-${this.component.type}-row-open`);
|
|
486
486
|
}
|
|
487
|
-
|
|
488
|
-
this.loadRefs(element, {
|
|
489
|
-
messageContainer: 'single-scope',
|
|
490
|
-
});
|
|
491
|
-
return superAttach;
|
|
487
|
+
return super.attach(element);
|
|
492
488
|
}
|
|
493
489
|
flattenRowDataValue(dataValue) {
|
|
494
490
|
const flattened = {};
|