@formio/js 5.0.0-dev.5722.6a7e4ac → 5.0.0-dev.5725.1c71137

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.
@@ -1236,7 +1236,6 @@ class WebformBuilder extends Component_1.default {
1236
1236
  const previewButtons = this.componentEdit.querySelectorAll(`[${this._referenceAttributeName}="previewButton"]`);
1237
1237
  previewButtons.forEach((previewButton) => {
1238
1238
  this.editForm.addEventListener(previewButton, 'click', (event) => {
1239
- var _a;
1240
1239
  event.preventDefault();
1241
1240
  this.showPreview = !this.showPreview;
1242
1241
  this.editForm.detach();
@@ -1248,7 +1247,6 @@ class WebformBuilder extends Component_1.default {
1248
1247
  helplinks: this.helplinks,
1249
1248
  }));
1250
1249
  this.editForm.attach(this.componentEdit.querySelector(`[${this._referenceAttributeName}="editForm"]`));
1251
- this.updateComponent((_a = this.editForm.submission.data) !== null && _a !== void 0 ? _a : component);
1252
1250
  this.attachEditComponentControls(component, parent, isNew, original, ComponentClass);
1253
1251
  });
1254
1252
  });
@@ -3484,7 +3484,7 @@ class Component extends Element_1.default {
3484
3484
  this.refs.openModal.focus();
3485
3485
  }
3486
3486
  if (this.parent.refs.openModal) {
3487
- this.parent.refs.openModal.focus();
3487
+ this.parent.componentModal.openModal();
3488
3488
  }
3489
3489
  }
