Compare commits
5 Commits
7f2b621a62
...
dbfab8446c
Author | SHA1 | Date | |
---|---|---|---|
![]() |
dbfab8446c | ||
![]() |
552fb67f09 | ||
![]() |
9ce0607cc3 | ||
![]() |
379f70c2b1 | ||
![]() |
9a009e0131 |
4
.vscode/settings.json
vendored
4
.vscode/settings.json
vendored
|
@ -38,6 +38,10 @@
|
|||
{
|
||||
"name": "django",
|
||||
"depth": 5
|
||||
},
|
||||
{
|
||||
"name": "djangorestframework",
|
||||
"depth": 2
|
||||
}
|
||||
],
|
||||
"colorize.include": [".tsx", ".jsx", ".ts", ".js"],
|
||||
|
|
|
@ -91,7 +91,7 @@ class Graph(Generic[ItemType]):
|
|||
if len(self.inputs[node_id]) == 0:
|
||||
continue
|
||||
for parent in self.inputs[node_id]:
|
||||
result[parent] = result[parent] + [id for id in result[node_id] if not id in result[parent]]
|
||||
result[parent] = result[parent] + [id for id in result[node_id] if id not in result[parent]]
|
||||
return result
|
||||
|
||||
def topological_order(self) -> list[ItemType]:
|
||||
|
|
|
@ -60,12 +60,12 @@ class Editor(Model):
|
|||
''' Set editors for item. '''
|
||||
processed: list[User] = []
|
||||
for editor_item in Editor.objects.filter(item=item):
|
||||
if not editor_item.editor in users:
|
||||
if editor_item.editor not in users:
|
||||
editor_item.delete()
|
||||
else:
|
||||
processed.append(editor_item.editor)
|
||||
|
||||
for user in users:
|
||||
if not user in processed:
|
||||
if user not in processed:
|
||||
processed.append(user)
|
||||
Editor.objects.create(item=item, editor=user)
|
||||
|
|
|
@ -48,19 +48,9 @@ function Navigation() {
|
|||
<Logo />
|
||||
</div>
|
||||
<div className='flex gap-1 py-[0.3rem]'>
|
||||
<NavigationButton
|
||||
text='Новая схема'
|
||||
title='Создать новую схему'
|
||||
icon={<IconNewItem2 size='1.5rem' />}
|
||||
onClick={navigateCreateNew}
|
||||
/>
|
||||
<NavigationButton
|
||||
text='Библиотека'
|
||||
title='Список схем'
|
||||
icon={<IconLibrary2 size='1.5rem' />}
|
||||
onClick={navigateLibrary}
|
||||
/>
|
||||
<NavigationButton text='Справка' title='Справочные материалы' icon={<IconManuals />} onClick={navigateHelp} />
|
||||
<NavigationButton text='Новая схема' icon={<IconNewItem2 size='1.5rem' />} onClick={navigateCreateNew} />
|
||||
<NavigationButton text='Библиотека' icon={<IconLibrary2 size='1.5rem' />} onClick={navigateLibrary} />
|
||||
<NavigationButton text='Справка' icon={<IconManuals size='1.5rem' />} onClick={navigateHelp} />
|
||||
<UserMenu />
|
||||
</div>
|
||||
</motion.div>
|
||||
|
|
|
@ -70,7 +70,7 @@ export const LibraryState = ({ children }: LibraryStateProps) => {
|
|||
|
||||
const [items, setItems] = useState<ILibraryItem[]>([]);
|
||||
const [templates, setTemplates] = useState<ILibraryItem[]>([]);
|
||||
const [loading, setLoading] = useState(false);
|
||||
const [loading, setLoading] = useState(true);
|
||||
const [processing, setProcessing] = useState(false);
|
||||
const [loadingError, setLoadingError] = useState<ErrorData>(undefined);
|
||||
const [processingError, setProcessingError] = useState<ErrorData>(undefined);
|
||||
|
|
|
@ -36,7 +36,7 @@ interface UserProfileStateProps {
|
|||
export const UserProfileState = ({ children }: UserProfileStateProps) => {
|
||||
const { users } = useUsers();
|
||||
const [user, setUser] = useState<IUserProfile | undefined>(undefined);
|
||||
const [loading, setLoading] = useState(false);
|
||||
const [loading, setLoading] = useState(true);
|
||||
const [processing, setProcessing] = useState(false);
|
||||
const [error, setError] = useState<ErrorData>(undefined);
|
||||
const [errorProcessing, setErrorProcessing] = useState<ErrorData>(undefined);
|
||||
|
|
|
@ -86,11 +86,24 @@ function TemplateTab({ state, partialUpdate }: TemplateTabProps) {
|
|||
|
||||
return (
|
||||
<AnimateFade>
|
||||
<div className='flex border-t divide-x border-x rounded-t-md'>
|
||||
<div className='flex border-t border-x rounded-t-md clr-input'>
|
||||
<SelectSingle
|
||||
noBorder
|
||||
placeholder='Источник'
|
||||
className='w-[12rem]'
|
||||
options={templateSelector}
|
||||
value={
|
||||
state.templateID
|
||||
? { value: state.templateID, label: templates.find(item => item.id == state.templateID)!.title }
|
||||
: null
|
||||
}
|
||||
onChange={data => partialUpdate({ templateID: data ? data.value : undefined })}
|
||||
/>
|
||||
<SelectSingle
|
||||
noBorder
|
||||
isSearchable={false}
|
||||
placeholder='Выберите категорию'
|
||||
className='flex-grow border-none'
|
||||
className='flex-grow ml-1 border-none'
|
||||
options={categorySelector}
|
||||
value={
|
||||
state.filterCategory && templateSchema
|
||||
|
@ -105,18 +118,6 @@ function TemplateTab({ state, partialUpdate }: TemplateTabProps) {
|
|||
}
|
||||
isClearable
|
||||
/>
|
||||
<SelectSingle
|
||||
noBorder
|
||||
placeholder='Источник'
|
||||
className='w-[12rem]'
|
||||
options={templateSelector}
|
||||
value={
|
||||
state.templateID
|
||||
? { value: state.templateID, label: templates.find(item => item.id == state.templateID)!.title }
|
||||
: null
|
||||
}
|
||||
onChange={data => partialUpdate({ templateID: data ? data.value : undefined })}
|
||||
/>
|
||||
</div>
|
||||
<PickConstituenta
|
||||
id='dlg_template_picker'
|
||||
|
|
|
@ -165,14 +165,14 @@ function DlgEditWordForms({ hideWindow, target, onSave }: DlgEditWordFormsProps)
|
|||
noHover
|
||||
title='Определить граммемы'
|
||||
icon={<IconMoveRight size='1.25rem' className='icon-primary' />}
|
||||
disabled={textProcessor.loading || !inputText}
|
||||
disabled={textProcessor.processing || !inputText}
|
||||
onClick={handleParse}
|
||||
/>
|
||||
<MiniButton
|
||||
noHover
|
||||
title='Генерировать словоформу'
|
||||
icon={<IconMoveLeft size='1.25rem' className='icon-primary' />}
|
||||
disabled={textProcessor.loading || inputGrams.length == 0}
|
||||
disabled={textProcessor.processing || inputGrams.length == 0}
|
||||
onClick={handleInflect}
|
||||
/>
|
||||
</div>
|
||||
|
@ -190,14 +190,14 @@ function DlgEditWordForms({ hideWindow, target, onSave }: DlgEditWordFormsProps)
|
|||
noHover
|
||||
title='Внести словоформу'
|
||||
icon={<IconAccept size='1.5rem' className='icon-green' />}
|
||||
disabled={textProcessor.loading || !inputText || inputGrams.length == 0}
|
||||
disabled={textProcessor.processing || !inputText || inputGrams.length == 0}
|
||||
onClick={handleAddForm}
|
||||
/>
|
||||
<MiniButton
|
||||
noHover
|
||||
title='Генерировать стандартные словоформы'
|
||||
icon={<IconMoveDown size='1.5rem' className='icon-primary' />}
|
||||
disabled={textProcessor.loading || !inputText}
|
||||
disabled={textProcessor.processing || !inputText}
|
||||
onClick={handleGenerateLexeme}
|
||||
/>
|
||||
</div>
|
||||
|
@ -210,7 +210,7 @@ function DlgEditWordForms({ hideWindow, target, onSave }: DlgEditWordFormsProps)
|
|||
title='Сбросить все словоформы'
|
||||
className='py-0'
|
||||
icon={<IconRemove size='1.5rem' className='icon-red' />}
|
||||
disabled={textProcessor.loading || forms.length === 0}
|
||||
disabled={textProcessor.processing || forms.length === 0}
|
||||
onClick={handleResetAll}
|
||||
/>
|
||||
</div>
|
||||
|
|
|
@ -11,7 +11,7 @@ import { RSErrorType } from '@/models/rslang';
|
|||
import { PARAMETER } from '@/utils/constants';
|
||||
|
||||
function useCheckExpression({ schema }: { schema?: IRSForm }) {
|
||||
const [loading, setLoading] = useState(false);
|
||||
const [processing, setProcessing] = useState(false);
|
||||
const [error, setError] = useState<ErrorData>(undefined);
|
||||
const [parseData, setParseData] = useState<IExpressionParse | undefined>(undefined);
|
||||
|
||||
|
@ -22,7 +22,7 @@ function useCheckExpression({ schema }: { schema?: IRSForm }) {
|
|||
postCheckExpression(String(schema!.id), {
|
||||
data: { expression: expression },
|
||||
showError: true,
|
||||
setLoading,
|
||||
setLoading: setProcessing,
|
||||
onError: setError,
|
||||
onSuccess: parse => {
|
||||
if (activeCst) {
|
||||
|
@ -34,7 +34,7 @@ function useCheckExpression({ schema }: { schema?: IRSForm }) {
|
|||
});
|
||||
}
|
||||
|
||||
return { parseData, checkExpression, resetParse, error, setError, loading };
|
||||
return { parseData, checkExpression, resetParse, error, setError, processing };
|
||||
}
|
||||
|
||||
export default useCheckExpression;
|
||||
|
|
|
@ -7,7 +7,7 @@ import { ErrorData } from '@/components/info/InfoError';
|
|||
import { ILexemeData, ITextRequest, ITextResult, IWordFormPlain } from '@/models/language';
|
||||
|
||||
function useConceptText() {
|
||||
const [loading, setLoading] = useState(false);
|
||||
const [processing, setProcessing] = useState(false);
|
||||
const [error, setError] = useState<ErrorData>(undefined);
|
||||
|
||||
const inflect = useCallback((data: IWordFormPlain, onSuccess: DataCallback<ITextResult>) => {
|
||||
|
@ -15,7 +15,7 @@ function useConceptText() {
|
|||
postInflectText({
|
||||
data: data,
|
||||
showError: true,
|
||||
setLoading,
|
||||
setLoading: setProcessing,
|
||||
onError: setError,
|
||||
onSuccess: data => {
|
||||
if (onSuccess) onSuccess(data);
|
||||
|
@ -28,7 +28,7 @@ function useConceptText() {
|
|||
postParseText({
|
||||
data: data,
|
||||
showError: true,
|
||||
setLoading,
|
||||
setLoading: setProcessing,
|
||||
onError: setError,
|
||||
onSuccess: data => {
|
||||
if (onSuccess) onSuccess(data);
|
||||
|
@ -41,7 +41,7 @@ function useConceptText() {
|
|||
postGenerateLexeme({
|
||||
data: data,
|
||||
showError: true,
|
||||
setLoading,
|
||||
setLoading: setProcessing,
|
||||
onError: setError,
|
||||
onSuccess: data => {
|
||||
if (onSuccess) onSuccess(data);
|
||||
|
@ -49,7 +49,7 @@ function useConceptText() {
|
|||
});
|
||||
}, []);
|
||||
|
||||
return { inflect, parse, generateLexeme, error, setError, loading };
|
||||
return { inflect, parse, generateLexeme, error, setError, processing };
|
||||
}
|
||||
|
||||
export default useConceptText;
|
||||
|
|
|
@ -9,7 +9,7 @@ import { OssLoader } from '@/models/OssLoader';
|
|||
|
||||
function useOssDetails({ target }: { target?: string }) {
|
||||
const [schema, setInner] = useState<IOperationSchema | undefined>(undefined);
|
||||
const [loading, setLoading] = useState(false);
|
||||
const [loading, setLoading] = useState(true);
|
||||
const [error, setError] = useState<ErrorData>(undefined);
|
||||
|
||||
function setSchema(data?: IOperationSchemaData) {
|
||||
|
|
|
@ -9,7 +9,7 @@ import { RSFormLoader } from '@/models/RSFormLoader';
|
|||
|
||||
function useRSFormDetails({ target, version }: { target?: string; version?: string }) {
|
||||
const [schema, setInnerSchema] = useState<IRSForm | undefined>(undefined);
|
||||
const [loading, setLoading] = useState(false);
|
||||
const [loading, setLoading] = useState(true);
|
||||
const [error, setError] = useState<ErrorData>(undefined);
|
||||
|
||||
function setSchema(data?: IRSFormData) {
|
||||
|
|
|
@ -8,7 +8,7 @@ import { IResolutionData } from '@/models/language';
|
|||
import { IRSForm } from '@/models/rsform';
|
||||
|
||||
function useResolveText({ schema }: { schema?: IRSForm }) {
|
||||
const [loading, setLoading] = useState(false);
|
||||
const [processing, setProcessing] = useState(false);
|
||||
const [error, setError] = useState<ErrorData>(undefined);
|
||||
const [refsData, setRefsData] = useState<IResolutionData | undefined>(undefined);
|
||||
|
||||
|
@ -19,7 +19,7 @@ function useResolveText({ schema }: { schema?: IRSForm }) {
|
|||
postResolveText(String(schema!.id), {
|
||||
data: { text: text },
|
||||
showError: true,
|
||||
setLoading,
|
||||
setLoading: setProcessing,
|
||||
onError: setError,
|
||||
onSuccess: data => {
|
||||
setRefsData(data);
|
||||
|
@ -28,7 +28,7 @@ function useResolveText({ schema }: { schema?: IRSForm }) {
|
|||
});
|
||||
}
|
||||
|
||||
return { refsData, resolveText, resetData, error, setError, loading };
|
||||
return { refsData, resolveText, resetData, error, setError, processing };
|
||||
}
|
||||
|
||||
export default useResolveText;
|
||||
|
|
|
@ -74,6 +74,10 @@ function HelpInfo() {
|
|||
1994 Кучкаров З.А., Ким В.Л. Разработка родоструктурных конструктов для библиотеки моделей и исследование
|
||||
возможностей их развития.
|
||||
</li>
|
||||
<li>
|
||||
1994 Коваль А.Г., Воробей П.Н. Редактор Программного комплекса Экстеор 1.5,{' '}
|
||||
<i>упростивший механизм печати экспликаций и улучшивший синтаксический анализ формального выражения.</i>
|
||||
</li>
|
||||
<li>
|
||||
1996 Коваль А.Г., Кучкаров З.А., Костюк А.В., Кононенко А.А., Син Ю.Е., Маклаков Ю.И. Программа
|
||||
родоструктурного синтеза операционализированных терминальных концептуальных моделей Экстеор 2,{' '}
|
||||
|
@ -157,6 +161,10 @@ function HelpInfo() {
|
|||
2004 Кононенко А.А. Генерация кода на языке программирования C++ по тексту концептуальной схемы,
|
||||
эксплицированной в родах структур.
|
||||
</li>
|
||||
<li>
|
||||
2004 Кононенко А.А., Кучкаров З.А., Никаноров С.П., Никитина Н.К. Технология концептуального проектирования,
|
||||
— <i>монография, собравшая исторический обзор и перспективы развития технологического направления.</i>
|
||||
</li>
|
||||
<li>2006 Кучкаров З.А., Никаноров С.П. Библиотека моделей.</li>
|
||||
<li>2006 Кучкаров З.А., Лавров В.А. Полные системы простых теоретико-множественных операций.</li>
|
||||
<li>
|
||||
|
@ -172,10 +180,6 @@ function HelpInfo() {
|
|||
<li>
|
||||
2008 Пономарев И.Н. Об эквивалентной представимости рода структуры с помощью заданной типовой характеристики.
|
||||
</li>
|
||||
<li>
|
||||
2008 Кононенко А.А., Кучкаров З.А., Никаноров С.П., Никитина Н.К. Технология концептуального проектирования,
|
||||
— <i>монография, собравшая исторический обзор и перспективы развития технологического направления.</i>
|
||||
</li>
|
||||
<li>
|
||||
2010 Кононенко А.А., Грязнов А.Д. Исследование и построение транслятора концептуальной схемы в концептуальную
|
||||
модель.
|
||||
|
|
|
@ -20,7 +20,6 @@ function HelpPortal() {
|
|||
<LinkTopic text='Конституент' topic={HelpTopic.CC_CONSTITUENTA} />, обладающих уникальными обозначениями и
|
||||
формальными определениями
|
||||
</p>
|
||||
<br />
|
||||
|
||||
<h2>Разделы Портала</h2>
|
||||
<li>
|
||||
|
@ -35,7 +34,6 @@ function HelpPortal() {
|
|||
<IconUser2 size='1.25rem' className='inline-icon' /> <TextURL text='Профиль' href={urls.profile} /> – данные
|
||||
пользователя и смена пароля
|
||||
</li>
|
||||
<br />
|
||||
|
||||
<h2>Разделы Справки</h2>
|
||||
{[
|
||||
|
@ -50,7 +48,6 @@ function HelpPortal() {
|
|||
].map(topic => (
|
||||
<TopicItem key={`${prefixes.topic_item}${topic}`} topic={topic} />
|
||||
))}
|
||||
<br />
|
||||
|
||||
<h2>Лицензирование и раскрытие информации</h2>
|
||||
<li>Пользователи Портала сохраняют авторские права на создаваемый ими контент</li>
|
||||
|
@ -65,12 +62,15 @@ function HelpPortal() {
|
|||
Данный сайт использует доменное имя и серверные мощности{' '}
|
||||
<TextURL text='Центра Концепт' href={external_urls.concept} />
|
||||
</li>
|
||||
<br />
|
||||
|
||||
<h2>Поддержка</h2>
|
||||
<p>
|
||||
Портал разрабатывается <TextURL text='Центром Концепт' href={external_urls.concept} />
|
||||
</p>
|
||||
<p>
|
||||
Портал поддерживает актуальные версии браузеров Chrome, Firefox, Safari. Убедитесь, что используете последнюю
|
||||
версию браузера в случае возникновения визуальных ошибок или проблем с производительностью.
|
||||
</p>
|
||||
<p>
|
||||
Ваши пожелания по доработке, найденные ошибки и иные предложения можно направлять по email:{' '}
|
||||
<TextURL href={external_urls.mail_portal} text='portal@acconcept.ru' />
|
||||
|
|
|
@ -170,7 +170,7 @@ function EditorRSExpression({
|
|||
|
||||
<Overlay position='top-[-0.5rem] pl-[8rem] sm:pl-[4rem] right-1/2 translate-x-1/2 flex'>
|
||||
<StatusBar
|
||||
processing={parser.loading}
|
||||
processing={parser.processing}
|
||||
isModified={isModified}
|
||||
constituenta={activeCst}
|
||||
parseData={parser.parseData}
|
||||
|
|
Loading…
Reference in New Issue
Block a user