tycho-components 0.19.17 → 0.21.1

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 (370) hide show
  1. package/dist/{AppConsent → common/AppConsent}/AppConsent.d.ts +1 -1
  2. package/dist/{AppDropzone → common/AppDropzone}/AppDropzoneBody.js +3 -3
  3. package/dist/{AppForm → common/AppForm}/AppFormInfo.js +1 -1
  4. package/dist/{AppKeyboard → common/AppKeyboard}/AppKeyboard.js +2 -2
  5. package/dist/{AppPicture → common/AppPicture}/AppPicture.js +1 -1
  6. package/dist/{AppToast → common/AppToast}/AppToast.js +2 -2
  7. package/dist/common/index.d.ts +34 -0
  8. package/dist/common/index.js +27 -0
  9. package/dist/configs/Localization.d.ts +20 -961
  10. package/dist/configs/Localization.js +42 -47
  11. package/dist/configs/index.d.ts +27 -0
  12. package/dist/configs/index.js +16 -0
  13. package/dist/configs/mock/MockStructs.d.ts +1 -1
  14. package/dist/configs/store/actions.d.ts +1 -1
  15. package/dist/configs/store/store.js +1 -1
  16. package/dist/configs/store/types.d.ts +1 -1
  17. package/dist/configs/types/Document.d.ts +1 -1
  18. package/dist/configs/types/Sentence.d.ts +1 -1
  19. package/dist/cytoscape-context-menus.d.ts +1 -1
  20. package/dist/cytoscape-context-menus.js +1 -1
  21. package/dist/{Comments → features/Comments}/CommentAdd.d.ts +1 -1
  22. package/dist/{Comments → features/Comments}/CommentAdd.js +3 -3
  23. package/dist/{Comments → features/Comments}/CommentInfo.js +3 -3
  24. package/dist/{Comments/types → features/Comments}/CommentService.d.ts +1 -1
  25. package/dist/{Comments → features/Comments}/Comments.js +5 -5
  26. package/dist/{Comments → features/Comments}/HeaderNotifications/HeaderNotifications.js +2 -2
  27. package/dist/{Parameters → features/Parameters}/Parameters.js +1 -1
  28. package/dist/{Participants → features/Participants}/ParticipantCreate/ParticipantCreate.js +4 -4
  29. package/dist/{Participants → features/Participants}/ParticipantRemove/ParticipantRemove.js +4 -4
  30. package/dist/{Participants/types → features/Participants}/ParticipantService.d.ts +2 -2
  31. package/dist/{Participants → features/Participants}/Participants.js +3 -3
  32. package/dist/{Participants → features/Participants}/types/Participant.d.ts +1 -1
  33. package/dist/features/SentenceSplit/SentenceSplit.d.ts +28 -0
  34. package/dist/features/SentenceSplit/SentenceSplit.js +180 -0
  35. package/dist/features/SentenceSplit/SentenceSplitAudio/SentenceSplitAudioStep.d.ts +9 -0
  36. package/dist/features/SentenceSplit/SentenceSplitAudio/SentenceSplitAudioStep.js +38 -0
  37. package/dist/features/SentenceSplit/SentenceSplitAudio/index.d.ts +2 -0
  38. package/dist/features/SentenceSplit/SentenceSplitAudio/index.js +2 -0
  39. package/dist/features/SentenceSplit/SentenceSplitAudio/style.scss +29 -0
  40. package/dist/features/SentenceSplit/SentenceSplitChoose/SentenceSplitChoose.d.ts +10 -0
  41. package/dist/features/SentenceSplit/SentenceSplitChoose/SentenceSplitChoose.js +23 -0
  42. package/dist/features/SentenceSplit/SentenceSplitChoose/index.d.ts +2 -0
  43. package/dist/features/SentenceSplit/SentenceSplitChoose/index.js +2 -0
  44. package/dist/features/SentenceSplit/SentenceSplitChoose/style.scss +25 -0
  45. package/dist/features/SentenceSplit/SentenceSplitCommentUtils.d.ts +21 -0
  46. package/dist/features/SentenceSplit/SentenceSplitCommentUtils.js +77 -0
  47. package/dist/features/SentenceSplit/SentenceSplitComments/SentenceSplitCommentBlock.d.ts +7 -0
  48. package/dist/features/SentenceSplit/SentenceSplitComments/SentenceSplitCommentBlock.js +6 -0
  49. package/dist/features/SentenceSplit/SentenceSplitComments/SentenceSplitComments.d.ts +8 -0
  50. package/dist/features/SentenceSplit/SentenceSplitComments/SentenceSplitComments.js +37 -0
  51. package/dist/features/SentenceSplit/SentenceSplitComments/SentenceSplitCommentsStep.d.ts +11 -0
  52. package/dist/features/SentenceSplit/SentenceSplitComments/SentenceSplitCommentsStep.js +72 -0
  53. package/dist/features/SentenceSplit/SentenceSplitComments/SentenceSplitCommentsWords.d.ts +9 -0
  54. package/dist/features/SentenceSplit/SentenceSplitComments/SentenceSplitCommentsWords.js +15 -0
  55. package/dist/features/SentenceSplit/SentenceSplitComments/index.d.ts +2 -0
  56. package/dist/features/SentenceSplit/SentenceSplitComments/index.js +2 -0
  57. package/dist/features/SentenceSplit/SentenceSplitComments/style.scss +126 -0
  58. package/dist/features/SentenceSplit/SentenceSplitPreview/SentenceSplitPreview.d.ts +10 -0
  59. package/dist/features/SentenceSplit/SentenceSplitPreview/SentenceSplitPreview.js +10 -0
  60. package/dist/features/SentenceSplit/SentenceSplitPreview/SentenceSplitPreviewStep.d.ts +11 -0
  61. package/dist/features/SentenceSplit/SentenceSplitPreview/SentenceSplitPreviewStep.js +24 -0
  62. package/dist/features/SentenceSplit/SentenceSplitPreview/index.d.ts +2 -0
  63. package/dist/features/SentenceSplit/SentenceSplitPreview/index.js +2 -0
  64. package/dist/features/SentenceSplit/SentenceSplitPreview/style.scss +24 -0
  65. package/dist/features/SentenceSplit/SentenceSplitService.d.ts +13 -0
  66. package/dist/features/SentenceSplit/SentenceSplitService.js +13 -0
  67. package/dist/features/SentenceSplit/SentenceSplitTranslations/SentenceSplitTranslations.d.ts +12 -0
  68. package/dist/features/SentenceSplit/SentenceSplitTranslations/SentenceSplitTranslations.js +15 -0
  69. package/dist/features/SentenceSplit/SentenceSplitTranslations/SentenceSplitTranslationsStep.d.ts +10 -0
  70. package/dist/features/SentenceSplit/SentenceSplitTranslations/SentenceSplitTranslationsStep.js +8 -0
  71. package/dist/features/SentenceSplit/SentenceSplitTranslations/index.d.ts +2 -0
  72. package/dist/features/SentenceSplit/SentenceSplitTranslations/index.js +2 -0
  73. package/dist/features/SentenceSplit/SentenceSplitTranslations/style.scss +23 -0
  74. package/dist/features/SentenceSplit/SentenceSplitUtils.d.ts +6 -0
  75. package/dist/features/SentenceSplit/SentenceSplitUtils.js +17 -0
  76. package/dist/features/SentenceSplit/index.d.ts +2 -0
  77. package/dist/features/SentenceSplit/index.js +2 -0
  78. package/dist/features/SentenceSplit/localization/SentenceSplitTexts.d.ts +107 -0
  79. package/dist/features/SentenceSplit/localization/SentenceSplitTexts.js +107 -0
  80. package/dist/features/SentenceSplit/style.scss +173 -0
  81. package/dist/features/SentenceSplit/types/Language.d.ts +6 -0
  82. package/dist/features/SentenceSplit/types/SentenceSplitRequest.d.ts +20 -0
  83. package/dist/features/SentenceSplit/types/SentenceSplitRequest.js +16 -0
  84. package/dist/{SentenceView → features/SentenceView}/SentenceEditionTiers.d.ts +1 -1
  85. package/dist/{SentenceView → features/SentenceView}/SentenceEditionTiers.js +2 -2
  86. package/dist/{SentenceView → features/SentenceView}/SentenceMorphemeTags.d.ts +1 -1
  87. package/dist/{SentenceView → features/SentenceView}/SentenceMorphemeTags.js +1 -1
  88. package/dist/{SentenceView → features/SentenceView}/SentenceMorphemeTiers.d.ts +2 -2
  89. package/dist/{SentenceView → features/SentenceView}/SentenceMorphemeTiers.js +1 -1
  90. package/dist/{SentenceView → features/SentenceView}/SentenceTags.d.ts +1 -1
  91. package/dist/{SentenceView → features/SentenceView}/SentenceTags.js +1 -1
  92. package/dist/{SentenceView → features/SentenceView}/SentenceValues.d.ts +1 -1
  93. package/dist/{SentenceView → features/SentenceView}/SentenceValues.js +1 -1
  94. package/dist/{SentenceView → features/SentenceView}/SentenceView.d.ts +2 -2
  95. package/dist/{SentenceView → features/SentenceView}/SentenceView.js +1 -1
  96. package/dist/{SentenceView → features/SentenceView}/SentenceWordTiers.d.ts +2 -2
  97. package/dist/{SentenceView → features/SentenceView}/SentenceWordTiers.js +1 -1
  98. package/dist/{TreeView → features/TreeView}/TreeView.d.ts +1 -1
  99. package/dist/{TreeView → features/TreeView}/TreeView.js +3 -3
  100. package/dist/{TreeView → features/TreeView}/TreeViewSearch/TreeViewSearch.d.ts +1 -1
  101. package/dist/{TreeView → features/TreeView}/TreeViewSearch/TreeViewSearch.js +1 -1
  102. package/dist/{TreeView → features/TreeView}/cytoscape/CytoscapeTreeConverter.d.ts +1 -1
  103. package/dist/features/TreeView/cytoscape/NodeCalculation.js +1 -0
  104. package/dist/{TreeView → features/TreeView}/cytoscape/SyntreesCytoscape.d.ts +1 -1
  105. package/dist/features/index.d.ts +24 -0
  106. package/dist/features/index.js +17 -0
  107. package/dist/functions/FormUtils.d.ts +1 -1
  108. package/dist/functions/index.d.ts +10 -0
  109. package/dist/functions/index.js +9 -0
  110. package/dist/index.d.ts +5 -103
  111. package/dist/index.js +5 -77
  112. package/dist/{Base → shell/Base}/ErrorFound.js +1 -1
  113. package/dist/{Base → shell/Base}/Logout.js +2 -2
  114. package/dist/{Base → shell/Base}/Unauthorized.js +2 -2
  115. package/dist/{Header → shell/Header}/HeaderApps/HeaderApps.d.ts +3 -3
  116. package/dist/{Header → shell/Header}/HeaderApps/HeaderApps.js +24 -24
  117. package/dist/{Header → shell/Header}/HeaderButtons/HeaderButtons.js +5 -5
  118. package/dist/{Header → shell/Header}/HeaderCorpora/HeaderCorpora.js +3 -3
  119. package/dist/{Header → shell/Header}/HeaderCorpora/HeaderCorpus.js +2 -2
  120. package/dist/{Header → shell/Header}/HeaderUser/HeaderUser.js +1 -1
  121. package/dist/{Header → shell/Header}/HelpButton/HelpModal.js +3 -3
  122. package/dist/{Header → shell/Header}/types/App.js +1 -1
  123. package/dist/{Header → shell/Header}/types/CorpusService.d.ts +1 -1
  124. package/dist/{Header → shell/Header}/types/CorpusService.js +2 -2
  125. package/dist/shell/index.d.ts +16 -0
  126. package/dist/shell/index.js +13 -0
  127. package/package.json +33 -3
  128. /package/dist/{AppAnalytics → common/AppAnalytics}/AppAnalytics.d.ts +0 -0
  129. /package/dist/{AppAnalytics → common/AppAnalytics}/AppAnalytics.js +0 -0
  130. /package/dist/{AppAnalytics → common/AppAnalytics}/index.d.ts +0 -0
  131. /package/dist/{AppAnalytics → common/AppAnalytics}/index.js +0 -0
  132. /package/dist/{AppCard → common/AppCard}/AppCard.d.ts +0 -0
  133. /package/dist/{AppCard → common/AppCard}/AppCard.js +0 -0
  134. /package/dist/{AppCard → common/AppCard}/index.d.ts +0 -0
  135. /package/dist/{AppCard → common/AppCard}/index.js +0 -0
  136. /package/dist/{AppCard → common/AppCard}/style.scss +0 -0
  137. /package/dist/{AppClipboard → common/AppClipboard}/AppClipboard.d.ts +0 -0
  138. /package/dist/{AppClipboard → common/AppClipboard}/AppClipboard.js +0 -0
  139. /package/dist/{AppClipboard → common/AppClipboard}/index.d.ts +0 -0
  140. /package/dist/{AppClipboard → common/AppClipboard}/index.js +0 -0
  141. /package/dist/{AppColorpicker → common/AppColorpicker}/AppColorpicker.d.ts +0 -0
  142. /package/dist/{AppColorpicker → common/AppColorpicker}/AppColorpicker.js +0 -0
  143. /package/dist/{AppColorpicker → common/AppColorpicker}/index.d.ts +0 -0
  144. /package/dist/{AppColorpicker → common/AppColorpicker}/index.js +0 -0
  145. /package/dist/{AppColorpicker → common/AppColorpicker}/style.scss +0 -0
  146. /package/dist/{AppConsent → common/AppConsent}/AppConsent.js +0 -0
  147. /package/dist/{AppConsent → common/AppConsent}/index.d.ts +0 -0
  148. /package/dist/{AppConsent → common/AppConsent}/index.js +0 -0
  149. /package/dist/{AppCopyText → common/AppCopyText}/AppCopyText.d.ts +0 -0
  150. /package/dist/{AppCopyText → common/AppCopyText}/AppCopyText.js +0 -0
  151. /package/dist/{AppCopyText → common/AppCopyText}/index.d.ts +0 -0
  152. /package/dist/{AppCopyText → common/AppCopyText}/index.js +0 -0
  153. /package/dist/{AppCopyText → common/AppCopyText}/styles.scss +0 -0
  154. /package/dist/{AppDropzone → common/AppDropzone}/AppDropzone.d.ts +0 -0
  155. /package/dist/{AppDropzone → common/AppDropzone}/AppDropzone.js +0 -0
  156. /package/dist/{AppDropzone → common/AppDropzone}/AppDropzoneBody.d.ts +0 -0
  157. /package/dist/{AppDropzone → common/AppDropzone}/UploadService.d.ts +0 -0
  158. /package/dist/{AppDropzone → common/AppDropzone}/UploadService.js +0 -0
  159. /package/dist/{AppDropzone → common/AppDropzone}/UploadedFile.d.ts +0 -0
  160. /package/dist/{AppDropzone → common/AppDropzone}/UploadedFile.js +0 -0
  161. /package/dist/{AppDropzone → common/AppDropzone}/index.d.ts +0 -0
  162. /package/dist/{AppDropzone → common/AppDropzone}/index.js +0 -0
  163. /package/dist/{AppDropzone → common/AppDropzone}/style.scss +0 -0
  164. /package/dist/{AppDropzoneLocal → common/AppDropzoneLocal}/AppDropzoneBodyLocal.d.ts +0 -0
  165. /package/dist/{AppDropzoneLocal → common/AppDropzoneLocal}/AppDropzoneBodyLocal.js +0 -0
  166. /package/dist/{AppDropzoneLocal → common/AppDropzoneLocal}/AppDropzoneLocal.d.ts +0 -0
  167. /package/dist/{AppDropzoneLocal → common/AppDropzoneLocal}/AppDropzoneLocal.js +0 -0
  168. /package/dist/{AppDropzoneLocal → common/AppDropzoneLocal}/UploadedFileLocal.d.ts +0 -0
  169. /package/dist/{AppDropzoneLocal → common/AppDropzoneLocal}/UploadedFileLocal.js +0 -0
  170. /package/dist/{AppDropzoneLocal → common/AppDropzoneLocal}/index.d.ts +0 -0
  171. /package/dist/{AppDropzoneLocal → common/AppDropzoneLocal}/index.js +0 -0
  172. /package/dist/{AppDropzoneLocal → common/AppDropzoneLocal}/style.scss +0 -0
  173. /package/dist/{AppEditable → common/AppEditable}/AppEditable.d.ts +0 -0
  174. /package/dist/{AppEditable → common/AppEditable}/AppEditable.js +0 -0
  175. /package/dist/{AppEditable → common/AppEditable}/AppEditableField.d.ts +0 -0
  176. /package/dist/{AppEditable → common/AppEditable}/AppEditableField.js +0 -0
  177. /package/dist/{AppEditable → common/AppEditable}/FormField.d.ts +0 -0
  178. /package/dist/{AppEditable → common/AppEditable}/FormField.js +0 -0
  179. /package/dist/{AppEditable → common/AppEditable}/FormFieldOption.d.ts +0 -0
  180. /package/dist/{AppEditable → common/AppEditable}/FormFieldOption.js +0 -0
  181. /package/dist/{AppEditable → common/AppEditable}/index.d.ts +0 -0
  182. /package/dist/{AppEditable → common/AppEditable}/index.js +0 -0
  183. /package/dist/{AppEditable → common/AppEditable}/style.scss +0 -0
  184. /package/dist/{AppForm → common/AppForm}/AppForm.d.ts +0 -0
  185. /package/dist/{AppForm → common/AppForm}/AppForm.js +0 -0
  186. /package/dist/{AppForm → common/AppForm}/AppFormField.d.ts +0 -0
  187. /package/dist/{AppForm → common/AppForm}/AppFormField.js +0 -0
  188. /package/dist/{AppForm → common/AppForm}/AppFormInfo.d.ts +0 -0
  189. /package/dist/{AppForm → common/AppForm}/index.d.ts +0 -0
  190. /package/dist/{AppForm → common/AppForm}/index.js +0 -0
  191. /package/dist/{AppForm → common/AppForm}/style.scss +0 -0
  192. /package/dist/{AppKeyboard → common/AppKeyboard}/AppKeyboard.d.ts +0 -0
  193. /package/dist/{AppKeyboard → common/AppKeyboard}/index.d.ts +0 -0
  194. /package/dist/{AppKeyboard → common/AppKeyboard}/index.js +0 -0
  195. /package/dist/{AppLoading → common/AppLoading}/AppLoading.d.ts +0 -0
  196. /package/dist/{AppLoading → common/AppLoading}/AppLoading.js +0 -0
  197. /package/dist/{AppLoading → common/AppLoading}/index.d.ts +0 -0
  198. /package/dist/{AppLoading → common/AppLoading}/index.js +0 -0
  199. /package/dist/{AppLoading → common/AppLoading}/style.scss +0 -0
  200. /package/dist/{AppModal → common/AppModal}/AppModal.d.ts +0 -0
  201. /package/dist/{AppModal → common/AppModal}/AppModal.js +0 -0
  202. /package/dist/{AppModal → common/AppModal}/AppModalConfirm.d.ts +0 -0
  203. /package/dist/{AppModal → common/AppModal}/AppModalConfirm.js +0 -0
  204. /package/dist/{AppModal → common/AppModal}/AppModalRemove.d.ts +0 -0
  205. /package/dist/{AppModal → common/AppModal}/AppModalRemove.js +0 -0
  206. /package/dist/{AppModal → common/AppModal}/AppModalUtils.d.ts +0 -0
  207. /package/dist/{AppModal → common/AppModal}/AppModalUtils.js +0 -0
  208. /package/dist/{AppModal → common/AppModal}/index.d.ts +0 -0
  209. /package/dist/{AppModal → common/AppModal}/index.js +0 -0
  210. /package/dist/{AppModal → common/AppModal}/style.scss +0 -0
  211. /package/dist/{AppPagination → common/AppPagination}/AppPagination.d.ts +0 -0
  212. /package/dist/{AppPagination → common/AppPagination}/AppPagination.js +0 -0
  213. /package/dist/{AppPagination → common/AppPagination}/index.d.ts +0 -0
  214. /package/dist/{AppPagination → common/AppPagination}/index.js +0 -0
  215. /package/dist/{AppPagination → common/AppPagination}/styles.scss +0 -0
  216. /package/dist/{AppPicture → common/AppPicture}/AppPicture.d.ts +0 -0
  217. /package/dist/{AppPicture → common/AppPicture}/index.d.ts +0 -0
  218. /package/dist/{AppPicture → common/AppPicture}/index.js +0 -0
  219. /package/dist/{AppPicture → common/AppPicture}/style.scss +0 -0
  220. /package/dist/{AppPlaceholder → common/AppPlaceholder}/AppPlaceholder.d.ts +0 -0
  221. /package/dist/{AppPlaceholder → common/AppPlaceholder}/AppPlaceholder.js +0 -0
  222. /package/dist/{AppPlaceholder → common/AppPlaceholder}/index.d.ts +0 -0
  223. /package/dist/{AppPlaceholder → common/AppPlaceholder}/index.js +0 -0
  224. /package/dist/{AppPlaceholder → common/AppPlaceholder}/style.scss +0 -0
  225. /package/dist/{AppReplaceAll → common/AppReplaceAll}/AppReplaceAll.d.ts +0 -0
  226. /package/dist/{AppReplaceAll → common/AppReplaceAll}/AppReplaceAll.js +0 -0
  227. /package/dist/{AppReplaceAll → common/AppReplaceAll}/index.d.ts +0 -0
  228. /package/dist/{AppReplaceAll → common/AppReplaceAll}/index.js +0 -0
  229. /package/dist/{AppReplaceAll → common/AppReplaceAll}/style.scss +0 -0
  230. /package/dist/{AppTable → common/AppTable}/AppTable.d.ts +0 -0
  231. /package/dist/{AppTable → common/AppTable}/AppTable.js +0 -0
  232. /package/dist/{AppTable → common/AppTable}/AppTableList.d.ts +0 -0
  233. /package/dist/{AppTable → common/AppTable}/AppTableList.js +0 -0
  234. /package/dist/{AppTable → common/AppTable}/AppTableTheme.d.ts +0 -0
  235. /package/dist/{AppTable → common/AppTable}/AppTableTheme.js +0 -0
  236. /package/dist/{AppTable → common/AppTable}/AppTableUtils.d.ts +0 -0
  237. /package/dist/{AppTable → common/AppTable}/AppTableUtils.js +0 -0
  238. /package/dist/{AppTable → common/AppTable}/index.d.ts +0 -0
  239. /package/dist/{AppTable → common/AppTable}/index.js +0 -0
  240. /package/dist/{AppTable → common/AppTable}/styles.scss +0 -0
  241. /package/dist/{AppTable → common/AppTable}/types/AppPage.d.ts +0 -0
  242. /package/dist/{AppTable → common/AppTable}/types/AppPage.js +0 -0
  243. /package/dist/{AppTable → common/AppTable}/types/AppPageable.d.ts +0 -0
  244. /package/dist/{AppTable → common/AppTable}/types/AppPageable.js +0 -0
  245. /package/dist/{AppToast → common/AppToast}/AppToast.d.ts +0 -0
  246. /package/dist/{AppToast → common/AppToast}/ToastMessage.d.ts +0 -0
  247. /package/dist/{AppToast → common/AppToast}/ToastMessage.js +0 -0
  248. /package/dist/{AppToast → common/AppToast}/index.d.ts +0 -0
  249. /package/dist/{AppToast → common/AppToast}/index.js +0 -0
  250. /package/dist/{AppToast → common/AppToast}/style.scss +0 -0
  251. /package/dist/{Comments → features/Comments}/CommentInfo.d.ts +0 -0
  252. /package/dist/{Comments/types → features/Comments}/CommentService.js +0 -0
  253. /package/dist/{Comments → features/Comments}/Comments.d.ts +0 -0
  254. /package/dist/{Comments → features/Comments}/HeaderNotifications/HeaderNotifications.d.ts +0 -0
  255. /package/dist/{Comments → features/Comments}/HeaderNotifications/index.d.ts +0 -0
  256. /package/dist/{Comments → features/Comments}/HeaderNotifications/index.js +0 -0
  257. /package/dist/{Comments → features/Comments}/HeaderNotifications/style.scss +0 -0
  258. /package/dist/{Comments → features/Comments}/index.d.ts +0 -0
  259. /package/dist/{Comments → features/Comments}/index.js +0 -0
  260. /package/dist/{Comments → features/Comments}/style.scss +0 -0
  261. /package/dist/{Comments → features/Comments}/types/Comment.d.ts +0 -0
  262. /package/dist/{Comments → features/Comments}/types/Comment.js +0 -0
  263. /package/dist/{CytoscapeMenu → features/CytoscapeMenu}/CytoscapeMenuCanvas.d.ts +0 -0
  264. /package/dist/{CytoscapeMenu → features/CytoscapeMenu}/CytoscapeMenuCanvas.js +0 -0
  265. /package/dist/{CytoscapeMenu → features/CytoscapeMenu}/constants.d.ts +0 -0
  266. /package/dist/{CytoscapeMenu → features/CytoscapeMenu}/constants.js +0 -0
  267. /package/dist/{CytoscapeMenu → features/CytoscapeMenu}/context-menu.d.ts +0 -0
  268. /package/dist/{CytoscapeMenu → features/CytoscapeMenu}/context-menu.js +0 -0
  269. /package/dist/{CytoscapeMenu → features/CytoscapeMenu}/cytoscape-context-menus.d.ts +0 -0
  270. /package/dist/{CytoscapeMenu → features/CytoscapeMenu}/cytoscape-context-menus.js +0 -0
  271. /package/dist/{CytoscapeMenu → features/CytoscapeMenu}/index.d.ts +0 -0
  272. /package/dist/{CytoscapeMenu → features/CytoscapeMenu}/index.js +0 -0
  273. /package/dist/{CytoscapeMenu → features/CytoscapeMenu}/style.scss +0 -0
  274. /package/dist/{CytoscapeMenu → features/CytoscapeMenu}/utils.d.ts +0 -0
  275. /package/dist/{CytoscapeMenu → features/CytoscapeMenu}/utils.js +0 -0
  276. /package/dist/{Parameters → features/Parameters}/Parameters.d.ts +0 -0
  277. /package/dist/{Parameters → features/Parameters}/index.d.ts +0 -0
  278. /package/dist/{Parameters → features/Parameters}/index.js +0 -0
  279. /package/dist/{Parameters → features/Parameters}/style.scss +0 -0
  280. /package/dist/{Participants → features/Participants}/ParticipantCreate/ParticipantCreate.d.ts +0 -0
  281. /package/dist/{Participants → features/Participants}/ParticipantCreate/index.d.ts +0 -0
  282. /package/dist/{Participants → features/Participants}/ParticipantCreate/index.js +0 -0
  283. /package/dist/{Participants → features/Participants}/ParticipantRemove/ParticipantRemove.d.ts +0 -0
  284. /package/dist/{Participants → features/Participants}/ParticipantRemove/index.d.ts +0 -0
  285. /package/dist/{Participants → features/Participants}/ParticipantRemove/index.js +0 -0
  286. /package/dist/{Participants → features/Participants}/ParticipantRemove/style.scss +0 -0
  287. /package/dist/{Participants/types → features/Participants}/ParticipantService.js +0 -0
  288. /package/dist/{Participants → features/Participants}/Participants.d.ts +0 -0
  289. /package/dist/{Participants → features/Participants}/index.d.ts +0 -0
  290. /package/dist/{Participants → features/Participants}/index.js +0 -0
  291. /package/dist/{Participants → features/Participants}/style.scss +0 -0
  292. /package/dist/{Participants → features/Participants}/types/Participant.js +0 -0
  293. /package/dist/{TreeView/cytoscape/NodeBounds.js → features/SentenceSplit/types/Language.js} +0 -0
  294. /package/dist/{SentenceView → features/SentenceView}/index.d.ts +0 -0
  295. /package/dist/{SentenceView → features/SentenceView}/index.js +0 -0
  296. /package/dist/{SentenceView → features/SentenceView}/style.scss +0 -0
  297. /package/dist/{TreeView → features/TreeView}/TreeViewSearch/TreeViewSearchField.d.ts +0 -0
  298. /package/dist/{TreeView → features/TreeView}/TreeViewSearch/TreeViewSearchField.js +0 -0
  299. /package/dist/{TreeView → features/TreeView}/TreeViewSearch/style.scss +0 -0
  300. /package/dist/{TreeView → features/TreeView}/cytoscape/Configuration.d.ts +0 -0
  301. /package/dist/{TreeView → features/TreeView}/cytoscape/Configuration.js +0 -0
  302. /package/dist/{TreeView → features/TreeView}/cytoscape/CytoscapePositionCalculator.d.ts +0 -0
  303. /package/dist/{TreeView → features/TreeView}/cytoscape/CytoscapePositionCalculator.js +0 -0
  304. /package/dist/{TreeView → features/TreeView}/cytoscape/CytoscapeStylesheet.d.ts +0 -0
  305. /package/dist/{TreeView → features/TreeView}/cytoscape/CytoscapeStylesheet.js +0 -0
  306. /package/dist/{TreeView → features/TreeView}/cytoscape/CytoscapeTreeConverter.js +0 -0
  307. /package/dist/{TreeView → features/TreeView}/cytoscape/NodeBounds.d.ts +0 -0
  308. /package/dist/{TreeView/cytoscape/NodeCalculation.js → features/TreeView/cytoscape/NodeBounds.js} +0 -0
  309. /package/dist/{TreeView → features/TreeView}/cytoscape/NodeCalculation.d.ts +0 -0
  310. /package/dist/{TreeView → features/TreeView}/cytoscape/NormalizedPosition.d.ts +0 -0
  311. /package/dist/{TreeView → features/TreeView}/cytoscape/NormalizedPosition.js +0 -0
  312. /package/dist/{TreeView → features/TreeView}/cytoscape/SyntreesCytoscape.js +0 -0
  313. /package/dist/{TreeView → features/TreeView}/cytoscape/TreeLayout.d.ts +0 -0
  314. /package/dist/{TreeView → features/TreeView}/cytoscape/TreeLayout.js +0 -0
  315. /package/dist/{TreeView → features/TreeView}/index.d.ts +0 -0
  316. /package/dist/{TreeView → features/TreeView}/index.js +0 -0
  317. /package/dist/{TreeView → features/TreeView}/style.scss +0 -0
  318. /package/dist/{Base → shell/Base}/ErrorBoundary.d.ts +0 -0
  319. /package/dist/{Base → shell/Base}/ErrorBoundary.js +0 -0
  320. /package/dist/{Base → shell/Base}/ErrorFound.d.ts +0 -0
  321. /package/dist/{Base → shell/Base}/Login.d.ts +0 -0
  322. /package/dist/{Base → shell/Base}/Login.js +0 -0
  323. /package/dist/{Base → shell/Base}/Logout.d.ts +0 -0
  324. /package/dist/{Base → shell/Base}/NotFound.d.ts +0 -0
  325. /package/dist/{Base → shell/Base}/NotFound.js +0 -0
  326. /package/dist/{Base → shell/Base}/Unauthorized.d.ts +0 -0
  327. /package/dist/{Base → shell/Base}/logo.png +0 -0
  328. /package/dist/{Base → shell/Base}/style.scss +0 -0
  329. /package/dist/{Header → shell/Header}/Header.d.ts +0 -0
  330. /package/dist/{Header → shell/Header}/Header.js +0 -0
  331. /package/dist/{Header → shell/Header}/HeaderApps/index.d.ts +0 -0
  332. /package/dist/{Header → shell/Header}/HeaderApps/index.js +0 -0
  333. /package/dist/{Header → shell/Header}/HeaderApps/logo.png +0 -0
  334. /package/dist/{Header → shell/Header}/HeaderApps/style.scss +0 -0
  335. /package/dist/{Header → shell/Header}/HeaderApps/youtube.png +0 -0
  336. /package/dist/{Header → shell/Header}/HeaderButtons/HeaderButtons.d.ts +0 -0
  337. /package/dist/{Header → shell/Header}/HeaderButtons/index.d.ts +0 -0
  338. /package/dist/{Header → shell/Header}/HeaderButtons/index.js +0 -0
  339. /package/dist/{Header → shell/Header}/HeaderButtons/styles.scss +0 -0
  340. /package/dist/{Header → shell/Header}/HeaderCorpora/HeaderCorpora.d.ts +0 -0
  341. /package/dist/{Header → shell/Header}/HeaderCorpora/HeaderCorpus.d.ts +0 -0
  342. /package/dist/{Header → shell/Header}/HeaderCorpora/index.d.ts +0 -0
  343. /package/dist/{Header → shell/Header}/HeaderCorpora/index.js +0 -0
  344. /package/dist/{Header → shell/Header}/HeaderCorpora/style.scss +0 -0
  345. /package/dist/{Header → shell/Header}/HeaderUser/HeaderUser.d.ts +0 -0
  346. /package/dist/{Header → shell/Header}/HeaderUser/index.d.ts +0 -0
  347. /package/dist/{Header → shell/Header}/HeaderUser/index.js +0 -0
  348. /package/dist/{Header → shell/Header}/HeaderUser/style.scss +0 -0
  349. /package/dist/{Header → shell/Header}/HelpButton/HelpButton.d.ts +0 -0
  350. /package/dist/{Header → shell/Header}/HelpButton/HelpButton.js +0 -0
  351. /package/dist/{Header → shell/Header}/HelpButton/HelpModal.d.ts +0 -0
  352. /package/dist/{Header → shell/Header}/HelpButton/index.d.ts +0 -0
  353. /package/dist/{Header → shell/Header}/HelpButton/index.js +0 -0
  354. /package/dist/{Header → shell/Header}/HelpButton/style.scss +0 -0
  355. /package/dist/{Header → shell/Header}/index.d.ts +0 -0
  356. /package/dist/{Header → shell/Header}/index.js +0 -0
  357. /package/dist/{Header → shell/Header}/styles.scss +0 -0
  358. /package/dist/{Header → shell/Header}/types/App.d.ts +0 -0
  359. /package/dist/{LanguageSelector → shell/LanguageSelector}/LanguageSelector.d.ts +0 -0
  360. /package/dist/{LanguageSelector → shell/LanguageSelector}/LanguageSelector.js +0 -0
  361. /package/dist/{LanguageSelector → shell/LanguageSelector}/index.d.ts +0 -0
  362. /package/dist/{LanguageSelector → shell/LanguageSelector}/index.js +0 -0
  363. /package/dist/{LanguageSelector → shell/LanguageSelector}/styles.scss +0 -0
  364. /package/dist/{VirtualKeyboard → shell/VirtualKeyboard}/KeyboardCustomLayout.d.ts +0 -0
  365. /package/dist/{VirtualKeyboard → shell/VirtualKeyboard}/KeyboardCustomLayout.js +0 -0
  366. /package/dist/{VirtualKeyboard → shell/VirtualKeyboard}/VirtualKeyboard.d.ts +0 -0
  367. /package/dist/{VirtualKeyboard → shell/VirtualKeyboard}/VirtualKeyboard.js +0 -0
  368. /package/dist/{VirtualKeyboard → shell/VirtualKeyboard}/index.d.ts +0 -0
  369. /package/dist/{VirtualKeyboard → shell/VirtualKeyboard}/index.js +0 -0
  370. /package/dist/{VirtualKeyboard → shell/VirtualKeyboard}/style.scss +0 -0
