tycho-components 0.2.7-SNAPSHOT-3 → 0.2.9
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.
- package/dist/AppDropzone/UploadService.d.ts +1 -1
- package/dist/Comments/types/CommentService.d.ts +8 -8
- package/dist/Header/Header.d.ts +3 -1
- package/dist/Header/Header.js +7 -14
- package/dist/Header/HelpButton/HelpButton.d.ts +10 -0
- package/dist/Header/HelpButton/HelpButton.js +10 -0
- package/dist/Header/HelpButton/HelpModal.d.ts +8 -0
- package/dist/Header/HelpButton/HelpModal.js +34 -0
- package/dist/Header/HelpButton/index.d.ts +1 -0
- package/dist/Header/HelpButton/index.js +1 -0
- package/dist/Header/HelpButton/style.scss +55 -0
- package/dist/Header/types/CorpusService.d.ts +1 -1
- package/dist/Participants/types/ParticipantService.d.ts +3 -3
- package/dist/configs/Localization.d.ts +30 -0
- package/dist/configs/Localization.js +4 -0
- package/dist/configs/Storage.d.ts +6 -0
- package/dist/configs/Storage.js +13 -0
- package/dist/configs/localization/HelpTexts.d.ts +32 -0
- package/dist/configs/localization/HelpTexts.js +32 -0
- package/package.json +3 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { UploadedFile } from './UploadedFile';
|
|
2
|
-
declare function execute(data: FormData): Promise<import("axios").AxiosResponse<UploadedFile, any>>;
|
|
2
|
+
declare function execute(data: FormData): Promise<import("axios").AxiosResponse<UploadedFile, any, {}>>;
|
|
3
3
|
declare const UploadService: {
|
|
4
4
|
execute: typeof execute;
|
|
5
5
|
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { User } from '../../configs/types/User';
|
|
2
2
|
import { Comment, CommentRequest } from './Comment';
|
|
3
|
-
declare function findNotifications(uid: string, mode: string): Promise<import("axios").AxiosResponse<Comment[], any>>;
|
|
4
|
-
declare function findReadNotifications(uid: string, mode: string): Promise<import("axios").AxiosResponse<Comment[], any>>;
|
|
5
|
-
declare function markRead(id: string): Promise<import("axios").AxiosResponse<Comment, any>>;
|
|
6
|
-
declare function update(id: string, comment: CommentRequest): Promise<import("axios").AxiosResponse<Comment, any>>;
|
|
7
|
-
declare function remove(id: string): Promise<import("axios").AxiosResponse<Comment, any>>;
|
|
8
|
-
declare function add(uid: string, mode: string, comment: CommentRequest, references: Record<string, string | number | boolean>, keywords?: Record<string, string | number | boolean>): Promise<import("axios").AxiosResponse<Comment, any>>;
|
|
9
|
-
declare function find(uid: string, mode: string, request: Record<string, string | number | boolean>): Promise<import("axios").AxiosResponse<Comment[], any>>;
|
|
10
|
-
declare function findAvailableUsers(uid: string, mode: string): Promise<import("axios").AxiosResponse<User[], any>>;
|
|
3
|
+
declare function findNotifications(uid: string, mode: string): Promise<import("axios").AxiosResponse<Comment[], any, {}>>;
|
|
4
|
+
declare function findReadNotifications(uid: string, mode: string): Promise<import("axios").AxiosResponse<Comment[], any, {}>>;
|
|
5
|
+
declare function markRead(id: string): Promise<import("axios").AxiosResponse<Comment, any, {}>>;
|
|
6
|
+
declare function update(id: string, comment: CommentRequest): Promise<import("axios").AxiosResponse<Comment, any, {}>>;
|
|
7
|
+
declare function remove(id: string): Promise<import("axios").AxiosResponse<Comment, any, {}>>;
|
|
8
|
+
declare function add(uid: string, mode: string, comment: CommentRequest, references: Record<string, string | number | boolean>, keywords?: Record<string, string | number | boolean>): Promise<import("axios").AxiosResponse<Comment, any, {}>>;
|
|
9
|
+
declare function find(uid: string, mode: string, request: Record<string, string | number | boolean>): Promise<import("axios").AxiosResponse<Comment[], any, {}>>;
|
|
10
|
+
declare function findAvailableUsers(uid: string, mode: string): Promise<import("axios").AxiosResponse<User[], any, {}>>;
|
|
11
11
|
declare const CommentService: {
|
|
12
12
|
add: typeof add;
|
|
13
13
|
remove: typeof remove;
|
package/dist/Header/Header.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { HelpAction } from './HelpButton/HelpButton';
|
|
1
2
|
import './styles.scss';
|
|
2
3
|
type Props = {
|
|
3
4
|
tool: string;
|
|
@@ -16,6 +17,7 @@ type Props = {
|
|
|
16
17
|
navigateHome?: () => void;
|
|
17
18
|
navigateCorpora?: (uid: string) => void;
|
|
18
19
|
navigateLogout?: () => void;
|
|
20
|
+
helpActions?: HelpAction[];
|
|
19
21
|
};
|
|
20
|
-
export default function Header({ tool, redirect, autoload, freeAccess, hideKeyboard, hideReplaceAll, customHeader, notifications, keyboardLayout, navigateHome, navigateCorpora, navigateLogout, }: Props): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
export default function Header({ tool, redirect, autoload, freeAccess, hideKeyboard, hideReplaceAll, customHeader, notifications, keyboardLayout, navigateHome, navigateCorpora, navigateLogout, helpActions, }: Props): import("react/jsx-runtime").JSX.Element;
|
|
21
23
|
export {};
|
package/dist/Header/Header.js
CHANGED
|
@@ -1,24 +1,21 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import cx from 'classnames';
|
|
3
|
-
import {
|
|
3
|
+
import { useState } from 'react';
|
|
4
4
|
import { useTranslation } from 'react-i18next';
|
|
5
5
|
import { IconButton } from 'tycho-storybook';
|
|
6
|
-
import
|
|
6
|
+
import HeaderNotifications from '../Comments/HeaderNotifications';
|
|
7
7
|
import LanguageSelector from '../LanguageSelector';
|
|
8
8
|
import VirtualKeyboard from '../VirtualKeyboard';
|
|
9
|
+
import { useCorpusUtils } from '../configs/useCorpusUtils';
|
|
10
|
+
import { useLoggedUtils } from '../configs/useLoggedUtils';
|
|
9
11
|
import HeaderApps from './HeaderApps';
|
|
10
12
|
import HeaderCorpora from './HeaderCorpora/HeaderCorpora';
|
|
11
13
|
import HeaderReplaceAll from './HeaderReplaceAll';
|
|
12
14
|
import HeaderUser from './HeaderUser';
|
|
15
|
+
import HelpButton from './HelpButton';
|
|
13
16
|
import './styles.scss';
|
|
14
|
-
|
|
15
|
-
import { useLoggedUtils } from '../configs/useLoggedUtils';
|
|
16
|
-
import CommonContext from '../configs/CommonContext';
|
|
17
|
-
import { tour } from '../configs/store/actions';
|
|
18
|
-
const linkTutorials = 'https://www.tycho.iel.unicamp.br/home/tutorials';
|
|
19
|
-
export default function Header({ tool, redirect, autoload, freeAccess, hideKeyboard, hideReplaceAll, customHeader, notifications, keyboardLayout, navigateHome, navigateCorpora, navigateLogout, }) {
|
|
17
|
+
export default function Header({ tool, redirect, autoload, freeAccess, hideKeyboard, hideReplaceAll, customHeader, notifications, keyboardLayout, navigateHome, navigateCorpora, navigateLogout, helpActions, }) {
|
|
20
18
|
const { t } = useTranslation('header');
|
|
21
|
-
const { dispatch } = useContext(CommonContext);
|
|
22
19
|
const { getCorpus, hasCorpus } = useCorpusUtils();
|
|
23
20
|
const { isLogged } = useLoggedUtils();
|
|
24
21
|
const [openKeyboard, setOpenKeyboard] = useState(false);
|
|
@@ -28,9 +25,5 @@ export default function Header({ tool, redirect, autoload, freeAccess, hideKeybo
|
|
|
28
25
|
const homeTextsClass = cx('texts', {
|
|
29
26
|
pointer: navigateHome !== undefined,
|
|
30
27
|
});
|
|
31
|
-
|
|
32
|
-
window.open(linkTutorials, '_blank');
|
|
33
|
-
dispatch(tour(true));
|
|
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: keyboardLayout || getCorpus().keyboardLayout || 'english' }))] }));
|
|
28
|
+
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(HelpButton, { helpActions: helpActions }), 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
29
|
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useState } from 'react';
|
|
3
|
+
import { useTranslation } from 'react-i18next';
|
|
4
|
+
import { IconButton } from 'tycho-storybook';
|
|
5
|
+
import HelpModal from './HelpModal';
|
|
6
|
+
export default function HelpButton({ helpActions }) {
|
|
7
|
+
const { t } = useTranslation('header');
|
|
8
|
+
const [open, setOpen] = useState(false);
|
|
9
|
+
return (_jsxs(_Fragment, { children: [_jsx(IconButton, { name: "live_help", size: "medium", title: t('tooltip.tutorials'), onClick: () => setOpen(true) }), open && (_jsx(HelpModal, { onClose: () => setOpen(false), helpActions: helpActions }))] }));
|
|
10
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { HelpAction } from './HelpButton';
|
|
2
|
+
import './style.scss';
|
|
3
|
+
type Props = {
|
|
4
|
+
onClose: () => void;
|
|
5
|
+
helpActions?: HelpAction[];
|
|
6
|
+
};
|
|
7
|
+
export default function HelpModal({ onClose, helpActions }: Props): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useTranslation } from 'react-i18next';
|
|
3
|
+
import { Button } from 'tycho-storybook';
|
|
4
|
+
import AppModal from '../../AppModal/AppModal';
|
|
5
|
+
import Storage from '../../configs/Storage';
|
|
6
|
+
import { useTourUtils } from '../../configs/useTourUtils';
|
|
7
|
+
import './style.scss';
|
|
8
|
+
export default function HelpModal({ onClose, helpActions = [] }) {
|
|
9
|
+
const { t } = useTranslation('help');
|
|
10
|
+
const { turnOn, turnOff, status } = useTourUtils();
|
|
11
|
+
const isTourActive = status();
|
|
12
|
+
const isAutoOpenEnabled = Storage.getTourAutoOpen();
|
|
13
|
+
const handleTutorials = () => {
|
|
14
|
+
window.open('https://www.tycho.iel.unicamp.br/home/tutorials', '_blank');
|
|
15
|
+
onClose();
|
|
16
|
+
};
|
|
17
|
+
const handleTourToggle = () => {
|
|
18
|
+
if (isTourActive) {
|
|
19
|
+
turnOff();
|
|
20
|
+
}
|
|
21
|
+
else {
|
|
22
|
+
turnOn();
|
|
23
|
+
}
|
|
24
|
+
onClose();
|
|
25
|
+
};
|
|
26
|
+
const handleCustomAction = (item) => {
|
|
27
|
+
item.action();
|
|
28
|
+
onClose();
|
|
29
|
+
};
|
|
30
|
+
const handleAutoOpenToggle = (event) => {
|
|
31
|
+
Storage.setTourAutoOpen(event.target.checked);
|
|
32
|
+
};
|
|
33
|
+
return (_jsxs(AppModal, { title: t('modal.title') || 'Help Center', close: onClose, hideFooter: true, className: "help-modal", children: [_jsxs("div", { className: "item", children: [_jsx("div", { className: "title", children: t('title.tutorials') }), _jsx("div", { className: "desc", children: t('description.tutorials') }), _jsx(Button, { text: t('button.open', { title: t('title.tutorials') }), size: "small", mode: "outlined", icon: "keyboard_arrow_right", onClick: handleTutorials })] }), _jsxs("div", { className: "item d-none", children: [_jsx("div", { className: "title", children: t('title.tour') }), _jsx("div", { className: "desc", children: t('description.tour') }), _jsxs("label", { className: "help-checkbox-label", children: [_jsx("input", { type: "checkbox", checked: isAutoOpenEnabled, onChange: handleAutoOpenToggle, className: "help-checkbox" }), _jsx("span", { children: t('checkbox.autoOpen') })] }), _jsx(Button, { text: t('button.open', { title: t('title.tour') }), size: "small", mode: "outlined", icon: "keyboard_arrow_right", onClick: handleTourToggle })] }), helpActions.map((item, idx) => (_jsxs("div", { className: "item", children: [_jsx("div", { className: "title", children: item.title }), _jsx("div", { className: "desc", children: item.desc }), _jsx(Button, { text: t('button.open', { title: item.title }), size: "small", mode: "outlined", icon: "keyboard_arrow_right", onClick: () => handleCustomAction(item) })] }, idx)))] }));
|
|
34
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './HelpButton';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './HelpButton';
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
.help-modal {
|
|
2
|
+
max-width: 60vw !important;
|
|
3
|
+
width: 60vw !important;
|
|
4
|
+
|
|
5
|
+
.body {
|
|
6
|
+
display: flex;
|
|
7
|
+
flex-direction: row;
|
|
8
|
+
flex-wrap: wrap;
|
|
9
|
+
gap: 16px;
|
|
10
|
+
padding: var(--spacing-300) var(--spacing-200);
|
|
11
|
+
max-height: 60vh;
|
|
12
|
+
width: 60vw;
|
|
13
|
+
overflow-y: auto;
|
|
14
|
+
|
|
15
|
+
.item {
|
|
16
|
+
display: flex;
|
|
17
|
+
flex-direction: column;
|
|
18
|
+
flex: 0 0 calc(33.333% - 11px);
|
|
19
|
+
min-height: 24vh;
|
|
20
|
+
padding: 24px 24px 16px;
|
|
21
|
+
border: 1px solid var(--border-subtle-2);
|
|
22
|
+
border-radius: var(--radius-100);
|
|
23
|
+
|
|
24
|
+
> .title {
|
|
25
|
+
@include subtitle-small-2;
|
|
26
|
+
color: var(--text-primary);
|
|
27
|
+
margin-bottom: 4px;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
> .desc {
|
|
31
|
+
@include body-medium-1;
|
|
32
|
+
color: var(--text-secondary);
|
|
33
|
+
margin-bottom: 8px;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
> .ds-button {
|
|
37
|
+
margin-top: auto;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.help-checkbox-label {
|
|
41
|
+
display: flex;
|
|
42
|
+
align-items: center;
|
|
43
|
+
gap: var(--spacing-100);
|
|
44
|
+
cursor: pointer;
|
|
45
|
+
user-select: none;
|
|
46
|
+
font-size: 0.875rem;
|
|
47
|
+
margin-bottom: 16px;
|
|
48
|
+
|
|
49
|
+
.help-checkbox {
|
|
50
|
+
cursor: pointer;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Corpus } from '../../configs/types/Corpus';
|
|
2
|
-
declare function available(): Promise<import("axios").AxiosResponse<Corpus[], any>>;
|
|
2
|
+
declare function available(): Promise<import("axios").AxiosResponse<Corpus[], any, {}>>;
|
|
3
3
|
declare const CorpusService: {
|
|
4
4
|
available: typeof available;
|
|
5
5
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { AppEditableField } from '../../AppEditable/AppEditableField';
|
|
2
2
|
import Participant, { ParticipantCreateRequest } from './Participant';
|
|
3
|
-
declare function add(uid: string, request: ParticipantCreateRequest): Promise<import("axios").AxiosResponse<Participant, any>>;
|
|
4
|
-
declare function update(field: AppEditableField): Promise<import("axios").AxiosResponse<any, any>>;
|
|
5
|
-
declare function remove(document: string, code: string, transfer?: string): Promise<import("axios").AxiosResponse<any, any>>;
|
|
3
|
+
declare function add(uid: string, request: ParticipantCreateRequest): Promise<import("axios").AxiosResponse<Participant, any, {}>>;
|
|
4
|
+
declare function update(field: AppEditableField): Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
5
|
+
declare function remove(document: string, code: string, transfer?: string): Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
6
6
|
declare const ParticipantService: {
|
|
7
7
|
add: typeof add;
|
|
8
8
|
update: typeof update;
|
|
@@ -180,6 +180,16 @@ export declare const commonResources: {
|
|
|
180
180
|
'modal.title': string;
|
|
181
181
|
'error.uploading.image': string;
|
|
182
182
|
};
|
|
183
|
+
help: {
|
|
184
|
+
'modal.title': string;
|
|
185
|
+
'title.tutorials': string;
|
|
186
|
+
'title.tour': string;
|
|
187
|
+
'title.autoOpen': string;
|
|
188
|
+
'description.tutorials': string;
|
|
189
|
+
'description.tour': string;
|
|
190
|
+
'checkbox.autoOpen': string;
|
|
191
|
+
'button.open': string;
|
|
192
|
+
};
|
|
183
193
|
};
|
|
184
194
|
'pt-BR': {
|
|
185
195
|
base: {
|
|
@@ -360,6 +370,16 @@ export declare const commonResources: {
|
|
|
360
370
|
'modal.title': string;
|
|
361
371
|
'error.uploading.image': string;
|
|
362
372
|
};
|
|
373
|
+
help: {
|
|
374
|
+
'modal.title': string;
|
|
375
|
+
'title.tutorials': string;
|
|
376
|
+
'title.tour': string;
|
|
377
|
+
'title.autoOpen': string;
|
|
378
|
+
'description.tutorials': string;
|
|
379
|
+
'description.tour': string;
|
|
380
|
+
'checkbox.autoOpen': string;
|
|
381
|
+
'button.open': string;
|
|
382
|
+
};
|
|
363
383
|
};
|
|
364
384
|
it: {
|
|
365
385
|
base: {
|
|
@@ -541,6 +561,16 @@ export declare const commonResources: {
|
|
|
541
561
|
'modal.title': string;
|
|
542
562
|
'error.uploading.image': string;
|
|
543
563
|
};
|
|
564
|
+
help: {
|
|
565
|
+
'modal.title': string;
|
|
566
|
+
'title.tutorials': string;
|
|
567
|
+
'title.tour': string;
|
|
568
|
+
'title.autoOpen': string;
|
|
569
|
+
'description.tutorials': string;
|
|
570
|
+
'description.tour': string;
|
|
571
|
+
'checkbox.autoOpen': string;
|
|
572
|
+
'button.open': string;
|
|
573
|
+
};
|
|
544
574
|
};
|
|
545
575
|
};
|
|
546
576
|
export default function commonLocalization(): void;
|
|
@@ -9,6 +9,7 @@ import { UploadTexts } from './localization/UploadTexts';
|
|
|
9
9
|
import { TreeTexts } from './localization/TreeTexts';
|
|
10
10
|
import { SentenceTexts } from './localization/SentenceTexts';
|
|
11
11
|
import { BaseTexts } from './localization/BaseTexts';
|
|
12
|
+
import { HelpTexts } from './localization/HelpTexts';
|
|
12
13
|
export const commonResources = {
|
|
13
14
|
en: {
|
|
14
15
|
base: BaseTexts.en,
|
|
@@ -19,6 +20,7 @@ export const commonResources = {
|
|
|
19
20
|
tree: TreeTexts.en,
|
|
20
21
|
sentence: SentenceTexts.en,
|
|
21
22
|
upload: UploadTexts.en,
|
|
23
|
+
help: HelpTexts.en,
|
|
22
24
|
},
|
|
23
25
|
'pt-BR': {
|
|
24
26
|
base: BaseTexts['pt-BR'],
|
|
@@ -29,6 +31,7 @@ export const commonResources = {
|
|
|
29
31
|
sentence: SentenceTexts['pt-BR'],
|
|
30
32
|
tree: TreeTexts['pt-BR'],
|
|
31
33
|
upload: UploadTexts['pt-BR'],
|
|
34
|
+
help: HelpTexts['pt-BR'],
|
|
32
35
|
},
|
|
33
36
|
it: {
|
|
34
37
|
base: BaseTexts.it,
|
|
@@ -39,6 +42,7 @@ export const commonResources = {
|
|
|
39
42
|
sentence: SentenceTexts.it,
|
|
40
43
|
tree: TreeTexts.it,
|
|
41
44
|
upload: UploadTexts.it,
|
|
45
|
+
help: HelpTexts.it,
|
|
42
46
|
},
|
|
43
47
|
};
|
|
44
48
|
export default function commonLocalization() {
|
|
@@ -1,9 +1,15 @@
|
|
|
1
1
|
declare function getActiveCorpus(): string | null;
|
|
2
2
|
declare function setActiveCorpus(corpus: string): void;
|
|
3
3
|
declare function removeActiveCorpus(): void;
|
|
4
|
+
declare function getTourAutoOpen(): boolean;
|
|
5
|
+
declare function setTourAutoOpen(value: boolean): void;
|
|
6
|
+
declare function removeTourAutoOpen(): void;
|
|
4
7
|
declare const Storage: {
|
|
5
8
|
getActiveCorpus: typeof getActiveCorpus;
|
|
6
9
|
setActiveCorpus: typeof setActiveCorpus;
|
|
7
10
|
removeActiveCorpus: typeof removeActiveCorpus;
|
|
11
|
+
getTourAutoOpen: typeof getTourAutoOpen;
|
|
12
|
+
setTourAutoOpen: typeof setTourAutoOpen;
|
|
13
|
+
removeTourAutoOpen: typeof removeTourAutoOpen;
|
|
8
14
|
};
|
|
9
15
|
export default Storage;
|
package/dist/configs/Storage.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
const ACTIVE_CORPUS = '@Tycho:corpus';
|
|
2
|
+
const TOUR_AUTO_OPEN = '@Tycho:tourAutoOpen';
|
|
2
3
|
function getActiveCorpus() {
|
|
3
4
|
return localStorage.getItem(ACTIVE_CORPUS);
|
|
4
5
|
}
|
|
@@ -8,9 +9,21 @@ function setActiveCorpus(corpus) {
|
|
|
8
9
|
function removeActiveCorpus() {
|
|
9
10
|
localStorage.removeItem(ACTIVE_CORPUS);
|
|
10
11
|
}
|
|
12
|
+
function getTourAutoOpen() {
|
|
13
|
+
return localStorage.getItem(TOUR_AUTO_OPEN) === 'true';
|
|
14
|
+
}
|
|
15
|
+
function setTourAutoOpen(value) {
|
|
16
|
+
localStorage.setItem(TOUR_AUTO_OPEN, String(value));
|
|
17
|
+
}
|
|
18
|
+
function removeTourAutoOpen() {
|
|
19
|
+
localStorage.removeItem(TOUR_AUTO_OPEN);
|
|
20
|
+
}
|
|
11
21
|
const Storage = {
|
|
12
22
|
getActiveCorpus,
|
|
13
23
|
setActiveCorpus,
|
|
14
24
|
removeActiveCorpus,
|
|
25
|
+
getTourAutoOpen,
|
|
26
|
+
setTourAutoOpen,
|
|
27
|
+
removeTourAutoOpen,
|
|
15
28
|
};
|
|
16
29
|
export default Storage;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export declare const HelpTexts: {
|
|
2
|
+
en: {
|
|
3
|
+
'modal.title': string;
|
|
4
|
+
'title.tutorials': string;
|
|
5
|
+
'title.tour': string;
|
|
6
|
+
'title.autoOpen': string;
|
|
7
|
+
'description.tutorials': string;
|
|
8
|
+
'description.tour': string;
|
|
9
|
+
'checkbox.autoOpen': string;
|
|
10
|
+
'button.open': string;
|
|
11
|
+
};
|
|
12
|
+
'pt-BR': {
|
|
13
|
+
'modal.title': string;
|
|
14
|
+
'title.tutorials': string;
|
|
15
|
+
'title.tour': string;
|
|
16
|
+
'title.autoOpen': string;
|
|
17
|
+
'description.tutorials': string;
|
|
18
|
+
'description.tour': string;
|
|
19
|
+
'checkbox.autoOpen': string;
|
|
20
|
+
'button.open': string;
|
|
21
|
+
};
|
|
22
|
+
it: {
|
|
23
|
+
'modal.title': string;
|
|
24
|
+
'title.tutorials': string;
|
|
25
|
+
'title.tour': string;
|
|
26
|
+
'title.autoOpen': string;
|
|
27
|
+
'description.tutorials': string;
|
|
28
|
+
'description.tour': string;
|
|
29
|
+
'checkbox.autoOpen': string;
|
|
30
|
+
'button.open': string;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export const HelpTexts = {
|
|
2
|
+
en: {
|
|
3
|
+
'modal.title': 'Help Center',
|
|
4
|
+
'title.tutorials': 'Tutorials',
|
|
5
|
+
'title.tour': 'Live Tour',
|
|
6
|
+
'title.autoOpen': 'Enable Auto-Open',
|
|
7
|
+
'description.tutorials': 'Access our comprehensive tutorials and documentation',
|
|
8
|
+
'description.tour': 'Start an interactive tour of the platform or enable it to open automatically',
|
|
9
|
+
'checkbox.autoOpen': 'Enable Auto-Open',
|
|
10
|
+
'button.open': 'Click to open',
|
|
11
|
+
},
|
|
12
|
+
'pt-BR': {
|
|
13
|
+
'modal.title': 'Central de Ajuda',
|
|
14
|
+
'title.tutorials': 'Tutoriais',
|
|
15
|
+
'title.tour': 'Tour ao Vivo',
|
|
16
|
+
'title.autoOpen': 'Ativar Abertura Automática',
|
|
17
|
+
'description.tutorials': 'Acesse nossos tutoriais abrangentes e documentação',
|
|
18
|
+
'description.tour': 'Inicie um tour interativo da plataforma ou ative para abrir automaticamente',
|
|
19
|
+
'checkbox.autoOpen': 'Ativar Abertura Automática',
|
|
20
|
+
'button.open': 'Clique para abrir',
|
|
21
|
+
},
|
|
22
|
+
it: {
|
|
23
|
+
'modal.title': 'Centro Assistenza',
|
|
24
|
+
'title.tutorials': 'Tutorial',
|
|
25
|
+
'title.tour': 'Tour Interattivo',
|
|
26
|
+
'title.autoOpen': 'Abilita Apertura Automatica',
|
|
27
|
+
'description.tutorials': 'Accedi ai nostri tutorial completi e alla documentazione',
|
|
28
|
+
'description.tour': 'Avvia un tour interattivo della piattaforma o abilitalo per aprirsi automaticamente',
|
|
29
|
+
'checkbox.autoOpen': 'Abilita Apertura Automatica',
|
|
30
|
+
'button.open': 'Clicca per aprire',
|
|
31
|
+
},
|
|
32
|
+
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tycho-components",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.2.
|
|
4
|
+
"version": "0.2.9",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
7
|
"exports": {
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"@fortawesome/free-solid-svg-icons": "^6.4.2",
|
|
22
22
|
"@fortawesome/react-fontawesome": "^0.2.0",
|
|
23
23
|
"@tanstack/react-table": "^8.20.6",
|
|
24
|
-
"axios": "^1.
|
|
24
|
+
"axios": "^1.13.2",
|
|
25
25
|
"classnames": "^2.5.1",
|
|
26
26
|
"cytoscape": "^3.28.1",
|
|
27
27
|
"cytoscape-node-edge-html-label": "^1.0.6",
|
|
@@ -79,6 +79,7 @@
|
|
|
79
79
|
"eslint-plugin-storybook": "^0.11.2",
|
|
80
80
|
"react": "^18.2.0",
|
|
81
81
|
"react-dom": "^18.2.0",
|
|
82
|
+
"sass": "^1.96.0",
|
|
82
83
|
"storybook": "^7.5.3",
|
|
83
84
|
"typescript": "^5.7.3"
|
|
84
85
|
},
|