@formio/js 5.1.0-dev.6059.845a6e3 → 5.1.0-dev.6060.19e3bfc
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/Changelog.md +131 -13
- package/README.md +28 -1
- package/dist/formio.builder.css +19 -17
- package/dist/formio.builder.min.css +1 -1
- 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.css +19 -17
- package/dist/formio.form.js +102 -176
- package/dist/formio.form.min.css +1 -1
- package/dist/formio.form.min.js +1 -1
- package/dist/formio.form.min.js.LICENSE.txt +3 -3
- package/dist/formio.full.css +19 -17
- package/dist/formio.full.js +123 -101
- package/dist/formio.full.min.css +2 -2
- package/dist/formio.full.min.js +1 -1
- package/dist/formio.full.min.js.LICENSE.txt +3 -3
- package/dist/formio.js +10 -10
- package/dist/formio.min.js +1 -1
- package/dist/formio.min.js.LICENSE.txt +1 -1
- package/dist/formio.utils.js +3 -3
- package/dist/formio.utils.min.js +1 -1
- package/dist/formio.utils.min.js.LICENSE.txt +1 -1
- package/lib/cjs/CDN.d.ts +1 -1
- package/lib/cjs/CDN.js +2 -2
- package/lib/cjs/Embed.js +1 -1
- package/lib/cjs/Form.d.ts +4 -6
- package/lib/cjs/Form.js +16 -8
- package/lib/cjs/Formio.js +1 -1
- package/lib/cjs/PDFBuilder.js +4 -4
- package/lib/cjs/Webform.d.ts +16 -13
- package/lib/cjs/Webform.js +162 -148
- package/lib/cjs/WebformBuilder.js +17 -28
- package/lib/cjs/Wizard.js +1 -1
- package/lib/cjs/WizardBuilder.js +15 -2
- package/lib/cjs/components/Components.d.ts +3 -0
- package/lib/cjs/components/_classes/component/Component.d.ts +1 -0
- package/lib/cjs/components/_classes/component/Component.js +38 -11
- package/lib/cjs/components/_classes/component/editForm/Component.edit.conditional.js +1 -1
- package/lib/cjs/components/_classes/component/editForm/Component.edit.data.d.ts +37 -0
- package/lib/cjs/components/_classes/component/editForm/Component.edit.data.js +32 -2
- package/lib/cjs/components/_classes/component/editForm/utils.d.ts +1 -0
- package/lib/cjs/components/_classes/component/editForm/utils.js +3 -0
- package/lib/cjs/components/_classes/input/Input.js +23 -1
- package/lib/cjs/components/_classes/list/ListComponent.js +4 -4
- package/lib/cjs/components/_classes/multivalue/Multivalue.d.ts +1 -1
- package/lib/cjs/components/_classes/multivalue/Multivalue.js +10 -3
- package/lib/cjs/components/_classes/nested/NestedComponent.form.js +13 -0
- package/lib/cjs/components/_classes/nestedarray/NestedArrayComponent.d.ts +2 -0
- package/lib/cjs/components/_classes/nestedarray/NestedArrayComponent.js +52 -31
- package/lib/cjs/components/address/Address.js +14 -1
- package/lib/cjs/components/button/Button.js +6 -6
- package/lib/cjs/components/checkbox/Checkbox.d.ts +1 -1
- package/lib/cjs/components/checkbox/Checkbox.js +2 -2
- package/lib/cjs/components/content/editForm/Content.edit.display.js +8 -0
- package/lib/cjs/components/currency/editForm/Currency.edit.display.js +12 -0
- package/lib/cjs/components/datagrid/DataGrid.d.ts +2 -0
- package/lib/cjs/components/datagrid/DataGrid.js +41 -26
- package/lib/cjs/components/day/Day.js +9 -7
- package/lib/cjs/components/day/editForm/Day.edit.display.js +8 -0
- package/lib/cjs/components/editgrid/EditGrid.d.ts +1 -1
- package/lib/cjs/components/editgrid/EditGrid.js +26 -8
- package/lib/cjs/components/email/editForm/Email.edit.display.js +12 -0
- package/lib/cjs/components/fieldset/editForm/Fieldset.edit.display.js +8 -0
- package/lib/cjs/components/file/File.d.ts +1 -1
- package/lib/cjs/components/file/File.js +30 -19
- package/lib/cjs/components/form/Form.d.ts +1 -1
- package/lib/cjs/components/form/Form.js +9 -5
- package/lib/cjs/components/form/editForm/Form.edit.form.js +3 -3
- package/lib/cjs/components/hidden/Hidden.d.ts +0 -1
- package/lib/cjs/components/hidden/Hidden.js +1 -1
- package/lib/cjs/components/hidden/editForm/Hidden.edit.display.js +8 -0
- package/lib/cjs/components/html/editForm/HTML.edit.display.js +8 -0
- package/lib/cjs/components/number/Number.js +12 -5
- package/lib/cjs/components/number/editForm/Number.edit.display.js +12 -0
- package/lib/cjs/components/password/editForm/Password.edit.display.js +13 -1
- package/lib/cjs/components/phonenumber/PhoneNumber.form.js +9 -1
- package/lib/cjs/components/radio/Radio.js +10 -0
- package/lib/cjs/components/recaptcha/ReCaptcha.js +2 -2
- package/lib/cjs/components/select/Select.d.ts +0 -1
- package/lib/cjs/components/select/Select.js +12 -33
- package/lib/cjs/components/select/editForm/Select.edit.data.d.ts +1 -1
- package/lib/cjs/components/select/editForm/Select.edit.data.js +3 -2
- package/lib/cjs/components/selectboxes/SelectBoxes.js +2 -2
- package/lib/cjs/components/signature/Signature.d.ts +1 -1
- package/lib/cjs/components/signature/Signature.js +5 -3
- package/lib/cjs/components/signature/editForm/Signature.edit.display.d.ts +0 -6
- package/lib/cjs/components/signature/editForm/Signature.edit.display.js +0 -1
- package/lib/cjs/components/survey/Survey.js +2 -2
- package/lib/cjs/components/tabs/editForm/Tabs.edit.display.js +8 -0
- package/lib/cjs/components/tags/Tags.d.ts +1 -1
- package/lib/cjs/components/tags/Tags.js +2 -2
- package/lib/cjs/components/textarea/TextArea.js +6 -6
- package/lib/cjs/components/textarea/editForm/TextArea.edit.display.js +12 -0
- package/lib/cjs/components/url/editForm/Url.edit.display.js +12 -0
- package/lib/cjs/components/well/editForm/Well.edit.display.js +8 -0
- package/lib/cjs/formio.form.js +5 -0
- package/lib/cjs/providers/storage/googleDrive.js +3 -2
- package/lib/cjs/providers/storage/s3.js +3 -3
- package/lib/cjs/providers/storage/xhr.d.ts +1 -0
- package/lib/cjs/providers/storage/xhr.js +6 -1
- package/lib/cjs/translations/en.d.ts +234 -81
- package/lib/cjs/translations/en.js +8 -81
- package/lib/cjs/utils/ChoicesWrapper.d.ts +4 -25
- package/lib/cjs/utils/ChoicesWrapper.js +47 -124
- package/lib/cjs/utils/formUtils.d.ts +2 -2
- package/lib/cjs/utils/i18n.d.ts +5 -2
- package/lib/cjs/utils/i18n.js +32 -5
- package/lib/cjs/widgets/CalendarWidget.js +27 -27
- package/lib/mjs/CDN.d.ts +1 -1
- package/lib/mjs/CDN.js +2 -2
- package/lib/mjs/Embed.js +1 -1
- package/lib/mjs/Form.d.ts +4 -6
- package/lib/mjs/Form.js +17 -9
- package/lib/mjs/Formio.js +1 -1
- package/lib/mjs/PDFBuilder.js +4 -4
- package/lib/mjs/Webform.d.ts +16 -13
- package/lib/mjs/Webform.js +171 -158
- package/lib/mjs/WebformBuilder.js +17 -28
- package/lib/mjs/Wizard.js +1 -1
- package/lib/mjs/WizardBuilder.js +15 -2
- package/lib/mjs/components/Components.d.ts +3 -0
- package/lib/mjs/components/_classes/component/Component.d.ts +1 -0
- package/lib/mjs/components/_classes/component/Component.js +27 -11
- package/lib/mjs/components/_classes/component/editForm/Component.edit.conditional.js +1 -1
- package/lib/mjs/components/_classes/component/editForm/Component.edit.data.d.ts +37 -0
- package/lib/mjs/components/_classes/component/editForm/Component.edit.data.js +32 -2
- package/lib/mjs/components/_classes/component/editForm/utils.d.ts +1 -0
- package/lib/mjs/components/_classes/component/editForm/utils.js +3 -0
- package/lib/mjs/components/_classes/input/Input.js +22 -1
- package/lib/mjs/components/_classes/list/ListComponent.js +4 -4
- package/lib/mjs/components/_classes/multivalue/Multivalue.d.ts +1 -1
- package/lib/mjs/components/_classes/multivalue/Multivalue.js +10 -3
- package/lib/mjs/components/_classes/nested/NestedComponent.form.js +13 -0
- package/lib/mjs/components/_classes/nestedarray/NestedArrayComponent.d.ts +2 -0
- package/lib/mjs/components/_classes/nestedarray/NestedArrayComponent.js +53 -31
- package/lib/mjs/components/address/Address.js +14 -1
- package/lib/mjs/components/button/Button.js +6 -6
- package/lib/mjs/components/checkbox/Checkbox.d.ts +1 -1
- package/lib/mjs/components/checkbox/Checkbox.js +2 -2
- package/lib/mjs/components/content/editForm/Content.edit.display.js +8 -0
- package/lib/mjs/components/currency/editForm/Currency.edit.display.js +12 -0
- package/lib/mjs/components/datagrid/DataGrid.d.ts +2 -0
- package/lib/mjs/components/datagrid/DataGrid.js +41 -26
- package/lib/mjs/components/day/Day.js +9 -7
- package/lib/mjs/components/day/editForm/Day.edit.display.js +8 -0
- package/lib/mjs/components/editgrid/EditGrid.d.ts +1 -1
- package/lib/mjs/components/editgrid/EditGrid.js +25 -7
- package/lib/mjs/components/email/editForm/Email.edit.display.js +12 -0
- package/lib/mjs/components/fieldset/editForm/Fieldset.edit.display.js +8 -0
- package/lib/mjs/components/file/File.d.ts +1 -1
- package/lib/mjs/components/file/File.js +30 -19
- package/lib/mjs/components/form/Form.d.ts +1 -1
- package/lib/mjs/components/form/Form.js +8 -5
- package/lib/mjs/components/form/editForm/Form.edit.form.js +3 -3
- package/lib/mjs/components/hidden/Hidden.d.ts +0 -1
- package/lib/mjs/components/hidden/Hidden.js +1 -1
- package/lib/mjs/components/hidden/editForm/Hidden.edit.display.js +8 -0
- package/lib/mjs/components/html/editForm/HTML.edit.display.js +8 -0
- package/lib/mjs/components/number/Number.js +12 -5
- package/lib/mjs/components/number/editForm/Number.edit.display.js +12 -0
- package/lib/mjs/components/password/editForm/Password.edit.display.js +13 -1
- package/lib/mjs/components/phonenumber/PhoneNumber.form.js +9 -1
- package/lib/mjs/components/radio/Radio.js +10 -0
- package/lib/mjs/components/recaptcha/ReCaptcha.js +2 -2
- package/lib/mjs/components/select/Select.d.ts +0 -1
- package/lib/mjs/components/select/Select.js +14 -34
- package/lib/mjs/components/select/editForm/Select.edit.data.d.ts +1 -1
- package/lib/mjs/components/select/editForm/Select.edit.data.js +3 -2
- package/lib/mjs/components/selectboxes/SelectBoxes.js +2 -2
- package/lib/mjs/components/signature/Signature.d.ts +1 -1
- package/lib/mjs/components/signature/Signature.js +5 -3
- package/lib/mjs/components/signature/editForm/Signature.edit.display.d.ts +0 -6
- package/lib/mjs/components/signature/editForm/Signature.edit.display.js +0 -1
- package/lib/mjs/components/survey/Survey.js +2 -2
- package/lib/mjs/components/tabs/editForm/Tabs.edit.display.js +8 -0
- package/lib/mjs/components/tags/Tags.d.ts +1 -1
- package/lib/mjs/components/tags/Tags.js +2 -2
- package/lib/mjs/components/textarea/TextArea.js +6 -6
- package/lib/mjs/components/textarea/editForm/TextArea.edit.display.js +12 -0
- package/lib/mjs/components/url/editForm/Url.edit.display.js +12 -0
- package/lib/mjs/components/well/editForm/Well.edit.display.js +8 -0
- package/lib/mjs/formio.form.js +5 -0
- package/lib/mjs/providers/storage/googleDrive.js +3 -2
- package/lib/mjs/providers/storage/s3.js +3 -3
- package/lib/mjs/providers/storage/xhr.d.ts +1 -0
- package/lib/mjs/providers/storage/xhr.js +6 -1
- package/lib/mjs/translations/en.d.ts +234 -81
- package/lib/mjs/translations/en.js +87 -1
- package/lib/mjs/utils/ChoicesWrapper.d.ts +4 -25
- package/lib/mjs/utils/ChoicesWrapper.js +26 -119
- package/lib/mjs/utils/formUtils.d.ts +2 -2
- package/lib/mjs/utils/i18n.d.ts +5 -2
- package/lib/mjs/utils/i18n.js +32 -5
- package/lib/mjs/widgets/CalendarWidget.js +27 -27
- package/package.json +27 -11
@@ -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-
|
23
|
+
/*! formiojs v5.1.0-dev.2 | https://unpkg.com/formiojs@5.1.0-dev.2/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/CDN.d.ts
CHANGED
package/lib/cjs/CDN.js
CHANGED
@@ -17,8 +17,8 @@ class CDN {
|
|
17
17
|
'bootswatch': '5.3.3',
|
18
18
|
'bootstrap-icons': '1.11.1',
|
19
19
|
'ckeditor': '19.0.0',
|
20
|
-
'
|
21
|
-
'flatpickr
|
20
|
+
'dragula': '3.7.3',
|
21
|
+
'flatpickr': '4.6.13',
|
22
22
|
'font-awesome': '4.7.0',
|
23
23
|
'grid': 'latest',
|
24
24
|
'moment-timezone': 'latest',
|
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-
|
421
|
+
Formio.version = '5.1.0-dev.2';
|
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/Form.d.ts
CHANGED
@@ -48,7 +48,7 @@ export default class Form extends Element {
|
|
48
48
|
* @property {number} [saveDraftThrottle] - The throttle for the save draft feature.
|
49
49
|
* @property {boolean} [readOnly] - Set this form to readOnly.
|
50
50
|
* @property {boolean} [noAlerts] - Disable the alerts dialog.
|
51
|
-
* @property {
|
51
|
+
* @property {Record<string, Record<string, string>>} [i18n] - The translation file for this rendering.
|
52
52
|
* @property {string} [template] - Custom logic for creation of elements.
|
53
53
|
* @property {boolean} [noDefaults] - Exclude default values from the settings.
|
54
54
|
* @property {any} [fileService] - The file service for this form.
|
@@ -117,9 +117,7 @@ export default class Form extends Element {
|
|
117
117
|
/**
|
118
118
|
* - The translation file for this rendering.
|
119
119
|
*/
|
120
|
-
i18n?:
|
121
|
-
[key: string]: string;
|
122
|
-
} | undefined;
|
120
|
+
i18n?: Record<string, Record<string, string>> | undefined;
|
123
121
|
/**
|
124
122
|
* - Custom logic for creation of elements.
|
125
123
|
*/
|
@@ -398,10 +396,10 @@ export default class Form extends Element {
|
|
398
396
|
getFormInitOptions(url: string, form: import('@formio/core').Form): object;
|
399
397
|
/**
|
400
398
|
* Sets the form to the JSON schema of a form.
|
401
|
-
* @param {import('@formio/core').Form} formParam - The form JSON to set this form to.
|
399
|
+
* @param {import('@formio/core').Form | string} formParam - The form JSON to set this form to.
|
402
400
|
* @returns {Promise<Webform|Wizard|PDF>} - The webform instance that was created.
|
403
401
|
*/
|
404
|
-
setForm(formParam: import('@formio/core').Form): Promise<Webform | Wizard | PDF>;
|
402
|
+
setForm(formParam: import('@formio/core').Form | string): Promise<Webform | Wizard | PDF>;
|
405
403
|
_form: any;
|
406
404
|
getSubmission(formio: any, opts: any): any;
|
407
405
|
/**
|
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} formParam - The form JSON to set this form to.
|
198
|
+
* @param {import('@formio/core').Form | string} 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,8 +222,14 @@ 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
|
-
this.instance.setUrl
|
225
|
+
// If we're in builder mode, instance.setUrl is not a function, so just manually set the URL.
|
226
|
+
if (this.instance.setUrl) {
|
227
|
+
const options = this.getFormInitOptions(formParam, form);
|
228
|
+
this.instance.setUrl(formParam, options);
|
229
|
+
}
|
230
|
+
else {
|
231
|
+
this.instance.url = formParam;
|
232
|
+
}
|
227
233
|
this.instance.nosubmit = false;
|
228
234
|
this._form = this.instance.form = form;
|
229
235
|
if (submission) {
|
@@ -275,7 +281,9 @@ class Form extends Element_1.default {
|
|
275
281
|
this.form.display = display;
|
276
282
|
this.instance.destroy();
|
277
283
|
this.instance = this.create(display);
|
278
|
-
return this.setForm(this.form)
|
284
|
+
return this.setForm(this.form).then(() => {
|
285
|
+
this.instance.emit('setDisplay', this.form.display);
|
286
|
+
});
|
279
287
|
}
|
280
288
|
empty() {
|
281
289
|
if (this.element) {
|
@@ -331,10 +339,10 @@ class Form extends Element_1.default {
|
|
331
339
|
*/
|
332
340
|
build() {
|
333
341
|
if (!this.instance) {
|
334
|
-
return Promise.reject(
|
342
|
+
return Promise.reject(this.t('formNotReady'));
|
335
343
|
}
|
336
344
|
if (!this.element) {
|
337
|
-
return Promise.reject(
|
345
|
+
return Promise.reject(this.t('noFormElement'));
|
338
346
|
}
|
339
347
|
// Add temporary loader.
|
340
348
|
const template = (this.options && this.options.template) ? this.options.template : 'bootstrap';
|
@@ -351,7 +359,7 @@ class Form extends Element_1.default {
|
|
351
359
|
}
|
352
360
|
render() {
|
353
361
|
if (!this.instance) {
|
354
|
-
return Promise.reject(
|
362
|
+
return Promise.reject(this.t('formNotReady'));
|
355
363
|
}
|
356
364
|
return Promise.resolve(this.instance.render())
|
357
365
|
.then((param) => {
|
@@ -361,7 +369,7 @@ class Form extends Element_1.default {
|
|
361
369
|
}
|
362
370
|
attach(element) {
|
363
371
|
if (!this.instance) {
|
364
|
-
return Promise.reject(
|
372
|
+
return Promise.reject(this.t('formNotReady'));
|
365
373
|
}
|
366
374
|
if (this.element) {
|
367
375
|
delete this.element.component;
|
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-
|
14
|
+
sdk_1.Formio.version = '5.1.0-dev.2';
|
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) {
|
package/lib/cjs/PDFBuilder.js
CHANGED
@@ -201,10 +201,10 @@ class PDFBuilder extends WebformBuilder_1.default {
|
|
201
201
|
const progress = Math.floor((event.loaded / event.total) * 100);
|
202
202
|
this.refs.uploadProgress.style.width = `${progress}%`;
|
203
203
|
if (progress > 98) {
|
204
|
-
this.refs.uploadProgress.innerHTML = this.t('
|
204
|
+
this.refs.uploadProgress.innerHTML = this.t('waitPdfConverting');
|
205
205
|
}
|
206
206
|
else {
|
207
|
-
this.refs.uploadProgress.innerHTML = `${this.t('
|
207
|
+
this.refs.uploadProgress.innerHTML = `${this.t('uploading')} ${progress}%`;
|
208
208
|
}
|
209
209
|
}
|
210
210
|
}, `${this.projectUrl}/upload`, {}, 'file')
|
@@ -242,7 +242,7 @@ class PDFBuilder extends WebformBuilder_1.default {
|
|
242
242
|
return;
|
243
243
|
}
|
244
244
|
this.refs.uploadError.style.display = message ? '' : 'none';
|
245
|
-
this.refs.uploadError.innerHTML = message;
|
245
|
+
this.refs.uploadError.innerHTML = this.t(`${message}`);
|
246
246
|
}
|
247
247
|
createForm(options) {
|
248
248
|
// Instantiate the webform from the PDF class instead of Webform
|
@@ -471,7 +471,7 @@ class PDFBuilder extends WebformBuilder_1.default {
|
|
471
471
|
name: 'showBuilderErrors',
|
472
472
|
data: {
|
473
473
|
compId: comp.component.id,
|
474
|
-
errorMessage:
|
474
|
+
errorMessage: `${this.t('notUniqueKey')}: ${comp.key}`,
|
475
475
|
}
|
476
476
|
});
|
477
477
|
}
|
package/lib/cjs/Webform.d.ts
CHANGED
@@ -34,10 +34,10 @@
|
|
34
34
|
*/
|
35
35
|
/**
|
36
36
|
* @typedef {object} ButtonSettings
|
37
|
-
* @property {boolean} [showPrevious] - Show the
|
38
|
-
* @property {boolean} [showNext] - Show the
|
39
|
-
* @property {boolean} [showCancel] - Show the
|
40
|
-
* @property {boolean} [showSubmit] - Show the
|
37
|
+
* @property {boolean} [showPrevious] - Show the 'Previous' button.
|
38
|
+
* @property {boolean} [showNext] - Show the 'Next' button.
|
39
|
+
* @property {boolean} [showCancel] - Show the 'Cancel' button.
|
40
|
+
* @property {boolean} [showSubmit] - Show the 'Submit' button.
|
41
41
|
*/
|
42
42
|
/**
|
43
43
|
* @typedef {object} FormOptions
|
@@ -190,7 +190,10 @@ declare class Webform extends NestedDataComponent {
|
|
190
190
|
get language(): string;
|
191
191
|
root: this;
|
192
192
|
localRoot: this;
|
193
|
+
beforeInit(): void;
|
194
|
+
executeFormController: any;
|
193
195
|
get emptyValue(): null;
|
196
|
+
get shouldCallFormController(): any;
|
194
197
|
get shadowRoot(): any;
|
195
198
|
/**
|
196
199
|
* Add a language for translations
|
@@ -257,7 +260,7 @@ declare class Webform extends NestedDataComponent {
|
|
257
260
|
get ready(): Promise<any>;
|
258
261
|
/**
|
259
262
|
* Set the loading state for this form, and also show the loader spinner.
|
260
|
-
* @param {boolean} loading - If this form should be
|
263
|
+
* @param {boolean} loading - If this form should be 'loading' or not.
|
261
264
|
*/
|
262
265
|
set loading(loading: boolean);
|
263
266
|
/**
|
@@ -360,7 +363,7 @@ declare class Webform extends NestedDataComponent {
|
|
360
363
|
* @returns {Promise} - The promise that is triggered when the form is built.
|
361
364
|
*/
|
362
365
|
init(): Promise<any>;
|
363
|
-
|
366
|
+
_executeFormController(): void;
|
364
367
|
build(element: any): Promise<any>;
|
365
368
|
getClassName(): string;
|
366
369
|
render(): string;
|
@@ -369,7 +372,7 @@ declare class Webform extends NestedDataComponent {
|
|
369
372
|
hasRequiredFields(): boolean;
|
370
373
|
/**
|
371
374
|
* Sets a new alert to display in the error dialog of the form.
|
372
|
-
* @param {string} type - The type of alert to display.
|
375
|
+
* @param {string} type - The type of alert to display. 'danger', 'success', 'warning', etc.
|
373
376
|
* @param {string} message - The message to show in the alert.
|
374
377
|
* @param {object} options - The options for the alert.
|
375
378
|
*/
|
@@ -547,19 +550,19 @@ export type SanitizeConfig = {
|
|
547
550
|
};
|
548
551
|
export type ButtonSettings = {
|
549
552
|
/**
|
550
|
-
* - Show the
|
553
|
+
* - Show the 'Previous' button.
|
551
554
|
*/
|
552
555
|
showPrevious?: boolean | undefined;
|
553
556
|
/**
|
554
|
-
* - Show the
|
557
|
+
* - Show the 'Next' button.
|
555
558
|
*/
|
556
559
|
showNext?: boolean | undefined;
|
557
560
|
/**
|
558
|
-
* - Show the
|
561
|
+
* - Show the 'Cancel' button.
|
559
562
|
*/
|
560
563
|
showCancel?: boolean | undefined;
|
561
564
|
/**
|
562
|
-
* - Show the
|
565
|
+
* - Show the 'Submit' button.
|
563
566
|
*/
|
564
567
|
showSubmit?: boolean | undefined;
|
565
568
|
};
|
@@ -739,5 +742,5 @@ export type FormOptions = {
|
|
739
742
|
*/
|
740
743
|
zoom?: number | undefined;
|
741
744
|
};
|
742
|
-
import NestedDataComponent from
|
743
|
-
import EventEmitter from
|
745
|
+
import NestedDataComponent from './components/_classes/nesteddata/NestedDataComponent';
|
746
|
+
import EventEmitter from './EventEmitter';
|