@formio/js 5.0.0-dev.5767.890ab86 → 5.0.0-dev.5770.0748fdc

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.
@@ -38,7 +38,7 @@ export default class FileComponent extends Field {
38
38
  get hasTypes(): any;
39
39
  _fileBrowseHidden: any;
40
40
  get shouldSyncFiles(): boolean;
41
- get autoSync(): any;
41
+ get autoSync(): boolean;
42
42
  get columnsSize(): {
43
43
  name: number;
44
44
  size: number;
@@ -151,7 +151,9 @@ class FileComponent extends Field_1.default {
151
151
  return Boolean(this.filesToSync.filesToDelete.length || this.filesToSync.filesToUpload.length);
152
152
  }
153
153
  get autoSync() {
154
- return lodash_1.default.get(this, 'component.autoSync', false);
154
+ // Disable autoSync for now
155
+ return false;
156
+ // return _.get(this, 'component.autoSync', false);
155
157
  }
156
158
  get columnsSize() {
157
159
  const actionsColumn = this.disabled ? 0 : this.autoSync ? 2 : 1;
@@ -6,7 +6,7 @@ exports.default = [
6
6
  ignore: true
7
7
  },
8
8
  {
9
- type: 'checkbox',
9
+ type: 'hidden',
10
10
  label: 'Files Synchronization feature',
11
11
  tooltip: 'Enable ability to control files synchronization. Files will be auto synced before submit.',
12
12
  key: 'autoSync',
@@ -8,10 +8,26 @@ export default class RadioComponent extends ListComponent {
8
8
  schema: any;
9
9
  };
10
10
  static get conditionOperatorsSettings(): {
11
- valueComponent(classComp: any): any;
11
+ valueComponent(classComp: any): {
12
+ type: string;
13
+ dataSrc: string;
14
+ valueProperty: string;
15
+ dataType: any;
16
+ data: {
17
+ custom(): any;
18
+ };
19
+ };
12
20
  };
13
21
  static get serverConditionSettings(): {
14
- valueComponent(classComp: any): any;
22
+ valueComponent(classComp: any): {
23
+ type: string;
24
+ dataSrc: string;
25
+ valueProperty: string;
26
+ dataType: any;
27
+ data: {
28
+ custom: string;
29
+ };
30
+ };
15
31
  };
16
32
  static savedValueTypes(schema: any): any[];
17
33
  constructor(component: any, options: any, data: any);
@@ -33,22 +33,31 @@ class RadioComponent extends ListComponent_1.default {
33
33
  }
34
34
  static get conditionOperatorsSettings() {
35
35
  return Object.assign(Object.assign({}, super.conditionOperatorsSettings), { valueComponent(classComp) {
36
- const isValuesSrc = !classComp.dataSrc || classComp.dataSrc === 'values';
37
- return isValuesSrc
38
- ? {
39
- type: 'select',
40
- dataSrc: 'custom',
41
- valueProperty: 'value',
42
- dataType: classComp.dataType || '',
43
- data: {
44
- custom: `values = ${classComp && classComp.values ? JSON.stringify(classComp.values) : []}`,
36
+ return {
37
+ type: 'select',
38
+ dataSrc: 'custom',
39
+ valueProperty: 'value',
40
+ dataType: classComp.dataType || '',
41
+ data: {
42
+ custom() {
43
+ return classComp.values;
45
44
  }
46
- }
47
- : Object.assign(Object.assign({}, classComp), { type: 'select' });
45
+ },
46
+ };
48
47
  } });
49
48
  }
50
49
  static get serverConditionSettings() {
51
- return RadioComponent.conditionOperatorsSettings;
50
+ return Object.assign(Object.assign({}, super.serverConditionSettings), { valueComponent(classComp) {
51
+ return {
52
+ type: 'select',
53
+ dataSrc: 'custom',
54
+ valueProperty: 'value',
55
+ dataType: classComp.dataType || '',
56
+ data: {
57
+ custom: `values = ${classComp && classComp.values ? JSON.stringify(classComp.values) : []}`,
58
+ },
59
+ };
60
+ } });
52
61
  }
53
62
  static savedValueTypes(schema) {
54
63
  const { boolean, string, number, object, array } = utils_1.componentValueTypes;
@@ -1,4 +1,26 @@
1
1
  export default class SelectBoxesComponent extends RadioComponent {
2
+ static get serverConditionSettings(): {
3
+ valueComponent(classComp: any): {
4
+ type: string;
5
+ dataSrc: string;
6
+ valueProperty: string;
7
+ dataType: string;
8
+ data: {
9
+ custom: string;
10
+ };
11
+ };
12
+ };
13
+ static get conditionOperatorsSettings(): {
14
+ valueComponent(classComp: any): {
15
+ type: string;
16
+ dataSrc: string;
17
+ valueProperty: string;
18
+ dataType: string;
19
+ data: {
20
+ custom: string;
21
+ };
22
+ };
23
+ };
2
24
  static savedValueTypes(schema: any): string[];
3
25
  constructor(...args: any[]);
4
26
  get emptyValue(): any;
@@ -30,18 +30,15 @@ class SelectBoxesComponent extends Radio_1.default {
30
30
  }
31
31
  static get conditionOperatorsSettings() {
32
32
  return Object.assign(Object.assign({}, super.conditionOperatorsSettings), { valueComponent(classComp) {
33
- const isValuesSrc = !classComp.dataSrc || classComp.dataSrc === 'values';
34
- return isValuesSrc
35
- ? {
36
- type: 'select',
37
- dataSrc: 'custom',
38
- valueProperty: 'value',
39
- dataType: 'string',
40
- data: {
41
- custom: `values = ${classComp && classComp.values ? JSON.stringify(classComp.values) : []}`
42
- },
43
- }
44
- : Object.assign(Object.assign({}, classComp), { dataType: 'string', type: 'select' });
33
+ return {
34
+ type: 'select',
35
+ dataSrc: 'custom',
36
+ valueProperty: 'value',
37
+ dataType: 'string',
38
+ data: {
39
+ custom: `values = ${classComp && classComp.values ? JSON.stringify(classComp.values) : []}`
40
+ },
41
+ };
45
42
  } });
46
43
  }
47
44
  static savedValueTypes(schema) {
@@ -38,7 +38,7 @@ export default class FileComponent extends Field {
38
38
  get hasTypes(): any;
39
39
  _fileBrowseHidden: any;
40
40
  get shouldSyncFiles(): boolean;
41
- get autoSync(): any;
41
+ get autoSync(): boolean;
42
42
  get columnsSize(): {
43
43
  name: number;
44
44
  size: number;
@@ -140,7 +140,9 @@ export default class FileComponent extends Field {
140
140
  return Boolean(this.filesToSync.filesToDelete.length || this.filesToSync.filesToUpload.length);
141
141
  }
142
142
  get autoSync() {
143
- return _.get(this, 'component.autoSync', false);
143
+ // Disable autoSync for now
144
+ return false;
145
+ // return _.get(this, 'component.autoSync', false);
144
146
  }
145
147
  get columnsSize() {
146
148
  const actionsColumn = this.disabled ? 0 : this.autoSync ? 2 : 1;
@@ -4,7 +4,7 @@ export default [
4
4
  ignore: true
5
5
  },
6
6
  {
7
- type: 'checkbox',
7
+ type: 'hidden',
8
8
  label: 'Files Synchronization feature',
9
9
  tooltip: 'Enable ability to control files synchronization. Files will be auto synced before submit.',
10
10
  key: 'autoSync',
@@ -8,10 +8,26 @@ export default class RadioComponent extends ListComponent {
8
8
  schema: any;
9
9
  };
10
10
  static get conditionOperatorsSettings(): {
11
- valueComponent(classComp: any): any;
11
+ valueComponent(classComp: any): {
12
+ type: string;
13
+ dataSrc: string;
14
+ valueProperty: string;
15
+ dataType: any;
16
+ data: {
17
+ custom(): any;
18
+ };
19
+ };
12
20
  };
13
21
  static get serverConditionSettings(): {
14
- valueComponent(classComp: any): any;
22
+ valueComponent(classComp: any): {
23
+ type: string;
24
+ dataSrc: string;
25
+ valueProperty: string;
26
+ dataType: any;
27
+ data: {
28
+ custom: string;
29
+ };
30
+ };
15
31
  };
16
32
  static savedValueTypes(schema: any): any[];
17
33
  constructor(component: any, options: any, data: any);
@@ -30,26 +30,35 @@ export default class RadioComponent extends ListComponent {
30
30
  return {
31
31
  ...super.conditionOperatorsSettings,
32
32
  valueComponent(classComp) {
33
- const isValuesSrc = !classComp.dataSrc || classComp.dataSrc === 'values';
34
- return isValuesSrc
35
- ? {
36
- type: 'select',
37
- dataSrc: 'custom',
38
- valueProperty: 'value',
39
- dataType: classComp.dataType || '',
40
- data: {
41
- custom: `values = ${classComp && classComp.values ? JSON.stringify(classComp.values) : []}`,
33
+ return {
34
+ type: 'select',
35
+ dataSrc: 'custom',
36
+ valueProperty: 'value',
37
+ dataType: classComp.dataType || '',
38
+ data: {
39
+ custom() {
40
+ return classComp.values;
42
41
  }
43
- }
44
- : {
45
- ...classComp,
46
- type: 'select',
47
- };
42
+ },
43
+ };
48
44
  }
49
45
  };
50
46
  }
51
47
  static get serverConditionSettings() {
52
- return RadioComponent.conditionOperatorsSettings;
48
+ return {
49
+ ...super.serverConditionSettings,
50
+ valueComponent(classComp) {
51
+ return {
52
+ type: 'select',
53
+ dataSrc: 'custom',
54
+ valueProperty: 'value',
55
+ dataType: classComp.dataType || '',
56
+ data: {
57
+ custom: `values = ${classComp && classComp.values ? JSON.stringify(classComp.values) : []}`,
58
+ },
59
+ };
60
+ },
61
+ };
53
62
  }
54
63
  static savedValueTypes(schema) {
55
64
  const { boolean, string, number, object, array } = componentValueTypes;
@@ -1,4 +1,26 @@
1
1
  export default class SelectBoxesComponent extends RadioComponent {
2
+ static get serverConditionSettings(): {
3
+ valueComponent(classComp: any): {
4
+ type: string;
5
+ dataSrc: string;
6
+ valueProperty: string;
7
+ dataType: string;
8
+ data: {
9
+ custom: string;
10
+ };
11
+ };
12
+ };
13
+ static get conditionOperatorsSettings(): {
14
+ valueComponent(classComp: any): {
15
+ type: string;
16
+ dataSrc: string;
17
+ valueProperty: string;
18
+ dataType: string;
19
+ data: {
20
+ custom: string;
21
+ };
22
+ };
23
+ };
2
24
  static savedValueTypes(schema: any): string[];
3
25
  constructor(...args: any[]);
4
26
  get emptyValue(): any;
@@ -27,22 +27,15 @@ export default class SelectBoxesComponent extends RadioComponent {
27
27
  return {
28
28
  ...super.conditionOperatorsSettings,
29
29
  valueComponent(classComp) {
30
- const isValuesSrc = !classComp.dataSrc || classComp.dataSrc === 'values';
31
- return isValuesSrc
32
- ? {
33
- type: 'select',
34
- dataSrc: 'custom',
35
- valueProperty: 'value',
36
- dataType: 'string',
37
- data: {
38
- custom: `values = ${classComp && classComp.values ? JSON.stringify(classComp.values) : []}`
39
- },
40
- }
41
- : {
42
- ...classComp,
43
- dataType: 'string',
44
- type: 'select',
45
- };
30
+ return {
31
+ type: 'select',
32
+ dataSrc: 'custom',
33
+ valueProperty: 'value',
34
+ dataType: 'string',
35
+ data: {
36
+ custom: `values = ${classComp && classComp.values ? JSON.stringify(classComp.values) : []}`
37
+ },
38
+ };
46
39
  }
47
40
  };
48
41
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@formio/js",
3
- "version": "5.0.0-dev.5767.890ab86",
3
+ "version": "5.0.0-dev.5770.0748fdc",
4
4
  "description": "JavaScript powered Forms with JSON Form Builder",
5
5
  "main": "lib/cjs/index.js",
6
6
  "exports": {