psytools 0.3.2 → 0.5.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 (227) hide show
  1. package/README.md +54 -17
  2. package/SOURCES.md +5 -1
  3. package/dist/cjs/assessment.d.ts +6 -4
  4. package/dist/cjs/assessment.js +10 -6
  5. package/dist/cjs/errors.d.ts +4 -2
  6. package/dist/cjs/evaluation.d.ts +10 -5
  7. package/dist/cjs/evaluation.js +68 -31
  8. package/dist/cjs/i18n.d.ts +22 -2
  9. package/dist/cjs/i18n.js +138 -2
  10. package/dist/cjs/index.d.ts +6 -2
  11. package/dist/cjs/index.js +20 -15
  12. package/dist/cjs/inventories/aq10.js +5 -35
  13. package/dist/cjs/inventories/asrs6.js +6 -28
  14. package/dist/cjs/inventories/audit.js +39 -56
  15. package/dist/cjs/inventories/common.js +0 -10
  16. package/dist/cjs/inventories/dass21.js +19 -75
  17. package/dist/cjs/inventories/gad7.js +5 -23
  18. package/dist/cjs/inventories/index.d.ts +11 -2
  19. package/dist/cjs/inventories/index.js +22 -3
  20. package/dist/cjs/inventories/mini-ipip.js +25 -59
  21. package/dist/cjs/inventories/phq9.js +6 -30
  22. package/dist/cjs/inventories/who5.js +5 -31
  23. package/dist/cjs/locales/de/aq10.d.ts +4 -0
  24. package/dist/cjs/locales/de/aq10.js +53 -0
  25. package/dist/cjs/locales/de/asrs6.d.ts +4 -0
  26. package/dist/cjs/locales/de/asrs6.js +42 -0
  27. package/dist/cjs/locales/de/audit.d.ts +4 -0
  28. package/dist/cjs/locales/de/audit.js +80 -0
  29. package/dist/cjs/locales/de/dass21.d.ts +4 -0
  30. package/dist/cjs/locales/de/dass21.js +114 -0
  31. package/dist/cjs/locales/de/gad7.d.ts +4 -0
  32. package/dist/cjs/locales/de/gad7.js +46 -0
  33. package/dist/cjs/locales/de/mini-ipip.d.ts +4 -0
  34. package/dist/cjs/locales/de/mini-ipip.js +97 -0
  35. package/dist/cjs/locales/de/phq9.d.ts +4 -0
  36. package/dist/cjs/locales/de/phq9.js +56 -0
  37. package/dist/cjs/locales/de/who5.d.ts +4 -0
  38. package/dist/cjs/locales/de/who5.js +41 -0
  39. package/dist/cjs/locales/es/aq10.d.ts +4 -0
  40. package/dist/cjs/locales/es/aq10.js +53 -0
  41. package/dist/cjs/locales/es/asrs6.d.ts +4 -0
  42. package/dist/cjs/locales/es/asrs6.js +42 -0
  43. package/dist/cjs/locales/es/audit.d.ts +4 -0
  44. package/dist/cjs/locales/es/audit.js +80 -0
  45. package/dist/cjs/locales/es/dass21.d.ts +4 -0
  46. package/dist/cjs/locales/es/dass21.js +114 -0
  47. package/dist/cjs/locales/es/gad7.d.ts +4 -0
  48. package/dist/cjs/locales/es/gad7.js +46 -0
  49. package/dist/cjs/locales/es/mini-ipip.d.ts +4 -0
  50. package/dist/cjs/locales/es/mini-ipip.js +97 -0
  51. package/dist/cjs/locales/es/phq9.d.ts +4 -0
  52. package/dist/cjs/locales/es/phq9.js +56 -0
  53. package/dist/cjs/locales/es/who5.d.ts +4 -0
  54. package/dist/cjs/locales/es/who5.js +41 -0
  55. package/dist/cjs/locales/index.d.ts +12 -0
  56. package/dist/cjs/locales/index.js +63 -0
  57. package/dist/cjs/locales/tr/aq10.d.ts +4 -0
  58. package/dist/cjs/locales/tr/aq10.js +53 -0
  59. package/dist/cjs/locales/tr/asrs6.d.ts +4 -0
  60. package/dist/cjs/locales/tr/asrs6.js +42 -0
  61. package/dist/cjs/locales/tr/audit.d.ts +4 -0
  62. package/dist/cjs/locales/tr/audit.js +80 -0
  63. package/dist/cjs/locales/tr/dass21.d.ts +4 -0
  64. package/dist/cjs/locales/tr/dass21.js +114 -0
  65. package/dist/cjs/locales/tr/gad7.d.ts +4 -0
  66. package/dist/cjs/locales/tr/gad7.js +46 -0
  67. package/dist/cjs/locales/tr/mini-ipip.d.ts +4 -0
  68. package/dist/cjs/locales/tr/mini-ipip.js +97 -0
  69. package/dist/cjs/locales/tr/phq9.d.ts +4 -0
  70. package/dist/cjs/locales/tr/phq9.js +56 -0
  71. package/dist/cjs/locales/tr/who5.d.ts +4 -0
  72. package/dist/cjs/locales/tr/who5.js +41 -0
  73. package/dist/cjs/locales/zh/aq10.d.ts +4 -0
  74. package/dist/cjs/locales/zh/aq10.js +53 -0
  75. package/dist/cjs/locales/zh/asrs6.d.ts +4 -0
  76. package/dist/cjs/locales/zh/asrs6.js +42 -0
  77. package/dist/cjs/locales/zh/audit.d.ts +4 -0
  78. package/dist/cjs/locales/zh/audit.js +80 -0
  79. package/dist/cjs/locales/zh/dass21.d.ts +4 -0
  80. package/dist/cjs/locales/zh/dass21.js +114 -0
  81. package/dist/cjs/locales/zh/gad7.d.ts +4 -0
  82. package/dist/cjs/locales/zh/gad7.js +46 -0
  83. package/dist/cjs/locales/zh/mini-ipip.d.ts +4 -0
  84. package/dist/cjs/locales/zh/mini-ipip.js +97 -0
  85. package/dist/cjs/locales/zh/phq9.d.ts +4 -0
  86. package/dist/cjs/locales/zh/phq9.js +56 -0
  87. package/dist/cjs/locales/zh/who5.d.ts +4 -0
  88. package/dist/cjs/locales/zh/who5.js +41 -0
  89. package/dist/cjs/types.d.ts +60 -1
  90. package/dist/esm/assessment.d.ts +6 -4
  91. package/dist/esm/assessment.js +11 -7
  92. package/dist/esm/errors.d.ts +4 -2
  93. package/dist/esm/evaluation.d.ts +10 -5
  94. package/dist/esm/evaluation.js +68 -31
  95. package/dist/esm/i18n.d.ts +22 -2
  96. package/dist/esm/i18n.js +135 -1
  97. package/dist/esm/index.d.ts +6 -2
  98. package/dist/esm/index.js +2 -1
  99. package/dist/esm/inventories/aq10.js +5 -35
  100. package/dist/esm/inventories/asrs6.js +6 -28
  101. package/dist/esm/inventories/audit.js +39 -56
  102. package/dist/esm/inventories/common.js +0 -10
  103. package/dist/esm/inventories/dass21.js +19 -75
  104. package/dist/esm/inventories/gad7.js +5 -23
  105. package/dist/esm/inventories/index.d.ts +11 -2
  106. package/dist/esm/inventories/index.js +22 -3
  107. package/dist/esm/inventories/mini-ipip.js +25 -59
  108. package/dist/esm/inventories/phq9.js +6 -30
  109. package/dist/esm/inventories/who5.js +5 -31
  110. package/dist/esm/locales/de/aq10.d.ts +4 -0
  111. package/dist/esm/locales/de/aq10.js +51 -0
  112. package/dist/esm/locales/de/asrs6.d.ts +4 -0
  113. package/dist/esm/locales/de/asrs6.js +40 -0
  114. package/dist/esm/locales/de/audit.d.ts +4 -0
  115. package/dist/esm/locales/de/audit.js +78 -0
  116. package/dist/esm/locales/de/dass21.d.ts +4 -0
  117. package/dist/esm/locales/de/dass21.js +112 -0
  118. package/dist/esm/locales/de/gad7.d.ts +4 -0
  119. package/dist/esm/locales/de/gad7.js +44 -0
  120. package/dist/esm/locales/de/mini-ipip.d.ts +4 -0
  121. package/dist/esm/locales/de/mini-ipip.js +95 -0
  122. package/dist/esm/locales/de/phq9.d.ts +4 -0
  123. package/dist/esm/locales/de/phq9.js +54 -0
  124. package/dist/esm/locales/de/who5.d.ts +4 -0
  125. package/dist/esm/locales/de/who5.js +39 -0
  126. package/dist/esm/locales/es/aq10.d.ts +4 -0
  127. package/dist/esm/locales/es/aq10.js +51 -0
  128. package/dist/esm/locales/es/asrs6.d.ts +4 -0
  129. package/dist/esm/locales/es/asrs6.js +40 -0
  130. package/dist/esm/locales/es/audit.d.ts +4 -0
  131. package/dist/esm/locales/es/audit.js +78 -0
  132. package/dist/esm/locales/es/dass21.d.ts +4 -0
  133. package/dist/esm/locales/es/dass21.js +112 -0
  134. package/dist/esm/locales/es/gad7.d.ts +4 -0
  135. package/dist/esm/locales/es/gad7.js +44 -0
  136. package/dist/esm/locales/es/mini-ipip.d.ts +4 -0
  137. package/dist/esm/locales/es/mini-ipip.js +95 -0
  138. package/dist/esm/locales/es/phq9.d.ts +4 -0
  139. package/dist/esm/locales/es/phq9.js +54 -0
  140. package/dist/esm/locales/es/who5.d.ts +4 -0
  141. package/dist/esm/locales/es/who5.js +39 -0
  142. package/dist/esm/locales/index.d.ts +12 -0
  143. package/dist/esm/locales/index.js +59 -0
  144. package/dist/esm/locales/tr/aq10.d.ts +4 -0
  145. package/dist/esm/locales/tr/aq10.js +51 -0
  146. package/dist/esm/locales/tr/asrs6.d.ts +4 -0
  147. package/dist/esm/locales/tr/asrs6.js +40 -0
  148. package/dist/esm/locales/tr/audit.d.ts +4 -0
  149. package/dist/esm/locales/tr/audit.js +78 -0
  150. package/dist/esm/locales/tr/dass21.d.ts +4 -0
  151. package/dist/esm/locales/tr/dass21.js +112 -0
  152. package/dist/esm/locales/tr/gad7.d.ts +4 -0
  153. package/dist/esm/locales/tr/gad7.js +44 -0
  154. package/dist/esm/locales/tr/mini-ipip.d.ts +4 -0
  155. package/dist/esm/locales/tr/mini-ipip.js +95 -0
  156. package/dist/esm/locales/tr/phq9.d.ts +4 -0
  157. package/dist/esm/locales/tr/phq9.js +54 -0
  158. package/dist/esm/locales/tr/who5.d.ts +4 -0
  159. package/dist/esm/locales/tr/who5.js +39 -0
  160. package/dist/esm/locales/zh/aq10.d.ts +4 -0
  161. package/dist/esm/locales/zh/aq10.js +51 -0
  162. package/dist/esm/locales/zh/asrs6.d.ts +4 -0
  163. package/dist/esm/locales/zh/asrs6.js +40 -0
  164. package/dist/esm/locales/zh/audit.d.ts +4 -0
  165. package/dist/esm/locales/zh/audit.js +78 -0
  166. package/dist/esm/locales/zh/dass21.d.ts +4 -0
  167. package/dist/esm/locales/zh/dass21.js +112 -0
  168. package/dist/esm/locales/zh/gad7.d.ts +4 -0
  169. package/dist/esm/locales/zh/gad7.js +44 -0
  170. package/dist/esm/locales/zh/mini-ipip.d.ts +4 -0
  171. package/dist/esm/locales/zh/mini-ipip.js +95 -0
  172. package/dist/esm/locales/zh/phq9.d.ts +4 -0
  173. package/dist/esm/locales/zh/phq9.js +54 -0
  174. package/dist/esm/locales/zh/who5.d.ts +4 -0
  175. package/dist/esm/locales/zh/who5.js +39 -0
  176. package/dist/esm/types.d.ts +60 -1
  177. package/package.json +21 -1
  178. package/schema/assessment-definition.schema.json +15 -3
  179. package/src/assessment.ts +15 -9
  180. package/src/errors.ts +26 -2
  181. package/src/evaluation.ts +103 -30
  182. package/src/i18n.ts +177 -2
  183. package/src/index.ts +9 -1
  184. package/src/inventories/aq10.ts +5 -35
  185. package/src/inventories/asrs6.ts +6 -28
  186. package/src/inventories/audit.ts +39 -56
  187. package/src/inventories/common.ts +0 -10
  188. package/src/inventories/dass21.ts +19 -75
  189. package/src/inventories/gad7.ts +5 -23
  190. package/src/inventories/index.ts +27 -3
  191. package/src/inventories/mini-ipip.ts +25 -59
  192. package/src/inventories/phq9.ts +6 -30
  193. package/src/inventories/who5.ts +5 -31
  194. package/src/locales/de/aq10.ts +54 -0
  195. package/src/locales/de/asrs6.ts +43 -0
  196. package/src/locales/de/audit.ts +81 -0
  197. package/src/locales/de/dass21.ts +115 -0
  198. package/src/locales/de/gad7.ts +47 -0
  199. package/src/locales/de/mini-ipip.ts +98 -0
  200. package/src/locales/de/phq9.ts +57 -0
  201. package/src/locales/de/who5.ts +42 -0
  202. package/src/locales/es/aq10.ts +54 -0
  203. package/src/locales/es/asrs6.ts +43 -0
  204. package/src/locales/es/audit.ts +81 -0
  205. package/src/locales/es/dass21.ts +115 -0
  206. package/src/locales/es/gad7.ts +47 -0
  207. package/src/locales/es/mini-ipip.ts +98 -0
  208. package/src/locales/es/phq9.ts +57 -0
  209. package/src/locales/es/who5.ts +42 -0
  210. package/src/locales/index.ts +64 -0
  211. package/src/locales/tr/aq10.ts +54 -0
  212. package/src/locales/tr/asrs6.ts +43 -0
  213. package/src/locales/tr/audit.ts +81 -0
  214. package/src/locales/tr/dass21.ts +115 -0
  215. package/src/locales/tr/gad7.ts +47 -0
  216. package/src/locales/tr/mini-ipip.ts +98 -0
  217. package/src/locales/tr/phq9.ts +57 -0
  218. package/src/locales/tr/who5.ts +42 -0
  219. package/src/locales/zh/aq10.ts +54 -0
  220. package/src/locales/zh/asrs6.ts +43 -0
  221. package/src/locales/zh/audit.ts +81 -0
  222. package/src/locales/zh/dass21.ts +115 -0
  223. package/src/locales/zh/gad7.ts +47 -0
  224. package/src/locales/zh/mini-ipip.ts +98 -0
  225. package/src/locales/zh/phq9.ts +57 -0
  226. package/src/locales/zh/who5.ts +42 -0
  227. package/src/types.ts +63 -6
