tycho-components 0.0.14-SNAPSHOT-5 → 0.0.15-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.
Files changed (50) hide show
  1. package/dist/AppPicture/AppPicture.d.ts +9 -0
  2. package/dist/AppPicture/AppPicture.js +13 -0
  3. package/dist/AppPicture/index.d.ts +2 -0
  4. package/dist/AppPicture/index.js +2 -0
  5. package/dist/AppPicture/style.scss +0 -0
  6. package/dist/Header/Header.d.ts +13 -0
  7. package/dist/Header/Header.js +25 -0
  8. package/dist/Header/HeaderApps/HeaderApps.d.ts +6 -0
  9. package/dist/Header/HeaderApps/HeaderApps.js +46 -0
  10. package/dist/Header/HeaderApps/index.d.ts +2 -0
  11. package/dist/Header/HeaderApps/index.js +2 -0
  12. package/dist/Header/HeaderApps/style.scss +104 -0
  13. package/dist/Header/HeaderCorpora/HeaderCorpora.d.ts +9 -0
  14. package/dist/Header/HeaderCorpora/HeaderCorpora.js +55 -0
  15. package/dist/Header/HeaderCorpora/index.d.ts +2 -0
  16. package/dist/Header/HeaderCorpora/index.js +2 -0
  17. package/dist/Header/HeaderCorpora/style.scss +52 -0
  18. package/dist/Header/HeaderUser/HeaderUser.d.ts +6 -0
  19. package/dist/Header/HeaderUser/HeaderUser.js +16 -0
  20. package/dist/Header/HeaderUser/index.d.ts +2 -0
  21. package/dist/Header/HeaderUser/index.js +2 -0
  22. package/dist/Header/HeaderUser/style.scss +26 -0
  23. package/dist/Header/index.d.ts +2 -0
  24. package/dist/Header/index.js +2 -0
  25. package/dist/Header/styles.scss +36 -0
  26. package/dist/Header/types/App.d.ts +13 -0
  27. package/dist/Header/types/App.js +65 -0
  28. package/dist/Header/types/CorpusService.d.ts +6 -0
  29. package/dist/Header/types/CorpusService.js +8 -0
  30. package/dist/configs/Corpus.d.ts +24 -0
  31. package/dist/configs/Corpus.js +10 -0
  32. package/dist/configs/Localization.d.ts +136 -0
  33. package/dist/configs/Localization.js +6 -0
  34. package/dist/configs/localization/HeaderTexts.d.ts +136 -0
  35. package/dist/configs/localization/HeaderTexts.js +136 -0
  36. package/dist/configs/store/actions.d.ts +2 -0
  37. package/dist/configs/store/actions.js +6 -0
  38. package/dist/configs/store/reducer.js +5 -1
  39. package/dist/configs/store/store.js +1 -0
  40. package/dist/configs/store/types.d.ts +4 -1
  41. package/dist/configs/store/types.js +1 -0
  42. package/dist/configs/useCorpusUtils.d.ts +17 -0
  43. package/dist/configs/useCorpusUtils.js +21 -0
  44. package/dist/functions/ImageUtils.d.ts +5 -0
  45. package/dist/functions/ImageUtils.js +12 -0
  46. package/dist/functions/UsabilityUtils.d.ts +5 -0
  47. package/dist/functions/UsabilityUtils.js +14 -0
  48. package/dist/index.d.ts +5 -0
  49. package/dist/index.js +5 -0
  50. package/package.json +1 -1
