@formio/js 5.0.0-dev.5723.99bf27e → 5.0.0-dev.5725.d52e1c4

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.
Files changed (149) hide show
  1. package/Changelog.md +33 -0
  2. package/dist/formio.embed.js +1 -1
  3. package/dist/formio.embed.min.js +1 -1
  4. package/dist/formio.form.js +53 -33
  5. package/dist/formio.form.min.js +1 -1
  6. package/dist/formio.form.min.js.LICENSE.txt +2 -0
  7. package/dist/formio.full.js +59 -39
  8. package/dist/formio.full.min.js +1 -1
  9. package/dist/formio.full.min.js.LICENSE.txt +2 -0
  10. package/dist/formio.js +1 -1
  11. package/dist/formio.min.js +1 -1
  12. package/dist/formio.utils.js +24 -4
  13. package/dist/formio.utils.min.js +1 -1
  14. package/dist/formio.utils.min.js.LICENSE.txt +2 -0
  15. package/lib/cjs/CDN.js +1 -2
  16. package/lib/cjs/Form.d.ts +2 -2
  17. package/lib/cjs/Form.js +11 -5
  18. package/lib/cjs/PDF.js +1 -1
  19. package/lib/cjs/PDFBuilder.js +2 -1
  20. package/lib/cjs/Webform.js +0 -1
  21. package/lib/cjs/WebformBuilder.js +8 -2
  22. package/lib/cjs/Wizard.js +1 -1
  23. package/lib/cjs/components/_classes/component/Component.d.ts +1 -1
  24. package/lib/cjs/components/_classes/component/Component.js +5 -4
  25. package/lib/cjs/components/_classes/multivalue/Multivalue.d.ts +0 -1
  26. package/lib/cjs/components/_classes/multivalue/Multivalue.js +43 -25
  27. package/lib/cjs/components/_classes/nested/NestedComponent.js +2 -1
  28. package/lib/cjs/components/_classes/nestedarray/NestedArrayComponent.d.ts +3 -0
  29. package/lib/cjs/components/_classes/nestedarray/NestedArrayComponent.js +56 -29
  30. package/lib/cjs/components/address/Address.d.ts +6 -0
  31. package/lib/cjs/components/address/Address.js +7 -1
  32. package/lib/cjs/components/datagrid/DataGrid.d.ts +0 -1
  33. package/lib/cjs/components/datagrid/DataGrid.js +2 -9
  34. package/lib/cjs/components/datagrid/fixtures/comp11.d.ts +50 -0
  35. package/lib/cjs/components/datagrid/fixtures/comp11.js +55 -0
  36. package/lib/cjs/components/datagrid/fixtures/index.d.ts +2 -1
  37. package/lib/cjs/components/datagrid/fixtures/index.js +3 -1
  38. package/lib/cjs/components/datamap/DataMap.js +1 -1
  39. package/lib/cjs/components/day/Day.d.ts +3 -4
  40. package/lib/cjs/components/day/Day.js +31 -10
  41. package/lib/cjs/components/editgrid/EditGrid.js +2 -5
  42. package/lib/cjs/components/editgrid/fixtures/comp17.d.ts +80 -0
  43. package/lib/cjs/components/editgrid/fixtures/comp17.js +99 -0
  44. package/lib/cjs/components/editgrid/fixtures/index.d.ts +8 -7
  45. package/lib/cjs/components/editgrid/fixtures/index.js +3 -1
  46. package/lib/cjs/components/file/File.d.ts +2 -2
  47. package/lib/cjs/components/file/File.js +13 -2
  48. package/lib/cjs/components/file/editForm/File.edit.display.js +1 -1
  49. package/lib/cjs/components/form/editForm/Form.edit.form.js +1 -1
  50. package/lib/cjs/components/form/fixtures/index.d.ts +2 -1
  51. package/lib/cjs/components/form/fixtures/index.js +3 -1
  52. package/lib/cjs/components/form/fixtures/nestedWizardForm.d.ts +771 -0
  53. package/lib/cjs/components/form/fixtures/nestedWizardForm.js +765 -0
  54. package/lib/cjs/components/panel/Panel.d.ts +1 -0
  55. package/lib/cjs/components/panel/Panel.js +1 -0
  56. package/lib/cjs/components/radio/Radio.d.ts +2 -18
  57. package/lib/cjs/components/radio/Radio.js +29 -27
  58. package/lib/cjs/components/radio/fixtures/comp12.d.ts +29 -0
  59. package/lib/cjs/components/radio/fixtures/comp12.js +36 -0
  60. package/lib/cjs/components/radio/fixtures/index.d.ts +2 -1
  61. package/lib/cjs/components/radio/fixtures/index.js +3 -1
  62. package/lib/cjs/components/recaptcha/ReCaptcha.d.ts +6 -0
  63. package/lib/cjs/components/recaptcha/ReCaptcha.js +6 -0
  64. package/lib/cjs/components/select/Select.d.ts +38 -0
  65. package/lib/cjs/components/select/Select.js +13 -3
  66. package/lib/cjs/components/select/fixtures/comp25.d.ts +59 -0
  67. package/lib/cjs/components/select/fixtures/comp25.js +66 -0
  68. package/lib/cjs/components/select/fixtures/comp26.d.ts +44 -0
  69. package/lib/cjs/components/select/fixtures/comp26.js +59 -0
  70. package/lib/cjs/components/select/fixtures/index.d.ts +3 -1
  71. package/lib/cjs/components/select/fixtures/index.js +5 -1
  72. package/lib/cjs/components/selectboxes/SelectBoxes.d.ts +0 -22
  73. package/lib/cjs/components/selectboxes/SelectBoxes.js +12 -9
  74. package/lib/cjs/components/signature/editForm/Signature.edit.display.d.ts +0 -6
  75. package/lib/cjs/components/signature/editForm/Signature.edit.display.js +0 -1
  76. package/lib/cjs/components/tags/Tags.js +3 -3
  77. package/lib/cjs/components/time/Time.form.js +2 -2
  78. package/lib/cjs/components/time/Time.js +0 -5
  79. package/lib/cjs/templates/Templates.js +1 -1
  80. package/lib/cjs/translations/en.d.ts +1 -0
  81. package/lib/cjs/translations/en.js +1 -0
  82. package/lib/mjs/CDN.js +1 -2
  83. package/lib/mjs/Form.d.ts +2 -2
  84. package/lib/mjs/Form.js +11 -5
  85. package/lib/mjs/PDF.js +1 -1
  86. package/lib/mjs/PDFBuilder.js +1 -1
  87. package/lib/mjs/Webform.js +0 -1
  88. package/lib/mjs/WebformBuilder.js +7 -2
  89. package/lib/mjs/Wizard.js +1 -1
  90. package/lib/mjs/components/_classes/component/Component.d.ts +1 -1
  91. package/lib/mjs/components/_classes/component/Component.js +2 -1
  92. package/lib/mjs/components/_classes/multivalue/Multivalue.d.ts +0 -1
  93. package/lib/mjs/components/_classes/multivalue/Multivalue.js +43 -25
  94. package/lib/mjs/components/_classes/nested/NestedComponent.js +2 -1
  95. package/lib/mjs/components/_classes/nestedarray/NestedArrayComponent.d.ts +3 -0
  96. package/lib/mjs/components/_classes/nestedarray/NestedArrayComponent.js +57 -29
  97. package/lib/mjs/components/address/Address.d.ts +6 -0
  98. package/lib/mjs/components/address/Address.js +10 -1
  99. package/lib/mjs/components/datagrid/DataGrid.d.ts +0 -1
  100. package/lib/mjs/components/datagrid/DataGrid.js +2 -9
  101. package/lib/mjs/components/datagrid/fixtures/comp11.d.ts +50 -0
  102. package/lib/mjs/components/datagrid/fixtures/comp11.js +53 -0
  103. package/lib/mjs/components/datagrid/fixtures/index.d.ts +2 -1
  104. package/lib/mjs/components/datagrid/fixtures/index.js +2 -1
  105. package/lib/mjs/components/datamap/DataMap.js +1 -1
  106. package/lib/mjs/components/day/Day.d.ts +3 -4
  107. package/lib/mjs/components/day/Day.js +30 -10
  108. package/lib/mjs/components/editgrid/EditGrid.js +2 -5
  109. package/lib/mjs/components/editgrid/fixtures/comp17.d.ts +80 -0
  110. package/lib/mjs/components/editgrid/fixtures/comp17.js +97 -0
  111. package/lib/mjs/components/editgrid/fixtures/index.d.ts +8 -7
  112. package/lib/mjs/components/editgrid/fixtures/index.js +2 -1
  113. package/lib/mjs/components/file/File.d.ts +2 -2
  114. package/lib/mjs/components/file/File.js +13 -2
  115. package/lib/mjs/components/file/editForm/File.edit.display.js +1 -1
  116. package/lib/mjs/components/form/editForm/Form.edit.form.js +1 -1
  117. package/lib/mjs/components/form/fixtures/index.d.ts +2 -1
  118. package/lib/mjs/components/form/fixtures/index.js +2 -1
  119. package/lib/mjs/components/form/fixtures/nestedWizardForm.d.ts +771 -0
  120. package/lib/mjs/components/form/fixtures/nestedWizardForm.js +763 -0
  121. package/lib/mjs/components/panel/Panel.d.ts +1 -0
  122. package/lib/mjs/components/panel/Panel.js +1 -0
  123. package/lib/mjs/components/radio/Radio.d.ts +2 -18
  124. package/lib/mjs/components/radio/Radio.js +32 -30
  125. package/lib/mjs/components/radio/fixtures/comp12.d.ts +29 -0
  126. package/lib/mjs/components/radio/fixtures/comp12.js +34 -0
  127. package/lib/mjs/components/radio/fixtures/index.d.ts +2 -1
  128. package/lib/mjs/components/radio/fixtures/index.js +2 -1
  129. package/lib/mjs/components/recaptcha/ReCaptcha.d.ts +6 -0
  130. package/lib/mjs/components/recaptcha/ReCaptcha.js +9 -0
  131. package/lib/mjs/components/select/Select.d.ts +38 -0
  132. package/lib/mjs/components/select/Select.js +16 -4
  133. package/lib/mjs/components/select/fixtures/comp25.d.ts +59 -0
  134. package/lib/mjs/components/select/fixtures/comp25.js +64 -0
  135. package/lib/mjs/components/select/fixtures/comp26.d.ts +44 -0
  136. package/lib/mjs/components/select/fixtures/comp26.js +57 -0
  137. package/lib/mjs/components/select/fixtures/index.d.ts +3 -1
  138. package/lib/mjs/components/select/fixtures/index.js +3 -1
  139. package/lib/mjs/components/selectboxes/SelectBoxes.d.ts +0 -22
  140. package/lib/mjs/components/selectboxes/SelectBoxes.js +16 -9
  141. package/lib/mjs/components/signature/editForm/Signature.edit.display.d.ts +0 -6
  142. package/lib/mjs/components/signature/editForm/Signature.edit.display.js +0 -1
  143. package/lib/mjs/components/tags/Tags.js +3 -3
  144. package/lib/mjs/components/time/Time.form.js +2 -2
  145. package/lib/mjs/components/time/Time.js +0 -11
  146. package/lib/mjs/templates/Templates.js +1 -1
  147. package/lib/mjs/translations/en.d.ts +1 -0
  148. package/lib/mjs/translations/en.js +1 -0
  149. package/package.json +4 -4
