mirror of
https://github.com/IRBorisov/ConceptPortal.git
synced 2025-06-26 04:50:36 +03:00
R: Refactor auth and help feature boundary
This commit is contained in:
parent
92a0ec5968
commit
8c894b1245
|
@ -1,5 +1,5 @@
|
||||||
import { IconLogin, IconUser2 } from '@/components/Icons';
|
import { IconLogin, IconUser2 } from '@/components/Icons';
|
||||||
import { useAuthSuspense } from '@/features/auth/backend/useAuth';
|
import { useAuthSuspense } from '@/features/auth';
|
||||||
import { usePreferencesStore } from '@/stores/preferences';
|
import { usePreferencesStore } from '@/stores/preferences';
|
||||||
|
|
||||||
import NavigationButton from './NavigationButton';
|
import NavigationButton from './NavigationButton';
|
||||||
|
|
|
@ -14,8 +14,7 @@ import {
|
||||||
IconUser
|
IconUser
|
||||||
} from '@/components/Icons';
|
} from '@/components/Icons';
|
||||||
import { CProps } from '@/components/props';
|
import { CProps } from '@/components/props';
|
||||||
import { useAuthSuspense } from '@/features/auth/backend/useAuth';
|
import { useAuthSuspense, useLogout } from '@/features/auth';
|
||||||
import { useLogout } from '@/features/auth/backend/useLogout';
|
|
||||||
import { usePreferencesStore } from '@/stores/preferences';
|
import { usePreferencesStore } from '@/stores/preferences';
|
||||||
|
|
||||||
import { urls } from '../urls';
|
import { urls } from '../urls';
|
||||||
|
|
|
@ -3,6 +3,7 @@ export { CheckboxTristate } from './CheckboxTristate';
|
||||||
export { ErrorField } from './ErrorField';
|
export { ErrorField } from './ErrorField';
|
||||||
export { FileInput } from './FileInput';
|
export { FileInput } from './FileInput';
|
||||||
export { Label } from './Label';
|
export { Label } from './Label';
|
||||||
|
export { SearchBar } from './SearchBar';
|
||||||
export { SelectMulti, type SelectMultiProps } from './SelectMulti';
|
export { SelectMulti, type SelectMultiProps } from './SelectMulti';
|
||||||
export { SelectSingle, type SelectSingleProps } from './SelectSingle';
|
export { SelectSingle, type SelectSingleProps } from './SelectSingle';
|
||||||
export { SelectTree } from './SelectTree';
|
export { SelectTree } from './SelectTree';
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
import clsx from 'clsx';
|
import clsx from 'clsx';
|
||||||
|
|
||||||
import { HelpTopic } from '@/features/help/models/helpTopic';
|
import { BadgeHelp, HelpTopic } from '@/features/help';
|
||||||
import useEscapeKey from '@/hooks/useEscapeKey';
|
import useEscapeKey from '@/hooks/useEscapeKey';
|
||||||
import { useDialogsStore } from '@/stores/dialogs';
|
import { useDialogsStore } from '@/stores/dialogs';
|
||||||
import { PARAMETER } from '@/utils/constants';
|
import { PARAMETER } from '@/utils/constants';
|
||||||
|
@ -11,7 +11,6 @@ import { prepareTooltip } from '@/utils/utils';
|
||||||
import { Button, MiniButton, SubmitButton } from '../Control';
|
import { Button, MiniButton, SubmitButton } from '../Control';
|
||||||
import { IconClose } from '../Icons';
|
import { IconClose } from '../Icons';
|
||||||
import { CProps } from '../props';
|
import { CProps } from '../props';
|
||||||
import { BadgeHelp } from '../shared/BadgeHelp';
|
|
||||||
import { ModalBackdrop } from './ModalBackdrop';
|
import { ModalBackdrop } from './ModalBackdrop';
|
||||||
|
|
||||||
export interface ModalProps extends CProps.Styling {
|
export interface ModalProps extends CProps.Styling {
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
import clsx from 'clsx';
|
import clsx from 'clsx';
|
||||||
|
|
||||||
|
import { BadgeHelp } from '@/features/help';
|
||||||
import useEscapeKey from '@/hooks/useEscapeKey';
|
import useEscapeKey from '@/hooks/useEscapeKey';
|
||||||
import { useDialogsStore } from '@/stores/dialogs';
|
import { useDialogsStore } from '@/stores/dialogs';
|
||||||
import { PARAMETER } from '@/utils/constants';
|
import { PARAMETER } from '@/utils/constants';
|
||||||
|
@ -9,7 +10,6 @@ import { prepareTooltip } from '@/utils/utils';
|
||||||
|
|
||||||
import { Button, MiniButton } from '../Control';
|
import { Button, MiniButton } from '../Control';
|
||||||
import { IconClose } from '../Icons';
|
import { IconClose } from '../Icons';
|
||||||
import { BadgeHelp } from '../shared/BadgeHelp';
|
|
||||||
import { ModalBackdrop } from './ModalBackdrop';
|
import { ModalBackdrop } from './ModalBackdrop';
|
||||||
import { ModalProps } from './ModalForm';
|
import { ModalProps } from './ModalForm';
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@ import { TextURL } from '@/components/Control';
|
||||||
import { useAuthSuspense } from '../backend/useAuth';
|
import { useAuthSuspense } from '../backend/useAuth';
|
||||||
import { useLogout } from '../backend/useLogout';
|
import { useLogout } from '../backend/useLogout';
|
||||||
|
|
||||||
function ExpectedAnonymous() {
|
export function ExpectedAnonymous() {
|
||||||
const { user } = useAuthSuspense();
|
const { user } = useAuthSuspense();
|
||||||
const { logout } = useLogout();
|
const { logout } = useLogout();
|
||||||
const router = useConceptNavigation();
|
const router = useConceptNavigation();
|
||||||
|
@ -30,5 +30,3 @@ function ExpectedAnonymous() {
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
export default ExpectedAnonymous;
|
|
||||||
|
|
|
@ -4,7 +4,7 @@ import { TextURL } from '@/components/Control';
|
||||||
|
|
||||||
import { useAuthSuspense } from '../backend/useAuth';
|
import { useAuthSuspense } from '../backend/useAuth';
|
||||||
|
|
||||||
function RequireAuth({ children }: React.PropsWithChildren) {
|
export function RequireAuth({ children }: React.PropsWithChildren) {
|
||||||
const { isAnonymous } = useAuthSuspense();
|
const { isAnonymous } = useAuthSuspense();
|
||||||
|
|
||||||
if (isAnonymous) {
|
if (isAnonymous) {
|
||||||
|
@ -19,5 +19,3 @@ function RequireAuth({ children }: React.PropsWithChildren) {
|
||||||
}
|
}
|
||||||
return <>{children}</>;
|
return <>{children}</>;
|
||||||
}
|
}
|
||||||
|
|
||||||
export default RequireAuth;
|
|
||||||
|
|
5
rsconcept/frontend/src/features/auth/index.ts
Normal file
5
rsconcept/frontend/src/features/auth/index.ts
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
export { useAuthSuspense } from './backend/useAuth';
|
||||||
|
export { useChangePassword } from './backend/useChangePassword';
|
||||||
|
export { useLogout } from './backend/useLogout';
|
||||||
|
export { ExpectedAnonymous } from './components/ExpectedAnonymous';
|
||||||
|
export { RequireAuth } from './components/RequireAuth';
|
|
@ -15,7 +15,7 @@ import { resources } from '@/utils/constants';
|
||||||
import { IUserLoginDTO, schemaUserLogin } from '../backend/api';
|
import { IUserLoginDTO, schemaUserLogin } from '../backend/api';
|
||||||
import { useAuthSuspense } from '../backend/useAuth';
|
import { useAuthSuspense } from '../backend/useAuth';
|
||||||
import { useLogin } from '../backend/useLogin';
|
import { useLogin } from '../backend/useLogin';
|
||||||
import ExpectedAnonymous from '../components/ExpectedAnonymous';
|
import { ExpectedAnonymous } from '../components/ExpectedAnonymous';
|
||||||
|
|
||||||
function LoginPage() {
|
function LoginPage() {
|
||||||
const router = useConceptNavigation();
|
const router = useConceptNavigation();
|
||||||
|
|
|
@ -5,9 +5,10 @@ import { TextURL } from '@/components/Control';
|
||||||
import { IconHelp } from '@/components/Icons';
|
import { IconHelp } from '@/components/Icons';
|
||||||
import { Loader } from '@/components/Loader';
|
import { Loader } from '@/components/Loader';
|
||||||
import { CProps } from '@/components/props';
|
import { CProps } from '@/components/props';
|
||||||
import { HelpTopic } from '@/features/help/models/helpTopic';
|
|
||||||
import { usePreferencesStore } from '@/stores/preferences';
|
import { usePreferencesStore } from '@/stores/preferences';
|
||||||
|
|
||||||
|
import { HelpTopic } from '../models/helpTopic';
|
||||||
|
|
||||||
const TopicPage = React.lazy(() => import('@/features/help/pages/ManualsPage/TopicPage'));
|
const TopicPage = React.lazy(() => import('@/features/help/pages/ManualsPage/TopicPage'));
|
||||||
|
|
||||||
interface BadgeHelpProps extends CProps.Styling {
|
interface BadgeHelpProps extends CProps.Styling {
|
2
rsconcept/frontend/src/features/help/index.ts
Normal file
2
rsconcept/frontend/src/features/help/index.ts
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
export { BadgeHelp } from './components/BadgeHelp';
|
||||||
|
export { HelpTopic } from './models/helpTopic';
|
|
@ -1,9 +1,9 @@
|
||||||
'use client';
|
'use client';
|
||||||
|
|
||||||
import TopicPage from '@/features/help/pages/ManualsPage/TopicPage';
|
|
||||||
import { useMainHeight } from '@/stores/appLayout';
|
import { useMainHeight } from '@/stores/appLayout';
|
||||||
|
|
||||||
import { HelpTopic } from '../../models/helpTopic';
|
import { HelpTopic } from '../../models/helpTopic';
|
||||||
|
import TopicPage from './TopicPage';
|
||||||
|
|
||||||
interface ViewTopicProps {
|
interface ViewTopicProps {
|
||||||
topic: HelpTopic;
|
topic: HelpTopic;
|
||||||
|
|
|
@ -2,7 +2,7 @@ import { useEffect } from 'react';
|
||||||
|
|
||||||
import { urls, useConceptNavigation } from '@/app';
|
import { urls, useConceptNavigation } from '@/app';
|
||||||
import { Loader } from '@/components/Loader';
|
import { Loader } from '@/components/Loader';
|
||||||
import { useAuthSuspense } from '@/features/auth/backend/useAuth';
|
import { useAuthSuspense } from '@/features/auth';
|
||||||
import { PARAMETER } from '@/utils/constants';
|
import { PARAMETER } from '@/utils/constants';
|
||||||
|
|
||||||
function HomePage() {
|
function HomePage() {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { useAuthSuspense } from '@/features/auth/backend/useAuth';
|
import { useAuthSuspense } from '@/features/auth';
|
||||||
|
|
||||||
import { ILibraryFilter } from '../models/library';
|
import { ILibraryFilter } from '../models/library';
|
||||||
import { matchLibraryItem, matchLibraryItemLocation } from '../models/libraryAPI';
|
import { matchLibraryItem, matchLibraryItemLocation } from '../models/libraryAPI';
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import { useQuery, useSuspenseQuery } from '@tanstack/react-query';
|
import { useQuery, useSuspenseQuery } from '@tanstack/react-query';
|
||||||
|
|
||||||
import { queryClient } from '@/backend/queryClient';
|
import { queryClient } from '@/backend/queryClient';
|
||||||
import { useAuthSuspense } from '@/features/auth/backend/useAuth';
|
import { useAuthSuspense } from '@/features/auth';
|
||||||
import { usePreferencesStore } from '@/stores/preferences';
|
import { usePreferencesStore } from '@/stores/preferences';
|
||||||
|
|
||||||
import { libraryApi } from './api';
|
import { libraryApi } from './api';
|
||||||
|
|
|
@ -7,7 +7,7 @@ import { z } from 'zod';
|
||||||
|
|
||||||
import { Label, TextArea } from '@/components/Input';
|
import { Label, TextArea } from '@/components/Input';
|
||||||
import { ModalForm } from '@/components/Modal';
|
import { ModalForm } from '@/components/Modal';
|
||||||
import { useAuthSuspense } from '@/features/auth/backend/useAuth';
|
import { useAuthSuspense } from '@/features/auth';
|
||||||
import { useDialogsStore } from '@/stores/dialogs';
|
import { useDialogsStore } from '@/stores/dialogs';
|
||||||
import { limits } from '@/utils/constants';
|
import { limits } from '@/utils/constants';
|
||||||
import { errorMsg } from '@/utils/labels';
|
import { errorMsg } from '@/utils/labels';
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import RequireAuth from '@/features/auth/components/RequireAuth';
|
import { RequireAuth } from '@/features/auth';
|
||||||
|
|
||||||
import FormCreateItem from './FormCreateItem';
|
import FormCreateItem from './FormCreateItem';
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@ import { VisibilityIcon } from '@/components/DomainIcons';
|
||||||
import { IconDownload } from '@/components/Icons';
|
import { IconDownload } from '@/components/Icons';
|
||||||
import { InfoError } from '@/components/InfoError';
|
import { InfoError } from '@/components/InfoError';
|
||||||
import { Label, TextArea, TextInput } from '@/components/Input';
|
import { Label, TextArea, TextInput } from '@/components/Input';
|
||||||
import { useAuthSuspense } from '@/features/auth/backend/useAuth';
|
import { useAuthSuspense } from '@/features/auth';
|
||||||
import { EXTEOR_TRS_FILE } from '@/utils/constants';
|
import { EXTEOR_TRS_FILE } from '@/utils/constants';
|
||||||
|
|
||||||
import { ICreateLibraryItemDTO, schemaCreateLibraryItem } from '../../backend/api';
|
import { ICreateLibraryItemDTO, schemaCreateLibraryItem } from '../../backend/api';
|
||||||
|
|
|
@ -14,8 +14,8 @@ import {
|
||||||
IconOwner,
|
IconOwner,
|
||||||
IconUserSearch
|
IconUserSearch
|
||||||
} from '@/components/Icons';
|
} from '@/components/Icons';
|
||||||
|
import { SearchBar } from '@/components/Input';
|
||||||
import { CProps } from '@/components/props';
|
import { CProps } from '@/components/props';
|
||||||
import { SearchBar } from '@/components/shared/SearchBar';
|
|
||||||
import { SelectUser } from '@/features/users';
|
import { SelectUser } from '@/features/users';
|
||||||
import { prefixes } from '@/utils/constants';
|
import { prefixes } from '@/utils/constants';
|
||||||
import { tripleToggleColor } from '@/utils/utils';
|
import { tripleToggleColor } from '@/utils/utils';
|
||||||
|
|
|
@ -5,9 +5,8 @@ import { MiniButton } from '@/components/Control';
|
||||||
import { SubfoldersIcon } from '@/components/DomainIcons';
|
import { SubfoldersIcon } from '@/components/DomainIcons';
|
||||||
import { IconFolderEdit, IconFolderTree } from '@/components/Icons';
|
import { IconFolderEdit, IconFolderTree } from '@/components/Icons';
|
||||||
import { CProps } from '@/components/props';
|
import { CProps } from '@/components/props';
|
||||||
import { BadgeHelp } from '@/components/shared/BadgeHelp';
|
import { useAuthSuspense } from '@/features/auth';
|
||||||
import { useAuthSuspense } from '@/features/auth/backend/useAuth';
|
import { BadgeHelp, HelpTopic } from '@/features/help';
|
||||||
import { HelpTopic } from '@/features/help/models/helpTopic';
|
|
||||||
import { FolderNode } from '@/features/library/models/FolderTree';
|
import { FolderNode } from '@/features/library/models/FolderTree';
|
||||||
import useWindowSize from '@/hooks/useWindowSize';
|
import useWindowSize from '@/hooks/useWindowSize';
|
||||||
import { useFitHeight } from '@/stores/appLayout';
|
import { useFitHeight } from '@/stores/appLayout';
|
||||||
|
|
|
@ -7,7 +7,7 @@ import { FormProvider, useForm, useWatch } from 'react-hook-form';
|
||||||
|
|
||||||
import { ModalForm } from '@/components/Modal';
|
import { ModalForm } from '@/components/Modal';
|
||||||
import { TabLabel, TabList, TabPanel, Tabs } from '@/components/Tabs';
|
import { TabLabel, TabList, TabPanel, Tabs } from '@/components/Tabs';
|
||||||
import { HelpTopic } from '@/features/help/models/helpTopic';
|
import { HelpTopic } from '@/features/help';
|
||||||
import { useDialogsStore } from '@/stores/dialogs';
|
import { useDialogsStore } from '@/stores/dialogs';
|
||||||
|
|
||||||
import { IOperationCreateDTO, IOperationPosition, schemaOperationCreate } from '../../backend/api';
|
import { IOperationCreateDTO, IOperationPosition, schemaOperationCreate } from '../../backend/api';
|
||||||
|
|
|
@ -6,7 +6,7 @@ import { Controller, useForm } from 'react-hook-form';
|
||||||
|
|
||||||
import { Checkbox, TextInput } from '@/components/Input';
|
import { Checkbox, TextInput } from '@/components/Input';
|
||||||
import { ModalForm } from '@/components/Modal';
|
import { ModalForm } from '@/components/Modal';
|
||||||
import { HelpTopic } from '@/features/help/models/helpTopic';
|
import { HelpTopic } from '@/features/help';
|
||||||
import { IOperation, IOperationSchema } from '@/features/oss/models/oss';
|
import { IOperation, IOperationSchema } from '@/features/oss/models/oss';
|
||||||
import { useDialogsStore } from '@/stores/dialogs';
|
import { useDialogsStore } from '@/stores/dialogs';
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@ import { FormProvider, useForm, useWatch } from 'react-hook-form';
|
||||||
import { Loader } from '@/components/Loader';
|
import { Loader } from '@/components/Loader';
|
||||||
import { ModalForm } from '@/components/Modal';
|
import { ModalForm } from '@/components/Modal';
|
||||||
import { TabLabel, TabList, TabPanel, Tabs } from '@/components/Tabs';
|
import { TabLabel, TabList, TabPanel, Tabs } from '@/components/Tabs';
|
||||||
import { HelpTopic } from '@/features/help/models/helpTopic';
|
import { HelpTopic } from '@/features/help';
|
||||||
import { useDialogsStore } from '@/stores/dialogs';
|
import { useDialogsStore } from '@/stores/dialogs';
|
||||||
|
|
||||||
import { IOperationPosition, IOperationUpdateDTO, schemaOperationUpdate } from '../../backend/api';
|
import { IOperationPosition, IOperationUpdateDTO, schemaOperationUpdate } from '../../backend/api';
|
||||||
|
|
|
@ -9,7 +9,7 @@ import { MiniButton } from '@/components/Control';
|
||||||
import { RelocateUpIcon } from '@/components/DomainIcons';
|
import { RelocateUpIcon } from '@/components/DomainIcons';
|
||||||
import { Loader } from '@/components/Loader';
|
import { Loader } from '@/components/Loader';
|
||||||
import { ModalForm } from '@/components/Modal';
|
import { ModalForm } from '@/components/Modal';
|
||||||
import { HelpTopic } from '@/features/help/models/helpTopic';
|
import { HelpTopic } from '@/features/help';
|
||||||
import { useLibrary } from '@/features/library/backend/useLibrary';
|
import { useLibrary } from '@/features/library/backend/useLibrary';
|
||||||
import SelectLibraryItem from '@/features/library/components/SelectLibraryItem';
|
import SelectLibraryItem from '@/features/library/components/SelectLibraryItem';
|
||||||
import { ILibraryItem, LibraryItemID } from '@/features/library/models/library';
|
import { ILibraryItem, LibraryItemID } from '@/features/library/models/library';
|
||||||
|
|
|
@ -18,8 +18,7 @@ import {
|
||||||
IconReset,
|
IconReset,
|
||||||
IconSave
|
IconSave
|
||||||
} from '@/components/Icons';
|
} from '@/components/Icons';
|
||||||
import { BadgeHelp } from '@/components/shared/BadgeHelp';
|
import { BadgeHelp, HelpTopic } from '@/features/help';
|
||||||
import { HelpTopic } from '@/features/help/models/helpTopic';
|
|
||||||
import { useModificationStore } from '@/stores/modification';
|
import { useModificationStore } from '@/stores/modification';
|
||||||
import { PARAMETER } from '@/utils/constants';
|
import { PARAMETER } from '@/utils/constants';
|
||||||
import { prepareTooltip } from '@/utils/utils';
|
import { prepareTooltip } from '@/utils/utils';
|
||||||
|
|
|
@ -18,7 +18,7 @@ import {
|
||||||
IconReader,
|
IconReader,
|
||||||
IconShare
|
IconShare
|
||||||
} from '@/components/Icons';
|
} from '@/components/Icons';
|
||||||
import { useAuthSuspense } from '@/features/auth/backend/useAuth';
|
import { useAuthSuspense } from '@/features/auth';
|
||||||
import { useMutatingOss } from '@/features/oss/backend/useMutatingOss';
|
import { useMutatingOss } from '@/features/oss/backend/useMutatingOss';
|
||||||
import { useRoleStore } from '@/features/users';
|
import { useRoleStore } from '@/features/users';
|
||||||
import { UserRole } from '@/features/users/models/user';
|
import { UserRole } from '@/features/users/models/user';
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
import { createContext, useContext, useEffect, useState } from 'react';
|
import { createContext, useContext, useEffect, useState } from 'react';
|
||||||
|
|
||||||
import { urls, useConceptNavigation } from '@/app';
|
import { urls, useConceptNavigation } from '@/app';
|
||||||
import { useAuthSuspense } from '@/features/auth/backend/useAuth';
|
import { useAuthSuspense } from '@/features/auth';
|
||||||
import { useDeleteItem } from '@/features/library/backend/useDeleteItem';
|
import { useDeleteItem } from '@/features/library/backend/useDeleteItem';
|
||||||
import { ILibraryItemEditor, LibraryItemID } from '@/features/library/models/library';
|
import { ILibraryItemEditor, LibraryItemID } from '@/features/library/models/library';
|
||||||
import { useLibrarySearchStore } from '@/features/library/stores/librarySearch';
|
import { useLibrarySearchStore } from '@/features/library/stores/librarySearch';
|
||||||
|
|
|
@ -4,8 +4,8 @@ import clsx from 'clsx';
|
||||||
import { useState } from 'react';
|
import { useState } from 'react';
|
||||||
|
|
||||||
import DataTable, { createColumnHelper, IConditionalStyle } from '@/components/DataTable';
|
import DataTable, { createColumnHelper, IConditionalStyle } from '@/components/DataTable';
|
||||||
|
import { SearchBar } from '@/components/Input';
|
||||||
import { CProps } from '@/components/props';
|
import { CProps } from '@/components/props';
|
||||||
import { SearchBar } from '@/components/shared/SearchBar';
|
|
||||||
import { NoData } from '@/components/View';
|
import { NoData } from '@/components/View';
|
||||||
import { APP_COLORS } from '@/styling/colors';
|
import { APP_COLORS } from '@/styling/colors';
|
||||||
|
|
||||||
|
|
|
@ -4,8 +4,8 @@ import clsx from 'clsx';
|
||||||
import { useState } from 'react';
|
import { useState } from 'react';
|
||||||
|
|
||||||
import DataTable, { createColumnHelper, RowSelectionState } from '@/components/DataTable';
|
import DataTable, { createColumnHelper, RowSelectionState } from '@/components/DataTable';
|
||||||
|
import { SearchBar } from '@/components/Input';
|
||||||
import { CProps } from '@/components/props';
|
import { CProps } from '@/components/props';
|
||||||
import { SearchBar } from '@/components/shared/SearchBar';
|
|
||||||
import { NoData } from '@/components/View';
|
import { NoData } from '@/components/View';
|
||||||
import { Graph } from '@/models/Graph';
|
import { Graph } from '@/models/Graph';
|
||||||
|
|
||||||
|
|
|
@ -7,8 +7,8 @@ import { MiniButton } from '@/components/Control';
|
||||||
import DataTable, { createColumnHelper, IConditionalStyle } from '@/components/DataTable';
|
import DataTable, { createColumnHelper, IConditionalStyle } from '@/components/DataTable';
|
||||||
import { Dropdown, useDropdown } from '@/components/Dropdown';
|
import { Dropdown, useDropdown } from '@/components/Dropdown';
|
||||||
import { IconClose, IconFolderTree } from '@/components/Icons';
|
import { IconClose, IconFolderTree } from '@/components/Icons';
|
||||||
|
import { SearchBar } from '@/components/Input';
|
||||||
import { CProps } from '@/components/props';
|
import { CProps } from '@/components/props';
|
||||||
import { SearchBar } from '@/components/shared/SearchBar';
|
|
||||||
import { ILibraryItem, LibraryItemID, LibraryItemType } from '@/features/library/models/library';
|
import { ILibraryItem, LibraryItemID, LibraryItemType } from '@/features/library/models/library';
|
||||||
import { matchLibraryItem } from '@/features/library/models/libraryAPI';
|
import { matchLibraryItem } from '@/features/library/models/libraryAPI';
|
||||||
import { APP_COLORS } from '@/styling/colors';
|
import { APP_COLORS } from '@/styling/colors';
|
||||||
|
|
|
@ -9,7 +9,7 @@ import { MiniButton } from '@/components/Control';
|
||||||
import { VisibilityIcon } from '@/components/DomainIcons';
|
import { VisibilityIcon } from '@/components/DomainIcons';
|
||||||
import { Checkbox, Label, TextArea, TextInput } from '@/components/Input';
|
import { Checkbox, Label, TextArea, TextInput } from '@/components/Input';
|
||||||
import { ModalForm } from '@/components/Modal';
|
import { ModalForm } from '@/components/Modal';
|
||||||
import { useAuthSuspense } from '@/features/auth/backend/useAuth';
|
import { useAuthSuspense } from '@/features/auth';
|
||||||
import { ICloneLibraryItemDTO, schemaCloneLibraryItem } from '@/features/library/backend/api';
|
import { ICloneLibraryItemDTO, schemaCloneLibraryItem } from '@/features/library/backend/api';
|
||||||
import { useCloneItem } from '@/features/library/backend/useCloneItem';
|
import { useCloneItem } from '@/features/library/backend/useCloneItem';
|
||||||
import SelectAccessPolicy from '@/features/library/components/SelectAccessPolicy';
|
import SelectAccessPolicy from '@/features/library/components/SelectAccessPolicy';
|
||||||
|
|
|
@ -4,8 +4,7 @@ import clsx from 'clsx';
|
||||||
import { useEffect, useState } from 'react';
|
import { useEffect, useState } from 'react';
|
||||||
|
|
||||||
import { TextArea, TextInput } from '@/components/Input';
|
import { TextArea, TextInput } from '@/components/Input';
|
||||||
import { BadgeHelp } from '@/components/shared/BadgeHelp';
|
import { BadgeHelp, HelpTopic } from '@/features/help';
|
||||||
import { HelpTopic } from '@/features/help/models/helpTopic';
|
|
||||||
import { PARAMETER } from '@/utils/constants';
|
import { PARAMETER } from '@/utils/constants';
|
||||||
|
|
||||||
import { ICstCreateDTO } from '../../backend/api';
|
import { ICstCreateDTO } from '../../backend/api';
|
||||||
|
|
|
@ -6,7 +6,7 @@ import { Suspense, useEffect, useState } from 'react';
|
||||||
import { Loader } from '@/components/Loader';
|
import { Loader } from '@/components/Loader';
|
||||||
import { ModalForm } from '@/components/Modal';
|
import { ModalForm } from '@/components/Modal';
|
||||||
import { TabLabel, TabList, TabPanel, Tabs } from '@/components/Tabs';
|
import { TabLabel, TabList, TabPanel, Tabs } from '@/components/Tabs';
|
||||||
import { HelpTopic } from '@/features/help/models/helpTopic';
|
import { HelpTopic } from '@/features/help';
|
||||||
import usePartialUpdate from '@/hooks/usePartialUpdate';
|
import usePartialUpdate from '@/hooks/usePartialUpdate';
|
||||||
import { useDialogsStore } from '@/stores/dialogs';
|
import { useDialogsStore } from '@/stores/dialogs';
|
||||||
import { promptText } from '@/utils/labels';
|
import { promptText } from '@/utils/labels';
|
||||||
|
|
|
@ -5,7 +5,7 @@ import { useState } from 'react';
|
||||||
|
|
||||||
import { ModalForm } from '@/components/Modal';
|
import { ModalForm } from '@/components/Modal';
|
||||||
import { TabLabel, TabList, TabPanel, Tabs } from '@/components/Tabs';
|
import { TabLabel, TabList, TabPanel, Tabs } from '@/components/Tabs';
|
||||||
import { HelpTopic } from '@/features/help/models/helpTopic';
|
import { HelpTopic } from '@/features/help';
|
||||||
import { useDialogsStore } from '@/stores/dialogs';
|
import { useDialogsStore } from '@/stores/dialogs';
|
||||||
|
|
||||||
import { labelReferenceType } from '../../labels';
|
import { labelReferenceType } from '../../labels';
|
||||||
|
|
|
@ -7,7 +7,7 @@ import { MiniButton } from '@/components/Control';
|
||||||
import { IconAccept, IconMoveDown, IconMoveLeft, IconMoveRight, IconRemove } from '@/components/Icons';
|
import { IconAccept, IconMoveDown, IconMoveLeft, IconMoveRight, IconRemove } from '@/components/Icons';
|
||||||
import { Label, TextArea } from '@/components/Input';
|
import { Label, TextArea } from '@/components/Input';
|
||||||
import { ModalForm } from '@/components/Modal';
|
import { ModalForm } from '@/components/Modal';
|
||||||
import { HelpTopic } from '@/features/help/models/helpTopic';
|
import { HelpTopic } from '@/features/help';
|
||||||
import { useDialogsStore } from '@/stores/dialogs';
|
import { useDialogsStore } from '@/stores/dialogs';
|
||||||
import { promptText } from '@/utils/labels';
|
import { promptText } from '@/utils/labels';
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@ import { useForm, useWatch } from 'react-hook-form';
|
||||||
|
|
||||||
import { TextInput } from '@/components/Input';
|
import { TextInput } from '@/components/Input';
|
||||||
import { ModalForm } from '@/components/Modal';
|
import { ModalForm } from '@/components/Modal';
|
||||||
import { HelpTopic } from '@/features/help/models/helpTopic';
|
import { HelpTopic } from '@/features/help';
|
||||||
import { useDialogsStore } from '@/stores/dialogs';
|
import { useDialogsStore } from '@/stores/dialogs';
|
||||||
|
|
||||||
import { ICstRenameDTO, schemaCstRename } from '../backend/api';
|
import { ICstRenameDTO, schemaCstRename } from '../backend/api';
|
||||||
|
|
|
@ -5,7 +5,7 @@ import { ReactFlowProvider } from 'reactflow';
|
||||||
|
|
||||||
import { Overlay } from '@/components/Container';
|
import { Overlay } from '@/components/Container';
|
||||||
import { ModalView } from '@/components/Modal';
|
import { ModalView } from '@/components/Modal';
|
||||||
import { HelpTopic } from '@/features/help/models/helpTopic';
|
import { HelpTopic } from '@/features/help';
|
||||||
import { useDialogsStore } from '@/stores/dialogs';
|
import { useDialogsStore } from '@/stores/dialogs';
|
||||||
|
|
||||||
import { SyntaxTree } from '../../models/rslang';
|
import { SyntaxTree } from '../../models/rslang';
|
||||||
|
|
|
@ -4,7 +4,7 @@ import { toast } from 'react-toastify';
|
||||||
import { ReactFlowProvider } from 'reactflow';
|
import { ReactFlowProvider } from 'reactflow';
|
||||||
|
|
||||||
import { ModalView } from '@/components/Modal';
|
import { ModalView } from '@/components/Modal';
|
||||||
import { HelpTopic } from '@/features/help/models/helpTopic';
|
import { HelpTopic } from '@/features/help';
|
||||||
import { useDialogsStore } from '@/stores/dialogs';
|
import { useDialogsStore } from '@/stores/dialogs';
|
||||||
import { errorMsg } from '@/utils/labels';
|
import { errorMsg } from '@/utils/labels';
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@ import { Controller, useForm } from 'react-hook-form';
|
||||||
|
|
||||||
import { ErrorField } from '@/components/Input';
|
import { ErrorField } from '@/components/Input';
|
||||||
import { ModalForm } from '@/components/Modal';
|
import { ModalForm } from '@/components/Modal';
|
||||||
import { HelpTopic } from '@/features/help/models/helpTopic';
|
import { HelpTopic } from '@/features/help';
|
||||||
import { useDialogsStore } from '@/stores/dialogs';
|
import { useDialogsStore } from '@/stores/dialogs';
|
||||||
|
|
||||||
import { ICstSubstitutionsDTO, schemaCstSubstitutions } from '../backend/api';
|
import { ICstSubstitutionsDTO, schemaCstSubstitutions } from '../backend/api';
|
||||||
|
|
|
@ -17,8 +17,7 @@ import {
|
||||||
IconReset,
|
IconReset,
|
||||||
IconSave
|
IconSave
|
||||||
} from '@/components/Icons';
|
} from '@/components/Icons';
|
||||||
import { BadgeHelp } from '@/components/shared/BadgeHelp';
|
import { BadgeHelp, HelpTopic } from '@/features/help';
|
||||||
import { HelpTopic } from '@/features/help/models/helpTopic';
|
|
||||||
import { useFindPredecessor } from '@/features/oss/backend/useFindPredecessor';
|
import { useFindPredecessor } from '@/features/oss/backend/useFindPredecessor';
|
||||||
import { useModificationStore } from '@/stores/modification';
|
import { useModificationStore } from '@/stores/modification';
|
||||||
import { usePreferencesStore } from '@/stores/preferences';
|
import { usePreferencesStore } from '@/stores/preferences';
|
||||||
|
|
|
@ -7,8 +7,7 @@ import { toast } from 'react-toastify';
|
||||||
import { DataCallback } from '@/backend/apiTransport';
|
import { DataCallback } from '@/backend/apiTransport';
|
||||||
import { Overlay } from '@/components/Container';
|
import { Overlay } from '@/components/Container';
|
||||||
import { CProps } from '@/components/props';
|
import { CProps } from '@/components/props';
|
||||||
import { BadgeHelp } from '@/components/shared/BadgeHelp';
|
import { BadgeHelp, HelpTopic } from '@/features/help';
|
||||||
import { HelpTopic } from '@/features/help/models/helpTopic';
|
|
||||||
import { useDialogsStore } from '@/stores/dialogs';
|
import { useDialogsStore } from '@/stores/dialogs';
|
||||||
import { usePreferencesStore } from '@/stores/preferences';
|
import { usePreferencesStore } from '@/stores/preferences';
|
||||||
import { transformAST } from '@/utils/codemirror';
|
import { transformAST } from '@/utils/codemirror';
|
||||||
|
|
|
@ -3,8 +3,7 @@ import { MiniButton } from '@/components/Control';
|
||||||
import { VisibilityIcon } from '@/components/DomainIcons';
|
import { VisibilityIcon } from '@/components/DomainIcons';
|
||||||
import { IconImmutable, IconMutable } from '@/components/Icons';
|
import { IconImmutable, IconMutable } from '@/components/Icons';
|
||||||
import { Label } from '@/components/Input';
|
import { Label } from '@/components/Input';
|
||||||
import { BadgeHelp } from '@/components/shared/BadgeHelp';
|
import { BadgeHelp, HelpTopic } from '@/features/help';
|
||||||
import { HelpTopic } from '@/features/help/models/helpTopic';
|
|
||||||
import { useMutatingLibrary } from '@/features/library/backend/useMutatingLibrary';
|
import { useMutatingLibrary } from '@/features/library/backend/useMutatingLibrary';
|
||||||
import { useSetAccessPolicy } from '@/features/library/backend/useSetAccessPolicy';
|
import { useSetAccessPolicy } from '@/features/library/backend/useSetAccessPolicy';
|
||||||
import SelectAccessPolicy from '@/features/library/components/SelectAccessPolicy';
|
import SelectAccessPolicy from '@/features/library/components/SelectAccessPolicy';
|
||||||
|
|
|
@ -3,8 +3,7 @@
|
||||||
import { Overlay } from '@/components/Container';
|
import { Overlay } from '@/components/Container';
|
||||||
import { MiniButton } from '@/components/Control';
|
import { MiniButton } from '@/components/Control';
|
||||||
import { IconDestroy, IconSave, IconShare } from '@/components/Icons';
|
import { IconDestroy, IconSave, IconShare } from '@/components/Icons';
|
||||||
import { BadgeHelp } from '@/components/shared/BadgeHelp';
|
import { BadgeHelp, HelpTopic } from '@/features/help';
|
||||||
import { HelpTopic } from '@/features/help/models/helpTopic';
|
|
||||||
import { useMutatingLibrary } from '@/features/library/backend/useMutatingLibrary';
|
import { useMutatingLibrary } from '@/features/library/backend/useMutatingLibrary';
|
||||||
import { AccessPolicy, ILibraryItemEditor, LibraryItemType } from '@/features/library/models/library';
|
import { AccessPolicy, ILibraryItemEditor, LibraryItemType } from '@/features/library/models/library';
|
||||||
import { useRoleStore } from '@/features/users';
|
import { useRoleStore } from '@/features/users';
|
||||||
|
|
|
@ -3,8 +3,7 @@
|
||||||
import { Overlay } from '@/components/Container';
|
import { Overlay } from '@/components/Container';
|
||||||
import { MiniButton } from '@/components/Control';
|
import { MiniButton } from '@/components/Control';
|
||||||
import { IconNewVersion, IconUpload, IconVersions } from '@/components/Icons';
|
import { IconNewVersion, IconUpload, IconVersions } from '@/components/Icons';
|
||||||
import { BadgeHelp } from '@/components/shared/BadgeHelp';
|
import { BadgeHelp, HelpTopic } from '@/features/help';
|
||||||
import { HelpTopic } from '@/features/help/models/helpTopic';
|
|
||||||
import { useVersionRestore } from '@/features/library/backend/useVersionRestore';
|
import { useVersionRestore } from '@/features/library/backend/useVersionRestore';
|
||||||
import { useDialogsStore } from '@/stores/dialogs';
|
import { useDialogsStore } from '@/stores/dialogs';
|
||||||
import { useModificationStore } from '@/stores/modification';
|
import { useModificationStore } from '@/stores/modification';
|
||||||
|
|
|
@ -8,7 +8,7 @@ import { Overlay } from '@/components/Container';
|
||||||
import { MiniButton } from '@/components/Control';
|
import { MiniButton } from '@/components/Control';
|
||||||
import { type RowSelectionState } from '@/components/DataTable';
|
import { type RowSelectionState } from '@/components/DataTable';
|
||||||
import { IconCSV } from '@/components/Icons';
|
import { IconCSV } from '@/components/Icons';
|
||||||
import { SearchBar } from '@/components/shared/SearchBar';
|
import { SearchBar } from '@/components/Input';
|
||||||
import { useFitHeight } from '@/stores/appLayout';
|
import { useFitHeight } from '@/stores/appLayout';
|
||||||
import { infoMsg } from '@/utils/labels';
|
import { infoMsg } from '@/utils/labels';
|
||||||
import { convertToCSV } from '@/utils/utils';
|
import { convertToCSV } from '@/utils/utils';
|
||||||
|
|
|
@ -11,8 +11,7 @@ import {
|
||||||
IconOpenList,
|
IconOpenList,
|
||||||
IconReset
|
IconReset
|
||||||
} from '@/components/Icons';
|
} from '@/components/Icons';
|
||||||
import { BadgeHelp } from '@/components/shared/BadgeHelp';
|
import { BadgeHelp, HelpTopic } from '@/features/help';
|
||||||
import { HelpTopic } from '@/features/help/models/helpTopic';
|
|
||||||
import { prefixes } from '@/utils/constants';
|
import { prefixes } from '@/utils/constants';
|
||||||
import { prepareTooltip } from '@/utils/utils';
|
import { prepareTooltip } from '@/utils/utils';
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
import { Overlay } from '@/components/Container';
|
import { Overlay } from '@/components/Container';
|
||||||
import { SelectSingle } from '@/components/Input';
|
import { SelectSingle } from '@/components/Input';
|
||||||
import { BadgeHelp } from '@/components/shared/BadgeHelp';
|
import { BadgeHelp, HelpTopic } from '@/features/help';
|
||||||
import { HelpTopic } from '@/features/help/models/helpTopic';
|
|
||||||
|
|
||||||
import { mapLabelColoring } from '../../../labels';
|
import { mapLabelColoring } from '../../../labels';
|
||||||
import { IRSForm } from '../../../models/rsform';
|
import { IRSForm } from '../../../models/rsform';
|
||||||
|
|
|
@ -13,8 +13,7 @@ import {
|
||||||
IconTextOff,
|
IconTextOff,
|
||||||
IconTypeGraph
|
IconTypeGraph
|
||||||
} from '@/components/Icons';
|
} from '@/components/Icons';
|
||||||
import { BadgeHelp } from '@/components/shared/BadgeHelp';
|
import { BadgeHelp, HelpTopic } from '@/features/help';
|
||||||
import { HelpTopic } from '@/features/help/models/helpTopic';
|
|
||||||
import { useDialogsStore } from '@/stores/dialogs';
|
import { useDialogsStore } from '@/stores/dialogs';
|
||||||
import { PARAMETER } from '@/utils/constants';
|
import { PARAMETER } from '@/utils/constants';
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,7 @@ import {
|
||||||
IconTemplates,
|
IconTemplates,
|
||||||
IconUpload
|
IconUpload
|
||||||
} from '@/components/Icons';
|
} from '@/components/Icons';
|
||||||
import { useAuthSuspense } from '@/features/auth/backend/useAuth';
|
import { useAuthSuspense } from '@/features/auth';
|
||||||
import { AccessPolicy, LocationHead } from '@/features/library/models/library';
|
import { AccessPolicy, LocationHead } from '@/features/library/models/library';
|
||||||
import { OssTabID } from '@/features/oss/pages/OssPage/OssEditContext';
|
import { OssTabID } from '@/features/oss/pages/OssPage/OssEditContext';
|
||||||
import { useRoleStore } from '@/features/users';
|
import { useRoleStore } from '@/features/users';
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
import { createContext, useContext, useEffect, useState } from 'react';
|
import { createContext, useContext, useEffect, useState } from 'react';
|
||||||
|
|
||||||
import { urls, useConceptNavigation } from '@/app';
|
import { urls, useConceptNavigation } from '@/app';
|
||||||
import { useAuthSuspense } from '@/features/auth/backend/useAuth';
|
import { useAuthSuspense } from '@/features/auth';
|
||||||
import { useDeleteItem } from '@/features/library/backend/useDeleteItem';
|
import { useDeleteItem } from '@/features/library/backend/useDeleteItem';
|
||||||
import { ILibraryItemEditor, LibraryItemID, VersionID } from '@/features/library/models/library';
|
import { ILibraryItemEditor, LibraryItemID, VersionID } from '@/features/library/models/library';
|
||||||
import { useLibrarySearchStore } from '@/features/library/stores/librarySearch';
|
import { useLibrarySearchStore } from '@/features/library/stores/librarySearch';
|
||||||
|
|
|
@ -4,7 +4,7 @@ import { useEffect } from 'react';
|
||||||
|
|
||||||
import { MiniButton } from '@/components/Control';
|
import { MiniButton } from '@/components/Control';
|
||||||
import { IconChild } from '@/components/Icons';
|
import { IconChild } from '@/components/Icons';
|
||||||
import { SearchBar } from '@/components/shared/SearchBar';
|
import { SearchBar } from '@/components/Input';
|
||||||
|
|
||||||
import { ConstituentaID, IConstituenta, IRSForm } from '../../../models/rsform';
|
import { ConstituentaID, IConstituenta, IRSForm } from '../../../models/rsform';
|
||||||
import { matchConstituenta } from '../../../models/rsformAPI';
|
import { matchConstituenta } from '../../../models/rsformAPI';
|
||||||
|
|
|
@ -13,7 +13,7 @@ import { IconHelp } from '@/components/Icons';
|
||||||
import { ErrorData } from '@/components/InfoError';
|
import { ErrorData } from '@/components/InfoError';
|
||||||
import { Checkbox, TextInput } from '@/components/Input';
|
import { Checkbox, TextInput } from '@/components/Input';
|
||||||
import { PrettyJson } from '@/components/View';
|
import { PrettyJson } from '@/components/View';
|
||||||
import { HelpTopic } from '@/features/help/models/helpTopic';
|
import { HelpTopic } from '@/features/help';
|
||||||
import { globals, patterns } from '@/utils/constants';
|
import { globals, patterns } from '@/utils/constants';
|
||||||
|
|
||||||
import { IUserSignupDTO, schemaUserSignup } from '../../backend/api';
|
import { IUserSignupDTO, schemaUserSignup } from '../../backend/api';
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
import { useAuthSuspense } from '@/features/auth/backend/useAuth';
|
import { ExpectedAnonymous, useAuthSuspense } from '@/features/auth';
|
||||||
import ExpectedAnonymous from '@/features/auth/components/ExpectedAnonymous';
|
|
||||||
|
|
||||||
import FormSignup from './FormSignup';
|
import FormSignup from './FormSignup';
|
||||||
|
|
||||||
|
|
|
@ -10,8 +10,8 @@ import { FlexColumn } from '@/components/Container';
|
||||||
import { SubmitButton } from '@/components/Control';
|
import { SubmitButton } from '@/components/Control';
|
||||||
import { ErrorData } from '@/components/InfoError';
|
import { ErrorData } from '@/components/InfoError';
|
||||||
import { TextInput } from '@/components/Input';
|
import { TextInput } from '@/components/Input';
|
||||||
|
import { useChangePassword } from '@/features/auth';
|
||||||
import { IChangePasswordDTO, schemaChangePassword } from '@/features/auth/backend/api';
|
import { IChangePasswordDTO, schemaChangePassword } from '@/features/auth/backend/api';
|
||||||
import { useChangePassword } from '@/features/auth/backend/useChangePassword';
|
|
||||||
|
|
||||||
function EditorPassword() {
|
function EditorPassword() {
|
||||||
const router = useConceptNavigation();
|
const router = useConceptNavigation();
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import RequireAuth from '@/features/auth/components/RequireAuth';
|
import { RequireAuth } from '@/features/auth';
|
||||||
|
|
||||||
import EditorPassword from './EditorPassword';
|
import EditorPassword from './EditorPassword';
|
||||||
import EditorProfile from './EditorProfile';
|
import EditorProfile from './EditorProfile';
|
||||||
|
|
Loading…
Reference in New Issue
Block a user