@formio/js 5.0.0-dev.5656.925a8ee → 5.0.0-dev.5661.22d0f16

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 (47) hide show
  1. package/dist/formio.form.js +6 -6
  2. package/dist/formio.form.min.js +1 -1
  3. package/dist/formio.full.js +6 -6
  4. package/dist/formio.full.min.js +1 -1
  5. package/lib/cjs/components/_classes/component/Component.js +1 -1
  6. package/lib/cjs/components/_classes/component/fixtures/comp6.d.ts +77 -0
  7. package/lib/cjs/components/_classes/component/fixtures/comp6.js +59 -0
  8. package/lib/cjs/components/_classes/component/fixtures/index.d.ts +2 -1
  9. package/lib/cjs/components/_classes/component/fixtures/index.js +3 -1
  10. package/lib/cjs/components/_classes/input/Input.js +6 -4
  11. package/lib/cjs/components/datagrid/fixtures/comp-with-checkboxes.d.ts +29 -0
  12. package/lib/cjs/components/datagrid/fixtures/comp-with-checkboxes.js +36 -0
  13. package/lib/cjs/components/datagrid/fixtures/index.d.ts +2 -1
  14. package/lib/cjs/components/datagrid/fixtures/index.js +3 -1
  15. package/lib/cjs/components/radio/Radio.js +3 -2
  16. package/lib/cjs/components/select/Select.d.ts +0 -38
  17. package/lib/cjs/components/select/Select.js +0 -10
  18. package/lib/cjs/components/select/fixtures/index.d.ts +1 -2
  19. package/lib/cjs/components/select/fixtures/index.js +1 -3
  20. package/lib/cjs/translations/en.d.ts +2 -0
  21. package/lib/cjs/translations/en.js +3 -1
  22. package/lib/cjs/utils/ChoicesWrapper.d.ts +1 -1
  23. package/lib/cjs/utils/ChoicesWrapper.js +13 -2
  24. package/lib/mjs/components/_classes/component/Component.js +1 -1
  25. package/lib/mjs/components/_classes/component/fixtures/comp6.d.ts +77 -0
  26. package/lib/mjs/components/_classes/component/fixtures/comp6.js +57 -0
  27. package/lib/mjs/components/_classes/component/fixtures/index.d.ts +2 -1
  28. package/lib/mjs/components/_classes/component/fixtures/index.js +2 -1
  29. package/lib/mjs/components/_classes/input/Input.js +6 -4
  30. package/lib/mjs/components/datagrid/fixtures/comp-with-checkboxes.d.ts +29 -0
  31. package/lib/mjs/components/datagrid/fixtures/comp-with-checkboxes.js +34 -0
  32. package/lib/mjs/components/datagrid/fixtures/index.d.ts +2 -1
  33. package/lib/mjs/components/datagrid/fixtures/index.js +2 -1
  34. package/lib/mjs/components/radio/Radio.js +3 -2
  35. package/lib/mjs/components/select/Select.d.ts +0 -38
  36. package/lib/mjs/components/select/Select.js +1 -13
  37. package/lib/mjs/components/select/fixtures/index.d.ts +1 -2
  38. package/lib/mjs/components/select/fixtures/index.js +1 -2
  39. package/lib/mjs/translations/en.d.ts +2 -0
  40. package/lib/mjs/translations/en.js +3 -1
  41. package/lib/mjs/utils/ChoicesWrapper.d.ts +1 -1
  42. package/lib/mjs/utils/ChoicesWrapper.js +13 -2
  43. package/package.json +1 -1
  44. package/lib/cjs/components/select/fixtures/comp25.d.ts +0 -44
  45. package/lib/cjs/components/select/fixtures/comp25.js +0 -59
  46. package/lib/mjs/components/select/fixtures/comp25.d.ts +0 -44
  47. package/lib/mjs/components/select/fixtures/comp25.js +0 -57