@@ -4,6 +4,7 @@ export default class PanelComponent extends NestedComponent {
4
4
  icon: string;
5
5
  group: string;
6
6
  documentation: string;
7
+ showPreview: boolean;
7
8
  weight: number;
8
9
  schema: any;
9
10
  };
@@ -27,6 +27,7 @@ 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,
30
31
  weight: 30,
31
32
  schema: PanelComponent.schema()
32
33
  };
@@ -8,26 +8,10 @@ export default class RadioComponent extends ListComponent {
8
8
  schema: any;
9
9
  };
10
10
  static get conditionOperatorsSettings(): {
11
- valueComponent(classComp: any): {
12
- type: string;
13
- dataSrc: string;
14
- valueProperty: string;
15
- dataType: any;
16
- data: {
17
- custom(): any;
18
- };
19
- };
11
+ valueComponent(classComp: any): any;
20
12
  };
21
13
  static get serverConditionSettings(): {
22
- valueComponent(classComp: any): {
23
- type: string;
24
- dataSrc: string;
25
- valueProperty: string;
26
- dataType: any;
27
- data: {
28
- custom: string;
29
- };
30
- };
14
+ valueComponent(classComp: any): any;
31
15
  };
32
16
  static savedValueTypes(schema: any): any[];
33
17
  constructor(component: any, options: any, data: any);
