psytools 0.4.0 → 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 (216) hide show
  1. package/README.md +27 -4
  2. package/SOURCES.md +3 -1
  3. package/dist/cjs/errors.d.ts +1 -1
  4. package/dist/cjs/i18n.d.ts +21 -1
  5. package/dist/cjs/i18n.js +136 -0
  6. package/dist/cjs/index.d.ts +4 -2
  7. package/dist/cjs/index.js +19 -14
  8. package/dist/cjs/inventories/aq10.js +4 -64
  9. package/dist/cjs/inventories/asrs6.js +5 -49
  10. package/dist/cjs/inventories/audit.js +8 -116
  11. package/dist/cjs/inventories/common.js +0 -20
  12. package/dist/cjs/inventories/dass21.js +18 -130
  13. package/dist/cjs/inventories/gad7.js +4 -40
  14. package/dist/cjs/inventories/index.d.ts +11 -2
  15. package/dist/cjs/inventories/index.js +22 -3
  16. package/dist/cjs/inventories/mini-ipip.js +0 -132
  17. package/dist/cjs/inventories/phq9.js +5 -53
  18. package/dist/cjs/inventories/who5.js +4 -56
  19. package/dist/cjs/locales/de/aq10.d.ts +4 -0
  20. package/dist/cjs/locales/de/aq10.js +53 -0
  21. package/dist/cjs/locales/de/asrs6.d.ts +4 -0
  22. package/dist/cjs/locales/de/asrs6.js +42 -0
  23. package/dist/cjs/locales/de/audit.d.ts +4 -0
  24. package/dist/cjs/locales/de/audit.js +80 -0
  25. package/dist/cjs/locales/de/dass21.d.ts +4 -0
  26. package/dist/cjs/locales/de/dass21.js +114 -0
  27. package/dist/cjs/locales/de/gad7.d.ts +4 -0
  28. package/dist/cjs/locales/de/gad7.js +46 -0
  29. package/dist/cjs/locales/de/mini-ipip.d.ts +4 -0
  30. package/dist/cjs/locales/de/mini-ipip.js +97 -0
  31. package/dist/cjs/locales/de/phq9.d.ts +4 -0
  32. package/dist/cjs/locales/de/phq9.js +56 -0
  33. package/dist/cjs/locales/de/who5.d.ts +4 -0
  34. package/dist/cjs/locales/de/who5.js +41 -0
  35. package/dist/cjs/locales/es/aq10.d.ts +4 -0
  36. package/dist/cjs/locales/es/aq10.js +53 -0
  37. package/dist/cjs/locales/es/asrs6.d.ts +4 -0
  38. package/dist/cjs/locales/es/asrs6.js +42 -0
  39. package/dist/cjs/locales/es/audit.d.ts +4 -0
  40. package/dist/cjs/locales/es/audit.js +80 -0
  41. package/dist/cjs/locales/es/dass21.d.ts +4 -0
  42. package/dist/cjs/locales/es/dass21.js +114 -0
  43. package/dist/cjs/locales/es/gad7.d.ts +4 -0
  44. package/dist/cjs/locales/es/gad7.js +46 -0
  45. package/dist/cjs/locales/es/mini-ipip.d.ts +4 -0
  46. package/dist/cjs/locales/es/mini-ipip.js +97 -0
  47. package/dist/cjs/locales/es/phq9.d.ts +4 -0
  48. package/dist/cjs/locales/es/phq9.js +56 -0
  49. package/dist/cjs/locales/es/who5.d.ts +4 -0
  50. package/dist/cjs/locales/es/who5.js +41 -0
  51. package/dist/cjs/locales/index.d.ts +12 -0
  52. package/dist/cjs/locales/index.js +63 -0
  53. package/dist/cjs/locales/tr/aq10.d.ts +4 -0
  54. package/dist/cjs/locales/tr/aq10.js +53 -0
  55. package/dist/cjs/locales/tr/asrs6.d.ts +4 -0
  56. package/dist/cjs/locales/tr/asrs6.js +42 -0
  57. package/dist/cjs/locales/tr/audit.d.ts +4 -0
  58. package/dist/cjs/locales/tr/audit.js +80 -0
  59. package/dist/cjs/locales/tr/dass21.d.ts +4 -0
  60. package/dist/cjs/locales/tr/dass21.js +114 -0
  61. package/dist/cjs/locales/tr/gad7.d.ts +4 -0
  62. package/dist/cjs/locales/tr/gad7.js +46 -0
  63. package/dist/cjs/locales/tr/mini-ipip.d.ts +4 -0
  64. package/dist/cjs/locales/tr/mini-ipip.js +97 -0
  65. package/dist/cjs/locales/tr/phq9.d.ts +4 -0
  66. package/dist/cjs/locales/tr/phq9.js +56 -0
  67. package/dist/cjs/locales/tr/who5.d.ts +4 -0
  68. package/dist/cjs/locales/tr/who5.js +41 -0
  69. package/dist/cjs/locales/zh/aq10.d.ts +4 -0
  70. package/dist/cjs/locales/zh/aq10.js +53 -0
  71. package/dist/cjs/locales/zh/asrs6.d.ts +4 -0
  72. package/dist/cjs/locales/zh/asrs6.js +42 -0
  73. package/dist/cjs/locales/zh/audit.d.ts +4 -0
  74. package/dist/cjs/locales/zh/audit.js +80 -0
  75. package/dist/cjs/locales/zh/dass21.d.ts +4 -0
  76. package/dist/cjs/locales/zh/dass21.js +114 -0
  77. package/dist/cjs/locales/zh/gad7.d.ts +4 -0
  78. package/dist/cjs/locales/zh/gad7.js +46 -0
  79. package/dist/cjs/locales/zh/mini-ipip.d.ts +4 -0
  80. package/dist/cjs/locales/zh/mini-ipip.js +97 -0
  81. package/dist/cjs/locales/zh/phq9.d.ts +4 -0
  82. package/dist/cjs/locales/zh/phq9.js +56 -0
  83. package/dist/cjs/locales/zh/who5.d.ts +4 -0
  84. package/dist/cjs/locales/zh/who5.js +41 -0
  85. package/dist/cjs/types.d.ts +30 -0
  86. package/dist/esm/errors.d.ts +1 -1
  87. package/dist/esm/i18n.d.ts +21 -1
  88. package/dist/esm/i18n.js +134 -0
  89. package/dist/esm/index.d.ts +4 -2
  90. package/dist/esm/index.js +2 -1
  91. package/dist/esm/inventories/aq10.js +4 -64
  92. package/dist/esm/inventories/asrs6.js +5 -49
  93. package/dist/esm/inventories/audit.js +8 -116
  94. package/dist/esm/inventories/common.js +0 -20
  95. package/dist/esm/inventories/dass21.js +18 -130
  96. package/dist/esm/inventories/gad7.js +4 -40
  97. package/dist/esm/inventories/index.d.ts +11 -2
  98. package/dist/esm/inventories/index.js +22 -3
  99. package/dist/esm/inventories/mini-ipip.js +0 -132
  100. package/dist/esm/inventories/phq9.js +5 -53
  101. package/dist/esm/inventories/who5.js +4 -56
  102. package/dist/esm/locales/de/aq10.d.ts +4 -0
  103. package/dist/esm/locales/de/aq10.js +51 -0
  104. package/dist/esm/locales/de/asrs6.d.ts +4 -0
  105. package/dist/esm/locales/de/asrs6.js +40 -0
  106. package/dist/esm/locales/de/audit.d.ts +4 -0
  107. package/dist/esm/locales/de/audit.js +78 -0
  108. package/dist/esm/locales/de/dass21.d.ts +4 -0
  109. package/dist/esm/locales/de/dass21.js +112 -0
  110. package/dist/esm/locales/de/gad7.d.ts +4 -0
  111. package/dist/esm/locales/de/gad7.js +44 -0
  112. package/dist/esm/locales/de/mini-ipip.d.ts +4 -0
  113. package/dist/esm/locales/de/mini-ipip.js +95 -0
  114. package/dist/esm/locales/de/phq9.d.ts +4 -0
  115. package/dist/esm/locales/de/phq9.js +54 -0
  116. package/dist/esm/locales/de/who5.d.ts +4 -0
  117. package/dist/esm/locales/de/who5.js +39 -0
  118. package/dist/esm/locales/es/aq10.d.ts +4 -0
  119. package/dist/esm/locales/es/aq10.js +51 -0
  120. package/dist/esm/locales/es/asrs6.d.ts +4 -0
  121. package/dist/esm/locales/es/asrs6.js +40 -0
  122. package/dist/esm/locales/es/audit.d.ts +4 -0
  123. package/dist/esm/locales/es/audit.js +78 -0
  124. package/dist/esm/locales/es/dass21.d.ts +4 -0
  125. package/dist/esm/locales/es/dass21.js +112 -0
  126. package/dist/esm/locales/es/gad7.d.ts +4 -0
  127. package/dist/esm/locales/es/gad7.js +44 -0
  128. package/dist/esm/locales/es/mini-ipip.d.ts +4 -0
  129. package/dist/esm/locales/es/mini-ipip.js +95 -0
  130. package/dist/esm/locales/es/phq9.d.ts +4 -0
  131. package/dist/esm/locales/es/phq9.js +54 -0
  132. package/dist/esm/locales/es/who5.d.ts +4 -0
  133. package/dist/esm/locales/es/who5.js +39 -0
  134. package/dist/esm/locales/index.d.ts +12 -0
  135. package/dist/esm/locales/index.js +59 -0
  136. package/dist/esm/locales/tr/aq10.d.ts +4 -0
  137. package/dist/esm/locales/tr/aq10.js +51 -0
  138. package/dist/esm/locales/tr/asrs6.d.ts +4 -0
  139. package/dist/esm/locales/tr/asrs6.js +40 -0
  140. package/dist/esm/locales/tr/audit.d.ts +4 -0
  141. package/dist/esm/locales/tr/audit.js +78 -0
  142. package/dist/esm/locales/tr/dass21.d.ts +4 -0
  143. package/dist/esm/locales/tr/dass21.js +112 -0
  144. package/dist/esm/locales/tr/gad7.d.ts +4 -0
  145. package/dist/esm/locales/tr/gad7.js +44 -0
  146. package/dist/esm/locales/tr/mini-ipip.d.ts +4 -0
  147. package/dist/esm/locales/tr/mini-ipip.js +95 -0
  148. package/dist/esm/locales/tr/phq9.d.ts +4 -0
  149. package/dist/esm/locales/tr/phq9.js +54 -0
  150. package/dist/esm/locales/tr/who5.d.ts +4 -0
  151. package/dist/esm/locales/tr/who5.js +39 -0
  152. package/dist/esm/locales/zh/aq10.d.ts +4 -0
  153. package/dist/esm/locales/zh/aq10.js +51 -0
  154. package/dist/esm/locales/zh/asrs6.d.ts +4 -0
  155. package/dist/esm/locales/zh/asrs6.js +40 -0
  156. package/dist/esm/locales/zh/audit.d.ts +4 -0
  157. package/dist/esm/locales/zh/audit.js +78 -0
  158. package/dist/esm/locales/zh/dass21.d.ts +4 -0
  159. package/dist/esm/locales/zh/dass21.js +112 -0
  160. package/dist/esm/locales/zh/gad7.d.ts +4 -0
  161. package/dist/esm/locales/zh/gad7.js +44 -0
  162. package/dist/esm/locales/zh/mini-ipip.d.ts +4 -0
  163. package/dist/esm/locales/zh/mini-ipip.js +95 -0
  164. package/dist/esm/locales/zh/phq9.d.ts +4 -0
  165. package/dist/esm/locales/zh/phq9.js +54 -0
  166. package/dist/esm/locales/zh/who5.d.ts +4 -0
  167. package/dist/esm/locales/zh/who5.js +39 -0
  168. package/dist/esm/types.d.ts +30 -0
  169. package/package.json +21 -1
  170. package/src/errors.ts +1 -0
  171. package/src/i18n.ts +176 -1
  172. package/src/index.ts +4 -1
  173. package/src/inventories/aq10.ts +4 -64
  174. package/src/inventories/asrs6.ts +5 -49
  175. package/src/inventories/audit.ts +8 -116
  176. package/src/inventories/common.ts +0 -20
  177. package/src/inventories/dass21.ts +18 -130
  178. package/src/inventories/gad7.ts +4 -40
  179. package/src/inventories/index.ts +27 -3
  180. package/src/inventories/mini-ipip.ts +0 -132
  181. package/src/inventories/phq9.ts +5 -53
  182. package/src/inventories/who5.ts +4 -56
  183. package/src/locales/de/aq10.ts +54 -0
  184. package/src/locales/de/asrs6.ts +43 -0
  185. package/src/locales/de/audit.ts +81 -0
  186. package/src/locales/de/dass21.ts +115 -0
  187. package/src/locales/de/gad7.ts +47 -0
  188. package/src/locales/de/mini-ipip.ts +98 -0
  189. package/src/locales/de/phq9.ts +57 -0
  190. package/src/locales/de/who5.ts +42 -0
  191. package/src/locales/es/aq10.ts +54 -0
  192. package/src/locales/es/asrs6.ts +43 -0
  193. package/src/locales/es/audit.ts +81 -0
  194. package/src/locales/es/dass21.ts +115 -0
  195. package/src/locales/es/gad7.ts +47 -0
  196. package/src/locales/es/mini-ipip.ts +98 -0
  197. package/src/locales/es/phq9.ts +57 -0
  198. package/src/locales/es/who5.ts +42 -0
  199. package/src/locales/index.ts +64 -0
  200. package/src/locales/tr/aq10.ts +54 -0
  201. package/src/locales/tr/asrs6.ts +43 -0
  202. package/src/locales/tr/audit.ts +81 -0
  203. package/src/locales/tr/dass21.ts +115 -0
  204. package/src/locales/tr/gad7.ts +47 -0
  205. package/src/locales/tr/mini-ipip.ts +98 -0
  206. package/src/locales/tr/phq9.ts +57 -0
  207. package/src/locales/tr/who5.ts +42 -0
  208. package/src/locales/zh/aq10.ts +54 -0
  209. package/src/locales/zh/asrs6.ts +43 -0
  210. package/src/locales/zh/audit.ts +81 -0
  211. package/src/locales/zh/dass21.ts +115 -0
  212. package/src/locales/zh/gad7.ts +47 -0
  213. package/src/locales/zh/mini-ipip.ts +98 -0
  214. package/src/locales/zh/phq9.ts +57 -0
  215. package/src/locales/zh/who5.ts +42 -0
  216. package/src/types.ts +25 -0
