tycho-components 0.2.3-SNAPSHOT-1 → 0.2.3-SNAPSHOT-3

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.
@@ -1,9 +1,6 @@
1
1
  import './styles.scss';
2
2
  type Props = {
3
3
  tool: string;
4
- navigateHome?: () => void;
5
- navigateCorpora?: (uid: string) => void;
6
- navigateLogout?: () => void;
7
4
  redirect?: string;
8
5
  autoload?: boolean;
9
6
  freeAccess?: boolean;
@@ -15,6 +12,10 @@ type Props = {
15
12
  mode: 'corpus' | 'parser' | 'lexicon';
16
13
  ref: string;
17
14
  };
15
+ keyboardLayout?: string;
16
+ navigateHome?: () => void;
17
+ navigateCorpora?: (uid: string) => void;
18
+ navigateLogout?: () => void;
18
19
  };
19
- export default function Header({ tool, navigateHome, navigateCorpora, navigateLogout, redirect, autoload, freeAccess, hideKeyboard, hideReplaceAll, customHeader, notifications, }: Props): import("react/jsx-runtime").JSX.Element;
20
+ export default function Header({ tool, redirect, autoload, freeAccess, hideKeyboard, hideReplaceAll, customHeader, notifications, keyboardLayout, navigateHome, navigateCorpora, navigateLogout, }: Props): import("react/jsx-runtime").JSX.Element;
20
21
  export {};
@@ -16,7 +16,7 @@ import { useLoggedUtils } from '../configs/useLoggedUtils';
16
16
  import CommonContext from '../configs/CommonContext';
17
17
  import { tour } from '../configs/store/actions';
18
18
  const linkTutorials = 'https://www.tycho.iel.unicamp.br/home/tutorials';
19
- export default function Header({ tool, navigateHome, navigateCorpora, navigateLogout, redirect, autoload, freeAccess, hideKeyboard, hideReplaceAll, customHeader, notifications, }) {
19
+ export default function Header({ tool, redirect, autoload, freeAccess, hideKeyboard, hideReplaceAll, customHeader, notifications, keyboardLayout, navigateHome, navigateCorpora, navigateLogout, }) {
20
20
  const { t } = useTranslation('header');
21
21
  const { dispatch } = useContext(CommonContext);
22
22
  const { getCorpus, hasCorpus } = useCorpusUtils();
@@ -32,5 +32,5 @@ export default function Header({ tool, navigateHome, navigateCorpora, navigateLo
32
32
  window.open(linkTutorials, '_blank');
33
33
  dispatch(tour(true));
34
34
  };
35
- return (_jsxs("div", { className: "ds-header", children: [_jsx(HeaderApps, { freeAccess: freeAccess }), _jsxs("div", { className: homeTextsClass, onClick: () => navigateHome && navigateHome(), children: [_jsx("span", { className: "title", children: t('label.platform') }), _jsx("span", { className: "subtitle", children: tool })] }), customHeader, !customHeader && (_jsx(HeaderCorpora, { redirect: redirect, autoload: autoload, freeAccess: freeAccess, navigateCorpora: navigateCorpora })), _jsxs("div", { className: profileClass, children: [!hideReplaceAll && _jsx(HeaderReplaceAll, {}), !hideKeyboard && (_jsx(IconButton, { onClick: () => setOpenKeyboard(!openKeyboard), name: "keyboard", size: "medium", title: t('tooltip.keyboard') })), _jsx(IconButton, { name: "live_help", size: "medium", title: t('tooltip.tutorials'), onClick: (e) => handleHelp() }), notifications && isLogged() && (_jsx(HeaderNotifications, { uid: notifications.ref, mode: notifications.mode })), _jsx(LanguageSelector, {}), !freeAccess && _jsx(HeaderUser, { navigateLogout: navigateLogout })] }), openKeyboard && (_jsx(VirtualKeyboard, { onClose: () => setOpenKeyboard(false), closeLabel: t('button.close'), defaultLayout: getCorpus().keyboardLayout || 'english' }))] }));
35
+ return (_jsxs("div", { className: "ds-header", children: [_jsx(HeaderApps, { freeAccess: freeAccess }), _jsxs("div", { className: homeTextsClass, onClick: () => navigateHome && navigateHome(), children: [_jsx("span", { className: "title", children: t('label.platform') }), _jsx("span", { className: "subtitle", children: tool })] }), customHeader, !customHeader && (_jsx(HeaderCorpora, { redirect: redirect, autoload: autoload, freeAccess: freeAccess, navigateCorpora: navigateCorpora })), _jsxs("div", { className: profileClass, children: [!hideReplaceAll && _jsx(HeaderReplaceAll, {}), !hideKeyboard && (_jsx(IconButton, { onClick: () => setOpenKeyboard(!openKeyboard), name: "keyboard", size: "medium", title: t('tooltip.keyboard') })), _jsx(IconButton, { name: "live_help", size: "medium", title: t('tooltip.tutorials'), onClick: (e) => handleHelp() }), notifications && isLogged() && (_jsx(HeaderNotifications, { uid: notifications.ref, mode: notifications.mode })), _jsx(LanguageSelector, {}), !freeAccess && _jsx(HeaderUser, { navigateLogout: navigateLogout })] }), openKeyboard && (_jsx(VirtualKeyboard, { onClose: () => setOpenKeyboard(false), closeLabel: t('button.close'), defaultLayout: keyboardLayout || getCorpus().keyboardLayout || 'english' }))] }));
36
36
  }
@@ -4,12 +4,12 @@ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
4
4
  import { saveAs } from 'file-saver';
5
5
  import { useEffect, useState } from 'react';
6
6
  import { useTranslation } from 'react-i18next';
7
+ import AppPlaceholder from '../AppPlaceholder';
8
+ import DateUtils from '../functions/DateUtils';
7
9
  import SentenceUtils from '../functions/SentenceUtils';
8
10
  import CytoscapeTreeConverter from './cytoscape/CytoscapeTreeConverter';
9
11
  import SyntreesCytoscape from './cytoscape/SyntreesCytoscape';
10
12
  import './style.scss';
11
- import AppPlaceholder from '../AppPlaceholder';
12
- import DateUtils from '../functions/DateUtils';
13
13
  export default function TreeView({ struct, expression, selector = 'canvas-tree', translations, wheelSensitivity, onExpand, onReady, }) {
14
14
  const { t } = useTranslation('tree');
15
15
  const [cy, setCy] = useState(null);
@@ -28,6 +28,8 @@
28
28
  bottom: 16px;
29
29
  left: 16px;
30
30
  z-index: 1100;
31
+ display: flex;
32
+ flex-direction: column;
31
33
 
32
34
  .translation b {
33
35
  margin-right: 4px;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "tycho-components",
3
3
  "private": false,
4
- "version": "0.2.3-SNAPSHOT-1",
4
+ "version": "0.2.3-SNAPSHOT-3",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "exports": {