@dmptool/types 1.2.6 → 2.0.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 (97) hide show
  1. package/README.md +1 -1
  2. package/dist/answers/__tests__/defaults.spec.js +216 -0
  3. package/dist/answers/answer.d.ts +29 -14
  4. package/dist/answers/answer.js +11 -5
  5. package/dist/answers/dateAnswers.d.ts +20 -47
  6. package/dist/answers/dateAnswers.js +20 -10
  7. package/dist/answers/graphQLAnswers.d.ts +48 -120
  8. package/dist/answers/graphQLAnswers.js +46 -21
  9. package/dist/answers/index.d.ts +155 -1439
  10. package/dist/answers/index.js +26 -1
  11. package/dist/answers/numberAnswers.d.ts +38 -92
  12. package/dist/answers/numberAnswers.js +38 -19
  13. package/dist/answers/optionBasedAnswers.d.ts +42 -87
  14. package/dist/answers/optionBasedAnswers.js +37 -21
  15. package/dist/answers/tableAnswers.d.ts +348 -3032
  16. package/dist/answers/tableAnswers.js +25 -61
  17. package/dist/answers/textAnswers.d.ts +32 -68
  18. package/dist/answers/textAnswers.js +30 -17
  19. package/dist/questions/__tests__/dateQuestions.spec.js +3 -0
  20. package/dist/questions/__tests__/defaults.spec.d.ts +1 -0
  21. package/dist/questions/__tests__/defaults.spec.js +668 -0
  22. package/dist/questions/__tests__/optionBasedQuestions.spec.js +3 -2
  23. package/dist/questions/__tests__/tableQuestion.spec.js +22 -23
  24. package/dist/questions/__tests__/textQuestions.spec.js +32 -0
  25. package/dist/questions/dateQuestions.d.ts +45 -191
  26. package/dist/questions/dateQuestions.js +26 -23
  27. package/dist/questions/graphQLQuestions.d.ts +262 -556
  28. package/dist/questions/graphQLQuestions.js +225 -223
  29. package/dist/questions/index.d.ts +689 -7440
  30. package/dist/questions/index.js +26 -1
  31. package/dist/questions/numberQuestions.d.ts +85 -331
  32. package/dist/questions/numberQuestions.js +50 -36
  33. package/dist/questions/optionBasedQuestions.d.ts +83 -290
  34. package/dist/questions/optionBasedQuestions.js +58 -41
  35. package/dist/questions/question.d.ts +72 -35
  36. package/dist/questions/question.js +14 -5
  37. package/dist/questions/tableQuestions.d.ts +1977 -9646
  38. package/dist/questions/tableQuestions.js +184 -192
  39. package/dist/questions/textQuestions.d.ts +70 -226
  40. package/dist/questions/textQuestions.js +31 -31
  41. package/package.json +4 -5
  42. package/dist/answers/__tests__/usage.spec.js +0 -178
  43. package/dist/questions/__tests__/usage.spec.d.ts +0 -8
  44. package/dist/questions/__tests__/usage.spec.js +0 -473
  45. package/dist/schemas/affiliationSearchAnswer.schema.json +0 -45
  46. package/dist/schemas/affiliationSearchQuestion.schema.json +0 -140
  47. package/dist/schemas/anyAnswer.schema.json +0 -605
  48. package/dist/schemas/anyQuestion.schema.json +0 -2455
  49. package/dist/schemas/anyTableColumnAnswer.schema.json +0 -466
  50. package/dist/schemas/anyTableColumnQuestion.schema.json +0 -1092
  51. package/dist/schemas/booleanAnswer.schema.json +0 -34
  52. package/dist/schemas/booleanQuestion.schema.json +0 -56
  53. package/dist/schemas/checkboxesAnswer.schema.json +0 -39
  54. package/dist/schemas/checkboxesQuestion.schema.json +0 -76
  55. package/dist/schemas/currencyAnswer.schema.json +0 -34
  56. package/dist/schemas/currencyQuestion.schema.json +0 -67
  57. package/dist/schemas/dateAnswer.schema.json +0 -34
  58. package/dist/schemas/datePickerAnswer.schema.json +0 -37
  59. package/dist/schemas/datePickerQuestion.schema.json +0 -52
  60. package/dist/schemas/dateQuestion.schema.json +0 -62
  61. package/dist/schemas/dateRangeAnswer.schema.json +0 -45
  62. package/dist/schemas/dateRangeQuestion.schema.json +0 -112
  63. package/dist/schemas/emailAnswer.schema.json +0 -34
  64. package/dist/schemas/emailQuestion.schema.json +0 -66
  65. package/dist/schemas/filteredSearchAnswer.schema.json +0 -40
  66. package/dist/schemas/filteredSearchQuestion.schema.json +0 -130
  67. package/dist/schemas/licenseSearchAnswer.schema.json +0 -49
  68. package/dist/schemas/licenseSearchQuestion.schema.json +0 -164
  69. package/dist/schemas/metadataStandardSearchAnswer.schema.json +0 -49
  70. package/dist/schemas/metadataStandardSearchQuestion.schema.json +0 -174
  71. package/dist/schemas/multiselectBoxAnswer.schema.json +0 -39
  72. package/dist/schemas/multiselectBoxQuestion.schema.json +0 -85
  73. package/dist/schemas/numberAnswer.schema.json +0 -34
  74. package/dist/schemas/numberQuestion.schema.json +0 -63
  75. package/dist/schemas/numberRangeAnswer.schema.json +0 -45
  76. package/dist/schemas/numberRangeQuestion.schema.json +0 -94
  77. package/dist/schemas/numberWithContextAnswer.schema.json +0 -45
  78. package/dist/schemas/numberWithContextQuestion.schema.json +0 -84
  79. package/dist/schemas/radioButtonsAnswer.schema.json +0 -34
  80. package/dist/schemas/radioButtonsQuestion.schema.json +0 -76
  81. package/dist/schemas/repositorySearchAnswer.schema.json +0 -49
  82. package/dist/schemas/repositorySearchQuestion.schema.json +0 -180
  83. package/dist/schemas/researchOutputTableAnswer.schema.json +0 -519
  84. package/dist/schemas/researchOutputTableQuestion.schema.json +0 -1183
  85. package/dist/schemas/selectBoxAnswer.schema.json +0 -34
  86. package/dist/schemas/selectBoxQuestion.schema.json +0 -85
  87. package/dist/schemas/tableAnswer.schema.json +0 -519
  88. package/dist/schemas/tableQuestion.schema.json +0 -1183
  89. package/dist/schemas/textAnswer.schema.json +0 -34
  90. package/dist/schemas/textAreaAnswer.schema.json +0 -34
  91. package/dist/schemas/textAreaQuestion.schema.json +0 -70
  92. package/dist/schemas/textQuestion.schema.json +0 -62
  93. package/dist/schemas/typeaheadSearchAnswer.schema.json +0 -37
  94. package/dist/schemas/typeaheadSearchQuestion.schema.json +0 -120
  95. package/dist/schemas/urlAnswer.schema.json +0 -34
  96. package/dist/schemas/urlQuestion.schema.json +0 -62
  97. /package/dist/answers/__tests__/{usage.spec.d.ts → defaults.spec.d.ts} +0 -0