@@ -1,23 +1,23 @@
1
1
  const depressionBands = [
2
- { id: "normal", min: 0, max: 9, label: { en: "Normal", tr: "Normal", de: "Normal", zh: "正常", es: "Normal" } },
3
- { id: "mild", min: 10, max: 13, label: { en: "Mild", tr: "Hafif", de: "Leicht", zh: "轻度", es: "Leve" } },
4
- { id: "moderate", min: 14, max: 20, label: { en: "Moderate", tr: "Orta", de: "Moderat", zh: "中度", es: "Moderado" } },
5
- { id: "severe", min: 21, max: 27, label: { en: "Severe", tr: "Şiddetli", de: "Schwer", zh: "重度", es: "Grave" } },
6
- { id: "extremely-severe", min: 28, max: 42, label: { en: "Extremely severe", tr: "Çok şiddetli", de: "Sehr schwer", zh: "极重度", es: "Extremadamente grave" } },
2
+ { id: "normal", min: 0, max: 9, label: { en: "Normal" } },
3
+ { id: "mild", min: 10, max: 13, label: { en: "Mild" } },
4
+ { id: "moderate", min: 14, max: 20, label: { en: "Moderate" } },
5
+ { id: "severe", min: 21, max: 27, label: { en: "Severe" } },
6
+ { id: "extremely-severe", min: 28, max: 42, label: { en: "Extremely severe" } },
7
7
  ];
