@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.
@@ -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
- this.keyboardActionsEnabled = lodash_1.default.get(this.options, 'keyboardBuilder', false) || ((_a = this.options.properties) === null || _a === void 0 ? void 0 : _a.keyboardBuilder);
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
  });
@@ -4,7 +4,6 @@ export default class PanelComponent extends NestedComponent {
4
4
  icon: string;
5
5
  group: string;
6
6
  documentation: string;
7
- showPreview: boolean;
8
7
  weight: number;
9
8
  schema: any;
10
9
  };
@@ -27,7 +27,6 @@ class PanelComponent extends NestedComponent_1.default {
27
27
  icon: 'list-alt',
28
28
  group: 'layout',
29
29
  documentation: '/userguide/form-building/layout-components#panel',
30
- showPreview: false,
31
30
  weight: 30,
32
31
  schema: PanelComponent.schema()
33
32
  };
@@ -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
- this.keyboardActionsEnabled = _.get(this.options, 'keyboardBuilder', false) || this.options.properties?.keyboardBuilder;
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
  });
@@ -4,7 +4,6 @@ export default class PanelComponent extends NestedComponent {
4
4
  icon: string;
5
5
  group: string;
6
6
  documentation: string;
7
- showPreview: boolean;
8
7
  weight: number;
9
8
  schema: any;
10
9
  };
@@ -22,7 +22,6 @@ export default class PanelComponent extends NestedComponent {
22
22
  icon: 'list-alt',
23
23
  group: 'layout',
24
24
  documentation: '/userguide/form-building/layout-components#panel',
25
- showPreview: false,
26
25
  weight: 30,
27
26
  schema: PanelComponent.schema()
28
27
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@formio/js",
3
- "version": "5.0.0-dev.5722.6a7e4ac",
3
+ "version": "5.0.0-dev.5723.99bf27e",
4
4
  "description": "JavaScript powered Forms with JSON Form Builder",
5
5
  "main": "lib/cjs/index.js",
6
6
  "exports": {