@formio/js 5.0.0-dev.5642.f9208f7 → 5.0.0-dev.5643.9c5173a

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.
@@ -0,0 +1,29 @@
1
+ declare namespace _default {
2
+ let label: string;
3
+ let reorder: boolean;
4
+ let addAnotherPosition: string;
5
+ let layoutFixed: boolean;
6
+ let enableRowGroups: boolean;
7
+ let initEmpty: boolean;
8
+ let tableView: boolean;
9
+ let defaultValue: {}[];
10
+ let key: string;
11
+ let type: string;
12
+ let input: boolean;
13
+ let components: {
14
+ label: string;
15
+ optionsLabelPosition: string;
16
+ inline: boolean;
17
+ tableView: boolean;
18
+ values: {
19
+ label: string;
20
+ value: string;
21
+ shortcut: string;
22
+ }[];
23
+ key: string;
24
+ type: string;
25
+ input: boolean;
26
+ inputType: string;
27
+ }[];
28
+ }
29
+ export default _default;
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = {
4
+ 'label': 'Data Grid',
5
+ 'reorder': false,
6
+ 'addAnotherPosition': 'bottom',
7
+ 'layoutFixed': false,
8
+ 'enableRowGroups': false,
9
+ 'initEmpty': false,
10
+ 'tableView': false,
11
+ 'defaultValue': [
12
+ {}
13
+ ],
14
+ 'key': 'dataGrid',
15
+ 'type': 'datagrid',
16
+ 'input': true,
17
+ 'components': [
18
+ {
19
+ 'label': 'Radio',
20
+ 'optionsLabelPosition': 'right',
21
+ 'inline': false,
22
+ 'tableView': false,
23
+ 'values': [
24
+ {
25
+ 'label': 'yes',
26
+ 'value': 'yes',
27
+ 'shortcut': ''
28
+ }
29
+ ],
30
+ 'key': 'radio',
31
+ 'type': 'radio',
32
+ 'input': true,
33
+ 'inputType': 'checkbox'
34
+ }
35
+ ]
36
+ };
@@ -14,4 +14,5 @@ import withRowGroupsAndDefValue from './comp-row-groups-with-def-value';
14
14
  import modalWithRequiredFields from './comp-modal-with-required-fields';
15
15
  import withAllowCalculateOverride from './comp-with-allow-calculate-override';
16
16
  import twoWithAllowCalculatedOverride from './two-comp-with-allow-calculate-override';