8
8
  const anxietyBands = [
9
- { id: "normal", min: 0, max: 7, label: { en: "Normal", tr: "Normal", de: "Normal", zh: "正常", es: "Normal" } },
10
- { id: "mild", min: 8, max: 9, label: { en: "Mild", tr: "Hafif", de: "Leicht", zh: "轻度", es: "Leve" } },
11
- { id: "moderate", min: 10, max: 14, label: { en: "Moderate", tr: "Orta", de: "Moderat", zh: "中度", es: "Moderado" } },
12
- { id: "severe", min: 15, max: 19, label: { en: "Severe", tr: "Şiddetli", de: "Schwer", zh: "重度", es: "Grave" } },
13
- { id: "extremely-severe", min: 20, max: 42, label: { en: "Extremely severe", tr: "Çok şiddetli", de: "Sehr schwer", zh: "极重度", es: "Extremadamente grave" } },
9
+ { id: "normal", min: 0, max: 7, label: { en: "Normal" } },
10
+ { id: "mild", min: 8, max: 9, label: { en: "Mild" } },
11
+ { id: "moderate", min: 10, max: 14, label: { en: "Moderate" } },
12
+ { id: "severe", min: 15, max: 19, label: { en: "Severe" } },
13
+ { id: "extremely-severe", min: 20, max: 42, label: { en: "Extremely severe" } },
14
14
  ];