@@ -33,31 +33,22 @@ 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
- return {
37
- type: 'select',
38
- dataSrc: 'custom',
39
- valueProperty: 'value',
40
- dataType: classComp.dataType || '',
41
- data: {
42
- custom() {
43
- return classComp.values;
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) : []}`,
44
45
  }
45
- },
46
- };
46
+ }
47
+ : Object.assign(Object.assign({}, classComp), { type: 'select' });
47
48
  } });
48
49
  }
49
50
  static get serverConditionSettings() {
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
- } });
51
+ return RadioComponent.conditionOperatorsSettings;
61
52
  }
62
53
  static savedValueTypes(schema) {
63
54
  const { boolean, string, number, object, array } = utils_1.componentValueTypes;
@@ -264,6 +255,16 @@ class RadioComponent extends ListComponent_1.default {
264
255
  if (method.toUpperCase() === 'GET') {
265
256
  body = null;
266
257
  }
258
+ const limit = this.component.limit || 100;
259
+ const skip = this.isScrollLoading ? this.selectOptions.length : 0;
260
+ // Allow for url interpolation.
261
+ url = this.sanitize(this.interpolate(url, {
262
+ formioBase: Formio_1.Formio.getBaseUrl(),
263
+ search,
264
+ limit,
265
+ skip,
266
+ page: Math.abs(Math.floor(skip / limit))
267
+ }), this.shouldSanitizeValue);
267
268
  // Set ignoreCache if it is
268
269
  options.ignoreCache = this.component.ignoreCache;
269
270
  // Make the request.
@@ -295,14 +296,15 @@ class RadioComponent extends ListComponent_1.default {
295
296
  setItems(items) {
296
297
  const listData = [];
297
298
  items === null || items === void 0 ? void 0 : items.forEach((item, i) => {
299
+ const valueAtProperty = lodash_1.default.get(item, this.component.valueProperty);
298
300
  this.loadedOptions[i] = {
299
- value: this.component.valueProperty ? item[this.component.valueProperty] : item,
300
- label: this.component.valueProperty ? this.itemTemplate(item, item[this.component.valueProperty]) : this.itemTemplate(item, item, i)
301
+ value: this.component.valueProperty ? valueAtProperty : item,
302
+ label: this.component.valueProperty ? this.itemTemplate(item, valueAtProperty) : this.itemTemplate(item, item, i)
301
303
  };
302
- listData.push(this.templateData[this.component.valueProperty ? item[this.component.valueProperty] : i]);
303
- if ((this.component.valueProperty || !this.isRadio) && (lodash_1.default.isUndefined(item[this.component.valueProperty]) ||
304
- (!this.isRadio && lodash_1.default.isObject(item[this.component.valueProperty])) ||
305
- (!this.isRadio && lodash_1.default.isBoolean(item[this.component.valueProperty])))) {
304
+ listData.push(this.templateData[this.component.valueProperty ? valueAtProperty : i]);
305
+ if ((this.component.valueProperty || !this.isRadio) && (lodash_1.default.isUndefined(valueAtProperty) ||
306
+ (!this.isRadio && lodash_1.default.isObject(valueAtProperty)) ||
307
+ (!this.isRadio && lodash_1.default.isBoolean(valueAtProperty)))) {
306
308
  this.loadedOptions[i].invalid = true;
307
309
  }
308
310
  });
@@ -0,0 +1,29 @@
1
+ declare namespace _default {
2
+ let components: {
3
+ label: string;
4
+ optionsLabelPosition: string;
5
+ tableView: boolean;
6
+ dataSrc: string;
7
+ values: {
8
+ label: string;
9
+ value: string;
10
+ shortcut: string;
11
+ }[];
12
+ valueProperty: string;
13
+ validateWhenHidden: boolean;
14
+ key: string;
15
+ type: string;
16
+ data: {
17
+ url: string;
18
+ headers: {
19
+ key: string;
20
+ value: string;
21
+ }[];
22
+ };
23
+ template: string;
24
+ authenticate: boolean;
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
+ components: [
5
+ {
6
+ "label": "Select Boxes",
7
+ "optionsLabelPosition": "right",
8
+ "tableView": false,
9
+ "dataSrc": "url",
10
+ "values": [
11
+ {
12
+ "label": "",
13
+ "value": "",
14
+ "shortcut": ""
15
+ }
16
+ ],
17
+ "valueProperty": "data.name",
18
+ "validateWhenHidden": false,
19
+ "key": "selectBoxes",
20
+ "type": "selectboxes",
21
+ "data": {
22
+ "url": "https://remote-dev.form.io/projectId/name/submission",
23
+ "headers": [
24
+ {
25
+ "key": "",
26
+ "value": ""
27
+ }
28
+ ]
29
+ },
30
+ "template": "<span>{{ item.data.name }}</span>",
31
+ "authenticate": true,
32
+ "input": true,
33
+ "inputType": "checkbox"
34
+ }
35
+ ]
36
+ };
@@ -9,4 +9,5 @@ import comp8 from './comp8';
9
9
  import comp9 from './comp9';
10
10
  import comp10 from './comp10';
11
11
  import comp11 from './comp11';
12
- export { comp1, comp2, comp3, comp4, comp5, comp6, comp7, comp8, comp9, comp10, comp11 };
12
+ import comp12 from './comp12';
13
+ export { comp1, comp2, comp3, comp4, comp5, comp6, comp7, comp8, comp9, comp10, comp11, comp12 };
@@ -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.comp11 = exports.comp10 = exports.comp9 = exports.comp8 = exports.comp7 = exports.comp6 = exports.comp5 = exports.comp4 = exports.comp3 = exports.comp2 = exports.comp1 = void 0;
6
+ 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"));
@@ -26,3 +26,5 @@ const comp10_1 = __importDefault(require("./comp10"));
26
26
  exports.comp10 = comp10_1.default;
27
27
  const comp11_1 = __importDefault(require("./comp11"));
28
28
  exports.comp11 = comp11_1.default;
29
+ const comp12_1 = __importDefault(require("./comp12"));
30
+ exports.comp12 = comp12_1.default;
@@ -1,6 +1,12 @@
1
1
  export default class ReCaptchaComponent extends Component {
2
2
  static get builderInfo(): {};
3
3
  static savedValueTypes(): never[];
4
+ static get conditionOperatorsSettings(): {
5
+ operators: string[];
6
+ };
7
+ static get serverConditionSettings(): {
8
+ operators: string[];
9
+ };
4
10
  render(): string;
5
11
  recaptchaResult: any;
6
12
  createInput(): void;
@@ -31,6 +31,12 @@ class ReCaptchaComponent extends Component_1.default {
31
31
  static savedValueTypes() {
32
32
  return [];
33
33
  }
34
+ static get conditionOperatorsSettings() {
35
+ return Object.assign(Object.assign({}, super.conditionOperatorsSettings), { operators: ['isEmpty', 'isNotEmpty'] });
36
+ }
37
+ static get serverConditionSettings() {
38
+ return ReCaptchaComponent.conditionOperatorsSettings;
39
+ }
34
40
  render() {
35
41
  this.recaptchaResult = null;
36
42
  if (this.builderMode) {
@@ -9,9 +9,47 @@ export default class SelectComponent extends ListComponent {
9
9
  };
10
10
  static get serverConditionSettings(): {
11
11
  valueComponent(classComp: any): any;
12
+ dataTypeOperators: {
13
+ number: string[];
14
+ };
15
+ dataTypeValueComponents: {
16
+ number: {
17
+ lessThan: () => {
18
+ type: string;
19
+ };
20
+ greaterThan: () => {
21
+ type: string;
22
+ };
23
+ lessThanOrEqual: () => {
24
+ type: string;
25
+ };
26
+ greaterThanOrEqual: () => {
27
+ type: string;
28
+ };
29
+ };
30
+ };
12
31
  };
13
32
  static get conditionOperatorsSettings(): {
14
33
  valueComponent(classComp: any): any;
34
+ dataTypeOperators: {
35
+ number: string[];
36
+ };
37
+ dataTypeValueComponents: {
38
+ number: {
39
+ lessThan: () => {
40
+ type: string;
41
+ };
42
+ greaterThan: () => {
43
+ type: string;
44
+ };
45
+ lessThanOrEqual: () => {
46
+ type: string;
47
+ };
48
+ greaterThanOrEqual: () => {
49
+ type: string;
50
+ };
51
+ };
52
+ };
15
53
  };
16
54
  static savedValueTypes(schema: any): any[];
17
55
  templateData: {} | undefined;
@@ -62,6 +62,7 @@ class SelectComponent extends ListComponent_1.default {
62
62
  return SelectComponent.conditionOperatorsSettings;
63
63
  }
64
64
  static get conditionOperatorsSettings() {
65
+ const numberType = () => ({ type: 'number' });
65
66
  return Object.assign(Object.assign({}, super.conditionOperatorsSettings), { valueComponent(classComp) {
66
67
  const valueComp = Object.assign(Object.assign({}, classComp), { type: 'select' });
67
68
  if ((0, utils_1.isSelectResourceWithObjectValue)(classComp)) {
@@ -76,6 +77,15 @@ class SelectComponent extends ListComponent_1.default {
76
77
  `;
77
78
  }
