@dmptool/types 1.1.0 → 1.1.2

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 (58) hide show
  1. package/README.md +2 -0
  2. package/dist/answers/__tests__/answers.spec.js +13 -7
  3. package/dist/answers/answer.d.ts +3 -3
  4. package/dist/answers/graphQLAnswers.d.ts +2 -2
  5. package/dist/answers/graphQLAnswers.js +2 -2
  6. package/dist/answers/index.d.ts +111 -74
  7. package/dist/answers/index.js +4 -4
  8. package/dist/answers/numberAnswers.d.ts +0 -25
  9. package/dist/answers/numberAnswers.js +1 -5
  10. package/dist/answers/optionBasedAnswers.d.ts +52 -2
  11. package/dist/answers/optionBasedAnswers.js +9 -1
  12. package/dist/answers/tableAnswers.d.ts +304 -140
  13. package/dist/answers/tableAnswers.js +3 -2
  14. package/dist/questions/__tests__/graphQLQuestions.spec.js +7 -7
  15. package/dist/questions/__tests__/numberQuestions.spec.js +0 -48
  16. package/dist/questions/__tests__/optionBasedQuestions.spec.js +98 -1
  17. package/dist/questions/dateQuestions.d.ts +47 -16
  18. package/dist/questions/dateQuestions.js +25 -1
  19. package/dist/questions/graphQLQuestions.d.ts +59 -28
  20. package/dist/questions/graphQLQuestions.js +40 -3
  21. package/dist/questions/index.d.ts +1567 -689
  22. package/dist/questions/index.js +7 -4
  23. package/dist/questions/numberQuestions.d.ts +71 -76
  24. package/dist/questions/numberQuestions.js +37 -8
  25. package/dist/questions/optionBasedQuestions.d.ts +227 -23
  26. package/dist/questions/optionBasedQuestions.js +89 -5
  27. package/dist/questions/question.d.ts +51 -4
  28. package/dist/questions/question.js +14 -2
  29. package/dist/questions/tableQuestions.d.ts +1965 -1056
  30. package/dist/questions/tableQuestions.js +14 -2
  31. package/dist/questions/textQuestions.d.ts +100 -40
  32. package/dist/questions/textQuestions.js +45 -7
  33. package/dist/schemas/affiliationSearchAnswer.schema.json +37 -0
  34. package/dist/schemas/affiliationSearchQuestion.schema.json +133 -0
  35. package/dist/schemas/anyAnswer.schema.json +41 -23
  36. package/dist/schemas/anyQuestion.schema.json +563 -146
  37. package/dist/schemas/anyTableColumnAnswer.schema.json +35 -14
  38. package/dist/schemas/anyTableColumnQuestion.schema.json +398 -119
  39. package/dist/schemas/booleanQuestion.schema.json +12 -0
  40. package/dist/schemas/checkboxesQuestion.schema.json +12 -0
  41. package/dist/schemas/currencyQuestion.schema.json +12 -0
  42. package/dist/schemas/dateQuestion.schema.json +12 -0
  43. package/dist/schemas/dateRangeQuestion.schema.json +12 -0
  44. package/dist/schemas/emailQuestion.schema.json +12 -0
  45. package/dist/schemas/filteredSearchQuestion.schema.json +10 -0
  46. package/dist/schemas/multiselectBoxAnswer.schema.json +40 -0
  47. package/dist/schemas/multiselectBoxQuestion.schema.json +90 -0
  48. package/dist/schemas/numberQuestion.schema.json +12 -0
  49. package/dist/schemas/numberRangeQuestion.schema.json +12 -0
  50. package/dist/schemas/radioButtonsQuestion.schema.json +12 -0
  51. package/dist/schemas/selectBoxAnswer.schema.json +1 -4
  52. package/dist/schemas/selectBoxQuestion.schema.json +18 -1
  53. package/dist/schemas/tableAnswer.schema.json +35 -14
  54. package/dist/schemas/tableQuestion.schema.json +420 -120
  55. package/dist/schemas/textAreaQuestion.schema.json +15 -4
  56. package/dist/schemas/textQuestion.schema.json +12 -0
  57. package/dist/schemas/urlQuestion.schema.json +12 -0
  58. package/package.json +1 -1
@@ -31,6 +31,9 @@
31
31
  },
32
32
  "rows": {
33
33
  "type": "number"
34
+ },
35
+ "asRichText": {
36
+ "type": "boolean"
34
37
  }
35
38
  },
36
39
  "additionalProperties": false
@@ -42,8 +45,17 @@
42
45
  "type": "string",
43
46
  "const": "1.0"
44
47
  },
45
- "asRichText": {
46
- "type": "boolean"
48
+ "title": {
49
+ "type": "string",
50
+ "const": "Text Area"
51
+ },
52
+ "usageDescription": {
53
+ "type": "string",
54
+ "const": "For questions that require longer answers, you can select formatting options too."
55
+ },
56
+ "defaultJSON": {
57
+ "type": "string",
58
+ "const": "{\"type\":\"textArea\",\"attributes\":{\"cols\":20,\"rows\":2,\"asRichText\":true},\"meta\":{\"schemaVersion\":\"1.0\"}}"
47
59
  }
48
60
  },
49
61
  "required": [
@@ -53,8 +65,7 @@
53
65
  }
54
66
  },
55
67
  "required": [
56
- "type",
57
- "meta"
68
+ "type"
58
69
  ],
59
70
  "additionalProperties": false
60
71
  }
@@ -38,6 +38,18 @@
38
38
  "schemaVersion": {
39
39
  "type": "string",
40
40
  "const": "1.0"
41
+ },
42
+ "title": {
43
+ "type": "string",
44
+ "const": "Text Field"
45
+ },
46
+ "usageDescription": {
47
+ "type": "string",
48
+ "const": "For questions that require short, simple answers."
49
+ },
50
+ "defaultJSON": {
51
+ "type": "string",
52
+ "const": "{\"type\":\"text\",\"attributes\":{\"maxLength\":255},\"meta\":{\"schemaVersion\":\"1.0\"}}"
41
53
  }
42
54
  },
43
55
  "required": [
@@ -38,6 +38,18 @@
38
38
  "schemaVersion": {
39
39
  "type": "string",
40
40
  "const": "1.0"
41
+ },
42
+ "title": {
43
+ "type": "string",
44
+ "const": "URL Field"
45
+ },
46
+ "usageDescription": {
47
+ "type": "string",
48
+ "const": "For questions that require a website, DOI or other URL."
49
+ },
50
+ "defaultJSON": {
51
+ "type": "string",
52
+ "const": "{\"type\":\"url\",\"attributes\":{\"maxLength\":255},\"meta\":{\"schemaVersion\":\"1.0\"}}"
41
53
  }
42
54
  },
43
55
  "required": [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dmptool/types",
3
- "version": "1.1.0",
3
+ "version": "1.1.2",
4
4
  "description": "TypeScript types for DMPTool",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",