@@ -2,25 +2,25 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.dass21 = void 0;
4
4
  const depressionBands = [
5
- { id: "normal", min: 0, max: 9, label: { en: "Normal", tr: "Normal", de: "Normal" } },
6
- { id: "mild", min: 10, max: 13, label: { en: "Mild", tr: "Hafif", de: "Leicht" } },
7
- { id: "moderate", min: 14, max: 20, label: { en: "Moderate", tr: "Orta", de: "Moderat" } },
8
- { id: "severe", min: 21, max: 27, label: { en: "Severe", tr: "Şiddetli", de: "Schwer" } },
9
- { id: "extremely-severe", min: 28, max: 42, label: { en: "Extremely severe", tr: "Çok şiddetli", de: "Sehr schwer" } },
5
+ { id: "normal", min: 0, max: 9, label: { en: "Normal" } },
6
+ { id: "mild", min: 10, max: 13, label: { en: "Mild" } },
7
+ { id: "moderate", min: 14, max: 20, label: { en: "Moderate" } },
8
+ { id: "severe", min: 21, max: 27, label: { en: "Severe" } },
9
+ { id: "extremely-severe", min: 28, max: 42, label: { en: "Extremely severe" } },
10
10
  ];
11
11
  const anxietyBands = [
12
- { id: "normal", min: 0, max: 7, label: { en: "Normal", tr: "Normal", de: "Normal" } },
13
- { id: "mild", min: 8, max: 9, label: { en: "Mild", tr: "Hafif", de: "Leicht" } },
14
- { id: "moderate", min: 10, max: 14, label: { en: "Moderate", tr: "Orta", de: "Moderat" } },
15
- { id: "severe", min: 15, max: 19, label: { en: "Severe", tr: "Şiddetli", de: "Schwer" } },
16
- { id: "extremely-severe", min: 20, max: 42, label: { en: "Extremely severe", tr: "Çok şiddetli", de: "Sehr schwer" } },
12
+ { id: "normal", min: 0, max: 7, label: { en: "Normal" } },
13
+ { id: "mild", min: 8, max: 9, label: { en: "Mild" } },
14
+ { id: "moderate", min: 10, max: 14, label: { en: "Moderate" } },
15
+ { id: "severe", min: 15, max: 19, label: { en: "Severe" } },
16
+ { id: "extremely-severe", min: 20, max: 42, label: { en: "Extremely severe" } },
17
17
  ];