@@ -2,67 +2,62 @@ import i18n from 'i18next';
2
2
  import languageDetector from 'i18next-browser-languagedetector';
3
3
  import { initReactI18next } from 'react-i18next';
4
4
  import { BaseTexts } from './localization/BaseTexts';
5
- import { CommentsTexts } from './localization/CommentsTexts';
6
5
  import { CommonTexts } from './localization/CommonTexts';
7
6
  import { ConsentTexts } from './localization/ConsentTexts';
8
7
  import { HeaderAppTexts } from './localization/HeaderAppTexts';
9
8
  import { HeaderTexts } from './localization/HeaderTexts';
10
9
  import { HelpTexts } from './localization/HelpTexts';
10
+ import { UploadTexts } from './localization/UploadTexts';
11
+ import { CommentsTexts } from './localization/CommentsTexts';
11
12
  import { ParticipantsTexts } from './localization/ParticipantsTexts';
12
13
  import { SentenceTexts } from './localization/SentenceTexts';
13
14
  import { TreeTexts } from './localization/TreeTexts';
14
- import { UploadTexts } from './localization/UploadTexts';
15
15
  import { ParametersTexts } from './localization/ParametersTexts';
16
- export const commonResources = {
17
- en: {
18
- base: BaseTexts.en,
19
- comments: CommentsTexts.en,
20
- common: CommonTexts.en,
21
- header: HeaderTexts.en,
22
- 'header-app': HeaderAppTexts.en,
23
- participants: ParticipantsTexts.en,
24
- tree: TreeTexts.en,
25
- sentence: SentenceTexts.en,
26
- upload: UploadTexts.en,
27
- help: HelpTexts.en,
28
- consent: ConsentTexts.en,
29
- parameters: ParametersTexts.en,
30
- },
31
- 'pt-BR': {
32
- base: BaseTexts['pt-BR'],
33
- comments: CommentsTexts['pt-BR'],
34
- common: CommonTexts['pt-BR'],
35
- header: HeaderTexts['pt-BR'],
36
- 'header-app': HeaderAppTexts['pt-BR'],
37
- participants: ParticipantsTexts['pt-BR'],
38
- sentence: SentenceTexts['pt-BR'],
39
- tree: TreeTexts['pt-BR'],
40
- upload: UploadTexts['pt-BR'],
41
- help: HelpTexts['pt-BR'],
42
- consent: ConsentTexts['pt-BR'],
43
- parameters: ParametersTexts['pt-BR'],
44
- },
45
- it: {
46
- base: BaseTexts.it,
47
- comments: CommentsTexts.it,
48
- common: CommonTexts.it,
49
- header: HeaderTexts.it,
50
- 'header-app': HeaderAppTexts.it,
51
- participants: ParticipantsTexts.it,
52
- sentence: SentenceTexts.it,
53
- tree: TreeTexts.it,
54
- upload: UploadTexts.it,
55
- help: HelpTexts.it,
56
- consent: ConsentTexts.it,
57
- parameters: ParametersTexts.it,
58
- },
16
+ import { SentenceSplitTexts } from '../features/SentenceSplit/localization/SentenceSplitTexts';
17
+ function buildResources(namespaces) {
18
+ return {
19
+ en: Object.fromEntries(Object.entries(namespaces).map(([key, texts]) => [key, texts.en])),
20
+ 'pt-BR': Object.fromEntries(Object.entries(namespaces).map(([key, texts]) => [key, texts['pt-BR']])),
21
+ it: Object.fromEntries(Object.entries(namespaces).map(([key, texts]) => [key, texts.it])),
22
+ };
23
+ }
24
+ const CORE_NAMESPACES = {
25
+ base: BaseTexts,
26
+ common: CommonTexts,
27
+ header: HeaderTexts,
28
+ 'header-app': HeaderAppTexts,
29
+ upload: UploadTexts,
30
+ help: HelpTexts,
31
+ consent: ConsentTexts,
32
+ };
33
+ const FEATURE_NAMESPACES = {
34
+ comments: CommentsTexts,
35
+ participants: ParticipantsTexts,
36
+ tree: TreeTexts,
37
+ sentence: SentenceTexts,
38
+ parameters: ParametersTexts,
39
+ sentenceSplit: SentenceSplitTexts,
59
40
  };
60
- export default function commonLocalization() {
41
+ export const commonResources = buildResources(CORE_NAMESPACES);
42
+ export const featureResources = buildResources(FEATURE_NAMESPACES);
43
+ export function mergeResources(core = commonResources, features = featureResources) {
44
+ const locales = ['en', 'pt-BR', 'it'];
45
+ return Object.fromEntries(locales.map((locale) => [
46
+ locale,
47
+ {
48
+ ...core[locale],
49
+ ...features[locale],
50
+ },
51
+ ]));
52
+ }
53
+ export function commonLocalization(includeFeatures = true) {
61
54
  i18n
62
55
  .use(initReactI18next)
63
56
  .use(languageDetector)
64
57
  .init({
65
- resources: commonResources,
58
+ resources: includeFeatures
59
+ ? mergeResources()
60
+ : commonResources,
66
61
  fallbackLng: 'en',
67
62
  defaultNS: 'common',
68
63
  interpolation: {
@@ -0,0 +1,27 @@
1
+ export { CommonProvider } from './CommonContext';
2
+ export { default as CommonContext } from './CommonContext';
3
+ export { default as CookieStorage } from './CookieStorage';
4
+ export { commonResources, featureResources, mergeResources, commonLocalization, } from './Localization';
5
+ export { default as LexiconListService } from './services/LexiconListService';
6
+ export { default as ParserListService } from './services/ParserListService';
7
+ export type { Corpus, CorpusRequest, Github } from './types/Corpus';
8
+ export { CorpusStatusNames } from './types/CorpusStatus';
9
+ export type { CorpusStatus } from './types/CorpusStatus';
10
+ export { DocumentStatusNames } from './types/Document';
11
+ export type { DocumentStatus, default as Document } from './types/Document';
12
+ export { CorpusImageTypeNames } from './types/CorpusImage';
13
+ export type { CorpusImage, CorpusImageType } from './types/CorpusImage';
14
+ export { EditionTiers } from './types/EditionTiers';
15
+ export type { Parameter, ParameterType } from './types/Parameter';
16
+ export { SentenceStatusNames } from './types/SentenceStatus';
17
+ export type { SentenceStatus } from './types/SentenceStatus';
18
+ export type { Mark, Break, Format as SentenceFormat, SentenceTier, Translation, } from './types/Sentence';
19
+ export type { default as Sentence } from './types/Sentence';
20
+ export type { Chunk, Edition, Format, Morpheme, Split, Struct, Token, ConlluToken, } from './types/Struct';
21
+ export type { CytoscapeTree, Tree } from './types/Tree';
22
+ export { UserStatusNames } from './types/User';
23
+ export type { User, UserStatus } from './types/User';
24
+ export { useCorpusUtils } from './useCorpusUtils';
25
+ export { useLoggedUtils } from './useLoggedUtils';
26
+ export { useMessageUtils } from './useMessageUtils';
27
+ export { useTourUtils } from './useTourUtils';
@@ -0,0 +1,16 @@
1
+ export { CommonProvider } from './CommonContext';
2
+ export { default as CommonContext } from './CommonContext';
3
+ export { default as CookieStorage } from './CookieStorage';
4
+ export { commonResources, featureResources, mergeResources, commonLocalization, } from './Localization';
5
+ export { default as LexiconListService } from './services/LexiconListService';
6
+ export { default as ParserListService } from './services/ParserListService';
7
+ export { CorpusStatusNames } from './types/CorpusStatus';
8
+ export { DocumentStatusNames } from './types/Document';
9
+ export { CorpusImageTypeNames } from './types/CorpusImage';
10
+ export { EditionTiers } from './types/EditionTiers';
11
+ export { SentenceStatusNames } from './types/SentenceStatus';
12
+ export { UserStatusNames } from './types/User';
13
+ export { useCorpusUtils } from './useCorpusUtils';
14
+ export { useLoggedUtils } from './useLoggedUtils';
15
+ export { useMessageUtils } from './useMessageUtils';
16
+ export { useTourUtils } from './useTourUtils';
@@ -1,4 +1,4 @@
1
- import { Struct } from '../../configs/types/Struct';
1
+ import { Struct } from '../types/Struct';
2
2
  export declare const structWithMorphemes: Struct;
3
3
  export declare const structNotParsed: Struct;
4
4
  export declare const structWithEditionTiers: Struct;
@@ -1,4 +1,4 @@
1
- import ToastMessage from '../../AppToast/ToastMessage';
1
+ import ToastMessage from '../../common/AppToast/ToastMessage';
2
2
  import { Corpus } from '../types/Corpus';
3
3
  import { User } from '../types/User';
4
4
  import { StoreAction } from './types';
@@ -1,4 +1,4 @@
1
- import { EMPTY_TOAST } from '../../AppToast/ToastMessage';
1
+ import { EMPTY_TOAST } from '../../common/AppToast/ToastMessage';
2
2
  const store = {
3
3
  corpus: undefined,
4
4
  logged: undefined,
@@ -1,4 +1,4 @@
1
- import ToastMessage from '../../AppToast/ToastMessage';
1
+ import ToastMessage from '../../common/AppToast/ToastMessage';
2
2
  import { Corpus } from '../types/Corpus';
3
3
  import { User } from '../types/User';
4
4
  export type UserStore = {
@@ -1,4 +1,4 @@
1
- import Participant from '../../Participants/types/Participant';
1
+ import Participant from '../../features/Participants/types/Participant';
2
2
  import { PlatformTools } from '../../functions/ToolsUtils';
3
3
  export type DocumentStatus = 'EDITING' | 'EDITED' | 'SYNTACTIC' | 'COMPLETED';
4
4
  export declare const DocumentStatusNames: {
@@ -2,7 +2,7 @@ import { Token } from "./Struct";
2
2
  import { Edition } from "./Struct";
3
3
  import { Struct } from "./Struct";
4
4
  import { SentenceStatus } from "./SentenceStatus";
5
- import { UploadedFile } from "../../AppDropzone/UploadedFile";
5
+ import { UploadedFile } from "../../common/AppDropzone/UploadedFile";
6
6
  export type Mark = {
7
7
  id: string;
8
8
  tokens: Token[];
@@ -2,4 +2,4 @@
2
2
  * Cytoscape context menus extension.
3
3
  * Use: import contextMenus from 'tycho-components/cytoscape-context-menus'
4
4
  */
5
- export { contextMenus as default } from './CytoscapeMenu/cytoscape-context-menus';
5
+ export { contextMenus as default } from './features/CytoscapeMenu/cytoscape-context-menus';
@@ -2,4 +2,4 @@
2
2
  * Cytoscape context menus extension.
3
3
  * Use: import contextMenus from 'tycho-components/cytoscape-context-menus'
4
4
  */
5
- export { contextMenus as default } from './CytoscapeMenu/cytoscape-context-menus';
5
+ export { contextMenus as default } from './features/CytoscapeMenu/cytoscape-context-menus';
@@ -1,4 +1,4 @@
1
- import { User } from '../configs/types/User';
1
+ import { User } from '../../configs/types/User';
2
2
  import './style.scss';
3
3
  import { Comment } from './types/Comment';
4
4
  type Props = {
@@ -4,11 +4,11 @@ import { useForm } from 'react-hook-form';
4
4
  import { useTranslation } from 'react-i18next';
5
5
  import { Button, SelectField, TextField } from 'tycho-storybook';
6
6
  import * as yup from 'yup';
7
- import { useMessageUtils } from '../configs/useMessageUtils';
8
- import FormUtils from '../functions/FormUtils';
7
+ import { useMessageUtils } from '../../configs/useMessageUtils';
8
+ import FormUtils from '../../functions/FormUtils';
9
9
  import './style.scss';
10
10
  import { EMPTY_COMMENT_REQUEST, } from './types/Comment';
11
- import CommentService from './types/CommentService';
11
+ import CommentService from './CommentService';
12
12
  export default function CommentAdd({ uid, mode, users, references, keywords, comment, reply, onClose, onChange, }) {
13
13
  const { t } = useTranslation('comments');
14
14
  const { isLoading, dispatchLoading } = useMessageUtils();
@@ -2,10 +2,10 @@ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-run
2
2
  import { useContext } from 'react';
3
3
  import { useTranslation } from 'react-i18next';
4
4
  import { Avatar, IconButton } from 'tycho-storybook';
5
- import CommonContext from '../configs/CommonContext';
6
- import DateUtils from '../functions/DateUtils';
5
+ import CommonContext from '../../configs/CommonContext';
6
+ import DateUtils from '../../functions/DateUtils';
7
7
  import './style.scss';
8
- import CommentService from './types/CommentService';
8
+ import CommentService from './CommentService';
9
9
  export default function CommentInfo({ comment, onRemove, onUpdate, onEdit, onReply, }) {
10
10
  const { t } = useTranslation('comments');
11
11
  const { state } = useContext(CommonContext);
@@ -1,5 +1,5 @@
1
1
  import { User } from '../../configs/types/User';
2
- import { Comment, CommentRequest } from './Comment';
2
+ import { Comment, CommentRequest } from './types/Comment';
3
3
  declare function findNotifications(uid: string, mode: string): Promise<import("axios").AxiosResponse<Comment[], any, {}>>;
4
4
  declare function findReadNotifications(uid: string, mode: string): Promise<import("axios").AxiosResponse<Comment[], any, {}>>;
5
5
  declare function markRead(id: string): Promise<import("axios").AxiosResponse<Comment, any, {}>>;
@@ -3,14 +3,14 @@ import { Drawer } from '@mui/material';
3
3
  import { useEffect, useMemo, useState } from 'react';
4
4
  import { useTranslation } from 'react-i18next';
5
5
  import { Button, IconButton } from 'tycho-storybook';
6
- import AppLoading from '../AppLoading';
7
- import AppPlaceholder from '../AppPlaceholder';
8
- import SecurityUtils from '../functions/SecurityUtils';
9
- import UsabilityUtils from '../functions/UsabilityUtils';
6
+ import AppLoading from '../../common/AppLoading';
7
+ import AppPlaceholder from '../../common/AppPlaceholder';
8
+ import SecurityUtils from '../../functions/SecurityUtils';
9
+ import UsabilityUtils from '../../functions/UsabilityUtils';
10
10
  import CommentAdd from './CommentAdd';
11
11
  import CommentInfo from './CommentInfo';
12
12
  import './style.scss';
13
- import CommentService from './types/CommentService';
13
+ import CommentService from './CommentService';
14
14
  export default function Comments({ uid, keywords, references, mode, onClose, onChange, }) {
15
15
  const { t } = useTranslation('comments');
16
16
  const [openAddComment, setOpenAddComment] = useState(false);
@@ -3,8 +3,8 @@ import { useEffect, useState } from 'react';
3
3
  import { Trans, useTranslation } from 'react-i18next';
4
4
  import { useNavigate } from 'react-router-dom';
5
5
  import { Avatar, IconButton } from 'tycho-storybook';
6
- import DateUtils from '../../functions/DateUtils';
7
- import CommentService from '../types/CommentService';
6
+ import DateUtils from '../../../functions/DateUtils';
7
+ import CommentService from '../CommentService';
8
8
  import './style.scss';
9
9
  export default function HeaderNotifications({ uid, mode, mobile }) {
10
10
  const navigate = useNavigate();
@@ -4,7 +4,7 @@ import Switch from '@mui/material/Switch';
4
4
  import Tooltip from '@mui/material/Tooltip';
5
5
  import React, { useState } from 'react';
6
6
  import { useTranslation } from 'react-i18next';
7
- import { useLoggedUtils } from '../configs/useLoggedUtils';
7
+ import { useLoggedUtils } from '../../configs/useLoggedUtils';
8
8
  import { Icon } from 'tycho-storybook';
9
9
  import './style.scss';
10
10
  export default function Parameters({ parameters, onChange }) {
@@ -5,10 +5,10 @@ import { useForm } from 'react-hook-form';
5
5
  import { useTranslation } from 'react-i18next';
6
6
  import { TextField } from 'tycho-storybook';
7
7
  import * as yup from 'yup';
8
- import AppModal from '../../AppModal';
9
- import CommonContext from '../../configs/CommonContext';
10
- import ParticipantService from '../types/ParticipantService';
11
- import { useMessageUtils } from '../../configs/useMessageUtils';
8
+ import AppModal from '../../../common/AppModal';
9
+ import CommonContext from '../../../configs/CommonContext';
10
+ import ParticipantService from '../ParticipantService';
11
+ import { useMessageUtils } from '../../../configs/useMessageUtils';
12
12
  export default function ParticipantCreate({ document, onClose, onCreate, }) {
13
13
  const { t } = useTranslation('participants');
14
14
  const { state } = useContext(CommonContext);
@@ -3,10 +3,10 @@ import { Box, Modal } from '@mui/material';
3
3
  import { useContext } from 'react';
4
4
  import { useTranslation } from 'react-i18next';
5
5
  import { Button, Icon, SelectField } from 'tycho-storybook';
6
- import { modalRemoveStyle } from '../../AppModal/AppModalRemove';
7
- import CommonContext from '../../configs/CommonContext';
8
- import { useMessageUtils } from '../../configs/useMessageUtils';
9
- import ParticipantService from '../types/ParticipantService';
6
+ import { modalRemoveStyle } from '../../../common/AppModal/AppModalRemove';
7
+ import CommonContext from '../../../configs/CommonContext';
8
+ import { useMessageUtils } from '../../../configs/useMessageUtils';
9
+ import ParticipantService from '../ParticipantService';
10
10
  import { useForm } from 'react-hook-form';
11
11
  import './style.scss';
12
12
  export default function ParticipantRemove({ participant, participants, document, onClose, onChange, }) {
@@ -1,5 +1,5 @@
1
- import { AppEditableField } from '../../AppEditable/AppEditableField';
2
- import Participant, { ParticipantCreateRequest } from './Participant';
1
+ import { AppEditableField } from '../../common/AppEditable/AppEditableField';
2
+ import Participant, { ParticipantCreateRequest } from './types/Participant';
3
3
  declare function add(uid: string, request: ParticipantCreateRequest): Promise<import("axios").AxiosResponse<Participant, any, {}>>;
4
4
  declare function update(field: AppEditableField): Promise<import("axios").AxiosResponse<any, any, {}>>;
5
5
  declare function remove(document: string, code: string, transfer?: string): Promise<import("axios").AxiosResponse<any, any, {}>>;
@@ -3,13 +3,13 @@ import { MenuItem, Select } from '@mui/material';
3
3
  import { useEffect, useState } from 'react';
4
4
  import { useTranslation } from 'react-i18next';
5
5
  import { Button } from 'tycho-storybook';
6
- import AppEditable from '../AppEditable';
7
- import { useMessageUtils } from '../configs/useMessageUtils';
6
+ import AppEditable from '../../common/AppEditable';
7
+ import { useMessageUtils } from '../../configs/useMessageUtils';
8
8
  import ParticipantCreate from './ParticipantCreate';
9
9
  import ParticipantRemove from './ParticipantRemove';
10
10
  import './style.scss';
11
11
  import { CHAT_FIELDS, PARTICIPANT_FIELDS, } from './types/Participant';
12
- import ParticipantService from './types/ParticipantService';
12
+ import ParticipantService from './ParticipantService';
13
13
  export default function Participants({ document, participants, onChange, useChat, }) {
14
14
  const { t } = useTranslation('participants');
15
15
  const { dispatchMessage } = useMessageUtils();
@@ -1,4 +1,4 @@
1
- import { FormField } from '../../AppEditable/FormField';
1
+ import { FormField } from '../../../common/AppEditable/FormField';
2
2
  type Participant = {
3
3
  order: number;
4
4
  code: string;
@@ -0,0 +1,28 @@
1
+ import { Parameter } from '../../configs/types/Parameter';
2
+ import { Struct } from '../../configs/types/Struct';
3
+ import { type ButtonDSModes, type ButtonDSSizes, type TooltipPlacements } from 'tycho-storybook';
4
+ import SentenceSplitLanguage from './types/Language';
5
+ import './style.scss';
6
+ export type SentenceSplitTranslationsInput = {
7
+ values: Record<string, string>;
8
+ };
9
+ export type SentenceSplitIconButtonProps = {
10
+ mode?: ButtonDSModes;
11
+ size?: ButtonDSSizes;
12
+ iconSize?: ButtonDSSizes;
13
+ tooltipPlacement?: TooltipPlacements;
14
+ };
15
+ type Props = {
16
+ struct: Struct;
17
+ documentUid: string;
18
+ wordTiers: Parameter[];
19
+ languages: SentenceSplitLanguage[];
20
+ translations: SentenceSplitTranslationsInput;
21
+ sound: string;
22
+ /** When set, pre-selects the split after the word with this token position (`tok.p`). */
23
+ selected?: number;
24
+ onSuccess?: () => void;
25
+ iconButtonProps?: SentenceSplitIconButtonProps;
26
+ };
27
+ export default function SentenceSplit({ struct, documentUid, wordTiers, languages, translations, sound, selected, onSuccess, iconButtonProps, }: Props): import("react/jsx-runtime").JSX.Element;
28
+ export {};
@@ -0,0 +1,180 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import { useEffect, useMemo, useRef, useState } from 'react';
3
+ import { useTranslation } from 'react-i18next';
4
+ import AppModal from '../../common/AppModal/AppModal';
5
+ import SentenceUtils from '../../functions/SentenceUtils';
6
+ import { useCorpusUtils } from '../../configs/useCorpusUtils';
7
+ import { useMessageUtils } from '../../configs/useMessageUtils';
8
+ import { Badge, Button, IconButton, } from 'tycho-storybook';
9
+ import SentenceSplitAudioStep from './SentenceSplitAudio';
10
+ import SentenceSplitChoose from './SentenceSplitChoose';
11
+ import SentenceSplitCommentsStep from './SentenceSplitComments';
12
+ import SentenceSplitPreviewStep from './SentenceSplitPreview';
13
+ import SentenceSplitTranslationsStep from './SentenceSplitTranslations';
14
+ import SentenceSplitService from './SentenceSplitService';
15
+ import SentenceSplitUtils from './SentenceSplitUtils';
16
+ import { emptySentenceSplitRequest, } from './types/SentenceSplitRequest';
17
+ import './style.scss';
18
+ const STEP_CHOOSE = 0;
19
+ const STEP_PREVIEW = 1;
20
+ const STEP_TRANSLATIONS = 2;
21
+ const STEP_AUDIO = 3;
22
+ const STEP_COMMENTS = 4;
23
+ const DEFAULT_ICON_BUTTON_PROPS = {
24
+ mode: 'ghost',
25
+ size: 'medium',
26
+ iconSize: 'medium',
27
+ tooltipPlacement: 'bottom',
28
+ };
29
+ /** Split is after this token's word; must not be the last visible word. */
30
+ function resolveInitialSplitToken(selected, wordTokens) {
31
+ if (selected === undefined)
32
+ return 0;
33
+ const idx = wordTokens.findIndex((tok) => tok.p === selected);
34
+ if (idx === -1 || idx === wordTokens.length - 1)
35
+ return 0;
36
+ return selected;
37
+ }
38
+ export default function SentenceSplit({ struct, documentUid, wordTiers, languages, translations, sound, selected, onSuccess, iconButtonProps, }) {
39
+ const { t } = useTranslation('sentenceSplit');
40
+ const { getCorpus } = useCorpusUtils();
41
+ const { dispatchError, isLoading, dispatchLoading } = useMessageUtils();
42
+ const [open, setOpen] = useState(false);
43
+ const [step, setStep] = useState(STEP_CHOOSE);
44
+ const [request, setRequest] = useState(emptySentenceSplitRequest);
45
+ const [hasComments, setHasComments] = useState(null);
46
+ const stepsContentRef = useRef(null);
47
+ const stepItemRefs = useRef({});
48
+ const load = () => {
49
+ if (open) {
50
+ setStep(STEP_CHOOSE);
51
+ const baseValues = { ...(translations?.values || {}) };
52
+ const sorted = SentenceUtils.sort(struct);
53
+ const tokens = sorted.filter((tok) => SentenceUtils.isVisible(tok) && !SentenceSplitUtils.skipToken(tok));
54
+ setRequest({
55
+ uid: struct.uid,
56
+ token: resolveInitialSplitToken(selected, tokens),
57
+ translationsFirst: baseValues,
58
+ translationsSecond: { ...baseValues },
59
+ });
60
+ }
61
+ };
62
+ const wordTokens = useMemo(() => {
63
+ const sorted = SentenceUtils.sort(struct);
64
+ return sorted.filter((tok) => SentenceUtils.isVisible(tok) && !SentenceSplitUtils.skipToken(tok));
65
+ }, [struct]);
66
+ const canProceedFromChoose = request.token && wordTokens.length >= 2;
67
+ const hasTranslations = useMemo(() => {
68
+ if (!languages?.length)
69
+ return false;
70
+ const values = translations?.values ?? {};
71
+ return Object.values(values).some((v) => String(v ?? '').trim().length > 0);
72
+ }, [languages, translations]);
73
+ const hasAudio = Boolean(sound?.trim());
74
+ const visibleStepIds = useMemo(() => {
75
+ const ids = [STEP_CHOOSE, STEP_PREVIEW];
76
+ if (hasTranslations)
77
+ ids.push(STEP_TRANSLATIONS);
78
+ if (hasAudio)
79
+ ids.push(STEP_AUDIO);
80
+ if (hasComments === true)
81
+ ids.push(STEP_COMMENTS);
82
+ return ids;
83
+ }, [hasTranslations, hasAudio, hasComments]);
84
+ const stepIndex = visibleStepIds.indexOf(step);
85
+ const isLastStep = stepIndex >= 0 && stepIndex === visibleStepIds.length - 1;
86
+ const canGoBack = stepIndex > 0;
87
+ const handleBack = () => {
88
+ if (canGoBack)
89
+ setStep(visibleStepIds[stepIndex - 1]);
90
+ };
91
+ const handleNext = () => {
92
+ if (stepIndex >= 0 && stepIndex < visibleStepIds.length - 1) {
93
+ setStep(visibleStepIds[stepIndex + 1]);
94
+ }
95
+ };
96
+ const handleFinishSplit = () => {
97
+ if (isLoading())
98
+ return;
99
+ dispatchLoading(true);
100
+ SentenceSplitService.split(struct.uid, request)
101
+ .then(() => onSuccess?.())
102
+ .catch((err) => {
103
+ dispatchLoading(false);
104
+ dispatchError({ err, t });
105
+ });
106
+ };
107
+ const commentsCheckPending = hasComments === null;
108
+ const disablePrimary = (step === STEP_CHOOSE && !canProceedFromChoose) ||
109
+ (step === STEP_PREVIEW && request.token === null) ||
110
+ (step === STEP_COMMENTS && isLoading()) ||
111
+ commentsCheckPending;
112
+ const canOpenSplit = wordTokens.length >= 2;
113
+ const steps = useMemo(() => {
114
+ const definitions = [
115
+ { id: STEP_CHOOSE, label: t('split.words.title') },
116
+ { id: STEP_PREVIEW, label: t('split.preview.title') },
117
+ { id: STEP_TRANSLATIONS, label: t('split.translations.title') },
118
+ { id: STEP_AUDIO, label: t('split.audio.title') },
119
+ { id: STEP_COMMENTS, label: t('split.comments.title') },
120
+ ];
121
+ return definitions
122
+ .filter((item) => visibleStepIds.includes(item.id))
123
+ .map((item, index) => ({ ...item, displayNumber: index + 1 }));
124
+ }, [visibleStepIds, t]);
125
+ useEffect(() => {
126
+ load();
127
+ }, [open, translations, struct.uid, selected]);
128
+ useEffect(() => {
129
+ if (!open) {
130
+ setHasComments(null);
131
+ return;
132
+ }
133
+ let cancelled = false;
134
+ SentenceSplitService.findComments(getCorpus().uid, {
135
+ sentence: struct.uid,
136
+ document: documentUid,
137
+ page: struct.page,
138
+ })
139
+ .then((r) => {
140
+ if (!cancelled)
141
+ setHasComments(r.data.length > 0);
142
+ })
143
+ .catch((err) => {
144
+ if (!cancelled) {
145
+ setHasComments(false);
146
+ dispatchError({ err, t });
147
+ }
148
+ });
149
+ return () => {
150
+ cancelled = true;
151
+ };
152
+ }, [open, struct.uid, documentUid, struct.page, getCorpus, dispatchError, t]);
153
+ useEffect(() => {
154
+ if (!open || visibleStepIds.includes(step))
155
+ return;
156
+ setStep(visibleStepIds[0] ?? STEP_CHOOSE);
157
+ }, [open, visibleStepIds, step]);
158
+ useEffect(() => {
159
+ if (!open)
160
+ return;
161
+ const activeStepItem = stepItemRefs.current[step];
162
+ if (activeStepItem) {
163
+ activeStepItem.scrollIntoView({
164
+ behavior: 'smooth',
165
+ block: 'nearest',
166
+ inline: 'center',
167
+ });
168
+ }
169
+ stepsContentRef.current?.scrollTo({
170
+ top: 0,
171
+ behavior: 'smooth',
172
+ });
173
+ }, [step, open]);
174
+ const mergedIconProps = { ...DEFAULT_ICON_BUTTON_PROPS, ...iconButtonProps };
175
+ return (_jsxs(_Fragment, { children: [_jsx(IconButton, { name: "link_off", onClick: () => setOpen(true), title: canOpenSplit
176
+ ? t('button.label.split')
177
+ : t('split.button.disabledTooFewWords'), disabled: !canOpenSplit, ...mergedIconProps }), open && (_jsxs(AppModal, { title: t('modal.split.sentence.title'), className: "sentence-split-modal", close: () => setOpen(false), hideFooter: true, disableEscapeClose: true, disableBackdropClose: true, children: [_jsx("div", { className: "steps-navigation", children: steps.map((stepItem) => (_jsxs("div", { className: `step-item ${step === stepItem.id ? 'active' : ''}`, onClick: () => setStep(stepItem.id), ref: (element) => {
178
+ stepItemRefs.current[stepItem.id] = element;
179
+ }, children: [_jsx(Badge, { text: stepItem.displayNumber.toString(), size: "medium", color: step === stepItem.id ? 'blue' : 'none' }), _jsx("div", { className: "step-label", children: stepItem.label })] }, stepItem.id))) }), _jsxs("div", { className: "steps-content", ref: stepsContentRef, children: [_jsxs("div", { className: "sentence-split-body", children: [step === STEP_CHOOSE && (_jsx(SentenceSplitChoose, { struct: struct, request: request, onChange: setRequest })), step === STEP_PREVIEW && request.token !== null && (_jsx(SentenceSplitPreviewStep, { struct: struct, request: request, wordTiers: wordTiers })), step === STEP_TRANSLATIONS && (_jsx(SentenceSplitTranslationsStep, { languages: languages, request: request, onChange: setRequest })), step === STEP_AUDIO && (_jsx(SentenceSplitAudioStep, { sound: sound, request: request, onChange: setRequest })), step === STEP_COMMENTS && request.token !== null && (_jsx(SentenceSplitCommentsStep, { struct: struct, documentUid: documentUid, request: request, onChange: setRequest }))] }), _jsxs("div", { className: "steps-footer", children: [canGoBack && (_jsx(Button, { text: t('split.button.back'), onClick: handleBack, size: "medium", mode: "ghost" })), _jsx(Button, { text: isLastStep ? t('split.button.finish') : t('split.button.next'), onClick: isLastStep ? handleFinishSplit : handleNext, size: "medium", disabled: disablePrimary })] })] })] }))] }));
180
+ }
@@ -0,0 +1,9 @@
1
+ import { SentenceSplitRequest } from '../types/SentenceSplitRequest';
2
+ import './style.scss';
3
+ type Props = {
4
+ sound: string;
5
+ request: SentenceSplitRequest;
6
+ onChange: (request: SentenceSplitRequest) => void;
7
+ };
8
+ export default function SentenceSplitAudioStep({ sound, request, onChange, }: Props): import("react/jsx-runtime").JSX.Element;
9
+ export {};