78
79
  return valueComp;
80
+ }, dataTypeOperators: {
81
+ number: ['lessThan', 'greaterThan', 'lessThanOrEqual', 'greaterThanOrEqual'],
82
+ }, dataTypeValueComponents: {
83
+ number: {
84
+ lessThan: numberType,
85
+ greaterThan: numberType,
86
+ lessThanOrEqual: numberType,
87
+ greaterThanOrEqual: numberType,
88
+ },
79
89
  } });
80
90
  }
81
91
  static savedValueTypes(schema) {
@@ -526,13 +536,13 @@ class SelectComponent extends ListComponent_1.default {
526
536
  skip,
527
537
  };
528
538
  // Allow for url interpolation.
529
- url = this.interpolate(url, {
539
+ url = this.sanitize(this.interpolate(url, {
530
540
  formioBase: Formio_1.Formio.getBaseUrl(),
531
541
  search,
532
542
  limit,
533
543
  skip,
534
544
  page: Math.abs(Math.floor(skip / limit))
535
- });
545
+ }), this.shouldSanitizeValue);
536
546
  // Add search capability.
537
547
  if (this.component.searchField && search) {
538
548
  const searchValue = Array.isArray(search)
@@ -1557,8 +1567,8 @@ class SelectComponent extends ListComponent_1.default {
1557
1567
  super.detach();
1558
1568
  }
1559
1569
  focus() {
1570
+ super.focus.call(this);
1560
1571
  if (this.focusableElement) {
1561
- super.focus.call(this);
1562
1572
  this.focusableElement.focus();
1563
1573
  }
1564
1574
  }
@@ -0,0 +1,59 @@
1
+ declare namespace _default {
2
+ let components: ({
3
+ label: string;
4
+ tableView: boolean;
5
+ modal: boolean;
6
+ rowDrafts: boolean;
7
+ key: string;
8
+ type: string;
9
+ displayAsTable: boolean;
10
+ input: boolean;
11
+ components: ({
12
+ label: string;
13
+ widget: string;
14
+ tableView: boolean;
15
+ data: {
16
+ values: {
17
+ label: string;
18
+ value: string;
19
+ }[];
20
+ };
21
+ validate: {
22
+ required: boolean;
23
+ };
24
+ key: string;
25
+ type: string;
26
+ input: boolean;
27
+ applyMaskOn?: undefined;
28
+ validateWhenHidden?: undefined;
29
+ } | {
30
+ label: string;
31
+ applyMaskOn: string;
32
+ tableView: boolean;
33
+ validate: {
34
+ required: boolean;
35
+ };
36
+ validateWhenHidden: boolean;
37
+ key: string;
38
+ type: string;
39
+ input: boolean;
40
+ widget?: undefined;
41
+ data?: undefined;
42
+ })[];
43
+ showValidations?: undefined;
44
+ saveOnEnter?: undefined;
45
+ } | {
46
+ label: string;
47
+ showValidations: boolean;
48
+ tableView: boolean;
49
+ key: string;
50
+ type: string;
51
+ input: boolean;
52
+ saveOnEnter: boolean;
53
+ modal?: undefined;
54
+ rowDrafts?: undefined;
55
+ displayAsTable?: undefined;
56
+ components?: undefined;
57
+ })[];
58
+ }
59
+ export default _default;
@@ -0,0 +1,66 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = {
4
+ "components": [
5
+ {
6
+ "label": "Edit Grid",
7
+ "tableView": false,
8
+ "modal": true,
9
+ "rowDrafts": true,
10
+ "key": "editGrid",
11
+ "type": "editgrid",
12
+ "displayAsTable": false,
13
+ "input": true,
14
+ "components": [
15
+ {
16
+ "label": "Select",
17
+ "widget": "choicesjs",
18
+ "tableView": true,
19
+ "data": {
20
+ "values": [
21
+ {
22
+ "label": "a",
23
+ "value": "a"
24
+ },
25
+ {
26
+ "label": "b",
27
+ "value": "b"
28
+ },
29
+ {
30
+ "label": "c",
31
+ "value": "c"
32
+ }
33
+ ]
34
+ },
35
+ "validate": {
36
+ "required": true
37
+ },
38
+ "key": "select",
39
+ "type": "select",
40
+ "input": true
41
+ },
42
+ {
43
+ "label": "Text Field",
44
+ "applyMaskOn": "change",
45
+ "tableView": true,
46
+ "validate": {
47
+ "required": true
48
+ },
49
+ "validateWhenHidden": false,
50
+ "key": "textField",
51
+ "type": "textfield",
52
+ "input": true
53
+ }
54
+ ]
55
+ },
56
+ {
57
+ "label": "Submit",
58
+ "showValidations": false,
59
+ "tableView": false,
60
+ "key": "submit",
61
+ "type": "button",
62
+ "input": true,
63
+ "saveOnEnter": false
64
+ }
65
+ ]
66
+ };
@@ -0,0 +1,44 @@
1
+ declare namespace _default {
2
+ let title: string;
3
+ let name: string;
4
+ let path: string;
5
+ let type: string;
6
+ let display: string;
7
+ let components: ({
8
+ label: string;
9
+ widget: string;
10
+ tableView: boolean;
11
+ data: {
12
+ values: {
13
+ label: string;
14
+ value: string;
15
+ }[];
16
+ };
17
+ dataType: string;
18
+ key: string;
19
+ type: string;
20
+ input: boolean;
21
+ applyMaskOn?: undefined;
22
+ conditional?: undefined;
23
+ } | {
24
+ label: string;
25
+ applyMaskOn: string;
26
+ tableView: boolean;
27
+ key: string;
28
+ type: string;
29
+ input: boolean;
30
+ conditional: {
31
+ show: boolean;
32
+ conjunction: string;
33
+ conditions: {
34
+ component: string;
35
+ operator: string;
36
+ value: number;
37
+ }[];
38
+ };
39
+ widget?: undefined;
40
+ data?: undefined;
41
+ dataType?: undefined;
42
+ })[];
43
+ }
44
+ export default _default;
@@ -0,0 +1,59 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = {
4
+ title: 'FIO-8072',
5
+ name: 'fio8072',
6
+ path: 'fio8072',
7
+ type: 'form',
8
+ display: 'form',
9
+ components: [
10
+ {
11
+ label: 'Select',
12
+ widget: 'choicesjs',
13
+ tableView: true,
14
+ data: {
15
+ values: [
16
+ {
17
+ label: 'A',
18
+ value: '1',
19
+ },
20
+ {
21
+ label: 'B',
22
+ value: '2',
23
+ },
24
+ {
25
+ label: 'C',
26
+ value: '10',
27
+ },
28
+ {
29
+ label: 'D',
30
+ value: '1d',
31
+ },
32
+ ],
33
+ },
34
+ dataType: 'number',
35
+ key: 'select',
36
+ type: 'select',
37
+ input: true,
38
+ },
39
+ {
40
+ label: 'Text Field',
41
+ applyMaskOn: 'change',
42
+ tableView: true,
43
+ key: 'textField',
44
+ type: 'textfield',
45
+ input: true,
46
+ conditional: {
47
+ show: true,
48
+ conjunction: 'all',
49
+ conditions: [
50
+ {
51
+ component: 'select',
52
+ operator: 'lessThan',
53
+ value: 5,
54
+ },
55
+ ],
56
+ },
57
+ },
58
+ ],
59
+ };
@@ -21,5 +21,7 @@ import comp21 from './comp21';
21
21
  import comp22 from './comp22';
22
22
  import comp23 from './comp23';
23
23
  import comp24 from './comp24';
24
- export { comp1, comp2, comp4, comp5, comp6, comp7, comp8, comp9, comp10, comp11, comp12, comp13, comp14, comp15, comp16, comp17, comp18, comp19, comp20, comp21, comp22, comp23, comp24 };
24
+ import comp25 from './comp25';
25
+ import comp26 from './comp26';
26
+ export { comp1, comp2, comp4, comp5, comp6, comp7, comp8, comp9, comp10, comp11, comp12, comp13, comp14, comp15, comp16, comp17, comp18, comp19, comp20, comp21, comp22, comp23, comp24, comp25, comp26 };
25
27
  export { multiSelect, multiSelectOptions } from "./comp3";
@@ -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.comp24 = exports.comp23 = exports.comp22 = exports.comp21 = exports.comp20 = exports.comp19 = exports.comp18 = 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.comp2 = exports.comp1 = exports.multiSelectOptions = exports.multiSelect = void 0;
6
+ exports.comp26 = exports.comp25 = exports.comp24 = exports.comp23 = exports.comp22 = exports.comp21 = exports.comp20 = exports.comp19 = exports.comp18 = 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.comp2 = exports.comp1 = exports.multiSelectOptions = exports.multiSelect = 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"));
@@ -53,3 +53,7 @@ const comp23_1 = __importDefault(require("./comp23"));
53
53
  exports.comp23 = comp23_1.default;
54
54
  const comp24_1 = __importDefault(require("./comp24"));
55
55
  exports.comp24 = comp24_1.default;
56
+ const comp25_1 = __importDefault(require("./comp25"));
57
+ exports.comp25 = comp25_1.default;
58
+ const comp26_1 = __importDefault(require("./comp26"));
59
+ exports.comp26 = comp26_1.default;
@@ -1,26 +1,4 @@
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
- };
24
2
  static savedValueTypes(schema: any): string[];
25
3
  constructor(...args: any[]);
26
4
  get emptyValue(): any;
@@ -30,15 +30,18 @@ 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
- 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
- };
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' });
42
45
  } });
43
46
  }
44
47
  static savedValueTypes(schema) {