tycho-components 0.33.1 → 0.35.0
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/common/AppCard/AppCard.d.ts +1 -1
- package/dist/common/AppClipboard/AppClipboard.d.ts +1 -1
- package/dist/common/AppColorpicker/AppColorpicker.d.ts +1 -1
- package/dist/common/AppConsent/AppConsent.d.ts +1 -1
- package/dist/common/AppCopyText/AppCopyText.d.ts +1 -1
- package/dist/common/AppDropzone/AppDropzone.d.ts +1 -1
- package/dist/common/AppDropzone/UploadService.d.ts +1 -1
- package/dist/common/AppDropzoneLocal/AppDropzoneLocal.d.ts +1 -1
- package/dist/common/AppEditable/AppEditable.d.ts +1 -1
- package/dist/common/AppForm/AppForm.d.ts +1 -1
- package/dist/common/AppForm/AppFormInfo.d.ts +1 -1
- package/dist/common/AppForm/FormColorField.d.ts +1 -1
- package/dist/common/AppKeyboard/AppKeyboard.d.ts +1 -1
- package/dist/common/AppLoading/AppLoading.d.ts +1 -1
- package/dist/common/AppModal/AppModal.d.ts +1 -1
- package/dist/common/AppModal/AppModalConfirm.d.ts +1 -1
- package/dist/common/AppModal/AppModalRemove.d.ts +1 -1
- package/dist/common/AppPagination/AppPagination.d.ts +1 -1
- package/dist/common/AppPicture/AppPicture.d.ts +1 -1
- package/dist/common/AppPlaceholder/AppPlaceholder.d.ts +1 -1
- package/dist/common/AppReplaceAll/AppReplaceAll.d.ts +1 -1
- package/dist/common/AppSwitchGroup/AppSwitchGroup.d.ts +1 -1
- package/dist/common/AppTable/AppTable.d.ts +1 -1
- package/dist/common/AppTable/AppTableList.d.ts +1 -1
- package/dist/common/AppTable/AppTableUtils.d.ts +4 -4
- package/dist/common/AppToast/AppToast.d.ts +1 -1
- package/dist/configs/CommonContext.d.ts +1 -1
- package/dist/configs/services/ProfileService.d.ts +1 -1
- package/dist/configs/useLoggedUtils.d.ts +2 -0
- package/dist/configs/useLoggedUtils.js +13 -0
- package/dist/features/Comments/CommentAdd.d.ts +1 -1
- package/dist/features/Comments/CommentInfo.d.ts +2 -1
- package/dist/features/Comments/CommentInfo.js +2 -2
- package/dist/features/Comments/CommentService.d.ts +8 -8
- package/dist/features/Comments/Comments.d.ts +1 -1
- package/dist/features/Comments/Comments.js +4 -4
- package/dist/features/Comments/HeaderNotifications/HeaderNotifications.d.ts +1 -1
- package/dist/features/CytoscapeMenu/CytoscapeMenuCanvas.d.ts +1 -1
- package/dist/features/Parameters/Parameters.d.ts +1 -2
- package/dist/features/SentenceView/SentenceEditionTiers.d.ts +1 -1
- package/dist/features/SentenceView/SentenceMorphemeTags.d.ts +1 -1
- package/dist/features/SentenceView/SentenceMorphemeTiers.d.ts +1 -1
- package/dist/features/SentenceView/SentenceTags.d.ts +1 -1
- package/dist/features/SentenceView/SentenceValues.d.ts +1 -1
- package/dist/features/SentenceView/SentenceView.d.ts +1 -1
- package/dist/features/SentenceView/SentenceWordTiers.d.ts +1 -1
- package/dist/features/TreeView/TreeView.d.ts +1 -1
- package/dist/features/TreeView/TreeViewSearch/TreeViewSearch.d.ts +1 -1
- package/dist/features/TreeView/TreeViewSearch/TreeViewSearchField.d.ts +1 -1
- package/dist/shell/Base/ErrorBoundary.d.ts +1 -1
- package/dist/shell/Base/ErrorFound.d.ts +1 -1
- package/dist/shell/Base/NotFound.d.ts +1 -1
- package/dist/shell/Base/Unauthorized.d.ts +1 -1
- package/dist/shell/Header/Header.d.ts +1 -1
- package/dist/shell/Header/HeaderApps/HeaderApps.d.ts +1 -1
- package/dist/shell/Header/HeaderApps/HeaderApps.js +3 -1
- package/dist/shell/Header/HeaderButtons/HeaderButtons.d.ts +1 -1
- package/dist/shell/Header/HeaderCorpora/HeaderCorpora.d.ts +1 -1
- package/dist/shell/Header/HeaderCorpora/HeaderCorpus.d.ts +1 -1
- package/dist/shell/Header/HeaderUser/HeaderUser.d.ts +1 -1
- package/dist/shell/Header/HelpButton/HelpButton.d.ts +1 -1
- package/dist/shell/Header/HelpButton/HelpModal.d.ts +1 -1
- package/dist/shell/Header/types/App.d.ts +1 -0
- package/dist/shell/Header/types/App.js +1 -0
- package/dist/shell/Header/types/CorpusService.d.ts +1 -1
- package/dist/shell/LanguageSelector/LanguageSelector.d.ts +1 -1
- package/dist/shell/VirtualKeyboard/VirtualKeyboard.d.ts +1 -1
- package/package.json +2 -2
|
@@ -9,5 +9,5 @@ type Props = {
|
|
|
9
9
|
className?: string;
|
|
10
10
|
onClick?: () => void;
|
|
11
11
|
};
|
|
12
|
-
export default function AppCard({ title, children, extraHeaderActions, footer, options, className, onClick, }: Props): import("react").JSX.Element;
|
|
12
|
+
export default function AppCard({ title, children, extraHeaderActions, footer, options, className, onClick, }: Props): import("react/jsx-runtime").JSX.Element;
|
|
13
13
|
export {};
|
|
@@ -6,5 +6,5 @@ type AppColorpickerProps = {
|
|
|
6
6
|
field: FormField;
|
|
7
7
|
handleSave: (value: FieldValue, field: FormField) => void;
|
|
8
8
|
};
|
|
9
|
-
export default function AppColorpicker({ field, item, handleSave, }: AppColorpickerProps): import("react").JSX.Element;
|
|
9
|
+
export default function AppColorpicker({ field, item, handleSave, }: AppColorpickerProps): import("react/jsx-runtime").JSX.Element;
|
|
10
10
|
export {};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { ConsentTexts } from '../../configs/localization/ConsentTexts';
|
|
2
2
|
export type ConsentSectionKey = keyof typeof ConsentTexts.en;
|
|
3
|
-
export default function AppConsent(): import("react").JSX.Element;
|
|
3
|
+
export default function AppConsent(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -7,5 +7,5 @@ export type Props = {
|
|
|
7
7
|
content: string;
|
|
8
8
|
titlePosition?: TitlePosition;
|
|
9
9
|
};
|
|
10
|
-
export default function AppCopyText({ className, title, content, titlePosition, }: Props): import("react").JSX.Element;
|
|
10
|
+
export default function AppCopyText({ className, title, content, titlePosition, }: Props): import("react/jsx-runtime").JSX.Element;
|
|
11
11
|
export {};
|
|
@@ -15,5 +15,5 @@ type Props = {
|
|
|
15
15
|
};
|
|
16
16
|
disableConfirm?: boolean;
|
|
17
17
|
};
|
|
18
|
-
export default function AppDropzone({ folder, onClose, onSuccess, onError, accept, messages, onDrop, keepName, title, alternativeButton, disableConfirm, }: Props): import("react").JSX.Element;
|
|
18
|
+
export default function AppDropzone({ folder, onClose, onSuccess, onError, accept, messages, onDrop, keepName, title, alternativeButton, disableConfirm, }: Props): import("react/jsx-runtime").JSX.Element;
|
|
19
19
|
export {};
|
|
@@ -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
|
};
|
|
@@ -11,5 +11,5 @@ type AppDropzoneLocalProps = {
|
|
|
11
11
|
action: () => void;
|
|
12
12
|
};
|
|
13
13
|
};
|
|
14
|
-
export default function AppDropzoneLocal({ onClose, onSuccess, onError, accept, onDrop, title, alternativeButton, }: AppDropzoneLocalProps): import("react").JSX.Element;
|
|
14
|
+
export default function AppDropzoneLocal({ onClose, onSuccess, onError, accept, onDrop, title, alternativeButton, }: AppDropzoneLocalProps): import("react/jsx-runtime").JSX.Element;
|
|
15
15
|
export {};
|
|
@@ -14,5 +14,5 @@ type Props = {
|
|
|
14
14
|
className?: string;
|
|
15
15
|
reference?: string;
|
|
16
16
|
};
|
|
17
|
-
export default function AppEditable({ translation, fields, item, save, group, className, reference, }: Props): import("react").JSX.Element;
|
|
17
|
+
export default function AppEditable({ translation, fields, item, save, group, className, reference, }: Props): import("react/jsx-runtime").JSX.Element;
|
|
18
18
|
export {};
|
|
@@ -12,5 +12,5 @@ type Props<TFieldValues extends FieldValues = FieldValues, TContext = any, TTran
|
|
|
12
12
|
runtimeLoadOptions?: Record<string, (query: string) => Promise<SelectItem[]>>;
|
|
13
13
|
twoColumns?: boolean;
|
|
14
14
|
};
|
|
15
|
-
export default function AppForm<TFieldValues extends FieldValues = FieldValues, TContext = any, TTransformedValues = TFieldValues>({ fields, form, prefix, onChangeFunctions, onBlurFunctions, runtimeOptions, runtimeLoadOptions, twoColumns, }: Props<TFieldValues, TContext, TTransformedValues>): import("react").JSX.Element;
|
|
15
|
+
export default function AppForm<TFieldValues extends FieldValues = FieldValues, TContext = any, TTransformedValues = TFieldValues>({ fields, form, prefix, onChangeFunctions, onBlurFunctions, runtimeOptions, runtimeLoadOptions, twoColumns, }: Props<TFieldValues, TContext, TTransformedValues>): import("react/jsx-runtime").JSX.Element;
|
|
16
16
|
export {};
|
|
@@ -5,5 +5,5 @@ type Props = {
|
|
|
5
5
|
data: Record<string, any>;
|
|
6
6
|
prefix?: string;
|
|
7
7
|
};
|
|
8
|
-
export default function AppFormInfo({ fields, data }: Props): import("react").JSX.Element;
|
|
8
|
+
export default function AppFormInfo({ fields, data }: Props): import("react/jsx-runtime").JSX.Element;
|
|
9
9
|
export {};
|
|
@@ -7,5 +7,5 @@ type Props<TFieldValues extends FieldValues = FieldValues, TContext = any, TTran
|
|
|
7
7
|
disabled?: boolean;
|
|
8
8
|
tooltipText?: string;
|
|
9
9
|
};
|
|
10
|
-
export default function FormColorField<TFieldValues extends FieldValues = FieldValues, TContext = any, TTransformedValues = TFieldValues>({ attr, label, form, disabled, tooltipText, }: Props<TFieldValues, TContext, TTransformedValues>): import("react").JSX.Element;
|
|
10
|
+
export default function FormColorField<TFieldValues extends FieldValues = FieldValues, TContext = any, TTransformedValues = TFieldValues>({ attr, label, form, disabled, tooltipText, }: Props<TFieldValues, TContext, TTransformedValues>): import("react/jsx-runtime").JSX.Element;
|
|
11
11
|
export {};
|
|
@@ -8,5 +8,5 @@ type Props = {
|
|
|
8
8
|
title?: string;
|
|
9
9
|
keyboardLayout?: string;
|
|
10
10
|
};
|
|
11
|
-
export default function AppKeyboard({ mode, buttonMode, size, iconSize, tooltipPlacement, title, keyboardLayout, }: Props): import("react").JSX.Element;
|
|
11
|
+
export default function AppKeyboard({ mode, buttonMode, size, iconSize, tooltipPlacement, title, keyboardLayout, }: Props): import("react/jsx-runtime").JSX.Element;
|
|
12
12
|
export {};
|
|
@@ -3,5 +3,5 @@ type Props = {
|
|
|
3
3
|
className?: string;
|
|
4
4
|
pageLoading?: boolean;
|
|
5
5
|
};
|
|
6
|
-
export default function AppLoading({ className, pageLoading, }: Props): import("react").JSX.Element;
|
|
6
|
+
export default function AppLoading({ className, pageLoading, }: Props): import("react/jsx-runtime").JSX.Element;
|
|
7
7
|
export {};
|
|
@@ -23,5 +23,5 @@ type Props = {
|
|
|
23
23
|
hideBackdrop?: boolean;
|
|
24
24
|
disableBackdropClose?: boolean;
|
|
25
25
|
};
|
|
26
|
-
export default function AppModal({ children, title, subtitle, className, close, confirm, disableConfirm, hideFooter, disableClose, disableEscapeClose, disableCancel, confirmLabel, closeLabel, cancel, onEntered, alternativeButton, hideBackdrop, alternativeOptions, disableBackdropClose, }: Props): import("react").JSX.Element;
|
|
26
|
+
export default function AppModal({ children, title, subtitle, className, close, confirm, disableConfirm, hideFooter, disableClose, disableEscapeClose, disableCancel, confirmLabel, closeLabel, cancel, onEntered, alternativeButton, hideBackdrop, alternativeOptions, disableBackdropClose, }: Props): import("react/jsx-runtime").JSX.Element;
|
|
27
27
|
export {};
|
|
@@ -11,5 +11,5 @@ type Props = {
|
|
|
11
11
|
disableBackdropClose?: boolean;
|
|
12
12
|
confirmDisabled?: boolean;
|
|
13
13
|
};
|
|
14
|
-
export default function AppModalConfirm({ title, subtitle, onClose, onConfirm, closeLabel, confirmLabel, confirmDisabled, disableClose, disableEscapeClose, disableBackdropClose, }: Props): import("react").JSX.Element;
|
|
14
|
+
export default function AppModalConfirm({ title, subtitle, onClose, onConfirm, closeLabel, confirmLabel, confirmDisabled, disableClose, disableEscapeClose, disableBackdropClose, }: Props): import("react/jsx-runtime").JSX.Element;
|
|
15
15
|
export {};
|
|
@@ -7,7 +7,7 @@ type Props = {
|
|
|
7
7
|
disableClose?: boolean;
|
|
8
8
|
disableEscapeClose?: boolean;
|
|
9
9
|
};
|
|
10
|
-
export default function AppModalRemove({ title, subtitle, onClose, onConfirm, disableClose, disableEscapeClose, }: Props): import("react").JSX.Element;
|
|
10
|
+
export default function AppModalRemove({ title, subtitle, onClose, onConfirm, disableClose, disableEscapeClose, }: Props): import("react/jsx-runtime").JSX.Element;
|
|
11
11
|
export declare const modalRemoveStyle: {
|
|
12
12
|
position: string;
|
|
13
13
|
top: string;
|
|
@@ -8,5 +8,5 @@ type Props<TData> = {
|
|
|
8
8
|
numItens?: number[];
|
|
9
9
|
size?: 'medium' | 'small';
|
|
10
10
|
};
|
|
11
|
-
export default function AppPagination<TData>({ totalElements, pagination, setPagination, hideItensPage, numItens, size, }: Props<TData>): import("react").JSX.Element;
|
|
11
|
+
export default function AppPagination<TData>({ totalElements, pagination, setPagination, hideItensPage, numItens, size, }: Props<TData>): import("react/jsx-runtime").JSX.Element;
|
|
12
12
|
export {};
|
|
@@ -6,5 +6,5 @@ type PictureProps = {
|
|
|
6
6
|
person?: boolean;
|
|
7
7
|
onClick?: () => void;
|
|
8
8
|
};
|
|
9
|
-
export default function AppPicture({ src, title, className, person, onClick, }: PictureProps): import("react").JSX.Element;
|
|
9
|
+
export default function AppPicture({ src, title, className, person, onClick, }: PictureProps): import("react/jsx-runtime").JSX.Element;
|
|
10
10
|
export {};
|
|
@@ -8,5 +8,5 @@ type Props = {
|
|
|
8
8
|
onClick?: () => void;
|
|
9
9
|
className?: string;
|
|
10
10
|
};
|
|
11
|
-
export default function AppPlaceholder({ text, desc, children, icon, useMarginTop, onClick, className, }: Props): import("react").JSX.Element;
|
|
11
|
+
export default function AppPlaceholder({ text, desc, children, icon, useMarginTop, onClick, className, }: Props): import("react/jsx-runtime").JSX.Element;
|
|
12
12
|
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import './style.scss';
|
|
2
|
-
export default function AppReplaceAll(): import("react").JSX.Element;
|
|
2
|
+
export default function AppReplaceAll(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -8,5 +8,5 @@ type Props<TFieldValues extends FieldValues = FieldValues, TContext = any, TTran
|
|
|
8
8
|
hasRole?: (role: string) => boolean;
|
|
9
9
|
className?: string;
|
|
10
10
|
};
|
|
11
|
-
export default function AppSwitchGroup<TFieldValues extends FieldValues = FieldValues, TContext = any, TTransformedValues = TFieldValues>({ fields, form, onToggle, hasRole, className, }: Props<TFieldValues, TContext, TTransformedValues>): import("react").JSX.Element;
|
|
11
|
+
export default function AppSwitchGroup<TFieldValues extends FieldValues = FieldValues, TContext = any, TTransformedValues = TFieldValues>({ fields, form, onToggle, hasRole, className, }: Props<TFieldValues, TContext, TTransformedValues>): import("react/jsx-runtime").JSX.Element;
|
|
12
12
|
export {};
|
|
@@ -15,5 +15,5 @@ type Props = {
|
|
|
15
15
|
hiddenColumns?: string[];
|
|
16
16
|
numItens?: number[];
|
|
17
17
|
};
|
|
18
|
-
export default function AppTable({ columns, data, pagination, setPagination, sorting, setSorting, className, onClickRow, onMouseEnter, onMouseLeave, hiddenColumns, numItens, }: Props): import("react").JSX.Element;
|
|
18
|
+
export default function AppTable({ columns, data, pagination, setPagination, sorting, setSorting, className, onClickRow, onMouseEnter, onMouseLeave, hiddenColumns, numItens, }: Props): import("react/jsx-runtime").JSX.Element;
|
|
19
19
|
export {};
|
|
@@ -10,5 +10,5 @@ type Props = {
|
|
|
10
10
|
hiddenColumns?: string[];
|
|
11
11
|
filter?: [string, string];
|
|
12
12
|
};
|
|
13
|
-
export default function AppTableList({ columns, data, className, onClickRow, onMouseEnter, onMouseLeave, hiddenColumns, filter, }: Props): import("react").JSX.Element;
|
|
13
|
+
export default function AppTableList({ columns, data, className, onClickRow, onMouseEnter, onMouseLeave, hiddenColumns, filter, }: Props): import("react/jsx-runtime").JSX.Element;
|
|
14
14
|
export {};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
declare const AppTableUtils: {
|
|
2
2
|
limitCharacters: (attr: string, props: any, max: number) => any;
|
|
3
|
-
addCenteredHeader: (header: string) => import("react").JSX.Element;
|
|
4
|
-
addCenteredCell: (attr: string, props: any) => import("react").JSX.Element;
|
|
5
|
-
addEnumBadge: (attr: string, props: any, append: string, t: any) => import("react").JSX.Element;
|
|
6
|
-
addSimpleCell: (value: any) => import("react").JSX.Element;
|
|
3
|
+
addCenteredHeader: (header: string) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
addCenteredCell: (attr: string, props: any) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
addEnumBadge: (attr: string, props: any, append: string, t: any) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
addSimpleCell: (value: any) => import("react/jsx-runtime").JSX.Element;
|
|
7
7
|
};
|
|
8
8
|
export default AppTableUtils;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import 'react-toastify/dist/ReactToastify.css';
|
|
2
|
-
export default function AppToast(): import("react").JSX.Element;
|
|
2
|
+
export default function AppToast(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -6,5 +6,5 @@ type ContextType = {
|
|
|
6
6
|
declare const CommonContext: import("react").Context<ContextType>;
|
|
7
7
|
export declare function CommonProvider({ children }: {
|
|
8
8
|
children: React.ReactNode;
|
|
9
|
-
}): import("react").JSX.Element;
|
|
9
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
10
10
|
export default CommonContext;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare function updateLiveTour(liveTour: boolean): Promise<import("axios").AxiosResponse<string, any, {}
|
|
1
|
+
declare function updateLiveTour(liveTour: boolean): Promise<import("axios").AxiosResponse<string, any, {}>>;
|
|
2
2
|
declare const ProfileService: {
|
|
3
3
|
updateLiveTour: typeof updateLiveTour;
|
|
4
4
|
};
|
|
@@ -5,6 +5,8 @@ export declare const useLoggedUtils: () => {
|
|
|
5
5
|
isLogged: () => boolean;
|
|
6
6
|
setLogged: (user: User | undefined) => void;
|
|
7
7
|
isAdminOfAnyCorpus: () => boolean;
|
|
8
|
+
isEditorOfAnyCorpus: () => boolean;
|
|
9
|
+
canEditCorpus: (corpusUid: string) => boolean;
|
|
8
10
|
hasLexiconAccess: (lexiconUid: string, roles?: string[]) => boolean;
|
|
9
11
|
hasParserAccess: (parserUid: string, roles?: string[]) => boolean;
|
|
10
12
|
hasCorpusAccess: (corpusUid: string, roles?: string[]) => boolean;
|
|
@@ -33,6 +33,14 @@ export const useLoggedUtils = () => {
|
|
|
33
33
|
return false;
|
|
34
34
|
return user.permissions.some((permission) => /^ROLE_ADMIN_CORPUS_[\w-]+$/.test(permission));
|
|
35
35
|
};
|
|
36
|
+
const isEditorOfAnyCorpus = () => {
|
|
37
|
+
if (isSuper())
|
|
38
|
+
return true;
|
|
39
|
+
const user = getLogged();
|
|
40
|
+
if (!user || !user.permissions)
|
|
41
|
+
return false;
|
|
42
|
+
return user.permissions.some((permission) => /^ROLE_(ADMIN|EDITOR)_CORPUS_[\w-]+$/.test(permission));
|
|
43
|
+
};
|
|
36
44
|
const hasParserAccess = (parserUid, roles) => {
|
|
37
45
|
if (isSuper())
|
|
38
46
|
return true;
|
|
@@ -63,6 +71,9 @@ export const useLoggedUtils = () => {
|
|
|
63
71
|
const re = new RegExp(`^ROLE_${roleSegmentForRegex(roles)}_CORPUS_${id}$`);
|
|
64
72
|
return user.permissions.some((permission) => re.test(permission));
|
|
65
73
|
};
|
|
74
|
+
const canEditCorpus = (corpusUid) => {
|
|
75
|
+
return hasCorpusAccess(corpusUid, ['ADMIN', 'EDITOR']);
|
|
76
|
+
};
|
|
66
77
|
const hasAnyParserAccess = () => {
|
|
67
78
|
if (isSuper())
|
|
68
79
|
return true;
|
|
@@ -93,6 +104,8 @@ export const useLoggedUtils = () => {
|
|
|
93
104
|
isLogged,
|
|
94
105
|
setLogged,
|
|
95
106
|
isAdminOfAnyCorpus,
|
|
107
|
+
isEditorOfAnyCorpus,
|
|
108
|
+
canEditCorpus,
|
|
96
109
|
hasLexiconAccess,
|
|
97
110
|
hasParserAccess,
|
|
98
111
|
hasCorpusAccess,
|
|
@@ -12,5 +12,5 @@ type Props = {
|
|
|
12
12
|
onClose: () => void;
|
|
13
13
|
onChange: (r: Comment) => void;
|
|
14
14
|
};
|
|
15
|
-
export default function CommentAdd({ uid, mode, users, references, keywords, comment, reply, onClose, onChange, }: Props): import("react").JSX.Element;
|
|
15
|
+
export default function CommentAdd({ uid, mode, users, references, keywords, comment, reply, onClose, onChange, }: Props): import("react/jsx-runtime").JSX.Element;
|
|
16
16
|
export {};
|
|
@@ -2,10 +2,11 @@ import './style.scss';
|
|
|
2
2
|
import { Comment } from './types/Comment';
|
|
3
3
|
type Props = {
|
|
4
4
|
comment: Comment;
|
|
5
|
+
hasEditAccess?: boolean;
|
|
5
6
|
onRemove: () => void;
|
|
6
7
|
onUpdate: (c: Comment) => void;
|
|
7
8
|
onEdit: () => void;
|
|
8
9
|
onReply: () => void;
|
|
9
10
|
};
|
|
10
|
-
export default function CommentInfo({ comment, onRemove, onUpdate, onEdit, onReply, }: Props): import("react").JSX.Element;
|
|
11
|
+
export default function CommentInfo({ comment, hasEditAccess, onRemove, onUpdate, onEdit, onReply, }: Props): import("react/jsx-runtime").JSX.Element;
|
|
11
12
|
export {};
|
|
@@ -6,7 +6,7 @@ import CommonContext from '../../configs/CommonContext';
|
|
|
6
6
|
import DateUtils from '../../functions/DateUtils';
|
|
7
7
|
import './style.scss';
|
|
8
8
|
import CommentService from './CommentService';
|
|
9
|
-
export default function CommentInfo({ comment, onRemove, onUpdate, onEdit, onReply, }) {
|
|
9
|
+
export default function CommentInfo({ comment, hasEditAccess = true, onRemove, onUpdate, onEdit, onReply, }) {
|
|
10
10
|
const { t } = useTranslation('comments');
|
|
11
11
|
const { state } = useContext(CommonContext);
|
|
12
12
|
const handleMarkRead = () => {
|
|
@@ -27,5 +27,5 @@ export default function CommentInfo({ comment, onRemove, onUpdate, onEdit, onRep
|
|
|
27
27
|
return false;
|
|
28
28
|
return !requested.read;
|
|
29
29
|
};
|
|
30
|
-
return (_jsxs("div", { className: "comment", children: [_jsxs("div", { className: "top", children: [_jsx(Avatar, { title: comment.name, src: comment.picture, size: comment.reply ? 'small' : 'medium' }), _jsx("div", { className: "name", children: comment.name }), _jsxs("div", { className: "buttons", children: [!comment.reply && (_jsx(IconButton, { size: "small", onClick: onReply, title: t('tooltip.reply'), name: "reply" })), state.logged?.uid === comment.user && (_jsxs(_Fragment, { children: [_jsx(IconButton, { size: comment.reply ? 'x-small' : 'small', onClick: onEdit, title: t('tooltip.edit'), name: "edit" }), _jsx(IconButton, { size: comment.reply ? 'x-small' : 'small', onClick: handleRemove, title: t('tooltip.delete'), name: "delete" })] })), isNotRead(comment) && (_jsx(IconButton, { size: comment.reply ? 'x-small' : 'small', onClick: handleMarkRead, title: t('tooltip.read'), name: "check_circle" }))] })] }), _jsxs("div", { className: "content", children: [comment.title && _jsx("div", { className: "title", children: comment.title }), _jsx("div", { className: "text", children: comment.value }), comment.requested && (_jsxs("div", { className: "date", children: [_jsx("span", { className: "me-1", children: t('label.requested.to') }), _jsx("span", { children: comment.requested.map((e) => e.name).join(', ') })] })), _jsxs("div", { className: "date", children: [_jsx("span", { className: "me-1", children: t('label.posted.on') }), _jsx("span", { className: "me-1", children: DateUtils.formatDateTime(comment.edited ? comment.edited : comment.date, 'MM/dd/yyyy - HH:mm') }), comment.edited && _jsx("i", { children: t('label.edited') })] })] })] }));
|
|
30
|
+
return (_jsxs("div", { className: "comment", children: [_jsxs("div", { className: "top", children: [_jsx(Avatar, { title: comment.name, src: comment.picture, size: comment.reply ? 'small' : 'medium' }), _jsx("div", { className: "name", children: comment.name }), _jsxs("div", { className: "buttons", children: [hasEditAccess && !comment.reply && (_jsx(IconButton, { size: "small", onClick: onReply, title: t('tooltip.reply'), name: "reply" })), hasEditAccess && state.logged?.uid === comment.user && (_jsxs(_Fragment, { children: [_jsx(IconButton, { size: comment.reply ? 'x-small' : 'small', onClick: onEdit, title: t('tooltip.edit'), name: "edit" }), _jsx(IconButton, { size: comment.reply ? 'x-small' : 'small', onClick: handleRemove, title: t('tooltip.delete'), name: "delete" })] })), isNotRead(comment) && (_jsx(IconButton, { size: comment.reply ? 'x-small' : 'small', onClick: handleMarkRead, title: t('tooltip.read'), name: "check_circle" }))] })] }), _jsxs("div", { className: "content", children: [comment.title && _jsx("div", { className: "title", children: comment.title }), _jsx("div", { className: "text", children: comment.value }), comment.requested && (_jsxs("div", { className: "date", children: [_jsx("span", { className: "me-1", children: t('label.requested.to') }), _jsx("span", { children: comment.requested.map((e) => e.name).join(', ') })] })), _jsxs("div", { className: "date", children: [_jsx("span", { className: "me-1", children: t('label.posted.on') }), _jsx("span", { className: "me-1", children: DateUtils.formatDateTime(comment.edited ? comment.edited : comment.date, 'MM/dd/yyyy - HH:mm') }), comment.edited && _jsx("i", { children: t('label.edited') })] })] })] }));
|
|
31
31
|
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { User } from '../../configs/types/User';
|
|
2
2
|
import { Comment, CommentRequest } from './types/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;
|
|
@@ -8,5 +8,5 @@ type Props = {
|
|
|
8
8
|
mode: 'lexicon' | 'corpus' | 'parser';
|
|
9
9
|
onChange?: (a: Comment[]) => void;
|
|
10
10
|
};
|
|
11
|
-
export default function Comments({ uid, keywords, references, mode, onClose, onChange, }: Props): import("react").JSX.Element;
|
|
11
|
+
export default function Comments({ uid, keywords, references, mode, onClose, onChange, }: Props): import("react/jsx-runtime").JSX.Element;
|
|
12
12
|
export {};
|
|
@@ -34,7 +34,7 @@ export default function Comments({ uid, keywords, references, mode, onClose, onC
|
|
|
34
34
|
};
|
|
35
35
|
const hasEditAccess = useMemo(() => {
|
|
36
36
|
return SecurityUtils.hasAccess(uid, ['ADMIN', 'EDITOR'], mode);
|
|
37
|
-
}, [uid]);
|
|
37
|
+
}, [uid, mode]);
|
|
38
38
|
const hasReplies = (thisComment) => comments && comments.some((c) => c.reply === thisComment.id);
|
|
39
39
|
const getReplies = (thisComment) => comments?.filter((c) => c.reply === thisComment.id) || [];
|
|
40
40
|
useEffect(() => {
|
|
@@ -43,7 +43,7 @@ export default function Comments({ uid, keywords, references, mode, onClose, onC
|
|
|
43
43
|
return (_jsx(Drawer, { anchor: "right", open: true, onClose: onClose, children: !comments ? (_jsx(AppLoading, {})) : (_jsxs("div", { className: "comments-container", id: "comment-top", children: [_jsxs("div", { className: "header", children: [_jsx(IconButton, { name: "close", size: "small", mode: "ghost", onClick: onClose }), _jsx("span", { className: "title", children: t('label.title.comments') }), _jsx("div", { className: "actions", children: hasEditAccess && (_jsx(Button, { text: t('button.add'), icon: "add", mode: "outlined", size: "small", className: "edit-button", onClick: () => {
|
|
44
44
|
setComment(undefined);
|
|
45
45
|
setOpenAddComment(!openAddComment);
|
|
46
|
-
} })) })] }), _jsxs("div", { className: "body", children: [openAddComment && (_jsx(CommentAdd, { uid: uid, mode: mode, users: users, references: references, keywords: keywords, comment: comment, reply: reply, onClose: () => {
|
|
46
|
+
} })) })] }), _jsxs("div", { className: "body", children: [hasEditAccess && openAddComment && (_jsx(CommentAdd, { uid: uid, mode: mode, users: users, references: references, keywords: keywords, comment: comment, reply: reply, onClose: () => {
|
|
47
47
|
setComment(undefined);
|
|
48
48
|
setReply(undefined);
|
|
49
49
|
setOpenAddComment(false);
|
|
@@ -59,7 +59,7 @@ export default function Comments({ uid, keywords, references, mode, onClose, onC
|
|
|
59
59
|
setComments(updated);
|
|
60
60
|
onChange?.(updated);
|
|
61
61
|
}
|
|
62
|
-
} })), comments?.length === 0 && (_jsx(AppPlaceholder, { text: t('placeholder.comments.empty') })), comments?.map((el, idx) => (_jsxs("div", { className: "thread", children: [!el.reply && (_jsx(CommentInfo, { comment: el, onRemove: () => {
|
|
62
|
+
} })), comments?.length === 0 && (_jsx(AppPlaceholder, { text: t('placeholder.comments.empty') })), comments?.map((el, idx) => (_jsxs("div", { className: "thread", children: [!el.reply && (_jsx(CommentInfo, { comment: el, hasEditAccess: hasEditAccess, onRemove: () => {
|
|
63
63
|
const updated = comments?.filter((c) => c.id !== el.id);
|
|
64
64
|
setComments(updated);
|
|
65
65
|
onChange && onChange(updated || []);
|
|
@@ -75,7 +75,7 @@ export default function Comments({ uid, keywords, references, mode, onClose, onC
|
|
|
75
75
|
setReply(el);
|
|
76
76
|
setOpenAddComment(true);
|
|
77
77
|
UsabilityUtils.goToAnchor('comment-top');
|
|
78
|
-
} })), hasReplies(el) && (_jsx("div", { className: "replies", children: getReplies(el).map((rel, idy) => (_jsx(CommentInfo, { comment: rel, onRemove: () => {
|
|
78
|
+
} })), hasReplies(el) && (_jsx("div", { className: "replies", children: getReplies(el).map((rel, idy) => (_jsx(CommentInfo, { comment: rel, hasEditAccess: hasEditAccess, onRemove: () => {
|
|
79
79
|
const updated = comments?.filter((c) => c.id !== rel.id);
|
|
80
80
|
setComments(updated);
|
|
81
81
|
onChange && onChange(updated || []);
|
|
@@ -4,5 +4,5 @@ type Props = {
|
|
|
4
4
|
mode: 'lexicon' | 'corpus' | 'parser';
|
|
5
5
|
mobile?: boolean;
|
|
6
6
|
};
|
|
7
|
-
export default function HeaderNotifications({ uid, mode, mobile }: Props): import("react").JSX.Element | null;
|
|
7
|
+
export default function HeaderNotifications({ uid, mode, mobile }: Props): import("react/jsx-runtime").JSX.Element | null;
|
|
8
8
|
export {};
|
|
@@ -15,4 +15,4 @@ export interface CytoscapeMenuCanvasProps {
|
|
|
15
15
|
/** Container height */
|
|
16
16
|
height?: string | number;
|
|
17
17
|
}
|
|
18
|
-
export default function CytoscapeMenuCanvas({ id, elements, menuItems, onReady, contextMenuOptions, height, }: CytoscapeMenuCanvasProps): import("react").JSX.Element;
|
|
18
|
+
export default function CytoscapeMenuCanvas({ id, elements, menuItems, onReady, contextMenuOptions, height, }: CytoscapeMenuCanvasProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import './style.scss';
|
|
3
2
|
type Props = {
|
|
4
3
|
parameters: Record<string, unknown>;
|
|
5
4
|
onChange: (field: string, value: boolean) => void;
|
|
6
5
|
};
|
|
7
|
-
export default function Parameters({ parameters, onChange }: Props):
|
|
6
|
+
export default function Parameters({ parameters, onChange }: Props): import("react/jsx-runtime").JSX.Element;
|
|
8
7
|
export {};
|
|
@@ -6,5 +6,5 @@ type Props = {
|
|
|
6
6
|
displayOriginal?: boolean;
|
|
7
7
|
corpus?: Corpus | null;
|
|
8
8
|
};
|
|
9
|
-
export default function SentenceEditionTiers({ tokens, displayOriginal, corpus, }: Props): import("react").JSX.Element;
|
|
9
|
+
export default function SentenceEditionTiers({ tokens, displayOriginal, corpus, }: Props): import("react/jsx-runtime").JSX.Element;
|
|
10
10
|
export {};
|
|
@@ -2,5 +2,5 @@ import { Token } from '../../configs/types/Struct';
|
|
|
2
2
|
type Props = {
|
|
3
3
|
tokens: Token[];
|
|
4
4
|
};
|
|
5
|
-
export default function SentenceMorphemeTags({ tokens }: Props): import("react").JSX.Element;
|
|
5
|
+
export default function SentenceMorphemeTags({ tokens }: Props): import("react/jsx-runtime").JSX.Element;
|
|
6
6
|
export {};
|
|
@@ -5,5 +5,5 @@ type Props = {
|
|
|
5
5
|
struct: Struct;
|
|
6
6
|
morphemeTiers: Parameter[];
|
|
7
7
|
};
|
|
8
|
-
export default function SentenceMorphemeTiers({ struct, morphemeTiers, }: Props): import("react").JSX.Element;
|
|
8
|
+
export default function SentenceMorphemeTiers({ struct, morphemeTiers, }: Props): import("react/jsx-runtime").JSX.Element;
|
|
9
9
|
export {};
|
|
@@ -2,5 +2,5 @@ import { Token } from '../../configs/types/Struct';
|
|
|
2
2
|
type Props = {
|
|
3
3
|
tokens: Token[];
|
|
4
4
|
};
|
|
5
|
-
export default function SentenceTags({ tokens }: Props): import("react").JSX.Element;
|
|
5
|
+
export default function SentenceTags({ tokens }: Props): import("react/jsx-runtime").JSX.Element;
|
|
6
6
|
export {};
|
|
@@ -2,5 +2,5 @@ import { Token } from '../../configs/types/Struct';
|
|
|
2
2
|
type Props = {
|
|
3
3
|
tokens: Token[];
|
|
4
4
|
};
|
|
5
|
-
export default function SentenceView({ tokens }: Props): import("react").JSX.Element;
|
|
5
|
+
export default function SentenceView({ tokens }: Props): import("react/jsx-runtime").JSX.Element;
|
|
6
6
|
export {};
|
|
@@ -9,5 +9,5 @@ type Props = {
|
|
|
9
9
|
useEditionTiers?: boolean;
|
|
10
10
|
displayOriginal?: boolean;
|
|
11
11
|
};
|
|
12
|
-
export default function SentenceView({ wordTiers, morphemeTiers, struct, useMorphemes, useEditionTiers, displayOriginal, }: Props): import("react").JSX.Element;
|
|
12
|
+
export default function SentenceView({ wordTiers, morphemeTiers, struct, useMorphemes, useEditionTiers, displayOriginal, }: Props): import("react/jsx-runtime").JSX.Element;
|
|
13
13
|
export {};
|
|
@@ -4,5 +4,5 @@ type Props = {
|
|
|
4
4
|
tokens: Token[];
|
|
5
5
|
wordTiers: Parameter[];
|
|
6
6
|
};
|
|
7
|
-
export default function SentenceWordTiers({ tokens, wordTiers }: Props): import("react").JSX.Element;
|
|
7
|
+
export default function SentenceWordTiers({ tokens, wordTiers }: Props): import("react/jsx-runtime").JSX.Element;
|
|
8
8
|
export {};
|
|
@@ -14,5 +14,5 @@ type Props = {
|
|
|
14
14
|
onExpand?: () => void;
|
|
15
15
|
onReadyCustom?: (thisCy: Core) => void;
|
|
16
16
|
};
|
|
17
|
-
export default function TreeView({ struct, expression, selector, translations, wheelSensitivity, renderWithInfo, placeholder, cyRef, onClickExpression, onExpand, onReadyCustom, }: Props): import("react").JSX.Element;
|
|
17
|
+
export default function TreeView({ struct, expression, selector, translations, wheelSensitivity, renderWithInfo, placeholder, cyRef, onClickExpression, onExpand, onReadyCustom, }: Props): import("react/jsx-runtime").JSX.Element;
|
|
18
18
|
export {};
|
|
@@ -14,5 +14,5 @@ type Props = {
|
|
|
14
14
|
searchCriteria: SearchCriteria;
|
|
15
15
|
setSearchCriteria: React.Dispatch<React.SetStateAction<SearchCriteria>>;
|
|
16
16
|
};
|
|
17
|
-
export default function TreeViewSearch({ struct, cy, onClose, searchCriteria, setSearchCriteria, }: Props): import("react").JSX.Element;
|
|
17
|
+
export default function TreeViewSearch({ struct, cy, onClose, searchCriteria, setSearchCriteria, }: Props): import("react/jsx-runtime").JSX.Element;
|
|
18
18
|
export {};
|
|
@@ -7,5 +7,5 @@ type Props = {
|
|
|
7
7
|
onAddBadge: () => void;
|
|
8
8
|
onRemoveBadge: (index: number) => void;
|
|
9
9
|
};
|
|
10
|
-
export default function TreeViewSearchField({ label, value, badges, onValueChange, onAddBadge, onRemoveBadge, }: Props): import("react").JSX.Element;
|
|
10
|
+
export default function TreeViewSearchField({ label, value, badges, onValueChange, onAddBadge, onRemoveBadge, }: Props): import("react/jsx-runtime").JSX.Element;
|
|
11
11
|
export {};
|
|
@@ -3,5 +3,5 @@ import './style.scss';
|
|
|
3
3
|
type Props = {
|
|
4
4
|
children: ReactNode;
|
|
5
5
|
};
|
|
6
|
-
export default function ErrorBoundary({ children }: Props): import("react").JSX.Element;
|
|
6
|
+
export default function ErrorBoundary({ children }: Props): import("react/jsx-runtime").JSX.Element;
|
|
7
7
|
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import './style.scss';
|
|
2
|
-
export default function ErrorFound(): import("react").JSX.Element;
|
|
2
|
+
export default function ErrorFound(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import './style.scss';
|
|
2
|
-
export default function NotFound(): import("react").JSX.Element;
|
|
2
|
+
export default function NotFound(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import './style.scss';
|
|
2
|
-
export default function Unauthorized(): import("react").JSX.Element;
|
|
2
|
+
export default function Unauthorized(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -23,5 +23,5 @@ type Props = {
|
|
|
23
23
|
hideLanguageSelector?: boolean;
|
|
24
24
|
hideHelpButton?: boolean;
|
|
25
25
|
};
|
|
26
|
-
export default function Header({ tool, redirect, autoload, hideKeyboard, customHeader, notifications, keyboardLayout, navigateHome, navigateCorpora, navigateLogout, navigateNotLogged, helpActions, useOpenCorpora, hideCorpora, hideNotifications, hideLanguageSelector, hideHelpButton, }: Props): import("react").JSX.Element;
|
|
26
|
+
export default function Header({ tool, redirect, autoload, hideKeyboard, customHeader, notifications, keyboardLayout, navigateHome, navigateCorpora, navigateLogout, navigateNotLogged, helpActions, useOpenCorpora, hideCorpora, hideNotifications, hideLanguageSelector, hideHelpButton, }: Props): import("react/jsx-runtime").JSX.Element;
|
|
27
27
|
export {};
|
|
@@ -11,5 +11,5 @@ type Props = {
|
|
|
11
11
|
keyboardLayout?: string;
|
|
12
12
|
helpActions?: HelpAction[];
|
|
13
13
|
};
|
|
14
|
-
export default function HeaderApps({ navigateLogout, navigateNotLogged, hideKeyboard, notifications, keyboardLayout, helpActions, }: Props): import("react").JSX.Element;
|
|
14
|
+
export default function HeaderApps({ navigateLogout, navigateNotLogged, hideKeyboard, notifications, keyboardLayout, helpActions, }: Props): import("react/jsx-runtime").JSX.Element;
|
|
15
15
|
export {};
|
|
@@ -14,7 +14,7 @@ import "./style.scss";
|
|
|
14
14
|
export default function HeaderApps({ navigateLogout, navigateNotLogged, hideKeyboard, notifications, keyboardLayout, helpActions, }) {
|
|
15
15
|
const { t } = useTranslation("header-app");
|
|
16
16
|
const { getCorpus, hasCorpus } = useCorpusUtils();
|
|
17
|
-
const { isAdminOfAnyCorpus, isLogged } = useLoggedUtils();
|
|
17
|
+
const { isAdminOfAnyCorpus, isEditorOfAnyCorpus, isLogged } = useLoggedUtils();
|
|
18
18
|
const [open, setOpen] = useState(false);
|
|
19
19
|
const goto = (app, blank) => {
|
|
20
20
|
const shouldAppendCorpusUid = app.appendCorpusUid !== false;
|
|
@@ -33,6 +33,8 @@ export default function HeaderApps({ navigateLogout, navigateNotLogged, hideKeyb
|
|
|
33
33
|
return null;
|
|
34
34
|
if (item.admin && !isAdminOfAnyCorpus())
|
|
35
35
|
return null;
|
|
36
|
+
if (item.editor && !isEditorOfAnyCorpus())
|
|
37
|
+
return null;
|
|
36
38
|
return (_jsxs("div", { className: "item", title: t(`${item.code}.desc`), onClick: () => goto(item, item.external ? true : false), children: [item.icon && _jsx(Icon, { name: item.icon, size: "medium" }), item.image && _jsx("img", { src: item.image }), _jsx("span", { className: "title-app", children: t(`${item.code}.name`) }), _jsxs("div", { className: "options", children: [item.visibility && (_jsx(Tag, { text: t(`common:label.${item.visibility}`), size: "small", color: "green", className: "d-none" })), _jsx(IconButton, { name: "open_in_new", size: "x-small", className: "icon-open", mode: "ghost", onClick: (e) => {
|
|
37
39
|
e.stopPropagation();
|
|
38
40
|
goto(item, true);
|
|
@@ -15,5 +15,5 @@ type Props = {
|
|
|
15
15
|
hideLanguageSelector?: boolean;
|
|
16
16
|
hideHelpButton?: boolean;
|
|
17
17
|
};
|
|
18
|
-
export default function HeaderButtons({ hideKeyboard, notifications, keyboardLayout, helpActions, mobile, hideNotifications, hideLanguageSelector, hideHelpButton, }: Props): import("react").JSX.Element;
|
|
18
|
+
export default function HeaderButtons({ hideKeyboard, notifications, keyboardLayout, helpActions, mobile, hideNotifications, hideLanguageSelector, hideHelpButton, }: Props): import("react/jsx-runtime").JSX.Element;
|
|
19
19
|
export {};
|
|
@@ -5,5 +5,5 @@ type Props = {
|
|
|
5
5
|
redirect?: string;
|
|
6
6
|
useOpenCorpora: boolean;
|
|
7
7
|
};
|
|
8
|
-
export default function HeaderCorpora({ navigateCorpora, redirect, autoload, useOpenCorpora, }: Props): import("react").JSX.Element;
|
|
8
|
+
export default function HeaderCorpora({ navigateCorpora, redirect, autoload, useOpenCorpora, }: Props): import("react/jsx-runtime").JSX.Element;
|
|
9
9
|
export {};
|
|
@@ -5,5 +5,5 @@ type Props = {
|
|
|
5
5
|
navigateNotLogged: () => void;
|
|
6
6
|
helpActions?: HelpAction[];
|
|
7
7
|
};
|
|
8
|
-
export default function HeaderUser({ navigateLogout, navigateNotLogged, helpActions, }: Props): import("react").JSX.Element;
|
|
8
|
+
export default function HeaderUser({ navigateLogout, navigateNotLogged, helpActions, }: Props): import("react/jsx-runtime").JSX.Element;
|
|
9
9
|
export {};
|
|
@@ -13,5 +13,5 @@ type Props = {
|
|
|
13
13
|
tooltipPlacement?: TooltipPlacements;
|
|
14
14
|
title?: string;
|
|
15
15
|
};
|
|
16
|
-
export default function HelpButton({ helpActions, mobile, mode, size, iconSize, tooltipPlacement, title, }: Props): import("react").JSX.Element;
|
|
16
|
+
export default function HelpButton({ helpActions, mobile, mode, size, iconSize, tooltipPlacement, title, }: Props): import("react/jsx-runtime").JSX.Element;
|
|
17
17
|
export {};
|
|
@@ -4,5 +4,5 @@ type Props = {
|
|
|
4
4
|
onClose: () => void;
|
|
5
5
|
helpActions?: HelpAction[];
|
|
6
6
|
};
|
|
7
|
-
export default function HelpModal({ onClose, helpActions }: Props): import("react").JSX.Element;
|
|
7
|
+
export default function HelpModal({ onClose, helpActions }: Props): import("react/jsx-runtime").JSX.Element;
|
|
8
8
|
export {};
|
|
@@ -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
|
};
|
|
@@ -21,4 +21,4 @@ export type AvailableLanguage = {
|
|
|
21
21
|
name: string;
|
|
22
22
|
};
|
|
23
23
|
export declare const AvailableLanguages: AvailableLanguage[];
|
|
24
|
-
export default function LanguageSelector({ className, color, size, showFullLanguageLabel, openToTop, mobile, renderMode, itemLabel, }: Props): import("react").JSX.Element | null;
|
|
24
|
+
export default function LanguageSelector({ className, color, size, showFullLanguageLabel, openToTop, mobile, renderMode, itemLabel, }: Props): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -5,5 +5,5 @@ type Props = {
|
|
|
5
5
|
defaultLayout: string;
|
|
6
6
|
closeLabel: string;
|
|
7
7
|
};
|
|
8
|
-
export default function VirtualKeyboard({ onClose, defaultLayout, closeLabel, }: Props): import("react").JSX.Element;
|
|
8
|
+
export default function VirtualKeyboard({ onClose, defaultLayout, closeLabel, }: Props): import("react/jsx-runtime").JSX.Element;
|
|
9
9
|
export {};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tycho-components",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.35.0",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
7
|
"exports": {
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
"file-saver": "^2.0.5",
|
|
61
61
|
"html2canvas": "^1.4.1",
|
|
62
62
|
"js-cookie": "^3.0.5",
|
|
63
|
-
"react-colorful": "^5.
|
|
63
|
+
"react-colorful": "^5.8.0",
|
|
64
64
|
"react-draggable": "^4.4.6",
|
|
65
65
|
"react-dropzone": "^14.3.5",
|
|
66
66
|
"react-easy-edit": "^2.0.0",
|