18
18
  const stressBands = [
19
- { id: "normal", min: 0, max: 14, label: { en: "Normal", tr: "Normal", de: "Normal" } },
20
- { id: "mild", min: 15, max: 18, label: { en: "Mild", tr: "Hafif", de: "Leicht" } },
21
- { id: "moderate", min: 19, max: 25, label: { en: "Moderate", tr: "Orta", de: "Moderat" } },
22
- { id: "severe", min: 26, max: 33, label: { en: "Severe", tr: "Şiddetli", de: "Schwer" } },
23
- { id: "extremely-severe", min: 34, max: 42, label: { en: "Extremely severe", tr: "Çok şiddetli", de: "Sehr schwer" } },
19
+ { id: "normal", min: 0, max: 14, label: { en: "Normal" } },
20
+ { id: "mild", min: 15, max: 18, label: { en: "Mild" } },
21
+ { id: "moderate", min: 19, max: 25, label: { en: "Moderate" } },
22
+ { id: "severe", min: 26, max: 33, label: { en: "Severe" } },
23
+ { id: "extremely-severe", min: 34, max: 42, label: { en: "Extremely severe" } },
24
24
  ];
25
25
  /**
26
26
  * DASS-21 — Depression Anxiety Stress Scales, short form.
@@ -36,18 +36,12 @@ exports.dass21 = {
36
36
  version: "1.0.0",
37
37
  title: {
38
38
  en: "Depression Anxiety Stress Scales (DASS-21)",
39
- tr: "Depresyon Anksiyete Stres Ölçeği (DASS-21)",
40
- de: "Depressions-Angst-Stress-Skalen (DASS-21)",
41
39
  },
42
40
  description: {
43
41
  en: "A 21-item self-report questionnaire measuring depression, anxiety, and stress over the past week.",
44
- tr: "Geçtiğimiz hafta boyunca depresyon, anksiyete ve stresi ölçen 21 maddelik bir öz bildirim ölçeği.",
45
- de: "Ein Selbstbeurteilungsfragebogen mit 21 Items zur Messung von Depression, Angst und Stress in der vergangenen Woche.",
46
42
  },
47
43
  instructions: {
48
44
  en: "Please read each statement and select the option which indicates how much the statement applied to you over the past week. There are no right or wrong answers. Do not spend too much time on any statement.",
49
- tr: "Lütfen her ifadeyi okuyun ve geçtiğimiz hafta boyunca ifadenin size ne kadar uyduğunu gösteren seçeneği işaretleyin. Doğru ya da yanlış cevap yoktur. Herhangi bir ifade üzerinde çok fazla zaman harcamayın.",
50
- de: "Bitte lesen Sie jede Aussage und wählen Sie die Option, die angibt, wie sehr die Aussage in der vergangenen Woche auf Sie zutraf. Es gibt keine richtigen oder falschen Antworten. Verbringen Sie nicht zu viel Zeit mit einer Aussage.",
51
45
  },
52
46
  defaultLocale: "en",
53
47
  options: [
@@ -55,32 +49,24 @@ exports.dass21 = {
55
49
  value: 0,
56
50
  label: {
57
51
  en: "Did not apply to me at all",
58
- tr: "Bana hiç uymadı",
59
- de: "Traf gar nicht auf mich zu",
60
52
  },
61
53
  },
62
54
  {
63
55
  value: 1,
64
56
  label: {
65
57
  en: "Applied to me to some degree, or some of the time",
66
- tr: "Bana biraz uydu ya da zaman zaman uydu",
67
- de: "Traf bis zu einem gewissen Grad oder manchmal auf mich zu",
68
58
  },
69
59
  },
70
60
  {
71
61
  value: 2,
72
62
  label: {
73
63
  en: "Applied to me to a considerable degree, or a good part of the time",
74
- tr: "Bana oldukça uydu ya da zamanın büyük bölümünde uydu",
75
- de: "Traf in beträchtlichem Maße oder einen guten Teil der Zeit auf mich zu",
76
64
  },
77
65
  },
78
66
  {
79
67
  value: 3,
80
68
  label: {
81
69
  en: "Applied to me very much, or most of the time",
82
- tr: "Bana çok uydu ya da hemen hemen her zaman uydu",
83
- de: "Traf sehr stark oder die meiste Zeit auf mich zu",
84
70
  },
85
71
  },
86
72
  ],
@@ -89,168 +75,126 @@ exports.dass21 = {
89
75
  id: "dass21-1",
90
76
  text: {
91
77
  en: "I found it hard to wind down",
92
- tr: "Sakinleşip yatışmakta zorlandım",
93
- de: "Ich fand es schwer, mich zu beruhigen",
94
78
  },
95
79
  },
96
80
  {
97
81
  id: "dass21-2",
98
82
  text: {
99
83
  en: "I was aware of dryness of my mouth",
100
- tr: "Ağzımın kuruduğunu fark ettim",
101
- de: "Ich bemerkte, dass mein Mund trocken war",
102
84
  },
103
85
  },
104
86
  {
105
87
  id: "dass21-3",
106
88
  text: {
107
89
  en: "I couldn't seem to experience any positive feeling at all",
108
- tr: "Hiç olumlu duygu yaşayamadığımı fark ettim",
109
- de: "Ich konnte überhaupt keine positiven Gefühle mehr erleben",
110
90
  },
111
91
  },
112
92
  {
113
93
  id: "dass21-4",
114
94
  text: {
115
95
  en: "I experienced breathing difficulty (e.g. excessively rapid breathing, breathlessness in the absence of physical exertion)",
116
- tr: "Nefes almada zorluk yaşadım (örneğin, fiziksel çaba göstermediğim hâlde aşırı hızlı nefes alma, nefessiz kalma)",
117
- de: "Ich hatte Atemprobleme (z. B. übermäßig schnelle Atmung, Atemlosigkeit ohne körperliche Anstrengung)",
118
96
  },
119
97
  },
120
98
  {
121
99
  id: "dass21-5",
122
100
  text: {
123
101
  en: "I found it difficult to work up the initiative to do things",
124
- tr: "Bir işe başlamak için gereken isteği kendimde bulmakta zorlandım",
125
- de: "Es fiel mir schwer, die Initiative zu ergreifen, um Dinge zu erledigen",
126
102
  },
127
103
  },
128
104
  {
129
105
  id: "dass21-6",
130
106
  text: {
131
107
  en: "I tended to over-react to situations",
132
- tr: "Olaylara aşırı tepki verme eğiliminde oldum",
133
- de: "Ich neigte dazu, auf Situationen überzureagieren",
134
108
  },
135
109
  },
136
110
  {
137
111
  id: "dass21-7",
138
112
  text: {
139
113
  en: "I experienced trembling (e.g. in the hands)",
140
- tr: "Titreme yaşadım (örneğin ellerde)",
141
- de: "Ich hatte Zittern (z. B. in den Händen)",
142
114
  },
143
115
  },
144
116
  {
145
117
  id: "dass21-8",
146
118
  text: {
147
119
  en: "I felt that I was using a lot of nervous energy",
148
- tr: "Sinirsel enerjimin çok fazla olduğunu hissettim",
149
- de: "Ich fühlte, dass ich viel nervöse Energie verbrauchte",
150
120
  },
151
121
  },
152
122
  {
153
123
  id: "dass21-9",
154
124
  text: {
155
125
  en: "I was worried about situations in which I might panic and make a fool of myself",
156
- tr: "Panikleyip kendimi gülünç duruma düşürebileceğim durumlar nedeniyle endişelendim",
157
- de: "Ich machte mir Sorgen über Situationen, in denen ich in Panik geraten und mich blamieren könnte",
158
126
  },
159
127
  },
160
128
  {
161
129
  id: "dass21-10",
162
130
  text: {
163
131
  en: "I felt that I had nothing to look forward to",
164
- tr: "Dört gözle beklediğim hiçbir şey olmadığını hissettim",
165
- de: "Ich hatte das Gefühl, mich auf nichts mehr freuen zu können",
166
132
  },
167
133
  },
168
134
  {
169
135
  id: "dass21-11",
170
136
  text: {
171
137
  en: "I found myself getting agitated",
172
- tr: "Giderek huzursuzlandığımı fark ettim",
173
- de: "Ich merkte, dass ich unruhig wurde",
174
138
  },
175
139
  },
176
140
  {
177
141
  id: "dass21-12",
178
142
  text: {
179
143
  en: "I found it difficult to relax",
180
- tr: "Gevşeyip rahatlamakta zorlandım",
181
- de: "Es fiel mir schwer, mich zu entspannen",
182
144
  },
183
145
  },
184
146
  {
185
147
  id: "dass21-13",
186
148
  text: {
187
149
  en: "I felt down-hearted and blue",
188
- tr: "Kendimi üzgün ve karamsar hissettim",
189
- de: "Ich fühlte mich niedergeschlagen und traurig",
190
150
  },
191
151
  },
192
152
  {
193
153
  id: "dass21-14",
194
154
  text: {
195
155
  en: "I was intolerant of anything that kept me from getting on with what I was doing",
196
- tr: "Yaptığım işi sürdürmeme engel olan şeylere tahammül edemedim",
197
- de: "Ich konnte es nicht ertragen, von dem, was ich gerade tat, abgehalten zu werden",
198
156
  },
199
157
  },
200
158
  {
201
159
  id: "dass21-15",
202
160
  text: {
203
161
  en: "I felt I was close to panic",
204
- tr: "Panik olmaya yakın olduğumu hissettim",
205
- de: "Ich fühlte mich einer Panik nahe",
206
162
  },
207
163
  },
208
164
  {
209
165
  id: "dass21-16",
210
166
  text: {
211
167
  en: "I was unable to become enthusiastic about anything",
212
- tr: "Hiçbir şeye karşı heves duyamadım",
213
- de: "Ich konnte mich für nichts mehr begeistern",
214
168
  },
215
169
  },
216
170
  {
217
171
  id: "dass21-17",
218
172
  text: {
219
173
  en: "I felt I wasn't worth much as a person",
220
- tr: "Kişi olarak fazla bir değerimin olmadığını hissettim",
221
- de: "Ich hatte das Gefühl, als Person nicht viel wert zu sein",
222
174
  },
223
175
  },
224
176
  {
225
177
  id: "dass21-18",
226
178
  text: {
227
179
  en: "I felt that I was rather touchy",
228
- tr: "Oldukça alıngan olduğumu hissettim",
229
- de: "Ich fühlte, dass ich ziemlich empfindlich war",
230
180
  },
231
181
  },
232
182
  {
233
183
  id: "dass21-19",
234
184
  text: {
235
185
  en: "I was aware of the action of my heart in the absence of physical exertion (e.g. sense of heart rate increase, heart missing a beat)",
236
- tr: "Fiziksel çaba göstermediğim hâlde kalbimin hareketlerini fark ettim (örneğin, kalp atışının hızlanması, kalbin bir atışı atlaması)",
237
- de: "Ich nahm meinen Herzschlag wahr, ohne mich körperlich angestrengt zu haben (z. B. Gefühl von Herzrasen oder Herzstolpern)",
238
186
  },
239
187
  },
240
188
  {
241
189
  id: "dass21-20",
242
190
  text: {
243
191
  en: "I felt scared without any good reason",
244
- tr: "Geçerli bir neden olmadığı hâlde korktuğumu hissettim",
245
- de: "Ich fühlte mich ohne triftigen Grund ängstlich",
246
192
  },
247
193
  },
248
194
  {
249
195
  id: "dass21-21",
250
196
  text: {
251
197
  en: "I felt that life was meaningless",
252
- tr: "Yaşamın anlamsız olduğunu hissettim",
253
- de: "Ich hatte das Gefühl, dass das Leben sinnlos ist",
254
198
  },
255
199
  },
256
200
  ],
@@ -259,21 +203,21 @@ exports.dass21 = {
259
203
  subscales: [
260
204
  {
261
205
  id: "depression",
262
- label: { en: "Depression", tr: "Depresyon", de: "Depression" },
206
+ label: { en: "Depression" },
263
207
  questionIds: ["dass21-3", "dass21-5", "dass21-10", "dass21-13", "dass21-16", "dass21-17", "dass21-21"],
264
208
  multiplier: 2,
265
209
  bands: depressionBands,
266
210
  },
267
211
  {
268
212
  id: "anxiety",
269
- label: { en: "Anxiety", tr: "Anksiyete", de: "Angst" },
213
+ label: { en: "Anxiety" },
270
214
  questionIds: ["dass21-2", "dass21-4", "dass21-7", "dass21-9", "dass21-15", "dass21-19", "dass21-20"],
271
215
  multiplier: 2,
272
216
  bands: anxietyBands,
273
217
  },
274
218
  {
275
219
  id: "stress",
276
- label: { en: "Stress", tr: "Stres", de: "Stress" },
220
+ label: { en: "Stress" },
277
221
  questionIds: ["dass21-1", "dass21-6", "dass21-8", "dass21-11", "dass21-12", "dass21-14", "dass21-18"],
278
222
  multiplier: 2,
279
223
  bands: stressBands,
@@ -284,7 +228,7 @@ exports.dass21 = {
284
228
  reference: "Lovibond, S. H., & Lovibond, P. F. (1995). Manual for the Depression Anxiety Stress Scales (2nd ed.). Sydney: Psychology Foundation.",
285
229
  license: "Free — public domain per the official DASS site, including translations",
286
230
  licenseFlag: "free",
287
- translationProvenance: "en: reproduced from the original. tr/de: AI translation (Anthropic Claude, claude-fable-5) from the original English; official translations were not consulted and the texts are unverified. See SOURCES.md.",
231
+ translationProvenance: "en: reproduced from the original. Other locales (tr, de, zh, es): AI translation (Anthropic Claude, claude-fable-5) from the original English; official translations were not consulted and the texts are unverified. See SOURCES.md.",
288
232
  timeframe: "past week",
289
233
  },
290
234
  };
@@ -15,13 +15,9 @@ exports.gad7 = {
15
15
  version: "1.0.0",
16
16
  title: {
17
17
  en: "Generalized Anxiety Disorder Scale (GAD-7)",
18
- tr: "Yaygın Anksiyete Bozukluğu Ölçeği (GAD-7)",
19
- de: "Generalisierte Angststörung Skala (GAD-7)",
20
18
  },
21
19
  description: {
22
20
  en: "A 7-item self-report questionnaire for screening and measuring the severity of generalized anxiety.",
23
- tr: "Yaygın anksiyeteyi taramak ve şiddetini ölçmek için kullanılan 7 maddelik bir öz bildirim ölçeği.",
24
- de: "Ein Selbstbeurteilungsfragebogen mit 7 Items zum Screening und zur Schweregradmessung generalisierter Angst.",
25
21
  },
26
22
  instructions: common_ts_1.twoWeekInstructions,
27
23
  defaultLocale: "en",
@@ -31,56 +27,42 @@ exports.gad7 = {
31
27
  id: "gad7-1",
32
28
  text: {
33
29
  en: "Feeling nervous, anxious, or on edge",
34
- tr: "Sinirli, kaygılı ya da çok gergin hissetme",
35
- de: "Nervosität, Ängstlichkeit oder Anspannung",
36
30
  },
37
31
  },
38
32
  {
39
33
  id: "gad7-2",
40
34
  text: {
41
35
  en: "Not being able to stop or control worrying",
42
- tr: "Endişelenmeyi durduramama ya da kontrol edememe",
43
- de: "Nicht in der Lage sein, Sorgen zu stoppen oder zu kontrollieren",
44
36
  },
45
37
  },
46
38
  {
47
39
  id: "gad7-3",
48
40
  text: {
49
41
  en: "Worrying too much about different things",
50
- tr: "Farklı konular hakkında çok fazla endişelenme",
51
- de: "Übermäßige Sorgen bezüglich verschiedener Angelegenheiten",
52
42
  },
53
43
  },
54
44
  {
55
45
  id: "gad7-4",
56
46
  text: {
57
47
  en: "Trouble relaxing",
58
- tr: "Gevşeyip rahatlamada güçlük",
59
- de: "Schwierigkeiten, sich zu entspannen",
60
48
  },
61
49
  },
62
50
  {
63
51
  id: "gad7-5",
64
52
  text: {
65
53
  en: "Being so restless that it is hard to sit still",
66
- tr: "Yerinde duramayacak kadar huzursuz olma",
67
- de: "Rastlosigkeit, sodass das Stillsitzen schwerfällt",
68
54
  },
69
55
  },
70
56
  {
71
57
  id: "gad7-6",
72
58
  text: {
73
59
  en: "Becoming easily annoyed or irritable",
74
- tr: "Çabuk kızma ya da kolayca sinirlenir olma",
75
- de: "Schnelle Verärgerung oder Gereiztheit",
76
60
  },
77
61
  },
78
62
  {
79
63
  id: "gad7-7",
80
64
  text: {
81
65
  en: "Feeling afraid, as if something awful might happen",
82
- tr: "Sanki çok kötü bir şey olacakmış gibi korkuya kapılma",
83
- de: "Angstgefühl, als könnte etwas Schlimmes passieren",
84
66
  },
85
67
  },
86
68
  ],
@@ -91,25 +73,25 @@ exports.gad7 = {
91
73
  id: "minimal",
92
74
  min: 0,
93
75
  max: 4,
94
- label: { en: "Minimal anxiety", tr: "Minimal anksiyete", de: "Minimale Angst" },
76
+ label: { en: "Minimal anxiety" },
95
77
  },
96
78
  {
97
79
  id: "mild",
98
80
  min: 5,
99
81
  max: 9,
100
- label: { en: "Mild anxiety", tr: "Hafif anksiyete", de: "Leichte Angst" },
82
+ label: { en: "Mild anxiety" },
101
83
  },
102
84
  {
103
85
  id: "moderate",
104
86
  min: 10,
105
87
  max: 14,
106
- label: { en: "Moderate anxiety", tr: "Orta düzeyde anksiyete", de: "Mittelgradige Angst" },
88
+ label: { en: "Moderate anxiety" },
107
89
  },
108
90
  {
109
91
  id: "severe",
110
92
  min: 15,
111
93
  max: 21,
112
- label: { en: "Severe anxiety", tr: "Şiddetli anksiyete", de: "Schwere Angst" },
94
+ label: { en: "Severe anxiety" },
113
95
  },
114
96
  ],
115
97
  },
@@ -117,7 +99,7 @@ exports.gad7 = {
117
99
  reference: "Spitzer, R. L., Kroenke, K., Williams, J. B., & Löwe, B. (2006). A brief measure for assessing generalized anxiety disorder: the GAD-7. Archives of Internal Medicine, 166(10), 1092-1097.",
118
100
  license: "Free — no permission required to reproduce, translate, display or distribute (Pfizer educational grant)",
119
101
  licenseFlag: "free",
120
- translationProvenance: "en: reproduced from the original. tr/de: AI translation (Anthropic Claude, claude-fable-5) from the original English; official translations were not consulted and the texts are unverified. See SOURCES.md.",
102
+ translationProvenance: "en: reproduced from the original. Other locales (tr, de, zh, es): AI translation (Anthropic Claude, claude-fable-5) from the original English; official translations were not consulted and the texts are unverified. See SOURCES.md.",
121
103
  timeframe: "past 2 weeks",
122
104
  },
123
105
  };
@@ -15,6 +15,15 @@ export declare const inventories: Readonly<Record<string, AssessmentDefinition>>
15
15
  export type InventoryId = "phq9" | "gad7" | "dass21" | "who5" | "asrs6" | "aq10" | "audit" | "mini-ipip";
16
16
  /**
17
17
  * Instantiates a predefined inventory as an `Assessment`.
18
- * @throws PsytoolsError `unknown_inventory`
18
+ *
19
+ * Base definitions carry English only; other languages live in separate
20
+ * locale-pack modules that are dynamically imported — and only then held
21
+ * in memory — when listed in `options.locales` (data minimization by
22
+ * default). The returned assessment's definition is still one complete,
23
+ * serializable JSON object containing exactly the requested locales.
24
+ *
25
+ * @throws PsytoolsError `unknown_inventory` | `unknown_locale`
19
26
  */
