tycho-components 0.21.18 → 0.22.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (154) hide show
  1. package/dist/configs/Localization.js +12 -0
  2. package/dist/features/Comments/HeaderNotifications/HeaderNotifications.js +1 -1
  3. package/dist/features/DocumentDrawer/Actions/Actions.d.ts +12 -0
  4. package/dist/features/DocumentDrawer/Actions/Actions.js +77 -0
  5. package/dist/features/DocumentDrawer/Actions/index.d.ts +2 -0
  6. package/dist/features/DocumentDrawer/Actions/index.js +2 -0
  7. package/dist/features/DocumentDrawer/Actions/style.scss +6 -0
  8. package/dist/features/DocumentDrawer/AutomaticParser/AutomaticParser.d.ts +8 -0
  9. package/dist/features/DocumentDrawer/AutomaticParser/AutomaticParser.js +96 -0
  10. package/dist/features/DocumentDrawer/AutomaticParser/index.d.ts +2 -0
  11. package/dist/features/DocumentDrawer/AutomaticParser/index.js +2 -0
  12. package/dist/features/DocumentDrawer/AutomaticParser/style.scss +10 -0
  13. package/dist/features/DocumentDrawer/DocumentDrawer.d.ts +14 -0
  14. package/dist/features/DocumentDrawer/DocumentDrawer.js +111 -0
  15. package/dist/features/DocumentDrawer/DocumentEdit/DocumentEdit.d.ts +35 -0
  16. package/dist/features/DocumentDrawer/DocumentEdit/DocumentEdit.js +207 -0
  17. package/dist/features/DocumentDrawer/DocumentEdit/index.d.ts +2 -0
  18. package/dist/features/DocumentDrawer/DocumentEdit/index.js +1 -0
  19. package/dist/features/DocumentDrawer/DocumentExport/DocumentExport.d.ts +7 -0
  20. package/dist/features/DocumentDrawer/DocumentExport/DocumentExport.js +71 -0
  21. package/dist/features/DocumentDrawer/DocumentExport/ExportInvalidSentences.d.ts +7 -0
  22. package/dist/features/DocumentDrawer/DocumentExport/ExportInvalidSentences.js +12 -0
  23. package/dist/features/DocumentDrawer/DocumentExport/index.d.ts +2 -0
  24. package/dist/features/DocumentDrawer/DocumentExport/index.js +2 -0
  25. package/dist/features/DocumentDrawer/DocumentExport/style.scss +31 -0
  26. package/dist/features/DocumentDrawer/DocumentLexicon/DocumentLexicon.d.ts +7 -0
  27. package/dist/features/DocumentDrawer/DocumentLexicon/DocumentLexicon.js +22 -0
  28. package/dist/features/DocumentDrawer/DocumentLexicon/index.d.ts +2 -0
  29. package/dist/features/DocumentDrawer/DocumentLexicon/index.js +2 -0
  30. package/dist/features/DocumentDrawer/DocumentLexicon/style.scss +38 -0
  31. package/dist/features/DocumentDrawer/DocumentRemove/DocumentRemove.d.ts +12 -0
  32. package/dist/features/DocumentDrawer/DocumentRemove/DocumentRemove.js +28 -0
  33. package/dist/features/DocumentDrawer/DocumentRemove/index.d.ts +2 -0
  34. package/dist/features/DocumentDrawer/DocumentRemove/index.js +2 -0
  35. package/dist/features/DocumentDrawer/DocumentRemove/style.scss +0 -0
  36. package/dist/features/DocumentDrawer/Github/Github.d.ts +8 -0
  37. package/dist/features/DocumentDrawer/Github/Github.js +11 -0
  38. package/dist/features/DocumentDrawer/Github/GithubCommit.d.ts +8 -0
  39. package/dist/features/DocumentDrawer/Github/GithubCommit.js +86 -0
  40. package/dist/features/DocumentDrawer/Github/index.d.ts +2 -0
  41. package/dist/features/DocumentDrawer/Github/index.js +2 -0
  42. package/dist/features/DocumentDrawer/Github/style.scss +31 -0
  43. package/dist/features/DocumentDrawer/ImageGallery/GalleryImage.d.ts +8 -0
  44. package/dist/features/DocumentDrawer/ImageGallery/GalleryImage.js +5 -0
  45. package/dist/features/DocumentDrawer/ImageGallery/GalleryRemoval.d.ts +9 -0
  46. package/dist/features/DocumentDrawer/ImageGallery/GalleryRemoval.js +14 -0
  47. package/dist/features/DocumentDrawer/ImageGallery/ImageGallery.d.ts +9 -0
  48. package/dist/features/DocumentDrawer/ImageGallery/ImageGallery.js +45 -0
  49. package/dist/features/DocumentDrawer/ImageGallery/index.d.ts +2 -0
  50. package/dist/features/DocumentDrawer/ImageGallery/index.js +2 -0
  51. package/dist/features/DocumentDrawer/ImageGallery/style.scss +41 -0
  52. package/dist/features/DocumentDrawer/Info/Info.d.ts +10 -0
  53. package/dist/features/DocumentDrawer/Info/Info.js +16 -0
  54. package/dist/features/DocumentDrawer/Info/index.d.ts +2 -0
  55. package/dist/features/DocumentDrawer/Info/index.js +2 -0
  56. package/dist/features/DocumentDrawer/Info/style.scss +24 -0
  57. package/dist/features/DocumentDrawer/Metadata/DocumentMetadata/DocumentMetadata.d.ts +8 -0
  58. package/dist/features/DocumentDrawer/Metadata/DocumentMetadata/DocumentMetadata.js +60 -0
  59. package/dist/features/DocumentDrawer/Metadata/DocumentMetadata/index.d.ts +2 -0
  60. package/dist/features/DocumentDrawer/Metadata/DocumentMetadata/index.js +2 -0
  61. package/dist/features/DocumentDrawer/Metadata/DocumentMetadata/style.scss +7 -0
  62. package/dist/features/DocumentDrawer/Metadata/DocumentMetadataEdit/DocumentMetadataEdit.d.ts +11 -0
  63. package/dist/features/DocumentDrawer/Metadata/DocumentMetadataEdit/DocumentMetadataEdit.js +195 -0
  64. package/dist/features/DocumentDrawer/Metadata/DocumentMetadataEdit/index.d.ts +2 -0
  65. package/dist/features/DocumentDrawer/Metadata/DocumentMetadataEdit/index.js +2 -0
  66. package/dist/features/DocumentDrawer/Metadata/DocumentMetadataEdit/style.scss +58 -0
  67. package/dist/features/DocumentDrawer/PageStatusComponent/PageStatusComponent.d.ts +9 -0
  68. package/dist/features/DocumentDrawer/PageStatusComponent/PageStatusComponent.js +30 -0
  69. package/dist/features/DocumentDrawer/PageStatusComponent/index.d.ts +2 -0
  70. package/dist/features/DocumentDrawer/PageStatusComponent/index.js +2 -0
  71. package/dist/features/DocumentDrawer/PageStatusComponent/style.scss +19 -0
  72. package/dist/features/DocumentDrawer/Pages/BoxRemoval.d.ts +9 -0
  73. package/dist/features/DocumentDrawer/Pages/BoxRemoval.js +14 -0
  74. package/dist/features/DocumentDrawer/Pages/Boxes.d.ts +9 -0
  75. package/dist/features/DocumentDrawer/Pages/Boxes.js +63 -0
  76. package/dist/features/DocumentDrawer/Pages/PageRemoval.d.ts +9 -0
  77. package/dist/features/DocumentDrawer/Pages/PageRemoval.js +15 -0
  78. package/dist/features/DocumentDrawer/Pages/Pages.d.ts +10 -0
  79. package/dist/features/DocumentDrawer/Pages/Pages.js +72 -0
  80. package/dist/features/DocumentDrawer/Pages/style.scss +48 -0
  81. package/dist/features/DocumentDrawer/deps.d.ts +28 -0
  82. package/dist/features/DocumentDrawer/deps.js +20 -0
  83. package/dist/features/DocumentDrawer/functions/FileUtils.d.ts +4 -0
  84. package/dist/features/DocumentDrawer/functions/FileUtils.js +8 -0
  85. package/dist/features/DocumentDrawer/functions/MetadataUtils.d.ts +41 -0
  86. package/dist/features/DocumentDrawer/functions/MetadataUtils.js +192 -0
  87. package/dist/features/DocumentDrawer/index.d.ts +5 -0
  88. package/dist/features/DocumentDrawer/index.js +3 -0
  89. package/dist/features/DocumentDrawer/localization/ActionsTexts.d.ts +77 -0
  90. package/dist/features/DocumentDrawer/localization/ActionsTexts.js +77 -0
  91. package/dist/features/DocumentDrawer/localization/DocumentTexts.d.ts +140 -0
  92. package/dist/features/DocumentDrawer/localization/DocumentTexts.js +140 -0
  93. package/dist/features/DocumentDrawer/localization/ExportTexts.d.ts +59 -0
  94. package/dist/features/DocumentDrawer/localization/ExportTexts.js +59 -0
  95. package/dist/features/DocumentDrawer/localization/GithubTexts.d.ts +35 -0
  96. package/dist/features/DocumentDrawer/localization/GithubTexts.js +35 -0
  97. package/dist/features/DocumentDrawer/localization/PageTexts.d.ts +45 -0
  98. package/dist/features/DocumentDrawer/localization/PageTexts.js +45 -0
  99. package/dist/features/DocumentDrawer/localization/ParserTexts.d.ts +30 -0
  100. package/dist/features/DocumentDrawer/localization/ParserTexts.js +30 -0
  101. package/dist/features/DocumentDrawer/services/AutomaticParserService.d.ts +8 -0
  102. package/dist/features/DocumentDrawer/services/AutomaticParserService.js +9 -0
  103. package/dist/features/DocumentDrawer/services/BoundingBoxService.d.ts +11 -0
  104. package/dist/features/DocumentDrawer/services/BoundingBoxService.js +20 -0
  105. package/dist/features/DocumentDrawer/services/DocumentService.d.ts +13 -0
  106. package/dist/features/DocumentDrawer/services/DocumentService.js +20 -0
  107. package/dist/features/DocumentDrawer/services/ExportService.d.ts +11 -0
  108. package/dist/features/DocumentDrawer/services/ExportService.js +16 -0
  109. package/dist/features/DocumentDrawer/services/GithubService.d.ts +8 -0
  110. package/dist/features/DocumentDrawer/services/GithubService.js +12 -0
  111. package/dist/features/DocumentDrawer/services/ImageService.d.ts +8 -0
  112. package/dist/features/DocumentDrawer/services/ImageService.js +12 -0
  113. package/dist/features/DocumentDrawer/services/LexiconService.d.ts +10 -0
  114. package/dist/features/DocumentDrawer/services/LexiconService.js +9 -0
  115. package/dist/features/DocumentDrawer/services/MetadataService.d.ts +15 -0
  116. package/dist/features/DocumentDrawer/services/MetadataService.js +26 -0
  117. package/dist/features/DocumentDrawer/services/PageService.d.ts +11 -0
  118. package/dist/features/DocumentDrawer/services/PageService.js +16 -0
  119. package/dist/features/DocumentDrawer/services/SentenceService.d.ts +6 -0
  120. package/dist/features/DocumentDrawer/services/SentenceService.js +6 -0
  121. package/dist/features/DocumentDrawer/style.scss +171 -0
  122. package/dist/features/DocumentDrawer/types/BoundingBox.d.ts +8 -0
  123. package/dist/features/DocumentDrawer/types/BoundingBox.js +1 -0
  124. package/dist/features/DocumentDrawer/types/CatalogSearchFilter.d.ts +15 -0
  125. package/dist/features/DocumentDrawer/types/CatalogSearchFilter.js +16 -0
  126. package/dist/features/DocumentDrawer/types/Category.d.ts +16 -0
  127. package/dist/features/DocumentDrawer/types/Category.js +5 -0
  128. package/dist/features/DocumentDrawer/types/DocumentStatus.d.ts +7 -0
  129. package/dist/features/DocumentDrawer/types/DocumentStatus.js +6 -0
  130. package/dist/features/DocumentDrawer/types/DocumentUpdateRequest.d.ts +13 -0
  131. package/dist/features/DocumentDrawer/types/DocumentUpdateRequest.js +1 -0
  132. package/dist/features/DocumentDrawer/types/Export.d.ts +25 -0
  133. package/dist/features/DocumentDrawer/types/Export.js +36 -0
  134. package/dist/features/DocumentDrawer/types/Lexicon.d.ts +6 -0
  135. package/dist/features/DocumentDrawer/types/Lexicon.js +1 -0
  136. package/dist/features/DocumentDrawer/types/LexiconResponse.d.ts +6 -0
  137. package/dist/features/DocumentDrawer/types/LexiconResponse.js +1 -0
  138. package/dist/features/DocumentDrawer/types/Metadata.d.ts +22 -0
  139. package/dist/features/DocumentDrawer/types/Metadata.js +8 -0
  140. package/dist/features/DocumentDrawer/types/Page.d.ts +10 -0
  141. package/dist/features/DocumentDrawer/types/Page.js +1 -0
  142. package/dist/features/DocumentDrawer/types/PageStatus.d.ts +9 -0
  143. package/dist/features/DocumentDrawer/types/PageStatus.js +8 -0
  144. package/dist/features/DocumentDrawer/types/Parser.d.ts +18 -0
  145. package/dist/features/DocumentDrawer/types/Parser.js +21 -0
  146. package/dist/features/DocumentDrawer/types/Query.d.ts +6 -0
  147. package/dist/features/DocumentDrawer/types/Query.js +1 -0
  148. package/dist/features/DocumentDrawer/types/Sentence.d.ts +4 -0
  149. package/dist/features/DocumentDrawer/types/Sentence.js +1 -0
  150. package/dist/features/index.d.ts +4 -0
  151. package/dist/features/index.js +2 -0
  152. package/dist/shell/Header/HeaderApps/HeaderApps.js +2 -1
  153. package/dist/shell/Header/HelpButton/HelpModal.js +2 -1
  154. package/package.json +1 -1
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,9 @@
1
+ export type PageStatus = 'TRANSCRIPTION' | 'EDITION' | 'REVIEW' | 'COMPLETED';
2
+ export declare const PageStatusNames: {
3
+ TRANSCRIPTION: string;
4
+ EDITION: string;
5
+ REVIEW: string;
6
+ COMPLETED: string;
7
+ PROCESSING: string;
8
+ ERROR: string;
9
+ };
@@ -0,0 +1,8 @@
1
+ export const PageStatusNames = {
2
+ TRANSCRIPTION: 'page.status.transcription',
3
+ EDITION: 'page.status.edition',
4
+ REVIEW: 'page.status.review',
5
+ COMPLETED: 'page.status.completed',
6
+ PROCESSING: 'page.status.processing',
7
+ ERROR: 'page.status.error',
8
+ };
@@ -0,0 +1,18 @@
1
+ export declare const STANFORD_MODELS: Parser[];
2
+ type Parser = {
3
+ id: string;
4
+ name: string;
5
+ };
6
+ export type ParserAutoRequest = {
7
+ reprocess: boolean;
8
+ resetTags: boolean;
9
+ };
10
+ export type ParserAutoResponse = {
11
+ total: number;
12
+ parsed: number;
13
+ executed?: number;
14
+ errors?: number;
15
+ completed: boolean;
16
+ };
17
+ export declare const EMPTY_PARSER_REQUEST: ParserAutoRequest;
18
+ export default Parser;
@@ -0,0 +1,21 @@
1
+ export const STANFORD_MODELS = [
2
+ { name: 'Arabic - Stanford', id: 'arabicFactored' },
3
+ { name: 'Chinese (Factored) - Stanford', id: 'chineseFactored' },
4
+ { name: 'Chinese (PCFG) - Stanford', id: 'chinesePCFG' },
5
+ {
6
+ name: 'English - Stanford',
7
+ id: 'englishPCFG.caseless',
8
+ },
9
+ { name: 'German - Stanford', id: 'germanPCFG' },
10
+ { name: 'Spanish - Stanford', id: 'spanishPCFG' },
11
+ { name: 'Xinhua (Factored) - Stanford', id: 'xinhuaFactored' },
12
+ {
13
+ name: 'Xinhua (Factored Segmenting) - Stanford',
14
+ id: 'xinhuaFactoredSegmenting',
15
+ },
16
+ { name: 'Xinhua (PCFG) - Stanford', id: 'xinhuaPCFG' },
17
+ ];
18
+ export const EMPTY_PARSER_REQUEST = {
19
+ reprocess: false,
20
+ resetTags: false,
21
+ };
@@ -0,0 +1,6 @@
1
+ import { MetadataType } from './Metadata';
2
+ export type MetadataQueryRequest = {
3
+ uid: string;
4
+ values: string[];
5
+ type: MetadataType;
6
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,4 @@
1
+ type Sentence = {
2
+ uid: string;
3
+ };
4
+ export default Sentence;
@@ -0,0 +1 @@
1
+ export {};
@@ -22,3 +22,7 @@ export { emptySentenceSplitRequest, isSentenceSplitCommentAction, SENTENCE_SPLIT
22
22
  export type { default as SentenceSplitLanguage } from './SentenceSplit/types/Language';
23
23
  export type { SentenceSplitTranslationsInput, SentenceSplitIconButtonProps, } from './SentenceSplit/SentenceSplit';
24
24
  export { SentenceSplitTexts } from './SentenceSplit/localization/SentenceSplitTexts';
25
+ export { default as DocumentDrawer } from './DocumentDrawer';
26
+ export type { DocumentDrawerProps } from './DocumentDrawer';
27
+ export type { default as CatalogSearchFilter } from './DocumentDrawer/types/CatalogSearchFilter';
28
+ export { emptyCatalogSearchFilter, hasActiveCatalogFilter, } from './DocumentDrawer/types/CatalogSearchFilter';
@@ -15,3 +15,5 @@ export { default as SentenceSplit } from './SentenceSplit';
15
15
  export { default as SentenceSplitService } from './SentenceSplit/SentenceSplitService';
16
16
  export { emptySentenceSplitRequest, isSentenceSplitCommentAction, SENTENCE_SPLIT_COMMENT_ACTIONS, } from './SentenceSplit/types/SentenceSplitRequest';
17
17
  export { SentenceSplitTexts } from './SentenceSplit/localization/SentenceSplitTexts';
18
+ export { default as DocumentDrawer } from './DocumentDrawer';
19
+ export { emptyCatalogSearchFilter, hasActiveCatalogFilter, } from './DocumentDrawer/types/CatalogSearchFilter';
@@ -40,12 +40,13 @@ export default function HeaderApps({ navigateLogout, navigateNotLogged, hideKeyb
40
40
  };
41
41
  return (_jsxs("div", { className: "header-apps-container", children: [_jsx(IconButton, { name: "apps", className: "icon-apps", size: "large", onClick: () => setOpen(!open), filledIcon: true }), open && (_jsxs(Drawer, { anchor: "left", open: true, onClose: () => setOpen(false), className: "offcanvas-apps", children: [_jsxs("div", { className: "header", children: [_jsx(IconButton, { name: "close", size: "medium", mode: "ghost", iconSize: "medium", onClick: () => setOpen(false) }), _jsx("span", { className: "header-apps-title", children: t("header:label.platform.complete") }), _jsx("div", { className: "header-profile-apps", children: _jsx(HeaderUser, { navigateLogout: navigateLogout, navigateNotLogged: navigateNotLogged }) })] }), _jsxs("div", { className: "body", children: [_jsx("div", { className: "title", children: t("label.tools") }), AvailableApps.map((item, idx) => renderItem(item, idx)), _jsx("div", { className: "title", children: t("label.quick") }), resources.map((item, idx) => renderItem(item, idx))] }), _jsx("div", { className: "footer", children: _jsx("div", { className: "header-apps-buttons", children: _jsx(HeaderButtons, { hideKeyboard: hideKeyboard, notifications: notifications, keyboardLayout: keyboardLayout, helpActions: helpActions, mobile: true }) }) })] }))] }));
42
42
  }
43
+ const platformOrigin = (import.meta.env.VITE_APP_ORIGIN ?? "").replace(/\/+$/, "");
43
44
  const resources = [
44
45
  {
45
46
  code: "platform",
46
47
  image: logo,
47
48
  visibility: "public",
48
- external: "https://www.tycho.iel.unicamp.br",
49
+ external: platformOrigin || undefined,
49
50
  },
50
51
  {
51
52
  code: "youtube",
@@ -11,7 +11,8 @@ export default function HelpModal({ onClose, helpActions = [] }) {
11
11
  const isTourActive = status();
12
12
  const isAutoOpenEnabled = Storage.getTourAutoOpen();
13
13
  const handleTutorials = () => {
14
- window.open("https://www.tycho.iel.unicamp.br/home/tutorials", "_blank");
14
+ const origin = (import.meta.env.VITE_APP_ORIGIN ?? "").replace(/\/+$/, "");
15
+ window.open(`${origin}/home/tutorials`, "_blank");
15
16
  onClose();
16
17
  };
17
18
  const handleTourToggle = () => {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "tycho-components",
3
3
  "private": false,
4
- "version": "0.21.18",
4
+ "version": "0.22.0",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "exports": {