@dmptool/types 2.0.0 → 2.1.0

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 (68) hide show
  1. package/dist/dmp/__tests__/commonStandard.spec.d.ts +1 -0
  2. package/dist/dmp/__tests__/commonStandard.spec.js +210 -0
  3. package/dist/dmp/__tests__/extensions.spec.d.ts +1 -0
  4. package/dist/dmp/__tests__/extensions.spec.js +99 -0
  5. package/dist/dmp/extension.d.ts +1006 -0
  6. package/dist/dmp/extension.js +234 -0
  7. package/dist/dmp/index.d.ts +9 -0
  8. package/dist/dmp/index.js +23 -0
  9. package/dist/index.d.ts +1 -0
  10. package/dist/index.js +1 -0
  11. package/dist/questions/index.d.ts +2 -22
  12. package/dist/questions/tableQuestions.d.ts +323 -25
  13. package/dist/questions/tableQuestions.js +3 -2
  14. package/dist/schemas/affiliationSearchAnswer.schema.json +47 -0
  15. package/dist/schemas/affiliationSearchQuestion.schema.json +142 -0
  16. package/dist/schemas/anyAnswer.schema.json +1426 -0
  17. package/dist/schemas/anyQuestion.schema.json +4744 -0
  18. package/dist/schemas/anyTableColumnAnswer.schema.json +687 -0
  19. package/dist/schemas/anyTableColumnQuestion.schema.json +1527 -0
  20. package/dist/schemas/booleanAnswer.schema.json +33 -0
  21. package/dist/schemas/booleanQuestion.schema.json +52 -0
  22. package/dist/schemas/checkboxesAnswer.schema.json +38 -0
  23. package/dist/schemas/checkboxesQuestion.schema.json +77 -0
  24. package/dist/schemas/currencyAnswer.schema.json +33 -0
  25. package/dist/schemas/currencyQuestion.schema.json +70 -0
  26. package/dist/schemas/dateAnswer.schema.json +33 -0
  27. package/dist/schemas/datePickerAnswer.schema.json +37 -0
  28. package/dist/schemas/datePickerQuestion.schema.json +52 -0
  29. package/dist/schemas/dateQuestion.schema.json +63 -0
  30. package/dist/schemas/dateRangeAnswer.schema.json +47 -0
  31. package/dist/schemas/dateRangeQuestion.schema.json +121 -0
  32. package/dist/schemas/dmp.schema.json +2070 -0
  33. package/dist/schemas/dmpExtension.schema.json +1874 -0
  34. package/dist/schemas/emailAnswer.schema.json +33 -0
  35. package/dist/schemas/emailQuestion.schema.json +68 -0
  36. package/dist/schemas/filteredSearchAnswer.schema.json +40 -0
  37. package/dist/schemas/filteredSearchQuestion.schema.json +130 -0
  38. package/dist/schemas/licenseSearchAnswer.schema.json +51 -0
  39. package/dist/schemas/licenseSearchQuestion.schema.json +140 -0
  40. package/dist/schemas/metadataStandardSearchAnswer.schema.json +51 -0
  41. package/dist/schemas/metadataStandardSearchQuestion.schema.json +141 -0
  42. package/dist/schemas/multiselectBoxAnswer.schema.json +38 -0
  43. package/dist/schemas/multiselectBoxQuestion.schema.json +84 -0
  44. package/dist/schemas/numberAnswer.schema.json +33 -0
  45. package/dist/schemas/numberQuestion.schema.json +65 -0
  46. package/dist/schemas/numberRangeAnswer.schema.json +47 -0
  47. package/dist/schemas/numberRangeQuestion.schema.json +125 -0
  48. package/dist/schemas/numberWithContextAnswer.schema.json +47 -0
  49. package/dist/schemas/numberWithContextQuestion.schema.json +95 -0
  50. package/dist/schemas/radioButtonsAnswer.schema.json +33 -0
  51. package/dist/schemas/radioButtonsQuestion.schema.json +77 -0
  52. package/dist/schemas/repositorySearchAnswer.schema.json +51 -0
  53. package/dist/schemas/repositorySearchQuestion.schema.json +140 -0
  54. package/dist/schemas/researchOutputTableAnswer.schema.json +16730 -0
  55. package/dist/schemas/researchOutputTableQuestion.schema.json +140 -0
  56. package/dist/schemas/selectBoxAnswer.schema.json +33 -0
  57. package/dist/schemas/selectBoxQuestion.schema.json +84 -0
  58. package/dist/schemas/tableAnswer.schema.json +740 -0
  59. package/dist/schemas/tableQuestion.schema.json +1629 -0
  60. package/dist/schemas/textAnswer.schema.json +33 -0
  61. package/dist/schemas/textAreaAnswer.schema.json +33 -0
  62. package/dist/schemas/textAreaQuestion.schema.json +78 -0
  63. package/dist/schemas/textQuestion.schema.json +63 -0
  64. package/dist/schemas/typeaheadSearchAnswer.schema.json +37 -0
  65. package/dist/schemas/typeaheadSearchQuestion.schema.json +120 -0
  66. package/dist/schemas/urlAnswer.schema.json +33 -0
  67. package/dist/schemas/urlQuestion.schema.json +63 -0
  68. package/package.json +5 -2
