tycho-components 0.0.18-SNAPSHOT-10 → 0.0.18
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.
|
@@ -7,11 +7,11 @@ import AppLoading from '../AppLoading';
|
|
|
7
7
|
import AppPlaceholder from '../AppPlaceholder';
|
|
8
8
|
import CommonContext from '../configs/CommonContext';
|
|
9
9
|
import SecurityUtils from '../functions/SecurityUtils';
|
|
10
|
+
import UsabilityUtils from '../functions/UsabilityUtils';
|
|
10
11
|
import CommentAdd from './CommentAdd';
|
|
11
12
|
import CommentInfo from './CommentInfo';
|
|
12
13
|
import './style.scss';
|
|
13
14
|
import CommentService from './types/CommentService';
|
|
14
|
-
import UsabilityUtils from '../functions/UsabilityUtils';
|
|
15
15
|
export default function Comments({ uid, keywords, references, mode, onClose, onChange, }) {
|
|
16
16
|
const { t } = useTranslation('comments');
|
|
17
17
|
const { state } = useContext(CommonContext);
|
package/dist/Comments/style.scss
CHANGED
package/dist/Header/Header.d.ts
CHANGED
|
@@ -11,6 +11,10 @@ type Props = {
|
|
|
11
11
|
hideReplaceAll?: boolean;
|
|
12
12
|
parser?: boolean;
|
|
13
13
|
customHeader?: React.ReactNode;
|
|
14
|
+
notifications?: {
|
|
15
|
+
mode: 'corpus' | 'parser' | 'lexicon';
|
|
16
|
+
ref: string;
|
|
17
|
+
};
|
|
14
18
|
};
|
|
15
|
-
export default function Header({ tool, navigateHome, navigateCorpora, navigateLogout, redirect, autoload, freeAccess, hideKeyboard, hideReplaceAll, customHeader, }: Props): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
export default function Header({ tool, navigateHome, navigateCorpora, navigateLogout, redirect, autoload, freeAccess, hideKeyboard, hideReplaceAll, customHeader, notifications, }: Props): import("react/jsx-runtime").JSX.Element;
|
|
16
20
|
export {};
|
package/dist/Header/Header.js
CHANGED
|
@@ -11,8 +11,9 @@ import HeaderCorpora from './HeaderCorpora/HeaderCorpora';
|
|
|
11
11
|
import HeaderReplaceAll from './HeaderReplaceAll';
|
|
12
12
|
import HeaderUser from './HeaderUser';
|
|
13
13
|
import './styles.scss';
|
|
14
|
+
import HeaderNotifications from '../Comments/HeaderNotifications';
|
|
14
15
|
const linkTurorials = 'https://www.tycho.iel.unicamp.br/home/tutorials';
|
|
15
|
-
export default function Header({ tool, navigateHome, navigateCorpora, navigateLogout, redirect, autoload, freeAccess, hideKeyboard, hideReplaceAll, customHeader, }) {
|
|
16
|
+
export default function Header({ tool, navigateHome, navigateCorpora, navigateLogout, redirect, autoload, freeAccess, hideKeyboard, hideReplaceAll, customHeader, notifications, }) {
|
|
16
17
|
const { t } = useTranslation('header');
|
|
17
18
|
const { getCorpus, hasCorpus } = useCorpusUtils();
|
|
18
19
|
const [openKeyboard, setOpenKeyboard] = useState(false);
|
|
@@ -22,5 +23,5 @@ export default function Header({ tool, navigateHome, navigateCorpora, navigateLo
|
|
|
22
23
|
const homeTextsClass = cx('texts', {
|
|
23
24
|
pointer: navigateHome !== undefined,
|
|
24
25
|
});
|
|
25
|
-
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: () => 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' }))] }));
|
|
26
|
+
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: () => window.open(linkTurorials, '_blank') }), notifications && (_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' }))] }));
|
|
26
27
|
}
|