17
- export { comp1, comp2, comp3, comp4, comp5, comp6, comp7, comp8, withCollapsibleRowGroups, withConditionalFieldsAndValidations, withDefValue, withLogic, withRowGroupsAndDefValue, modalWithRequiredFields, withAllowCalculateOverride, twoWithAllowCalculatedOverride };
17
+ import withCheckboxes from './comp-with-checkboxes';
18
+ export { comp1, comp2, comp3, comp4, comp5, comp6, comp7, comp8, withCollapsibleRowGroups, withConditionalFieldsAndValidations, withDefValue, withLogic, withRowGroupsAndDefValue, modalWithRequiredFields, withAllowCalculateOverride, twoWithAllowCalculatedOverride, withCheckboxes };
@@ -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.twoWithAllowCalculatedOverride = exports.withAllowCalculateOverride = exports.modalWithRequiredFields = exports.withRowGroupsAndDefValue = exports.withLogic = exports.withDefValue = exports.withConditionalFieldsAndValidations = exports.withCollapsibleRowGroups = exports.comp8 = exports.comp7 = exports.comp6 = exports.comp5 = exports.comp4 = exports.comp3 = exports.comp2 = exports.comp1 = void 0;
6
+ exports.withCheckboxes = exports.twoWithAllowCalculatedOverride = exports.withAllowCalculateOverride = exports.modalWithRequiredFields = exports.withRowGroupsAndDefValue = exports.withLogic = exports.withDefValue = exports.withConditionalFieldsAndValidations = exports.withCollapsibleRowGroups = 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,3 +36,5 @@ const comp_with_allow_calculate_override_1 = __importDefault(require("./comp-wit
36
36
  exports.withAllowCalculateOverride = comp_with_allow_calculate_override_1.default;
37
37
  const two_comp_with_allow_calculate_override_1 = __importDefault(require("./two-comp-with-allow-calculate-override"));
38
38
  exports.twoWithAllowCalculatedOverride = two_comp_with_allow_calculate_override_1.default;
39
+ const comp_with_checkboxes_1 = __importDefault(require("./comp-with-checkboxes"));
40
+ exports.withCheckboxes = comp_with_checkboxes_1.default;
@@ -652,7 +652,7 @@ class FileComponent extends Field_1.default {
652
652
  // Check if file with the same name is being uploaded
653
653
  const fileWithSameNameUploading = this.filesToSync.filesToUpload
654
654
  .some(fileToSync => { var _a; return ((_a = fileToSync.file) === null || _a === void 0 ? void 0 : _a.name) === file.name; });
655
- const fileWithSameNameUploaded = this.dataValue && this.dataValue
655
+ const fileWithSameNameUploaded = this.dataValue
656
656
  .some(fileStatus => fileStatus.originalName === file.name);
657
657
  return fileWithSameNameUploaded || fileWithSameNameUploading
658
658
  ? {
@@ -321,8 +321,9 @@ class RadioComponent extends ListComponent_1.default {
321
321
  //add/remove selected option class
322
322
  const value = this.dataValue;
323
323
  this.refs.wrapper.forEach((wrapper, index) => {
324
+ var _a;
324
325
  const input = this.refs.input[index];
325
- const checked = (input.type === 'checkbox') ? value[input.value] : (input.value.toString() === value.toString());
326
+ const checked = (input.type === 'checkbox') ? value[input.value] || ((_a = this.element) === null || _a === void 0 ? void 0 : _a.querySelector('input').checked) : (input.value.toString() === value.toString());
326
327
  if (checked) {
327
328
  //add class to container when selected
328
329
  this.addClass(wrapper, this.optionSelectedClass);
@@ -0,0 +1,29 @@
1
+ declare namespace _default {
2
+ let label: string;
3
+ let reorder: boolean;
4
+ let addAnotherPosition: string;
5
+ let layoutFixed: boolean;
6
+ let enableRowGroups: boolean;
7
+ let initEmpty: boolean;
8
+ let tableView: boolean;
9
+ let defaultValue: {}[];
10
+ let key: string;
11
+ let type: string;
12
+ let input: boolean;
13
+ let components: {
14
+ label: string;
15
+ optionsLabelPosition: string;
16
+ inline: boolean;
17
+ tableView: boolean;
18
+ values: {
19
+ label: string;
20
+ value: string;
21
+ shortcut: string;
22
+ }[];
23
+ key: string;
24
+ type: string;
25
+ input: boolean;
26
+ inputType: string;
27
+ }[];
28
+ }
29
+ export default _default;
@@ -0,0 +1,34 @@
1
+ export default {
2
+ 'label': 'Data Grid',
3
+ 'reorder': false,
4
+ 'addAnotherPosition': 'bottom',
5
+ 'layoutFixed': false,
6
+ 'enableRowGroups': false,
7
+ 'initEmpty': false,
8
+ 'tableView': false,
9
+ 'defaultValue': [
10
+ {}
11
+ ],
12
+ 'key': 'dataGrid',
13
+ 'type': 'datagrid',
14
+ 'input': true,
15
+ 'components': [
16
+ {
17
+ 'label': 'Radio',
18
+ 'optionsLabelPosition': 'right',
19
+ 'inline': false,
20
+ 'tableView': false,
21
+ 'values': [
22
+ {
23
+ 'label': 'yes',
24
+ 'value': 'yes',
25
+ 'shortcut': ''
26
+ }
27
+ ],
28
+ 'key': 'radio',
29
+ 'type': 'radio',
30
+ 'input': true,
31
+ 'inputType': 'checkbox'
32
+ }
33
+ ]
34
+ };
@@ -14,4 +14,5 @@ import withRowGroupsAndDefValue from './comp-row-groups-with-def-value';
14
14
  import modalWithRequiredFields from './comp-modal-with-required-fields';
15
15
  import withAllowCalculateOverride from './comp-with-allow-calculate-override';
16
16
  import twoWithAllowCalculatedOverride from './two-comp-with-allow-calculate-override';
17
- export { comp1, comp2, comp3, comp4, comp5, comp6, comp7, comp8, withCollapsibleRowGroups, withConditionalFieldsAndValidations, withDefValue, withLogic, withRowGroupsAndDefValue, modalWithRequiredFields, withAllowCalculateOverride, twoWithAllowCalculatedOverride };
17
+ import withCheckboxes from './comp-with-checkboxes';
18
+ export { comp1, comp2, comp3, comp4, comp5, comp6, comp7, comp8, withCollapsibleRowGroups, withConditionalFieldsAndValidations, withDefValue, withLogic, withRowGroupsAndDefValue, modalWithRequiredFields, withAllowCalculateOverride, twoWithAllowCalculatedOverride, withCheckboxes };
@@ -14,4 +14,5 @@ import withLogic from './comp-with-logic';
14
14
  import withCollapsibleRowGroups from './comp-with-collapsible-groups';
15
15
  import withAllowCalculateOverride from './comp-with-allow-calculate-override';
16
16
  import twoWithAllowCalculatedOverride from './two-comp-with-allow-calculate-override';
17
- export { comp1, comp2, comp3, comp4, comp5, comp6, comp7, comp8, withCollapsibleRowGroups, withConditionalFieldsAndValidations, withDefValue, withLogic, withRowGroupsAndDefValue, modalWithRequiredFields, withAllowCalculateOverride, twoWithAllowCalculatedOverride };
17
+ import withCheckboxes from './comp-with-checkboxes';
18
+ export { comp1, comp2, comp3, comp4, comp5, comp6, comp7, comp8, withCollapsibleRowGroups, withConditionalFieldsAndValidations, withDefValue, withLogic, withRowGroupsAndDefValue, modalWithRequiredFields, withAllowCalculateOverride, twoWithAllowCalculatedOverride, withCheckboxes };
@@ -649,7 +649,7 @@ export default class FileComponent extends Field {
649
649
  // Check if file with the same name is being uploaded
650
650
  const fileWithSameNameUploading = this.filesToSync.filesToUpload
651
651
  .some(fileToSync => fileToSync.file?.name === file.name);
652
- const fileWithSameNameUploaded = this.dataValue && this.dataValue
652
+ const fileWithSameNameUploaded = this.dataValue
653
653
  .some(fileStatus => fileStatus.originalName === file.name);
654
654
  return fileWithSameNameUploaded || fileWithSameNameUploading
655
655
  ? {
@@ -322,7 +322,7 @@ export default class RadioComponent extends ListComponent {
322
322
  const value = this.dataValue;
323
323
  this.refs.wrapper.forEach((wrapper, index) => {
324
324
  const input = this.refs.input[index];
325
- const checked = (input.type === 'checkbox') ? value[input.value] : (input.value.toString() === value.toString());
325
+ const checked = (input.type === 'checkbox') ? value[input.value] || this.element?.querySelector('input').checked : (input.value.toString() === value.toString());
326
326
  if (checked) {
327
327
  //add class to container when selected
328
328
  this.addClass(wrapper, this.optionSelectedClass);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@formio/js",
3
- "version": "5.0.0-dev.5642.f9208f7",
3
+ "version": "5.0.0-dev.5643.9c5173a",
4
4
  "description": "JavaScript powered Forms with JSON Form Builder",
5
5
  "main": "lib/cjs/index.js",
6
6
  "exports": {