3490
3490
  /**
@@ -0,0 +1,50 @@
1
+ declare namespace _default {
2
+ let components: ({
3
+ label: string;
4
+ tableView: boolean;
5
+ modalEdit: boolean;
6
+ validateWhenHidden: boolean;
7
+ rowDrafts: boolean;
8
+ key: string;
9
+ type: string;
10
+ displayAsTable: boolean;
11
+ input: boolean;
12
+ components: ({
13
+ label: string;
14
+ applyMaskOn: string;
15
+ tableView: boolean;
16
+ validate: {
17
+ required: boolean;
18
+ };
19
+ validateWhenHidden: boolean;
20
+ key: string;
21
+ type: string;
22
+ input: boolean;
23
+ } | {
24
+ label: string;
25
+ applyMaskOn: string;
26
+ tableView: boolean;
27
+ validateWhenHidden: boolean;
28
+ key: string;
29
+ type: string;
30
+ input: boolean;
31
+ validate?: undefined;
32
+ })[];
33
+ showValidations?: undefined;
34
+ saveOnEnter?: undefined;
35
+ } | {
36
+ label: string;
37
+ showValidations: boolean;
38
+ tableView: boolean;
39
+ key: string;
40
+ type: string;
41
+ input: boolean;
42
+ saveOnEnter: boolean;
43
+ modalEdit?: undefined;
44
+ validateWhenHidden?: undefined;
45
+ rowDrafts?: undefined;
46
+ displayAsTable?: undefined;
47
+ components?: undefined;
48
+ })[];
49
+ }
50
+ export default _default;
@@ -0,0 +1,49 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = {
4
+ components: [
5
+ {
6
+ "label": "Edit Grid",
7
+ "tableView": false,
8
+ "modalEdit": true,
9
+ "validateWhenHidden": false,
10
+ "rowDrafts": false,
11
+ "key": "editGrid",
12
+ "type": "editgrid",
13
+ "displayAsTable": false,
14
+ "input": true,
15
+ "components": [
16
+ {
17
+ "label": "Text Field",
18
+ "applyMaskOn": "change",
19
+ "tableView": true,
20
+ "validate": {
21
+ "required": true
22
+ },
23
+ "validateWhenHidden": false,
24
+ "key": "textField1",
25
+ "type": "textfield",
26
+ "input": true
27
+ },
28
+ {
29
+ "label": "Text Field",
30
+ "applyMaskOn": "change",
31
+ "tableView": true,
32
+ "validateWhenHidden": false,
33
+ "key": "textField",
34
+ "type": "textfield",
35
+ "input": true
36
+ }
37
+ ]
38
+ },
39
+ {
40
+ "label": "Submit",
41
+ "showValidations": false,
42
+ "tableView": false,
43
+ "key": "submit",
44
+ "type": "button",
45
+ "input": true,
46
+ "saveOnEnter": false
47
+ }
48
+ ]
49
+ };
@@ -1,21 +1,22 @@
1
1
  import comp1 from './comp1';
2
2
  import comp2 from './comp2';
3
3
  import comp3 from './comp3';
4
- import comp10 from './comp10';
5
- import comp11 from './comp11';
6
- import comp12 from './comp12';
7
- import comp13 from './comp13';
8
- import comp14 from './comp14';
9
- import comp15 from './comp15';
10
4
  import comp4 from './comp4';
11
5
  import comp5 from './comp5';
12
6
  import comp6 from './comp6';
13
7
  import comp7 from './comp7';
14
8
  import comp8 from './comp8';
15
9
  import comp9 from './comp9';
10
+ import comp10 from './comp10';
11
+ import comp11 from './comp11';
12
+ import comp12 from './comp12';
13
+ import comp13 from './comp13';
14
+ import comp14 from './comp14';
15
+ import comp15 from './comp15';
16
16
  import comp16 from './comp16';
17
+ import comp17 from './comp17';
17
18
  import compOpenWhenEmpty from './comp-openWhenEmpty';
18
19
  import withOpenWhenEmptyAndConditions from './comp-with-conditions-and-openWhenEmpty';
19
20
  import compWithCustomDefaultValue from './comp-with-custom-default-value';
20
21
  import compTestEvents from './comp-test-events';
21
- export { comp1, comp2, comp3, comp10, comp11, comp12, comp13, comp14, comp15, comp4, comp5, comp6, comp7, comp8, comp9, comp16, compOpenWhenEmpty, withOpenWhenEmptyAndConditions, compWithCustomDefaultValue, compTestEvents };
22
+ export { comp1, comp2, comp3, comp4, comp5, comp6, comp7, comp8, comp9, comp10, comp11, comp12, comp13, comp14, comp15, comp16, comp17, compOpenWhenEmpty, withOpenWhenEmptyAndConditions, compWithCustomDefaultValue, compTestEvents };
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.compTestEvents = exports.compWithCustomDefaultValue = exports.withOpenWhenEmptyAndConditions = exports.compOpenWhenEmpty = exports.comp16 = exports.comp9 = exports.comp8 = exports.comp7 = exports.comp6 = exports.comp5 = exports.comp4 = exports.comp15 = exports.comp14 = exports.comp13 = exports.comp12 = exports.comp11 = exports.comp10 = exports.comp3 = exports.comp2 = exports.comp1 = void 0;
6
+ exports.compTestEvents = exports.compWithCustomDefaultValue = exports.withOpenWhenEmptyAndConditions = exports.compOpenWhenEmpty = exports.comp17 = exports.comp16 = exports.comp15 = exports.comp14 = exports.comp13 = exports.comp12 = exports.comp11 = exports.comp10 = exports.comp9 = exports.comp8 = exports.comp7 = exports.comp6 = exports.comp5 = exports.comp4 = exports.comp3 = exports.comp2 = exports.comp1 = void 0;
7
7
  const comp1_1 = __importDefault(require("./comp1"));
8
8
  exports.comp1 = comp1_1.default;
9
9
  const comp2_1 = __importDefault(require("./comp2"));
@@ -36,6 +36,8 @@ const comp15_1 = __importDefault(require("./comp15"));
36
36
  exports.comp15 = comp15_1.default;
37
37
  const comp16_1 = __importDefault(require("./comp16"));
38
38
  exports.comp16 = comp16_1.default;
39
+ const comp17_1 = __importDefault(require("./comp17"));
40
+ exports.comp17 = comp17_1.default;
39
41
  const comp_with_conditions_and_openWhenEmpty_1 = __importDefault(require("./comp-with-conditions-and-openWhenEmpty"));
40
42
  exports.withOpenWhenEmptyAndConditions = comp_with_conditions_and_openWhenEmpty_1.default;
41
43
  const comp_openWhenEmpty_1 = __importDefault(require("./comp-openWhenEmpty"));
@@ -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
  };
@@ -1231,7 +1231,6 @@ export default class WebformBuilder extends Component {
1231
1231
  helplinks: this.helplinks,
1232
1232
  }));
1233
1233
  this.editForm.attach(this.componentEdit.querySelector(`[${this._referenceAttributeName}="editForm"]`));
1234
- this.updateComponent(this.editForm.submission.data ?? component);
1235
1234
  this.attachEditComponentControls(component, parent, isNew, original, ComponentClass);
1236
1235
  });
1237
1236
  });
@@ -3445,7 +3445,7 @@ export default class Component extends Element {
3445
3445
  this.refs.openModal.focus();
3446
3446
  }
3447
3447
  if (this.parent.refs.openModal) {
3448
- this.parent.refs.openModal.focus();
3448
+ this.parent.componentModal.openModal();
3449
3449
  }
3450
3450
  }
3451
3451
  /**
@@ -0,0 +1,50 @@
1
+ declare namespace _default {
2
+ let components: ({
3
+ label: string;
4
+ tableView: boolean;
5
+ modalEdit: boolean;
6
+ validateWhenHidden: boolean;
7
+ rowDrafts: boolean;
8
+ key: string;
9
+ type: string;
10
+ displayAsTable: boolean;
11
+ input: boolean;
12
+ components: ({
13
+ label: string;
14
+ applyMaskOn: string;
15
+ tableView: boolean;
16
+ validate: {
17
+ required: boolean;
18
+ };
19
+ validateWhenHidden: boolean;
20
+ key: string;
21
+ type: string;
22
+ input: boolean;
23
+ } | {
24
+ label: string;
25
+ applyMaskOn: string;
26
+ tableView: boolean;
27
+ validateWhenHidden: boolean;
28
+ key: string;
29
+ type: string;
30
+ input: boolean;
31
+ validate?: undefined;
32
+ })[];
33
+ showValidations?: undefined;
34
+ saveOnEnter?: undefined;
35
+ } | {
36
+ label: string;
37
+ showValidations: boolean;
38
+ tableView: boolean;
39
+ key: string;
40
+ type: string;
41
+ input: boolean;
42
+ saveOnEnter: boolean;
43
+ modalEdit?: undefined;
44
+ validateWhenHidden?: undefined;
45
+ rowDrafts?: undefined;
46
+ displayAsTable?: undefined;
47
+ components?: undefined;
48
+ })[];
49
+ }
50
+ export default _default;
@@ -0,0 +1,47 @@
1
+ export default {
2
+ components: [
3
+ {
4
+ "label": "Edit Grid",
5
+ "tableView": false,
6
+ "modalEdit": true,
7
+ "validateWhenHidden": false,
8
+ "rowDrafts": false,
9
+ "key": "editGrid",
10
+ "type": "editgrid",
11
+ "displayAsTable": false,
12
+ "input": true,
13
+ "components": [
14
+ {
15
+ "label": "Text Field",
16
+ "applyMaskOn": "change",
17
+ "tableView": true,
18
+ "validate": {
19
+ "required": true
20
+ },
21
+ "validateWhenHidden": false,
22
+ "key": "textField1",
23
+ "type": "textfield",
24
+ "input": true
25
+ },
26
+ {
27
+ "label": "Text Field",
28
+ "applyMaskOn": "change",
29
+ "tableView": true,
30
+ "validateWhenHidden": false,
31
+ "key": "textField",
32
+ "type": "textfield",
33
+ "input": true
34
+ }
35
+ ]
36
+ },
37
+ {
38
+ "label": "Submit",
39
+ "showValidations": false,
40
+ "tableView": false,
41
+ "key": "submit",
42
+ "type": "button",
43
+ "input": true,
44
+ "saveOnEnter": false
45
+ }
46
+ ]
47
+ };
@@ -1,21 +1,22 @@
1
1
  import comp1 from './comp1';
2
2
  import comp2 from './comp2';
3
3
  import comp3 from './comp3';
4
- import comp10 from './comp10';
5
- import comp11 from './comp11';
6
- import comp12 from './comp12';
7
- import comp13 from './comp13';
8
- import comp14 from './comp14';
9
- import comp15 from './comp15';
10
4
  import comp4 from './comp4';
11
5
  import comp5 from './comp5';
12
6
  import comp6 from './comp6';
13
7
  import comp7 from './comp7';
14
8
  import comp8 from './comp8';
15
9
  import comp9 from './comp9';
10
+ import comp10 from './comp10';
11
+ import comp11 from './comp11';
12
+ import comp12 from './comp12';
13
+ import comp13 from './comp13';
14
+ import comp14 from './comp14';
15
+ import comp15 from './comp15';
16
16
  import comp16 from './comp16';
17
+ import comp17 from './comp17';
17
18
  import compOpenWhenEmpty from './comp-openWhenEmpty';
18
19
  import withOpenWhenEmptyAndConditions from './comp-with-conditions-and-openWhenEmpty';
19
20
  import compWithCustomDefaultValue from './comp-with-custom-default-value';
20
21
  import compTestEvents from './comp-test-events';
21
- export { comp1, comp2, comp3, comp10, comp11, comp12, comp13, comp14, comp15, comp4, comp5, comp6, comp7, comp8, comp9, comp16, compOpenWhenEmpty, withOpenWhenEmptyAndConditions, compWithCustomDefaultValue, compTestEvents };
22
+ export { comp1, comp2, comp3, comp4, comp5, comp6, comp7, comp8, comp9, comp10, comp11, comp12, comp13, comp14, comp15, comp16, comp17, compOpenWhenEmpty, withOpenWhenEmptyAndConditions, compWithCustomDefaultValue, compTestEvents };
@@ -14,8 +14,9 @@ import comp13 from './comp13';
14
14
  import comp14 from './comp14';
15
15
  import comp15 from './comp15';
16
16
  import comp16 from './comp16';
17
+ import comp17 from './comp17';
17
18
  import withOpenWhenEmptyAndConditions from './comp-with-conditions-and-openWhenEmpty';
18
19
  import compOpenWhenEmpty from './comp-openWhenEmpty';
19
20
  import compWithCustomDefaultValue from './comp-with-custom-default-value';
20
21
  import compTestEvents from './comp-test-events';
21
- export { comp1, comp2, comp3, comp10, comp11, comp12, comp13, comp14, comp15, comp4, comp5, comp6, comp7, comp8, comp9, comp16, compOpenWhenEmpty, withOpenWhenEmptyAndConditions, compWithCustomDefaultValue, compTestEvents };
22
+ export { comp1, comp2, comp3, comp4, comp5, comp6, comp7, comp8, comp9, comp10, comp11, comp12, comp13, comp14, comp15, comp16, comp17, compOpenWhenEmpty, withOpenWhenEmptyAndConditions, compWithCustomDefaultValue, compTestEvents };
@@ -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.5725.1c71137",
4
4
  "description": "JavaScript powered Forms with JSON Form Builder",
5
5
  "main": "lib/cjs/index.js",
6
6
  "exports": {