mirror of
https://github.com/IRBorisov/ConceptPortal.git
synced 2025-06-26 13:00:39 +03:00
Fix spelling via spellchecker
This commit is contained in:
parent
1df94572b7
commit
5aaf902919
|
@ -49,6 +49,8 @@ This readme file is used mostly to document project dependencies
|
||||||
<pre>
|
<pre>
|
||||||
- ESLint
|
- ESLint
|
||||||
- Colorize
|
- Colorize
|
||||||
|
- Code Spell Checker (eng + rus)
|
||||||
|
- Backticks
|
||||||
</pre>
|
</pre>
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
|
@ -102,7 +104,7 @@ This readme file is used mostly to document project dependencies
|
||||||
- run rsconcept/backend/LocalEnvSetup.ps1
|
- run rsconcept/backend/LocalEnvSetup.ps1
|
||||||
- use VSCode configs in root folder to start developement
|
- use VSCode configs in root folder to start developement
|
||||||
|
|
||||||
## Developement build
|
## Development build
|
||||||
- this build does not use HTTPS and nginx for networking
|
- this build does not use HTTPS and nginx for networking
|
||||||
- backend and frontend debugging is supported
|
- backend and frontend debugging is supported
|
||||||
- hmr (hot updates) for frontend
|
- hmr (hot updates) for frontend
|
||||||
|
|
|
@ -238,12 +238,12 @@ class Constituenta(Model):
|
||||||
blank=True
|
blank=True
|
||||||
)
|
)
|
||||||
definition_raw: TextField = TextField(
|
definition_raw: TextField = TextField(
|
||||||
verbose_name='Текстовое определние (с отсылками)',
|
verbose_name='Текстовое определение (с отсылками)',
|
||||||
default='',
|
default='',
|
||||||
blank=True
|
blank=True
|
||||||
)
|
)
|
||||||
definition_resolved: TextField = TextField(
|
definition_resolved: TextField = TextField(
|
||||||
verbose_name='Текстовое определние',
|
verbose_name='Текстовое определение',
|
||||||
default='',
|
default='',
|
||||||
blank=True
|
blank=True
|
||||||
)
|
)
|
||||||
|
@ -501,8 +501,8 @@ class RSForm:
|
||||||
|
|
||||||
def _insert_new(self, data: dict, insert_after: Optional[str]=None) -> 'Constituenta':
|
def _insert_new(self, data: dict, insert_after: Optional[str]=None) -> 'Constituenta':
|
||||||
if insert_after is not None:
|
if insert_after is not None:
|
||||||
cstafter = Constituenta.objects.get(pk=insert_after)
|
cst_after = Constituenta.objects.get(pk=insert_after)
|
||||||
return self.insert_at(cstafter.order + 1, data['alias'], data['cst_type'])
|
return self.insert_at(cst_after.order + 1, data['alias'], data['cst_type'])
|
||||||
else:
|
else:
|
||||||
return self.insert_last(data['alias'], data['cst_type'])
|
return self.insert_last(data['alias'], data['cst_type'])
|
||||||
|
|
||||||
|
|
|
@ -481,7 +481,7 @@ class RSFormTRSSerializer(serializers.Serializer):
|
||||||
or self.initial_data['version'] < _TRS_VERSION_MIN \
|
or self.initial_data['version'] < _TRS_VERSION_MIN \
|
||||||
or self.initial_data['version'] > _TRS_VERSION:
|
or self.initial_data['version'] > _TRS_VERSION:
|
||||||
raise serializers.ValidationError({
|
raise serializers.ValidationError({
|
||||||
'version': 'Некорректная версия файла Экстеор. Пересохраните файл в новой версии'
|
'version': 'Некорректная версия файла Экстеор. Сохраните файл в новой версии'
|
||||||
})
|
})
|
||||||
return attrs
|
return attrs
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@ from apps.rsform.utils import apply_pattern, fix_old_references
|
||||||
|
|
||||||
|
|
||||||
class TestUtils(unittest.TestCase):
|
class TestUtils(unittest.TestCase):
|
||||||
''' Test various utilitiy functions. '''
|
''' Test various utility functions. '''
|
||||||
def test_apply_mapping_patter(self):
|
def test_apply_mapping_patter(self):
|
||||||
mapping = {'X101': 'X20'}
|
mapping = {'X101': 'X20'}
|
||||||
pattern = re.compile(r'(X[0-9]+)')
|
pattern = re.compile(r'(X[0-9]+)')
|
||||||
|
|
|
@ -404,7 +404,7 @@ class RSFormViewSet(viewsets.GenericViewSet, generics.ListAPIView, generics.Retr
|
||||||
)
|
)
|
||||||
@action(detail=True, methods=['post'])
|
@action(detail=True, methods=['post'])
|
||||||
def resolve(self, request, pk):
|
def resolve(self, request, pk):
|
||||||
''' Endpoint: Resolve refenrces in text against schema terms context. '''
|
''' Endpoint: Resolve references in text against schema terms context. '''
|
||||||
serializer = s.TextSerializer(data=request.data)
|
serializer = s.TextSerializer(data=request.data)
|
||||||
serializer.is_valid(raise_exception=True)
|
serializer.is_valid(raise_exception=True)
|
||||||
text = serializer.validated_data['text']
|
text = serializer.validated_data['text']
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
''' Admin: User profile and Authentification. '''
|
''' Admin: User profile and Authorization. '''
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
''' Application: User profile and Authentification. '''
|
''' Application: User profile and Authorization. '''
|
||||||
from django.apps import AppConfig
|
from django.apps import AppConfig
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
''' Serializers: User profile and Authentification. '''
|
''' Serializers: User profile and Authorization. '''
|
||||||
from django.contrib.auth import authenticate
|
from django.contrib.auth import authenticate
|
||||||
from django.contrib.auth.password_validation import validate_password
|
from django.contrib.auth.password_validation import validate_password
|
||||||
from rest_framework import serializers
|
from rest_framework import serializers
|
||||||
|
@ -15,7 +15,7 @@ class NonFieldErrorSerializer(serializers.Serializer):
|
||||||
|
|
||||||
|
|
||||||
class LoginSerializer(serializers.Serializer):
|
class LoginSerializer(serializers.Serializer):
|
||||||
''' Serializer: User authentification by login/password. '''
|
''' Serializer: User authentication by login/password. '''
|
||||||
username = serializers.CharField(
|
username = serializers.CharField(
|
||||||
label='Имя пользователя',
|
label='Имя пользователя',
|
||||||
write_only=True
|
write_only=True
|
||||||
|
@ -49,7 +49,7 @@ class LoginSerializer(serializers.Serializer):
|
||||||
|
|
||||||
|
|
||||||
class AuthSerializer(serializers.Serializer):
|
class AuthSerializer(serializers.Serializer):
|
||||||
''' Serializer: Authentication data. '''
|
''' Serializer: Authorization data. '''
|
||||||
id = serializers.IntegerField()
|
id = serializers.IntegerField()
|
||||||
username = serializers.CharField()
|
username = serializers.CharField()
|
||||||
is_staff = serializers.BooleanField()
|
is_staff = serializers.BooleanField()
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
''' Routing: User profile and Authentification. '''
|
''' Routing: User profile and Authorization. '''
|
||||||
from django.urls import path
|
from django.urls import path
|
||||||
from . import views
|
from . import views
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
''' REST API: User profile and Authentification. '''
|
''' REST API: User profile and Authorization. '''
|
||||||
from django.contrib.auth import login, logout
|
from django.contrib.auth import login, logout
|
||||||
|
|
||||||
from rest_framework import status as c
|
from rest_framework import status as c
|
||||||
|
|
|
@ -54,7 +54,7 @@ class Collation:
|
||||||
return self.words[self.main_word].get_parse()
|
return self.words[self.main_word].get_parse()
|
||||||
|
|
||||||
def get_morpho(self) -> Morphology:
|
def get_morpho(self) -> Morphology:
|
||||||
''' Access parsed main mrophology. '''
|
''' Access parsed main morphology. '''
|
||||||
return self.words[self.main_word].get_morpho()
|
return self.words[self.main_word].get_morpho()
|
||||||
|
|
||||||
def add_word(self, segment, forms: list, main_form: int, need_coordination: bool = True):
|
def add_word(self, segment, forms: list, main_form: int, need_coordination: bool = True):
|
||||||
|
@ -332,8 +332,8 @@ class PhraseParser:
|
||||||
output.add_word(segment, forms, main_index, needs_coordination)
|
output.add_word(segment, forms, main_index, needs_coordination)
|
||||||
return segment_score
|
return segment_score
|
||||||
# Alternative: return segment_score
|
# Alternative: return segment_score
|
||||||
# penalty_suspicoius = 0 if local_max == 0 else (1 - local_sum / local_max) * self._PRIORITY_PENALTY
|
# penalty_suspicious = 0 if local_max == 0 else (1 - local_sum / local_max) * self._PRIORITY_PENALTY
|
||||||
# return segment_score - penalty_suspicoius
|
# return segment_score - penalty_suspicious
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def _finalize_coordination(cls, target: Collation):
|
def _finalize_coordination(cls, target: Collation):
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
''' Russian language synthax incapsulation. '''
|
''' Russian language syntax incapsulation. '''
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
from enum import Enum, unique
|
from enum import Enum, unique
|
||||||
|
|
||||||
|
@ -56,7 +56,7 @@ class Capitalization(Enum):
|
||||||
|
|
||||||
|
|
||||||
class RuSyntax:
|
class RuSyntax:
|
||||||
''' Russian language synthax parser. '''
|
''' Russian language syntax parser. '''
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
|
@ -53,7 +53,7 @@ REST_FRAMEWORK = {
|
||||||
'TEST_REQUEST_DEFAULT_FORMAT': 'json',
|
'TEST_REQUEST_DEFAULT_FORMAT': 'json',
|
||||||
'DEFAULT_SCHEMA_CLASS': 'drf_spectacular.openapi.AutoSchema',
|
'DEFAULT_SCHEMA_CLASS': 'drf_spectacular.openapi.AutoSchema',
|
||||||
'DEFAULT_AUTHENTICATION_CLASSES': [
|
'DEFAULT_AUTHENTICATION_CLASSES': [
|
||||||
'rest_framework.authentication.SessionAuthentication',
|
'rest_framework.authentication.SessionAuthorization',
|
||||||
],
|
],
|
||||||
'DEFAULT_PERMISSION_CLASSES': [
|
'DEFAULT_PERMISSION_CLASSES': [
|
||||||
'rest_framework.permissions.AllowAny'
|
'rest_framework.permissions.AllowAny'
|
||||||
|
@ -80,7 +80,7 @@ MIDDLEWARE = [
|
||||||
'corsheaders.middleware.CorsMiddleware',
|
'corsheaders.middleware.CorsMiddleware',
|
||||||
'django.middleware.common.CommonMiddleware',
|
'django.middleware.common.CommonMiddleware',
|
||||||
'django.middleware.csrf.CsrfViewMiddleware',
|
'django.middleware.csrf.CsrfViewMiddleware',
|
||||||
'django.contrib.auth.middleware.AuthenticationMiddleware',
|
'django.contrib.auth.middleware.AuthorizationMiddleware',
|
||||||
'django.contrib.messages.middleware.MessageMiddleware',
|
'django.contrib.messages.middleware.MessageMiddleware',
|
||||||
'django.middleware.clickjacking.XFrameOptionsMiddleware',
|
'django.middleware.clickjacking.XFrameOptionsMiddleware',
|
||||||
]
|
]
|
||||||
|
|
|
@ -3,7 +3,7 @@ import { createBrowserRouter, Outlet, RouterProvider } from 'react-router-dom';
|
||||||
import ConceptToaster from './components/ConceptToaster';
|
import ConceptToaster from './components/ConceptToaster';
|
||||||
import Footer from './components/Footer';
|
import Footer from './components/Footer';
|
||||||
import Navigation from './components/Navigation';
|
import Navigation from './components/Navigation';
|
||||||
import { NavigationState } from './context/NagivationContext';
|
import { NavigationState } from './context/NavigationContext';
|
||||||
import { useConceptTheme } from './context/ThemeContext';
|
import { useConceptTheme } from './context/ThemeContext';
|
||||||
import CreateRSFormPage from './pages/CreateRSFormPage';
|
import CreateRSFormPage from './pages/CreateRSFormPage';
|
||||||
import HomePage from './pages/HomePage';
|
import HomePage from './pages/HomePage';
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { useAuth } from '@/context/AuthContext';
|
import { useAuth } from '@/context/AuthContext';
|
||||||
import { useConceptNavigation } from '@/context/NagivationContext';
|
import { useConceptNavigation } from '@/context/NavigationContext';
|
||||||
|
|
||||||
import TextURL from './Common/TextURL';
|
import TextURL from './Common/TextURL';
|
||||||
|
|
||||||
|
|
|
@ -7,8 +7,8 @@ function HelpAPI() {
|
||||||
<h1>Программный интерфейс Портала</h1>
|
<h1>Программный интерфейс Портала</h1>
|
||||||
<p>В качестве программного интерфейса сервера используется REST API, реализованный с помощью Django.</p>
|
<p>В качестве программного интерфейса сервера используется REST API, реализованный с помощью Django.</p>
|
||||||
<p>На данный момент API находится в разработке, поэтому поддержка внешних запросов не производится.</p>
|
<p>На данный момент API находится в разработке, поэтому поддержка внешних запросов не производится.</p>
|
||||||
<p>С описанием интерфейса можно ознакомиться <TextURL text='по ссылке' href={urls.restapi}/>.</p>
|
<p>С описанием интерфейса можно ознакомиться <TextURL text='по ссылке' href={urls.restAPI}/>.</p>
|
||||||
<p><TextURL text='Принять участие в разработке' href={urls.gitrepo}/></p>
|
<p><TextURL text='Принять участие в разработке' href={urls.git_repo}/></p>
|
||||||
</div>);
|
</div>);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@ import { BiInfoCircle } from 'react-icons/bi';
|
||||||
|
|
||||||
import ConceptTooltip from '@/components/Common/ConceptTooltip';
|
import ConceptTooltip from '@/components/Common/ConceptTooltip';
|
||||||
import TextURL from '@/components/Common/TextURL';
|
import TextURL from '@/components/Common/TextURL';
|
||||||
import { HelpTopic } from '@/models/miscelanious';
|
import { HelpTopic } from '@/models/miscellaneous';
|
||||||
|
|
||||||
import { CProps } from '../props';
|
import { CProps } from '../props';
|
||||||
import InfoTopic from './InfoTopic';
|
import InfoTopic from './InfoTopic';
|
||||||
|
|
|
@ -8,7 +8,7 @@ function HelpLibrary() {
|
||||||
<p>В библиотеки собраны различные концептуальные схемы.</p>
|
<p>В библиотеки собраны различные концептуальные схемы.</p>
|
||||||
<p>Группировка и классификации схем на данный момент не проводится.</p>
|
<p>Группировка и классификации схем на данный момент не проводится.</p>
|
||||||
<p>На текущем этапе происходит наполнение Библиотеки концептуальными схемами.</p>
|
<p>На текущем этапе происходит наполнение Библиотеки концептуальными схемами.</p>
|
||||||
<p>Поиск осуществлеяется с помощью инструментов в верхней части страницы.</p>
|
<p>Поиск осуществляется с помощью инструментов в верхней части страницы.</p>
|
||||||
<div className='flex items-center gap-2'>
|
<div className='flex items-center gap-2'>
|
||||||
<FiBell size='1rem'/>
|
<FiBell size='1rem'/>
|
||||||
<p>Аттрибут <b>отслеживаемая</b> обозначает отслеживание схемы.</p>
|
<p>Аттрибут <b>отслеживаемая</b> обозначает отслеживание схемы.</p>
|
||||||
|
|
|
@ -15,8 +15,8 @@ function HelpMain() {
|
||||||
<p>В меню пользователя (правый верхний угол) доступно редактирование данных пользователя и изменение цветовой темы.</p>
|
<p>В меню пользователя (правый верхний угол) доступно редактирование данных пользователя и изменение цветовой темы.</p>
|
||||||
|
|
||||||
<p className='mt-4 mb-1 text-center'><b>Поддержка</b></p>
|
<p className='mt-4 mb-1 text-center'><b>Поддержка</b></p>
|
||||||
<p>Портал разрабатывается <TextURL text='Центром Концепт' href={urls.concept}/> и является проектом с открытым исходным кодом, доступным на <TextURL text='Github' href={urls.gitrepo}/>.</p>
|
<p>Портал разрабатывается <TextURL text='Центром Концепт' href={urls.concept}/> и является проектом с открытым исходным кодом, доступным на <TextURL text='Github' href={urls.git_repo}/>.</p>
|
||||||
<p>Ваши пожелания по доработке, найденные ошибки и иные предложения можно направлять по email: <TextURL href={urls.mailportal} text='portal@acconcept.ru'/></p>
|
<p>Ваши пожелания по доработке, найденные ошибки и иные предложения можно направлять по email: <TextURL href={urls.mail_portal} text='portal@acconcept.ru'/></p>
|
||||||
</div>);
|
</div>);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@ function HelpTerminologyControl() {
|
||||||
<p>Портал позволяет контролировать употребление терминов, привязанных к сущностям в концептуальных схемах.</p>
|
<p>Портал позволяет контролировать употребление терминов, привязанных к сущностям в концептуальных схемах.</p>
|
||||||
<p>Для этого используется механизм текстовых отсылок: <i>использование термина</i> и <i>связывание слов.</i></p>
|
<p>Для этого используется механизм текстовых отсылок: <i>использование термина</i> и <i>связывание слов.</i></p>
|
||||||
<p>При отсылке к термину указывается параметры словоформы так, обеспечивающие корректное согласование слов.</p>
|
<p>При отсылке к термину указывается параметры словоформы так, обеспечивающие корректное согласование слов.</p>
|
||||||
<p><b>Граммема</b> - минимальная единица грамматической информаци, например род, число, падеж.</p>
|
<p><b>Граммема</b> - минимальная единица грамматической информами, например род, число, падеж.</p>
|
||||||
<p><b>Словоформа</b> - грамматическая форма словосочетания, которая может меняться в зависимости от его грамматических характеристик.</p>
|
<p><b>Словоформа</b> - грамматическая форма словосочетания, которая может меняться в зависимости от его грамматических характеристик.</p>
|
||||||
<p><b>Лексема</b> - все грамматические формы и словосочетания, связанные с данным словосочетанием.</p>
|
<p><b>Лексема</b> - все грамматические формы и словосочетания, связанные с данным словосочетанием.</p>
|
||||||
<p>При работе со словосочетаниями определяется основное слово, которое определяет набор граммем и используется для согласования с другими словами в предложении.</p>
|
<p>При работе со словосочетаниями определяется основное слово, которое определяет набор граммем и используется для согласования с другими словами в предложении.</p>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { HelpTopic } from '@/models/miscelanious';
|
import { HelpTopic } from '@/models/miscellaneous';
|
||||||
|
|
||||||
import HelpAPI from './HelpAPI';
|
import HelpAPI from './HelpAPI';
|
||||||
import HelpConstituenta from './HelpConstituenta';
|
import HelpConstituenta from './HelpConstituenta';
|
||||||
|
|
|
@ -4,7 +4,7 @@ import { FaSquarePlus } from 'react-icons/fa6';
|
||||||
import { IoLibrary } from 'react-icons/io5';
|
import { IoLibrary } from 'react-icons/io5';
|
||||||
|
|
||||||
import { EducationIcon } from '@/components/Icons';
|
import { EducationIcon } from '@/components/Icons';
|
||||||
import { useConceptNavigation } from '@/context/NagivationContext';
|
import { useConceptNavigation } from '@/context/NavigationContext';
|
||||||
import { useConceptTheme } from '@/context/ThemeContext';
|
import { useConceptTheme } from '@/context/ThemeContext';
|
||||||
import { animateNavigation } from '@/utils/animations';
|
import { animateNavigation } from '@/utils/animations';
|
||||||
|
|
||||||
|
@ -40,7 +40,10 @@ function Navigation () {
|
||||||
animate={!noNavigationAnimation ? 'open' : 'closed'}
|
animate={!noNavigationAnimation ? 'open' : 'closed'}
|
||||||
variants={animateNavigation}
|
variants={animateNavigation}
|
||||||
>
|
>
|
||||||
<div className='flex items-center mr-2 cursor-pointer' onClick={navigateHome} tabIndex={-1}>
|
<div tabIndex={-1}
|
||||||
|
className='flex items-center mr-2 cursor-pointer'
|
||||||
|
onClick={navigateHome}
|
||||||
|
>
|
||||||
<Logo />
|
<Logo />
|
||||||
</div>
|
</div>
|
||||||
<div className='flex'>
|
<div className='flex'>
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import Dropdown from '@/components/Common/Dropdown';
|
import Dropdown from '@/components/Common/Dropdown';
|
||||||
import DropdownButton from '@/components/Common/DropdownButton';
|
import DropdownButton from '@/components/Common/DropdownButton';
|
||||||
import { useAuth } from '@/context/AuthContext';
|
import { useAuth } from '@/context/AuthContext';
|
||||||
import { useConceptNavigation } from '@/context/NagivationContext';
|
import { useConceptNavigation } from '@/context/NavigationContext';
|
||||||
import { useConceptTheme } from '@/context/ThemeContext';
|
import { useConceptTheme } from '@/context/ThemeContext';
|
||||||
|
|
||||||
interface UserDropdownProps {
|
interface UserDropdownProps {
|
||||||
|
|
|
@ -2,7 +2,7 @@ import { FaCircleUser } from 'react-icons/fa6';
|
||||||
|
|
||||||
import { InDoorIcon } from '@/components/Icons';
|
import { InDoorIcon } from '@/components/Icons';
|
||||||
import { useAuth } from '@/context/AuthContext';
|
import { useAuth } from '@/context/AuthContext';
|
||||||
import { useConceptNavigation } from '@/context/NagivationContext';
|
import { useConceptNavigation } from '@/context/NavigationContext';
|
||||||
import useDropdown from '@/hooks/useDropdown';
|
import useDropdown from '@/hooks/useDropdown';
|
||||||
|
|
||||||
import NavigationButton from './NavigationButton';
|
import NavigationButton from './NavigationButton';
|
||||||
|
|
|
@ -4,7 +4,7 @@ import ConceptTooltip from '@/components/Common/ConceptTooltip';
|
||||||
import ConstituentaTooltip from '@/components/Help/ConstituentaTooltip';
|
import ConstituentaTooltip from '@/components/Help/ConstituentaTooltip';
|
||||||
import { IConstituenta } from '@/models/rsform';
|
import { IConstituenta } from '@/models/rsform';
|
||||||
import { isMockCst } from '@/models/rsformAPI';
|
import { isMockCst } from '@/models/rsformAPI';
|
||||||
import { colorfgCstStatus,IColorTheme } from '@/utils/color';
|
import { colorFgCstStatus,IColorTheme } from '@/utils/color';
|
||||||
import { describeExpressionStatus } from '@/utils/labels';
|
import { describeExpressionStatus } from '@/utils/labels';
|
||||||
|
|
||||||
interface ConstituentaBadgeProps {
|
interface ConstituentaBadgeProps {
|
||||||
|
@ -25,8 +25,8 @@ function ConstituentaBadge({ value, prefixID, shortTooltip, theme }: Constituent
|
||||||
'text-center font-semibold whitespace-nowrap'
|
'text-center font-semibold whitespace-nowrap'
|
||||||
)}
|
)}
|
||||||
style={{
|
style={{
|
||||||
borderColor: colorfgCstStatus(value.status, theme),
|
borderColor: colorFgCstStatus(value.status, theme),
|
||||||
color: colorfgCstStatus(value.status, theme),
|
color: colorFgCstStatus(value.status, theme),
|
||||||
backgroundColor: isMockCst(value) ? theme.bgWarning : theme.bgInput
|
backgroundColor: isMockCst(value) ? theme.bgWarning : theme.bgInput
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
|
|
@ -3,7 +3,7 @@ import { useEffect, useMemo, useState } from 'react';
|
||||||
import ConceptSearch from '@/components/Common/ConceptSearch';
|
import ConceptSearch from '@/components/Common/ConceptSearch';
|
||||||
import DataTable, { createColumnHelper, IConditionalStyle } from '@/components/DataTable';
|
import DataTable, { createColumnHelper, IConditionalStyle } from '@/components/DataTable';
|
||||||
import { useConceptTheme } from '@/context/ThemeContext';
|
import { useConceptTheme } from '@/context/ThemeContext';
|
||||||
import { CstMatchMode } from '@/models/miscelanious';
|
import { CstMatchMode } from '@/models/miscellaneous';
|
||||||
import { IConstituenta } from '@/models/rsform';
|
import { IConstituenta } from '@/models/rsform';
|
||||||
import { matchConstituenta } from '@/models/rsformAPI';
|
import { matchConstituenta } from '@/models/rsformAPI';
|
||||||
import { prefixes } from '@/utils/constants';
|
import { prefixes } from '@/utils/constants';
|
||||||
|
|
|
@ -2,7 +2,7 @@ import clsx from 'clsx';
|
||||||
|
|
||||||
import { useConceptTheme } from '@/context/ThemeContext';
|
import { useConceptTheme } from '@/context/ThemeContext';
|
||||||
import { GramData } from '@/models/language';
|
import { GramData } from '@/models/language';
|
||||||
import { colorfgGrammeme } from '@/utils/color';
|
import { colorFgGrammeme } from '@/utils/color';
|
||||||
import { labelGrammeme } from '@/utils/labels';
|
import { labelGrammeme } from '@/utils/labels';
|
||||||
|
|
||||||
interface GrammemeBadgeProps {
|
interface GrammemeBadgeProps {
|
||||||
|
@ -22,8 +22,8 @@ function GrammemeBadge({ key, grammeme }: GrammemeBadgeProps) {
|
||||||
'text-sm font-semibold text-center whitespace-nowrap'
|
'text-sm font-semibold text-center whitespace-nowrap'
|
||||||
)}
|
)}
|
||||||
style={{
|
style={{
|
||||||
borderColor: colorfgGrammeme(grammeme, colors),
|
borderColor: colorFgGrammeme(grammeme, colors),
|
||||||
color: colorfgGrammeme(grammeme, colors),
|
color: colorFgGrammeme(grammeme, colors),
|
||||||
backgroundColor: colors.bgInput
|
backgroundColor: colors.bgInput
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
|
|
@ -2,7 +2,7 @@ import clsx from 'clsx';
|
||||||
|
|
||||||
import { useConceptTheme } from '@/context/ThemeContext';
|
import { useConceptTheme } from '@/context/ThemeContext';
|
||||||
import { CstClass } from '@/models/rsform';
|
import { CstClass } from '@/models/rsform';
|
||||||
import { colorbgCstClass } from '@/utils/color';
|
import { colorBgCstClass } from '@/utils/color';
|
||||||
import { prefixes } from '@/utils/constants';
|
import { prefixes } from '@/utils/constants';
|
||||||
import { describeCstClass, labelCstClass } from '@/utils/labels';
|
import { describeCstClass, labelCstClass } from '@/utils/labels';
|
||||||
|
|
||||||
|
@ -28,7 +28,7 @@ function InfoCstClass({ header }: InfoCstClassProps) {
|
||||||
'border',
|
'border',
|
||||||
'text-center text-sm small-caps font-semibold'
|
'text-center text-sm small-caps font-semibold'
|
||||||
)}
|
)}
|
||||||
style={{backgroundColor: colorbgCstClass(cclass, colors)}}
|
style={{backgroundColor: colorBgCstClass(cclass, colors)}}
|
||||||
>
|
>
|
||||||
{labelCstClass(cclass)}
|
{labelCstClass(cclass)}
|
||||||
</span>
|
</span>
|
||||||
|
|
|
@ -2,7 +2,7 @@ import clsx from 'clsx';
|
||||||
|
|
||||||
import { useConceptTheme } from '@/context/ThemeContext';
|
import { useConceptTheme } from '@/context/ThemeContext';
|
||||||
import { ExpressionStatus } from '@/models/rsform';
|
import { ExpressionStatus } from '@/models/rsform';
|
||||||
import { colorbgCstStatus } from '@/utils/color';
|
import { colorBgCstStatus } from '@/utils/color';
|
||||||
import { prefixes } from '@/utils/constants';
|
import { prefixes } from '@/utils/constants';
|
||||||
import { describeExpressionStatus, labelExpressionStatus } from '@/utils/labels';
|
import { describeExpressionStatus, labelExpressionStatus } from '@/utils/labels';
|
||||||
|
|
||||||
|
@ -29,7 +29,7 @@ function InfoCstStatus({ title }: InfoCstStatusProps) {
|
||||||
'border',
|
'border',
|
||||||
'text-center text-sm small-caps font-semibold'
|
'text-center text-sm small-caps font-semibold'
|
||||||
)}
|
)}
|
||||||
style={{backgroundColor: colorbgCstStatus(status, colors)}}
|
style={{backgroundColor: colorBgCstStatus(status, colors)}}
|
||||||
>
|
>
|
||||||
{labelExpressionStatus(status)}
|
{labelExpressionStatus(status)}
|
||||||
</span>
|
</span>
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
import { createContext, useContext, useState } from 'react';
|
import { createContext, useContext, useState } from 'react';
|
||||||
|
|
||||||
import { UserAccessMode } from '@/models/miscelanious';
|
import { UserAccessMode } from '@/models/miscellaneous';
|
||||||
|
|
||||||
interface IAccessModeContext {
|
interface IAccessModeContext {
|
||||||
mode: UserAccessMode
|
mode: UserAccessMode
|
||||||
|
|
|
@ -5,7 +5,7 @@ import { createContext, useCallback, useContext, useEffect, useState } from 'rea
|
||||||
import { ErrorData } from '@/components/InfoError';
|
import { ErrorData } from '@/components/InfoError';
|
||||||
import { ILibraryItem } from '@/models/library';
|
import { ILibraryItem } from '@/models/library';
|
||||||
import { matchLibraryItem } from '@/models/libraryAPI';
|
import { matchLibraryItem } from '@/models/libraryAPI';
|
||||||
import { ILibraryFilter } from '@/models/miscelanious';
|
import { ILibraryFilter } from '@/models/miscellaneous';
|
||||||
import { IRSForm, IRSFormCreateData, IRSFormData } from '@/models/rsform';
|
import { IRSForm, IRSFormCreateData, IRSFormData } from '@/models/rsform';
|
||||||
import { loadRSFormData } from '@/models/rsformAPI';
|
import { loadRSFormData } from '@/models/rsformAPI';
|
||||||
import { DataCallback, deleteLibraryItem, getLibrary, getRSFormDetails, getTemplates, postCloneLibraryItem, postNewRSForm } from '@/utils/backendAPI';
|
import { DataCallback, deleteLibraryItem, getLibrary, getRSFormDetails, getTemplates, postCloneLibraryItem, postNewRSForm } from '@/utils/backendAPI';
|
||||||
|
|
|
@ -5,7 +5,7 @@ import { useLocation, useNavigate } from 'react-router-dom';
|
||||||
|
|
||||||
import { globalIDs } from '@/utils/constants';
|
import { globalIDs } from '@/utils/constants';
|
||||||
|
|
||||||
interface INagivationContext{
|
interface INavigationContext{
|
||||||
push: (path: string) => void
|
push: (path: string) => void
|
||||||
replace: (path: string) => void
|
replace: (path: string) => void
|
||||||
back: () => void
|
back: () => void
|
||||||
|
@ -17,9 +17,9 @@ interface INagivationContext{
|
||||||
setIsBlocked: (value: boolean) => void
|
setIsBlocked: (value: boolean) => void
|
||||||
}
|
}
|
||||||
|
|
||||||
const NagivationContext = createContext<INagivationContext | null>(null);
|
const NavigationContext = createContext<INavigationContext | null>(null);
|
||||||
export const useConceptNavigation = () => {
|
export const useConceptNavigation = () => {
|
||||||
const context = useContext(NagivationContext);
|
const context = useContext(NavigationContext);
|
||||||
if (!context) {
|
if (!context) {
|
||||||
throw new Error('useConceptNavigation has to be used within <NavigationState.Provider>');
|
throw new Error('useConceptNavigation has to be used within <NavigationState.Provider>');
|
||||||
}
|
}
|
||||||
|
@ -95,12 +95,12 @@ export const NavigationState = ({ children }: NavigationStateProps) => {
|
||||||
}, [pathname, scrollTop]);
|
}, [pathname, scrollTop]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<NagivationContext.Provider value={{
|
<NavigationContext.Provider value={{
|
||||||
push, replace, back, forward,
|
push, replace, back, forward,
|
||||||
canBack, isBlocked, setIsBlocked
|
canBack, isBlocked, setIsBlocked
|
||||||
}}>
|
}}>
|
||||||
{children}
|
{children}
|
||||||
</NagivationContext.Provider>);
|
</NavigationContext.Provider>);
|
||||||
}
|
}
|
||||||
|
|
||||||
export function useBlockNavigation(isBlocked: boolean) {
|
export function useBlockNavigation(isBlocked: boolean) {
|
|
@ -9,7 +9,7 @@ import Modal, { ModalProps } from '@/components/Common/Modal';
|
||||||
import TextArea from '@/components/Common/TextArea';
|
import TextArea from '@/components/Common/TextArea';
|
||||||
import TextInput from '@/components/Common/TextInput';
|
import TextInput from '@/components/Common/TextInput';
|
||||||
import { useLibrary } from '@/context/LibraryContext';
|
import { useLibrary } from '@/context/LibraryContext';
|
||||||
import { useConceptNavigation } from '@/context/NagivationContext';
|
import { useConceptNavigation } from '@/context/NavigationContext';
|
||||||
import { ILibraryItem } from '@/models/library';
|
import { ILibraryItem } from '@/models/library';
|
||||||
import { IRSFormCreateData } from '@/models/rsform';
|
import { IRSFormCreateData } from '@/models/rsform';
|
||||||
import { classnames } from '@/utils/constants';
|
import { classnames } from '@/utils/constants';
|
||||||
|
|
|
@ -9,7 +9,7 @@ import Modal, { ModalProps } from '@/components/Common/Modal';
|
||||||
import Overlay from '@/components/Common/Overlay';
|
import Overlay from '@/components/Common/Overlay';
|
||||||
import HelpButton from '@/components/Help/HelpButton';
|
import HelpButton from '@/components/Help/HelpButton';
|
||||||
import usePartialUpdate from '@/hooks/usePartialUpdate';
|
import usePartialUpdate from '@/hooks/usePartialUpdate';
|
||||||
import { HelpTopic } from '@/models/miscelanious';
|
import { HelpTopic } from '@/models/miscellaneous';
|
||||||
import { CstType, ICstCreateData, IRSForm } from '@/models/rsform';
|
import { CstType, ICstCreateData, IRSForm } from '@/models/rsform';
|
||||||
import { inferTemplatedType, substituteTemplateArgs } from '@/models/rslangAPI';
|
import { inferTemplatedType, substituteTemplateArgs } from '@/models/rslangAPI';
|
||||||
import { classnames } from '@/utils/constants';
|
import { classnames } from '@/utils/constants';
|
||||||
|
|
|
@ -9,7 +9,7 @@ import Modal from '@/components/Common/Modal';
|
||||||
import Overlay from '@/components/Common/Overlay';
|
import Overlay from '@/components/Common/Overlay';
|
||||||
import HelpButton from '@/components/Help/HelpButton';
|
import HelpButton from '@/components/Help/HelpButton';
|
||||||
import { ReferenceType } from '@/models/language';
|
import { ReferenceType } from '@/models/language';
|
||||||
import { HelpTopic } from '@/models/miscelanious';
|
import { HelpTopic } from '@/models/miscellaneous';
|
||||||
import { IConstituenta } from '@/models/rsform';
|
import { IConstituenta } from '@/models/rsform';
|
||||||
import { labelReferenceType } from '@/utils/labels';
|
import { labelReferenceType } from '@/utils/labels';
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@ import ConstituentaPicker from '@/components/Shared/ConstituentaPicker';
|
||||||
import SelectGrammeme from '@/components/Shared/SelectGrammeme';
|
import SelectGrammeme from '@/components/Shared/SelectGrammeme';
|
||||||
import { ReferenceType } from '@/models/language';
|
import { ReferenceType } from '@/models/language';
|
||||||
import { parseEntityReference, parseGrammemes } from '@/models/languageAPI';
|
import { parseEntityReference, parseGrammemes } from '@/models/languageAPI';
|
||||||
import { CstMatchMode } from '@/models/miscelanious';
|
import { CstMatchMode } from '@/models/miscellaneous';
|
||||||
import { IConstituenta } from '@/models/rsform';
|
import { IConstituenta } from '@/models/rsform';
|
||||||
import { matchConstituenta } from '@/models/rsformAPI';
|
import { matchConstituenta } from '@/models/rsformAPI';
|
||||||
import { prefixes } from '@/utils/constants';
|
import { prefixes } from '@/utils/constants';
|
||||||
|
|
|
@ -14,7 +14,7 @@ import SelectGrammeme from '@/components/Shared/SelectGrammeme';
|
||||||
import useConceptText from '@/hooks/useConceptText';
|
import useConceptText from '@/hooks/useConceptText';
|
||||||
import { Grammeme, ITextRequest, IWordForm, IWordFormPlain } from '@/models/language';
|
import { Grammeme, ITextRequest, IWordForm, IWordFormPlain } from '@/models/language';
|
||||||
import { parseGrammemes, wordFormEquals } from '@/models/languageAPI';
|
import { parseGrammemes, wordFormEquals } from '@/models/languageAPI';
|
||||||
import { HelpTopic } from '@/models/miscelanious';
|
import { HelpTopic } from '@/models/miscellaneous';
|
||||||
import { IConstituenta, TermForm } from '@/models/rsform';
|
import { IConstituenta, TermForm } from '@/models/rsform';
|
||||||
import { IGrammemeOption, SelectorGrammemesList, SelectorGrammems } from '@/utils/selectors';
|
import { IGrammemeOption, SelectorGrammemesList, SelectorGrammems } from '@/utils/selectors';
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
import Checkbox from '@/components/Common/Checkbox';
|
import Checkbox from '@/components/Common/Checkbox';
|
||||||
import Modal, { ModalProps } from '@/components/Common/Modal';
|
import Modal, { ModalProps } from '@/components/Common/Modal';
|
||||||
import usePartialUpdate from '@/hooks/usePartialUpdate';
|
import usePartialUpdate from '@/hooks/usePartialUpdate';
|
||||||
import { GraphFilterParams } from '@/models/miscelanious';
|
import { GraphFilterParams } from '@/models/miscellaneous';
|
||||||
import { CstType } from '@/models/rsform';
|
import { CstType } from '@/models/rsform';
|
||||||
import { labelCstType } from '@/utils/labels';
|
import { labelCstType } from '@/utils/labels';
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@ import Modal, { ModalProps } from '@/components/Common/Modal';
|
||||||
import { useConceptTheme } from '@/context/ThemeContext';
|
import { useConceptTheme } from '@/context/ThemeContext';
|
||||||
import { SyntaxTree } from '@/models/rslang';
|
import { SyntaxTree } from '@/models/rslang';
|
||||||
import { graphDarkT, graphLightT } from '@/utils/color';
|
import { graphDarkT, graphLightT } from '@/utils/color';
|
||||||
import { colorbgSyntaxTree } from '@/utils/color';
|
import { colorBgSyntaxTree } from '@/utils/color';
|
||||||
import { resources } from '@/utils/constants';
|
import { resources } from '@/utils/constants';
|
||||||
import { labelSyntaxTree } from '@/utils/labels';
|
import { labelSyntaxTree } from '@/utils/labels';
|
||||||
|
|
||||||
|
@ -28,7 +28,7 @@ function DlgShowAST({ hideWindow, syntaxTree, expression }: DlgShowASTProps) {
|
||||||
() => syntaxTree.map(node => ({
|
() => syntaxTree.map(node => ({
|
||||||
id: String(node.uid),
|
id: String(node.uid),
|
||||||
label: labelSyntaxTree(node),
|
label: labelSyntaxTree(node),
|
||||||
fill: colorbgSyntaxTree(node, colors),
|
fill: colorBgSyntaxTree(node, colors),
|
||||||
})), [syntaxTree, colors]);
|
})), [syntaxTree, colors]);
|
||||||
|
|
||||||
const edges: GraphEdge[] = useMemo(
|
const edges: GraphEdge[] = useMemo(
|
||||||
|
|
|
@ -67,7 +67,7 @@ export enum Grammeme {
|
||||||
/**
|
/**
|
||||||
* Represents part of speech language concept.
|
* Represents part of speech language concept.
|
||||||
*
|
*
|
||||||
* Implemented as a list of mututally exclusive {@link Grammeme}s.
|
* Implemented as a list of mutually exclusive {@link Grammeme}s.
|
||||||
*/
|
*/
|
||||||
export const PartOfSpeech = [
|
export const PartOfSpeech = [
|
||||||
Grammeme.NOUN, Grammeme.ADJF, Grammeme.ADJS, Grammeme.COMP,
|
Grammeme.NOUN, Grammeme.ADJF, Grammeme.ADJS, Grammeme.COMP,
|
||||||
|
@ -79,7 +79,7 @@ export const PartOfSpeech = [
|
||||||
/**
|
/**
|
||||||
* Represents gender language concept.
|
* Represents gender language concept.
|
||||||
*
|
*
|
||||||
* Implemented as a list of mututally exclusive {@link Grammeme}s.
|
* Implemented as a list of mutually exclusive {@link Grammeme}s.
|
||||||
*/
|
*/
|
||||||
export const Gender = [
|
export const Gender = [
|
||||||
Grammeme.masc, Grammeme.femn, Grammeme.neut
|
Grammeme.masc, Grammeme.femn, Grammeme.neut
|
||||||
|
@ -88,7 +88,7 @@ export const Gender = [
|
||||||
/**
|
/**
|
||||||
* Represents case language concept.
|
* Represents case language concept.
|
||||||
*
|
*
|
||||||
* Implemented as a list of mututally exclusive {@link Grammeme}s.
|
* Implemented as a list of mutually exclusive {@link Grammeme}s.
|
||||||
*/
|
*/
|
||||||
export const Case = [
|
export const Case = [
|
||||||
Grammeme.nomn, Grammeme.gent, Grammeme.datv,
|
Grammeme.nomn, Grammeme.gent, Grammeme.datv,
|
||||||
|
@ -98,49 +98,49 @@ export const Case = [
|
||||||
/**
|
/**
|
||||||
* Represents plurality language concept.
|
* Represents plurality language concept.
|
||||||
*
|
*
|
||||||
* Implemented as a list of mututally exclusive {@link Grammeme}s.
|
* Implemented as a list of mutually exclusive {@link Grammeme}s.
|
||||||
*/
|
*/
|
||||||
export const Plurality = [Grammeme.sing, Grammeme.plur];
|
export const Plurality = [Grammeme.sing, Grammeme.plur];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents verb perfectivity language concept.
|
* Represents verb perfectivity language concept.
|
||||||
*
|
*
|
||||||
* Implemented as a list of mututally exclusive {@link Grammeme}s.
|
* Implemented as a list of mutually exclusive {@link Grammeme}s.
|
||||||
*/
|
*/
|
||||||
export const Perfectivity = [Grammeme.perf, Grammeme.impf];
|
export const Perfectivity = [Grammeme.perf, Grammeme.impf];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents verb transitivity language concept.
|
* Represents verb transitivity language concept.
|
||||||
*
|
*
|
||||||
* Implemented as a list of mututally exclusive {@link Grammeme}s.
|
* Implemented as a list of mutually exclusive {@link Grammeme}s.
|
||||||
*/
|
*/
|
||||||
export const Transitivity = [Grammeme.tran, Grammeme.intr];
|
export const Transitivity = [Grammeme.tran, Grammeme.intr];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents verb mood language concept.
|
* Represents verb mood language concept.
|
||||||
*
|
*
|
||||||
* Implemented as a list of mututally exclusive {@link Grammeme}s.
|
* Implemented as a list of mutually exclusive {@link Grammeme}s.
|
||||||
*/
|
*/
|
||||||
export const Mood = [Grammeme.indc, Grammeme.impr];
|
export const Mood = [Grammeme.indc, Grammeme.impr];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents verb self-inclusion language concept.
|
* Represents verb self-inclusion language concept.
|
||||||
*
|
*
|
||||||
* Implemented as a list of mututally exclusive {@link Grammeme}s.
|
* Implemented as a list of mutually exclusive {@link Grammeme}s.
|
||||||
*/
|
*/
|
||||||
export const Inclusion = [Grammeme.incl, Grammeme.excl];
|
export const Inclusion = [Grammeme.incl, Grammeme.excl];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents verb voice language concept.
|
* Represents verb voice language concept.
|
||||||
*
|
*
|
||||||
* Implemented as a list of mututally exclusive {@link Grammeme}s.
|
* Implemented as a list of mutually exclusive {@link Grammeme}s.
|
||||||
*/
|
*/
|
||||||
export const Voice = [Grammeme.actv, Grammeme.pssv];
|
export const Voice = [Grammeme.actv, Grammeme.pssv];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents verb tense language concept.
|
* Represents verb tense language concept.
|
||||||
*
|
*
|
||||||
* Implemented as a list of mututally exclusive {@link Grammeme}s.
|
* Implemented as a list of mutually exclusive {@link Grammeme}s.
|
||||||
*/
|
*/
|
||||||
export const Tense = [
|
export const Tense = [
|
||||||
Grammeme.pres,
|
Grammeme.pres,
|
||||||
|
@ -151,7 +151,7 @@ export const Tense = [
|
||||||
/**
|
/**
|
||||||
* Represents verb person language concept.
|
* Represents verb person language concept.
|
||||||
*
|
*
|
||||||
* Implemented as a list of mututally exclusive {@link Grammeme}s.
|
* Implemented as a list of mutually exclusive {@link Grammeme}s.
|
||||||
*/
|
*/
|
||||||
export const Person = [
|
export const Person = [
|
||||||
Grammeme.per1,
|
Grammeme.per1,
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents user detailed information.
|
* Represents user detailed information.
|
||||||
* Some information should only be accesible to authorized users
|
* Some information should only be accessible to authorized users
|
||||||
*/
|
*/
|
||||||
export interface IUser {
|
export interface IUser {
|
||||||
id: number | null
|
id: number | null
|
||||||
|
@ -23,7 +23,7 @@ export interface ICurrentUser extends Pick<IUser, 'id' | 'username' | 'is_staff'
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents login data, used to authentificate users.
|
* Represents login data, used to authenticate users.
|
||||||
*/
|
*/
|
||||||
export interface IUserLoginData extends Pick<IUser, 'username'> {
|
export interface IUserLoginData extends Pick<IUser, 'username'> {
|
||||||
password: string
|
password: string
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/**
|
/**
|
||||||
* Module: Miscellanious frontend model types. Future tagets for refactoring aimed at extracting modules.
|
* Module: Miscellaneous frontend model types. Future targets for refactoring aimed at extracting modules.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
|
@ -1,7 +1,7 @@
|
||||||
/**
|
/**
|
||||||
* Module: API for miscellanious frontend model types. Future tagets for refactoring aimed at extracting modules.
|
* Module: API for miscellaneous frontend model types. Future targets for refactoring aimed at extracting modules.
|
||||||
*/
|
*/
|
||||||
import { DependencyMode } from './miscelanious';
|
import { DependencyMode } from './miscellaneous';
|
||||||
import { IConstituenta, IRSForm } from './rsform';
|
import { IConstituenta, IRSForm } from './rsform';
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@ export enum CstType {
|
||||||
THEOREM = 'theorem'
|
THEOREM = 'theorem'
|
||||||
}
|
}
|
||||||
|
|
||||||
// CstType constant for category dividers in TemplateSchemas. TODO: create separate sctructure for templates
|
// CstType constant for category dividers in TemplateSchemas. TODO: create separate structure for templates
|
||||||
export const CATEGORY_CST_TYPE = CstType.THEOREM;
|
export const CATEGORY_CST_TYPE = CstType.THEOREM;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -47,7 +47,7 @@ export enum ExpressionStatus {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents word form for natural languange.
|
* Represents word form for natural language.
|
||||||
*/
|
*/
|
||||||
export interface TermForm {
|
export interface TermForm {
|
||||||
text: string
|
text: string
|
||||||
|
@ -143,9 +143,9 @@ export interface IRSFormStats {
|
||||||
count_all: number
|
count_all: number
|
||||||
count_errors: number
|
count_errors: number
|
||||||
count_property: number
|
count_property: number
|
||||||
count_incalc: number
|
count_incalculable: number
|
||||||
|
|
||||||
count_termin: number
|
count_text_term: number
|
||||||
count_definition: number
|
count_definition: number
|
||||||
count_convention: number
|
count_convention: number
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
import { Graph } from '@/utils/Graph';
|
import { Graph } from '@/utils/Graph';
|
||||||
import { TextMatcher } from '@/utils/utils';
|
import { TextMatcher } from '@/utils/utils';
|
||||||
|
|
||||||
import { CstMatchMode } from './miscelanious';
|
import { CstMatchMode } from './miscellaneous';
|
||||||
import {
|
import {
|
||||||
CATEGORY_CST_TYPE, CstClass, CstType,
|
CATEGORY_CST_TYPE, CstClass, CstType,
|
||||||
ExpressionStatus, IConstituenta, IRSForm, IRSFormData
|
ExpressionStatus, IConstituenta, IRSForm, IRSFormData
|
||||||
|
@ -28,9 +28,9 @@ export function loadRSFormData(input: IRSFormData): IRSForm {
|
||||||
count_all: 0,
|
count_all: 0,
|
||||||
count_errors: 0,
|
count_errors: 0,
|
||||||
count_property: 0,
|
count_property: 0,
|
||||||
count_incalc: 0,
|
count_incalculable: 0,
|
||||||
|
|
||||||
count_termin: 0,
|
count_text_term: 0,
|
||||||
count_definition: 0,
|
count_definition: 0,
|
||||||
count_convention: 0,
|
count_convention: 0,
|
||||||
|
|
||||||
|
@ -51,11 +51,11 @@ export function loadRSFormData(input: IRSFormData): IRSForm {
|
||||||
(sum, cst) => sum + (cst.parse?.status === ParsingStatus.INCORRECT ? 1 : 0) || 0, 0),
|
(sum, cst) => sum + (cst.parse?.status === ParsingStatus.INCORRECT ? 1 : 0) || 0, 0),
|
||||||
count_property: result.items.reduce(
|
count_property: result.items.reduce(
|
||||||
(sum, cst) => sum + (cst.parse?.valueClass === ValueClass.PROPERTY ? 1 : 0) || 0, 0),
|
(sum, cst) => sum + (cst.parse?.valueClass === ValueClass.PROPERTY ? 1 : 0) || 0, 0),
|
||||||
count_incalc: result.items.reduce(
|
count_incalculable: result.items.reduce(
|
||||||
(sum, cst) => sum +
|
(sum, cst) => sum +
|
||||||
((cst.parse?.status === ParsingStatus.VERIFIED && cst.parse?.valueClass === ValueClass.INVALID) ? 1 : 0) || 0, 0),
|
((cst.parse?.status === ParsingStatus.VERIFIED && cst.parse?.valueClass === ValueClass.INVALID) ? 1 : 0) || 0, 0),
|
||||||
|
|
||||||
count_termin: result.items.reduce(
|
count_text_term: result.items.reduce(
|
||||||
(sum, cst) => (sum + (cst.term_raw ? 1 : 0) || 0), 0),
|
(sum, cst) => (sum + (cst.term_raw ? 1 : 0) || 0), 0),
|
||||||
count_definition: result.items.reduce(
|
count_definition: result.items.reduce(
|
||||||
(sum, cst) => (sum + (cst.definition_raw ? 1 : 0) || 0), 0),
|
(sum, cst) => (sum + (cst.definition_raw ? 1 : 0) || 0), 0),
|
||||||
|
|
|
@ -206,7 +206,7 @@ export enum TokenID {
|
||||||
export enum RSErrorType {
|
export enum RSErrorType {
|
||||||
unknownSymbol = 33283,
|
unknownSymbol = 33283,
|
||||||
syntax = 33792,
|
syntax = 33792,
|
||||||
missingParanthesis = 33798,
|
missingParenthesis = 33798,
|
||||||
missingCurlyBrace = 33799,
|
missingCurlyBrace = 33799,
|
||||||
invalidQuantifier = 33800,
|
invalidQuantifier = 33800,
|
||||||
expectedArgDeclaration = 33812,
|
expectedArgDeclaration = 33812,
|
||||||
|
@ -230,10 +230,10 @@ export enum RSErrorType {
|
||||||
invalidProjectionTuple = 34833,
|
invalidProjectionTuple = 34833,
|
||||||
invalidProjectionSet = 34834,
|
invalidProjectionSet = 34834,
|
||||||
invalidEnumeration = 34835,
|
invalidEnumeration = 34835,
|
||||||
ivalidBinding = 34836,
|
invalidBinding = 34836,
|
||||||
localOutOfScope = 34837,
|
localOutOfScope = 34837,
|
||||||
invalidElementPredicat = 34838,
|
invalidElementPredicate = 34838,
|
||||||
invalidArgsArtity = 34840,
|
invalidArgsArity = 34840,
|
||||||
invalidArgumentType = 34841,
|
invalidArgumentType = 34841,
|
||||||
invalidEqualsEmpty = 34842,
|
invalidEqualsEmpty = 34842,
|
||||||
globalStructure = 34844,
|
globalStructure = 34844,
|
||||||
|
|
|
@ -16,7 +16,7 @@ import TextInput from '@/components/Common/TextInput';
|
||||||
import InfoError from '@/components/InfoError';
|
import InfoError from '@/components/InfoError';
|
||||||
import RequireAuth from '@/components/RequireAuth';
|
import RequireAuth from '@/components/RequireAuth';
|
||||||
import { useLibrary } from '@/context/LibraryContext';
|
import { useLibrary } from '@/context/LibraryContext';
|
||||||
import { useConceptNavigation } from '@/context/NagivationContext';
|
import { useConceptNavigation } from '@/context/NavigationContext';
|
||||||
import { LibraryItemType } from '@/models/library';
|
import { LibraryItemType } from '@/models/library';
|
||||||
import { IRSFormCreateData } from '@/models/rsform';
|
import { IRSFormCreateData } from '@/models/rsform';
|
||||||
import { classnames, EXTEOR_TRS_FILE, limits, patterns } from '@/utils/constants';
|
import { classnames, EXTEOR_TRS_FILE, limits, patterns } from '@/utils/constants';
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import { useLayoutEffect } from 'react';
|
import { useLayoutEffect } from 'react';
|
||||||
|
|
||||||
import { useAuth } from '@/context/AuthContext';
|
import { useAuth } from '@/context/AuthContext';
|
||||||
import { useConceptNavigation } from '@/context/NagivationContext';
|
import { useConceptNavigation } from '@/context/NavigationContext';
|
||||||
import { TIMEOUT_UI_REFRESH } from '@/utils/constants';
|
import { TIMEOUT_UI_REFRESH } from '@/utils/constants';
|
||||||
|
|
||||||
function HomePage() {
|
function HomePage() {
|
||||||
|
|
|
@ -6,12 +6,12 @@ import { ConceptLoader } from '@/components/Common/ConceptLoader';
|
||||||
import InfoError from '@/components/InfoError';
|
import InfoError from '@/components/InfoError';
|
||||||
import { useAuth } from '@/context/AuthContext';
|
import { useAuth } from '@/context/AuthContext';
|
||||||
import { useLibrary } from '@/context/LibraryContext';
|
import { useLibrary } from '@/context/LibraryContext';
|
||||||
import { useConceptNavigation } from '@/context/NagivationContext';
|
import { useConceptNavigation } from '@/context/NavigationContext';
|
||||||
import { useConceptTheme } from '@/context/ThemeContext';
|
import { useConceptTheme } from '@/context/ThemeContext';
|
||||||
import useLocalStorage from '@/hooks/useLocalStorage';
|
import useLocalStorage from '@/hooks/useLocalStorage';
|
||||||
import useQueryStrings from '@/hooks/useQueryStrings';
|
import useQueryStrings from '@/hooks/useQueryStrings';
|
||||||
import { ILibraryItem } from '@/models/library';
|
import { ILibraryItem } from '@/models/library';
|
||||||
import { ILibraryFilter, LibraryFilterStrategy } from '@/models/miscelanious';
|
import { ILibraryFilter, LibraryFilterStrategy } from '@/models/miscellaneous';
|
||||||
|
|
||||||
import SearchPanel from './SearchPanel';
|
import SearchPanel from './SearchPanel';
|
||||||
import ViewLibrary from './ViewLibrary';
|
import ViewLibrary from './ViewLibrary';
|
||||||
|
|
|
@ -8,7 +8,7 @@ import DropdownCheckbox from '@/components/Common/DropdownCheckbox';
|
||||||
import SelectorButton from '@/components/Common/SelectorButton';
|
import SelectorButton from '@/components/Common/SelectorButton';
|
||||||
import { useAuth } from '@/context/AuthContext';
|
import { useAuth } from '@/context/AuthContext';
|
||||||
import useDropdown from '@/hooks/useDropdown';
|
import useDropdown from '@/hooks/useDropdown';
|
||||||
import { LibraryFilterStrategy } from '@/models/miscelanious';
|
import { LibraryFilterStrategy } from '@/models/miscellaneous';
|
||||||
import { prefixes } from '@/utils/constants';
|
import { prefixes } from '@/utils/constants';
|
||||||
import { describeLibraryFilter, labelLibraryFilter } from '@/utils/labels';
|
import { describeLibraryFilter, labelLibraryFilter } from '@/utils/labels';
|
||||||
|
|
||||||
|
|
|
@ -4,9 +4,9 @@ import clsx from 'clsx';
|
||||||
import { useCallback } from 'react';
|
import { useCallback } from 'react';
|
||||||
|
|
||||||
import ConceptSearch from '@/components/Common/ConceptSearch';
|
import ConceptSearch from '@/components/Common/ConceptSearch';
|
||||||
import { useConceptNavigation } from '@/context/NagivationContext';
|
import { useConceptNavigation } from '@/context/NavigationContext';
|
||||||
import { ILibraryFilter } from '@/models/miscelanious';
|
import { ILibraryFilter } from '@/models/miscellaneous';
|
||||||
import { LibraryFilterStrategy } from '@/models/miscelanious';
|
import { LibraryFilterStrategy } from '@/models/miscellaneous';
|
||||||
|
|
||||||
import PickerStrategy from './PickerStrategy';
|
import PickerStrategy from './PickerStrategy';
|
||||||
|
|
||||||
|
|
|
@ -8,11 +8,11 @@ import TextURL from '@/components/Common/TextURL';
|
||||||
import DataTable, { createColumnHelper } from '@/components/DataTable';
|
import DataTable, { createColumnHelper } from '@/components/DataTable';
|
||||||
import HelpButton from '@/components/Help/HelpButton';
|
import HelpButton from '@/components/Help/HelpButton';
|
||||||
import { useAuth } from '@/context/AuthContext';
|
import { useAuth } from '@/context/AuthContext';
|
||||||
import { useConceptNavigation } from '@/context/NagivationContext';
|
import { useConceptNavigation } from '@/context/NavigationContext';
|
||||||
import { useUsers } from '@/context/UsersContext';
|
import { useUsers } from '@/context/UsersContext';
|
||||||
import useLocalStorage from '@/hooks/useLocalStorage';
|
import useLocalStorage from '@/hooks/useLocalStorage';
|
||||||
import { ILibraryItem } from '@/models/library';
|
import { ILibraryItem } from '@/models/library';
|
||||||
import { HelpTopic } from '@/models/miscelanious';
|
import { HelpTopic } from '@/models/miscellaneous';
|
||||||
|
|
||||||
import ItemIcons from './ItemIcons';
|
import ItemIcons from './ItemIcons';
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@ import TextURL from '@/components/Common/TextURL';
|
||||||
import ExpectedAnonymous from '@/components/ExpectedAnonymous';
|
import ExpectedAnonymous from '@/components/ExpectedAnonymous';
|
||||||
import InfoError, { ErrorData } from '@/components/InfoError';
|
import InfoError, { ErrorData } from '@/components/InfoError';
|
||||||
import { useAuth } from '@/context/AuthContext';
|
import { useAuth } from '@/context/AuthContext';
|
||||||
import { useConceptNavigation } from '@/context/NagivationContext';
|
import { useConceptNavigation } from '@/context/NavigationContext';
|
||||||
import useQueryStrings from '@/hooks/useQueryStrings';
|
import useQueryStrings from '@/hooks/useQueryStrings';
|
||||||
import { IUserLoginData } from '@/models/library';
|
import { IUserLoginData } from '@/models/library';
|
||||||
import { classnames, resources } from '@/utils/constants';
|
import { classnames, resources } from '@/utils/constants';
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
'use client';
|
'use client';
|
||||||
|
|
||||||
import { useConceptNavigation } from '@/context/NagivationContext';
|
import { useConceptNavigation } from '@/context/NavigationContext';
|
||||||
import { useConceptTheme } from '@/context/ThemeContext';
|
import { useConceptTheme } from '@/context/ThemeContext';
|
||||||
import useQueryStrings from '@/hooks/useQueryStrings';
|
import useQueryStrings from '@/hooks/useQueryStrings';
|
||||||
import { HelpTopic } from '@/models/miscelanious';
|
import { HelpTopic } from '@/models/miscellaneous';
|
||||||
|
|
||||||
import TopicsList from './TopicsList';
|
import TopicsList from './TopicsList';
|
||||||
import ViewTopic from './ViewTopic';
|
import ViewTopic from './ViewTopic';
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import clsx from 'clsx';
|
import clsx from 'clsx';
|
||||||
|
|
||||||
import { HelpTopic } from '@/models/miscelanious';
|
import { HelpTopic } from '@/models/miscellaneous';
|
||||||
import { prefixes } from '@/utils/constants';
|
import { prefixes } from '@/utils/constants';
|
||||||
import { describeHelpTopic, labelHelpTopic } from '@/utils/labels';
|
import { describeHelpTopic, labelHelpTopic } from '@/utils/labels';
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import InfoTopic from '@/components/Help/InfoTopic';
|
import InfoTopic from '@/components/Help/InfoTopic';
|
||||||
import { HelpTopic } from '@/models/miscelanious';
|
import { HelpTopic } from '@/models/miscellaneous';
|
||||||
|
|
||||||
interface ViewTopicProps {
|
interface ViewTopicProps {
|
||||||
topic: HelpTopic
|
topic: HelpTopic
|
||||||
|
|
|
@ -7,7 +7,7 @@ import { FiSave } from 'react-icons/fi';
|
||||||
import MiniButton from '@/components/Common/MiniButton';
|
import MiniButton from '@/components/Common/MiniButton';
|
||||||
import Overlay from '@/components/Common/Overlay';
|
import Overlay from '@/components/Common/Overlay';
|
||||||
import HelpButton from '@/components/Help/HelpButton';
|
import HelpButton from '@/components/Help/HelpButton';
|
||||||
import { HelpTopic } from '@/models/miscelanious';
|
import { HelpTopic } from '@/models/miscellaneous';
|
||||||
|
|
||||||
interface ConstituentaToolbarProps {
|
interface ConstituentaToolbarProps {
|
||||||
isMutable: boolean
|
isMutable: boolean
|
||||||
|
|
|
@ -13,10 +13,10 @@ import ViewConstituents from '../ViewConstituents';
|
||||||
import ConstituentaToolbar from './ConstituentaToolbar';
|
import ConstituentaToolbar from './ConstituentaToolbar';
|
||||||
import FormConstituenta from './FormConstituenta';
|
import FormConstituenta from './FormConstituenta';
|
||||||
|
|
||||||
// Max height of content for left enditor pane.
|
// Max height of content for left editor pane.
|
||||||
const UNFOLDED_HEIGHT = '59.1rem';
|
const UNFOLDED_HEIGHT = '59.1rem';
|
||||||
|
|
||||||
// Thershold window width to hide side constituents list.
|
// Threshold window width to hide side constituents list.
|
||||||
const SIDELIST_HIDE_THRESHOLD = 1100; // px
|
const SIDELIST_HIDE_THRESHOLD = 1100; // px
|
||||||
|
|
||||||
interface EditorConstituentaProps {
|
interface EditorConstituentaProps {
|
||||||
|
|
|
@ -63,9 +63,9 @@ function EditorRSExpression({
|
||||||
resetParse();
|
resetParse();
|
||||||
}, [activeCst, resetParse, toggleReset]);
|
}, [activeCst, resetParse, toggleReset]);
|
||||||
|
|
||||||
function handleChange(newvalue: string) {
|
function handleChange(newValue: string) {
|
||||||
onChange(newvalue);
|
onChange(newValue);
|
||||||
setIsModified(newvalue !== activeCst?.definition_formal);
|
setIsModified(newValue !== activeCst?.definition_formal);
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleCheckExpression(callback?: (parse: IExpressionParse) => void) {
|
function handleCheckExpression(callback?: (parse: IExpressionParse) => void) {
|
||||||
|
|
|
@ -9,7 +9,7 @@ import { ExpressionStatus } from '@/models/rsform';
|
||||||
import { type IConstituenta } from '@/models/rsform';
|
import { type IConstituenta } from '@/models/rsform';
|
||||||
import { inferStatus } from '@/models/rsformAPI';
|
import { inferStatus } from '@/models/rsformAPI';
|
||||||
import { IExpressionParse, ParsingStatus } from '@/models/rslang';
|
import { IExpressionParse, ParsingStatus } from '@/models/rslang';
|
||||||
import { colorbgCstStatus } from '@/utils/color';
|
import { colorBgCstStatus } from '@/utils/color';
|
||||||
import { globalIDs } from '@/utils/constants';
|
import { globalIDs } from '@/utils/constants';
|
||||||
import { labelExpressionStatus } from '@/utils/labels';
|
import { labelExpressionStatus } from '@/utils/labels';
|
||||||
|
|
||||||
|
@ -46,7 +46,7 @@ function StatusBar({ isModified, processing, constituenta, parseData, onAnalyze
|
||||||
'cursor-pointer',
|
'cursor-pointer',
|
||||||
'duration-500 transition-colors'
|
'duration-500 transition-colors'
|
||||||
)}
|
)}
|
||||||
style={{backgroundColor: processing ? colors.bgDefault : colorbgCstStatus(status, colors)}}
|
style={{backgroundColor: processing ? colors.bgDefault : colorBgCstStatus(status, colors)}}
|
||||||
data-tooltip-id={globalIDs.tooltip}
|
data-tooltip-id={globalIDs.tooltip}
|
||||||
data-tooltip-content='Проверить определение [Ctrl + Q]'
|
data-tooltip-content='Проверить определение [Ctrl + Q]'
|
||||||
onClick={onAnalyze}
|
onClick={onAnalyze}
|
||||||
|
|
|
@ -25,17 +25,17 @@ function RSFormStats({ stats }: RSFormStatsProps) {
|
||||||
label='Неразмерных'
|
label='Неразмерных'
|
||||||
text={stats.count_property}
|
text={stats.count_property}
|
||||||
/> : null}
|
/> : null}
|
||||||
{stats.count_incalc !== 0 ?
|
{stats.count_incalculable !== 0 ?
|
||||||
<LabeledValue id='count_incalc'
|
<LabeledValue id='count_incalculable'
|
||||||
label='Невычислимых'
|
label='Невычислимых'
|
||||||
text={stats.count_incalc}
|
text={stats.count_incalculable}
|
||||||
/> : null}
|
/> : null}
|
||||||
|
|
||||||
<Divider margins='my-2' />
|
<Divider margins='my-2' />
|
||||||
|
|
||||||
<LabeledValue id='count_termin'
|
<LabeledValue id='count_text_term'
|
||||||
label='Термины'
|
label='Термины'
|
||||||
text={stats.count_termin}
|
text={stats.count_text_term}
|
||||||
/>
|
/>
|
||||||
<LabeledValue id='count_definition'
|
<LabeledValue id='count_definition'
|
||||||
label='Определения'
|
label='Определения'
|
||||||
|
|
|
@ -8,7 +8,7 @@ import { LuCrown } from 'react-icons/lu';
|
||||||
import MiniButton from '@/components/Common/MiniButton';
|
import MiniButton from '@/components/Common/MiniButton';
|
||||||
import Overlay from '@/components/Common/Overlay';
|
import Overlay from '@/components/Common/Overlay';
|
||||||
import HelpButton from '@/components/Help/HelpButton';
|
import HelpButton from '@/components/Help/HelpButton';
|
||||||
import { HelpTopic } from '@/models/miscelanious';
|
import { HelpTopic } from '@/models/miscellaneous';
|
||||||
|
|
||||||
interface RSFormToolbarProps {
|
interface RSFormToolbarProps {
|
||||||
isMutable: boolean
|
isMutable: boolean
|
||||||
|
|
|
@ -12,7 +12,7 @@ import MiniButton from '@/components/Common/MiniButton';
|
||||||
import Overlay from '@/components/Common/Overlay';
|
import Overlay from '@/components/Common/Overlay';
|
||||||
import HelpButton from '@/components/Help/HelpButton';
|
import HelpButton from '@/components/Help/HelpButton';
|
||||||
import useDropdown from '@/hooks/useDropdown';
|
import useDropdown from '@/hooks/useDropdown';
|
||||||
import { HelpTopic } from '@/models/miscelanious';
|
import { HelpTopic } from '@/models/miscellaneous';
|
||||||
import { CstType } from '@/models/rsform';
|
import { CstType } from '@/models/rsform';
|
||||||
import { prefixes } from '@/utils/constants';
|
import { prefixes } from '@/utils/constants';
|
||||||
import { labelCstType } from '@/utils/labels';
|
import { labelCstType } from '@/utils/labels';
|
||||||
|
|
|
@ -12,9 +12,9 @@ import { useRSForm } from '@/context/RSFormContext';
|
||||||
import { useConceptTheme } from '@/context/ThemeContext';
|
import { useConceptTheme } from '@/context/ThemeContext';
|
||||||
import DlgGraphParams from '@/dialogs/DlgGraphParams';
|
import DlgGraphParams from '@/dialogs/DlgGraphParams';
|
||||||
import useLocalStorage from '@/hooks/useLocalStorage';
|
import useLocalStorage from '@/hooks/useLocalStorage';
|
||||||
import { GraphColoringScheme, GraphFilterParams } from '@/models/miscelanious';
|
import { GraphColoringScheme, GraphFilterParams } from '@/models/miscellaneous';
|
||||||
import { CstType, ICstCreateData } from '@/models/rsform';
|
import { CstType, ICstCreateData } from '@/models/rsform';
|
||||||
import { colorbgGraphNode } from '@/utils/color';
|
import { colorBgGraphNode } from '@/utils/color';
|
||||||
import { classnames, TIMEOUT_GRAPH_REFRESH } from '@/utils/constants';
|
import { classnames, TIMEOUT_GRAPH_REFRESH } from '@/utils/constants';
|
||||||
|
|
||||||
import GraphSidebar from './GraphSidebar';
|
import GraphSidebar from './GraphSidebar';
|
||||||
|
@ -103,7 +103,7 @@ function EditorTermGraph({ isMutable, onOpenEdit, onCreateCst, onDeleteCst }: Ed
|
||||||
if (cst) {
|
if (cst) {
|
||||||
result.push({
|
result.push({
|
||||||
id: String(node.id),
|
id: String(node.id),
|
||||||
fill: colorbgGraphNode(cst, coloringScheme, colors),
|
fill: colorBgGraphNode(cst, coloringScheme, colors),
|
||||||
label: cst.term_resolved && !filterParams.noText ? `${cst.alias}: ${cst.term_resolved}` : cst.alias
|
label: cst.term_resolved && !filterParams.noText ? `${cst.alias}: ${cst.term_resolved}` : cst.alias
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
import { LayoutTypes } from 'reagraph';
|
import { LayoutTypes } from 'reagraph';
|
||||||
|
|
||||||
import SelectSingle from '@/components/Common/SelectSingle';
|
import SelectSingle from '@/components/Common/SelectSingle';
|
||||||
import { GraphColoringScheme } from '@/models/miscelanious';
|
import { GraphColoringScheme } from '@/models/miscellaneous';
|
||||||
import { mapLabelColoring, mapLableLayout } from '@/utils/labels';
|
import { mapLabelColoring, mapLabelLayout } from '@/utils/labels';
|
||||||
import { SelectorGraphColoring, SelectorGraphLayout } from '@/utils/selectors';
|
import { SelectorGraphColoring, SelectorGraphLayout } from '@/utils/selectors';
|
||||||
|
|
||||||
interface GraphSidebarProps {
|
interface GraphSidebarProps {
|
||||||
|
@ -30,7 +30,7 @@ function GraphSidebar({
|
||||||
placeholder='Способ расположения'
|
placeholder='Способ расположения'
|
||||||
options={SelectorGraphLayout}
|
options={SelectorGraphLayout}
|
||||||
isSearchable={false}
|
isSearchable={false}
|
||||||
value={layout ? { value: layout, label: mapLableLayout.get(layout) } : null}
|
value={layout ? { value: layout, label: mapLabelLayout.get(layout) } : null}
|
||||||
onChange={data => setLayout(data?.value ?? SelectorGraphLayout[0].value)}
|
onChange={data => setLayout(data?.value ?? SelectorGraphLayout[0].value)}
|
||||||
/>
|
/>
|
||||||
</div>);
|
</div>);
|
||||||
|
|
|
@ -5,7 +5,7 @@ import { BiCollapse, BiFilterAlt, BiFont, BiFontFamily, BiPlanet, BiPlusCircle,
|
||||||
import MiniButton from '@/components/Common/MiniButton';
|
import MiniButton from '@/components/Common/MiniButton';
|
||||||
import Overlay from '@/components/Common/Overlay';
|
import Overlay from '@/components/Common/Overlay';
|
||||||
import HelpButton from '@/components/Help/HelpButton';
|
import HelpButton from '@/components/Help/HelpButton';
|
||||||
import { HelpTopic } from '@/models/miscelanious';
|
import { HelpTopic } from '@/models/miscellaneous';
|
||||||
|
|
||||||
interface GraphToolbarProps {
|
interface GraphToolbarProps {
|
||||||
isMutable: boolean
|
isMutable: boolean
|
||||||
|
|
|
@ -4,9 +4,9 @@ import { useCallback, useMemo } from 'react';
|
||||||
|
|
||||||
import ConstituentaTooltip from '@/components/Help/ConstituentaTooltip';
|
import ConstituentaTooltip from '@/components/Help/ConstituentaTooltip';
|
||||||
import { useConceptTheme } from '@/context/ThemeContext';
|
import { useConceptTheme } from '@/context/ThemeContext';
|
||||||
import { GraphColoringScheme } from '@/models/miscelanious';
|
import { GraphColoringScheme } from '@/models/miscellaneous';
|
||||||
import { IRSForm } from '@/models/rsform';
|
import { IRSForm } from '@/models/rsform';
|
||||||
import { colorbgGraphNode } from '@/utils/color';
|
import { colorBgGraphNode } from '@/utils/color';
|
||||||
import { prefixes } from '@/utils/constants';
|
import { prefixes } from '@/utils/constants';
|
||||||
|
|
||||||
interface ViewHiddenProps {
|
interface ViewHiddenProps {
|
||||||
|
@ -56,7 +56,7 @@ function ViewHidden({
|
||||||
<div key={id} id={id}
|
<div key={id} id={id}
|
||||||
className='min-w-[3rem] rounded-md text-center cursor-pointer select-none'
|
className='min-w-[3rem] rounded-md text-center cursor-pointer select-none'
|
||||||
style={{
|
style={{
|
||||||
backgroundColor: colorbgGraphNode(cst, adjustedColoring, colors),
|
backgroundColor: colorBgGraphNode(cst, adjustedColoring, colors),
|
||||||
...dismissedStyle(cstID)
|
...dismissedStyle(cstID)
|
||||||
}}
|
}}
|
||||||
onClick={() => toggleSelection(cstID)}
|
onClick={() => toggleSelection(cstID)}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { useLayoutEffect, useMemo, useState } from 'react';
|
import { useLayoutEffect, useMemo, useState } from 'react';
|
||||||
|
|
||||||
import { GraphFilterParams } from '@/models/miscelanious';
|
import { GraphFilterParams } from '@/models/miscellaneous';
|
||||||
import { CstType, IRSForm } from '@/models/rsform';
|
import { CstType, IRSForm } from '@/models/rsform';
|
||||||
import { Graph } from '@/utils/Graph';
|
import { Graph } from '@/utils/Graph';
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@ import InfoError, { ErrorData } from '@/components/InfoError';
|
||||||
import { useAccessMode } from '@/context/AccessModeContext';
|
import { useAccessMode } from '@/context/AccessModeContext';
|
||||||
import { useAuth } from '@/context/AuthContext';
|
import { useAuth } from '@/context/AuthContext';
|
||||||
import { useLibrary } from '@/context/LibraryContext';
|
import { useLibrary } from '@/context/LibraryContext';
|
||||||
import { useBlockNavigation, useConceptNavigation } from '@/context/NagivationContext';
|
import { useBlockNavigation, useConceptNavigation } from '@/context/NavigationContext';
|
||||||
import { useRSForm } from '@/context/RSFormContext';
|
import { useRSForm } from '@/context/RSFormContext';
|
||||||
import { useConceptTheme } from '@/context/ThemeContext';
|
import { useConceptTheme } from '@/context/ThemeContext';
|
||||||
import DlgCloneLibraryItem from '@/dialogs/DlgCloneLibraryItem';
|
import DlgCloneLibraryItem from '@/dialogs/DlgCloneLibraryItem';
|
||||||
|
@ -26,7 +26,7 @@ import DlgEditWordForms from '@/dialogs/DlgEditWordForms';
|
||||||
import DlgRenameCst from '@/dialogs/DlgRenameCst';
|
import DlgRenameCst from '@/dialogs/DlgRenameCst';
|
||||||
import DlgUploadRSForm from '@/dialogs/DlgUploadRSForm';
|
import DlgUploadRSForm from '@/dialogs/DlgUploadRSForm';
|
||||||
import useQueryStrings from '@/hooks/useQueryStrings';
|
import useQueryStrings from '@/hooks/useQueryStrings';
|
||||||
import { UserAccessMode } from '@/models/miscelanious';
|
import { UserAccessMode } from '@/models/miscellaneous';
|
||||||
import { IConstituenta, ICstCreateData, ICstRenameData, ICstUpdateData, TermForm } from '@/models/rsform';
|
import { IConstituenta, ICstCreateData, ICstRenameData, ICstUpdateData, TermForm } from '@/models/rsform';
|
||||||
import { EXTEOR_TRS_FILE, prefixes, TIMEOUT_UI_REFRESH } from '@/utils/constants';
|
import { EXTEOR_TRS_FILE, prefixes, TIMEOUT_UI_REFRESH } from '@/utils/constants';
|
||||||
import { createAliasFor } from '@/utils/misc';
|
import { createAliasFor } from '@/utils/misc';
|
||||||
|
|
|
@ -9,10 +9,10 @@ import Dropdown from '@/components/Common/Dropdown';
|
||||||
import DropdownButton from '@/components/Common/DropdownButton';
|
import DropdownButton from '@/components/Common/DropdownButton';
|
||||||
import { useAccessMode } from '@/context/AccessModeContext';
|
import { useAccessMode } from '@/context/AccessModeContext';
|
||||||
import { useAuth } from '@/context/AuthContext';
|
import { useAuth } from '@/context/AuthContext';
|
||||||
import { useConceptNavigation } from '@/context/NagivationContext';
|
import { useConceptNavigation } from '@/context/NavigationContext';
|
||||||
import { useRSForm } from '@/context/RSFormContext';
|
import { useRSForm } from '@/context/RSFormContext';
|
||||||
import useDropdown from '@/hooks/useDropdown';
|
import useDropdown from '@/hooks/useDropdown';
|
||||||
import { UserAccessMode } from '@/models/miscelanious';
|
import { UserAccessMode } from '@/models/miscellaneous';
|
||||||
import { describeAccessMode, labelAccessMode } from '@/utils/labels';
|
import { describeAccessMode, labelAccessMode } from '@/utils/labels';
|
||||||
|
|
||||||
interface RSTabsMenuProps {
|
interface RSTabsMenuProps {
|
||||||
|
|
|
@ -9,13 +9,13 @@ import DropdownButton from '@/components/Common/DropdownButton';
|
||||||
import SelectorButton from '@/components/Common/SelectorButton';
|
import SelectorButton from '@/components/Common/SelectorButton';
|
||||||
import useDropdown from '@/hooks/useDropdown';
|
import useDropdown from '@/hooks/useDropdown';
|
||||||
import useLocalStorage from '@/hooks/useLocalStorage';
|
import useLocalStorage from '@/hooks/useLocalStorage';
|
||||||
import { CstMatchMode, DependencyMode } from '@/models/miscelanious';
|
import { CstMatchMode, DependencyMode } from '@/models/miscellaneous';
|
||||||
import { applyGraphFilter } from '@/models/miscelaniousAPI';
|
import { applyGraphFilter } from '@/models/miscellaneousAPI';
|
||||||
import { IConstituenta, IRSForm } from '@/models/rsform';
|
import { IConstituenta, IRSForm } from '@/models/rsform';
|
||||||
import { createMockConstituenta, matchConstituenta } from '@/models/rsformAPI';
|
import { createMockConstituenta, matchConstituenta } from '@/models/rsformAPI';
|
||||||
import { extractGlobals } from '@/models/rslangAPI';
|
import { extractGlobals } from '@/models/rslangAPI';
|
||||||
import { prefixes } from '@/utils/constants';
|
import { prefixes } from '@/utils/constants';
|
||||||
import { describeCstMathchMode, describeCstSource, labelCstMathchMode, labelCstSource } from '@/utils/labels';
|
import { describeCstMatchMode, describeCstSource, labelCstMatchMode, labelCstSource } from '@/utils/labels';
|
||||||
|
|
||||||
interface ConstituentsSearchProps {
|
interface ConstituentsSearchProps {
|
||||||
schema?: IRSForm
|
schema?: IRSForm
|
||||||
|
@ -87,7 +87,7 @@ function ConstituentsSearch({ schema, activeID, activeExpression, setFiltered }:
|
||||||
title='Настройка атрибутов для фильтрации'
|
title='Настройка атрибутов для фильтрации'
|
||||||
className='h-full'
|
className='h-full'
|
||||||
icon={<BiFilterAlt size='1.25rem' />}
|
icon={<BiFilterAlt size='1.25rem' />}
|
||||||
text={labelCstMathchMode(filterMatch)}
|
text={labelCstMatchMode(filterMatch)}
|
||||||
onClick={matchModeMenu.toggle}
|
onClick={matchModeMenu.toggle}
|
||||||
/>
|
/>
|
||||||
<Dropdown stretchLeft isOpen={matchModeMenu.isOpen}>
|
<Dropdown stretchLeft isOpen={matchModeMenu.isOpen}>
|
||||||
|
@ -99,7 +99,7 @@ function ConstituentsSearch({ schema, activeID, activeExpression, setFiltered }:
|
||||||
key={`${prefixes.cst_match_mode_list}${index}`}
|
key={`${prefixes.cst_match_mode_list}${index}`}
|
||||||
onClick={() => handleMatchModeChange(matchMode)}
|
onClick={() => handleMatchModeChange(matchMode)}
|
||||||
>
|
>
|
||||||
<p><b>{labelCstMathchMode(matchMode)}:</b> {describeCstMathchMode(matchMode)}</p>
|
<p><b>{labelCstMatchMode(matchMode)}:</b> {describeCstMatchMode(matchMode)}</p>
|
||||||
</DropdownButton>);
|
</DropdownButton>);
|
||||||
})}
|
})}
|
||||||
</Dropdown>
|
</Dropdown>
|
||||||
|
|
|
@ -63,7 +63,7 @@ function ConstituentsTable({
|
||||||
<ConstituentaBadge
|
<ConstituentaBadge
|
||||||
theme={colors}
|
theme={colors}
|
||||||
value={props.row.original}
|
value={props.row.original}
|
||||||
prefixID={prefixes.cst_sidetable}
|
prefixID={prefixes.cst_side_table}
|
||||||
/>
|
/>
|
||||||
}),
|
}),
|
||||||
columnHelper.accessor(cst => describeConstituenta(cst), {
|
columnHelper.accessor(cst => describeConstituenta(cst), {
|
||||||
|
|
|
@ -10,7 +10,7 @@ import { animateSideView } from '@/utils/animations';
|
||||||
import ConstituentsSearch from './ConstituentsSearch';
|
import ConstituentsSearch from './ConstituentsSearch';
|
||||||
import ConstituentsTable from './ConstituentsTable';
|
import ConstituentsTable from './ConstituentsTable';
|
||||||
|
|
||||||
// Height that should be left to accomodate navigation panel + bottom margin
|
// Height that should be left to accommodate navigation panel + bottom margin
|
||||||
const LOCAL_NAVIGATION_H = '2.1rem';
|
const LOCAL_NAVIGATION_H = '2.1rem';
|
||||||
|
|
||||||
// Window width cutoff for expression show
|
// Window width cutoff for expression show
|
||||||
|
|
|
@ -16,7 +16,7 @@ import TextURL from '@/components/Common/TextURL';
|
||||||
import ExpectedAnonymous from '@/components/ExpectedAnonymous';
|
import ExpectedAnonymous from '@/components/ExpectedAnonymous';
|
||||||
import InfoError from '@/components/InfoError';
|
import InfoError from '@/components/InfoError';
|
||||||
import { useAuth } from '@/context/AuthContext';
|
import { useAuth } from '@/context/AuthContext';
|
||||||
import { useConceptNavigation } from '@/context/NagivationContext';
|
import { useConceptNavigation } from '@/context/NavigationContext';
|
||||||
import { type IUserSignupData } from '@/models/library';
|
import { type IUserSignupData } from '@/models/library';
|
||||||
import { classnames, globalIDs, patterns } from '@/utils/constants';
|
import { classnames, globalIDs, patterns } from '@/utils/constants';
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@ function RestorePasswordPage() {
|
||||||
return (
|
return (
|
||||||
<div className='py-3'>
|
<div className='py-3'>
|
||||||
<p>Автоматическое восстановление пароля не доступно.</p>
|
<p>Автоматическое восстановление пароля не доступно.</p>
|
||||||
<p>Возможно восстановление пароля через обращение на <TextURL href={urls.mailportal} text='portal@acconcept.ru'/></p>
|
<p>Возможно восстановление пароля через обращение на <TextURL href={urls.mail_portal} text='portal@acconcept.ru'/></p>
|
||||||
</div>);
|
</div>);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@ import SubmitButton from '@/components/Common/SubmitButton';
|
||||||
import TextInput from '@/components/Common/TextInput';
|
import TextInput from '@/components/Common/TextInput';
|
||||||
import InfoError, { ErrorData } from '@/components/InfoError';
|
import InfoError, { ErrorData } from '@/components/InfoError';
|
||||||
import { useAuth } from '@/context/AuthContext';
|
import { useAuth } from '@/context/AuthContext';
|
||||||
import { useConceptNavigation } from '@/context/NagivationContext';
|
import { useConceptNavigation } from '@/context/NavigationContext';
|
||||||
import { IUserUpdatePassword } from '@/models/library';
|
import { IUserUpdatePassword } from '@/models/library';
|
||||||
|
|
||||||
function ProcessError({error}: {error: ErrorData}): React.ReactElement {
|
function ProcessError({error}: {error: ErrorData}): React.ReactElement {
|
||||||
|
|
|
@ -6,7 +6,7 @@ import { toast } from 'react-toastify';
|
||||||
|
|
||||||
import SubmitButton from '@/components/Common/SubmitButton';
|
import SubmitButton from '@/components/Common/SubmitButton';
|
||||||
import TextInput from '@/components/Common/TextInput';
|
import TextInput from '@/components/Common/TextInput';
|
||||||
import { useBlockNavigation } from '@/context/NagivationContext';
|
import { useBlockNavigation } from '@/context/NavigationContext';
|
||||||
import { useUserProfile } from '@/context/UserProfileContext';
|
import { useUserProfile } from '@/context/UserProfileContext';
|
||||||
import { IUserUpdateData } from '@/models/library';
|
import { IUserUpdateData } from '@/models/library';
|
||||||
import { classnames } from '@/utils/constants';
|
import { classnames } from '@/utils/constants';
|
||||||
|
|
|
@ -37,7 +37,7 @@ function UserTabs() {
|
||||||
<div>
|
<div>
|
||||||
<Overlay position='top-0 right-0'>
|
<Overlay position='top-0 right-0'>
|
||||||
<MiniButton
|
<MiniButton
|
||||||
title='Показать/Скрыть список отслеживаний'
|
title='Показать/Скрыть отслеживаемые схемы'
|
||||||
icon={showSubs
|
icon={showSubs
|
||||||
? <FiBell size='1.25rem' className='clr-text-primary' />
|
? <FiBell size='1.25rem' className='clr-text-primary' />
|
||||||
: <FiBellOff size='1.25rem' className='clr-text-primary' />
|
: <FiBellOff size='1.25rem' className='clr-text-primary' />
|
||||||
|
|
|
@ -5,7 +5,7 @@ import { useMemo } from 'react';
|
||||||
import { useIntl } from 'react-intl';
|
import { useIntl } from 'react-intl';
|
||||||
|
|
||||||
import DataTable, { createColumnHelper } from '@/components/DataTable';
|
import DataTable, { createColumnHelper } from '@/components/DataTable';
|
||||||
import { useConceptNavigation } from '@/context/NagivationContext';
|
import { useConceptNavigation } from '@/context/NavigationContext';
|
||||||
import { ILibraryItem } from '@/models/library';
|
import { ILibraryItem } from '@/models/library';
|
||||||
import { animateSideView } from '@/utils/animations';
|
import { animateSideView } from '@/utils/animations';
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { Graph } from './Graph';
|
import { Graph } from './Graph';
|
||||||
|
|
||||||
describe('Testing Graph constuction', () => {
|
describe('Testing Graph construction', () => {
|
||||||
test('empty Graph should be empty', () => {
|
test('empty Graph should be empty', () => {
|
||||||
const graph = new Graph();
|
const graph = new Graph();
|
||||||
expect(graph.nodes.size).toBe(0);
|
expect(graph.nodes.size).toBe(0);
|
||||||
|
|
|
@ -10,7 +10,7 @@ import { IEntityReference, ISyntacticReference } from '@/models/language';
|
||||||
import { parseGrammemes } from '@/models/languageAPI';
|
import { parseGrammemes } from '@/models/languageAPI';
|
||||||
import { IConstituenta } from '@/models/rsform';
|
import { IConstituenta } from '@/models/rsform';
|
||||||
|
|
||||||
import { colorfgGrammeme,IColorTheme } from './color';
|
import { colorFgGrammeme,IColorTheme } from './color';
|
||||||
import { describeConstituentaTerm, labelCstTypification, labelGrammeme } from './labels';
|
import { describeConstituentaTerm, labelCstTypification, labelGrammeme } from './labels';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -210,8 +210,8 @@ export function domTooltipEntityReference(ref: IEntityReference, cst: IConstitue
|
||||||
'text-sm text-center whitespace-nowrap'
|
'text-sm text-center whitespace-nowrap'
|
||||||
);
|
);
|
||||||
gram.style.borderWidth = '1px';
|
gram.style.borderWidth = '1px';
|
||||||
gram.style.borderColor = colorfgGrammeme(gramStr, colors);
|
gram.style.borderColor = colorFgGrammeme(gramStr, colors);
|
||||||
gram.style.color = colorfgGrammeme(gramStr, colors);
|
gram.style.color = colorFgGrammeme(gramStr, colors);
|
||||||
gram.style.fontWeight = '600';
|
gram.style.fontWeight = '600';
|
||||||
gram.style.backgroundColor = colors.bgInput;
|
gram.style.backgroundColor = colors.bgInput;
|
||||||
gram.innerText = labelGrammeme(gramStr);
|
gram.innerText = labelGrammeme(gramStr);
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { GramData, Grammeme, NounGrams, PartOfSpeech, VerbGrams } from '@/models/language';
|
import { GramData, Grammeme, NounGrams, PartOfSpeech, VerbGrams } from '@/models/language';
|
||||||
import { GraphColoringScheme } from '@/models/miscelanious';
|
import { GraphColoringScheme } from '@/models/miscellaneous';
|
||||||
import { CstClass, ExpressionStatus, IConstituenta } from '@/models/rsform';
|
import { CstClass, ExpressionStatus, IConstituenta } from '@/models/rsform';
|
||||||
import { ISyntaxTreeNode, TokenID } from '@/models/rslang';
|
import { ISyntaxTreeNode, TokenID } from '@/models/rslang';
|
||||||
|
|
||||||
|
@ -301,7 +301,7 @@ export const bracketsDarkT = {
|
||||||
/**
|
/**
|
||||||
* Determines background color for {@link ISyntaxTreeNode} based on its type.
|
* Determines background color for {@link ISyntaxTreeNode} based on its type.
|
||||||
*/
|
*/
|
||||||
export function colorbgSyntaxTree(node: ISyntaxTreeNode, colors: IColorTheme): string {
|
export function colorBgSyntaxTree(node: ISyntaxTreeNode, colors: IColorTheme): string {
|
||||||
switch (node.typeID) {
|
switch (node.typeID) {
|
||||||
case TokenID.PUNC_DEFINE:
|
case TokenID.PUNC_DEFINE:
|
||||||
case TokenID.PUNC_STRUCT:
|
case TokenID.PUNC_STRUCT:
|
||||||
|
@ -383,7 +383,7 @@ export function colorbgSyntaxTree(node: ISyntaxTreeNode, colors: IColorTheme): s
|
||||||
/**
|
/**
|
||||||
* Determines background color for {@link ExpressionStatus}.
|
* Determines background color for {@link ExpressionStatus}.
|
||||||
*/
|
*/
|
||||||
export function colorbgCstStatus(status: ExpressionStatus, colors: IColorTheme): string {
|
export function colorBgCstStatus(status: ExpressionStatus, colors: IColorTheme): string {
|
||||||
switch (status) {
|
switch (status) {
|
||||||
case ExpressionStatus.VERIFIED: return colors.bgGreen;
|
case ExpressionStatus.VERIFIED: return colors.bgGreen;
|
||||||
case ExpressionStatus.INCORRECT: return colors.bgRed;
|
case ExpressionStatus.INCORRECT: return colors.bgRed;
|
||||||
|
@ -397,7 +397,7 @@ export function colorbgCstStatus(status: ExpressionStatus, colors: IColorTheme):
|
||||||
/**
|
/**
|
||||||
* Determines foreground color for {@link ExpressionStatus}.
|
* Determines foreground color for {@link ExpressionStatus}.
|
||||||
*/
|
*/
|
||||||
export function colorfgCstStatus(status: ExpressionStatus, colors: IColorTheme): string {
|
export function colorFgCstStatus(status: ExpressionStatus, colors: IColorTheme): string {
|
||||||
switch (status) {
|
switch (status) {
|
||||||
case ExpressionStatus.VERIFIED: return colors.fgGreen;
|
case ExpressionStatus.VERIFIED: return colors.fgGreen;
|
||||||
case ExpressionStatus.INCORRECT: return colors.fgRed;
|
case ExpressionStatus.INCORRECT: return colors.fgRed;
|
||||||
|
@ -411,7 +411,7 @@ export function colorfgCstStatus(status: ExpressionStatus, colors: IColorTheme):
|
||||||
/**
|
/**
|
||||||
* Determines background color for {@link IConstituenta} depending on its {@link CstClass}.
|
* Determines background color for {@link IConstituenta} depending on its {@link CstClass}.
|
||||||
*/
|
*/
|
||||||
export function colorbgCstClass(cstClass: CstClass, colors: IColorTheme): string {
|
export function colorBgCstClass(cstClass: CstClass, colors: IColorTheme): string {
|
||||||
switch (cstClass) {
|
switch (cstClass) {
|
||||||
case CstClass.BASIC: return colors.bgGreen;
|
case CstClass.BASIC: return colors.bgGreen;
|
||||||
case CstClass.DERIVED: return colors.bgBlue;
|
case CstClass.DERIVED: return colors.bgBlue;
|
||||||
|
@ -423,7 +423,7 @@ export function colorbgCstClass(cstClass: CstClass, colors: IColorTheme): string
|
||||||
/**
|
/**
|
||||||
* Determines background color for {@link GramData}.
|
* Determines background color for {@link GramData}.
|
||||||
*/
|
*/
|
||||||
export function colorbgGrammeme(gram: GramData, colors: IColorTheme): string {
|
export function colorBgGrammeme(gram: GramData, colors: IColorTheme): string {
|
||||||
if (PartOfSpeech.includes(gram as Grammeme)) {
|
if (PartOfSpeech.includes(gram as Grammeme)) {
|
||||||
return colors.bgBlue;
|
return colors.bgBlue;
|
||||||
}
|
}
|
||||||
|
@ -439,7 +439,7 @@ export function colorbgGrammeme(gram: GramData, colors: IColorTheme): string {
|
||||||
/**
|
/**
|
||||||
* Determines foreground color for {@link GramData}.
|
* Determines foreground color for {@link GramData}.
|
||||||
*/
|
*/
|
||||||
export function colorfgGrammeme(gram: GramData, colors: IColorTheme): string {
|
export function colorFgGrammeme(gram: GramData, colors: IColorTheme): string {
|
||||||
if (PartOfSpeech.includes(gram as Grammeme)) {
|
if (PartOfSpeech.includes(gram as Grammeme)) {
|
||||||
return colors.fgBlue;
|
return colors.fgBlue;
|
||||||
}
|
}
|
||||||
|
@ -459,12 +459,12 @@ export function colorfgGrammeme(gram: GramData, colors: IColorTheme): string {
|
||||||
/**
|
/**
|
||||||
* Determines graph color for {@link IConstituenta}.
|
* Determines graph color for {@link IConstituenta}.
|
||||||
*/
|
*/
|
||||||
export function colorbgGraphNode(cst: IConstituenta, coloringScheme: GraphColoringScheme, colors: IColorTheme): string {
|
export function colorBgGraphNode(cst: IConstituenta, coloringScheme: GraphColoringScheme, colors: IColorTheme): string {
|
||||||
if (coloringScheme === 'type') {
|
if (coloringScheme === 'type') {
|
||||||
return colorbgCstClass(cst.cst_class, colors);
|
return colorBgCstClass(cst.cst_class, colors);
|
||||||
}
|
}
|
||||||
if (coloringScheme === 'status') {
|
if (coloringScheme === 'status') {
|
||||||
return colorbgCstStatus(cst.status, colors);
|
return colorBgCstStatus(cst.status, colors);
|
||||||
}
|
}
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
|
@ -56,7 +56,7 @@ export const youtube = {
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Classname combinations.
|
* Tailwind CSS combinations.
|
||||||
* Note: using clsx in conjunction with tailwindCss is preferred to creating custom CSS
|
* Note: using clsx in conjunction with tailwindCss is preferred to creating custom CSS
|
||||||
*/
|
*/
|
||||||
export const classnames = {
|
export const classnames = {
|
||||||
|
@ -74,9 +74,9 @@ export const urls = {
|
||||||
intro_video: 'https://www.youtube.com/watch?v=0Ty9mu9sOJo',
|
intro_video: 'https://www.youtube.com/watch?v=0Ty9mu9sOJo',
|
||||||
full_course: 'https://www.youtube.com/playlist?list=PLGe_JiAwpqu1C70ruQmCm_OWTWU3KJwDo',
|
full_course: 'https://www.youtube.com/playlist?list=PLGe_JiAwpqu1C70ruQmCm_OWTWU3KJwDo',
|
||||||
|
|
||||||
gitrepo: 'https://github.com/IRBorisov/ConceptPortal',
|
git_repo: 'https://github.com/IRBorisov/ConceptPortal',
|
||||||
mailportal: 'mailto:portal@acconcept.ru',
|
mail_portal: 'mailto:portal@acconcept.ru',
|
||||||
restapi: 'https://api.portal.acconcept.ru'
|
restAPI: 'https://api.portal.acconcept.ru'
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -96,7 +96,7 @@ export const globalIDs = {
|
||||||
export const prefixes = {
|
export const prefixes = {
|
||||||
page_size: 'page-size-',
|
page_size: 'page-size-',
|
||||||
cst_list: 'cst-list-',
|
cst_list: 'cst-list-',
|
||||||
cst_sidetable: 'cst-sidetable-',
|
cst_side_table: 'cst-side-table-',
|
||||||
cst_hidden_list: 'cst-hidden-list-',
|
cst_hidden_list: 'cst-hidden-list-',
|
||||||
cst_modal_list: 'cst-modal-list-',
|
cst_modal_list: 'cst-modal-list-',
|
||||||
cst_template_ist: 'cst-template-list-',
|
cst_template_ist: 'cst-template-list-',
|
||||||
|
|
|
@ -5,12 +5,12 @@
|
||||||
* Description is a long description used in tooltips.
|
* Description is a long description used in tooltips.
|
||||||
*/
|
*/
|
||||||
import { GramData,Grammeme, ReferenceType } from '@/models/language';
|
import { GramData,Grammeme, ReferenceType } from '@/models/language';
|
||||||
import { CstMatchMode, DependencyMode, HelpTopic, LibraryFilterStrategy, UserAccessMode } from '@/models/miscelanious';
|
import { CstMatchMode, DependencyMode, HelpTopic, LibraryFilterStrategy, UserAccessMode } from '@/models/miscellaneous';
|
||||||
import { CstClass, CstType, ExpressionStatus, IConstituenta } from '@/models/rsform';
|
import { CstClass, CstType, ExpressionStatus, IConstituenta } from '@/models/rsform';
|
||||||
import { IArgumentInfo, IRSErrorDescription, ISyntaxTreeNode, ParsingStatus, RSErrorType, TokenID } from '@/models/rslang';
|
import { IArgumentInfo, IRSErrorDescription, ISyntaxTreeNode, ParsingStatus, RSErrorType, TokenID } from '@/models/rslang';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generates desription for {@link IConstituenta}.
|
* Generates description for {@link IConstituenta}.
|
||||||
*/
|
*/
|
||||||
export function describeConstituenta(cst: IConstituenta): string {
|
export function describeConstituenta(cst: IConstituenta): string {
|
||||||
if (cst.cst_type === CstType.STRUCTURED) {
|
if (cst.cst_type === CstType.STRUCTURED) {
|
||||||
|
@ -31,7 +31,7 @@ export function describeConstituenta(cst: IConstituenta): string {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generates desription for term of a given {@link IConstituenta}.
|
* Generates description for term of a given {@link IConstituenta}.
|
||||||
*/
|
*/
|
||||||
export function describeConstituentaTerm(cst?: IConstituenta): string {
|
export function describeConstituentaTerm(cst?: IConstituenta): string {
|
||||||
if (!cst) {
|
if (!cst) {
|
||||||
|
@ -145,7 +145,7 @@ export function describeToken(id: TokenID): string {
|
||||||
/**
|
/**
|
||||||
* Retrieves label for {@link CstMatchMode}.
|
* Retrieves label for {@link CstMatchMode}.
|
||||||
*/
|
*/
|
||||||
export function labelCstMathchMode(mode: CstMatchMode): string {
|
export function labelCstMatchMode(mode: CstMatchMode): string {
|
||||||
switch (mode) {
|
switch (mode) {
|
||||||
case CstMatchMode.ALL: return 'общий';
|
case CstMatchMode.ALL: return 'общий';
|
||||||
case CstMatchMode.EXPR: return 'выражение';
|
case CstMatchMode.EXPR: return 'выражение';
|
||||||
|
@ -158,7 +158,7 @@ export function labelCstMathchMode(mode: CstMatchMode): string {
|
||||||
/**
|
/**
|
||||||
* Retrieves description for {@link CstMatchMode}.
|
* Retrieves description for {@link CstMatchMode}.
|
||||||
*/
|
*/
|
||||||
export function describeCstMathchMode(mode: CstMatchMode): string {
|
export function describeCstMatchMode(mode: CstMatchMode): string {
|
||||||
switch (mode) {
|
switch (mode) {
|
||||||
case CstMatchMode.ALL: return 'искать во всех атрибутах';
|
case CstMatchMode.ALL: return 'искать во всех атрибутах';
|
||||||
case CstMatchMode.EXPR: return 'искать в формальных выражениях';
|
case CstMatchMode.EXPR: return 'искать в формальных выражениях';
|
||||||
|
@ -190,7 +190,7 @@ export function describeCstSource(mode: DependencyMode): string {
|
||||||
case DependencyMode.ALL: return 'все конституенты';
|
case DependencyMode.ALL: return 'все конституенты';
|
||||||
case DependencyMode.EXPRESSION: return 'идентификаторы из выражения';
|
case DependencyMode.EXPRESSION: return 'идентификаторы из выражения';
|
||||||
case DependencyMode.OUTPUTS: return 'прямые ссылки на текущую';
|
case DependencyMode.OUTPUTS: return 'прямые ссылки на текущую';
|
||||||
case DependencyMode.INPUTS: return 'пярмые ссылки из текущей';
|
case DependencyMode.INPUTS: return 'прямые ссылки из текущей';
|
||||||
case DependencyMode.EXPAND_OUTPUTS: return 'опосредованные ссылки на текущую';
|
case DependencyMode.EXPAND_OUTPUTS: return 'опосредованные ссылки на текущую';
|
||||||
case DependencyMode.EXPAND_INPUTS: return 'опосредованные ссылки из текущей';
|
case DependencyMode.EXPAND_INPUTS: return 'опосредованные ссылки из текущей';
|
||||||
}
|
}
|
||||||
|
@ -218,16 +218,16 @@ export function describeLibraryFilter(strategy: LibraryFilterStrategy): string {
|
||||||
case LibraryFilterStrategy.MANUAL: return 'Отображать все схемы';
|
case LibraryFilterStrategy.MANUAL: return 'Отображать все схемы';
|
||||||
case LibraryFilterStrategy.COMMON: return 'Отображать общедоступные схемы';
|
case LibraryFilterStrategy.COMMON: return 'Отображать общедоступные схемы';
|
||||||
case LibraryFilterStrategy.CANONICAL: return 'Отображать стандартные схемы';
|
case LibraryFilterStrategy.CANONICAL: return 'Отображать стандартные схемы';
|
||||||
case LibraryFilterStrategy.PERSONAL: return 'Отображать подписки и владеемые схемы';
|
case LibraryFilterStrategy.PERSONAL: return 'Отображать подписки и собственные схемы';
|
||||||
case LibraryFilterStrategy.SUBSCRIBE: return 'Отображать подписки';
|
case LibraryFilterStrategy.SUBSCRIBE: return 'Отображать подписки';
|
||||||
case LibraryFilterStrategy.OWNED: return 'Отображать владеемые схемы';
|
case LibraryFilterStrategy.OWNED: return 'Отображать собственные схемы';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieves label for graph layout mode.
|
* Retrieves label for graph layout mode.
|
||||||
*/
|
*/
|
||||||
export const mapLableLayout: Map<string, string> =
|
export const mapLabelLayout: Map<string, string> =
|
||||||
new Map([
|
new Map([
|
||||||
['forceatlas2', 'Граф: Атлас 2D'],
|
['forceatlas2', 'Граф: Атлас 2D'],
|
||||||
['forceDirected2d', 'Граф: Силы 2D'],
|
['forceDirected2d', 'Граф: Силы 2D'],
|
||||||
|
@ -263,7 +263,7 @@ export function labelExpressionStatus(status: ExpressionStatus): string {
|
||||||
case ExpressionStatus.INCORRECT: return 'ошибка';
|
case ExpressionStatus.INCORRECT: return 'ошибка';
|
||||||
case ExpressionStatus.INCALCULABLE: return 'невычислимо';
|
case ExpressionStatus.INCALCULABLE: return 'невычислимо';
|
||||||
case ExpressionStatus.PROPERTY: return 'неразмерное';
|
case ExpressionStatus.PROPERTY: return 'неразмерное';
|
||||||
case ExpressionStatus.UNKNOWN: return 'непроверено';
|
case ExpressionStatus.UNKNOWN: return 'не проверено';
|
||||||
case ExpressionStatus.UNDEFINED: return 'N/A';
|
case ExpressionStatus.UNDEFINED: return 'N/A';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -310,7 +310,7 @@ export function describeHelpTopic(topic: HelpTopic): string {
|
||||||
case HelpTopic.MAIN: return 'Общая справка по порталу';
|
case HelpTopic.MAIN: return 'Общая справка по порталу';
|
||||||
case HelpTopic.LIBRARY: return 'Описание работы с библиотекой схем';
|
case HelpTopic.LIBRARY: return 'Описание работы с библиотекой схем';
|
||||||
case HelpTopic.RSFORM: return 'Описание работы с описанием схемы';
|
case HelpTopic.RSFORM: return 'Описание работы с описанием схемы';
|
||||||
case HelpTopic.CSTLIST: return 'Описание работы со списком конституентт';
|
case HelpTopic.CSTLIST: return 'Описание работы со списком конституент';
|
||||||
case HelpTopic.CONSTITUENTA: return 'Описание редактирования конституенты';
|
case HelpTopic.CONSTITUENTA: return 'Описание редактирования конституенты';
|
||||||
case HelpTopic.GRAPH_TERM: return 'Описание работы с графом термов схемы';
|
case HelpTopic.GRAPH_TERM: return 'Описание работы с графом термов схемы';
|
||||||
case HelpTopic.RSTEMPLATES: return 'Описание работы с Банком выражений>';
|
case HelpTopic.RSTEMPLATES: return 'Описание работы с Банком выражений>';
|
||||||
|
@ -325,8 +325,8 @@ export function describeHelpTopic(topic: HelpTopic): string {
|
||||||
/**
|
/**
|
||||||
* Retrieves label for {@link CstType}.
|
* Retrieves label for {@link CstType}.
|
||||||
*/
|
*/
|
||||||
export function labelCstType(type: CstType): string {
|
export function labelCstType(target: CstType): string {
|
||||||
switch (type) {
|
switch (target) {
|
||||||
case CstType.BASE: return 'Базисное множество';
|
case CstType.BASE: return 'Базисное множество';
|
||||||
case CstType.CONSTANT: return 'Константное множество';
|
case CstType.CONSTANT: return 'Константное множество';
|
||||||
case CstType.STRUCTURED: return 'Родовая структура';
|
case CstType.STRUCTURED: return 'Родовая структура';
|
||||||
|
@ -341,8 +341,8 @@ export function labelCstType(type: CstType): string {
|
||||||
/**
|
/**
|
||||||
* Retrieves label for {@link ReferenceType}.
|
* Retrieves label for {@link ReferenceType}.
|
||||||
*/
|
*/
|
||||||
export function labelReferenceType(type: ReferenceType): string {
|
export function labelReferenceType(target: ReferenceType): string {
|
||||||
switch(type) {
|
switch(target) {
|
||||||
case ReferenceType.ENTITY: return 'Использование термина';
|
case ReferenceType.ENTITY: return 'Использование термина';
|
||||||
case ReferenceType.SYNTACTIC: return 'Связывание слов';
|
case ReferenceType.SYNTACTIC: return 'Связывание слов';
|
||||||
}
|
}
|
||||||
|
@ -351,8 +351,8 @@ export function labelReferenceType(type: ReferenceType): string {
|
||||||
/**
|
/**
|
||||||
* Retrieves label for {@link CstClass}.
|
* Retrieves label for {@link CstClass}.
|
||||||
*/
|
*/
|
||||||
export function labelCstClass(cclass: CstClass): string {
|
export function labelCstClass(target: CstClass): string {
|
||||||
switch (cclass) {
|
switch (target) {
|
||||||
case CstClass.BASIC: return 'базовый';
|
case CstClass.BASIC: return 'базовый';
|
||||||
case CstClass.DERIVED: return 'производный';
|
case CstClass.DERIVED: return 'производный';
|
||||||
case CstClass.STATEMENT: return 'утверждение';
|
case CstClass.STATEMENT: return 'утверждение';
|
||||||
|
@ -363,8 +363,8 @@ export function labelCstClass(cclass: CstClass): string {
|
||||||
/**
|
/**
|
||||||
* Retrieves description for {@link CstClass}.
|
* Retrieves description for {@link CstClass}.
|
||||||
*/
|
*/
|
||||||
export function describeCstClass(cclass: CstClass): string {
|
export function describeCstClass(target: CstClass): string {
|
||||||
switch (cclass) {
|
switch (target) {
|
||||||
case CstClass.BASIC: return 'неопределяемое понятие, требует конвенции';
|
case CstClass.BASIC: return 'неопределяемое понятие, требует конвенции';
|
||||||
case CstClass.DERIVED: return 'выводимое понятие, задаваемое определением';
|
case CstClass.DERIVED: return 'выводимое понятие, задаваемое определением';
|
||||||
case CstClass.STATEMENT: return 'утверждение формальной логики';
|
case CstClass.STATEMENT: return 'утверждение формальной логики';
|
||||||
|
@ -562,7 +562,7 @@ export function describeRSError(error: IRSErrorDescription): string {
|
||||||
return `Неизвестный символ: ${error.params[0]}`;
|
return `Неизвестный символ: ${error.params[0]}`;
|
||||||
case RSErrorType.syntax:
|
case RSErrorType.syntax:
|
||||||
return 'Неопределенная синтаксическая ошибка';
|
return 'Неопределенная синтаксическая ошибка';
|
||||||
case RSErrorType.missingParanthesis:
|
case RSErrorType.missingParenthesis:
|
||||||
return 'Некорректная конструкция языка родов структур, проверьте структуру выражения';
|
return 'Некорректная конструкция языка родов структур, проверьте структуру выражения';
|
||||||
case RSErrorType.missingCurlyBrace:
|
case RSErrorType.missingCurlyBrace:
|
||||||
return "Пропущен символ '}'";
|
return "Пропущен символ '}'";
|
||||||
|
@ -608,13 +608,13 @@ export function describeRSError(error: IRSErrorDescription): string {
|
||||||
return `τ(Pri(a)) = ℬ𝒞i𝔇τ(a). Некорректная типизация аргумента: ${error.params[0]}`;
|
return `τ(Pri(a)) = ℬ𝒞i𝔇τ(a). Некорректная типизация аргумента: ${error.params[0]}`;
|
||||||
case RSErrorType.invalidEnumeration:
|
case RSErrorType.invalidEnumeration:
|
||||||
return `Типизация аргументов перечисления не совпадает: ${error.params[0]} != ${error.params[1]}`;
|
return `Типизация аргументов перечисления не совпадает: ${error.params[0]} != ${error.params[1]}`;
|
||||||
case RSErrorType.ivalidBinding:
|
case RSErrorType.invalidBinding:
|
||||||
return `Количество переменных в кортеже не соответствует размерности декартова произведения`;
|
return `Количество переменных в кортеже не соответствует размерности декартова произведения`;
|
||||||
case RSErrorType.localOutOfScope:
|
case RSErrorType.localOutOfScope:
|
||||||
return `Использование имени переменной вне области действия: ${error.params[0]}`;
|
return `Использование имени переменной вне области действия: ${error.params[0]}`;
|
||||||
case RSErrorType.invalidElementPredicat:
|
case RSErrorType.invalidElementPredicate:
|
||||||
return `Несоответствие типизаций операндов для оператора: ${error.params[0]}${error.params[1]}${error.params[2]}`;
|
return `Несоответствие типизаций операндов для оператора: ${error.params[0]}${error.params[1]}${error.params[2]}`;
|
||||||
case RSErrorType.invalidArgsArtity:
|
case RSErrorType.invalidArgsArity:
|
||||||
return `Неверное число аргументов терм-функции: ${error.params[0]} != ${error.params[1]}`;
|
return `Неверное число аргументов терм-функции: ${error.params[0]} != ${error.params[1]}`;
|
||||||
case RSErrorType.invalidArgumentType:
|
case RSErrorType.invalidArgumentType:
|
||||||
return `Типизация аргумента терм-функции не соответствует объявленной: ${error.params[0]} != ${error.params[1]}`;
|
return `Типизация аргумента терм-функции не соответствует объявленной: ${error.params[0]} != ${error.params[1]}`;
|
||||||
|
|
|
@ -5,7 +5,7 @@ import { LayoutTypes } from 'reagraph';
|
||||||
|
|
||||||
import { type GramData, Grammeme, ReferenceType } from '@/models/language';
|
import { type GramData, Grammeme, ReferenceType } from '@/models/language';
|
||||||
import { grammemeCompare } from '@/models/languageAPI';
|
import { grammemeCompare } from '@/models/languageAPI';
|
||||||
import { GraphColoringScheme } from '@/models/miscelanious';
|
import { GraphColoringScheme } from '@/models/miscellaneous';
|
||||||
import { CstType } from '@/models/rsform';
|
import { CstType } from '@/models/rsform';
|
||||||
|
|
||||||
import { labelGrammeme, labelReferenceType } from './labels';
|
import { labelGrammeme, labelReferenceType } from './labels';
|
||||||
|
|
|
@ -9,7 +9,7 @@ import { AxiosHeaderValue, AxiosResponse } from 'axios';
|
||||||
*/
|
*/
|
||||||
export function assertIsNode(e: EventTarget | null): asserts e is Node {
|
export function assertIsNode(e: EventTarget | null): asserts e is Node {
|
||||||
if (e === null || !('nodeType' in e)) {
|
if (e === null || !('nodeType' in e)) {
|
||||||
throw new TypeError(`Expected 'Node' but recieved '${e?.constructor.name ?? 'null'}'`);
|
throw new TypeError(`Expected 'Node' but received '${e?.constructor.name ?? 'null'}'`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -42,7 +42,7 @@ export class TextMatcher {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Text substitution guided by mapping and regular explression.
|
* Text substitution guided by mapping and regular expression.
|
||||||
*/
|
*/
|
||||||
export function applyPattern(text: string, mapping: { [key: string]: string }, pattern: RegExp): string {
|
export function applyPattern(text: string, mapping: { [key: string]: string }, pattern: RegExp): string {
|
||||||
if (text === '' || pattern === null) {
|
if (text === '' || pattern === null) {
|
||||||
|
@ -65,7 +65,7 @@ export function applyPattern(text: string, mapping: { [key: string]: string }, p
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check if Axios reponse is html.
|
* Check if Axios response is html.
|
||||||
*/
|
*/
|
||||||
export function isResponseHtml(response?: AxiosResponse) {
|
export function isResponseHtml(response?: AxiosResponse) {
|
||||||
if (!response) {
|
if (!response) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user