@formio/js 5.0.0-rc.77 → 5.0.0-rc.78

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.
@@ -10,7 +10,7 @@
10
10
  * MIT licensed
11
11
  */
12
12
 
13
- /*! formiojs v5.0.0-rc.77 | https://unpkg.com/formiojs@5.0.0-rc.77/LICENSE.txt */
13
+ /*! formiojs v5.0.0-rc.78 | https://unpkg.com/formiojs@5.0.0-rc.78/LICENSE.txt */
14
14
 
15
15
  /**
16
16
  * @license
@@ -20,7 +20,7 @@
20
20
 
21
21
  /*! @license DOMPurify 3.1.5 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.1.5/LICENSE */
22
22
 
23
- /*! formiojs v5.0.0-rc.77 | https://unpkg.com/formiojs@5.0.0-rc.77/LICENSE.txt */
23
+ /*! formiojs v5.0.0-rc.78 | https://unpkg.com/formiojs@5.0.0-rc.78/LICENSE.txt */
24
24
 
25
25
  /**
26
26
  * @license
@@ -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;
@@ -63,6 +63,7 @@ class SelectComponent extends ListComponent_1.default {
63
63
  return SelectComponent.conditionOperatorsSettings;
64
64
  }
65
65
  static get conditionOperatorsSettings() {
66
+ const numberType = () => ({ type: 'number' });
66
67
  return Object.assign(Object.assign({}, super.conditionOperatorsSettings), { valueComponent(classComp) {
67
68
  const valueComp = Object.assign(Object.assign({}, classComp), { type: 'select' });
68
69
  if ((0, utils_1.isSelectResourceWithObjectValue)(classComp)) {
@@ -77,6 +78,15 @@ class SelectComponent extends ListComponent_1.default {
77
78
  `;
78
79
  }
79
80
  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
+ },
80
90
  } });
81
91
  }
82
92
  static savedValueTypes(schema) {
@@ -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,6 @@ 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
+ 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 };
25
26
  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.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,5 @@ 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;
@@ -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;
@@ -58,6 +58,7 @@ export default class SelectComponent extends ListComponent {
58
58
  return SelectComponent.conditionOperatorsSettings;
59
59
  }
60
60
  static get conditionOperatorsSettings() {
61
+ const numberType = () => ({ type: 'number' });
61
62
  return {
62
63
  ...super.conditionOperatorsSettings,
63
64
  valueComponent(classComp) {
@@ -74,7 +75,18 @@ export default class SelectComponent extends ListComponent {
74
75
  `;
75
76
  }
76
77
  return valueComp;
77
- }
78
+ },
79
+ dataTypeOperators: {
80
+ number: ['lessThan', 'greaterThan', 'lessThanOrEqual', 'greaterThanOrEqual'],
81
+ },
82
+ dataTypeValueComponents: {
83
+ number: {
84
+ lessThan: numberType,
85
+ greaterThan: numberType,
86
+ lessThanOrEqual: numberType,
87
+ greaterThanOrEqual: numberType,
88
+ },
89
+ },
78
90
  };
79
91
  }
80
92
  static savedValueTypes(schema) {
@@ -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,57 @@
1
+ export default {
2
+ title: 'FIO-8072',
3
+ name: 'fio8072',
4
+ path: 'fio8072',
5
+ type: 'form',
6
+ display: 'form',
7
+ components: [
8
+ {
9
+ label: 'Select',
10
+ widget: 'choicesjs',
11
+ tableView: true,
12
+ data: {
13
+ values: [
14
+ {
15
+ label: 'A',
16
+ value: '1',
17
+ },
18
+ {
19
+ label: 'B',
20
+ value: '2',
21
+ },
22
+ {
23
+ label: 'C',
24
+ value: '10',
25
+ },
26
+ {
27
+ label: 'D',
28
+ value: '1d',
29
+ },
30
+ ],
31
+ },
32
+ dataType: 'number',
33
+ key: 'select',
34
+ type: 'select',
35
+ input: true,
36
+ },
37
+ {
38
+ label: 'Text Field',
39
+ applyMaskOn: 'change',
40
+ tableView: true,
41
+ key: 'textField',
42
+ type: 'textfield',
43
+ input: true,
44
+ conditional: {
45
+ show: true,
46
+ conjunction: 'all',
47
+ conditions: [
48
+ {
49
+ component: 'select',
50
+ operator: 'lessThan',
51
+ value: 5,
52
+ },
53
+ ],
54
+ },
55
+ },
56
+ ],
57
+ };
@@ -21,5 +21,6 @@ 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
+ 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 };
25
26
  export { multiSelect, multiSelectOptions } from "./comp3";
@@ -22,4 +22,5 @@ import comp21 from './comp21';
22
22
  import comp22 from './comp22';
23
23
  import comp23 from './comp23';
24
24
  import comp24 from './comp24';
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 };
25
+ import comp25 from './comp25';
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 };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@formio/js",
3
- "version": "5.0.0-rc.77",
3
+ "version": "5.0.0-rc.78",
4
4
  "description": "JavaScript powered Forms with JSON Form Builder",
5
5
  "main": "lib/cjs/index.js",
6
6
  "exports": {