15
15
  const stressBands = [
16
- { id: "normal", min: 0, max: 14, label: { en: "Normal", tr: "Normal", de: "Normal", zh: "正常", es: "Normal" } },
17
- { id: "mild", min: 15, max: 18, label: { en: "Mild", tr: "Hafif", de: "Leicht", zh: "轻度", es: "Leve" } },
18
- { id: "moderate", min: 19, max: 25, label: { en: "Moderate", tr: "Orta", de: "Moderat", zh: "中度", es: "Moderado" } },
19
- { id: "severe", min: 26, max: 33, label: { en: "Severe", tr: "Şiddetli", de: "Schwer", zh: "重度", es: "Grave" } },
20
- { id: "extremely-severe", min: 34, max: 42, label: { en: "Extremely severe", tr: "Çok şiddetli", de: "Sehr schwer", zh: "极重度", es: "Extremadamente grave" } },
16
+ { id: "normal", min: 0, max: 14, label: { en: "Normal" } },
17
+ { id: "mild", min: 15, max: 18, label: { en: "Mild" } },
18
+ { id: "moderate", min: 19, max: 25, label: { en: "Moderate" } },
19
+ { id: "severe", min: 26, max: 33, label: { en: "Severe" } },
20
+ { id: "extremely-severe", min: 34, max: 42, label: { en: "Extremely severe" } },
21
21
  ];
