tycho-components 0.2.3 → 0.2.4-SNAPSHOT

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.
@@ -8,8 +8,9 @@ type Props = {
8
8
  translations?: Record<string, string>;
9
9
  wheelSensitivity?: number;
10
10
  renderWithInfo?: boolean;
11
+ placeholder?: string;
11
12
  onExpand?: () => void;
12
13
  onReadyCustom?: (thisCy: Core) => void;
13
14
  };
14
- export default function TreeView({ struct, expression, selector, translations, wheelSensitivity, renderWithInfo, onExpand, onReadyCustom, }: Props): import("react/jsx-runtime").JSX.Element;
15
+ export default function TreeView({ struct, expression, selector, translations, wheelSensitivity, renderWithInfo, placeholder, onExpand, onReadyCustom, }: Props): import("react/jsx-runtime").JSX.Element;
15
16
  export {};
@@ -10,7 +10,7 @@ import SentenceUtils from '../functions/SentenceUtils';
10
10
  import CytoscapeTreeConverter from './cytoscape/CytoscapeTreeConverter';
11
11
  import SyntreesCytoscape from './cytoscape/SyntreesCytoscape';
12
12
  import './style.scss';
13
- export default function TreeView({ struct, expression, selector = 'canvas-tree', translations, wheelSensitivity, renderWithInfo = false, onExpand, onReadyCustom, }) {
13
+ export default function TreeView({ struct, expression, selector = 'canvas-tree', translations, wheelSensitivity, renderWithInfo = false, placeholder, onExpand, onReadyCustom, }) {
14
14
  const { t } = useTranslation('tree');
15
15
  const [cy, setCy] = useState(null);
16
16
  const [showInfo, setShowInfo] = useState(renderWithInfo);
@@ -85,7 +85,7 @@ export default function TreeView({ struct, expression, selector = 'canvas-tree',
85
85
  load();
86
86
  }, [struct]);
87
87
  if (invalid) {
88
- return _jsx(AppPlaceholder, { text: t('placeholder.sentence.notparsed') });
88
+ return (_jsx(AppPlaceholder, { text: placeholder || t('placeholder.sentence.notparsed') }));
89
89
  }
90
90
  return (_jsxs("div", { className: "tree-view-container", children: [cy &&
91
91
  getButtons(generateImage, reset, downloadPsd, toggleInfo, onExpand, expression)
@@ -16,6 +16,7 @@
16
16
  z-index: 1100;
17
17
  background-color: transparent;
18
18
  border: none;
19
+ cursor: pointer;
19
20
 
20
21
  svg {
21
22
  width: 24px;
@@ -24,7 +24,7 @@ export const HeaderTexts = {
24
24
  'viewer.desc': 'Provides public access for reading and navigating the corpora, focusing on data security and copyright protection.',
25
25
  'search.name': 'Search',
26
26
  'search.desc': 'Allows searches by words, tags, or syntactic structures. Includes filters by document and metadata, export options, and graphical views of syntactic structures.',
27
- 'synviewer.name': 'Synviewer',
27
+ 'synviewer.name': 'SynTrees',
28
28
  'synviewer.desc': 'Displays syntactic structures and Universal Dependencies graphically. Integrates with parsers (Penn Treebank, CoNLL-U) and exports images of syntactic trees.',
29
29
  'psd-reindexer.name': 'PSD Reindexer',
30
30
  'psd-reindexer.desc': 'Reorganizes node IDs of sentences in Penn Treebank format in sequential order from an uploaded PSD file.',
@@ -71,7 +71,7 @@ export const HeaderTexts = {
71
71
  'viewer.desc': 'Oferece acesso ao público para leitura e navegação nos corpora, com foco em segurança dos dados e proteção de direitos autorais.',
72
72
  'search.name': 'Buscas',
73
73
  'search.desc': 'Permite buscas por palavras, etiquetas ou estruturas sintáticas. Inclui filtros por documento e metadados, opções de exportação e visualizações gráficas das estruturas sintáticas.',
74
- 'synviewer.name': 'Synviewer',
74
+ 'synviewer.name': 'SynTrees',
75
75
  'synviewer.desc': 'Exibe estruturas sintáticas e dependências universais de forma gráfica. Possui integração com parsers (Penn Treebank, CoNLL-U) e exportação de imagens das árvores sintáticas.',
76
76
  'psd-reindexer.name': 'Reindexador PSD',
77
77
  'psd-reindexer.desc': 'Reorganiza os IDs dos nós de sentenças no formato Penn Treebank em ordem sequencial a partir de um arquivo PSD enviado.',
@@ -119,7 +119,7 @@ export const HeaderTexts = {
119
119
  'viewer.desc': 'Fornisce accesso pubblico per leggere e navigare nei corpora, concentrandosi sulla sicurezza dei dati e sulla protezione del copyright.',
120
120
  'search.name': 'Ricerca',
121
121
  'search.desc': 'Permette ricerche per parole, tag o strutture sintattiche. Include filtri per documenti e metadati, opzioni di esportazione e visualizzazioni grafiche delle strutture sintattiche.',
122
- 'synviewer.name': 'Synviewer',
122
+ 'synviewer.name': 'SynTrees',
123
123
  'synviewer.desc': 'Visualizza graficamente le strutture sintattiche e le Dipendenze Universali. Si integra con i parser (Penn Treebank, CoNLL-U) ed esporta immagini di alberi sintattici.',
124
124
  'psd-reindexer.name': 'PSD Reindexer',
125
125
  'psd-reindexer.desc': 'Riorganizza gli ID dei nodi delle frasi nel formato Penn Treebank in ordine sequenziale da un file PSD caricato.',
@@ -48,6 +48,7 @@ export type Struct = {
48
48
  status?: SentenceStatus;
49
49
  participant?: string;
50
50
  parsed?: string;
51
+ psd?: string;
51
52
  };
52
53
  export type Edition = {
53
54
  id: string;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "tycho-components",
3
3
  "private": false,
4
- "version": "0.2.3",
4
+ "version": "0.2.4-SNAPSHOT",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "exports": {
@@ -51,7 +51,7 @@
51
51
  "react-hook-form": "^7.45.2",
52
52
  "react-i18next": "^13.0.2",
53
53
  "react-router-dom": "^6.14.2",
54
- "tycho-storybook": "0.1.8",
54
+ "tycho-storybook": "0.1.9",
55
55
  "yup": "^1.2.0"
56
56
  },
57
57
  "devDependencies": {