@@ -2665,7 +2665,7 @@ class Component extends Element_1.default {
2665
2665
  */
2666
2666
  resetValue() {
2667
2667
  this.unset();
2668
- this.setValue(this.emptyValue, {
2668
+ this.setValue(this.defaultValue || this.emptyValue, {
2669
2669
  noUpdateEvent: true,
2670
2670
  noValidate: true,
2671
2671
  resetValue: true
@@ -0,0 +1,77 @@
1
+ declare namespace _default {
2
+ let components: ({
3
+ label: string;
4
+ applyMaskOn: string;
5
+ tableView: boolean;
6
+ key: string;
7
+ type: string;
8
+ input: boolean;
9
+ defaultValue: string;
10
+ mask?: undefined;
11
+ delimiter?: undefined;
12
+ requireDecimal?: undefined;
13
+ inputFormat?: undefined;
14
+ truncateMultipleSpaces?: undefined;
15
+ widget?: undefined;
16
+ data?: undefined;
17
+ action?: undefined;
18
+ showValidations?: undefined;
19
+ } | {
20
+ label: string;
21
+ applyMaskOn: string;
22
+ mask: boolean;
23
+ tableView: boolean;
24
+ delimiter: boolean;
25
+ requireDecimal: boolean;
26
+ inputFormat: string;
27
+ truncateMultipleSpaces: boolean;
28
+ key: string;
29
+ type: string;
30
+ input: boolean;
31
+ defaultValue: number;
32
+ widget?: undefined;
33
+ data?: undefined;
34
+ action?: undefined;
35
+ showValidations?: undefined;
36
+ } | {
37
+ label: string;
38
+ widget: string;
39
+ tableView: boolean;
40
+ data: {
41
+ values: {
42
+ label: string;
43
+ value: string;
44
+ }[];
45
+ };
46
+ key: string;
47
+ type: string;
48
+ input: boolean;
49
+ defaultValue: string;
50
+ applyMaskOn?: undefined;
51
+ mask?: undefined;
52
+ delimiter?: undefined;
53
+ requireDecimal?: undefined;
54
+ inputFormat?: undefined;
55
+ truncateMultipleSpaces?: undefined;
56
+ action?: undefined;
57
+ showValidations?: undefined;
58
+ } | {
59
+ label: string;
60
+ action: string;
61
+ showValidations: boolean;
62
+ tableView: boolean;
63
+ key: string;
64
+ type: string;
65
+ input: boolean;
66
+ applyMaskOn?: undefined;
67
+ defaultValue?: undefined;
68
+ mask?: undefined;
69
+ delimiter?: undefined;
70
+ requireDecimal?: undefined;
71
+ inputFormat?: undefined;
72
+ truncateMultipleSpaces?: undefined;
73
+ widget?: undefined;
74
+ data?: undefined;
75
+ })[];
76
+ }
77
+ export default _default;
@@ -0,0 +1,59 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = {
4
+ "components": [
5
+ {
6
+ "label": "Text Field",
7
+ "applyMaskOn": "change",
8
+ "tableView": true,
9
+ "key": "textField",
10
+ "type": "textfield",
11
+ "input": true,
12
+ "defaultValue": "test"
13
+ },
14
+ {
15
+ "label": "Number",
16
+ "applyMaskOn": "change",
17
+ "mask": false,
18
+ "tableView": false,
19
+ "delimiter": false,
20
+ "requireDecimal": false,
21
+ "inputFormat": "plain",
22
+ "truncateMultipleSpaces": false,
23
+ "key": "number",
24
+ "type": "number",
25
+ "input": true,
26
+ "defaultValue": 123
27
+ },
28
+ {
29
+ "label": "Select",
30
+ "widget": "choicesjs",
31
+ "tableView": true,
32
+ "data": {
33
+ "values": [
34
+ {
35
+ "label": "a",
36
+ "value": "a"
37
+ },
38
+ {
39
+ "label": "b",
40
+ "value": "b"
41
+ }
42
+ ]
43
+ },
44
+ "key": "select",
45
+ "type": "select",
46
+ "input": true,
47
+ "defaultValue": "a"
48
+ },
49
+ {
50
+ "label": "Reset",
51
+ "action": "reset",
52
+ "showValidations": false,
53
+ "tableView": false,
54
+ "key": "reset",
55
+ "type": "button",
56
+ "input": true
57
+ },
58
+ ]
59
+ };
@@ -3,4 +3,5 @@ import comp2 from './comp2';
3
3
  import comp3 from './comp3';
4
4
  import comp4 from './comp4';
5
5
  import comp5 from './comp5';
6
- export { comp1, comp2, comp3, comp4, comp5 };
6
+ import comp6 from './comp6';
7
+ export { comp1, comp2, comp3, comp4, comp5, comp6 };
@@ -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.comp5 = exports.comp4 = exports.comp3 = exports.comp2 = exports.comp1 = void 0;
6
+ 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"));
@@ -14,3 +14,5 @@ const comp4_1 = __importDefault(require("./comp4"));
14
14
  exports.comp4 = comp4_1.default;
15
15
  const comp5_1 = __importDefault(require("./comp5"));
16
16
  exports.comp5 = comp5_1.default;
17
+ const comp6_1 = __importDefault(require("./comp6"));
18
+ exports.comp6 = comp6_1.default;
@@ -151,13 +151,15 @@ class Input extends Multivalue_1.default {
151
151
  else {
152
152
  this.addClass(element, 'text-danger');
153
153
  }
154
- this.setContent(element, this.t(`{{ remaining }} ${type} remaining.`, {
155
- remaining: remaining
154
+ this.setContent(element, this.t(`typeRemaining`, {
155
+ remaining: remaining,
156
+ type: type
156
157
  }));
157
158
  }
158
159
  else {
159
- this.setContent(element, this.t(`{{ count }} ${type}`, {
160
- count: count
160
+ this.setContent(element, this.t(`typeCount`, {
161
+ count: count,
162
+ type: type
161
163
  }));
162
164
  }
163
165
  }
@@ -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;
@@ -200,7 +200,8 @@ class RadioComponent extends ListComponent_1.default {
200
200
  if (this.viewOnly || !this.refs.input || !this.refs.input.length) {
201
201
  return this.dataValue;
202
202
  }
203
- let value = this.dataValue;
203
+ // If the input type of the component is checkbox the value should be determined by the checkboxes checked property
204
+ let value = this.component.inputType === 'checkbox' ? '' : this.dataValue;
204
205
  this.refs.input.forEach((input, index) => {
205
206
  if (input.checked) {
206
207
  value = (this.isSelectURL && lodash_1.default.isObject(this.loadedOptions[index].value)) ?
@@ -322,7 +323,7 @@ class RadioComponent extends ListComponent_1.default {
322
323
  const value = this.dataValue;
323
324
  this.refs.wrapper.forEach((wrapper, index) => {
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] || 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);
@@ -9,47 +9,9 @@ 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
- };
31
12
  };
32
13
  static get conditionOperatorsSettings(): {
33
14
  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
- };
53
15
  };
54
16
  static savedValueTypes(schema: any): any[];
55
17
  templateData: {} | undefined;
@@ -63,7 +63,6 @@ class SelectComponent extends ListComponent_1.default {
63
63
  return SelectComponent.conditionOperatorsSettings;
64
64
  }
65
65
  static get conditionOperatorsSettings() {
66
- const numberType = () => ({ type: 'number' });
67
66
  return Object.assign(Object.assign({}, super.conditionOperatorsSettings), { valueComponent(classComp) {
68
67
  const valueComp = Object.assign(Object.assign({}, classComp), { type: 'select' });
69
68
  if ((0, utils_1.isSelectResourceWithObjectValue)(classComp)) {
@@ -78,15 +77,6 @@ class SelectComponent extends ListComponent_1.default {
78
77
  `;
79
78
  }
80
79
  return valueComp;
81
- }, dataTypeOperators: {
82
- number: ['lessThan', 'greaterThan', 'lessThanOrEqual', 'greaterThanOrEqual'],
83
- }, dataTypeValueComponents: {
84
- number: {
85
- lessThan: numberType,
86
- greaterThan: numberType,
87
- lessThanOrEqual: numberType,
88
- greaterThanOrEqual: numberType,
89
- },
90
80
  } });
91
81
  }
92
82
  static savedValueTypes(schema) {
@@ -21,6 +21,5 @@ import comp21 from './comp21';
21
21
  import comp22 from './comp22';
22
22
  import comp23 from './comp23';
23
23
  import comp24 from './comp24';
24
- import comp25 from './comp25';
25
- 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 };
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 };
26
25
  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.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;
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;
7
7
  const comp1_1 = __importDefault(require("./comp1"));
8
8
  exports.comp1 = comp1_1.default;
9
9
  const comp2_1 = __importDefault(require("./comp2"));
@@ -53,5 +53,3 @@ 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;
@@ -72,5 +72,7 @@ declare namespace _default {
72
72
  let reCaptchaTokenValidationError: string;
73
73
  let reCaptchaTokenNotSpecifiedError: string;
74
74
  let apiKey: string;
75
+ let typeRemaining: string;
76
+ let typeCount: string;
75
77
  }
76
78
  export default _default;
@@ -73,5 +73,7 @@ exports.default = {
73
73
  submitButtonAriaLabel: 'Submit Form button. Click to submit the form',
74
74
  reCaptchaTokenValidationError: 'ReCAPTCHA: Token validation error',
75
75
  reCaptchaTokenNotSpecifiedError: 'ReCAPTCHA: Token is not specified in submission',
76
- apiKey: 'API Key is not unique: {{key}}'
76
+ apiKey: 'API Key is not unique: {{key}}',
77
+ typeRemaining: '{{ remaining }} {{ type }} remaining.',
78
+ typeCount: '{{ count }} {{ type }}'
77
79
  };
@@ -24,7 +24,7 @@ declare class ChoicesWrapper extends Choices {
24
24
  _onEnterKey(args: any): void;
25
25
  _onDirectionKey(...args: any[]): void;
26
26
  timeout: NodeJS.Timeout | undefined;
27
- _selectHighlightedChoice(activeItems: any): void;
27
+ _selectHighlightedChoice(): void;
28
28
  _onKeyDown(event: any): void;
29
29
  onSelectValue({ event, activeItems, hasActiveDropdown }: {
30
30
  event: any;
@@ -105,10 +105,21 @@ class ChoicesWrapper extends choices_js_1.default {
105
105
  this._selectHighlightedChoice(activeItems);
106
106
  }
107
107
  }
108
- _selectHighlightedChoice(activeItems) {
108
+ _selectHighlightedChoice() {
109
109
  const highlightedChoice = this.dropdown.getChild(`.${this.config.classNames.highlightedState}`);
110
110
  if (highlightedChoice) {
111
- this._handleChoiceAction(activeItems, highlightedChoice);
111
+ const id = highlightedChoice.dataset.id;
112
+ const choice = id && this._store.getChoiceById(id);
113
+ this._addItem({
114
+ value: choice.value,
115
+ label: choice.label,
116
+ choiceId: choice.id,
117
+ groupId: choice.groupId,
118
+ customProperties: choice.customProperties,
119
+ placeholder: choice.placeholder,
120
+ keyCode: choice.keyCode
121
+ });
122
+ this._triggerChange(choice.value);
112
123
  }
113
124
  event.preventDefault();
114
125
  }
@@ -2634,7 +2634,7 @@ export default class Component extends Element {
2634
2634
  */
2635
2635
  resetValue() {
2636
2636
  this.unset();
2637
- this.setValue(this.emptyValue, {
2637
+ this.setValue(this.defaultValue || this.emptyValue, {
2638
2638
  noUpdateEvent: true,
2639
2639
  noValidate: true,
2640
2640
  resetValue: true
@@ -0,0 +1,77 @@
1
+ declare namespace _default {
2
+ let components: ({
3
+ label: string;
4
+ applyMaskOn: string;
5
+ tableView: boolean;
6
+ key: string;
7
+ type: string;
8
+ input: boolean;
9
+ defaultValue: string;
10
+ mask?: undefined;
11
+ delimiter?: undefined;
12
+ requireDecimal?: undefined;
13
+ inputFormat?: undefined;
14
+ truncateMultipleSpaces?: undefined;
15
+ widget?: undefined;
16
+ data?: undefined;
17
+ action?: undefined;
18
+ showValidations?: undefined;
19
+ } | {
20
+ label: string;
21
+ applyMaskOn: string;
22
+ mask: boolean;
23
+ tableView: boolean;
24
+ delimiter: boolean;
25
+ requireDecimal: boolean;
26
+ inputFormat: string;
27
+ truncateMultipleSpaces: boolean;
28
+ key: string;
29
+ type: string;
30
+ input: boolean;
31
+ defaultValue: number;
32
+ widget?: undefined;
33
+ data?: undefined;
34
+ action?: undefined;
35
+ showValidations?: undefined;
36
+ } | {
37
+ label: string;
38
+ widget: string;
39
+ tableView: boolean;
40
+ data: {
41
+ values: {
42
+ label: string;
43
+ value: string;
44
+ }[];
45
+ };
46
+ key: string;
47
+ type: string;
48
+ input: boolean;
49
+ defaultValue: string;
50
+ applyMaskOn?: undefined;
51
+ mask?: undefined;
52
+ delimiter?: undefined;
53
+ requireDecimal?: undefined;
54
+ inputFormat?: undefined;
55
+ truncateMultipleSpaces?: undefined;
56
+ action?: undefined;
57
+ showValidations?: undefined;
58
+ } | {
59
+ label: string;
60
+ action: string;
61
+ showValidations: boolean;
62
+ tableView: boolean;
63
+ key: string;
64
+ type: string;
65
+ input: boolean;
66
+ applyMaskOn?: undefined;
67
+ defaultValue?: undefined;
68
+ mask?: undefined;
69
+ delimiter?: undefined;
70
+ requireDecimal?: undefined;
71
+ inputFormat?: undefined;
72
+ truncateMultipleSpaces?: undefined;
73
+ widget?: undefined;
74
+ data?: undefined;
75
+ })[];
76
+ }
77
+ export default _default;
@@ -0,0 +1,57 @@
1
+ export default {
2
+ "components": [
3
+ {
4
+ "label": "Text Field",
5
+ "applyMaskOn": "change",
6
+ "tableView": true,
7
+ "key": "textField",
8
+ "type": "textfield",
9
+ "input": true,
10
+ "defaultValue": "test"
11
+ },
12
+ {
13
+ "label": "Number",
14
+ "applyMaskOn": "change",
15
+ "mask": false,
16
+ "tableView": false,
17
+ "delimiter": false,
18
+ "requireDecimal": false,
19
+ "inputFormat": "plain",
20
+ "truncateMultipleSpaces": false,
21
+ "key": "number",
22
+ "type": "number",
23
+ "input": true,
24
+ "defaultValue": 123
25
+ },
26
+ {
27
+ "label": "Select",
28
+ "widget": "choicesjs",
29
+ "tableView": true,
30
+ "data": {
31
+ "values": [
32
+ {
33
+ "label": "a",
34
+ "value": "a"
35
+ },
36
+ {
37
+ "label": "b",
38
+ "value": "b"
39
+ }
40
+ ]
41
+ },
42
+ "key": "select",
43
+ "type": "select",
44
+ "input": true,
45
+ "defaultValue": "a"
46
+ },
47
+ {
48
+ "label": "Reset",
49
+ "action": "reset",
50
+ "showValidations": false,
51
+ "tableView": false,
52
+ "key": "reset",
53
+ "type": "button",
54
+ "input": true
55
+ },
56
+ ]
57
+ };
@@ -3,4 +3,5 @@ import comp2 from './comp2';
3
3
  import comp3 from './comp3';
4
4
  import comp4 from './comp4';
5
5
  import comp5 from './comp5';
6
- export { comp1, comp2, comp3, comp4, comp5 };
6
+ import comp6 from './comp6';
7
+ export { comp1, comp2, comp3, comp4, comp5, comp6 };
@@ -3,4 +3,5 @@ import comp2 from './comp2';
3
3
  import comp3 from './comp3';
4
4
  import comp4 from './comp4';
5
5
  import comp5 from './comp5';
6
- export { comp1, comp2, comp3, comp4, comp5 };
6
+ import comp6 from './comp6';
7
+ export { comp1, comp2, comp3, comp4, comp5, comp6 };
@@ -146,13 +146,15 @@ export default class Input extends Multivalue {
146
146
  else {
147
147
  this.addClass(element, 'text-danger');
148
148
  }
149
- this.setContent(element, this.t(`{{ remaining }} ${type} remaining.`, {
150
- remaining: remaining
149
+ this.setContent(element, this.t(`typeRemaining`, {
150
+ remaining: remaining,
151
+ type: type
151
152
  }));
152
153
  }
153
154
  else {
154
- this.setContent(element, this.t(`{{ count }} ${type}`, {
155
- count: count
155
+ this.setContent(element, this.t(`typeCount`, {
156
+ count: count,
157
+ type: type
156
158
  }));
157
159
  }
158
160
  }