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
@@ -0,0 +1,38 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useCallback, useRef, useState } from 'react';
3
+ import { useTranslation } from 'react-i18next';
4
+ import AppPlaceholder from '../../../common/AppPlaceholder/AppPlaceholder';
5
+ import { Button } from 'tycho-storybook';
6
+ import { WaveForm, WaveSurfer } from 'wavesurfer-react';
7
+ const WaveFormTyped = WaveForm;
8
+ import './style.scss';
9
+ export default function SentenceSplitAudioStep({ sound, request, onChange, }) {
10
+ const { t } = useTranslation('sentenceSplit');
11
+ const [simple, setSimple] = useState();
12
+ const [playing, setPlaying] = useState(false);
13
+ const requestRef = useRef(request);
14
+ requestRef.current = request;
15
+ const handlePlayPause = () => {
16
+ setPlaying(!playing);
17
+ simple?.playPause();
18
+ };
19
+ const handleWSMount = useCallback((waveSurfer) => {
20
+ setSimple(waveSurfer);
21
+ if (waveSurfer.markers) {
22
+ waveSurfer.clearMarkers();
23
+ }
24
+ waveSurfer.load(sound);
25
+ const handleSeek = (progress) => {
26
+ const duration = waveSurfer.getDuration();
27
+ if (!duration || !Number.isFinite(duration))
28
+ return;
29
+ onChange({
30
+ ...requestRef.current,
31
+ soundSplit: progress * duration,
32
+ });
33
+ };
34
+ waveSurfer.on('finish', handlePlayPause);
35
+ waveSurfer.on('seek', handleSeek);
36
+ }, [sound, onChange]);
37
+ return (_jsxs("div", { className: "step-content sentence-split-step-audio", children: [_jsxs("div", { className: "header", children: [_jsx("div", { className: "title", children: t('split.audio.title') }), _jsx("div", { className: "subtitle", children: t('split.audio.description') })] }), _jsxs("div", { className: "step-body", children: [!sound && (_jsx(AppPlaceholder, { text: t('split.audio.empty'), icon: "music_cast" })), sound && (_jsxs("div", { className: "sentence-split-audio-wrap", children: [_jsx(WaveSurfer, { onMount: handleWSMount, children: _jsx(WaveFormTyped, { id: "waveform-sentence-split", waveColor: "violet", progressColor: "purple" }) }), _jsxs("div", { className: "buttons", children: [_jsx(Button, { text: playing ? t('split.audio.pause') : t('split.audio.play'), icon: playing ? 'pause' : 'play_arrow', onClick: handlePlayPause, size: "medium" }), _jsxs("span", { className: "time", children: [t('split.audio.cutPoint'), ":", ' ', request.soundSplit?.toFixed(2) || '0.00'] })] })] }))] })] }));
38
+ }
@@ -0,0 +1,2 @@
1
+ import SentenceSplitAudioStep from './SentenceSplitAudioStep';
2
+ export default SentenceSplitAudioStep;
@@ -0,0 +1,2 @@
1
+ import SentenceSplitAudioStep from './SentenceSplitAudioStep';
2
+ export default SentenceSplitAudioStep;
@@ -0,0 +1,29 @@
1
+ .sentence-split-step-audio {
2
+ .sentence-split-audio-wrap {
3
+ margin-top: 24px;
4
+
5
+ #waveform-sentence-split {
6
+ border: 1px solid var(--border-subtle-1);
7
+
8
+ > wave {
9
+ overflow: hidden !important;
10
+ }
11
+ }
12
+
13
+ > .buttons {
14
+ display: flex;
15
+ justify-content: center;
16
+ margin-top: 16px;
17
+
18
+ .ds-icon-button {
19
+ margin-left: auto;
20
+ }
21
+
22
+ .time {
23
+ @include helper-large-1;
24
+ color: var(--text-secondary);
25
+ margin-left: auto;
26
+ }
27
+ }
28
+ }
29
+ }
@@ -0,0 +1,10 @@
1
+ import { Struct } from '../../../configs/types/Struct';
2
+ import { SentenceSplitRequest } from '../types/SentenceSplitRequest';
3
+ import './style.scss';
4
+ type Props = {
5
+ struct: Struct;
6
+ request: SentenceSplitRequest;
7
+ onChange: (request: SentenceSplitRequest) => void;
8
+ };
9
+ export default function SentenceSplitChoose({ struct, request, onChange, }: Props): import("react/jsx-runtime").JSX.Element;
10
+ export {};
@@ -0,0 +1,23 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import cx from 'classnames';
3
+ import { useTranslation } from 'react-i18next';
4
+ import SentenceUtils from '../../../functions/SentenceUtils';
5
+ import SentenceSplitUtils from '../SentenceSplitUtils';
6
+ import './style.scss';
7
+ export default function SentenceSplitChoose({ struct, request, onChange, }) {
8
+ const { t } = useTranslation('sentenceSplit');
9
+ const sorted = SentenceUtils.sort(struct);
10
+ const wordTokens = sorted.filter((tok) => SentenceUtils.isVisible(tok) && !SentenceSplitUtils.skipToken(tok));
11
+ const handleSelect = (tokenP) => {
12
+ onChange({ ...request, token: tokenP });
13
+ };
14
+ return (_jsxs("div", { className: "step-content", children: [_jsxs("div", { className: "header", children: [_jsx("div", { className: "title", children: t('split.words.title') }), _jsx("div", { className: "subtitle", children: t('split.words.description') })] }), _jsx("div", { className: "step-body", children: _jsx("div", { className: "sentence-split-word-pick", children: wordTokens.map((tok, idx) => {
15
+ const label = SentenceSplitUtils.getOriginalValue(tok);
16
+ const selected = request.token === tok.p;
17
+ const isLastWord = idx === wordTokens.length - 1;
18
+ return (_jsx("button", { type: "button", disabled: isLastWord, title: isLastWord ? t('split.words.cannotSplitAfterLast') : undefined, className: cx('sentence-split-word-chip', {
19
+ selected,
20
+ disabled: isLastWord,
21
+ }), onClick: () => !isLastWord && handleSelect(tok.p), children: label }, tok.p));
22
+ }) }) })] }));
23
+ }
@@ -0,0 +1,2 @@
1
+ import SentenceSplitChoose from './SentenceSplitChoose';
2
+ export default SentenceSplitChoose;
@@ -0,0 +1,2 @@
1
+ import SentenceSplitChoose from './SentenceSplitChoose';
2
+ export default SentenceSplitChoose;
@@ -0,0 +1,25 @@
1
+ .sentence-split-word-pick {
2
+ display: flex;
3
+ flex-wrap: wrap;
4
+ gap: 8px;
5
+ margin-top: 24px;
6
+
7
+ .sentence-split-word-chip {
8
+ cursor: pointer;
9
+ border-radius: var(--radius-200);
10
+ padding: 0px 8px;
11
+ background-color: var(--background-default);
12
+ border: 1px dashed var(--border-accent-2);
13
+
14
+ &.selected,
15
+ &:hover {
16
+ background-color: var(--button-secondary-hover);
17
+ }
18
+
19
+ &.disabled,
20
+ &:disabled {
21
+ opacity: 0.45;
22
+ cursor: not-allowed;
23
+ }
24
+ }
25
+ }
@@ -0,0 +1,21 @@
1
+ import { Struct } from '../../configs/types/Struct';
2
+ import type { Comment } from '../Comments/types/Comment';
3
+ import type { SplitComment } from './types/SentenceSplitRequest';
4
+ declare const SentenceSplitCommentUtils: {
5
+ collectTokenCidsByHalf: (struct: Struct, splitAfterToken: number) => {
6
+ first: Set<string>;
7
+ second: Set<string>;
8
+ };
9
+ buildCidToWordMap: (struct: Struct) => Record<string, string>;
10
+ commentsWithoutCid: (comments: Comment[]) => SplitComment[];
11
+ commentsWithCidForHalf: (all: Comment[], half: "first" | "second", cids: {
12
+ first: Set<string>;
13
+ second: Set<string>;
14
+ }) => Comment[];
15
+ commentsWithCidForHalfAsSplit: (all: Comment[], half: "first" | "second", cids: {
16
+ first: Set<string>;
17
+ second: Set<string>;
18
+ }) => SplitComment[];
19
+ initialCommentDispositions: (sentenceComments: Comment[], wordsFirst: SplitComment[], wordsSecond: SplitComment[]) => Record<string, string>;
20
+ };
21
+ export default SentenceSplitCommentUtils;
@@ -0,0 +1,77 @@
1
+ import SentenceUtils from '../../functions/SentenceUtils';
2
+ import SentenceSplitUtils from './SentenceSplitUtils';
3
+ const collectTokenCidsByHalf = (struct, splitAfterToken) => {
4
+ const sorted = SentenceUtils.sort(struct);
5
+ const visible = sorted.filter((tok) => SentenceUtils.isVisible(tok) && !SentenceSplitUtils.skipToken(tok));
6
+ const first = new Set();
7
+ const second = new Set();
8
+ for (const tok of visible) {
9
+ if (!tok.cid)
10
+ continue;
11
+ if (tok.p <= splitAfterToken)
12
+ first.add(tok.cid);
13
+ else
14
+ second.add(tok.cid);
15
+ }
16
+ return { first, second };
17
+ };
18
+ const buildCidToWordMap = (struct) => {
19
+ const sorted = SentenceUtils.sort(struct);
20
+ const visible = sorted.filter((tok) => SentenceUtils.isVisible(tok) && !SentenceSplitUtils.skipToken(tok));
21
+ const map = {};
22
+ for (const tok of visible) {
23
+ if (tok.cid)
24
+ map[tok.cid] = tok.v;
25
+ }
26
+ return map;
27
+ };
28
+ const commentsWithoutCid = (comments) => {
29
+ return comments
30
+ .filter((root) => !root.cid)
31
+ .map((c) => ({ ...c, action: 'first' }));
32
+ };
33
+ const commentsWithCidForHalf = (all, half, cids) => {
34
+ const roots = all.filter((c) => !c.reply);
35
+ const rootsInHalf = roots.filter((root) => {
36
+ if (!root.cid)
37
+ return false;
38
+ if (cids.first.has(root.cid))
39
+ return half === 'first';
40
+ if (cids.second.has(root.cid))
41
+ return half === 'second';
42
+ return half === 'first';
43
+ });
44
+ const rootIds = new Set(rootsInHalf.map((r) => r.id));
45
+ return all.filter((c) => {
46
+ if (!c.reply)
47
+ return rootIds.has(c.id);
48
+ return rootIds.has(c.reply);
49
+ });
50
+ };
51
+ const commentsWithCidForHalfAsSplit = (all, half, cids) => {
52
+ const action = half === 'first' ? 'first' : 'second';
53
+ return commentsWithCidForHalf(all, half, cids).map((c) => ({ ...c, action }));
54
+ };
55
+ const initialCommentDispositions = (sentenceComments, wordsFirst, wordsSecond) => {
56
+ const out = {};
57
+ for (const root of sentenceComments.filter((c) => !c.reply)) {
58
+ if (!root.cid)
59
+ out[root.id] = 'first';
60
+ }
61
+ for (const root of wordsFirst.filter((c) => !c.reply)) {
62
+ out[root.id] = 'first';
63
+ }
64
+ for (const root of wordsSecond.filter((c) => !c.reply)) {
65
+ out[root.id] = 'second';
66
+ }
67
+ return out;
68
+ };
69
+ const SentenceSplitCommentUtils = {
70
+ collectTokenCidsByHalf,
71
+ buildCidToWordMap,
72
+ commentsWithoutCid,
73
+ commentsWithCidForHalf,
74
+ commentsWithCidForHalfAsSplit,
75
+ initialCommentDispositions,
76
+ };
77
+ export default SentenceSplitCommentUtils;
@@ -0,0 +1,7 @@
1
+ import type { Comment } from '../../Comments/types/Comment';
2
+ import './style.scss';
3
+ type Props = {
4
+ comment: Comment;
5
+ };
6
+ export default function SentenceSplitCommentBlock({ comment }: Props): import("react/jsx-runtime").JSX.Element;
7
+ export {};
@@ -0,0 +1,6 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import DateUtils from '../../../functions/DateUtils';
3
+ import './style.scss';
4
+ export default function SentenceSplitCommentBlock({ comment }) {
5
+ return (_jsxs("div", { className: "comment-block", children: [_jsxs("div", { className: "comment-top", children: [_jsx("div", { className: "comment-date", children: DateUtils.formatDateTime(comment.edited ? comment.edited : comment.date, 'MM/dd/yyyy - HH:mm') }), _jsx("span", { className: "comment-name", children: comment.name })] }), _jsxs("div", { className: "comment-content", children: [comment.title && (_jsxs("div", { className: "comment-title", children: [comment.title, " - "] })), _jsx("div", { className: "comment-text", children: comment.value })] })] }));
6
+ }
@@ -0,0 +1,8 @@
1
+ import { type SentenceSplitCommentAction, type SplitComment } from '../types/SentenceSplitRequest';
2
+ import './style.scss';
3
+ type Props = {
4
+ comments: SplitComment[];
5
+ onChange: (root: SplitComment, action: SentenceSplitCommentAction) => void;
6
+ };
7
+ export default function SentenceSplitComments({ comments, onChange }: Props): import("react/jsx-runtime").JSX.Element;
8
+ export {};
@@ -0,0 +1,37 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { MenuItem, Select } from '@mui/material';
3
+ import { ThemeProvider, useTheme } from '@mui/material/styles';
4
+ import { useTranslation } from 'react-i18next';
5
+ import { selectFieldTheme } from 'tycho-storybook';
6
+ import { isSentenceSplitCommentAction, SENTENCE_SPLIT_COMMENT_ACTIONS, } from '../types/SentenceSplitRequest';
7
+ import SentenceSplitCommentBlock from './SentenceSplitCommentBlock';
8
+ import './style.scss';
9
+ function CommentDispositionSelect({ options, value, onChange, }) {
10
+ const outerTheme = useTheme();
11
+ return (_jsx("div", { className: "ds-select-text", children: _jsx(ThemeProvider, { theme: selectFieldTheme(outerTheme), children: _jsx(Select, { variant: "filled", color: "primary", displayEmpty: false, value: value, size: "small", onChange: (e) => {
12
+ const val = String(e.target.value);
13
+ if (isSentenceSplitCommentAction(val)) {
14
+ onChange(val);
15
+ }
16
+ }, MenuProps: {
17
+ PaperProps: {
18
+ style: { maxHeight: 400 },
19
+ },
20
+ }, children: options.map((opt) => (_jsx(MenuItem, { value: opt.value, children: opt.label }, opt.value))) }) }) }));
21
+ }
22
+ export default function SentenceSplitComments({ comments, onChange }) {
23
+ const { t } = useTranslation('sentenceSplit');
24
+ const roots = comments.filter((c) => !c.reply);
25
+ const dispositionLabelKeys = {
26
+ first: 'split.comments.disposition.first',
27
+ second: 'split.comments.disposition.moveSecond',
28
+ duplicate: 'split.comments.disposition.duplicateSecond',
29
+ };
30
+ const dispositionOptions = SENTENCE_SPLIT_COMMENT_ACTIONS.map((value) => ({
31
+ label: t(dispositionLabelKeys[value]),
32
+ value,
33
+ }));
34
+ return (_jsx("div", { className: "comments-list", children: roots.map((root) => (_jsxs("div", { className: "comment-thread", children: [_jsxs("div", { className: "comment-wrapper", children: [_jsx(SentenceSplitCommentBlock, { comment: root }), comments
35
+ .filter((c) => c.reply === root.id)
36
+ .map((reply) => (_jsx("div", { className: "comment-replies", children: _jsx(SentenceSplitCommentBlock, { comment: reply }) }, reply.id)))] }), _jsx(CommentDispositionSelect, { options: dispositionOptions, value: root.action, onChange: (action) => onChange(root, action) })] }, root.id))) }));
37
+ }
@@ -0,0 +1,11 @@
1
+ import { Struct } from '../../../configs/types/Struct';
2
+ import type { SentenceSplitRequest } from '../types/SentenceSplitRequest';
3
+ import './style.scss';
4
+ type Props = {
5
+ struct: Struct;
6
+ documentUid: string;
7
+ request: SentenceSplitRequest;
8
+ onChange: (request: SentenceSplitRequest) => void;
9
+ };
10
+ export default function SentenceSplitCommentsStep({ struct, documentUid, request, onChange, }: Props): import("react/jsx-runtime").JSX.Element;
11
+ export {};
@@ -0,0 +1,72 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useEffect, useState } from 'react';
3
+ import { useTranslation } from 'react-i18next';
4
+ import AppLoading from '../../../common/AppLoading/AppLoading';
5
+ import AppPlaceholder from '../../../common/AppPlaceholder/AppPlaceholder';
6
+ import { useCorpusUtils } from '../../../configs/useCorpusUtils';
7
+ import { useMessageUtils } from '../../../configs/useMessageUtils';
8
+ import SentenceSplitCommentUtils from '../SentenceSplitCommentUtils';
9
+ import SentenceSplitService from '../SentenceSplitService';
10
+ import SentenceSplitComments from './SentenceSplitComments';
11
+ import SentenceSplitCommentsWords from './SentenceSplitCommentsWords';
12
+ import './style.scss';
13
+ export default function SentenceSplitCommentsStep({ struct, documentUid, request, onChange, }) {
14
+ const { t } = useTranslation('sentenceSplit');
15
+ const { getCorpus } = useCorpusUtils();
16
+ const { dispatchError } = useMessageUtils();
17
+ const { collectTokenCidsByHalf, buildCidToWordMap, commentsWithoutCid, initialCommentDispositions, commentsWithCidForHalfAsSplit, } = SentenceSplitCommentUtils;
18
+ const [comments, setComments] = useState(null);
19
+ const [commentsSentence, setCommentsSentence] = useState([]);
20
+ const [commentsWordsFirst, setCommentsWordsFirst] = useState([]);
21
+ const [commentsWordsSecond, setCommentsWordsSecond] = useState([]);
22
+ const cidsByHalf = collectTokenCidsByHalf(struct, request.token);
23
+ const wordByCid = buildCidToWordMap(struct);
24
+ const handleChangeSentence = (root, action) => {
25
+ setCommentsSentence(commentsSentence.map((c) => (c.id === root.id ? { ...c, action } : c)));
26
+ onChange({
27
+ ...request,
28
+ comments: {
29
+ ...request.comments,
30
+ [root.id]: action,
31
+ },
32
+ });
33
+ };
34
+ useEffect(() => {
35
+ let cancelled = false;
36
+ const references = {
37
+ sentence: struct.uid,
38
+ document: documentUid,
39
+ page: struct.page,
40
+ };
41
+ SentenceSplitService.findComments(getCorpus().uid, references)
42
+ .then((r) => {
43
+ if (cancelled)
44
+ return;
45
+ setComments(r.data);
46
+ const theseCommentsSentence = commentsWithoutCid(r.data);
47
+ const theseCommentsWordsFirst = commentsWithCidForHalfAsSplit(r.data, 'first', cidsByHalf);
48
+ const theseCommentsWordsSecond = commentsWithCidForHalfAsSplit(r.data, 'second', cidsByHalf);
49
+ const initialComments = initialCommentDispositions(theseCommentsSentence, theseCommentsWordsFirst, theseCommentsWordsSecond);
50
+ onChange({
51
+ ...request,
52
+ comments: { ...initialComments },
53
+ });
54
+ setCommentsSentence(theseCommentsSentence);
55
+ setCommentsWordsFirst(theseCommentsWordsFirst);
56
+ setCommentsWordsSecond(theseCommentsWordsSecond);
57
+ })
58
+ .catch((err) => {
59
+ if (cancelled)
60
+ return;
61
+ dispatchError({ err, t });
62
+ });
63
+ return () => {
64
+ cancelled = true;
65
+ };
66
+ }, [struct.uid, documentUid, struct.page]);
67
+ if (comments === null) {
68
+ return _jsx(AppLoading, {});
69
+ }
70
+ const hasWordComments = comments.find((c) => c.cid) !== undefined;
71
+ return (_jsxs("div", { className: "step-content sentence-split-comments-container", children: [_jsxs("div", { className: "header", children: [_jsx("div", { className: "title", children: t('split.comments.title') }), _jsx("div", { className: "subtitle", children: t('split.comments.description') })] }), _jsxs("div", { className: "step-body", children: [comments.length === 0 && (_jsx(AppPlaceholder, { text: t('split.comments.empty'), useMarginTop: true })), commentsSentence != null && commentsSentence.length > 0 && (_jsxs("section", { className: "comments-section", children: [_jsx("h6", { className: "section-title", children: t('split.comments.sentenceLevel') }), _jsx("div", { className: "section-body", children: _jsx(SentenceSplitComments, { comments: commentsSentence, onChange: handleChangeSentence }) })] })), hasWordComments && (_jsxs("section", { className: "comments-section", children: [_jsx("h6", { className: "sentence-split-comments-section-title", children: t('split.comments.wordLevel') }), _jsxs("div", { className: "sentence-split-pair", children: [_jsxs("div", { children: [_jsx("h6", { children: t('split.label.first') }), _jsx("div", { className: "sentence-split-box", children: _jsx(SentenceSplitCommentsWords, { comments: commentsWordsFirst, emptyText: t('split.comments.empty'), wordByCid: wordByCid }) })] }), _jsxs("div", { children: [_jsx("h6", { children: t('split.label.second') }), _jsx("div", { className: "sentence-split-box", children: _jsx(SentenceSplitCommentsWords, { comments: commentsWordsSecond, emptyText: t('split.comments.empty'), wordByCid: wordByCid }) })] })] })] }))] })] }));
72
+ }
@@ -0,0 +1,9 @@
1
+ import type { SplitComment } from '../types/SentenceSplitRequest';
2
+ import './style.scss';
3
+ type Props = {
4
+ comments: SplitComment[];
5
+ emptyText: string;
6
+ wordByCid: Record<string, string>;
7
+ };
8
+ export default function SentenceSplitCommentsWords({ comments, emptyText, wordByCid, }: Props): import("react/jsx-runtime").JSX.Element;
9
+ export {};
@@ -0,0 +1,15 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useTranslation } from 'react-i18next';
3
+ import AppPlaceholder from '../../../common/AppPlaceholder/AppPlaceholder';
4
+ import SentenceSplitCommentBlock from './SentenceSplitCommentBlock';
5
+ import './style.scss';
6
+ export default function SentenceSplitCommentsWords({ comments, emptyText, wordByCid, }) {
7
+ const { t } = useTranslation('sentenceSplit');
8
+ if (comments.length === 0) {
9
+ return _jsx(AppPlaceholder, { text: emptyText });
10
+ }
11
+ const roots = comments.filter((c) => !c.reply);
12
+ return (_jsx("div", { className: "comments-list", children: roots.map((root) => (_jsx("div", { className: "comment-thread", children: _jsxs("div", { className: "comment-wrapper", children: [root.cid && (_jsxs("div", { className: "comment-target-word", title: root.cid, children: [t('label.word'), wordByCid[root.cid] ?? t('split.comments.wordMissing')] })), _jsx(SentenceSplitCommentBlock, { comment: root }), comments
13
+ .filter((c) => c.reply === root.id)
14
+ .map((reply) => (_jsx("div", { className: "comment-replies", children: _jsx(SentenceSplitCommentBlock, { comment: reply }) }, reply.id)))] }) }, root.id))) }));
15
+ }
@@ -0,0 +1,2 @@
1
+ import SentenceSplitCommentsStep from './SentenceSplitCommentsStep';
2
+ export default SentenceSplitCommentsStep;
@@ -0,0 +1,2 @@
1
+ import SentenceSplitCommentsStep from './SentenceSplitCommentsStep';
2
+ export default SentenceSplitCommentsStep;
@@ -0,0 +1,126 @@
1
+ .sentence-split-comments-container {
2
+ .comments-section {
3
+ margin-top: 24px;
4
+ border-top: 1px solid var(--border-subtle-1);
5
+ padding-top: 16px;
6
+ max-height: 30vh;
7
+ overflow-y: auto;
8
+
9
+ &:first-of-type {
10
+ margin-top: 16px;
11
+ }
12
+
13
+ .section-title {
14
+ @include body-medium-2;
15
+ color: var(--text-primary);
16
+ margin: 0 0 8px;
17
+ }
18
+ }
19
+
20
+ > .ds-placeholder {
21
+ margin-top: 16px;
22
+ }
23
+
24
+ .sentence-split-box {
25
+ > .ds-placeholder {
26
+ .ds-icon {
27
+ font-size: 32px;
28
+ }
29
+
30
+ .title {
31
+ @include body-medium-2;
32
+ color: var(--text-primary);
33
+ }
34
+ }
35
+ }
36
+
37
+ .comments-list {
38
+ display: flex;
39
+ flex-direction: column;
40
+ gap: 0;
41
+
42
+ .comment-thread {
43
+ display: flex;
44
+ flex-direction: row;
45
+ border-bottom: 1px solid var(--border-subtle-1, #e8e8e8);
46
+ padding: 8px 0;
47
+
48
+ &:first-child {
49
+ padding-top: 0;
50
+ }
51
+
52
+ &:last-child {
53
+ border-bottom: none;
54
+ padding-bottom: 0;
55
+ }
56
+
57
+ .ds-select-text {
58
+ margin-left: auto;
59
+ width: fit-content;
60
+
61
+ .MuiSelect-select {
62
+ padding: 4px 24px 4px 8px !important;
63
+ @include body-small-1;
64
+ }
65
+
66
+ .MuiSelect-icon {
67
+ font-size: 20px;
68
+ right: 0px;
69
+ }
70
+ }
71
+
72
+ .comment-target-word {
73
+ @include tag-medium-1;
74
+ color: var(--text-accent);
75
+ margin-bottom: 6px;
76
+ display: inline-block;
77
+ max-width: 100%;
78
+ word-break: break-word;
79
+ }
80
+
81
+ .comment-replies {
82
+ margin-left: 16px;
83
+ margin-top: 4px;
84
+ }
85
+
86
+ .comment-block {
87
+ display: flex;
88
+ flex-direction: column;
89
+ gap: 0px;
90
+
91
+ .comment-top {
92
+ display: flex;
93
+ align-items: center;
94
+ gap: 8px;
95
+
96
+ .comment-name {
97
+ @include body-small-2;
98
+ color: var(--text-primary);
99
+ }
100
+
101
+ .comment-date {
102
+ @include helper-small-1;
103
+ color: var(--text-tertiary);
104
+ }
105
+ }
106
+
107
+ .comment-content {
108
+ display: flex;
109
+ align-items: center;
110
+ gap: 4px;
111
+
112
+ .comment-title {
113
+ @include body-small-1;
114
+ color: var(--text-accent);
115
+ }
116
+
117
+ .comment-text {
118
+ @include body-small-1;
119
+ color: var(--text-primary);
120
+ white-space: pre-wrap;
121
+ }
122
+ }
123
+ }
124
+ }
125
+ }
126
+ }
@@ -0,0 +1,10 @@
1
+ import { Parameter } from '../../../configs/types/Parameter';
2
+ import { Token } from '../../../configs/types/Struct';
3
+ import './style.scss';
4
+ type Props = {
5
+ title: string;
6
+ tokens: Token[];
7
+ wordTiers: Parameter[];
8
+ };
9
+ export default function SentenceSplitPreview({ title, tokens, wordTiers, }: Props): import("react/jsx-runtime").JSX.Element;
10
+ export {};
@@ -0,0 +1,10 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useTranslation } from 'react-i18next';
3
+ import SentenceUtils from '../../../functions/SentenceUtils';
4
+ import SentenceSplitUtils from '../SentenceSplitUtils';
5
+ import './style.scss';
6
+ export default function SentenceSplitPreview({ title, tokens, wordTiers, }) {
7
+ const { t } = useTranslation(['sentenceSplit', 'sentence']);
8
+ return (_jsxs("div", { className: "sentence-split-preview-block", children: [_jsx("h6", { children: title }), _jsx("table", { className: "table table-striped sentence-split-preview-table", children: _jsxs("tbody", { children: [_jsxs("tr", { children: [_jsx("td", { children: t('sentence:label.word') }), tokens.map((tok) => (_jsx("td", { children: SentenceSplitUtils.getOriginalValue(tok) }, tok.p)))] }), _jsxs("tr", { children: [_jsx("td", { children: t('sentence:label.pos.tag') }), tokens.map((tok) => (_jsx("td", { children: SentenceUtils.getTag(tok) || t('sentence:label.empty') }, tok.p)))] }), wordTiers?.map((tier) => (_jsxs("tr", { children: [_jsx("td", { children: tier.name }), tokens.map((tok) => (_jsx("td", { children: (tok.attributes && tok.attributes[tier.symbol]) ||
9
+ t('sentence:label.empty') }, tok.p)))] }, tier.symbol)))] }) })] }));
10
+ }
@@ -0,0 +1,11 @@
1
+ import { Parameter } from '../../../configs/types/Parameter';
2
+ import { Struct } from '../../../configs/types/Struct';
3
+ import { SentenceSplitRequest } from '../types/SentenceSplitRequest';
4
+ import './style.scss';
5
+ type Props = {
6
+ struct: Struct;
7
+ request: SentenceSplitRequest;
8
+ wordTiers: Parameter[];
9
+ };
10
+ export default function SentenceSplitPreviewStep({ struct, request, wordTiers, }: Props): import("react/jsx-runtime").JSX.Element;
11
+ export {};
@@ -0,0 +1,24 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useTranslation } from 'react-i18next';
3
+ import SentenceUtils from '../../../functions/SentenceUtils';
4
+ import SentenceSplitUtils from '../SentenceSplitUtils';
5
+ import SentenceSplitPreview from './SentenceSplitPreview';
6
+ import './style.scss';
7
+ function partitionVisibleTokens(struct, splitAfterToken) {
8
+ const sorted = SentenceUtils.sort(struct);
9
+ const visible = sorted.filter((tok) => SentenceUtils.isVisible(tok) && !SentenceSplitUtils.skipToken(tok));
10
+ const first = [];
11
+ const second = [];
12
+ visible.forEach((tok) => {
13
+ if (tok.p <= splitAfterToken)
14
+ first.push(tok);
15
+ else
16
+ second.push(tok);
17
+ });
18
+ return [first, second];
19
+ }
20
+ export default function SentenceSplitPreviewStep({ struct, request, wordTiers, }) {
21
+ const { t } = useTranslation('sentenceSplit');
22
+ const [first, second] = partitionVisibleTokens(struct, request.token);
23
+ return (_jsxs("div", { className: "step-content", children: [_jsxs("div", { className: "header", children: [_jsx("div", { className: "title", children: t('split.preview.title') }), _jsx("div", { className: "subtitle", children: t('split.preview.description') })] }), _jsx("div", { className: "step-body", children: _jsxs("div", { className: "sentence-split-preview-container", children: [_jsx(SentenceSplitPreview, { title: t('split.label.first'), tokens: first, wordTiers: wordTiers }), _jsx(SentenceSplitPreview, { title: t('split.label.second'), tokens: second, wordTiers: wordTiers })] }) })] }));
24
+ }
@@ -0,0 +1,2 @@
1
+ import SentenceSplitPreviewStep from './SentenceSplitPreviewStep';
2
+ export default SentenceSplitPreviewStep;
@@ -0,0 +1,2 @@
1
+ import SentenceSplitPreviewStep from './SentenceSplitPreviewStep';
2
+ export default SentenceSplitPreviewStep;