@dmptool/types 1.2.6 → 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.
- package/README.md +1 -1
- package/dist/answers/__tests__/defaults.spec.js +216 -0
- package/dist/answers/answer.d.ts +29 -14
- package/dist/answers/answer.js +11 -5
- package/dist/answers/dateAnswers.d.ts +20 -47
- package/dist/answers/dateAnswers.js +20 -10
- package/dist/answers/graphQLAnswers.d.ts +48 -120
- package/dist/answers/graphQLAnswers.js +46 -21
- package/dist/answers/index.d.ts +155 -1439
- package/dist/answers/index.js +26 -1
- package/dist/answers/numberAnswers.d.ts +38 -92
- package/dist/answers/numberAnswers.js +38 -19
- package/dist/answers/optionBasedAnswers.d.ts +42 -87
- package/dist/answers/optionBasedAnswers.js +37 -21
- package/dist/answers/tableAnswers.d.ts +348 -3032
- package/dist/answers/tableAnswers.js +25 -61
- package/dist/answers/textAnswers.d.ts +32 -68
- package/dist/answers/textAnswers.js +30 -17
- package/dist/dmp/__tests__/commonStandard.spec.d.ts +1 -0
- package/dist/dmp/__tests__/commonStandard.spec.js +210 -0
- package/dist/dmp/__tests__/extensions.spec.d.ts +1 -0
- package/dist/dmp/__tests__/extensions.spec.js +99 -0
- package/dist/dmp/extension.d.ts +1006 -0
- package/dist/dmp/extension.js +234 -0
- package/dist/dmp/index.d.ts +9 -0
- package/dist/dmp/index.js +23 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/questions/__tests__/dateQuestions.spec.js +3 -0
- package/dist/questions/__tests__/defaults.spec.d.ts +1 -0
- package/dist/questions/__tests__/defaults.spec.js +668 -0
- package/dist/questions/__tests__/optionBasedQuestions.spec.js +3 -2
- package/dist/questions/__tests__/tableQuestion.spec.js +22 -23
- package/dist/questions/__tests__/textQuestions.spec.js +32 -0
- package/dist/questions/dateQuestions.d.ts +45 -191
- package/dist/questions/dateQuestions.js +26 -23
- package/dist/questions/graphQLQuestions.d.ts +262 -556
- package/dist/questions/graphQLQuestions.js +225 -223
- package/dist/questions/index.d.ts +670 -7441
- package/dist/questions/index.js +26 -1
- package/dist/questions/numberQuestions.d.ts +85 -331
- package/dist/questions/numberQuestions.js +50 -36
- package/dist/questions/optionBasedQuestions.d.ts +83 -290
- package/dist/questions/optionBasedQuestions.js +58 -41
- package/dist/questions/question.d.ts +72 -35
- package/dist/questions/question.js +14 -5
- package/dist/questions/tableQuestions.d.ts +2228 -9599
- package/dist/questions/tableQuestions.js +185 -192
- package/dist/questions/textQuestions.d.ts +70 -226
- package/dist/questions/textQuestions.js +31 -31
- package/dist/schemas/affiliationSearchAnswer.schema.json +35 -33
- package/dist/schemas/affiliationSearchQuestion.schema.json +124 -122
- package/dist/schemas/anyAnswer.schema.json +1229 -408
- package/dist/schemas/anyQuestion.schema.json +4312 -2023
- package/dist/schemas/anyTableColumnAnswer.schema.json +535 -314
- package/dist/schemas/anyTableColumnQuestion.schema.json +1309 -874
- package/dist/schemas/booleanAnswer.schema.json +22 -23
- package/dist/schemas/booleanQuestion.schema.json +39 -43
- package/dist/schemas/checkboxesAnswer.schema.json +27 -28
- package/dist/schemas/checkboxesQuestion.schema.json +63 -62
- package/dist/schemas/currencyAnswer.schema.json +22 -23
- package/dist/schemas/currencyQuestion.schema.json +57 -54
- package/dist/schemas/dateAnswer.schema.json +22 -23
- package/dist/schemas/dateQuestion.schema.json +50 -49
- package/dist/schemas/dateRangeAnswer.schema.json +35 -33
- package/dist/schemas/dateRangeQuestion.schema.json +87 -78
- package/dist/schemas/dmp.schema.json +2070 -0
- package/dist/schemas/dmpExtension.schema.json +1874 -0
- package/dist/schemas/emailAnswer.schema.json +22 -23
- package/dist/schemas/emailQuestion.schema.json +55 -53
- package/dist/schemas/licenseSearchAnswer.schema.json +40 -38
- package/dist/schemas/licenseSearchQuestion.schema.json +122 -146
- package/dist/schemas/metadataStandardSearchAnswer.schema.json +40 -38
- package/dist/schemas/metadataStandardSearchQuestion.schema.json +123 -156
- package/dist/schemas/multiselectBoxAnswer.schema.json +27 -28
- package/dist/schemas/multiselectBoxQuestion.schema.json +70 -71
- package/dist/schemas/numberAnswer.schema.json +22 -23
- package/dist/schemas/numberQuestion.schema.json +52 -50
- package/dist/schemas/numberRangeAnswer.schema.json +35 -33
- package/dist/schemas/numberRangeQuestion.schema.json +91 -60
- package/dist/schemas/numberWithContextAnswer.schema.json +35 -33
- package/dist/schemas/numberWithContextQuestion.schema.json +81 -70
- package/dist/schemas/radioButtonsAnswer.schema.json +22 -23
- package/dist/schemas/radioButtonsQuestion.schema.json +63 -62
- package/dist/schemas/repositorySearchAnswer.schema.json +40 -38
- package/dist/schemas/repositorySearchQuestion.schema.json +122 -162
- package/dist/schemas/researchOutputTableAnswer.schema.json +16622 -411
- package/dist/schemas/researchOutputTableQuestion.schema.json +114 -1157
- package/dist/schemas/selectBoxAnswer.schema.json +22 -23
- package/dist/schemas/selectBoxQuestion.schema.json +70 -71
- package/dist/schemas/tableAnswer.schema.json +581 -360
- package/dist/schemas/tableQuestion.schema.json +1388 -942
- package/dist/schemas/textAnswer.schema.json +22 -23
- package/dist/schemas/textAreaAnswer.schema.json +22 -23
- package/dist/schemas/textAreaQuestion.schema.json +65 -57
- package/dist/schemas/textQuestion.schema.json +50 -49
- package/dist/schemas/urlAnswer.schema.json +22 -23
- package/dist/schemas/urlQuestion.schema.json +50 -49
- package/package.json +6 -4
- package/dist/answers/__tests__/usage.spec.js +0 -178
- package/dist/questions/__tests__/usage.spec.d.ts +0 -8
- package/dist/questions/__tests__/usage.spec.js +0 -473
- /package/dist/answers/__tests__/{usage.spec.d.ts → defaults.spec.d.ts} +0 -0
|
@@ -1,62 +1,63 @@
|
|
|
1
1
|
{
|
|
2
|
-
"$
|
|
3
|
-
"
|
|
4
|
-
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"properties": {
|
|
5
|
+
"type": {
|
|
6
|
+
"type": "string",
|
|
7
|
+
"const": "date"
|
|
8
|
+
},
|
|
9
|
+
"attributes": {
|
|
5
10
|
"type": "object",
|
|
6
11
|
"properties": {
|
|
7
|
-
"
|
|
8
|
-
"type": "string"
|
|
9
|
-
"const": "date"
|
|
12
|
+
"label": {
|
|
13
|
+
"type": "string"
|
|
10
14
|
},
|
|
11
|
-
"
|
|
12
|
-
"type": "
|
|
13
|
-
"properties": {
|
|
14
|
-
"label": {
|
|
15
|
-
"type": "string"
|
|
16
|
-
},
|
|
17
|
-
"help": {
|
|
18
|
-
"type": "string"
|
|
19
|
-
},
|
|
20
|
-
"labelTranslationKey": {
|
|
21
|
-
"type": "string"
|
|
22
|
-
},
|
|
23
|
-
"max": {
|
|
24
|
-
"type": "string"
|
|
25
|
-
},
|
|
26
|
-
"min": {
|
|
27
|
-
"type": "string"
|
|
28
|
-
},
|
|
29
|
-
"step": {
|
|
30
|
-
"type": "number",
|
|
31
|
-
"default": 1
|
|
32
|
-
}
|
|
33
|
-
},
|
|
34
|
-
"additionalProperties": false,
|
|
35
|
-
"default": {}
|
|
15
|
+
"help": {
|
|
16
|
+
"type": "string"
|
|
36
17
|
},
|
|
37
|
-
"
|
|
38
|
-
"type": "
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
18
|
+
"labelTranslationKey": {
|
|
19
|
+
"type": "string"
|
|
20
|
+
},
|
|
21
|
+
"max": {
|
|
22
|
+
"type": "string"
|
|
23
|
+
},
|
|
24
|
+
"min": {
|
|
25
|
+
"type": "string"
|
|
26
|
+
},
|
|
27
|
+
"step": {
|
|
28
|
+
"default": 1,
|
|
29
|
+
"type": "number"
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
"required": [
|
|
33
|
+
"step"
|
|
34
|
+
],
|
|
35
|
+
"additionalProperties": false
|
|
36
|
+
},
|
|
37
|
+
"meta": {
|
|
38
|
+
"type": "object",
|
|
39
|
+
"properties": {
|
|
40
|
+
"schemaVersion": {
|
|
41
|
+
"default": "1.0",
|
|
42
|
+
"type": "string"
|
|
43
|
+
},
|
|
44
|
+
"title": {
|
|
45
|
+
"type": "string"
|
|
46
|
+
},
|
|
47
|
+
"usageDescription": {
|
|
48
|
+
"type": "string"
|
|
53
49
|
}
|
|
54
50
|
},
|
|
55
51
|
"required": [
|
|
56
|
-
"
|
|
52
|
+
"schemaVersion"
|
|
57
53
|
],
|
|
58
54
|
"additionalProperties": false
|
|
59
55
|
}
|
|
60
56
|
},
|
|
61
|
-
"
|
|
57
|
+
"required": [
|
|
58
|
+
"type",
|
|
59
|
+
"attributes",
|
|
60
|
+
"meta"
|
|
61
|
+
],
|
|
62
|
+
"additionalProperties": false
|
|
62
63
|
}
|
|
@@ -1,45 +1,47 @@
|
|
|
1
1
|
{
|
|
2
|
-
"$
|
|
3
|
-
"
|
|
4
|
-
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"properties": {
|
|
5
|
+
"type": {
|
|
6
|
+
"type": "string",
|
|
7
|
+
"const": "dateRange"
|
|
8
|
+
},
|
|
9
|
+
"meta": {
|
|
5
10
|
"type": "object",
|
|
6
11
|
"properties": {
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
"
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
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": "",
|
|
27
|
+
"type": "string"
|
|
21
28
|
},
|
|
22
|
-
"
|
|
23
|
-
"
|
|
24
|
-
"
|
|
25
|
-
"start": {
|
|
26
|
-
"type": "string",
|
|
27
|
-
"default": ""
|
|
28
|
-
},
|
|
29
|
-
"end": {
|
|
30
|
-
"type": "string",
|
|
31
|
-
"default": ""
|
|
32
|
-
}
|
|
33
|
-
},
|
|
34
|
-
"additionalProperties": false,
|
|
35
|
-
"default": {}
|
|
29
|
+
"end": {
|
|
30
|
+
"default": "",
|
|
31
|
+
"type": "string"
|
|
36
32
|
}
|
|
37
33
|
},
|
|
38
34
|
"required": [
|
|
39
|
-
"
|
|
35
|
+
"start",
|
|
36
|
+
"end"
|
|
40
37
|
],
|
|
41
38
|
"additionalProperties": false
|
|
42
39
|
}
|
|
43
40
|
},
|
|
44
|
-
"
|
|
41
|
+
"required": [
|
|
42
|
+
"type",
|
|
43
|
+
"meta",
|
|
44
|
+
"answer"
|
|
45
|
+
],
|
|
46
|
+
"additionalProperties": false
|
|
45
47
|
}
|
|
@@ -1,17 +1,53 @@
|
|
|
1
1
|
{
|
|
2
|
-
"$
|
|
3
|
-
"
|
|
4
|
-
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"properties": {
|
|
5
|
+
"type": {
|
|
6
|
+
"type": "string",
|
|
7
|
+
"const": "dateRange"
|
|
8
|
+
},
|
|
9
|
+
"attributes": {
|
|
5
10
|
"type": "object",
|
|
6
11
|
"properties": {
|
|
7
|
-
"
|
|
8
|
-
"type": "string"
|
|
9
|
-
"const": "dateRange"
|
|
12
|
+
"label": {
|
|
13
|
+
"type": "string"
|
|
10
14
|
},
|
|
11
|
-
"
|
|
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": {
|
|
12
47
|
"type": "object",
|
|
13
48
|
"properties": {
|
|
14
49
|
"label": {
|
|
50
|
+
"default": "From",
|
|
15
51
|
"type": "string"
|
|
16
52
|
},
|
|
17
53
|
"help": {
|
|
@@ -19,94 +55,67 @@
|
|
|
19
55
|
},
|
|
20
56
|
"labelTranslationKey": {
|
|
21
57
|
"type": "string"
|
|
22
|
-
}
|
|
23
|
-
},
|
|
24
|
-
"additionalProperties": false,
|
|
25
|
-
"default": {}
|
|
26
|
-
},
|
|
27
|
-
"meta": {
|
|
28
|
-
"type": "object",
|
|
29
|
-
"properties": {
|
|
30
|
-
"schemaVersion": {
|
|
31
|
-
"type": "string",
|
|
32
|
-
"default": "1.0"
|
|
33
58
|
},
|
|
34
|
-
"
|
|
59
|
+
"max": {
|
|
35
60
|
"type": "string"
|
|
36
61
|
},
|
|
37
|
-
"
|
|
62
|
+
"min": {
|
|
38
63
|
"type": "string"
|
|
64
|
+
},
|
|
65
|
+
"step": {
|
|
66
|
+
"default": 1,
|
|
67
|
+
"type": "number"
|
|
39
68
|
}
|
|
40
69
|
},
|
|
41
|
-
"
|
|
42
|
-
|
|
70
|
+
"required": [
|
|
71
|
+
"label",
|
|
72
|
+
"step"
|
|
73
|
+
],
|
|
74
|
+
"additionalProperties": false
|
|
43
75
|
},
|
|
44
|
-
"
|
|
76
|
+
"end": {
|
|
45
77
|
"type": "object",
|
|
46
78
|
"properties": {
|
|
47
|
-
"
|
|
48
|
-
"
|
|
49
|
-
"
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
},
|
|
63
|
-
"min": {
|
|
64
|
-
"type": "string"
|
|
65
|
-
},
|
|
66
|
-
"step": {
|
|
67
|
-
"type": "number",
|
|
68
|
-
"default": 1
|
|
69
|
-
}
|
|
70
|
-
},
|
|
71
|
-
"additionalProperties": false,
|
|
72
|
-
"default": {}
|
|
79
|
+
"label": {
|
|
80
|
+
"default": "To",
|
|
81
|
+
"type": "string"
|
|
82
|
+
},
|
|
83
|
+
"help": {
|
|
84
|
+
"type": "string"
|
|
85
|
+
},
|
|
86
|
+
"labelTranslationKey": {
|
|
87
|
+
"type": "string"
|
|
88
|
+
},
|
|
89
|
+
"max": {
|
|
90
|
+
"type": "string"
|
|
91
|
+
},
|
|
92
|
+
"min": {
|
|
93
|
+
"type": "string"
|
|
73
94
|
},
|
|
74
|
-
"
|
|
75
|
-
"
|
|
76
|
-
"
|
|
77
|
-
"label": {
|
|
78
|
-
"type": "string",
|
|
79
|
-
"default": "To"
|
|
80
|
-
},
|
|
81
|
-
"help": {
|
|
82
|
-
"$ref": "#/definitions/DateRangeQuestion/properties/attributes/properties/help"
|
|
83
|
-
},
|
|
84
|
-
"labelTranslationKey": {
|
|
85
|
-
"$ref": "#/definitions/DateRangeQuestion/properties/attributes/properties/labelTranslationKey"
|
|
86
|
-
},
|
|
87
|
-
"max": {
|
|
88
|
-
"$ref": "#/definitions/DateRangeQuestion/properties/columns/properties/start/properties/max"
|
|
89
|
-
},
|
|
90
|
-
"min": {
|
|
91
|
-
"$ref": "#/definitions/DateRangeQuestion/properties/columns/properties/start/properties/min"
|
|
92
|
-
},
|
|
93
|
-
"step": {
|
|
94
|
-
"$ref": "#/definitions/DateRangeQuestion/properties/columns/properties/start/properties/step"
|
|
95
|
-
}
|
|
96
|
-
},
|
|
97
|
-
"additionalProperties": false,
|
|
98
|
-
"default": {}
|
|
95
|
+
"step": {
|
|
96
|
+
"default": 1,
|
|
97
|
+
"type": "number"
|
|
99
98
|
}
|
|
100
99
|
},
|
|
101
|
-
"
|
|
102
|
-
|
|
100
|
+
"required": [
|
|
101
|
+
"label",
|
|
102
|
+
"step"
|
|
103
|
+
],
|
|
104
|
+
"additionalProperties": false
|
|
103
105
|
}
|
|
104
106
|
},
|
|
105
107
|
"required": [
|
|
106
|
-
"
|
|
108
|
+
"start",
|
|
109
|
+
"end"
|
|
107
110
|
],
|
|
108
111
|
"additionalProperties": false
|
|
109
112
|
}
|
|
110
113
|
},
|
|
111
|
-
"
|
|
114
|
+
"required": [
|
|
115
|
+
"type",
|
|
116
|
+
"attributes",
|
|
117
|
+
"meta",
|
|
118
|
+
"columns"
|
|
119
|
+
],
|
|
120
|
+
"additionalProperties": false
|
|
112
121
|
}
|