@formio/js 5.0.0-dev.5722.6a7e4ac → 5.0.0-dev.5723.99bf27e
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 +1 -1
- package/dist/formio.form.min.js +1 -1
- package/dist/formio.full.js +2 -2
- package/dist/formio.full.min.js +1 -1
- package/lib/cjs/WebformBuilder.js +5 -3
- package/lib/cjs/components/panel/Panel.d.ts +0 -1
- package/lib/cjs/components/panel/Panel.js +0 -1
- package/lib/mjs/WebformBuilder.js +5 -2
- package/lib/mjs/components/panel/Panel.d.ts +0 -1
- package/lib/mjs/components/panel/Panel.js +0 -1
- package/package.json +1 -1
|
@@ -908,7 +908,11 @@ class WebformBuilder extends Component_1.default {
|
|
|
908
908
|
if (form && form.properties) {
|
|
909
909
|
this.options.properties = form.properties;
|
|
910
910
|
}
|
|
911
|
-
|
|
911
|
+
let keyboardActionsEnabled = lodash_1.default.get(this.options, 'keyboardBuilder', false) || ((_a = this.options.properties) === null || _a === void 0 ? void 0 : _a.keyboardBuilder);
|
|
912
|
+
if (typeof keyboardActionsEnabled === 'string') {
|
|
913
|
+
keyboardActionsEnabled = keyboardActionsEnabled === 'true';
|
|
914
|
+
}
|
|
915
|
+
this.keyboardActionsEnabled = keyboardActionsEnabled;
|
|
912
916
|
const isShowSubmitButton = !this.options.noDefaultSubmitButton
|
|
913
917
|
&& (!form.components.length || !form.components.find(comp => comp.key === 'submit'));
|
|
914
918
|
// Ensure there is at least a submit button.
|
|
@@ -1236,7 +1240,6 @@ class WebformBuilder extends Component_1.default {
|
|
|
1236
1240
|
const previewButtons = this.componentEdit.querySelectorAll(`[${this._referenceAttributeName}="previewButton"]`);
|
|
1237
1241
|
previewButtons.forEach((previewButton) => {
|
|
1238
1242
|
this.editForm.addEventListener(previewButton, 'click', (event) => {
|
|
1239
|
-
var _a;
|
|
1240
1243
|
event.preventDefault();
|
|
1241
1244
|
this.showPreview = !this.showPreview;
|
|
1242
1245
|
this.editForm.detach();
|
|
@@ -1248,7 +1251,6 @@ class WebformBuilder extends Component_1.default {
|
|
|
1248
1251
|
helplinks: this.helplinks,
|
|
1249
1252
|
}));
|
|
1250
1253
|
this.editForm.attach(this.componentEdit.querySelector(`[${this._referenceAttributeName}="editForm"]`));
|
|
1251
|
-
this.updateComponent((_a = this.editForm.submission.data) !== null && _a !== void 0 ? _a : component);
|
|
1252
1254
|
this.attachEditComponentControls(component, parent, isNew, original, ComponentClass);
|
|
1253
1255
|
});
|
|
1254
1256
|
});
|
|
@@ -892,7 +892,11 @@ export default class WebformBuilder extends Component {
|
|
|
892
892
|
if (form && form.properties) {
|
|
893
893
|
this.options.properties = form.properties;
|
|
894
894
|
}
|
|
895
|
-
|
|
895
|
+
let keyboardActionsEnabled = _.get(this.options, 'keyboardBuilder', false) || this.options.properties?.keyboardBuilder;
|
|
896
|
+
if (typeof keyboardActionsEnabled === 'string') {
|
|
897
|
+
keyboardActionsEnabled = keyboardActionsEnabled === 'true';
|
|
898
|
+
}
|
|
899
|
+
this.keyboardActionsEnabled = keyboardActionsEnabled;
|
|
896
900
|
const isShowSubmitButton = !this.options.noDefaultSubmitButton
|
|
897
901
|
&& (!form.components.length || !form.components.find(comp => comp.key === 'submit'));
|
|
898
902
|
// Ensure there is at least a submit button.
|
|
@@ -1231,7 +1235,6 @@ export default class WebformBuilder extends Component {
|
|
|
1231
1235
|
helplinks: this.helplinks,
|
|
1232
1236
|
}));
|
|
1233
1237
|
this.editForm.attach(this.componentEdit.querySelector(`[${this._referenceAttributeName}="editForm"]`));
|
|
1234
|
-
this.updateComponent(this.editForm.submission.data ?? component);
|
|
1235
1238
|
this.attachEditComponentControls(component, parent, isNew, original, ComponentClass);
|
|
1236
1239
|
});
|
|
1237
1240
|
});
|