@@ -0,0 +1,84 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "type": {
6
+ "type": "string",
7
+ "const": "multiselectBox"
8
+ },
9
+ "attributes": {
10
+ "type": "object",
11
+ "properties": {
12
+ "label": {
13
+ "type": "string"
14
+ },
15
+ "help": {
16
+ "type": "string"
17
+ },
18
+ "labelTranslationKey": {
19
+ "type": "string"
20
+ },
21
+ "multiple": {
22
+ "type": "boolean",
23
+ "const": true
24
+ }
25
+ },
26
+ "required": [
27
+ "multiple"
28
+ ],
29
+ "additionalProperties": false
30
+ },
31
+ "meta": {
32
+ "type": "object",
33
+ "properties": {
34
+ "schemaVersion": {
35
+ "default": "1.0",
36
+ "type": "string"
37
+ },
38
+ "title": {
39
+ "type": "string"
40
+ },
41
+ "usageDescription": {
42
+ "type": "string"
43
+ }
44
+ },
45
+ "required": [
46
+ "schemaVersion"
47
+ ],
48
+ "additionalProperties": false
49
+ },
50
+ "options": {
51
+ "type": "array",
52
+ "items": {
53
+ "type": "object",
54
+ "properties": {
55
+ "label": {
56
+ "default": "Option A",
57
+ "type": "string"
58
+ },
59
+ "value": {
60
+ "default": "a",
61
+ "type": "string"
62
+ },
63
+ "selected": {
64
+ "default": false,
65
+ "type": "boolean"
66
+ }
67
+ },
68
+ "required": [
69
+ "label",
70
+ "value",
71
+ "selected"
72
+ ],
73
+ "additionalProperties": false
74
+ }
75
+ }
76
+ },
77
+ "required": [
78
+ "type",
79
+ "attributes",
80
+ "meta",
81
+ "options"
82
+ ],
83
+ "additionalProperties": false
84
+ }
@@ -0,0 +1,33 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "type": {
6
+ "type": "string",
7
+ "const": "number"
8
+ },
9
+ "meta": {
10
+ "type": "object",
11
+ "properties": {
12
+ "schemaVersion": {
13
+ "default": "1.0",
14
+ "type": "string"
15
+ }
16
+ },
17
+ "required": [
18
+ "schemaVersion"
19
+ ],
20
+ "additionalProperties": false
21
+ },
22
+ "answer": {
23
+ "default": 0,
24
+ "type": "number"
25
+ }
26
+ },
27
+ "required": [
28
+ "type",
29
+ "meta",
30
+ "answer"
31
+ ],
32
+ "additionalProperties": false
33
+ }
@@ -0,0 +1,65 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "type": {
6
+ "type": "string",
7
+ "const": "number"
8
+ },
9
+ "attributes": {
10
+ "type": "object",
11
+ "properties": {
12
+ "label": {
13
+ "type": "string"
14
+ },
15
+ "help": {
16
+ "type": "string"
17
+ },
18
+ "labelTranslationKey": {
19
+ "type": "string"
20
+ },
21
+ "max": {
22
+ "type": "number"
23
+ },
24
+ "min": {
25
+ "default": 0,
26
+ "type": "number"
27
+ },
28
+ "step": {
29
+ "default": 1,
30
+ "type": "number"
31
+ }
32
+ },
33
+ "required": [
34
+ "min",
35
+ "step"
36
+ ],
37
+ "additionalProperties": false
38
+ },
39
+ "meta": {
40
+ "type": "object",
41
+ "properties": {
42
+ "schemaVersion": {
43
+ "default": "1.0",
44
+ "type": "string"
45
+ },
46
+ "title": {
47
+ "type": "string"
48
+ },
49
+ "usageDescription": {
50
+ "type": "string"
51
+ }
52
+ },
53
+ "required": [
54
+ "schemaVersion"
55
+ ],
56
+ "additionalProperties": false
57
+ }
58
+ },
59
+ "required": [
60
+ "type",
61
+ "attributes",
62
+ "meta"
63
+ ],
64
+ "additionalProperties": false
65
+ }
@@ -0,0 +1,47 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "type": {
6
+ "type": "string",
7
+ "const": "numberRange"
8
+ },
9
+ "meta": {
10
+ "type": "object",
11
+ "properties": {
12
+ "schemaVersion": {
13
+ "default": "1.0",
14
+ "type": "string"
15
+ }
16
+ },
17
+ "required": [
18
+ "schemaVersion"
19
+ ],
20
+ "additionalProperties": false
21
+ },
22
+ "answer": {
23
+ "type": "object",
24
+ "properties": {
25
+ "start": {
26
+ "default": 0,
27
+ "type": "number"
28
+ },
29
+ "end": {
30
+ "default": 0,
31
+ "type": "number"
32
+ }
33
+ },
34
+ "required": [
35
+ "start",
36
+ "end"
37
+ ],
38
+ "additionalProperties": false
39
+ }
40
+ },
41
+ "required": [
42
+ "type",
43
+ "meta",
44
+ "answer"
45
+ ],
46
+ "additionalProperties": false
47
+ }
@@ -0,0 +1,125 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "type": {
6
+ "type": "string",
7
+ "const": "numberRange"
8
+ },
9
+ "attributes": {
10
+ "type": "object",
11
+ "properties": {
12
+ "label": {
13
+ "type": "string"
14
+ },
15
+ "help": {
16
+ "type": "string"
17
+ },
18
+ "labelTranslationKey": {
19
+ "type": "string"
20
+ }
21
+ },
22
+ "additionalProperties": false
23
+ },
24
+ "meta": {
25
+ "type": "object",
26
+ "properties": {
27
+ "schemaVersion": {
28
+ "default": "1.0",
29
+ "type": "string"
30
+ },
31
+ "title": {
32
+ "type": "string"
33
+ },
34
+ "usageDescription": {
35
+ "type": "string"
36
+ }
37
+ },
38
+ "required": [
39
+ "schemaVersion"
40
+ ],
41
+ "additionalProperties": false
42
+ },
43
+ "columns": {
44
+ "type": "object",
45
+ "properties": {
46
+ "start": {
47
+ "type": "object",
48
+ "properties": {
49
+ "label": {
50
+ "default": "From",
51
+ "type": "string"
52
+ },
53
+ "help": {
54
+ "type": "string"
55
+ },
56
+ "labelTranslationKey": {
57
+ "type": "string"
58
+ },
59
+ "max": {
60
+ "type": "number"
61
+ },
62
+ "min": {
63
+ "default": 0,
64
+ "type": "number"
65
+ },
66
+ "step": {
67
+ "default": 1,
68
+ "type": "number"
69
+ }
70
+ },
71
+ "required": [
72
+ "label",
73
+ "min",
74
+ "step"
75
+ ],
76
+ "additionalProperties": false
77
+ },
78
+ "end": {
79
+ "type": "object",
80
+ "properties": {
81
+ "label": {
82
+ "default": "To",
83
+ "type": "string"
84
+ },
85
+ "help": {
86
+ "type": "string"
87
+ },
88
+ "labelTranslationKey": {
89
+ "type": "string"
90
+ },
91
+ "max": {
92
+ "type": "number"
93
+ },
94
+ "min": {
95
+ "default": 0,
96
+ "type": "number"
97
+ },
98
+ "step": {
99
+ "default": 1,
100
+ "type": "number"
101
+ }
102
+ },
103
+ "required": [
104
+ "label",
105
+ "min",
106
+ "step"
107
+ ],
108
+ "additionalProperties": false
109
+ }
110
+ },
111
+ "required": [
112
+ "start",
113
+ "end"
114
+ ],
115
+ "additionalProperties": false
116
+ }
117
+ },
118
+ "required": [
119
+ "type",
120
+ "attributes",
121
+ "meta",
122
+ "columns"
123
+ ],
124
+ "additionalProperties": false
125
+ }
@@ -0,0 +1,47 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "type": {
6
+ "type": "string",
7
+ "const": "numberWithContext"
8
+ },
9
+ "meta": {
10
+ "type": "object",
11
+ "properties": {
12
+ "schemaVersion": {
13
+ "default": "1.0",
14
+ "type": "string"
15
+ }
16
+ },
17
+ "required": [
18
+ "schemaVersion"
19
+ ],
20
+ "additionalProperties": false
21
+ },
22
+ "answer": {
23
+ "type": "object",
24
+ "properties": {
25
+ "value": {
26
+ "default": 0,
27
+ "type": "number"
28
+ },
29
+ "context": {
30
+ "default": "",
31
+ "type": "string"
32
+ }
33
+ },
34
+ "required": [
35
+ "value",
36
+ "context"
37
+ ],
38
+ "additionalProperties": false
39
+ }
40
+ },
41
+ "required": [
42
+ "type",
43
+ "meta",
44
+ "answer"
45
+ ],
46
+ "additionalProperties": false
47
+ }
@@ -0,0 +1,95 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "type": {
6
+ "type": "string",
7
+ "const": "numberWithContext"
8
+ },
9
+ "attributes": {
10
+ "type": "object",
11
+ "properties": {
12
+ "label": {
13
+ "type": "string"
14
+ },
15
+ "help": {
16
+ "type": "string"
17
+ },
18
+ "labelTranslationKey": {
19
+ "type": "string"
20
+ },
21
+ "max": {
22
+ "type": "number"
23
+ },
24
+ "min": {
25
+ "default": 0,
26
+ "type": "number"
27
+ },
28
+ "step": {
29
+ "default": 1,
30
+ "type": "number"
31
+ },
32
+ "context": {
33
+ "type": "array",
34
+ "items": {
35
+ "type": "object",
36
+ "properties": {
37
+ "label": {
38
+ "default": "",
39
+ "type": "string"
40
+ },
41
+ "labelTranslationKey": {
42
+ "type": "string"
43
+ },
44
+ "value": {
45
+ "default": "",
46
+ "type": "string"
47
+ },
48
+ "selected": {
49
+ "default": false,
50
+ "type": "boolean"
51
+ }
52
+ },
53
+ "required": [
54
+ "label",
55
+ "value",
56
+ "selected"
57
+ ],
58
+ "additionalProperties": false
59
+ }
60
+ }
61
+ },
62
+ "required": [
63
+ "min",
64
+ "step",
65
+ "context"
66
+ ],
67
+ "additionalProperties": false
68
+ },
69
+ "meta": {
70
+ "type": "object",
71
+ "properties": {
72
+ "schemaVersion": {
73
+ "default": "1.0",
74
+ "type": "string"
75
+ },
76
+ "title": {
77
+ "type": "string"
78
+ },
79
+ "usageDescription": {
80
+ "type": "string"
81
+ }
82
+ },
83
+ "required": [
84
+ "schemaVersion"
85
+ ],
86
+ "additionalProperties": false
87
+ }
88
+ },
89
+ "required": [
90
+ "type",
91
+ "attributes",
92
+ "meta"
93
+ ],
94
+ "additionalProperties": false
95
+ }
@@ -0,0 +1,33 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "type": {
6
+ "type": "string",
7
+ "const": "radioButtons"
8
+ },
9
+ "meta": {
10
+ "type": "object",
11
+ "properties": {
12
+ "schemaVersion": {
13
+ "default": "1.0",
14
+ "type": "string"
15
+ }
16
+ },
17
+ "required": [
18
+ "schemaVersion"
19
+ ],
20
+ "additionalProperties": false
21
+ },
22
+ "answer": {
23
+ "default": "",
24
+ "type": "string"
25
+ }
26
+ },
27
+ "required": [
28
+ "type",
29
+ "meta",
30
+ "answer"
31
+ ],
32
+ "additionalProperties": false
33
+ }
@@ -0,0 +1,77 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "type": {
6
+ "type": "string",
7
+ "const": "radioButtons"
8
+ },
9
+ "attributes": {
10
+ "type": "object",
11
+ "properties": {
12
+ "label": {
13
+ "type": "string"
14
+ },
15
+ "help": {
16
+ "type": "string"
17
+ },
18
+ "labelTranslationKey": {
19
+ "type": "string"
20
+ }
21
+ },
22
+ "additionalProperties": false
23
+ },
24
+ "meta": {
25
+ "type": "object",
26
+ "properties": {
27
+ "schemaVersion": {
28
+ "default": "1.0",
29
+ "type": "string"
30
+ },
31
+ "title": {
32
+ "type": "string"
33
+ },
34
+ "usageDescription": {
35
+ "type": "string"
36
+ }
37
+ },
38
+ "required": [
39
+ "schemaVersion"
40
+ ],
41
+ "additionalProperties": false
42
+ },
43
+ "options": {
44
+ "type": "array",
45
+ "items": {
46
+ "type": "object",
47
+ "properties": {
48
+ "label": {
49
+ "default": "Option A",
50
+ "type": "string"
51
+ },
52
+ "value": {
53
+ "default": "a",
54
+ "type": "string"
55
+ },
56
+ "selected": {
57
+ "default": false,
58
+ "type": "boolean"
59
+ }
60
+ },
61
+ "required": [
62
+ "label",
63
+ "value",
64
+ "selected"
65
+ ],
66
+ "additionalProperties": false
67
+ }
68
+ }
69
+ },
70
+ "required": [
71
+ "type",
72
+ "attributes",
73
+ "meta",
74
+ "options"
75
+ ],
76
+ "additionalProperties": false
77
+ }
@@ -0,0 +1,51 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "type": {
6
+ "type": "string",
7
+ "const": "repositorySearch"
8
+ },
9
+ "meta": {
10
+ "type": "object",
11
+ "properties": {
12
+ "schemaVersion": {
13
+ "default": "1.0",
14
+ "type": "string"
15
+ }
16
+ },
17
+ "required": [
18
+ "schemaVersion"
19
+ ],
20
+ "additionalProperties": false
21
+ },
22
+ "answer": {
23
+ "default": [],
24
+ "type": "array",
25
+ "items": {
26
+ "type": "object",
27
+ "properties": {
28
+ "repositoryId": {
29
+ "default": "",
30
+ "type": "string"
31
+ },
32
+ "repositoryName": {
33
+ "default": "",
34
+ "type": "string"
35
+ }
36
+ },
37
+ "required": [
38
+ "repositoryId",
39
+ "repositoryName"
40
+ ],
41
+ "additionalProperties": false
42
+ }
43
+ }
44
+ },
45
+ "required": [
46
+ "type",
47
+ "meta",
48
+ "answer"
49
+ ],
50
+ "additionalProperties": false
51
+ }