@@ -1,34 +0,0 @@
1
- {
2
- "$ref": "#/definitions/TextAnswer",
3
- "definitions": {
4
- "TextAnswer": {
5
- "type": "object",
6
- "properties": {
7
- "type": {
8
- "type": "string",
9
- "const": "text"
10
- },
11
- "meta": {
12
- "type": "object",
13
- "properties": {
14
- "schemaVersion": {
15
- "type": "string",
16
- "default": "1.0"
17
- }
18
- },
19
- "additionalProperties": false,
20
- "default": {}
21
- },
22
- "answer": {
23
- "type": "string",
24
- "default": ""
25
- }
26
- },
27
- "required": [
28
- "type"
29
- ],
30
- "additionalProperties": false
31
- }
32
- },
33
- "$schema": "http://json-schema.org/draft-07/schema#"
34
- }
@@ -1,34 +0,0 @@
1
- {
2
- "$ref": "#/definitions/TextAreaAnswer",
3
- "definitions": {
4
- "TextAreaAnswer": {
5
- "type": "object",
6
- "properties": {
7
- "type": {
8
- "type": "string",
9
- "const": "textArea"
10
- },
11
- "meta": {
12
- "type": "object",
13
- "properties": {
14
- "schemaVersion": {
15
- "type": "string",
16
- "default": "1.0"
17
- }
18
- },
19
- "additionalProperties": false,
20
- "default": {}
21
- },
22
- "answer": {
23
- "type": "string",
24
- "default": ""
25
- }
26
- },
27
- "required": [
28
- "type"
29
- ],
30
- "additionalProperties": false
31
- }
32
- },
33
- "$schema": "http://json-schema.org/draft-07/schema#"
34
- }
@@ -1,70 +0,0 @@
1
- {
2
- "$ref": "#/definitions/TextAreaQuestion",
3
- "definitions": {
4
- "TextAreaQuestion": {
5
- "type": "object",
6
- "properties": {
7
- "type": {
8
- "type": "string",
9
- "const": "textArea"
10
- },
11
- "attributes": {
12
- "type": "object",
13
- "properties": {
14
- "label": {
15
- "type": "string"
16
- },
17
- "help": {
18
- "type": "string"
19
- },
20
- "labelTranslationKey": {
21
- "type": "string"
22
- },
23
- "cols": {
24
- "type": "number",
25
- "default": 20
26
- },
27
- "maxLength": {
28
- "type": "number"
29
- },
30
- "minLength": {
31
- "type": "number"
32
- },
33
- "rows": {
34
- "type": "number",
35
- "default": 2
36
- },
37
- "asRichText": {
38
- "type": "boolean",
39
- "default": true
40
- }
41
- },
42
- "additionalProperties": false,
43
- "default": {}
44
- },
45
- "meta": {
46
- "type": "object",
47
- "properties": {
48
- "schemaVersion": {
49
- "type": "string",
50
- "default": "1.0"
51
- },
52
- "title": {
53
- "type": "string"
54
- },
55
- "usageDescription": {
56
- "type": "string"
57
- }
58
- },
59
- "additionalProperties": false,
60
- "default": {}
61
- }
62
- },
63
- "required": [
64
- "type"
65
- ],
66
- "additionalProperties": false
67
- }
68
- },
69
- "$schema": "http://json-schema.org/draft-07/schema#"
70
- }
@@ -1,62 +0,0 @@
1
- {
2
- "$ref": "#/definitions/TextQuestion",
3
- "definitions": {
4
- "TextQuestion": {
5
- "type": "object",
6
- "properties": {
7
- "type": {
8
- "type": "string",
9
- "const": "text"
10
- },
11
- "attributes": {
12
- "type": "object",
13
- "properties": {
14
- "label": {
15
- "type": "string"
16
- },
17
- "help": {
18
- "type": "string"
19
- },
20
- "labelTranslationKey": {
21
- "type": "string"
22
- },
23
- "maxLength": {
24
- "type": "number",
25
- "default": 255
26
- },
27
- "minLength": {
28
- "type": "number"
29
- },
30
- "pattern": {
31
- "type": "string"
32
- }
33
- },
34
- "additionalProperties": false,
35
- "default": {}
36
- },
37
- "meta": {
38
- "type": "object",
39
- "properties": {
40
- "schemaVersion": {
41
- "type": "string",
42
- "default": "1.0"
43
- },
44
- "title": {
45
- "type": "string"
46
- },
47
- "usageDescription": {
48
- "type": "string"
49
- }
50
- },
51
- "additionalProperties": false,
52
- "default": {}
53
- }
54
- },
55
- "required": [
56
- "type"
57
- ],
58
- "additionalProperties": false
59
- }
60
- },
61
- "$schema": "http://json-schema.org/draft-07/schema#"
62
- }
@@ -1,37 +0,0 @@
1
- {
2
- "$ref": "#/definitions/TypeaheadSearchAnswer",
3
- "definitions": {
4
- "TypeaheadSearchAnswer": {
5
- "type": "object",
6
- "properties": {
7
- "type": {
8
- "type": "string",
9
- "const": "typeaheadSearch"
10
- },
11
- "answer": {
12
- "type": "string"
13
- },
14
- "meta": {
15
- "type": "object",
16
- "properties": {
17
- "schemaVersion": {
18
- "type": "string",
19
- "const": "1.0"
20
- }
21
- },
22
- "required": [
23
- "schemaVersion"
24
- ],
25
- "additionalProperties": false
26
- }
27
- },
28
- "required": [
29
- "type",
30
- "answer",
31
- "meta"
32
- ],
33
- "additionalProperties": false
34
- }
35
- },
36
- "$schema": "http://json-schema.org/draft-07/schema#"
37
- }
@@ -1,120 +0,0 @@
1
- {
2
- "$ref": "#/definitions/TypeaheadSearchQuestion",
3
- "definitions": {
4
- "TypeaheadSearchQuestion": {
5
- "type": "object",
6
- "properties": {
7
- "type": {
8
- "type": "string",
9
- "const": "typeaheadSearch"
10
- },
11
- "attributes": {
12
- "type": "object",
13
- "properties": {
14
- "label": {
15
- "type": "string"
16
- },
17
- "help": {
18
- "type": "string"
19
- },
20
- "labelTranslationKey": {
21
- "type": "string"
22
- }
23
- },
24
- "additionalProperties": false
25
- },
26
- "meta": {
27
- "type": "object",
28
- "properties": {
29
- "schemaVersion": {
30
- "type": "string",
31
- "const": "1.0"
32
- }
33
- },
34
- "required": [
35
- "schemaVersion"
36
- ],
37
- "additionalProperties": false
38
- },
39
- "graphQL": {
40
- "type": "object",
41
- "properties": {
42
- "displayFields": {
43
- "type": "array",
44
- "items": {
45
- "type": "object",
46
- "properties": {
47
- "propertyName": {
48
- "type": "string"
49
- },
50
- "label": {
51
- "type": "string"
52
- },
53
- "labelTranslationKey": {
54
- "type": "string"
55
- }
56
- },
57
- "required": [
58
- "propertyName",
59
- "label"
60
- ],
61
- "additionalProperties": false
62
- }
63
- },
64
- "localQueryId": {
65
- "type": "string"
66
- },
67
- "query": {
68
- "type": "string"
69
- },
70
- "responseField": {
71
- "type": "string"
72
- },
73
- "variables": {
74
- "type": "array",
75
- "items": {
76
- "type": "object",
77
- "properties": {
78
- "minLength": {
79
- "type": "number"
80
- },
81
- "label": {
82
- "type": "string"
83
- },
84
- "labelTranslationKey": {
85
- "type": "string"
86
- },
87
- "name": {
88
- "type": "string"
89
- },
90
- "type": {
91
- "type": "string"
92
- },
93
- "defaultValue": {
94
- "type": "string"
95
- }
96
- },
97
- "required": [
98
- "name",
99
- "type"
100
- ],
101
- "additionalProperties": false
102
- }
103
- }
104
- },
105
- "required": [
106
- "displayFields",
107
- "responseField"
108
- ],
109
- "additionalProperties": false
110
- }
111
- },
112
- "required": [
113
- "type",
114
- "graphQL"
115
- ],
116
- "additionalProperties": false
117
- }
118
- },
119
- "$schema": "http://json-schema.org/draft-07/schema#"
120
- }
@@ -1,34 +0,0 @@
1
- {
2
- "$ref": "#/definitions/URLAnswer",
3
- "definitions": {
4
- "URLAnswer": {
5
- "type": "object",
6
- "properties": {
7
- "type": {
8
- "type": "string",
9
- "const": "url"
10
- },
11
- "meta": {
12
- "type": "object",
13
- "properties": {
14
- "schemaVersion": {
15
- "type": "string",
16
- "default": "1.0"
17
- }
18
- },
19
- "additionalProperties": false,
20
- "default": {}
21
- },
22
- "answer": {
23
- "type": "string",
24
- "default": ""
25
- }
26
- },
27
- "required": [
28
- "type"
29
- ],
30
- "additionalProperties": false
31
- }
32
- },
33
- "$schema": "http://json-schema.org/draft-07/schema#"
34
- }
@@ -1,62 +0,0 @@
1
- {
2
- "$ref": "#/definitions/URLQuestion",
3
- "definitions": {
4
- "URLQuestion": {
5
- "type": "object",
6
- "properties": {
7
- "type": {
8
- "type": "string",
9
- "const": "url"
10
- },
11
- "attributes": {
12
- "type": "object",
13
- "properties": {
14
- "label": {
15
- "type": "string"
16
- },
17
- "help": {
18
- "type": "string"
19
- },
20
- "labelTranslationKey": {
21
- "type": "string"
22
- },
23
- "maxLength": {
24
- "type": "number",
25
- "default": 255
26
- },
27
- "minLength": {
28
- "type": "number"
29
- },
30
- "pattern": {
31
- "type": "string"
32
- }
33
- },
34
- "additionalProperties": false,
35
- "default": {}
36
- },
37
- "meta": {
38
- "type": "object",
39
- "properties": {
40
- "schemaVersion": {
41
- "type": "string",
42
- "default": "1.0"
43
- },
44
- "title": {
45
- "type": "string"
46
- },
47
- "usageDescription": {
48
- "type": "string"
49
- }
50
- },
51
- "additionalProperties": false,
52
- "default": {}
53
- }
54
- },
55
- "required": [
56
- "type"
57
- ],
58
- "additionalProperties": false
59
- }
60
- },
61
- "$schema": "http://json-schema.org/draft-07/schema#"
62
- }