@@ -0,0 +1,9 @@
1
+ import './style.scss';
2
+ type PictureProps = {
3
+ src: string;
4
+ title?: string;
5
+ className?: string;
6
+ onClick?: () => void;
7
+ };
8
+ export default function AppPicture({ src, title, className, onClick, }: PictureProps): import("react/jsx-runtime").JSX.Element;
9
+ export {};
@@ -0,0 +1,13 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { useTranslation } from 'react-i18next';
3
+ import ImageUtils from '../functions/ImageUtils';
4
+ import './style.scss';
5
+ export default function AppPicture({ src, title, className, onClick, }) {
6
+ const { t } = useTranslation('header');
7
+ return (_jsx("div", { className: "app-picture-container", children: _jsx("img", { className: `${className} ${src ? '' : 'picture-placeholder'}`, src: ImageUtils.display(src), title: title, onClick: () => onClick && onClick(), onError: ({ currentTarget }) => {
8
+ /* eslint-disable no-param-reassign */
9
+ currentTarget.onerror = null; // prevents looping
10
+ currentTarget.src = ImageUtils.getPlaceHolder();
11
+ /* eslint-enable no-param-reassign */
12
+ } }) }));
13
+ }
@@ -0,0 +1,2 @@
1
+ import AppPicture from './AppPicture';
2
+ export default AppPicture;
@@ -0,0 +1,2 @@
1
+ import AppPicture from './AppPicture';
2
+ export default AppPicture;
File without changes
@@ -0,0 +1,13 @@
1
+ import './styles.scss';
2
+ type Props = {
3
+ tool: string;
4
+ navigateHome?: () => void;
5
+ navigateCorpora?: (uid: string) => void;
6
+ navigateLogout?: () => void;
7
+ redirect?: string;
8
+ autoload?: boolean;
9
+ freeAccess?: boolean;
10
+ hideKeyboard?: boolean;
11
+ };
12
+ export default function Header({ tool, navigateHome, navigateCorpora, navigateLogout, redirect, autoload, freeAccess, hideKeyboard, }: Props): import("react/jsx-runtime").JSX.Element;
13
+ export {};
@@ -0,0 +1,25 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import cx from 'classnames';
3
+ import { useState } from 'react';
4
+ import { useTranslation } from 'react-i18next';
5
+ import { IconButton } from 'tycho-storybook';
6
+ import { useCorpusUtils } from '../configs/useCorpusUtils';
7
+ import LanguageSelector from '../LanguageSelector';
8
+ import VirtualKeyboard from '../VirtualKeyboard';
9
+ import HeaderApps from './HeaderApps';
10
+ import HeaderCorpora from './HeaderCorpora/HeaderCorpora';
11
+ import HeaderUser from './HeaderUser';
12
+ import './styles.scss';
13
+ const linkTurorials = 'https://www.tycho.iel.unicamp.br/home/tutorials';
14
+ export default function Header({ tool, navigateHome, navigateCorpora, navigateLogout, redirect, autoload, freeAccess, hideKeyboard, }) {
15
+ const { t } = useTranslation('header');
16
+ const { getCorpus, hasCorpus } = useCorpusUtils();
17
+ const [openKeyboard, setOpenKeyboard] = useState(false);
18
+ const profileClass = cx('header-profile', {
19
+ 'corpora-free': freeAccess && !hasCorpus(),
20
+ });
21
+ const homeTextsClass = cx('texts', {
22
+ pointer: navigateHome !== undefined,
23
+ });
24
+ 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 })] }), _jsx(HeaderCorpora, { redirect: redirect, autoload: autoload, freeAccess: freeAccess, navigateCorpora: navigateCorpora }), _jsxs("div", { className: profileClass, children: [!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: () => window.open(linkTurorials, '_blank') }), _jsx(LanguageSelector, {}), !freeAccess && _jsx(HeaderUser, { navigateLogout: navigateLogout })] }), openKeyboard && (_jsx(VirtualKeyboard, { onClose: () => setOpenKeyboard(false), closeLabel: t('button.close'), defaultLayout: getCorpus().keyboardLayout || 'english' }))] }));
25
+ }
@@ -0,0 +1,6 @@
1
+ import './style.scss';
2
+ type Props = {
3
+ freeAccess?: boolean;
4
+ };
5
+ export default function HeaderApps({ freeAccess }: Props): import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -0,0 +1,46 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import logo from '../../assets/img/logo.png';
3
+ import { Drawer } from '@mui/material';
4
+ import { useState } from 'react';
5
+ import { useTranslation } from 'react-i18next';
6
+ import { Button, Icon, IconButton, Tag } from 'tycho-storybook';
7
+ import { useLoggedUtils } from '../../configs/useLoggedUtils';
8
+ import UsabilityUtils from '../../functions/UsabilityUtils';
9
+ import { AvailableApps } from '../types/App';
10
+ import './style.scss';
11
+ export default function HeaderApps({ freeAccess }) {
12
+ const { t } = useTranslation('header');
13
+ const { hasLexiconAccess, hasParserAccess, isAdminOfAnyCorpus } = useLoggedUtils();
14
+ const [open, setOpen] = useState(false);
15
+ const goto = (app, blank) => {
16
+ if (blank) {
17
+ window.open(`/${app.code}`, '_blank');
18
+ }
19
+ else {
20
+ location.href = `/${app.code}`;
21
+ }
22
+ };
23
+ const renderItem = (item, idx) => {
24
+ if (!item.visibility && freeAccess)
25
+ return null;
26
+ if (item.admin && !isAdminOfAnyCorpus())
27
+ return null;
28
+ if (item.lexicon && !hasLexiconAccess())
29
+ return null;
30
+ if (item.parser && !hasParserAccess())
31
+ return null;
32
+ if (UsabilityUtils.isDesktop() && !item.desktop)
33
+ return null;
34
+ return (_jsxs("div", { className: "item", title: t(`${item.code}.desc`), children: [item.icon && (_jsx("div", { className: "icon", children: _jsx(Icon, { name: item.icon }) })), item.image && _jsx("img", { src: item.image }), _jsxs("div", { className: "texts", children: [_jsx("span", { className: "label", children: t(`${item.code}.name`) }), _jsx("span", { className: "sublabel", children: t(`${item.code}.desc`) })] }), _jsxs("div", { className: "options", children: [item.visibility && (_jsx(Tag, { text: item.visibility, size: "small", color: "green" })), item.external ? (_jsx(Button, { text: t('button.open'), size: "x-small", mode: "tonal", icon: "open_in_new", onClick: () => window.open(item.external, '_blank') })) : (_jsxs(_Fragment, { children: [_jsx(Button, { text: t('button.open'), size: "x-small", mode: "tonal", onClick: () => goto(item, false) }), _jsx(IconButton, { name: "open_in_new", size: "x-small", className: "icon-open", mode: "tonal", onClick: () => goto(item, true) })] }))] })] }, idx.valueOf()));
35
+ };
36
+ 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("span", { className: "label", children: t('label.platform') }), _jsx(IconButton, { name: "close", size: "x-small", mode: "ghost", onClick: () => setOpen(false) })] }), _jsxs("div", { className: "body", children: [_jsx("div", { className: "title", children: t('label.tools') }), AvailableApps.map((item, idx) => renderItem(item, idx))] }), _jsxs("div", { className: "footer", children: [_jsx("div", { className: "title", children: t('label.quick') }), quickAccess.map((item, idx) => renderItem(item, idx))] })] }))] }));
37
+ }
38
+ const quickAccess = [
39
+ {
40
+ code: 'platform',
41
+ image: logo,
42
+ visibility: 'public',
43
+ desktop: false,
44
+ external: 'https://www.tycho.iel.unicamp.br',
45
+ },
46
+ ];
@@ -0,0 +1,2 @@
1
+ import HeaderApps from './HeaderApps';
2
+ export default HeaderApps;
@@ -0,0 +1,2 @@
1
+ import HeaderApps from './HeaderApps';
2
+ export default HeaderApps;
@@ -0,0 +1,104 @@
1
+ .offcanvas-apps {
2
+ border: 1px solid var(--border-subtle-1);
3
+ background-color: var(--background-default);
4
+ width: 26vw;
5
+
6
+ > .MuiPaper-root {
7
+ width: 26vw;
8
+
9
+ > .header {
10
+ display: flex;
11
+ align-items: center;
12
+ border-bottom: 1px solid var(--border-subtle-1);
13
+ padding: 16px;
14
+
15
+ > .label {
16
+ @include label-large-1;
17
+ color: var(--text-primary);
18
+ }
19
+
20
+ > .ds-icon-button {
21
+ margin-left: auto;
22
+ }
23
+ }
24
+
25
+ > .body,
26
+ .footer {
27
+ padding: var(--spacing-250) 0;
28
+
29
+ > .title {
30
+ @include tag-medium-1;
31
+ color: var(--text-tertiary);
32
+ padding: 0px var(--spacing-250) var(--spacing-150);
33
+ }
34
+
35
+ > .item {
36
+ display: flex;
37
+ align-items: center;
38
+ gap: 8px;
39
+ padding: var(--spacing-100) var(--spacing-250);
40
+ cursor: pointer;
41
+
42
+ &:hover {
43
+ background-color: var(--layer-hover-1);
44
+ }
45
+
46
+ > .icon {
47
+ display: flex;
48
+ align-items: center;
49
+ justify-content: center;
50
+ background-color: var(--layer-field-hover);
51
+ border-radius: var(--radius-100);
52
+ padding: 8px;
53
+
54
+ > .ds-icon {
55
+ color: var(--icon-on-color-accent);
56
+ }
57
+ }
58
+
59
+ > img {
60
+ width: 40px;
61
+ height: 40px;
62
+ }
63
+
64
+ > .texts {
65
+ display: flex;
66
+ flex-direction: column;
67
+ gap: 4px;
68
+
69
+ > .label {
70
+ @include label-medium-2;
71
+ color: var(--text-primary);
72
+ }
73
+
74
+ > .sublabel {
75
+ @include helper-medium-1;
76
+ color: var(--text-secondary);
77
+ white-space: nowrap;
78
+ overflow: hidden;
79
+ text-overflow: ellipsis;
80
+ display: inline-block;
81
+ max-width: 12vw;
82
+ line-height: 1.2;
83
+ }
84
+ }
85
+
86
+ > .options {
87
+ display: flex;
88
+ display: flex;
89
+ align-items: center;
90
+ margin-left: auto;
91
+ gap: 4px;
92
+
93
+ > .ds-tag {
94
+ margin-right: 4px;
95
+ }
96
+ }
97
+ }
98
+ }
99
+
100
+ > .footer {
101
+ border-top: 1px solid var(--border-subtle-1);
102
+ }
103
+ }
104
+ }
@@ -0,0 +1,9 @@
1
+ import './style.scss';
2
+ type Props = {
3
+ navigateCorpora?: (uid: string) => void;
4
+ autoload?: boolean;
5
+ redirect?: string;
6
+ freeAccess?: boolean;
7
+ };
8
+ export default function HeaderCorpora({ navigateCorpora, redirect, autoload, freeAccess, }: Props): import("react/jsx-runtime").JSX.Element;
9
+ export {};
@@ -0,0 +1,55 @@
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 { useParams } from 'react-router-dom';
5
+ import AppModal from '../../AppModal';
6
+ import AppPicture from '../../AppPicture';
7
+ import { useCorpusUtils } from '../../configs/useCorpusUtils';
8
+ import CorpusService from '../types/CorpusService';
9
+ import './style.scss';
10
+ export default function HeaderCorpora({ navigateCorpora, redirect, autoload, freeAccess, }) {
11
+ const { t } = useTranslation('header');
12
+ const { setCorpus, getCorpus, hasCorpus } = useCorpusUtils();
13
+ const { uid } = useParams();
14
+ const [corpora, setCorpora] = useState([]);
15
+ const [openCorpora, setOpenCorpora] = useState(false);
16
+ const load = () => {
17
+ CorpusService.available().then((r) => {
18
+ setCorpora(r.data);
19
+ if (uid) {
20
+ const selectedCorpus = r.data.filter((c) => c.uid === uid);
21
+ navigateCorpora && navigateCorpora(selectedCorpus[0].uid);
22
+ setCorpus(selectedCorpus[0]);
23
+ }
24
+ else {
25
+ navigateCorpora && navigateCorpora(r.data[0].uid);
26
+ setCorpus(r.data[0]);
27
+ }
28
+ });
29
+ };
30
+ const handleChooseCorpus = (thisCorpus) => {
31
+ setOpenCorpora(false);
32
+ if (redirect) {
33
+ location.href = `${redirect}/${thisCorpus.uid}`;
34
+ }
35
+ else {
36
+ navigateCorpora && navigateCorpora(thisCorpus.uid);
37
+ setCorpus(thisCorpus);
38
+ }
39
+ };
40
+ const handleCorpusClick = () => {
41
+ if (freeAccess && hasCorpus()) {
42
+ navigateCorpora && navigateCorpora(getCorpus().uid);
43
+ }
44
+ else {
45
+ setOpenCorpora(true);
46
+ }
47
+ };
48
+ useEffect(() => {
49
+ openCorpora && load();
50
+ }, [openCorpora]);
51
+ useEffect(() => {
52
+ autoload && load();
53
+ }, [autoload]);
54
+ return (_jsxs("div", { className: "header-corpora-container", children: [hasCorpus() && (_jsxs("div", { className: "corpus-container", onClick: handleCorpusClick, children: [_jsx(AppPicture, { src: getCorpus().picture, title: getCorpus().name, className: "avatar" }), _jsx("span", { children: getCorpus().name })] })), openCorpora && (_jsx(AppModal, { className: "modal-corpora", title: t('label.choose'), close: () => setOpenCorpora(false), children: corpora.map((corpus) => (_jsxs("div", { className: "item", onClick: () => handleChooseCorpus(corpus), children: [_jsx(AppPicture, { src: corpus.picture, title: corpus.name, className: "avatar" }), _jsx("span", { children: corpus.name })] }, corpus.uid))) }))] }));
55
+ }
@@ -0,0 +1,2 @@
1
+ import HeaderCorpora from './HeaderCorpora';
2
+ export default HeaderCorpora;
@@ -0,0 +1,2 @@
1
+ import HeaderCorpora from './HeaderCorpora';
2
+ export default HeaderCorpora;
@@ -0,0 +1,52 @@
1
+ .header-corpora-container {
2
+ display: flex;
3
+ margin-left: auto;
4
+ margin-right: auto;
5
+
6
+ .corpus-container {
7
+ display: flex;
8
+ justify-content: center;
9
+ align-items: center;
10
+ cursor: pointer;
11
+
12
+ > span {
13
+ margin-right: var(--spacing-small);
14
+ margin-left: var(--spacing-small);
15
+ @include label-large-1;
16
+ color: var(--text-light-fixed);
17
+ }
18
+ }
19
+ }
20
+
21
+ .modal-corpora {
22
+ > .body {
23
+ display: flex;
24
+ flex-wrap: wrap;
25
+ gap: 12px;
26
+ max-height: 40vh;
27
+ overflow-y: auto;
28
+
29
+ > .item {
30
+ display: flex;
31
+ flex-direction: column;
32
+ justify-content: center;
33
+ align-items: center;
34
+ flex: 1 0 16%;
35
+ min-height: 12vh;
36
+ cursor: pointer;
37
+
38
+ &:hover {
39
+ background-color: var(--layer-hover-1);
40
+ }
41
+
42
+ > img {
43
+ width: 48px;
44
+ height: 48px;
45
+ }
46
+
47
+ > span {
48
+ text-align: center;
49
+ }
50
+ }
51
+ }
52
+ }
@@ -0,0 +1,6 @@
1
+ import './style.scss';
2
+ type Props = {
3
+ navigateLogout?: () => void;
4
+ };
5
+ export default function HeaderUser({ navigateLogout }: Props): import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -0,0 +1,16 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useState } from 'react';
3
+ import { useTranslation } from 'react-i18next';
4
+ import { Avatar, Icon, ProfileDropdown } from 'tycho-storybook';
5
+ import { useLoggedUtils } from '../../configs/useLoggedUtils';
6
+ import './style.scss';
7
+ export default function HeaderUser({ navigateLogout }) {
8
+ const { t } = useTranslation('header');
9
+ const { isLogged, getLogged } = useLoggedUtils();
10
+ const [open, setOpen] = useState(false);
11
+ const handleProfile = () => {
12
+ setOpen(false);
13
+ window.open(import.meta.env.VITE_APP_PROFILE_URL, '_blank');
14
+ };
15
+ return (_jsxs("div", { className: "header-user-container", children: [isLogged() ? (_jsx(ProfileDropdown, { src: getLogged()?.picture, title: getLogged()?.name, onClick: (b) => setOpen(b) })) : (_jsx(Avatar, { size: "small" })), open && isLogged() && (_jsxs("div", { className: "ds-dropdown-list", children: [_jsx("div", { className: "ds-dropdown-itemlist", children: _jsx("span", { className: "label", children: `${t('profile.label.hello')} ${getLogged()?.name}` }) }), _jsxs("div", { className: "ds-dropdown-itemlist d-none", children: [_jsx(Icon, { name: "colors", size: "x-small" }), _jsx("span", { className: "label", children: t('profile.label.theme') })] }), _jsxs("div", { className: "ds-dropdown-itemlist", onClick: handleProfile, children: [_jsx(Icon, { name: "person", size: "x-small" }), _jsx("span", { className: "label", children: t('profile.label.home') })] }), _jsxs("div", { className: "ds-dropdown-itemlist", children: [_jsx(Icon, { name: "live_help", size: "x-small" }), _jsx("span", { className: "label", children: t('profile.label.help') })] }), _jsxs("div", { className: "ds-dropdown-itemlist", onClick: navigateLogout, children: [_jsx(Icon, { name: "logout", size: "x-small" }), _jsx("span", { className: "label", children: t('profile.label.logout') })] })] }))] }));
16
+ }
@@ -0,0 +1,2 @@
1
+ import HeaderUser from './HeaderUser';
2
+ export default HeaderUser;
@@ -0,0 +1,2 @@
1
+ import HeaderUser from './HeaderUser';
2
+ export default HeaderUser;
@@ -0,0 +1,26 @@
1
+ .header-user-container {
2
+ display: flex;
3
+ cursor: pointer;
4
+ position: relative;
5
+
6
+ > .ds-dropdown-list {
7
+ right: 0;
8
+ width: auto;
9
+
10
+ > .ds-dropdown-itemlist {
11
+ &:first-child {
12
+ border-bottom: 1px solid var(--border-subtle-1);
13
+ color: var(--text-disabled);
14
+ }
15
+
16
+ &:last-child {
17
+ border-top: 1px solid var(--border-subtle-1);
18
+ color: var(--text-error);
19
+
20
+ > .ds-icon {
21
+ color: var(--text-error);
22
+ }
23
+ }
24
+ }
25
+ }
26
+ }
@@ -0,0 +1,2 @@
1
+ import Header from './Header';
2
+ export default Header;
@@ -0,0 +1,2 @@
1
+ import Header from './Header';
2
+ export default Header;
@@ -0,0 +1,36 @@
1
+ .ds-header {
2
+ display: flex;
3
+ align-items: center;
4
+ position: fixed;
5
+ top: 0;
6
+ left: 0;
7
+ width: 100%;
8
+ background: var(--background-accent);
9
+ min-width: 960px;
10
+ min-height: 48px;
11
+ z-index: 1150;
12
+ padding: 0px var(--spacing-100);
13
+ gap: 16px;
14
+
15
+ > .texts {
16
+ > .title {
17
+ @include label-large-2;
18
+ color: var(--text-light-fixed);
19
+ margin-right: 8px;
20
+ }
21
+
22
+ > .subtitle {
23
+ @include label-large-1;
24
+ color: var(--text-light-fixed);
25
+ }
26
+ }
27
+
28
+ > .header-profile {
29
+ display: flex;
30
+ align-items: center;
31
+
32
+ &.corpora-free {
33
+ margin-left: auto;
34
+ }
35
+ }
36
+ }
@@ -0,0 +1,13 @@
1
+ type App = {
2
+ code: string;
3
+ icon?: string;
4
+ image?: string;
5
+ visibility: 'public' | null;
6
+ desktop: boolean;
7
+ admin?: boolean;
8
+ lexicon?: boolean;
9
+ parser?: boolean;
10
+ external?: string;
11
+ };
12
+ export declare const AvailableApps: App[];
13
+ export default App;
@@ -0,0 +1,65 @@
1
+ export const AvailableApps = [
2
+ {
3
+ code: 'reserved',
4
+ icon: 'lock',
5
+ visibility: null,
6
+ desktop: false,
7
+ },
8
+ {
9
+ code: 'catalog',
10
+ icon: 'auto_stories',
11
+ visibility: null,
12
+ desktop: true,
13
+ },
14
+ {
15
+ code: 'admin',
16
+ icon: 'folder_managed',
17
+ visibility: null,
18
+ desktop: true,
19
+ admin: true,
20
+ },
21
+ {
22
+ code: 'parser',
23
+ icon: 'settings',
24
+ visibility: null,
25
+ desktop: true,
26
+ parser: true,
27
+ },
28
+ {
29
+ code: 'io',
30
+ icon: 'swap_vert',
31
+ visibility: null,
32
+ desktop: true,
33
+ },
34
+ {
35
+ code: 'lexicon',
36
+ icon: 'book_3',
37
+ visibility: null,
38
+ desktop: false,
39
+ lexicon: true,
40
+ },
41
+ {
42
+ code: 'search',
43
+ icon: 'match_word',
44
+ visibility: 'public',
45
+ desktop: true,
46
+ },
47
+ {
48
+ code: 'viewer',
49
+ icon: 'news',
50
+ visibility: 'public',
51
+ desktop: false,
52
+ },
53
+ {
54
+ code: 'synviewer',
55
+ icon: 'graph_4',
56
+ visibility: 'public',
57
+ desktop: false,
58
+ },
59
+ {
60
+ code: 'psd-reindexer',
61
+ icon: '123',
62
+ visibility: 'public',
63
+ desktop: false,
64
+ },
65
+ ];
@@ -0,0 +1,6 @@
1
+ import Corpus from '../../configs/Corpus';
2
+ declare function available(): Promise<import("axios").AxiosResponse<Corpus[], any>>;
3
+ declare const CorpusService: {
4
+ available: typeof available;
5
+ };
6
+ export default CorpusService;
@@ -0,0 +1,8 @@
1
+ import api from '../../configs/api';
2
+ function available() {
3
+ return api.get(`${import.meta.env.VITE_APP_AUTH_API}/corpus/list/me`);
4
+ }
5
+ const CorpusService = {
6
+ available,
7
+ };
8
+ export default CorpusService;
@@ -0,0 +1,24 @@
1
+ type Corpus = {
2
+ uid: string;
3
+ name: string;
4
+ picture: string;
5
+ uploadDir: string;
6
+ parameters: Record<string, any>;
7
+ parser?: string;
8
+ active: boolean;
9
+ opened: boolean;
10
+ keyboardLayout?: string;
11
+ };
12
+ export declare const EMPTY_CORPUS: {
13
+ uid: string;
14
+ name: string;
15
+ picture: string;
16
+ uploadDir: string;
17
+ parameters: {
18
+ '': string;
19
+ };
20
+ active: boolean;
21
+ opened: boolean;
22
+ keyboardLayout: string;
23
+ };
24
+ export default Corpus;
@@ -0,0 +1,10 @@
1
+ export const EMPTY_CORPUS = {
2
+ uid: '',
3
+ name: '',
4
+ picture: '',
5
+ uploadDir: '',
6
+ parameters: { '': '' },
7
+ active: true,
8
+ opened: false,
9
+ keyboardLayout: '',
10
+ };