20
- export declare function loadInventory(id: InventoryId | string): Assessment;
27
+ export declare function loadInventory(id: InventoryId | string, options?: {
28
+ locales?: string[];
29
+ }): Promise<Assessment>;
@@ -4,6 +4,8 @@ exports.inventories = exports.twoWeekInstructions = exports.twoWeekFrequencyOpti
4
4
  exports.loadInventory = loadInventory;
5
5
  const assessment_ts_1 = require("../assessment.js");
6
6
  const errors_ts_1 = require("../errors.js");
7
+ const i18n_ts_1 = require("../i18n.js");
8
+ const index_ts_1 = require("../locales/index.js");
7
9
  const phq9_ts_1 = require("./phq9.js");
8
10
  Object.defineProperty(exports, "phq9", { enumerable: true, get: function () { return phq9_ts_1.phq9; } });
9
11
  const gad7_ts_1 = require("./gad7.js");
@@ -36,13 +38,30 @@ exports.inventories = {
36
38
  };
37
39
  /**
38
40
  * Instantiates a predefined inventory as an `Assessment`.
39
- * @throws PsytoolsError `unknown_inventory`
41
+ *
42
+ * Base definitions carry English only; other languages live in separate
43
+ * locale-pack modules that are dynamically imported — and only then held
44
+ * in memory — when listed in `options.locales` (data minimization by
45
+ * default). The returned assessment's definition is still one complete,
46
+ * serializable JSON object containing exactly the requested locales.
47
+ *
48
+ * @throws PsytoolsError `unknown_inventory` | `unknown_locale`
40
49
  */
41
- function loadInventory(id) {
50
+ async function loadInventory(id, options) {
42
51
  const definition = exports.inventories[id];
43
52
  if (!definition) {
44
53
  const known = Object.keys(exports.inventories).join(", ");
45
54
  throw new errors_ts_1.PsytoolsError("unknown_inventory", `Unknown inventory "${id}" (available: ${known})`);
46
55
  }
47
- return new assessment_ts_1.Assessment(definition);
56
+ let merged = definition;
57
+ for (const locale of options?.locales ?? []) {
58
+ if (locale === definition.defaultLocale)
59
+ continue;
60
+ const loader = index_ts_1.localePacks[id]?.[locale];
61
+ if (!loader) {
62
+ throw new errors_ts_1.PsytoolsError("unknown_locale", `No "${locale}" locale pack for inventory "${id}" (available: ${(0, index_ts_1.availableLocales)(id).join(", ")})`);
63
+ }
64
+ merged = (0, i18n_ts_1.applyLocale)(merged, (await loader()).default);
65
+ }
66
+ return new assessment_ts_1.Assessment(merged);
48
67
  }