22
22
  /**
23
23
  * DASS-21 — Depression Anxiety Stress Scales, short form.
@@ -33,24 +33,12 @@ export const dass21 = {
33
33
  version: "1.0.0",
34
34
  title: {
35
35
  en: "Depression Anxiety Stress Scales (DASS-21)",
36
- tr: "Depresyon Anksiyete Stres Ölçeği (DASS-21)",
37
- de: "Depressions-Angst-Stress-Skalen (DASS-21)",
38
- zh: "抑郁-焦虑-压力量表(DASS-21)",
39
- es: "Escalas de Depresión, Ansiedad y Estrés (DASS-21)",
40
36
  },
41
37
  description: {
42
38
  en: "A 21-item self-report questionnaire measuring depression, anxiety, and stress over the past week.",
43
- tr: "Geçtiğimiz hafta boyunca depresyon, anksiyete ve stresi ölçen 21 maddelik bir öz bildirim ölçeği.",
44
- de: "Ein Selbstbeurteilungsfragebogen mit 21 Items zur Messung von Depression, Angst und Stress in der vergangenen Woche.",
45
- zh: "一份包含21个条目的自评问卷,用于测量过去一周的抑郁、焦虑和压力水平。",
46
- es: "Un cuestionario de autoinforme de 21 ítems que mide la depresión, la ansiedad y el estrés durante la última semana.",
47
39
  },
48
40
  instructions: {
49
41
  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.",
50
- 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.",
51
- 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.",
52
- zh: "请阅读每一条陈述,并选择最能表明过去一周该陈述在多大程度上适用于您的选项。答案没有对错之分。请不要在任何一条陈述上花费太多时间。",
53
- es: "Por favor, lea cada frase y seleccione la opción que indique en qué medida la frase se aplicó a usted durante la última semana. No hay respuestas correctas ni incorrectas. No dedique demasiado tiempo a ninguna frase.",
54
42
  },
55
43
  defaultLocale: "en",
56
44
  options: [
@@ -58,40 +46,24 @@ export const dass21 = {
58
46
  value: 0,
59
47
  label: {
60
48
  en: "Did not apply to me at all",
61
- tr: "Bana hiç uymadı",
62
- de: "Traf gar nicht auf mich zu",
63
- zh: "完全不适用于我",
64
- es: "No se aplicó a mí en absoluto",
65
49
  },
66
50
  },
67
51
  {
68
52
  value: 1,
69
53
  label: {
70
54
  en: "Applied to me to some degree, or some of the time",
71
- tr: "Bana biraz uydu ya da zaman zaman uydu",
72
- de: "Traf bis zu einem gewissen Grad oder manchmal auf mich zu",
73
- zh: "在某种程度上适用于我,或有时适用",
74
- es: "Se aplicó a mí en cierta medida, o parte del tiempo",
75
55
  },
76
56
  },
77
57
  {
78
58
  value: 2,
79
59
  label: {
80
60
  en: "Applied to me to a considerable degree, or a good part of the time",
81
- tr: "Bana oldukça uydu ya da zamanın büyük bölümünde uydu",
82
- de: "Traf in beträchtlichem Maße oder einen guten Teil der Zeit auf mich zu",
83
- zh: "在相当程度上适用于我,或大部分时间适用",
84
- es: "Se aplicó a mí en un grado considerable, o una buena parte del tiempo",
85
61
  },
86
62
  },
87
63
  {
88
64
  value: 3,
89
65
  label: {
90
66
  en: "Applied to me very much, or most of the time",
91
- tr: "Bana çok uydu ya da hemen hemen her zaman uydu",
92
- de: "Traf sehr stark oder die meiste Zeit auf mich zu",
93
- zh: "非常适用于我,或绝大部分时间适用",
94
- es: "Se aplicó a mí mucho, o la mayor parte del tiempo",
95
67
  },
96
68
  },
97
69
  ],
@@ -100,210 +72,126 @@ export const dass21 = {
100
72
  id: "dass21-1",
101
73
  text: {
102
74
  en: "I found it hard to wind down",
103
- tr: "Sakinleşip yatışmakta zorlandım",
104
- de: "Ich fand es schwer, mich zu beruhigen",
105
- zh: "我发现自己很难平静下来",
106
- es: "Me costó calmarme",
107
75
  },
108
76
  },
109
77
  {
110
78
  id: "dass21-2",
111
79
  text: {
112
80
  en: "I was aware of dryness of my mouth",
113
- tr: "Ağzımın kuruduğunu fark ettim",
114
- de: "Ich bemerkte, dass mein Mund trocken war",
115
- zh: "我注意到自己口干",
116
- es: "Noté que tenía la boca seca",
117
81
  },
118
82
  },
119
83
  {
120
84
  id: "dass21-3",
121
85
  text: {
122
86
  en: "I couldn't seem to experience any positive feeling at all",
123
- tr: "Hiç olumlu duygu yaşayamadığımı fark ettim",
124
- de: "Ich konnte überhaupt keine positiven Gefühle mehr erleben",
125
- zh: "我似乎完全无法体验到任何积极的感受",
126
- es: "No parecía poder experimentar ningún sentimiento positivo en absoluto",
127
87
  },
128
88
  },
129
89
  {
130
90
  id: "dass21-4",
131
91
  text: {
132
92
  en: "I experienced breathing difficulty (e.g. excessively rapid breathing, breathlessness in the absence of physical exertion)",
133
- tr: "Nefes almada zorluk yaşadım (örneğin, fiziksel çaba göstermediğim hâlde aşırı hızlı nefes alma, nefessiz kalma)",
134
- de: "Ich hatte Atemprobleme (z. B. übermäßig schnelle Atmung, Atemlosigkeit ohne körperliche Anstrengung)",
135
- zh: "我感到呼吸困难(例如呼吸过快,或没有体力活动时也感到喘不过气)",
136
- es: "Experimenté dificultad para respirar (p. ej., respiración excesivamente rápida, falta de aire sin haber hecho esfuerzo físico)",
137
93
  },
138
94
  },
139
95
  {
140
96
  id: "dass21-5",
141
97
  text: {
142
98
  en: "I found it difficult to work up the initiative to do things",
143
- tr: "Bir işe başlamak için gereken isteği kendimde bulmakta zorlandım",
144
- de: "Es fiel mir schwer, die Initiative zu ergreifen, um Dinge zu erledigen",
145
- zh: "我发现自己很难主动去做事情",
146
- es: "Me resultó difícil tomar la iniciativa para hacer cosas",
147
99
  },
148
100
  },
149
101
  {
150
102
  id: "dass21-6",
151
103
  text: {
152
104
  en: "I tended to over-react to situations",
153
- tr: "Olaylara aşırı tepki verme eğiliminde oldum",
154
- de: "Ich neigte dazu, auf Situationen überzureagieren",
155
- zh: "我容易对事情反应过度",
156
- es: "Tendí a reaccionar de forma exagerada ante las situaciones",
157
105
  },
158
106
  },
159
107
  {
160
108
  id: "dass21-7",
161
109
  text: {
162
110
  en: "I experienced trembling (e.g. in the hands)",
163
- tr: "Titreme yaşadım (örneğin ellerde)",
164
- de: "Ich hatte Zittern (z. B. in den Händen)",
165
- zh: "我出现过颤抖(例如手抖)",
166
- es: "Experimenté temblores (p. ej., en las manos)",
167
111
  },
168
112
  },
169
113
  {
170
114
  id: "dass21-8",
171
115
  text: {
172
116
  en: "I felt that I was using a lot of nervous energy",
173
- tr: "Sinirsel enerjimin çok fazla olduğunu hissettim",
174
- de: "Ich fühlte, dass ich viel nervöse Energie verbrauchte",
175
- zh: "我觉得自己消耗了很多精神能量",
176
- es: "Sentí que estaba gastando mucha energía nerviosa",
177
117
  },
178
118
  },
179
119
  {
180
120
  id: "dass21-9",
181
121
  text: {
182
122
  en: "I was worried about situations in which I might panic and make a fool of myself",
183
- tr: "Panikleyip kendimi gülünç duruma düşürebileceğim durumlar nedeniyle endişelendim",
184
- de: "Ich machte mir Sorgen über Situationen, in denen ich in Panik geraten und mich blamieren könnte",
185
- zh: "我担心自己会在某些场合惊慌失措、出丑",
186
- es: "Me preocupaban las situaciones en las que podría entrar en pánico y hacer el ridículo",
187
123
  },
188
124
  },
189
125
  {
190
126
  id: "dass21-10",
191
127
  text: {
192
128
  en: "I felt that I had nothing to look forward to",
193
- tr: "Dört gözle beklediğim hiçbir şey olmadığını hissettim",
194
- de: "Ich hatte das Gefühl, mich auf nichts mehr freuen zu können",
195
- zh: "我觉得自己没有什么可期待的",
196
- es: "Sentí que no tenía nada que esperar con ilusión",
197
129
  },
198
130
  },
199
131
  {
200
132
  id: "dass21-11",
201
133
  text: {
202
134
  en: "I found myself getting agitated",
203
- tr: "Giderek huzursuzlandığımı fark ettim",
204
- de: "Ich merkte, dass ich unruhig wurde",
205
- zh: "我发现自己变得焦躁不安",
206
- es: "Me di cuenta de que me estaba agitando",
207
135
  },
208
136
  },
209
137
  {
210
138
  id: "dass21-12",
211
139
  text: {
212
140
  en: "I found it difficult to relax",
213
- tr: "Gevşeyip rahatlamakta zorlandım",
214
- de: "Es fiel mir schwer, mich zu entspannen",
215
- zh: "我发现自己很难放松",
216
- es: "Me resultó difícil relajarme",
217
141
  },
218
142
  },
219
143
  {
220
144
  id: "dass21-13",
221
145
  text: {
222
146
  en: "I felt down-hearted and blue",
223
- tr: "Kendimi üzgün ve karamsar hissettim",
224
- de: "Ich fühlte mich niedergeschlagen und traurig",
225
- zh: "我感到情绪低落、忧郁",
226
- es: "Me sentí desanimado y triste",
227
147
  },
228
148
  },
229
149
  {
230
150
  id: "dass21-14",
231
151
  text: {
232
152
  en: "I was intolerant of anything that kept me from getting on with what I was doing",
233
- tr: "Yaptığım işi sürdürmeme engel olan şeylere tahammül edemedim",
234
- de: "Ich konnte es nicht ertragen, von dem, was ich gerade tat, abgehalten zu werden",
235
- zh: "我无法容忍任何妨碍我继续做事的事情",
236
- es: "No toleraba nada que me impidiera seguir con lo que estaba haciendo",
237
153
  },
238
154
  },
239
155
  {
240
156
  id: "dass21-15",
241
157
  text: {
242
158
  en: "I felt I was close to panic",
243
- tr: "Panik olmaya yakın olduğumu hissettim",
244
- de: "Ich fühlte mich einer Panik nahe",
245
- zh: "我感到自己快要惊慌失措了",
246
- es: "Sentí que estaba a punto de entrar en pánico",
247
159
  },
248
160
  },
249
161
  {
250
162
  id: "dass21-16",
251
163
  text: {
252
164
  en: "I was unable to become enthusiastic about anything",
253
- tr: "Hiçbir şeye karşı heves duyamadım",
254
- de: "Ich konnte mich für nichts mehr begeistern",
255
- zh: "我对任何事情都提不起热情",
256
- es: "No fui capaz de entusiasmarme con nada",
257
165
  },
258
166
  },
259
167
  {
260
168
  id: "dass21-17",
261
169
  text: {
262
170
  en: "I felt I wasn't worth much as a person",
263
- tr: "Kişi olarak fazla bir değerimin olmadığını hissettim",
264
- de: "Ich hatte das Gefühl, als Person nicht viel wert zu sein",
265
- zh: "我觉得自己作为一个人没有多大价值",
266
- es: "Sentí que como persona no valía mucho",
267
171
  },
268
172
  },
269
173
  {
270
174
  id: "dass21-18",
271
175
  text: {
272
176
  en: "I felt that I was rather touchy",
273
- tr: "Oldukça alıngan olduğumu hissettim",
274
- de: "Ich fühlte, dass ich ziemlich empfindlich war",
275
- zh: "我觉得自己相当敏感、易被触怒",
276
- es: "Sentí que estaba bastante susceptible",
277
177
  },
278
178
  },
279
179
  {
280
180
  id: "dass21-19",
281
181
  text: {
282
182
  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)",
283
- tr: "Fiziksel çaba göstermediğim hâlde kalbimin hareketlerini fark ettim (örneğin, kalp atışının hızlanması, kalbin bir atışı atlaması)",
284
- de: "Ich nahm meinen Herzschlag wahr, ohne mich körperlich angestrengt zu haben (z. B. Gefühl von Herzrasen oder Herzstolpern)",
285
- zh: "在没有体力活动的情况下,我能察觉到自己的心跳(例如感到心率加快或心跳漏跳)",
286
- es: "Fui consciente de los latidos de mi corazón sin haber hecho esfuerzo físico (p. ej., sensación de aumento del ritmo cardíaco, o de que el corazón se saltaba un latido)",
287
183
  },
288
184
  },
289
185
  {
290
186
  id: "dass21-20",
291
187
  text: {
292
188
  en: "I felt scared without any good reason",
293
- tr: "Geçerli bir neden olmadığı hâlde korktuğumu hissettim",
294
- de: "Ich fühlte mich ohne triftigen Grund ängstlich",
295
- zh: "我无缘无故地感到害怕",
296
- es: "Me sentí asustado sin ninguna razón justificada",
297
189
  },
298
190
  },
299
191
  {
300
192
  id: "dass21-21",
301
193
  text: {
302
194
  en: "I felt that life was meaningless",
303
- tr: "Yaşamın anlamsız olduğunu hissettim",
304
- de: "Ich hatte das Gefühl, dass das Leben sinnlos ist",
305
- zh: "我觉得生活毫无意义",
306
- es: "Sentí que la vida no tenía sentido",
307
195
  },
308
196
  },
309
197
  ],
@@ -312,21 +200,21 @@ export const dass21 = {
312
200
  subscales: [
313
201
  {
314
202
  id: "depression",
315
- label: { en: "Depression", tr: "Depresyon", de: "Depression", zh: "抑郁", es: "Depresión" },
203
+ label: { en: "Depression" },
316
204
  questionIds: ["dass21-3", "dass21-5", "dass21-10", "dass21-13", "dass21-16", "dass21-17", "dass21-21"],
317
205
  multiplier: 2,
318
206
  bands: depressionBands,
319
207
  },
320
208
  {
321
209
  id: "anxiety",
322
- label: { en: "Anxiety", tr: "Anksiyete", de: "Angst", zh: "焦虑", es: "Ansiedad" },
210
+ label: { en: "Anxiety" },
323
211
  questionIds: ["dass21-2", "dass21-4", "dass21-7", "dass21-9", "dass21-15", "dass21-19", "dass21-20"],
324
212
  multiplier: 2,
325
213
  bands: anxietyBands,
326
214
  },
327
215
  {
328
216
  id: "stress",
329
- label: { en: "Stress", tr: "Stres", de: "Stress", zh: "压力", es: "Estrés" },
217
+ label: { en: "Stress" },
330
218
  questionIds: ["dass21-1", "dass21-6", "dass21-8", "dass21-11", "dass21-12", "dass21-14", "dass21-18"],
331
219
  multiplier: 2,
332
220
  bands: stressBands,
@@ -12,17 +12,9 @@ export const gad7 = {
12
12
  version: "1.0.0",
13
13
  title: {
14
14
  en: "Generalized Anxiety Disorder Scale (GAD-7)",
15
- tr: "Yaygın Anksiyete Bozukluğu Ölçeği (GAD-7)",
16
- de: "Generalisierte Angststörung Skala (GAD-7)",
17
- zh: "广泛性焦虑障碍量表(GAD-7)",
18
- es: "Escala del Trastorno de Ansiedad Generalizada (GAD-7)",
19
15
  },
20
16
  description: {
21
17
  en: "A 7-item self-report questionnaire for screening and measuring the severity of generalized anxiety.",
22
- tr: "Yaygın anksiyeteyi taramak ve şiddetini ölçmek için kullanılan 7 maddelik bir öz bildirim ölçeği.",
23
- de: "Ein Selbstbeurteilungsfragebogen mit 7 Items zum Screening und zur Schweregradmessung generalisierter Angst.",
24
- zh: "一份包含7个条目的自评问卷,用于筛查广泛性焦虑并测量其严重程度。",
25
- es: "Un cuestionario de autoinforme de 7 ítems para la detección y la medición de la gravedad de la ansiedad generalizada.",
26
18
  },
27
19
  instructions: twoWeekInstructions,
28
20
  defaultLocale: "en",
@@ -32,70 +24,42 @@ export const gad7 = {
32
24
  id: "gad7-1",
33
25
  text: {
34
26
  en: "Feeling nervous, anxious, or on edge",
35
- tr: "Sinirli, kaygılı ya da çok gergin hissetme",
36
- de: "Nervosität, Ängstlichkeit oder Anspannung",
37
- zh: "感到紧张、焦虑或心情烦躁",
38
- es: "Sentirse nervioso(a), ansioso(a) o con los nervios de punta",
39
27
  },
40
28
  },
41
29
  {
42
30
  id: "gad7-2",
43
31
  text: {
44
32
  en: "Not being able to stop or control worrying",
45
- tr: "Endişelenmeyi durduramama ya da kontrol edememe",
46
- de: "Nicht in der Lage sein, Sorgen zu stoppen oder zu kontrollieren",
47
- zh: "无法停止或控制担忧",
48
- es: "No poder dejar de preocuparse o controlar la preocupación",
49
33
  },
50
34
  },
51
35
  {
52
36
  id: "gad7-3",
53
37
  text: {
54
38
  en: "Worrying too much about different things",
55
- tr: "Farklı konular hakkında çok fazla endişelenme",
56
- de: "Übermäßige Sorgen bezüglich verschiedener Angelegenheiten",
57
- zh: "对各种各样的事情担忧过多",
58
- es: "Preocuparse demasiado por diferentes cosas",
59
39
  },
60
40
  },
61
41
  {
62
42
  id: "gad7-4",
63
43
  text: {
64
44
  en: "Trouble relaxing",
65
- tr: "Gevşeyip rahatlamada güçlük",
66
- de: "Schwierigkeiten, sich zu entspannen",
67
- zh: "难以放松",
68
- es: "Dificultad para relajarse",
69
45
  },
70
46
  },
71
47
  {
72
48
  id: "gad7-5",
73
49
  text: {
74
50
  en: "Being so restless that it is hard to sit still",
75
- tr: "Yerinde duramayacak kadar huzursuz olma",
76
- de: "Rastlosigkeit, sodass das Stillsitzen schwerfällt",
77
- zh: "坐立不安,难以安静地坐着",
78
- es: "Estar tan inquieto(a) que le resulta difícil quedarse quieto(a)",
79
51
  },
80
52
  },
81
53
  {
82
54
  id: "gad7-6",
83
55
  text: {
84
56
  en: "Becoming easily annoyed or irritable",
85
- tr: "Çabuk kızma ya da kolayca sinirlenir olma",
86
- de: "Schnelle Verärgerung oder Gereiztheit",
87
- zh: "容易恼怒或易被激怒",
88
- es: "Enfadarse o irritarse con facilidad",
89
57
  },
90
58
  },
91
59
  {
92
60
  id: "gad7-7",
93
61
  text: {
94
62
  en: "Feeling afraid, as if something awful might happen",
95
- tr: "Sanki çok kötü bir şey olacakmış gibi korkuya kapılma",
96
- de: "Angstgefühl, als könnte etwas Schlimmes passieren",
97
- zh: "感到害怕,好像会有可怕的事情发生",
98
- es: "Sentir miedo, como si algo terrible pudiera pasar",
99
63
  },
100
64
  },
101
65
  ],
@@ -106,25 +70,25 @@ export const gad7 = {
106
70
  id: "minimal",
107
71
  min: 0,
108
72
  max: 4,
109
- label: { en: "Minimal anxiety", tr: "Minimal anksiyete", de: "Minimale Angst", zh: "极轻度焦虑", es: "Ansiedad mínima" },
73
+ label: { en: "Minimal anxiety" },
110
74
  },
111
75
  {
112
76
  id: "mild",
113
77
  min: 5,
114
78
  max: 9,
115
- label: { en: "Mild anxiety", tr: "Hafif anksiyete", de: "Leichte Angst", zh: "轻度焦虑", es: "Ansiedad leve" },
79
+ label: { en: "Mild anxiety" },
116
80
  },
117
81
  {
118
82
  id: "moderate",
119
83
  min: 10,
120
84
  max: 14,
121
- label: { en: "Moderate anxiety", tr: "Orta düzeyde anksiyete", de: "Mittelgradige Angst", zh: "中度焦虑", es: "Ansiedad moderada" },
85
+ label: { en: "Moderate anxiety" },
122
86
  },
123
87
  {
124
88
  id: "severe",
125
89
  min: 15,
126
90
  max: 21,
127
- label: { en: "Severe anxiety", tr: "Şiddetli anksiyete", de: "Schwere Angst", zh: "重度焦虑", es: "Ansiedad grave" },
91
+ label: { en: "Severe anxiety" },
128
92
  },
129
93
  ],
130
94
  },
@@ -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>;
@@ -1,5 +1,7 @@
1
1
  import { Assessment } from "../assessment.js";
2
2
  import { PsytoolsError } from "../errors.js";
3
+ import { applyLocale } from "../i18n.js";
4
+ import { availableLocales, localePacks } from "../locales/index.js";
3
5
  import { phq9 } from "./phq9.js";
4
6
  import { gad7 } from "./gad7.js";
5
7
  import { dass21 } from "./dass21.js";
@@ -23,13 +25,30 @@ export const inventories = {
23
25
  };
24
26
  /**
25
27
  * Instantiates a predefined inventory as an `Assessment`.
26
- * @throws PsytoolsError `unknown_inventory`
28
+ *
29
+ * Base definitions carry English only; other languages live in separate
30
+ * locale-pack modules that are dynamically imported — and only then held
31
+ * in memory — when listed in `options.locales` (data minimization by
32
+ * default). The returned assessment's definition is still one complete,
33
+ * serializable JSON object containing exactly the requested locales.
34
+ *
35
+ * @throws PsytoolsError `unknown_inventory` | `unknown_locale`
27
36
  */
28
- export function loadInventory(id) {
37
+ export async function loadInventory(id, options) {
29
38
  const definition = inventories[id];
30
39
  if (!definition) {
31
40
  const known = Object.keys(inventories).join(", ");
32
41
  throw new PsytoolsError("unknown_inventory", `Unknown inventory "${id}" (available: ${known})`);
33
42
  }
34
- return new Assessment(definition);
43
+ let merged = definition;
44
+ for (const locale of options?.locales ?? []) {
45
+ if (locale === definition.defaultLocale)
46
+ continue;
47
+ const loader = localePacks[id]?.[locale];
48
+ if (!loader) {
49
+ throw new PsytoolsError("unknown_locale", `No "${locale}" locale pack for inventory "${id}" (available: ${availableLocales(id).join(", ")})`);
50
+ }
51
+ merged = applyLocale(merged, (await loader()).default);
52
+ }
53
+ return new Assessment(merged);
35
54
  }