From bb3caaf14e6bd7200d39b7eaddc0b9a2521c36a3 Mon Sep 17 00:00:00 2001 From: Jeffrey Lau Date: Thu, 1 Jun 2023 18:33:23 +0800 Subject: [PATCH] chore: Normalize paths to '@/' alias Commands used: ```bash cd packages while read -r file do echo file is $file path="${file##*/src}" path="${path%/*}" path="${path#/}" path="${path:-.}" echo file=$file echo path=$path sed -i -r "s|(import .*')(\..*)';|printf \"\1@/\"\; realpath --relative-to=. -m \"${path}/\2\" \| tr -d \"\n\" \; printf \"'; \"\;|ge" "$file" done < <(fd . legacy/src -t f -e ts -e tsx) while read -r file do echo file is $file path="${file##*/src}" path="${path%/*}" path="${path#/}" path="${path:-.}" echo file=$file echo path=$path sed -i -r "s|(import .*')(\..*)';|printf \"\1@/\"\; realpath --relative-to=. -m \"${path}/\2\" \| tr -d \"\n\" \; printf \"'; \"\;|ge" "$file" done < <(fd . libmmel/src -t f -e ts -e tsx) ``` --- packages/legacy/src/Main.test.tsx | 2 +- packages/legacy/src/Main.tsx | 8 +-- packages/legacy/src/css/MGDButton.ts | 2 +- packages/legacy/src/css/MGDComponentBar.ts | 2 +- packages/legacy/src/css/MGDDisplayPane.ts | 2 +- packages/legacy/src/css/MGDLegend.ts | 2 +- packages/legacy/src/css/MGDLegendEntry.ts | 2 +- packages/legacy/src/css/MGDProcessBox.ts | 2 +- packages/legacy/src/css/MGDSidebar.ts | 2 +- packages/legacy/src/css/MGDTabs.ts | 2 +- packages/legacy/src/css/components.ts | 2 +- packages/legacy/src/css/form.ts | 2 +- packages/legacy/src/css/layout.ts | 2 +- packages/legacy/src/css/shame.ts | 2 +- .../smart/MGDComponents/MGDButtonGroup.tsx | 2 +- .../smart/MGDComponents/MGDComponentBar.tsx | 2 +- .../src/smart/MGDComponents/MGDContainer.tsx | 2 +- .../src/smart/MGDComponents/MGDHeading.tsx | 2 +- .../src/smart/MGDComponents/MGDLabel.tsx | 2 +- .../src/smart/MGDComponents/MGDProcessBox.tsx | 2 +- .../src/smart/MGDComponents/MGDSidebar.tsx | 2 +- .../src/smart/MGDComponents/MGDTextarea.tsx | 2 +- .../legacy/src/smart/model/FlowContainer.ts | 4 +- .../legacy/src/smart/model/Measurement.ts | 2 +- packages/legacy/src/smart/model/States.ts | 10 +-- .../src/smart/model/ViewFunctionModel.ts | 4 +- packages/legacy/src/smart/model/changelog.ts | 4 +- .../smart/model/editor/commands/comment.ts | 2 +- .../src/smart/model/editor/commands/data.ts | 6 +- .../smart/model/editor/commands/elements.ts | 2 +- .../smart/model/editor/commands/history.ts | 4 +- .../src/smart/model/editor/commands/import.ts | 4 +- .../src/smart/model/editor/commands/page.ts | 8 +-- .../smart/model/editor/commands/reference.ts | 2 +- .../src/smart/model/editor/commands/role.ts | 2 +- .../smart/model/editor/components/comment.ts | 8 +-- .../model/editor/components/element/common.ts | 6 +- .../model/editor/components/element/dc.ts | 6 +- .../editor/components/element/registry.ts | 6 +- .../smart/model/editor/components/elements.ts | 12 ++-- .../smart/model/editor/components/enums.ts | 8 +-- .../smart/model/editor/components/figure.ts | 8 +-- .../model/editor/components/itemTemplate.ts | 2 +- .../smart/model/editor/components/links.ts | 2 +- .../src/smart/model/editor/components/meta.ts | 2 +- .../smart/model/editor/components/notes.ts | 4 +- .../smart/model/editor/components/pages.ts | 10 +-- .../model/editor/components/provision.ts | 4 +- .../src/smart/model/editor/components/ref.ts | 8 +-- .../smart/model/editor/components/roles.ts | 8 +-- .../smart/model/editor/components/sections.ts | 4 +- .../smart/model/editor/components/table.ts | 8 +-- .../smart/model/editor/components/terms.ts | 4 +- .../src/smart/model/editor/components/vars.ts | 6 +- .../src/smart/model/editor/components/view.ts | 6 +- .../legacy/src/smart/model/editor/history.ts | 4 +- .../src/smart/model/editor/hybird/data.ts | 6 +- .../smart/model/editor/hybird/distributor.ts | 10 +-- .../smart/model/editor/hybird/egateedit.ts | 6 +- .../src/smart/model/editor/hybird/import.ts | 6 +- .../src/smart/model/editor/hybird/process.ts | 8 +-- .../src/smart/model/editor/interface.ts | 6 +- .../legacy/src/smart/model/editor/model.ts | 44 ++++++------ .../legacy/src/smart/model/editor/state.ts | 12 ++-- packages/legacy/src/smart/model/history.tsx | 10 +-- packages/legacy/src/smart/model/json.ts | 2 +- packages/legacy/src/smart/model/mapmodel.ts | 8 +-- .../legacy/src/smart/model/modelwrapper.ts | 10 +-- .../src/smart/model/module/appModule.ts | 30 ++++---- packages/legacy/src/smart/model/workspace.ts | 6 +- packages/legacy/src/smart/ui/LinkAnalysis.tsx | 4 +- .../legacy/src/smart/ui/app/ModuleButton.tsx | 2 +- .../legacy/src/smart/ui/app/NeutralView.tsx | 2 +- .../src/smart/ui/app/RepoItemLoadingView.tsx | 24 +++---- packages/legacy/src/smart/ui/app/RepoView.tsx | 16 ++--- .../smart/ui/application/ISO27001/Chart.tsx | 4 +- .../ui/application/ISO27001/ConfigurePage.tsx | 8 +-- .../ui/application/ISO27001/DataFeeder.ts | 2 +- .../ui/application/ISO27001/LineChart.tsx | 2 +- .../smart/ui/application/ISO27001/LogPage.tsx | 14 ++-- .../smart/ui/application/ISO27001/Main.tsx | 22 +++--- .../application/ISO27001/ReadingCalculator.ts | 8 +-- .../smart/ui/application/ISO27001/model.tsx | 2 +- .../ui/application/pas2060/BuildingMap.tsx | 6 +- .../smart/ui/application/pas2060/Chart.tsx | 2 +- .../ui/application/pas2060/ConfigurePage.tsx | 10 +-- .../ui/application/pas2060/DataFeeder.ts | 2 +- .../smart/ui/application/pas2060/LogPage.tsx | 14 ++-- .../src/smart/ui/application/pas2060/Main.tsx | 20 +++--- .../application/pas2060/ReadingCalculator.ts | 8 +-- .../smart/ui/application/pas2060/model.tsx | 2 +- .../legacy/src/smart/ui/application/plugin.ts | 8 +-- .../src/smart/ui/checklist/AttributeField.tsx | 6 +- .../src/smart/ui/checklist/CheckListAddon.tsx | 2 +- .../ui/checklist/CheckListConfigPane.tsx | 16 ++--- .../src/smart/ui/checklist/CustomFields.tsx | 12 ++-- .../src/smart/ui/checklist/ProgressSetter.tsx | 2 +- .../src/smart/ui/checklist/ProvisionField.tsx | 8 +-- .../src/smart/ui/comment/AskForComment.tsx | 4 +- .../src/smart/ui/comment/CommentContainer.tsx | 8 +-- .../src/smart/ui/comment/CommentEntry.tsx | 4 +- .../src/smart/ui/comment/CommentField.tsx | 2 +- .../src/smart/ui/comment/NodeComment.tsx | 4 +- .../description/ComponentDescription.tsx | 6 +- .../ui/common/description/ComponentList.tsx | 6 +- .../ui/common/description/FigureViewer.tsx | 4 +- .../ui/common/description/LegendPane.tsx | 6 +- .../ui/common/description/Multimedia.tsx | 2 +- .../ui/common/description/RepoBreadcrumb.tsx | 2 +- .../ui/common/description/TableViewer.tsx | 2 +- .../smart/ui/common/description/approval.tsx | 4 +- .../src/smart/ui/common/description/data.tsx | 6 +- .../smart/ui/common/description/fields.tsx | 6 +- .../smart/ui/common/description/process.tsx | 6 +- .../legacy/src/smart/ui/common/fields.tsx | 4 +- .../ui/common/listmanagement/itemupdate.tsx | 8 +-- .../common/listmanagement/listPopoverItem.tsx | 10 +-- .../common/listmanagement/listmanagement.tsx | 6 +- .../ui/common/listmanagement/listview.tsx | 6 +- .../src/smart/ui/control/ChangeLogViewer.tsx | 14 ++-- .../src/smart/ui/control/newComponentPane.tsx | 8 +-- .../legacy/src/smart/ui/control/settings.tsx | 32 ++++----- .../src/smart/ui/dialog/EditorDialogs.tsx | 14 ++-- .../src/smart/ui/dialog/WorkspaceDiag.tsx | 12 ++-- .../src/smart/ui/dialog/confirmdialog.tsx | 2 +- .../legacy/src/smart/ui/doc/DocImport.tsx | 8 +-- .../legacy/src/smart/ui/doc/DocSettings.tsx | 6 +- .../legacy/src/smart/ui/doc/ParagraphEdit.tsx | 4 +- .../src/smart/ui/doc/SMARTDocumentEdit.tsx | 4 +- .../legacy/src/smart/ui/doc/SectionEdit.tsx | 4 +- .../legacy/src/smart/ui/doc/StatementEdit.tsx | 2 +- packages/legacy/src/smart/ui/docviewer.tsx | 14 ++-- .../legacy/src/smart/ui/edit/LinkEdit.tsx | 4 +- .../legacy/src/smart/ui/edit/NoteEdit.tsx | 6 +- .../src/smart/ui/edit/SectionEditPage.tsx | 14 ++-- .../legacy/src/smart/ui/edit/TermEdit.tsx | 14 ++-- .../src/smart/ui/edit/ViewProfileEdit.tsx | 12 ++-- .../legacy/src/smart/ui/edit/approvaledit.tsx | 20 +++--- .../src/smart/ui/edit/attributeedit.tsx | 10 +-- packages/legacy/src/smart/ui/edit/commons.tsx | 2 +- .../ui/edit/components/AttributeList.tsx | 14 ++-- .../ui/edit/components/CardinalityEdit.tsx | 4 +- .../ui/edit/components/DataTypeSelector.tsx | 2 +- .../smart/ui/edit/components/EdgeListEdit.tsx | 2 +- .../edit/components/MeasurementListEdit.tsx | 2 +- .../src/smart/ui/edit/components/NoteList.tsx | 12 ++-- .../ui/edit/components/ProvisionList.tsx | 14 ++-- .../ui/edit/components/ReferenceSelector.tsx | 2 +- .../ui/edit/components/RegistrySelector.tsx | 2 +- .../edit/components/StringListQuickEdit.tsx | 2 +- .../src/smart/ui/edit/dataclassedit.tsx | 12 ++-- .../legacy/src/smart/ui/edit/egateedit.tsx | 16 ++--- .../legacy/src/smart/ui/edit/enumedit.tsx | 14 ++-- .../src/smart/ui/edit/enumvalueedit.tsx | 8 +-- .../src/smart/ui/edit/figure/FigureEdit.tsx | 14 ++-- .../smart/ui/edit/figure/FigureItemEdit.tsx | 6 +- .../legacy/src/smart/ui/edit/mappingedit.tsx | 12 ++-- .../ui/edit/measurementExpressionEdit.tsx | 8 +-- .../src/smart/ui/edit/measurementedit.tsx | 16 ++--- .../legacy/src/smart/ui/edit/metaedit.tsx | 6 +- .../legacy/src/smart/ui/edit/processedit.tsx | 34 +++++----- .../src/smart/ui/edit/provisionedit.tsx | 8 +-- packages/legacy/src/smart/ui/edit/refedit.tsx | 10 +-- .../legacy/src/smart/ui/edit/registryedit.tsx | 12 ++-- .../legacy/src/smart/ui/edit/roleedit.tsx | 12 ++-- .../src/smart/ui/edit/signaleventedit.tsx | 16 ++--- .../ui/edit/table/ClassItemDisplayEdit.tsx | 6 +- .../src/smart/ui/edit/table/EditClassView.tsx | 12 ++-- .../src/smart/ui/edit/table/EditTableView.tsx | 2 +- .../edit/table/TableClassDefinitionEdit.tsx | 4 +- .../smart/ui/edit/table/TableClassItem.tsx | 2 +- .../src/smart/ui/edit/table/TableEdit.tsx | 14 ++-- .../src/smart/ui/edit/table/TableItemEdit.tsx | 6 +- .../src/smart/ui/edit/table/TableRow.tsx | 2 +- .../legacy/src/smart/ui/edit/timeredit.tsx | 20 +++--- .../smart/ui/editFunctions/EditWrapper.tsx | 16 ++--- .../editreference/DocumentReferenceView.tsx | 6 +- .../ui/editreference/ModelReferenceView.tsx | 20 +++--- .../src/smart/ui/flowui/NodeIDField.tsx | 2 +- .../legacy/src/smart/ui/flowui/edgeUI.tsx | 4 +- .../legacy/src/smart/ui/flowui/nodeUI.tsx | 24 +++---- .../legacy/src/smart/ui/flowui/shapes.tsx | 6 +- packages/legacy/src/smart/ui/maindocedit.tsx | 8 +-- packages/legacy/src/smart/ui/maineditor.tsx | 68 +++++++++---------- packages/legacy/src/smart/ui/mainmapper.tsx | 48 ++++++------- packages/legacy/src/smart/ui/mainviewer.tsx | 52 +++++++------- .../legacy/src/smart/ui/mapper/AutoMapper.tsx | 14 ++-- .../src/smart/ui/mapper/MappingsCanvus.tsx | 4 +- .../src/smart/ui/mapper/ModelDiagram.tsx | 28 ++++---- .../smart/ui/mapper/document/DocumentView.tsx | 8 +-- .../ui/mapper/document/ParagraphView.tsx | 2 +- .../smart/ui/mapper/document/SectionView.tsx | 4 +- .../ui/mapper/document/StatementView.tsx | 4 +- .../src/smart/ui/mapper/mappartylist.tsx | 10 +-- .../smart/ui/mapper/repo/RepoAutoMapper.tsx | 22 +++--- .../ui/mapper/repo/RepoExternalFileMenu.tsx | 6 +- .../smart/ui/mapper/repo/RepoIndexDiagram.tsx | 12 ++-- .../ui/mapper/repo/RepoIndexMainView.tsx | 12 ++-- .../ui/mapper/repo/RepoInternalFileMenu.tsx | 2 +- .../smart/ui/mapper/repo/RepoMapDiagram.tsx | 14 ++-- .../smart/ui/mapper/repo/RepoMapMainView.tsx | 12 ++-- .../src/smart/ui/mapper/repo/RepoMapNode.tsx | 2 +- .../smart/ui/mapper/repo/RepoMapRefMenu.tsx | 12 ++-- .../ui/mapper/repo/automapper/AutoMapNode.tsx | 2 +- .../ui/mapper/repo/automapper/calculating.tsx | 2 +- .../ui/mapper/repo/automapper/loading.tsx | 2 +- .../ui/mapper/repo/automapper/mapview.tsx | 6 +- .../src/smart/ui/mapper/viewmapbutton.tsx | 6 +- .../measurement/MeasurementResultFormatter.ts | 10 +-- .../ui/measurement/MeasurementTooltip.tsx | 8 +-- .../measurement/MeasurementValidationPane.tsx | 18 ++--- .../measurement/ParameterizedViewFormatter.ts | 8 +-- .../ui/measurement/VariableSettingItem.tsx | 10 +-- .../ui/measurement/ViewProfileControl.tsx | 4 +- .../ui/measurement/fields/TableComboBox.tsx | 6 +- .../smart/ui/measurement/fields/boolean.tsx | 2 +- .../src/smart/ui/measurement/fields/text.tsx | 4 +- .../src/smart/ui/menu/DocEditFileMenu.tsx | 8 +-- .../src/smart/ui/menu/DocEditImportMenu.tsx | 2 +- .../src/smart/ui/menu/DocEditToolbar.tsx | 12 ++-- .../src/smart/ui/menu/EditorFileMenu.tsx | 4 +- .../src/smart/ui/menu/EditorReferenceMenu.tsx | 6 +- .../ui/menu/EditorReferenceMenuButton.tsx | 8 +-- .../src/smart/ui/menu/EditorViewMenu.tsx | 2 +- .../src/smart/ui/menu/MapperCompareMenu.tsx | 4 +- .../src/smart/ui/menu/MapperDocumentMenu.tsx | 4 +- .../src/smart/ui/menu/MapperFileMenu.tsx | 4 +- .../src/smart/ui/menu/ViewOptionMenu.tsx | 2 +- .../legacy/src/smart/ui/menu/ViewToolMenu.tsx | 2 +- .../src/smart/ui/menu/WorkspaceFileMenu.tsx | 6 +- .../src/smart/ui/menu/mapperOptionMenu.tsx | 2 +- .../legacy/src/smart/ui/modelWorkspace.tsx | 32 ++++----- packages/legacy/src/smart/ui/nlp/NLPMain.tsx | 20 +++--- .../src/smart/ui/nlp/NLPQuestionGraphView.tsx | 4 +- .../src/smart/ui/nlp/RDFControlPane.tsx | 16 ++--- .../legacy/src/smart/ui/nlp/RDFDiagram.tsx | 6 +- .../legacy/src/smart/ui/nlp/RDFQueryPane.tsx | 12 ++-- .../src/smart/ui/popover/AskIDForSaveMenu.tsx | 6 +- .../src/smart/ui/popover/ComponentSummary.tsx | 14 ++-- .../ui/popover/ImportFromSelectionButton.tsx | 2 +- .../legacy/src/smart/ui/popover/LinksList.tsx | 2 +- .../src/smart/ui/popover/MapperDialog.tsx | 24 +++---- .../smart/ui/popover/NonTextReferenceList.tsx | 2 +- .../ui/popover/PopoverChangeIDButton.tsx | 2 +- .../ui/popover/components/ApprovalSummary.tsx | 4 +- .../ui/popover/components/EGateSummary.tsx | 4 +- .../ui/popover/components/EventSummary.tsx | 2 +- .../ui/popover/components/ProcessSummary.tsx | 6 +- .../src/smart/ui/quickedit/approval.tsx | 10 +-- .../src/smart/ui/quickedit/dataclass.tsx | 10 +-- .../legacy/src/smart/ui/quickedit/egate.tsx | 8 +-- .../legacy/src/smart/ui/quickedit/end.tsx | 10 +-- .../legacy/src/smart/ui/quickedit/process.tsx | 10 +-- .../src/smart/ui/quickedit/registry.tsx | 12 ++-- .../src/smart/ui/quickedit/signalevent.tsx | 10 +-- .../legacy/src/smart/ui/quickedit/timer.tsx | 10 +-- .../src/smart/ui/repo/AITranslateLoading.tsx | 12 ++-- .../src/smart/ui/repo/RepoChangeNSButton.tsx | 4 +- .../legacy/src/smart/ui/repo/RepoGroup.tsx | 8 +-- .../src/smart/ui/repo/RepoImportMenu.tsx | 4 +- .../legacy/src/smart/ui/repo/RepoInfoPane.tsx | 8 +-- .../legacy/src/smart/ui/repo/RepoItem.tsx | 2 +- .../src/smart/ui/repo/RepoItemSelector.tsx | 4 +- .../src/smart/ui/repo/RepoRenameLoading.tsx | 10 +-- .../legacy/src/smart/ui/repo/RepoToolbar.tsx | 14 ++-- .../legacy/src/smart/ui/repo/RepoViewer.tsx | 28 ++++---- .../ui/reporttemplate/MetanormaPrint.tsx | 6 +- .../ui/reporttemplate/doctemplatepane.tsx | 16 ++--- .../src/smart/ui/reporttemplate/reportgen.tsx | 10 +-- .../smart/ui/sidebar/QuickEditComponents.tsx | 24 +++---- .../smart/ui/sidebar/SimulationDetails.tsx | 8 +-- .../src/smart/ui/sidebar/SimulationPane.tsx | 12 ++-- .../smart/ui/sidebar/ViewComponentDetails.tsx | 8 +-- .../legacy/src/smart/ui/sidebar/search.tsx | 16 ++--- .../legacy/src/smart/ui/sidebar/selected.tsx | 18 ++--- .../smart/ui/summary/ProvisionSettings.tsx | 12 ++-- .../src/smart/ui/summary/ProvisionSummary.tsx | 10 +-- .../src/smart/ui/summary/RegistrySummary.tsx | 14 ++-- .../smart/ui/version/VersionDiffLogView.tsx | 4 +- .../ui/version/VersionTrackerSetting.tsx | 18 ++--- .../ui/workspace/DCDocumentAttributes.tsx | 16 ++--- .../src/smart/ui/workspace/DocumentEditor.tsx | 6 +- .../src/smart/ui/workspace/EnumAttribute.tsx | 2 +- .../ui/workspace/ReferenceAttributes.tsx | 6 +- .../ui/workspace/RegistryDocManagement.tsx | 12 ++-- .../src/smart/ui/workspace/RegistryList.tsx | 4 +- .../ui/workspace/ViewDataWorkspaceButton.tsx | 2 +- packages/legacy/src/smart/utils/Comments.ts | 2 +- .../src/smart/utils/DocumentFunctions.ts | 10 +-- .../legacy/src/smart/utils/EditorFactory.ts | 4 +- .../legacy/src/smart/utils/IOFunctions.ts | 18 ++--- .../smart/utils/ModelAddComponentHandler.ts | 8 +-- .../legacy/src/smart/utils/ModelFunctions.ts | 2 +- .../legacy/src/smart/utils/ModelImport.ts | 2 +- .../utils/ModelRemoveComponentHandler.ts | 2 +- .../legacy/src/smart/utils/SearchFunctions.ts | 10 +-- .../legacy/src/smart/utils/VersionTracker.ts | 16 ++--- packages/legacy/src/smart/utils/ai/aiagent.ts | 8 +-- .../smart/utils/checklist/ChecklistViewer.ts | 12 ++-- .../utils/checklist/CheckllistInitializer.ts | 4 +- .../utils/handler/cascadeModelHandler.ts | 2 +- .../legacy/src/smart/utils/map/AutoMap.ts | 12 ++-- .../src/smart/utils/map/MappingCalculator.ts | 12 ++-- .../legacy/src/smart/utils/map/MappingDiff.ts | 14 ++-- .../legacy/src/smart/utils/map/RepoMap.ts | 8 +-- .../smart/utils/measurement/BasicFunctions.ts | 2 +- .../src/smart/utils/measurement/Checker.ts | 8 +-- .../src/smart/utils/measurement/Evaluator.ts | 6 +- .../src/smart/utils/measurement/Operators.ts | 4 +- .../src/smart/utils/measurement/Parser.ts | 6 +- packages/legacy/src/smart/utils/nlp/nlp.ts | 6 +- packages/legacy/src/smart/utils/nlp/query.ts | 4 +- .../src/smart/utils/repo/CommonFunctions.ts | 4 +- .../src/smart/utils/repo/LinkAnalysis.ts | 8 +-- packages/legacy/src/smart/utils/repo/io.ts | 6 +- .../legacy/src/smart/utils/reportFunctions.ts | 8 +-- .../smart/utils/simulation/viewFunctions.ts | 8 +-- .../smart/utils/summary/RegistrySummary.ts | 2 +- .../legacy/src/smart/utils/typecheckings.ts | 2 +- packages/legacy/src/smart/utils/xml/BSIXML.ts | 8 +-- .../smart/utils/xml/XMLDocumentFunctions.ts | 8 +-- packages/libmmel/src/handler/datahandler.ts | 2 +- packages/libmmel/src/handler/eventhandler.ts | 4 +- .../libmmel/src/handler/flowcontrolhandler.ts | 4 +- .../libmmel/src/handler/processhandler.ts | 4 +- .../libmmel/src/handler/supporthandler.ts | 2 +- .../libmmel/src/interface/datainterface.ts | 2 +- .../libmmel/src/interface/eventinterface.ts | 2 +- .../src/interface/flowcontrolinterface.ts | 2 +- packages/libmmel/src/interface/model.ts | 6 +- .../libmmel/src/interface/processinterface.ts | 2 +- .../libmmel/src/interface/supportinterface.ts | 2 +- packages/libmmel/src/main.ts | 10 +-- .../libmmel/src/util/serailizeformater.ts | 4 +- packages/libmmel/src/util/validation.ts | 6 +- 335 files changed, 1341 insertions(+), 1341 deletions(-) diff --git a/packages/legacy/src/Main.test.tsx b/packages/legacy/src/Main.test.tsx index 5696f99b..898b4efc 100644 --- a/packages/legacy/src/Main.test.tsx +++ b/packages/legacy/src/Main.test.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import MainExtension from './Main'; +import MainExtension from '@/Main'; test('MainExtension is a function', () => { expect(MainExtension).toBeInstanceOf(Function); diff --git a/packages/legacy/src/Main.tsx b/packages/legacy/src/Main.tsx index ffd4fb57..990d4c4c 100644 --- a/packages/legacy/src/Main.tsx +++ b/packages/legacy/src/Main.tsx @@ -2,10 +2,10 @@ import { FocusStyleManager, HotkeysProvider } from '@blueprintjs/core'; import { DatasetContext } from '@riboseinc/paneron-extension-kit/context'; import React from 'react'; import { useContext, useMemo, useState } from 'react'; -import RepositoryView from './smart/ui/app/RepoView'; -import { RepoIndex, repoIndexPath } from './smart/model/repo'; -import { LoadingScreen } from './smart/ui/common/Loading'; -import { createEmptyIndex } from './smart/utils/repo/CommonFunctions'; +import RepositoryView from '@/smart/ui/app/RepoView'; +import { RepoIndex, repoIndexPath } from '@/smart/model/repo'; +import { LoadingScreen } from '@/smart/ui/common/Loading'; +import { createEmptyIndex } from '@/smart/utils/repo/CommonFunctions'; const MainExtension: React.FC> = function () { const { useObjectData } = useContext(DatasetContext); diff --git a/packages/legacy/src/css/MGDButton.ts b/packages/legacy/src/css/MGDButton.ts index 49d5885e..d93bd4e9 100644 --- a/packages/legacy/src/css/MGDButton.ts +++ b/packages/legacy/src/css/MGDButton.ts @@ -5,7 +5,7 @@ import { css, SerializedStyles } from '@emotion/react'; import { CSSProperties } from 'react'; -import { CSSROOTVARIABLES } from './root.css'; +import { CSSROOTVARIABLES } from '@/css/root.css'; export const mgdButton: CSSProperties = { fontWeight : CSSROOTVARIABLES.fontWeightRegular, diff --git a/packages/legacy/src/css/MGDComponentBar.ts b/packages/legacy/src/css/MGDComponentBar.ts index aff73e67..77bdb9fa 100644 --- a/packages/legacy/src/css/MGDComponentBar.ts +++ b/packages/legacy/src/css/MGDComponentBar.ts @@ -4,7 +4,7 @@ */ import { CSSProperties } from 'react'; -import { CSSROOTVARIABLES } from './root.css'; +import { CSSROOTVARIABLES } from '@/css/root.css'; export const mgdComponentBar: CSSProperties = { backgroundColor : CSSROOTVARIABLES['--colour--bsi-light-teal'], diff --git a/packages/legacy/src/css/MGDDisplayPane.ts b/packages/legacy/src/css/MGDDisplayPane.ts index fb14b8ba..3c4f183e 100644 --- a/packages/legacy/src/css/MGDDisplayPane.ts +++ b/packages/legacy/src/css/MGDDisplayPane.ts @@ -5,7 +5,7 @@ import { css } from '@emotion/react'; import { CSSProperties } from 'react'; -import { CSSROOTVARIABLES } from './root.css'; +import { CSSROOTVARIABLES } from '@/css/root.css'; export const mgd_display_pane = css` background-color: ${CSSROOTVARIABLES['--colour--bsi-pale-red']}; diff --git a/packages/legacy/src/css/MGDLegend.ts b/packages/legacy/src/css/MGDLegend.ts index 5e67352b..adfa6b77 100644 --- a/packages/legacy/src/css/MGDLegend.ts +++ b/packages/legacy/src/css/MGDLegend.ts @@ -4,7 +4,7 @@ */ import { CSSProperties } from 'react'; -import { CSSROOTVARIABLES } from './root.css'; +import { CSSROOTVARIABLES } from '@/css/root.css'; export const mgdLegend: CSSProperties = { fontWeight : CSSROOTVARIABLES.fontWeightRegular, diff --git a/packages/legacy/src/css/MGDLegendEntry.ts b/packages/legacy/src/css/MGDLegendEntry.ts index 873c4819..590f459f 100644 --- a/packages/legacy/src/css/MGDLegendEntry.ts +++ b/packages/legacy/src/css/MGDLegendEntry.ts @@ -4,7 +4,7 @@ */ import { CSSProperties } from 'react'; -import { CSSROOTVARIABLES } from './root.css'; +import { CSSROOTVARIABLES } from '@/css/root.css'; export const mgdLegendEntry: CSSProperties = { display : 'flex', diff --git a/packages/legacy/src/css/MGDProcessBox.ts b/packages/legacy/src/css/MGDProcessBox.ts index 0d1da6a5..150e06e9 100644 --- a/packages/legacy/src/css/MGDProcessBox.ts +++ b/packages/legacy/src/css/MGDProcessBox.ts @@ -7,7 +7,7 @@ /** @jsxFrag React.Fragment */ import { css } from '@emotion/react'; -import { CSSROOTVARIABLES } from './root.css'; +import { CSSROOTVARIABLES } from '@/css/root.css'; export const mgd_process_box = css` font-weight: ${CSSROOTVARIABLES['--font-weight--regular']}; diff --git a/packages/legacy/src/css/MGDSidebar.ts b/packages/legacy/src/css/MGDSidebar.ts index c5227bdd..7b3705ca 100644 --- a/packages/legacy/src/css/MGDSidebar.ts +++ b/packages/legacy/src/css/MGDSidebar.ts @@ -4,7 +4,7 @@ */ import { CSSProperties } from 'react'; -import { CSSROOTVARIABLES } from './root.css'; +import { CSSROOTVARIABLES } from '@/css/root.css'; export const mgdSidebar: CSSProperties = { fontWeight : CSSROOTVARIABLES.fontWeightRegular, diff --git a/packages/legacy/src/css/MGDTabs.ts b/packages/legacy/src/css/MGDTabs.ts index 62d05108..4bdd1309 100644 --- a/packages/legacy/src/css/MGDTabs.ts +++ b/packages/legacy/src/css/MGDTabs.ts @@ -4,7 +4,7 @@ */ import { css } from '@emotion/react'; -import { CSSROOTVARIABLES } from './root.css'; +import { CSSROOTVARIABLES } from '@/css/root.css'; /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ diff --git a/packages/legacy/src/css/components.ts b/packages/legacy/src/css/components.ts index 37bac65c..71569ca0 100644 --- a/packages/legacy/src/css/components.ts +++ b/packages/legacy/src/css/components.ts @@ -4,7 +4,7 @@ */ import { css } from '@emotion/react'; -import { CSSROOTVARIABLES } from './root.css'; +import { CSSROOTVARIABLES } from '@/css/root.css'; export const vertical_line = css` border-left: 2px solid ${CSSROOTVARIABLES['--colour--black']}; diff --git a/packages/legacy/src/css/form.ts b/packages/legacy/src/css/form.ts index b319b806..7e42d79f 100644 --- a/packages/legacy/src/css/form.ts +++ b/packages/legacy/src/css/form.ts @@ -5,7 +5,7 @@ import { css } from '@emotion/react'; import { CSSProperties } from 'react'; -import { CSSROOTVARIABLES } from './root.css'; +import { CSSROOTVARIABLES } from '@/css/root.css'; const normal_font_style = css` font-weight: ${CSSROOTVARIABLES['--font-weight--regular']}; diff --git a/packages/legacy/src/css/layout.ts b/packages/legacy/src/css/layout.ts index 6041b525..3027212f 100644 --- a/packages/legacy/src/css/layout.ts +++ b/packages/legacy/src/css/layout.ts @@ -5,7 +5,7 @@ import { css } from '@emotion/react'; import { CSSProperties } from 'react'; -import { CSSROOTVARIABLES } from './root.css'; +import { CSSROOTVARIABLES } from '@/css/root.css'; export const flownode_top_left_button_layout = css` position: fixed; diff --git a/packages/legacy/src/css/shame.ts b/packages/legacy/src/css/shame.ts index 5628713a..73ede08f 100644 --- a/packages/legacy/src/css/shame.ts +++ b/packages/legacy/src/css/shame.ts @@ -9,7 +9,7 @@ import { css } from '@emotion/react'; import { CSSProperties } from 'react'; -import { CSSROOTVARIABLES } from './root.css'; +import { CSSROOTVARIABLES } from '@/css/root.css'; export const shameLabel: CSSProperties = { fontWeight : CSSROOTVARIABLES.fontWeightRegular, diff --git a/packages/legacy/src/smart/MGDComponents/MGDButtonGroup.tsx b/packages/legacy/src/smart/MGDComponents/MGDButtonGroup.tsx index d3963e12..60878635 100644 --- a/packages/legacy/src/smart/MGDComponents/MGDButtonGroup.tsx +++ b/packages/legacy/src/smart/MGDComponents/MGDButtonGroup.tsx @@ -3,7 +3,7 @@ */ import React from 'react'; -import { mgdButtonGroup } from '../../css/MGDButtonGroup'; +import { mgdButtonGroup } from '@/css/MGDButtonGroup'; // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/legacy/src/smart/MGDComponents/MGDComponentBar.tsx b/packages/legacy/src/smart/MGDComponents/MGDComponentBar.tsx index 260b5f18..0393167c 100644 --- a/packages/legacy/src/smart/MGDComponents/MGDComponentBar.tsx +++ b/packages/legacy/src/smart/MGDComponents/MGDComponentBar.tsx @@ -4,7 +4,7 @@ // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - import React from 'react'; -import { mgdComponentBar } from '../../css/MGDComponentBar'; +import { mgdComponentBar } from '@/css/MGDComponentBar'; // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/legacy/src/smart/MGDComponents/MGDContainer.tsx b/packages/legacy/src/smart/MGDComponents/MGDContainer.tsx index b44c5c9c..a4d6f17a 100644 --- a/packages/legacy/src/smart/MGDComponents/MGDContainer.tsx +++ b/packages/legacy/src/smart/MGDComponents/MGDContainer.tsx @@ -5,7 +5,7 @@ // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - import React from 'react'; -import { mgdContainer } from '../../css/MGDContainer'; +import { mgdContainer } from '@/css/MGDContainer'; interface OwnProps { children: React.ReactNode; diff --git a/packages/legacy/src/smart/MGDComponents/MGDHeading.tsx b/packages/legacy/src/smart/MGDComponents/MGDHeading.tsx index a854d93a..480d514e 100644 --- a/packages/legacy/src/smart/MGDComponents/MGDHeading.tsx +++ b/packages/legacy/src/smart/MGDComponents/MGDHeading.tsx @@ -3,7 +3,7 @@ */ import React from 'react'; -import { mgdHeading } from '../../css/form'; +import { mgdHeading } from '@/css/form'; interface OwnProps { children: React.ReactNode; diff --git a/packages/legacy/src/smart/MGDComponents/MGDLabel.tsx b/packages/legacy/src/smart/MGDComponents/MGDLabel.tsx index 43e0039d..80e9a7f2 100644 --- a/packages/legacy/src/smart/MGDComponents/MGDLabel.tsx +++ b/packages/legacy/src/smart/MGDComponents/MGDLabel.tsx @@ -3,7 +3,7 @@ */ import React from 'react'; -import { mgdLabel } from '../../css/form'; +import { mgdLabel } from '@/css/form'; interface OwnProps { children: React.ReactNode; diff --git a/packages/legacy/src/smart/MGDComponents/MGDProcessBox.tsx b/packages/legacy/src/smart/MGDComponents/MGDProcessBox.tsx index 4c70c1e2..a4f67c16 100644 --- a/packages/legacy/src/smart/MGDComponents/MGDProcessBox.tsx +++ b/packages/legacy/src/smart/MGDComponents/MGDProcessBox.tsx @@ -7,7 +7,7 @@ /** @jsxFrag React.Fragment */ import { jsx, SerializedStyles } from '@emotion/react'; -import { mgd_process_box } from '../../css/MGDProcessBox'; +import { mgd_process_box } from '@/css/MGDProcessBox'; // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/legacy/src/smart/MGDComponents/MGDSidebar.tsx b/packages/legacy/src/smart/MGDComponents/MGDSidebar.tsx index b9de49af..7bbb10e0 100644 --- a/packages/legacy/src/smart/MGDComponents/MGDSidebar.tsx +++ b/packages/legacy/src/smart/MGDComponents/MGDSidebar.tsx @@ -3,7 +3,7 @@ */ import React from 'react'; -import { mgdSidebar } from '../../css/MGDSidebar'; +import { mgdSidebar } from '@/css/MGDSidebar'; // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/legacy/src/smart/MGDComponents/MGDTextarea.tsx b/packages/legacy/src/smart/MGDComponents/MGDTextarea.tsx index 73dcad6d..8eabdd4f 100644 --- a/packages/legacy/src/smart/MGDComponents/MGDTextarea.tsx +++ b/packages/legacy/src/smart/MGDComponents/MGDTextarea.tsx @@ -6,7 +6,7 @@ import { TextArea } from '@blueprintjs/core'; import React, { ChangeEvent } from 'react'; -import { mgdTextarea } from '../../css/form'; +import { mgdTextarea } from '@/css/form'; // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/legacy/src/smart/model/FlowContainer.ts b/packages/legacy/src/smart/model/FlowContainer.ts index e538da67..2adaf545 100644 --- a/packages/legacy/src/smart/model/FlowContainer.ts +++ b/packages/legacy/src/smart/model/FlowContainer.ts @@ -13,7 +13,7 @@ import { isEditorData, ModelType, } from './editormodel'; -import { MMELtoFlowEntries } from './States'; +import { MMELtoFlowEntries } from '@/smart/model/States'; import { MMELComment, MMELFigure, @@ -23,7 +23,7 @@ import { } from '@paneron/libmmel/interface/supportinterface'; import { SerializedStyles } from '@emotion/react'; import React from 'react'; -import { MMELRepo, RepoIndex } from './repo'; +import { MMELRepo, RepoIndex } from '@/smart/model/repo'; export interface EdgeContainer { id: string; diff --git a/packages/legacy/src/smart/model/Measurement.ts b/packages/legacy/src/smart/model/Measurement.ts index 8d11295c..536235cd 100644 --- a/packages/legacy/src/smart/model/Measurement.ts +++ b/packages/legacy/src/smart/model/Measurement.ts @@ -7,7 +7,7 @@ import { MMELView, VarType, } from '@paneron/libmmel/interface/supportinterface'; -import { EditorModel } from './editormodel'; +import { EditorModel } from '@/smart/model/editormodel'; export interface MTreeNode { action: string; // if data is a value, action = '' diff --git a/packages/legacy/src/smart/model/States.ts b/packages/legacy/src/smart/model/States.ts index 29bcd441..1d8ed1a1 100644 --- a/packages/legacy/src/smart/model/States.ts +++ b/packages/legacy/src/smart/model/States.ts @@ -1,9 +1,9 @@ import React from 'react'; import { NodeProps } from 'react-flow-renderer'; -import { HistoryItem, PageHistory } from './history'; -import { ModelWrapper } from './modelwrapper'; +import { HistoryItem, PageHistory } from '@/smart/model/history'; +import { ModelWrapper } from '@/smart/model/modelwrapper'; import { DataType } from '@paneron/libmmel/interface/baseinterface'; -import { DataLinkEdge, NormalEdge, SelfLoopEdge } from '../ui/flowui/edgeUI'; +import { DataLinkEdge, NormalEdge, SelfLoopEdge } from '@/smart/ui/flowui/edgeUI'; import { ApprovalComponent, Datacube, @@ -14,8 +14,8 @@ import { StartComponent, TimerComponent, } from '../ui/flowui/nodeUI'; -import { EditorModel, ModelType } from './editormodel'; -import { MMELDocument } from './document'; +import { EditorModel, ModelType } from '@/smart/model/editormodel'; +import { MMELDocument } from '@/smart/model/document'; export interface FunModel { mw: ModelWrapper; diff --git a/packages/legacy/src/smart/model/ViewFunctionModel.ts b/packages/legacy/src/smart/model/ViewFunctionModel.ts index ee17fa93..ee0c73e5 100644 --- a/packages/legacy/src/smart/model/ViewFunctionModel.ts +++ b/packages/legacy/src/smart/model/ViewFunctionModel.ts @@ -6,8 +6,8 @@ import { MMELProvision, MMELReference, } from '@paneron/libmmel/interface/supportinterface'; -import { EditorNode } from './editormodel'; -import { LegendInterface } from './States'; +import { EditorNode } from '@/smart/model/editormodel'; +import { LegendInterface } from '@/smart/model/States'; console.log(textToMMEL); diff --git a/packages/legacy/src/smart/model/changelog.ts b/packages/legacy/src/smart/model/changelog.ts index fb3bff78..49d60edc 100644 --- a/packages/legacy/src/smart/model/changelog.ts +++ b/packages/legacy/src/smart/model/changelog.ts @@ -2,8 +2,8 @@ * The data model for change log and some utility functions for the change log */ -import { ModelAction } from './editor/model'; -import { EditorModel } from './editormodel'; +import { ModelAction } from '@/smart/model/editor/model'; +import { EditorModel } from '@/smart/model/editormodel'; interface CommandEvent { type: 'command'; diff --git a/packages/legacy/src/smart/model/editor/commands/comment.ts b/packages/legacy/src/smart/model/editor/commands/comment.ts index 5e5c1bfe..e36ca4a3 100644 --- a/packages/legacy/src/smart/model/editor/commands/comment.ts +++ b/packages/legacy/src/smart/model/editor/commands/comment.ts @@ -3,7 +3,7 @@ */ import { MMELComment } from '@paneron/libmmel/interface/supportinterface'; -import { ModelAction } from '../model'; +import { ModelAction } from '@/smart/model/editor/model'; /** * Add a new comment to the model diff --git a/packages/legacy/src/smart/model/editor/commands/data.ts b/packages/legacy/src/smart/model/editor/commands/data.ts index 5e40c245..66178097 100644 --- a/packages/legacy/src/smart/model/editor/commands/data.ts +++ b/packages/legacy/src/smart/model/editor/commands/data.ts @@ -3,9 +3,9 @@ */ import { MMELReference } from '@paneron/libmmel/interface/supportinterface'; -import { EditorDataClass } from '../../editormodel'; -import { RegistryCombined } from '../components/element/registry'; -import { ModelAction } from '../model'; +import { EditorDataClass } from '@/smart/model/editormodel'; +import { RegistryCombined } from '@/smart/model/editor/components/element/registry'; +import { ModelAction } from '@/smart/model/editor/model'; /** * Delete the registries from the model diff --git a/packages/legacy/src/smart/model/editor/commands/elements.ts b/packages/legacy/src/smart/model/editor/commands/elements.ts index 6e4a341e..26fc8fd4 100644 --- a/packages/legacy/src/smart/model/editor/commands/elements.ts +++ b/packages/legacy/src/smart/model/editor/commands/elements.ts @@ -16,7 +16,7 @@ import { EditorProcess, isEditorProcess, } from '../../editormodel'; -import { ModelAction } from '../model'; +import { ModelAction } from '@/smart/model/editor/model'; /** * Edit the node elements. It can include gateway, approval, process, timer / signal events. diff --git a/packages/legacy/src/smart/model/editor/commands/history.ts b/packages/legacy/src/smart/model/editor/commands/history.ts index 5e374c06..14dc2473 100644 --- a/packages/legacy/src/smart/model/editor/commands/history.ts +++ b/packages/legacy/src/smart/model/editor/commands/history.ts @@ -2,8 +2,8 @@ * This file centralizes the commands related to page change */ -import { HistoryItem } from '../../history'; -import { HistoryAction } from '../history'; +import { HistoryItem } from '@/smart/model/history'; +import { HistoryAction } from '@/smart/model/editor/history'; /** * Go to a new page (subprocess) of a process on the current page diff --git a/packages/legacy/src/smart/model/editor/commands/import.ts b/packages/legacy/src/smart/model/editor/commands/import.ts index 5afafdf9..8440b76d 100644 --- a/packages/legacy/src/smart/model/editor/commands/import.ts +++ b/packages/legacy/src/smart/model/editor/commands/import.ts @@ -2,8 +2,8 @@ * This file centralizes the commands related to import */ -import { EditorModel } from '../../editormodel'; -import { ModelAction } from '../model'; +import { EditorModel } from '@/smart/model/editormodel'; +import { ModelAction } from '@/smart/model/editor/model'; /** * Import an element from another model diff --git a/packages/legacy/src/smart/model/editor/commands/page.ts b/packages/legacy/src/smart/model/editor/commands/page.ts index 693a3d24..0d63cf64 100644 --- a/packages/legacy/src/smart/model/editor/commands/page.ts +++ b/packages/legacy/src/smart/model/editor/commands/page.ts @@ -3,10 +3,10 @@ */ import { Node } from 'react-flow-renderer'; -import { createEdge } from '../../../utils/EditorFactory'; -import { findUniqueID } from '../../../utils/ModelFunctions'; -import { EditorModel, EditorSubprocess, isEditorData } from '../../editormodel'; -import { ModelAction } from '../model'; +import { createEdge } from '@/smart/utils/EditorFactory'; +import { findUniqueID } from '@/smart/utils/ModelFunctions'; +import { EditorModel, EditorSubprocess, isEditorData } from '@/smart/model/editormodel'; +import { ModelAction } from '@/smart/model/editor/model'; /** * Remove an edge of a subprocess (page) diff --git a/packages/legacy/src/smart/model/editor/commands/reference.ts b/packages/legacy/src/smart/model/editor/commands/reference.ts index c4e41ed2..9769d3b4 100644 --- a/packages/legacy/src/smart/model/editor/commands/reference.ts +++ b/packages/legacy/src/smart/model/editor/commands/reference.ts @@ -3,7 +3,7 @@ */ import { MMELReference } from '@paneron/libmmel/interface/supportinterface'; -import { ModelAction } from '../model'; +import { ModelAction } from '@/smart/model/editor/model'; /** * Delete references diff --git a/packages/legacy/src/smart/model/editor/commands/role.ts b/packages/legacy/src/smart/model/editor/commands/role.ts index b36df259..e69ee251 100644 --- a/packages/legacy/src/smart/model/editor/commands/role.ts +++ b/packages/legacy/src/smart/model/editor/commands/role.ts @@ -3,7 +3,7 @@ */ import { MMELRole } from '@paneron/libmmel/interface/supportinterface'; -import { ModelAction } from '../model'; +import { ModelAction } from '@/smart/model/editor/model'; /** * Add role diff --git a/packages/legacy/src/smart/model/editor/components/comment.ts b/packages/legacy/src/smart/model/editor/components/comment.ts index a62905d9..53ee8ec4 100644 --- a/packages/legacy/src/smart/model/editor/components/comment.ts +++ b/packages/legacy/src/smart/model/editor/components/comment.ts @@ -1,8 +1,8 @@ import { MMELComment } from '@paneron/libmmel/interface/supportinterface'; -import { EditorNode, EditorProcess } from '../../editormodel'; -import { UndoReducerInterface } from '../interface'; -import { ModelAction } from '../model'; -import { ItemAction, useItems } from './itemTemplate'; +import { EditorNode, EditorProcess } from '@/smart/model/editormodel'; +import { UndoReducerInterface } from '@/smart/model/editor/interface'; +import { ModelAction } from '@/smart/model/editor/model'; +import { ItemAction, useItems } from '@/smart/model/editor/components/itemTemplate'; type command = 'comment'; type ownType = MMELComment; diff --git a/packages/legacy/src/smart/model/editor/components/element/common.ts b/packages/legacy/src/smart/model/editor/components/element/common.ts index 3381ccea..981c1841 100644 --- a/packages/legacy/src/smart/model/editor/components/element/common.ts +++ b/packages/legacy/src/smart/model/editor/components/element/common.ts @@ -1,6 +1,6 @@ -import { EditorNode } from '../../../editormodel'; -import { ModelAction } from '../../model'; -import { ElmAction } from '../elements'; +import { EditorNode } from '@/smart/model/editormodel'; +import { ModelAction } from '@/smart/model/editor/model'; +import { ElmAction } from '@/smart/model/editor/components/elements'; /** * Handle the command to delete elements in the model diff --git a/packages/legacy/src/smart/model/editor/components/element/dc.ts b/packages/legacy/src/smart/model/editor/components/element/dc.ts index b0b14ada..e7c4b452 100644 --- a/packages/legacy/src/smart/model/editor/components/element/dc.ts +++ b/packages/legacy/src/smart/model/editor/components/element/dc.ts @@ -1,12 +1,12 @@ import { MMELSubprocess } from '@paneron/libmmel/interface/flowcontrolinterface'; -import { fillRDCS } from '../../../../utils/ModelFunctions'; +import { fillRDCS } from '@/smart/utils/ModelFunctions'; import { EditorDataClass, EditorNode, isEditorDataClass, } from '../../../editormodel'; -import { ModelAction } from '../../model'; -import { ElmAction, DataCascadeDCID } from '../elements'; +import { ModelAction } from '@/smart/model/editor/model'; +import { ElmAction, DataCascadeDCID } from '@/smart/model/editor/components/elements'; /** * Add a new data class diff --git a/packages/legacy/src/smart/model/editor/components/element/registry.ts b/packages/legacy/src/smart/model/editor/components/element/registry.ts index 3f001aee..e0c57414 100644 --- a/packages/legacy/src/smart/model/editor/components/element/registry.ts +++ b/packages/legacy/src/smart/model/editor/components/element/registry.ts @@ -1,7 +1,7 @@ import { DataType } from '@paneron/libmmel/interface/baseinterface'; import { MMELSubprocess } from '@paneron/libmmel/interface/flowcontrolinterface'; import { isRegistry } from '@paneron/libmmel/util/validation'; -import { createRegistry } from '../../../../utils/EditorFactory'; +import { createRegistry } from '@/smart/utils/EditorFactory'; import { fillRDCS, genDCIdByRegId, @@ -16,8 +16,8 @@ import { isEditorProcess, isEditorRegistry, } from '../../../editormodel'; -import { ModelAction } from '../../model'; -import { ElmAction, DataCascadeIDs } from '../elements'; +import { ModelAction } from '@/smart/model/editor/model'; +import { ElmAction, DataCascadeIDs } from '@/smart/model/editor/components/elements'; export type RegistryCombined = EditorDataClass & { title: string; diff --git a/packages/legacy/src/smart/model/editor/components/elements.ts b/packages/legacy/src/smart/model/editor/components/elements.ts index 5cfa3c50..c5815d5f 100644 --- a/packages/legacy/src/smart/model/editor/components/elements.ts +++ b/packages/legacy/src/smart/model/editor/components/elements.ts @@ -9,23 +9,23 @@ import { tableReplace, figReplace, } from '../../../utils/handler/cascadeModelHandler'; -import * as Logger from '../../../../lib/logger'; +import * as Logger from '@/lib/logger'; import { EditorNode, isEditorDataClass, isEditorRegistry, } from '../../editormodel'; -import { UndoReducerInterface } from '../interface'; -import { ModelAction } from '../model'; -import { addCommonElms, delCommonElms, editCommonElms } from './element/common'; -import { addDC, editDC } from './element/dc'; +import { UndoReducerInterface } from '@/smart/model/editor/interface'; +import { ModelAction } from '@/smart/model/editor/model'; +import { addCommonElms, delCommonElms, editCommonElms } from '@/smart/model/editor/components/element/common'; +import { addDC, editDC } from '@/smart/model/editor/components/element/dc'; import { addRegistry, delRegistry, editRegistry, RegistryCombined, } from './element/registry'; -import { ItemAction } from './itemTemplate'; +import { ItemAction } from '@/smart/model/editor/components/itemTemplate'; interface RoleCascadeAction { subtask: 'process-role'; diff --git a/packages/legacy/src/smart/model/editor/components/enums.ts b/packages/legacy/src/smart/model/editor/components/enums.ts index 0561a752..e10bc3fb 100644 --- a/packages/legacy/src/smart/model/editor/components/enums.ts +++ b/packages/legacy/src/smart/model/editor/components/enums.ts @@ -1,8 +1,8 @@ import { MMELEnum } from '@paneron/libmmel/interface/datainterface'; -import { EditorNode, isEditorDataClass } from '../../editormodel'; -import { UndoReducerInterface } from '../interface'; -import { ModelAction } from '../model'; -import { ItemAction, useItems } from './itemTemplate'; +import { EditorNode, isEditorDataClass } from '@/smart/model/editormodel'; +import { UndoReducerInterface } from '@/smart/model/editor/interface'; +import { ModelAction } from '@/smart/model/editor/model'; +import { ItemAction, useItems } from '@/smart/model/editor/components/itemTemplate'; type command = 'enums'; type ownType = MMELEnum; diff --git a/packages/legacy/src/smart/model/editor/components/figure.ts b/packages/legacy/src/smart/model/editor/components/figure.ts index 762c521c..7a744d26 100644 --- a/packages/legacy/src/smart/model/editor/components/figure.ts +++ b/packages/legacy/src/smart/model/editor/components/figure.ts @@ -1,8 +1,8 @@ import { MMELFigure } from '@paneron/libmmel/interface/supportinterface'; -import { EditorNode, isEditorProcess } from '../../editormodel'; -import { UndoReducerInterface } from '../interface'; -import { ModelAction } from '../model'; -import { ItemAction, useItems } from './itemTemplate'; +import { EditorNode, isEditorProcess } from '@/smart/model/editormodel'; +import { UndoReducerInterface } from '@/smart/model/editor/interface'; +import { ModelAction } from '@/smart/model/editor/model'; +import { ItemAction, useItems } from '@/smart/model/editor/components/itemTemplate'; type command = 'figure'; type ownType = MMELFigure; diff --git a/packages/legacy/src/smart/model/editor/components/itemTemplate.ts b/packages/legacy/src/smart/model/editor/components/itemTemplate.ts index 36074e71..540f7311 100644 --- a/packages/legacy/src/smart/model/editor/components/itemTemplate.ts +++ b/packages/legacy/src/smart/model/editor/components/itemTemplate.ts @@ -1,5 +1,5 @@ import { useReducer } from 'react'; -import { UndoReducerInterface } from '../interface'; +import { UndoReducerInterface } from '@/smart/model/editor/interface'; export interface EditAction { task: 'edit'; diff --git a/packages/legacy/src/smart/model/editor/components/links.ts b/packages/legacy/src/smart/model/editor/components/links.ts index f2ee42f0..4919ad48 100644 --- a/packages/legacy/src/smart/model/editor/components/links.ts +++ b/packages/legacy/src/smart/model/editor/components/links.ts @@ -1,6 +1,6 @@ import { useReducer } from 'react'; import { MMELLink } from '@paneron/libmmel/interface/supportinterface'; -import { UndoReducerInterface } from '../interface'; +import { UndoReducerInterface } from '@/smart/model/editor/interface'; interface RefCascadeAction { subtask: 'process-ref'; diff --git a/packages/legacy/src/smart/model/editor/components/meta.ts b/packages/legacy/src/smart/model/editor/components/meta.ts index 75e4bf4a..f80e3ac8 100644 --- a/packages/legacy/src/smart/model/editor/components/meta.ts +++ b/packages/legacy/src/smart/model/editor/components/meta.ts @@ -1,6 +1,6 @@ import { useReducer } from 'react'; import { MMELMetadata } from '@paneron/libmmel/interface/supportinterface'; -import { UndoReducerInterface } from '../interface'; +import { UndoReducerInterface } from '@/smart/model/editor/interface'; interface EditAction { property: keyof MMELMetadata; diff --git a/packages/legacy/src/smart/model/editor/components/notes.ts b/packages/legacy/src/smart/model/editor/components/notes.ts index 2e9d5d4f..b83dd903 100644 --- a/packages/legacy/src/smart/model/editor/components/notes.ts +++ b/packages/legacy/src/smart/model/editor/components/notes.ts @@ -1,7 +1,7 @@ import { useReducer } from 'react'; import { MMELNote } from '@paneron/libmmel/interface/supportinterface'; -import { refNotesReplace } from '../../../utils/handler/cascadeModelHandler'; -import { UndoReducerInterface } from '../interface'; +import { refNotesReplace } from '@/smart/utils/handler/cascadeModelHandler'; +import { UndoReducerInterface } from '@/smart/model/editor/interface'; interface RefCascadeAction { subtask: 'process-ref'; diff --git a/packages/legacy/src/smart/model/editor/components/pages.ts b/packages/legacy/src/smart/model/editor/components/pages.ts index 5d6fe9c9..942f8061 100644 --- a/packages/legacy/src/smart/model/editor/components/pages.ts +++ b/packages/legacy/src/smart/model/editor/components/pages.ts @@ -3,13 +3,13 @@ import { MMELEdge, MMELSubprocess, } from '@paneron/libmmel/interface/flowcontrolinterface'; -import { createSubprocessComponent } from '../../../utils/EditorFactory'; +import { createSubprocessComponent } from '@/smart/utils/EditorFactory'; import { dataPageReplace, elmPageReplace, } from '../../../utils/handler/cascadeModelHandler'; -import { updatePageElement } from '../../../utils/ModelFunctions'; -import * as Logger from '../../../../lib/logger'; +import { updatePageElement } from '@/smart/utils/ModelFunctions'; +import * as Logger from '@/lib/logger'; import { EditorNode, EditorSubprocess, @@ -18,8 +18,8 @@ import { isEditorProcess, isEditorRegistry, } from '../../editormodel'; -import { UndoReducerInterface } from '../interface'; -import { ModelAction } from '../model'; +import { UndoReducerInterface } from '@/smart/model/editor/interface'; +import { ModelAction } from '@/smart/model/editor/model'; interface RegCascadeAction { subtask: 'data'; diff --git a/packages/legacy/src/smart/model/editor/components/provision.ts b/packages/legacy/src/smart/model/editor/components/provision.ts index fa609097..0fd57398 100644 --- a/packages/legacy/src/smart/model/editor/components/provision.ts +++ b/packages/legacy/src/smart/model/editor/components/provision.ts @@ -1,7 +1,7 @@ import { useReducer } from 'react'; import { MMELProvision } from '@paneron/libmmel/interface/supportinterface'; -import { refProvisionReplace } from '../../../utils/handler/cascadeModelHandler'; -import { UndoReducerInterface } from '../interface'; +import { refProvisionReplace } from '@/smart/utils/handler/cascadeModelHandler'; +import { UndoReducerInterface } from '@/smart/model/editor/interface'; interface RefCascadeAction { subtask: 'process-ref'; diff --git a/packages/legacy/src/smart/model/editor/components/ref.ts b/packages/legacy/src/smart/model/editor/components/ref.ts index 6b212919..bcef2429 100644 --- a/packages/legacy/src/smart/model/editor/components/ref.ts +++ b/packages/legacy/src/smart/model/editor/components/ref.ts @@ -3,10 +3,10 @@ import { MMELProvision, MMELReference, } from '@paneron/libmmel/interface/supportinterface'; -import { EditorNode, isEditorDataClass } from '../../editormodel'; -import { UndoReducerInterface } from '../interface'; -import { ModelAction } from '../model'; -import { ItemAction, useItems } from './itemTemplate'; +import { EditorNode, isEditorDataClass } from '@/smart/model/editormodel'; +import { UndoReducerInterface } from '@/smart/model/editor/interface'; +import { ModelAction } from '@/smart/model/editor/model'; +import { ItemAction, useItems } from '@/smart/model/editor/components/itemTemplate'; type command = 'refs'; type ownType = MMELReference; diff --git a/packages/legacy/src/smart/model/editor/components/roles.ts b/packages/legacy/src/smart/model/editor/components/roles.ts index 792f1636..dae58e0c 100644 --- a/packages/legacy/src/smart/model/editor/components/roles.ts +++ b/packages/legacy/src/smart/model/editor/components/roles.ts @@ -1,13 +1,13 @@ import { MMELRole } from '@paneron/libmmel/interface/supportinterface'; -import { RoleAttribute } from '../../../utils/handler/cascadeModelHandler'; +import { RoleAttribute } from '@/smart/utils/handler/cascadeModelHandler'; import { EditorNode, isEditorApproval, isEditorProcess, } from '../../editormodel'; -import { UndoReducerInterface } from '../interface'; -import { ModelAction } from '../model'; -import { ItemAction, useItems } from './itemTemplate'; +import { UndoReducerInterface } from '@/smart/model/editor/interface'; +import { ModelAction } from '@/smart/model/editor/model'; +import { ItemAction, useItems } from '@/smart/model/editor/components/itemTemplate'; type command = 'roles'; type ownType = MMELRole; diff --git a/packages/legacy/src/smart/model/editor/components/sections.ts b/packages/legacy/src/smart/model/editor/components/sections.ts index 21346849..59c766f5 100644 --- a/packages/legacy/src/smart/model/editor/components/sections.ts +++ b/packages/legacy/src/smart/model/editor/components/sections.ts @@ -1,6 +1,6 @@ import { MMELTextSection } from '@paneron/libmmel/interface/supportinterface'; -import { UndoReducerInterface } from '../interface'; -import { ItemAction, useItems } from './itemTemplate'; +import { UndoReducerInterface } from '@/smart/model/editor/interface'; +import { ItemAction, useItems } from '@/smart/model/editor/components/itemTemplate'; type command = 'section'; const value = 'section'; diff --git a/packages/legacy/src/smart/model/editor/components/table.ts b/packages/legacy/src/smart/model/editor/components/table.ts index 5c1fb953..5cadc96a 100644 --- a/packages/legacy/src/smart/model/editor/components/table.ts +++ b/packages/legacy/src/smart/model/editor/components/table.ts @@ -1,8 +1,8 @@ import { MMELTable } from '@paneron/libmmel/interface/supportinterface'; -import { EditorNode, isEditorProcess } from '../../editormodel'; -import { UndoReducerInterface } from '../interface'; -import { ModelAction } from '../model'; -import { ItemAction, useItems } from './itemTemplate'; +import { EditorNode, isEditorProcess } from '@/smart/model/editormodel'; +import { UndoReducerInterface } from '@/smart/model/editor/interface'; +import { ModelAction } from '@/smart/model/editor/model'; +import { ItemAction, useItems } from '@/smart/model/editor/components/itemTemplate'; type command = 'table'; type ownType = MMELTable; diff --git a/packages/legacy/src/smart/model/editor/components/terms.ts b/packages/legacy/src/smart/model/editor/components/terms.ts index 93f27910..6a8d7e0d 100644 --- a/packages/legacy/src/smart/model/editor/components/terms.ts +++ b/packages/legacy/src/smart/model/editor/components/terms.ts @@ -1,6 +1,6 @@ import { MMELTerm } from '@paneron/libmmel/interface/supportinterface'; -import { UndoReducerInterface } from '../interface'; -import { ItemAction, useItems } from './itemTemplate'; +import { UndoReducerInterface } from '@/smart/model/editor/interface'; +import { ItemAction, useItems } from '@/smart/model/editor/components/itemTemplate'; type command = 'terms'; type ownType = MMELTerm; diff --git a/packages/legacy/src/smart/model/editor/components/vars.ts b/packages/legacy/src/smart/model/editor/components/vars.ts index ce6a6a19..9653c129 100644 --- a/packages/legacy/src/smart/model/editor/components/vars.ts +++ b/packages/legacy/src/smart/model/editor/components/vars.ts @@ -1,7 +1,7 @@ import { MMELVariable } from '@paneron/libmmel/interface/supportinterface'; -import { UndoReducerInterface } from '../interface'; -import { ModelAction } from '../model'; -import { ItemAction, useItems } from './itemTemplate'; +import { UndoReducerInterface } from '@/smart/model/editor/interface'; +import { ModelAction } from '@/smart/model/editor/model'; +import { ItemAction, useItems } from '@/smart/model/editor/components/itemTemplate'; type command = 'vars'; type ownType = MMELVariable; diff --git a/packages/legacy/src/smart/model/editor/components/view.ts b/packages/legacy/src/smart/model/editor/components/view.ts index 52c6f650..1e9ec004 100644 --- a/packages/legacy/src/smart/model/editor/components/view.ts +++ b/packages/legacy/src/smart/model/editor/components/view.ts @@ -1,7 +1,7 @@ import { MMELView } from '@paneron/libmmel/interface/supportinterface'; -import { UndoReducerInterface } from '../interface'; -import { ModelAction } from '../model'; -import { ItemAction, useItems } from './itemTemplate'; +import { UndoReducerInterface } from '@/smart/model/editor/interface'; +import { ModelAction } from '@/smart/model/editor/model'; +import { ItemAction, useItems } from '@/smart/model/editor/components/itemTemplate'; type command = 'view'; type ownType = MMELView; diff --git a/packages/legacy/src/smart/model/editor/history.ts b/packages/legacy/src/smart/model/editor/history.ts index 18639832..84a241a8 100644 --- a/packages/legacy/src/smart/model/editor/history.ts +++ b/packages/legacy/src/smart/model/editor/history.ts @@ -3,8 +3,8 @@ */ import { useReducer } from 'react'; -import { HistoryItem } from '../history'; -import { UndoReducerInterface } from './interface'; +import { HistoryItem } from '@/smart/model/history'; +import { UndoReducerInterface } from '@/smart/model/editor/interface'; /** * Drill down more levels diff --git a/packages/legacy/src/smart/model/editor/hybird/data.ts b/packages/legacy/src/smart/model/editor/hybird/data.ts index 2fc29ac7..99fa12b4 100644 --- a/packages/legacy/src/smart/model/editor/hybird/data.ts +++ b/packages/legacy/src/smart/model/editor/hybird/data.ts @@ -5,9 +5,9 @@ import { isEditorDataClass, isEditorRegistry, } from '../../editormodel'; -import { RegistryCombined } from '../components/element/registry'; -import { ModelAction } from '../model'; -import { HyEditAction } from './distributor'; +import { RegistryCombined } from '@/smart/model/editor/components/element/registry'; +import { ModelAction } from '@/smart/model/editor/model'; +import { HyEditAction } from '@/smart/model/editor/hybird/distributor'; type RegistryImportRefHybird = HyEditAction & { task: 'registry-import-ref' }; type DCImportRefHybird = HyEditAction & { task: 'dc-import-ref' }; diff --git a/packages/legacy/src/smart/model/editor/hybird/distributor.ts b/packages/legacy/src/smart/model/editor/hybird/distributor.ts index bd31c0d2..22edb7bf 100644 --- a/packages/legacy/src/smart/model/editor/hybird/distributor.ts +++ b/packages/legacy/src/smart/model/editor/hybird/distributor.ts @@ -20,11 +20,11 @@ import { EditorModel, EditorProcess, } from '../../editormodel'; -import { RegistryCombined } from '../components/element/registry'; -import { ModelAction } from '../model'; -import { compileDCRefImport, compileRegistryRefImport } from './data'; -import { compileEGateEdit } from './egateedit'; -import { compileProcessImport } from './import'; +import { RegistryCombined } from '@/smart/model/editor/components/element/registry'; +import { ModelAction } from '@/smart/model/editor/model'; +import { compileDCRefImport, compileRegistryRefImport } from '@/smart/model/editor/hybird/data'; +import { compileEGateEdit } from '@/smart/model/editor/hybird/egateedit'; +import { compileProcessImport } from '@/smart/model/editor/hybird/import'; import { compileProcessAddPage, compileProcessBringin, diff --git a/packages/legacy/src/smart/model/editor/hybird/egateedit.ts b/packages/legacy/src/smart/model/editor/hybird/egateedit.ts index 381c304e..b6873538 100644 --- a/packages/legacy/src/smart/model/editor/hybird/egateedit.ts +++ b/packages/legacy/src/smart/model/editor/hybird/egateedit.ts @@ -1,7 +1,7 @@ import { MMELEdge } from '@paneron/libmmel/interface/flowcontrolinterface'; -import { EditorModel, isEditorEgate } from '../../editormodel'; -import { ModelAction } from '../model'; -import { HyEditAction } from './distributor'; +import { EditorModel, isEditorEgate } from '@/smart/model/editormodel'; +import { ModelAction } from '@/smart/model/editor/model'; +import { HyEditAction } from '@/smart/model/editor/hybird/distributor'; type EgateHybird = HyEditAction & { task: 'egate-edit' }; diff --git a/packages/legacy/src/smart/model/editor/hybird/import.ts b/packages/legacy/src/smart/model/editor/hybird/import.ts index e1cc897f..cd8bff2c 100644 --- a/packages/legacy/src/smart/model/editor/hybird/import.ts +++ b/packages/legacy/src/smart/model/editor/hybird/import.ts @@ -3,9 +3,9 @@ import { addProcessIfNotFound, NewImportItems, } from '../../../utils/ModelImport'; -import { EditorModel, isEditorProcess } from '../../editormodel'; -import { ModelAction } from '../model'; -import { HyEditAction } from './distributor'; +import { EditorModel, isEditorProcess } from '@/smart/model/editormodel'; +import { ModelAction } from '@/smart/model/editor/model'; +import { HyEditAction } from '@/smart/model/editor/hybird/distributor'; type ProcessImportHybird = HyEditAction & { task: 'elm-import' }; diff --git a/packages/legacy/src/smart/model/editor/hybird/process.ts b/packages/legacy/src/smart/model/editor/hybird/process.ts index 64b2cc54..4035c478 100644 --- a/packages/legacy/src/smart/model/editor/hybird/process.ts +++ b/packages/legacy/src/smart/model/editor/hybird/process.ts @@ -1,7 +1,7 @@ -import { createNewPage } from '../../../utils/ModelAddComponentHandler'; -import { EditorModel, EditorProcess, isEditorProcess } from '../../editormodel'; -import { ModelAction } from '../model'; -import { HyEditAction } from './distributor'; +import { createNewPage } from '@/smart/utils/ModelAddComponentHandler'; +import { EditorModel, EditorProcess, isEditorProcess } from '@/smart/model/editormodel'; +import { ModelAction } from '@/smart/model/editor/model'; +import { HyEditAction } from '@/smart/model/editor/hybird/distributor'; type ProcessAddPageHybird = HyEditAction & { task: 'process-add-page' }; type ProcessRemovePageHybird = HyEditAction & { task: 'process-remove-page' }; diff --git a/packages/legacy/src/smart/model/editor/interface.ts b/packages/legacy/src/smart/model/editor/interface.ts index d68e14cd..bcf3bde5 100644 --- a/packages/legacy/src/smart/model/editor/interface.ts +++ b/packages/legacy/src/smart/model/editor/interface.ts @@ -1,6 +1,6 @@ -import { ChangeLog } from '../changelog'; -import { EditorModel } from '../editormodel'; -import { ModelAction } from './model'; +import { ChangeLog } from '@/smart/model/changelog'; +import { EditorModel } from '@/smart/model/editormodel'; +import { ModelAction } from '@/smart/model/editor/model'; /** * For undo / redo, that return the opposite action diff --git a/packages/legacy/src/smart/model/editor/model.ts b/packages/legacy/src/smart/model/editor/model.ts index 0bb16d2e..aba29ced 100644 --- a/packages/legacy/src/smart/model/editor/model.ts +++ b/packages/legacy/src/smart/model/editor/model.ts @@ -1,37 +1,37 @@ -import * as Logger from '../../../lib/logger'; -import { EditorModel } from '../editormodel'; -import { cascadeCheckDCs } from './components/element/dc'; -import { cascadeCheckRegs } from './components/element/registry'; -import { ElmAction, useElements } from './components/elements'; -import { cascadeCheckEnum, EnumAction, useEnums } from './components/enums'; -import { MetaAction, useMeta } from './components/meta'; +import * as Logger from '@/lib/logger'; +import { EditorModel } from '@/smart/model/editormodel'; +import { cascadeCheckDCs } from '@/smart/model/editor/components/element/dc'; +import { cascadeCheckRegs } from '@/smart/model/editor/components/element/registry'; +import { ElmAction, useElements } from '@/smart/model/editor/components/elements'; +import { cascadeCheckEnum, EnumAction, useEnums } from '@/smart/model/editor/components/enums'; +import { MetaAction, useMeta } from '@/smart/model/editor/components/meta'; import { cascadeCheckPages, explorePageDataNodes, PageAction, usePages, } from './components/pages'; -import { useView, ViewAction } from './components/view'; -import { ProvisionAction, useProvisions } from './components/provision'; -import { cascadeCheckRefs, RefAction, useRefs } from './components/ref'; -import { RoleAction, useRoles, cascadeCheckRole } from './components/roles'; -import { SectionAction, useSections } from './components/sections'; -import { TermsAction, useTerms } from './components/terms'; -import { useVars, VarAction } from './components/vars'; -import { cascadeCheckTable, TableAction, useTable } from './components/table'; -import { cascadeCheckFigure, FigAction, useFigure } from './components/figure'; -import { UndoReducerModelInterface } from './interface'; +import { useView, ViewAction } from '@/smart/model/editor/components/view'; +import { ProvisionAction, useProvisions } from '@/smart/model/editor/components/provision'; +import { cascadeCheckRefs, RefAction, useRefs } from '@/smart/model/editor/components/ref'; +import { RoleAction, useRoles, cascadeCheckRole } from '@/smart/model/editor/components/roles'; +import { SectionAction, useSections } from '@/smart/model/editor/components/sections'; +import { TermsAction, useTerms } from '@/smart/model/editor/components/terms'; +import { useVars, VarAction } from '@/smart/model/editor/components/vars'; +import { cascadeCheckTable, TableAction, useTable } from '@/smart/model/editor/components/table'; +import { cascadeCheckFigure, FigAction, useFigure } from '@/smart/model/editor/components/figure'; +import { UndoReducerModelInterface } from '@/smart/model/editor/interface'; import { cascadeCheckComment, CommentAction, useComment, } from './components/comment'; import { useMemo } from 'react'; -import { cascadeCheckElm } from './components/element/common'; -import { compileHybird, HyEditAction } from './hybird/distributor'; -import { NotesAction, useNotes } from './components/notes'; -import { MODELVERSION } from '../../utils/constants'; -import { LinkAction, useLinks } from './components/links'; +import { cascadeCheckElm } from '@/smart/model/editor/components/element/common'; +import { compileHybird, HyEditAction } from '@/smart/model/editor/hybird/distributor'; +import { NotesAction, useNotes } from '@/smart/model/editor/components/notes'; +import { MODELVERSION } from '@/smart/utils/constants'; +import { LinkAction, useLinks } from '@/smart/model/editor/components/links'; interface InitModelAction { act: 'initModel'; diff --git a/packages/legacy/src/smart/model/editor/state.ts b/packages/legacy/src/smart/model/editor/state.ts index 60f17c05..1f5c698b 100644 --- a/packages/legacy/src/smart/model/editor/state.ts +++ b/packages/legacy/src/smart/model/editor/state.ts @@ -1,10 +1,10 @@ import { useReducer, useState } from 'react'; -import * as Logger from '../../../lib/logger'; -import { addToLog, ChangeLog } from '../changelog'; -import { EditorState } from '../States'; -import { HistoryAction, useHistory } from './history'; -import { UndoManagerInterface } from './interface'; -import { ModelAction, useModel } from './model'; +import * as Logger from '@/lib/logger'; +import { addToLog, ChangeLog } from '@/smart/model/changelog'; +import { EditorState } from '@/smart/model/States'; +import { HistoryAction, useHistory } from '@/smart/model/editor/history'; +import { UndoManagerInterface } from '@/smart/model/editor/interface'; +import { ModelAction, useModel } from '@/smart/model/editor/model'; export type EditorAction = ModelAction | HistoryAction; diff --git a/packages/legacy/src/smart/model/history.tsx b/packages/legacy/src/smart/model/history.tsx index 9e6700d7..628400a5 100644 --- a/packages/legacy/src/smart/model/history.tsx +++ b/packages/legacy/src/smart/model/history.tsx @@ -5,11 +5,11 @@ */ import React from 'react'; -import { getRootName } from '../utils/ModelFunctions'; -import { HistoryAction } from './editor/history'; -import { EditorModel } from './editormodel'; -import { ModelWrapper } from './modelwrapper'; -import { MMELRepo } from './repo'; +import { getRootName } from '@/smart/utils/ModelFunctions'; +import { HistoryAction } from '@/smart/model/editor/history'; +import { EditorModel } from '@/smart/model/editormodel'; +import { ModelWrapper } from '@/smart/model/modelwrapper'; +import { MMELRepo } from '@/smart/model/repo'; interface Breadcrumb { label: JSX.Element; diff --git a/packages/legacy/src/smart/model/json.ts b/packages/legacy/src/smart/model/json.ts index 21d4e42f..5ea9b564 100644 --- a/packages/legacy/src/smart/model/json.ts +++ b/packages/legacy/src/smart/model/json.ts @@ -22,7 +22,7 @@ import { MMELView, NOTE_TYPE, } from '@paneron/libmmel/interface/supportinterface'; -import { JSONContextType } from '../utils/repo/io'; +import { JSONContextType } from '@/smart/utils/repo/io'; export interface MMELJSON { '@context': JSONContextType; diff --git a/packages/legacy/src/smart/model/mapmodel.ts b/packages/legacy/src/smart/model/mapmodel.ts index 64a8ebb7..9f740428 100644 --- a/packages/legacy/src/smart/model/mapmodel.ts +++ b/packages/legacy/src/smart/model/mapmodel.ts @@ -3,9 +3,9 @@ */ import React from 'react'; -import { MAPVERSION } from '../utils/constants'; -import { buildModelLinks } from '../utils/ModelFunctions'; -import { JSONContext, JSONContextType } from '../utils/repo/io'; +import { MAPVERSION } from '@/smart/utils/constants'; +import { buildModelLinks } from '@/smart/utils/ModelFunctions'; +import { JSONContext, JSONContextType } from '@/smart/utils/repo/io'; import { EditorModel, EditorNode, @@ -20,7 +20,7 @@ import { createPageHistory, PageHistory, } from './history'; -import { ModelWrapper } from './modelwrapper'; +import { ModelWrapper } from '@/smart/model/modelwrapper'; export interface MappingDoc { id: string; diff --git a/packages/legacy/src/smart/model/modelwrapper.ts b/packages/legacy/src/smart/model/modelwrapper.ts index aaa44406..2ff6a998 100644 --- a/packages/legacy/src/smart/model/modelwrapper.ts +++ b/packages/legacy/src/smart/model/modelwrapper.ts @@ -40,19 +40,19 @@ import { getEditorNodeCallBack, NodeCallBack, } from './FlowContainer'; -import { fillRDCS } from '../utils/ModelFunctions'; -import * as Logger from '../../lib/logger'; +import { fillRDCS } from '@/smart/utils/ModelFunctions'; +import * as Logger from '@/lib/logger'; import { getMappedList, getRefNodeStyle, getSourceStyleById, MapResultType, } from '../utils/map/MappingCalculator'; -import { MapSet } from './mapmodel'; +import { MapSet } from '@/smart/model/mapmodel'; import React from 'react'; import { SerializedStyles } from '@emotion/react'; -import { MMELRepo, RepoIndex } from './repo'; -import { EditorViewOption } from './States'; +import { MMELRepo, RepoIndex } from '@/smart/model/repo'; +import { EditorViewOption } from '@/smart/model/States'; /** * The wrapper contains the model and which page it is viewing diff --git a/packages/legacy/src/smart/model/module/appModule.ts b/packages/legacy/src/smart/model/module/appModule.ts index 7315a712..684d9395 100644 --- a/packages/legacy/src/smart/model/module/appModule.ts +++ b/packages/legacy/src/smart/model/module/appModule.ts @@ -4,21 +4,21 @@ import { IconName } from '@blueprintjs/core'; import React from 'react'; -import DocumentViewer from '../../ui/docviewer'; -import EditWrapper from '../../ui/editFunctions/EditWrapper'; -import LinkAnalysis from '../../ui/LinkAnalysis'; -import DocumentEdit from '../../ui/maindocedit'; -import ModelMapper from '../../ui/mainmapper'; -import ModelViewer from '../../ui/mainviewer'; -import ModelWorkspace from '../../ui/modelWorkspace'; -import NLPMain from '../../ui/nlp/NLPMain'; -import RepoViewer from '../../ui/repo/RepoViewer'; -import { ChangeLog } from '../changelog'; -import { EditorModel } from '../editormodel'; -import { RepoHistory } from '../history'; -import { MapProfile } from '../mapmodel'; -import { MMELRepo, RepoIndex, RepoItemType } from '../repo'; -import { SMARTWorkspace } from '../workspace'; +import DocumentViewer from '@/smart/ui/docviewer'; +import EditWrapper from '@/smart/ui/editFunctions/EditWrapper'; +import LinkAnalysis from '@/smart/ui/LinkAnalysis'; +import DocumentEdit from '@/smart/ui/maindocedit'; +import ModelMapper from '@/smart/ui/mainmapper'; +import ModelViewer from '@/smart/ui/mainviewer'; +import ModelWorkspace from '@/smart/ui/modelWorkspace'; +import NLPMain from '@/smart/ui/nlp/NLPMain'; +import RepoViewer from '@/smart/ui/repo/RepoViewer'; +import { ChangeLog } from '@/smart/model/changelog'; +import { EditorModel } from '@/smart/model/editormodel'; +import { RepoHistory } from '@/smart/model/history'; +import { MapProfile } from '@/smart/model/mapmodel'; +import { MMELRepo, RepoIndex, RepoItemType } from '@/smart/model/repo'; +import { SMARTWorkspace } from '@/smart/model/workspace'; export type ModelModuleConfig = BaseConfig & { type: 'model'; diff --git a/packages/legacy/src/smart/model/workspace.ts b/packages/legacy/src/smart/model/workspace.ts index cc5bfc67..7c8aec6a 100644 --- a/packages/legacy/src/smart/model/workspace.ts +++ b/packages/legacy/src/smart/model/workspace.ts @@ -2,9 +2,9 @@ * It is the data model of how data instances are stored and associated to the model */ -import { IObject } from '../ui/common/listmanagement/listPopoverItem'; -import { WSVERSION } from '../utils/constants'; -import { JSONContext, JSONContextType } from '../utils/repo/io'; +import { IObject } from '@/smart/ui/common/listmanagement/listPopoverItem'; +import { WSVERSION } from '@/smart/utils/constants'; +import { JSONContext, JSONContextType } from '@/smart/utils/repo/io'; export interface SMARTDocument extends IObject { name: string; diff --git a/packages/legacy/src/smart/ui/LinkAnalysis.tsx b/packages/legacy/src/smart/ui/LinkAnalysis.tsx index 8a39de29..98b0ec4c 100644 --- a/packages/legacy/src/smart/ui/LinkAnalysis.tsx +++ b/packages/legacy/src/smart/ui/LinkAnalysis.tsx @@ -1,6 +1,6 @@ -import { MMELRepo, RepoIndex } from '../model/repo'; +import { MMELRepo, RepoIndex } from '@/smart/model/repo'; import Workspace from '@riboseinc/paneron-extension-kit/widgets/Workspace'; -import RepoIndexMainView from './mapper/repo/RepoIndexMainView'; +import RepoIndexMainView from '@/smart/ui/mapper/repo/RepoIndexMainView'; import React from 'react'; const LinkAnalysis: React.FC<{ diff --git a/packages/legacy/src/smart/ui/app/ModuleButton.tsx b/packages/legacy/src/smart/ui/app/ModuleButton.tsx index 17b9df5b..b9744b1f 100644 --- a/packages/legacy/src/smart/ui/app/ModuleButton.tsx +++ b/packages/legacy/src/smart/ui/app/ModuleButton.tsx @@ -1,7 +1,7 @@ import { Button } from '@blueprintjs/core'; import { Tooltip2 } from '@blueprintjs/popover2'; import React from 'react'; -import { ModuleName, MODULE_CONFIGURATION } from '../../model/module/appModule'; +import { ModuleName, MODULE_CONFIGURATION } from '@/smart/model/module/appModule'; /** * The buttons on the leftmost button bar diff --git a/packages/legacy/src/smart/ui/app/NeutralView.tsx b/packages/legacy/src/smart/ui/app/NeutralView.tsx index 10156c70..e8812758 100644 --- a/packages/legacy/src/smart/ui/app/NeutralView.tsx +++ b/packages/legacy/src/smart/ui/app/NeutralView.tsx @@ -10,7 +10,7 @@ import { ModuleName, MODULE_CONFIGURATION, } from '../../model/module/appModule'; -import { MMELRepo, RepoIndex } from '../../model/repo'; +import { MMELRepo, RepoIndex } from '@/smart/model/repo'; /** * The displayed UI when nothing is open. diff --git a/packages/legacy/src/smart/ui/app/RepoItemLoadingView.tsx b/packages/legacy/src/smart/ui/app/RepoItemLoadingView.tsx index dabd121b..8a5cb320 100644 --- a/packages/legacy/src/smart/ui/app/RepoItemLoadingView.tsx +++ b/packages/legacy/src/smart/ui/app/RepoItemLoadingView.tsx @@ -6,29 +6,29 @@ import { jsx } from '@emotion/react'; import { css } from '@emotion/react'; import { DatasetContext } from '@riboseinc/paneron-extension-kit/context'; import React, { useContext, useMemo, useState } from 'react'; -import { ChangeLog, createChangeLog } from '../../model/changelog'; -import { EditorModel } from '../../model/editormodel'; -import { RepoHistory } from '../../model/history'; -import { MMELJSON } from '../../model/json'; -import { indexModel, MapProfile } from '../../model/mapmodel'; -import { MMELToEditorModel } from '../../model/modelwrapper'; +import { ChangeLog, createChangeLog } from '@/smart/model/changelog'; +import { EditorModel } from '@/smart/model/editormodel'; +import { RepoHistory } from '@/smart/model/history'; +import { MMELJSON } from '@/smart/model/json'; +import { indexModel, MapProfile } from '@/smart/model/mapmodel'; +import { MMELToEditorModel } from '@/smart/model/modelwrapper'; import { ModuleList, ModuleName, MODULE_CONFIGURATION, } from '../../model/module/appModule'; -import { MMELRepo, RepoIndex } from '../../model/repo'; -import { createNewSMARTWorkspace, SMARTWorkspace } from '../../model/workspace'; -import { MAPVERSION } from '../../utils/constants'; -import { getNamespace } from '../../utils/ModelFunctions'; -import * as Logger from '../../../lib/logger'; +import { MMELRepo, RepoIndex } from '@/smart/model/repo'; +import { createNewSMARTWorkspace, SMARTWorkspace } from '@/smart/model/workspace'; +import { MAPVERSION } from '@/smart/utils/constants'; +import { getNamespace } from '@/smart/utils/ModelFunctions'; +import * as Logger from '@/lib/logger'; import { getPathByNS, JSONContext, JSONToMMEL, RepoFileType, } from '../../utils/repo/io'; -import { LoadingScreen } from '../common/Loading'; +import { LoadingScreen } from '@/smart/ui/common/Loading'; /** * When an item (model / document) is open, its contents are loaded first here. diff --git a/packages/legacy/src/smart/ui/app/RepoView.tsx b/packages/legacy/src/smart/ui/app/RepoView.tsx index 13f1b251..4ec93347 100644 --- a/packages/legacy/src/smart/ui/app/RepoView.tsx +++ b/packages/legacy/src/smart/ui/app/RepoView.tsx @@ -1,13 +1,13 @@ import React from 'react'; import { useState } from 'react'; -import { MMELRepo, RepoIndex } from '../../model/repo'; -import { RepoHistory } from '../../model/history'; -import AppControlBar from './AppControlBar'; -import AppUILayout from './AppUI'; -import ModuleButton from './ModuleButton'; -import { ModuleList, ModuleName } from '../../model/module/appModule'; -import RepoItemLoadingView from './RepoItemLoadingView'; -import NeutralView from './NeutralView'; +import { MMELRepo, RepoIndex } from '@/smart/model/repo'; +import { RepoHistory } from '@/smart/model/history'; +import AppControlBar from '@/smart/ui/app/AppControlBar'; +import AppUILayout from '@/smart/ui/app/AppUI'; +import ModuleButton from '@/smart/ui/app/ModuleButton'; +import { ModuleList, ModuleName } from '@/smart/model/module/appModule'; +import RepoItemLoadingView from '@/smart/ui/app/RepoItemLoadingView'; +import NeutralView from '@/smart/ui/app/NeutralView'; const RepositoryView: React.FC<{ index: RepoIndex; diff --git a/packages/legacy/src/smart/ui/application/ISO27001/Chart.tsx b/packages/legacy/src/smart/ui/application/ISO27001/Chart.tsx index aa5ab23d..836264d1 100644 --- a/packages/legacy/src/smart/ui/application/ISO27001/Chart.tsx +++ b/packages/legacy/src/smart/ui/application/ISO27001/Chart.tsx @@ -1,6 +1,6 @@ import React from 'react'; -import MGDLabel from '../../../MGDComponents/MGDLabel'; -import { Log27001Record, SettingRange } from './model'; +import MGDLabel from '@/smart/MGDComponents/MGDLabel'; +import { Log27001Record, SettingRange } from '@/smart/ui/application/ISO27001/model'; const path = 'M18 2.0845 a 15.9155 15.9155 0 0 1 0 31.831 a 15.9155 15.9155 0 0 1 0 -31.831'; diff --git a/packages/legacy/src/smart/ui/application/ISO27001/ConfigurePage.tsx b/packages/legacy/src/smart/ui/application/ISO27001/ConfigurePage.tsx index 92b7e20b..4f442e89 100644 --- a/packages/legacy/src/smart/ui/application/ISO27001/ConfigurePage.tsx +++ b/packages/legacy/src/smart/ui/application/ISO27001/ConfigurePage.tsx @@ -9,10 +9,10 @@ import { Text, } from '@blueprintjs/core'; import React from 'react'; -import MGDContainer from '../../../MGDComponents/MGDContainer'; -import MGDDisplayPane from '../../../MGDComponents/MGDDisplayPane'; -import { obtainData } from './DataFeeder'; -import { Application27001Setting, fixedlocalhost } from './model'; +import MGDContainer from '@/smart/MGDComponents/MGDContainer'; +import MGDDisplayPane from '@/smart/MGDComponents/MGDDisplayPane'; +import { obtainData } from '@/smart/ui/application/ISO27001/DataFeeder'; +import { Application27001Setting, fixedlocalhost } from '@/smart/ui/application/ISO27001/model'; const Application27001ConfigurePage: React.FC<{ onClose: () => void; diff --git a/packages/legacy/src/smart/ui/application/ISO27001/DataFeeder.ts b/packages/legacy/src/smart/ui/application/ISO27001/DataFeeder.ts index 56365a0a..32c739c6 100644 --- a/packages/legacy/src/smart/ui/application/ISO27001/DataFeeder.ts +++ b/packages/legacy/src/smart/ui/application/ISO27001/DataFeeder.ts @@ -1,4 +1,4 @@ -import { fixedlocalhost, SettingRange, StreamReading } from './model'; +import { fixedlocalhost, SettingRange, StreamReading } from '@/smart/ui/application/ISO27001/model'; export function obtainData(url: string, time = 0): StreamReading { if (url === fixedlocalhost && time !== undefined) { diff --git a/packages/legacy/src/smart/ui/application/ISO27001/LineChart.tsx b/packages/legacy/src/smart/ui/application/ISO27001/LineChart.tsx index 846f1c94..4de36b86 100644 --- a/packages/legacy/src/smart/ui/application/ISO27001/LineChart.tsx +++ b/packages/legacy/src/smart/ui/application/ISO27001/LineChart.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import MGDLabel from '../../../MGDComponents/MGDLabel'; +import MGDLabel from '@/smart/MGDComponents/MGDLabel'; const LineChart27001: React.FC<{ values: number[]; diff --git a/packages/legacy/src/smart/ui/application/ISO27001/LogPage.tsx b/packages/legacy/src/smart/ui/application/ISO27001/LogPage.tsx index a27df9db..cf1bfb42 100644 --- a/packages/legacy/src/smart/ui/application/ISO27001/LogPage.tsx +++ b/packages/legacy/src/smart/ui/application/ISO27001/LogPage.tsx @@ -3,13 +3,13 @@ import { Classes } from '@blueprintjs/popover2'; import { DatasetContext } from '@riboseinc/paneron-extension-kit/context'; import React from 'react'; import { CSSProperties, useContext, useState } from 'react'; -import MGDContainer from '../../../MGDComponents/MGDContainer'; -import MGDDisplayPane from '../../../MGDComponents/MGDDisplayPane'; -import { ViewFunctionInterface } from '../../../model/ViewFunctionModel'; -import { FILE_TYPE, saveToFileSystem } from '../../../utils/IOFunctions'; -import { NormalComboBox } from '../../common/fields'; -import updateMeasurementView from '../../measurement/MeasurementResultFormatter'; -import { Log27001, Log27001Record } from './model'; +import MGDContainer from '@/smart/MGDComponents/MGDContainer'; +import MGDDisplayPane from '@/smart/MGDComponents/MGDDisplayPane'; +import { ViewFunctionInterface } from '@/smart/model/ViewFunctionModel'; +import { FILE_TYPE, saveToFileSystem } from '@/smart/utils/IOFunctions'; +import { NormalComboBox } from '@/smart/ui/common/fields'; +import updateMeasurementView from '@/smart/ui/measurement/MeasurementResultFormatter'; +import { Log27001, Log27001Record } from '@/smart/ui/application/ISO27001/model'; const options = ['No filter', 'Pass', 'Fail'] as const; type ResultType = typeof options[number]; diff --git a/packages/legacy/src/smart/ui/application/ISO27001/Main.tsx b/packages/legacy/src/smart/ui/application/ISO27001/Main.tsx index 45c1f5a4..a8d81fcb 100644 --- a/packages/legacy/src/smart/ui/application/ISO27001/Main.tsx +++ b/packages/legacy/src/smart/ui/application/ISO27001/Main.tsx @@ -11,25 +11,25 @@ import { dialogLayout, dialogLayoutFull, } from '../../../../css/layout'; -import MGDContainer from '../../../MGDComponents/MGDContainer'; -import MGDHeading from '../../../MGDComponents/MGDHeading'; -import MGDSidebar from '../../../MGDComponents/MGDSidebar'; -import { EditorModel } from '../../../model/editormodel'; -import Chart27001 from './Chart'; -import Application27001ConfigurePage from './ConfigurePage'; -import Application27001LogPage from './LogPage'; +import MGDContainer from '@/smart/MGDComponents/MGDContainer'; +import MGDHeading from '@/smart/MGDComponents/MGDHeading'; +import MGDSidebar from '@/smart/MGDComponents/MGDSidebar'; +import { EditorModel } from '@/smart/model/editormodel'; +import Chart27001 from '@/smart/ui/application/ISO27001/Chart'; +import Application27001ConfigurePage from '@/smart/ui/application/ISO27001/ConfigurePage'; +import Application27001LogPage from '@/smart/ui/application/ISO27001/LogPage'; import { setInterval, clearInterval } from 'timers'; -import { obtainData } from './DataFeeder'; -import { testMeasurement27001 } from './ReadingCalculator'; +import { obtainData } from '@/smart/ui/application/ISO27001/DataFeeder'; +import { testMeasurement27001 } from '@/smart/ui/application/ISO27001/ReadingCalculator'; import { Popover2 } from '@blueprintjs/popover2'; -import { ViewFunctionInterface } from '../../../model/ViewFunctionModel'; +import { ViewFunctionInterface } from '@/smart/model/ViewFunctionModel'; import { Application27001Setting, Dialog27001Interface, fixedlocalhost, Log27001, } from './model'; -import LineChart27001 from './LineChart'; +import LineChart27001 from '@/smart/ui/application/ISO27001/LineChart'; import React from 'react'; const Application27001: React.FC<{ diff --git a/packages/legacy/src/smart/ui/application/ISO27001/ReadingCalculator.ts b/packages/legacy/src/smart/ui/application/ISO27001/ReadingCalculator.ts index 63f60e6c..b64ccdbb 100644 --- a/packages/legacy/src/smart/ui/application/ISO27001/ReadingCalculator.ts +++ b/packages/legacy/src/smart/ui/application/ISO27001/ReadingCalculator.ts @@ -1,7 +1,7 @@ -import { EditorModel } from '../../../model/editormodel'; -import { EnviromentValues } from '../../../model/Measurement'; -import { checkModelMeasurement } from '../../../utils/measurement/Checker'; -import { Log27001Record, StreamReading } from './model'; +import { EditorModel } from '@/smart/model/editormodel'; +import { EnviromentValues } from '@/smart/model/Measurement'; +import { checkModelMeasurement } from '@/smart/utils/measurement/Checker'; +import { Log27001Record, StreamReading } from '@/smart/ui/application/ISO27001/model'; export function testMeasurement27001( model: EditorModel, diff --git a/packages/legacy/src/smart/ui/application/ISO27001/model.tsx b/packages/legacy/src/smart/ui/application/ISO27001/model.tsx index 93b50eef..e0299ff4 100644 --- a/packages/legacy/src/smart/ui/application/ISO27001/model.tsx +++ b/packages/legacy/src/smart/ui/application/ISO27001/model.tsx @@ -1,4 +1,4 @@ -import { MeasureResult } from '../../../model/Measurement'; +import { MeasureResult } from '@/smart/model/Measurement'; export interface Application27001Setting { source: string; diff --git a/packages/legacy/src/smart/ui/application/pas2060/BuildingMap.tsx b/packages/legacy/src/smart/ui/application/pas2060/BuildingMap.tsx index 8dfc0d71..2e32bab6 100644 --- a/packages/legacy/src/smart/ui/application/pas2060/BuildingMap.tsx +++ b/packages/legacy/src/smart/ui/application/pas2060/BuildingMap.tsx @@ -1,8 +1,8 @@ import React, { CSSProperties } from 'react'; import { Text } from '@blueprintjs/core'; -import MGDContainer from '../../../MGDComponents/MGDContainer'; -import { Application2060Setting, colors2060, EmissionSource } from './model'; -import MyMapBackground from './MyMapBackground'; +import MGDContainer from '@/smart/MGDComponents/MGDContainer'; +import { Application2060Setting, colors2060, EmissionSource } from '@/smart/ui/application/pas2060/model'; +import MyMapBackground from '@/smart/ui/application/pas2060/MyMapBackground'; type NumberedEmissionSource = EmissionSource & { pos: number; diff --git a/packages/legacy/src/smart/ui/application/pas2060/Chart.tsx b/packages/legacy/src/smart/ui/application/pas2060/Chart.tsx index 647de7c9..656cfa6f 100644 --- a/packages/legacy/src/smart/ui/application/pas2060/Chart.tsx +++ b/packages/legacy/src/smart/ui/application/pas2060/Chart.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import MGDLabel from '../../../MGDComponents/MGDLabel'; +import MGDLabel from '@/smart/MGDComponents/MGDLabel'; const path = 'M18 2.0845 a 15.9155 15.9155 0 0 1 0 31.831 a 15.9155 15.9155 0 0 1 0 -31.831'; diff --git a/packages/legacy/src/smart/ui/application/pas2060/ConfigurePage.tsx b/packages/legacy/src/smart/ui/application/pas2060/ConfigurePage.tsx index 50c9d47a..92d5106d 100644 --- a/packages/legacy/src/smart/ui/application/pas2060/ConfigurePage.tsx +++ b/packages/legacy/src/smart/ui/application/pas2060/ConfigurePage.tsx @@ -9,16 +9,16 @@ import { Tooltip2 } from '@blueprintjs/popover2'; import { DatasetContext } from '@riboseinc/paneron-extension-kit/context'; import React from 'react'; import { useContext } from 'react'; -import MGDContainer from '../../../MGDComponents/MGDContainer'; -import MGDDisplayPane from '../../../MGDComponents/MGDDisplayPane'; -import BuildingMap from './BuildingMap'; -import { obtainData } from './DataFeeder'; +import MGDContainer from '@/smart/MGDComponents/MGDContainer'; +import MGDDisplayPane from '@/smart/MGDComponents/MGDDisplayPane'; +import BuildingMap from '@/smart/ui/application/pas2060/BuildingMap'; +import { obtainData } from '@/smart/ui/application/pas2060/DataFeeder'; import { Application2060Setting, EmissionSource, fixedlocalhost, } from './model'; -import { propagateReadings } from './ReadingCalculator'; +import { propagateReadings } from '@/smart/ui/application/pas2060/ReadingCalculator'; const ApplicationConfigurePage: React.FC<{ onClose: () => void; diff --git a/packages/legacy/src/smart/ui/application/pas2060/DataFeeder.ts b/packages/legacy/src/smart/ui/application/pas2060/DataFeeder.ts index 6250d152..74cfa7ce 100644 --- a/packages/legacy/src/smart/ui/application/pas2060/DataFeeder.ts +++ b/packages/legacy/src/smart/ui/application/pas2060/DataFeeder.ts @@ -1,4 +1,4 @@ -import { fixedlocalhost, SensorReading } from './model'; +import { fixedlocalhost, SensorReading } from '@/smart/ui/application/pas2060/model'; export function obtainData(url: string): SensorReading[] { if (url === fixedlocalhost) { diff --git a/packages/legacy/src/smart/ui/application/pas2060/LogPage.tsx b/packages/legacy/src/smart/ui/application/pas2060/LogPage.tsx index 71a86a59..882016de 100644 --- a/packages/legacy/src/smart/ui/application/pas2060/LogPage.tsx +++ b/packages/legacy/src/smart/ui/application/pas2060/LogPage.tsx @@ -3,13 +3,13 @@ import { Classes } from '@blueprintjs/popover2'; import { DatasetContext } from '@riboseinc/paneron-extension-kit/context'; import React from 'react'; import { CSSProperties, useContext, useState } from 'react'; -import MGDContainer from '../../../MGDComponents/MGDContainer'; -import MGDDisplayPane from '../../../MGDComponents/MGDDisplayPane'; -import { ViewFunctionInterface } from '../../../model/ViewFunctionModel'; -import { FILE_TYPE, saveToFileSystem } from '../../../utils/IOFunctions'; -import { NormalComboBox } from '../../common/fields'; -import updateMeasurementView from '../../measurement/MeasurementResultFormatter'; -import { Log2060, LogRecord } from './model'; +import MGDContainer from '@/smart/MGDComponents/MGDContainer'; +import MGDDisplayPane from '@/smart/MGDComponents/MGDDisplayPane'; +import { ViewFunctionInterface } from '@/smart/model/ViewFunctionModel'; +import { FILE_TYPE, saveToFileSystem } from '@/smart/utils/IOFunctions'; +import { NormalComboBox } from '@/smart/ui/common/fields'; +import updateMeasurementView from '@/smart/ui/measurement/MeasurementResultFormatter'; +import { Log2060, LogRecord } from '@/smart/ui/application/pas2060/model'; const options = ['No filter', 'Pass', 'Fail'] as const; type ResultType = typeof options[number]; diff --git a/packages/legacy/src/smart/ui/application/pas2060/Main.tsx b/packages/legacy/src/smart/ui/application/pas2060/Main.tsx index b6e85a5d..59626302 100644 --- a/packages/legacy/src/smart/ui/application/pas2060/Main.tsx +++ b/packages/legacy/src/smart/ui/application/pas2060/Main.tsx @@ -11,13 +11,13 @@ import { dialogLayout, dialogLayoutFull, } from '../../../../css/layout'; -import MGDContainer from '../../../MGDComponents/MGDContainer'; -import MGDHeading from '../../../MGDComponents/MGDHeading'; -import MGDSidebar from '../../../MGDComponents/MGDSidebar'; -import { EditorModel } from '../../../model/editormodel'; -import Chart from './Chart'; -import ApplicationConfigurePage from './ConfigurePage'; -import ApplicationLogPage from './LogPage'; +import MGDContainer from '@/smart/MGDComponents/MGDContainer'; +import MGDHeading from '@/smart/MGDComponents/MGDHeading'; +import MGDSidebar from '@/smart/MGDComponents/MGDSidebar'; +import { EditorModel } from '@/smart/model/editormodel'; +import Chart from '@/smart/ui/application/pas2060/Chart'; +import ApplicationConfigurePage from '@/smart/ui/application/pas2060/ConfigurePage'; +import ApplicationLogPage from '@/smart/ui/application/pas2060/LogPage'; import { Application2060Setting, colors2060, @@ -27,16 +27,16 @@ import { ReadingRecord, } from './model'; import { setInterval, clearInterval } from 'timers'; -import { obtainData } from './DataFeeder'; +import { obtainData } from '@/smart/ui/application/pas2060/DataFeeder'; import { makeRecord, propagateReadings, testMeasurement2060, } from './ReadingCalculator'; import { Popover2 } from '@blueprintjs/popover2'; -import { ViewFunctionInterface } from '../../../model/ViewFunctionModel'; +import { ViewFunctionInterface } from '@/smart/model/ViewFunctionModel'; import React from 'react'; -import * as Logger from '../../../../lib/logger'; +import * as Logger from '@/lib/logger'; const Application2060: React.FC<{ model: EditorModel; diff --git a/packages/legacy/src/smart/ui/application/pas2060/ReadingCalculator.ts b/packages/legacy/src/smart/ui/application/pas2060/ReadingCalculator.ts index 3d0fb1b7..49a2af33 100644 --- a/packages/legacy/src/smart/ui/application/pas2060/ReadingCalculator.ts +++ b/packages/legacy/src/smart/ui/application/pas2060/ReadingCalculator.ts @@ -1,7 +1,7 @@ -import { EditorModel } from '../../../model/editormodel'; -import { EnviromentValues } from '../../../model/Measurement'; -import { checkModelMeasurement } from '../../../utils/measurement/Checker'; -import { EmissionSource, ReadingRecord, SensorReading } from './model'; +import { EditorModel } from '@/smart/model/editormodel'; +import { EnviromentValues } from '@/smart/model/Measurement'; +import { checkModelMeasurement } from '@/smart/utils/measurement/Checker'; +import { EmissionSource, ReadingRecord, SensorReading } from '@/smart/ui/application/pas2060/model'; export function propagateReadings( readings: SensorReading[], diff --git a/packages/legacy/src/smart/ui/application/pas2060/model.tsx b/packages/legacy/src/smart/ui/application/pas2060/model.tsx index 64b8fa26..18ab5497 100644 --- a/packages/legacy/src/smart/ui/application/pas2060/model.tsx +++ b/packages/legacy/src/smart/ui/application/pas2060/model.tsx @@ -1,4 +1,4 @@ -import { MeasureResult } from '../../../model/Measurement'; +import { MeasureResult } from '@/smart/model/Measurement'; export interface Application2060Setting { source: string; diff --git a/packages/legacy/src/smart/ui/application/plugin.ts b/packages/legacy/src/smart/ui/application/plugin.ts index 5da88b95..aae391ae 100644 --- a/packages/legacy/src/smart/ui/application/plugin.ts +++ b/packages/legacy/src/smart/ui/application/plugin.ts @@ -1,8 +1,8 @@ import { IToastProps } from '@blueprintjs/core'; -import { EditorModel } from '../../model/editormodel'; -import { ViewFunctionInterface } from '../../model/ViewFunctionModel'; -import Application27001 from './ISO27001/Main'; -import Application2060 from './pas2060/Main'; +import { EditorModel } from '@/smart/model/editormodel'; +import { ViewFunctionInterface } from '@/smart/model/ViewFunctionModel'; +import Application27001 from '@/smart/ui/application/ISO27001/Main'; +import Application2060 from '@/smart/ui/application/pas2060/Main'; export interface PluginInterface { model: EditorModel; diff --git a/packages/legacy/src/smart/ui/checklist/AttributeField.tsx b/packages/legacy/src/smart/ui/checklist/AttributeField.tsx index 657f2e36..773c5e06 100644 --- a/packages/legacy/src/smart/ui/checklist/AttributeField.tsx +++ b/packages/legacy/src/smart/ui/checklist/AttributeField.tsx @@ -1,9 +1,9 @@ import React from 'react'; import { MMELDataAttribute } from '@paneron/libmmel/interface/datainterface'; import { MMELReference } from '@paneron/libmmel/interface/supportinterface'; -import { ReferenceList } from '../common/description/ComponentList'; -import { NonEmptyFieldDescription } from '../common/description/fields'; -import { CLDescriptionItem } from './CustomFields'; +import { ReferenceList } from '@/smart/ui/common/description/ComponentList'; +import { NonEmptyFieldDescription } from '@/smart/ui/common/description/fields'; +import { CLDescriptionItem } from '@/smart/ui/checklist/CustomFields'; const ChecklistAttribute: React.FC<{ att: MMELDataAttribute; diff --git a/packages/legacy/src/smart/ui/checklist/CheckListAddon.tsx b/packages/legacy/src/smart/ui/checklist/CheckListAddon.tsx index a8659653..08fcf06b 100644 --- a/packages/legacy/src/smart/ui/checklist/CheckListAddon.tsx +++ b/packages/legacy/src/smart/ui/checklist/CheckListAddon.tsx @@ -6,7 +6,7 @@ import { flowPercentageLabel, flowProgressLabel, } from '../../../css/visual'; -import { ChecklistPackage } from '../../model/checklist'; +import { ChecklistPackage } from '@/smart/model/checklist'; import { EditorNode, isEditorEgate, diff --git a/packages/legacy/src/smart/ui/checklist/CheckListConfigPane.tsx b/packages/legacy/src/smart/ui/checklist/CheckListConfigPane.tsx index be51b24b..e6016f90 100644 --- a/packages/legacy/src/smart/ui/checklist/CheckListConfigPane.tsx +++ b/packages/legacy/src/smart/ui/checklist/CheckListConfigPane.tsx @@ -1,17 +1,17 @@ import { Button, Checkbox, Text } from '@blueprintjs/core'; import React from 'react'; import { useEffect, useState } from 'react'; -import MGDLabel from '../../MGDComponents/MGDLabel'; -import MGDSidebar from '../../MGDComponents/MGDSidebar'; +import MGDLabel from '@/smart/MGDComponents/MGDLabel'; +import MGDSidebar from '@/smart/MGDComponents/MGDSidebar'; import { ChecklistCallback, ChecklistPackage, ChecklistResult, ChecklistSetting, } from '../../model/checklist'; -import { EditorModel } from '../../model/editormodel'; -import { ViewFunctionInterface } from '../../model/ViewFunctionModel'; -import { updateResult } from '../../utils/checklist/ChecklistCalculator'; +import { EditorModel } from '@/smart/model/editormodel'; +import { ViewFunctionInterface } from '@/smart/model/ViewFunctionModel'; +import { updateResult } from '@/smart/utils/checklist/ChecklistCalculator'; import { calEdgeAnimated, calEdgeColor, @@ -21,9 +21,9 @@ import { calculateTaskList, initResult, } from '../../utils/checklist/CheckllistInitializer'; -import { MODAILITYOPTIONS, ModalityType } from '../../utils/constants'; -import CircleGraph from '../dashboard/CircleGraph'; -import { CustomCLAttribute, CustomCLProvision } from './CustomFields'; +import { MODAILITYOPTIONS, ModalityType } from '@/smart/utils/constants'; +import CircleGraph from '@/smart/ui/dashboard/CircleGraph'; +import { CustomCLAttribute, CustomCLProvision } from '@/smart/ui/checklist/CustomFields'; const ModalityText: Record = { '' : 'Not specified (empty)', diff --git a/packages/legacy/src/smart/ui/checklist/CustomFields.tsx b/packages/legacy/src/smart/ui/checklist/CustomFields.tsx index 38ab2046..d2de065e 100644 --- a/packages/legacy/src/smart/ui/checklist/CustomFields.tsx +++ b/packages/legacy/src/smart/ui/checklist/CustomFields.tsx @@ -1,16 +1,16 @@ import { Checkbox } from '@blueprintjs/core'; import React from 'react'; -import { mgdLabel } from '../../../css/form'; -import { ChecklistPackage, getCheckListId } from '../../model/checklist'; +import { mgdLabel } from '@/css/form'; +import { ChecklistPackage, getCheckListId } from '@/smart/model/checklist'; import { MMELDataAttribute } from '@paneron/libmmel/interface/datainterface'; import { MMELProvision, MMELReference, } from '@paneron/libmmel/interface/supportinterface'; -import { DescribeProvision } from '../common/description/ComponentDescription'; -import { DescribeAttribute } from '../common/description/data'; -import ChecklistAttribute from './AttributeField'; -import ChecklistProvision from './ProvisionField'; +import { DescribeProvision } from '@/smart/ui/common/description/ComponentDescription'; +import { DescribeAttribute } from '@/smart/ui/common/description/data'; +import ChecklistAttribute from '@/smart/ui/checklist/AttributeField'; +import ChecklistProvision from '@/smart/ui/checklist/ProvisionField'; export const CustomCLAttribute: React.FC<{ att: MMELDataAttribute; diff --git a/packages/legacy/src/smart/ui/checklist/ProgressSetter.tsx b/packages/legacy/src/smart/ui/checklist/ProgressSetter.tsx index ecd0e88a..72c0a074 100644 --- a/packages/legacy/src/smart/ui/checklist/ProgressSetter.tsx +++ b/packages/legacy/src/smart/ui/checklist/ProgressSetter.tsx @@ -1,7 +1,7 @@ import { Button, ControlGroup, NumericInput } from '@blueprintjs/core'; import React from 'react'; import { useState } from 'react'; -import MGDDisplayPane from '../../MGDComponents/MGDDisplayPane'; +import MGDDisplayPane from '@/smart/MGDComponents/MGDDisplayPane'; const ProgressSetter: React.FC<{ initial: number; diff --git a/packages/legacy/src/smart/ui/checklist/ProvisionField.tsx b/packages/legacy/src/smart/ui/checklist/ProvisionField.tsx index 440e651e..83c9250e 100644 --- a/packages/legacy/src/smart/ui/checklist/ProvisionField.tsx +++ b/packages/legacy/src/smart/ui/checklist/ProvisionField.tsx @@ -5,10 +5,10 @@ import { MMELProvision, MMELReference, } from '@paneron/libmmel/interface/supportinterface'; -import { ReferenceList } from '../common/description/ComponentList'; -import { NonEmptyFieldDescription } from '../common/description/fields'; -import { CLDescriptionItem } from './CustomFields'; -import ProgressSetter from './ProgressSetter'; +import { ReferenceList } from '@/smart/ui/common/description/ComponentList'; +import { NonEmptyFieldDescription } from '@/smart/ui/common/description/fields'; +import { CLDescriptionItem } from '@/smart/ui/checklist/CustomFields'; +import ProgressSetter from '@/smart/ui/checklist/ProgressSetter'; const ChecklistProvision: React.FC<{ provision: MMELProvision; diff --git a/packages/legacy/src/smart/ui/comment/AskForComment.tsx b/packages/legacy/src/smart/ui/comment/AskForComment.tsx index 038e9ac1..32c78e9b 100644 --- a/packages/legacy/src/smart/ui/comment/AskForComment.tsx +++ b/packages/legacy/src/smart/ui/comment/AskForComment.tsx @@ -1,7 +1,7 @@ import { Button, ButtonGroup } from '@blueprintjs/core'; import React, { useState } from 'react'; -import { popoverPanelContainer } from '../../../css/layout'; -import { NormalTextField } from '../common/fields'; +import { popoverPanelContainer } from '@/css/layout'; +import { NormalTextField } from '@/smart/ui/common/fields'; const AskForComment: React.FC<{ onSubmit: (msg: string) => void; diff --git a/packages/legacy/src/smart/ui/comment/CommentContainer.tsx b/packages/legacy/src/smart/ui/comment/CommentContainer.tsx index 0ee0ce43..abe67ce8 100644 --- a/packages/legacy/src/smart/ui/comment/CommentContainer.tsx +++ b/packages/legacy/src/smart/ui/comment/CommentContainer.tsx @@ -1,8 +1,8 @@ import React from 'react'; -import { popoverPanelContainer } from '../../../css/layout'; -import { CommentInstance } from '../../utils/Comments'; -import CommentEntry from './CommentEntry'; -import CommentField from './CommentField'; +import { popoverPanelContainer } from '@/css/layout'; +import { CommentInstance } from '@/smart/utils/Comments'; +import CommentEntry from '@/smart/ui/comment/CommentEntry'; +import CommentField from '@/smart/ui/comment/CommentField'; const CommentContainer: React.FC<{ comments: CommentInstance[]; diff --git a/packages/legacy/src/smart/ui/comment/CommentEntry.tsx b/packages/legacy/src/smart/ui/comment/CommentEntry.tsx index 6d88b8c5..0f99c70a 100644 --- a/packages/legacy/src/smart/ui/comment/CommentEntry.tsx +++ b/packages/legacy/src/smart/ui/comment/CommentEntry.tsx @@ -1,7 +1,7 @@ import { Button, ButtonGroup, Switch } from '@blueprintjs/core'; import React from 'react'; -import { CommentInstance } from '../../utils/Comments'; -import CommentField from './CommentField'; +import { CommentInstance } from '@/smart/utils/Comments'; +import CommentField from '@/smart/ui/comment/CommentField'; const CommentEntry: React.FC<{ comment: CommentInstance; diff --git a/packages/legacy/src/smart/ui/comment/CommentField.tsx b/packages/legacy/src/smart/ui/comment/CommentField.tsx index 9a1f1d25..1163c3ad 100644 --- a/packages/legacy/src/smart/ui/comment/CommentField.tsx +++ b/packages/legacy/src/smart/ui/comment/CommentField.tsx @@ -2,7 +2,7 @@ import { Button } from '@blueprintjs/core'; import { Popover2 } from '@blueprintjs/popover2'; import React from 'react'; import { useState } from 'react'; -import AskForComment from './AskForComment'; +import AskForComment from '@/smart/ui/comment/AskForComment'; const CommentField: React.FC<{ title: string; diff --git a/packages/legacy/src/smart/ui/comment/NodeComment.tsx b/packages/legacy/src/smart/ui/comment/NodeComment.tsx index 5f54ec0d..29350741 100644 --- a/packages/legacy/src/smart/ui/comment/NodeComment.tsx +++ b/packages/legacy/src/smart/ui/comment/NodeComment.tsx @@ -2,8 +2,8 @@ import { Button } from '@blueprintjs/core'; import { Popover2, Tooltip2 } from '@blueprintjs/popover2'; import React from 'react'; import { MMELComment } from '@paneron/libmmel/interface/supportinterface'; -import { CommentInstance, materialComments } from '../../utils/Comments'; -import CommentContainer from './CommentContainer'; +import { CommentInstance, materialComments } from '@/smart/utils/Comments'; +import CommentContainer from '@/smart/ui/comment/CommentContainer'; const NodeComment: React.FC<{ cids: Set; diff --git a/packages/legacy/src/smart/ui/common/description/ComponentDescription.tsx b/packages/legacy/src/smart/ui/common/description/ComponentDescription.tsx index 57265842..c7d3324f 100644 --- a/packages/legacy/src/smart/ui/common/description/ComponentDescription.tsx +++ b/packages/legacy/src/smart/ui/common/description/ComponentDescription.tsx @@ -9,10 +9,10 @@ import { MMELProvision, MMELReference, } from '@paneron/libmmel/interface/supportinterface'; -import { EdgeList, ReferenceList } from './ComponentList'; -import { DescriptionItem, NonEmptyFieldDescription } from './fields'; +import { EdgeList, ReferenceList } from '@/smart/ui/common/description/ComponentList'; +import { DescriptionItem, NonEmptyFieldDescription } from '@/smart/ui/common/description/fields'; import { MMELEdge } from '@paneron/libmmel/interface/flowcontrolinterface'; -import MGDLabel from '../../../MGDComponents/MGDLabel'; +import MGDLabel from '@/smart/MGDComponents/MGDLabel'; export const DescribeStart: React.FC = function () { return Start event ; diff --git a/packages/legacy/src/smart/ui/common/description/ComponentList.tsx b/packages/legacy/src/smart/ui/common/description/ComponentList.tsx index 0edcc28d..f84ede2f 100644 --- a/packages/legacy/src/smart/ui/common/description/ComponentList.tsx +++ b/packages/legacy/src/smart/ui/common/description/ComponentList.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import { EditorRegistry } from '../../../model/editormodel'; +import { EditorRegistry } from '@/smart/model/editormodel'; import { MMELDataAttribute } from '@paneron/libmmel/interface/datainterface'; import { MMELEdge } from '@paneron/libmmel/interface/flowcontrolinterface'; import { @@ -7,13 +7,13 @@ import { MMELProvision, MMELReference, } from '@paneron/libmmel/interface/supportinterface'; -import { toRefSummary } from '../../../utils/ModelFunctions'; +import { toRefSummary } from '@/smart/utils/ModelFunctions'; import { DescribeEdge, DescribeNote, DescribeProvision, } from './ComponentDescription'; -import { DescribeAttribute } from './data'; +import { DescribeAttribute } from '@/smart/ui/common/description/data'; export const ApprovalRecordList: React.FC<{ regs: EditorRegistry[]; diff --git a/packages/legacy/src/smart/ui/common/description/FigureViewer.tsx b/packages/legacy/src/smart/ui/common/description/FigureViewer.tsx index 53ca5e96..2615f890 100644 --- a/packages/legacy/src/smart/ui/common/description/FigureViewer.tsx +++ b/packages/legacy/src/smart/ui/common/description/FigureViewer.tsx @@ -1,7 +1,7 @@ import React from 'react'; import { MMELFigure } from '@paneron/libmmel/interface/supportinterface'; -import { DescriptionItem } from './fields'; -import MultimediaView from './Multimedia'; +import { DescriptionItem } from '@/smart/ui/common/description/fields'; +import MultimediaView from '@/smart/ui/common/description/Multimedia'; const FigureViewer: React.FC<{ fig: MMELFigure; diff --git a/packages/legacy/src/smart/ui/common/description/LegendPane.tsx b/packages/legacy/src/smart/ui/common/description/LegendPane.tsx index f6eab16e..cb1e9131 100644 --- a/packages/legacy/src/smart/ui/common/description/LegendPane.tsx +++ b/packages/legacy/src/smart/ui/common/description/LegendPane.tsx @@ -1,7 +1,7 @@ import React from 'react'; -import MGDLegend from '../../../MGDComponents/MGDLegend'; -import MGDLegendEntry from '../../../MGDComponents/MGDLegendEntry'; -import { LegendInterface } from '../../../model/States'; +import MGDLegend from '@/smart/MGDComponents/MGDLegend'; +import MGDLegendEntry from '@/smart/MGDComponents/MGDLegendEntry'; +import { LegendInterface } from '@/smart/model/States'; const LegendPane: React.FC<{ list: Record; diff --git a/packages/legacy/src/smart/ui/common/description/Multimedia.tsx b/packages/legacy/src/smart/ui/common/description/Multimedia.tsx index 407f6e3c..237cb026 100644 --- a/packages/legacy/src/smart/ui/common/description/Multimedia.tsx +++ b/packages/legacy/src/smart/ui/common/description/Multimedia.tsx @@ -1,7 +1,7 @@ import { Text } from '@blueprintjs/core'; import React, { CSSProperties } from 'react'; import { BINARY_TYPE } from '@paneron/libmmel/interface/supportinterface'; -// import ThreeD from '../../edit/figure/ThreeD'; +smart/ui/edit/figure/ThreeD'; const MultimediaView: React.FC<{ type: BINARY_TYPE; diff --git a/packages/legacy/src/smart/ui/common/description/RepoBreadcrumb.tsx b/packages/legacy/src/smart/ui/common/description/RepoBreadcrumb.tsx index 807f8035..07ceec15 100644 --- a/packages/legacy/src/smart/ui/common/description/RepoBreadcrumb.tsx +++ b/packages/legacy/src/smart/ui/common/description/RepoBreadcrumb.tsx @@ -1,6 +1,6 @@ import { BreadcrumbProps, Breadcrumbs } from '@blueprintjs/core'; import React from 'react'; -import { RepoHistory } from '../../../model/history'; +import { RepoHistory } from '@/smart/model/history'; const RepoBreadcrumb: React.FC<{ repoHis: RepoHistory; diff --git a/packages/legacy/src/smart/ui/common/description/TableViewer.tsx b/packages/legacy/src/smart/ui/common/description/TableViewer.tsx index d612c092..71df0fac 100644 --- a/packages/legacy/src/smart/ui/common/description/TableViewer.tsx +++ b/packages/legacy/src/smart/ui/common/description/TableViewer.tsx @@ -1,7 +1,7 @@ import { HTMLTable, Text } from '@blueprintjs/core'; import React from 'react'; import { MMELTable } from '@paneron/libmmel/interface/supportinterface'; -import { DescriptionItem } from './fields'; +import { DescriptionItem } from '@/smart/ui/common/description/fields'; const TableViewer: React.FC<{ table: MMELTable; diff --git a/packages/legacy/src/smart/ui/common/description/approval.tsx b/packages/legacy/src/smart/ui/common/description/approval.tsx index 9f0736ee..c3e5570c 100644 --- a/packages/legacy/src/smart/ui/common/description/approval.tsx +++ b/packages/legacy/src/smart/ui/common/description/approval.tsx @@ -1,10 +1,10 @@ import React from 'react'; -import { EditorApproval, EditorRegistry } from '../../../model/editormodel'; +import { EditorApproval, EditorRegistry } from '@/smart/model/editormodel'; import { MMELReference, MMELRole, } from '@paneron/libmmel/interface/supportinterface'; -import { ApprovalRecordList, ReferenceList } from './ComponentList'; +import { ApprovalRecordList, ReferenceList } from '@/smart/ui/common/description/ComponentList'; import { ActorDescription, DescriptionItem, diff --git a/packages/legacy/src/smart/ui/common/description/data.tsx b/packages/legacy/src/smart/ui/common/description/data.tsx index fb227485..95c3db6c 100644 --- a/packages/legacy/src/smart/ui/common/description/data.tsx +++ b/packages/legacy/src/smart/ui/common/description/data.tsx @@ -1,9 +1,9 @@ import React from 'react'; -import { EditorDataClass, EditorRegistry } from '../../../model/editormodel'; +import { EditorDataClass, EditorRegistry } from '@/smart/model/editormodel'; import { MMELDataAttribute } from '@paneron/libmmel/interface/datainterface'; import { MMELReference } from '@paneron/libmmel/interface/supportinterface'; -import { AttributeList, ReferenceList } from './ComponentList'; -import { DescriptionItem, NonEmptyFieldDescription } from './fields'; +import { AttributeList, ReferenceList } from '@/smart/ui/common/description/ComponentList'; +import { DescriptionItem, NonEmptyFieldDescription } from '@/smart/ui/common/description/fields'; export const DescribeRegistry: React.FC<{ reg: EditorRegistry; diff --git a/packages/legacy/src/smart/ui/common/description/fields.tsx b/packages/legacy/src/smart/ui/common/description/fields.tsx index 2e32a47b..68253ea6 100644 --- a/packages/legacy/src/smart/ui/common/description/fields.tsx +++ b/packages/legacy/src/smart/ui/common/description/fields.tsx @@ -1,7 +1,7 @@ import React from 'react'; -import { mgdLabel } from '../../../../css/form'; -import { HistoryAction } from '../../../model/editor/history'; -import { HistoryItem } from '../../../model/history'; +import { mgdLabel } from '@/css/form'; +import { HistoryAction } from '@/smart/model/editor/history'; +import { HistoryItem } from '@/smart/model/history'; import { MMELRole } from '@paneron/libmmel/interface/supportinterface'; interface Breadcrumb { diff --git a/packages/legacy/src/smart/ui/common/description/process.tsx b/packages/legacy/src/smart/ui/common/description/process.tsx index 0b4ba917..d1789085 100644 --- a/packages/legacy/src/smart/ui/common/description/process.tsx +++ b/packages/legacy/src/smart/ui/common/description/process.tsx @@ -1,13 +1,13 @@ import React from 'react'; -import { EditorProcess } from '../../../model/editormodel'; +import { EditorProcess } from '@/smart/model/editormodel'; import { MMELNote, MMELProvision, MMELReference, MMELRole, } from '@paneron/libmmel/interface/supportinterface'; -import { ActorDescription, DescriptionItem } from './fields'; -import { MeasurementList, NotesList, ProvisionList } from './ComponentList'; +import { ActorDescription, DescriptionItem } from '@/smart/ui/common/description/fields'; +import { MeasurementList, NotesList, ProvisionList } from '@/smart/ui/common/description/ComponentList'; export const DescribeProcess: React.FC<{ process: EditorProcess; diff --git a/packages/legacy/src/smart/ui/common/fields.tsx b/packages/legacy/src/smart/ui/common/fields.tsx index 1fbd0bb1..64bd6584 100644 --- a/packages/legacy/src/smart/ui/common/fields.tsx +++ b/packages/legacy/src/smart/ui/common/fields.tsx @@ -9,8 +9,8 @@ import { NumericInput, } from '@blueprintjs/core'; import React, { RefObject, useState } from 'react'; -import { EditorModel } from '../../model/editormodel'; -import MGDTextarea from '../../MGDComponents/MGDTextarea'; +import { EditorModel } from '@/smart/model/editormodel'; +import MGDTextarea from '@/smart/MGDComponents/MGDTextarea'; import { mgd_input, mgd_label, diff --git a/packages/legacy/src/smart/ui/common/listmanagement/itemupdate.tsx b/packages/legacy/src/smart/ui/common/listmanagement/itemupdate.tsx index 3f888940..167956af 100644 --- a/packages/legacy/src/smart/ui/common/listmanagement/itemupdate.tsx +++ b/packages/legacy/src/smart/ui/common/listmanagement/itemupdate.tsx @@ -1,9 +1,9 @@ import { Button, FormGroup } from '@blueprintjs/core'; import React from 'react'; -import MGDButtonGroup from '../../../MGDComponents/MGDButtonGroup'; -import MGDDisplayPane from '../../../MGDComponents/MGDDisplayPane'; -import { IUpdateInterface } from '../fields'; -import { IObject } from '../../common/listmanagement/listPopoverItem'; +import MGDButtonGroup from '@/smart/MGDComponents/MGDButtonGroup'; +import MGDDisplayPane from '@/smart/MGDComponents/MGDDisplayPane'; +import { IUpdateInterface } from '@/smart/ui/common/fields'; +import { IObject } from '@/smart/ui/common/listmanagement/listPopoverItem'; const ItemUpdatePane = (props: IUpdateInterface) => { const { diff --git a/packages/legacy/src/smart/ui/common/listmanagement/listPopoverItem.tsx b/packages/legacy/src/smart/ui/common/listmanagement/listPopoverItem.tsx index e3c416db..465c8fe5 100644 --- a/packages/legacy/src/smart/ui/common/listmanagement/listPopoverItem.tsx +++ b/packages/legacy/src/smart/ui/common/listmanagement/listPopoverItem.tsx @@ -1,7 +1,7 @@ import { Dialog } from '@blueprintjs/core'; import React, { useState } from 'react'; -import { dialogLayout } from '../../../../css/layout'; -import { EditorModel } from '../../../model/editormodel'; +import { dialogLayout } from '@/css/layout'; +import { EditorModel } from '@/smart/model/editormodel'; import { MMELObject } from '@paneron/libmmel/interface/baseinterface'; import { MMELTable } from '@paneron/libmmel/interface/supportinterface'; import { @@ -11,9 +11,9 @@ import { findUniqueID, itemSorterByText, } from '../../../utils/ModelFunctions'; -import { IListItem, IUpdateInterface, IViewListInterface } from '../fields'; -import ItemUpdatePane from './itemupdate'; -import ListViewPane from './listview'; +import { IListItem, IUpdateInterface, IViewListInterface } from '@/smart/ui/common/fields'; +import ItemUpdatePane from '@/smart/ui/common/listmanagement/itemupdate'; +import ListViewPane from '@/smart/ui/common/listmanagement/listview'; export interface IObject { id: string; diff --git a/packages/legacy/src/smart/ui/common/listmanagement/listmanagement.tsx b/packages/legacy/src/smart/ui/common/listmanagement/listmanagement.tsx index d2a8bc61..ec37ac95 100644 --- a/packages/legacy/src/smart/ui/common/listmanagement/listmanagement.tsx +++ b/packages/legacy/src/smart/ui/common/listmanagement/listmanagement.tsx @@ -4,9 +4,9 @@ import { IUpdateInterface, IViewListInterface, } from '../fields'; -import ItemUpdatePane from './itemupdate'; -import ListViewPane from './listview'; -import { IObject } from '../../common/listmanagement/listPopoverItem'; +import ItemUpdatePane from '@/smart/ui/common/listmanagement/itemupdate'; +import ListViewPane from '@/smart/ui/common/listmanagement/listview'; +import { IObject } from '@/smart/ui/common/listmanagement/listPopoverItem'; export enum ListManagePageType { VIEW = 'view', diff --git a/packages/legacy/src/smart/ui/common/listmanagement/listview.tsx b/packages/legacy/src/smart/ui/common/listmanagement/listview.tsx index fbcb3702..60618b26 100644 --- a/packages/legacy/src/smart/ui/common/listmanagement/listview.tsx +++ b/packages/legacy/src/smart/ui/common/listmanagement/listview.tsx @@ -11,9 +11,9 @@ import { mgd_select, mgd_select__restrained, } from '../../../../css/form'; -import { u__display__block, u__display__none } from '../../../../css/utility'; -import MGDButtonGroup from '../../../MGDComponents/MGDButtonGroup'; -import { IViewListInterface } from '../fields'; +import { u__display__block, u__display__none } from '@/css/utility'; +import MGDButtonGroup from '@/smart/MGDComponents/MGDButtonGroup'; +import { IViewListInterface } from '@/smart/ui/common/fields'; const ListViewPane: React.FC = ({ filterName, diff --git a/packages/legacy/src/smart/ui/control/ChangeLogViewer.tsx b/packages/legacy/src/smart/ui/control/ChangeLogViewer.tsx index 7907e474..99ec25db 100644 --- a/packages/legacy/src/smart/ui/control/ChangeLogViewer.tsx +++ b/packages/legacy/src/smart/ui/control/ChangeLogViewer.tsx @@ -5,14 +5,14 @@ import { jsx } from '@emotion/react'; import { Button, Dialog, TextArea } from '@blueprintjs/core'; import React from 'react'; -import { dialog_layout, dialog_layout__full } from '../../../css/layout'; -import { ChangeLog, ChangeLogEvent } from '../../model/changelog'; -import { ModelAction } from '../../model/editor/model'; -import { CommentAction } from '../../model/editor/components/comment'; +import { dialog_layout, dialog_layout__full } from '@/css/layout'; +import { ChangeLog, ChangeLogEvent } from '@/smart/model/changelog'; +import { ModelAction } from '@/smart/model/editor/model'; +import { CommentAction } from '@/smart/model/editor/components/comment'; import { Popover2 } from '@blueprintjs/popover2'; -import { ElmAction } from '../../model/editor/components/elements'; -import { HyEditAction } from '../../model/editor/hybird/distributor'; -import { PageAction } from '../../model/editor/components/pages'; +import { ElmAction } from '@/smart/model/editor/components/elements'; +import { HyEditAction } from '@/smart/model/editor/hybird/distributor'; +import { PageAction } from '@/smart/model/editor/components/pages'; const ChangeLogDialog: React.FC<{ log: ChangeLog; diff --git a/packages/legacy/src/smart/ui/control/newComponentPane.tsx b/packages/legacy/src/smart/ui/control/newComponentPane.tsx index 4033b720..f01576df 100644 --- a/packages/legacy/src/smart/ui/control/newComponentPane.tsx +++ b/packages/legacy/src/smart/ui/control/newComponentPane.tsx @@ -1,8 +1,8 @@ import React from 'react'; -import { mgdLabel } from '../../../css/form'; -import MGDComponentBar from '../../MGDComponents/MGDComponentBar'; -import MGDContainer from '../../MGDComponents/MGDContainer'; -import MGDProcessBox from '../../MGDComponents/MGDProcessBox'; +import { mgdLabel } from '@/css/form'; +import MGDComponentBar from '@/smart/MGDComponents/MGDComponentBar'; +import MGDContainer from '@/smart/MGDComponents/MGDContainer'; +import MGDProcessBox from '@/smart/MGDComponents/MGDProcessBox'; import { DataType } from '@paneron/libmmel/interface/baseinterface'; import { DragAndDropNewFormatType, diff --git a/packages/legacy/src/smart/ui/control/settings.tsx b/packages/legacy/src/smart/ui/control/settings.tsx index af7bef92..8e518d00 100644 --- a/packages/legacy/src/smart/ui/control/settings.tsx +++ b/packages/legacy/src/smart/ui/control/settings.tsx @@ -8,27 +8,27 @@ import { jsx } from '@emotion/react'; import { Tab, Tabs } from '@blueprintjs/core'; import React, { useState } from 'react'; -import { mgd_label } from '../../../css/form'; +import { mgd_label } from '@/css/form'; import { mgd_tabs__item, mgd_tabs__item__selected, mgd_tabs__item__unselected, } from '../../../css/MGDTabs'; -import MGDDisplayPane from '../../MGDComponents/MGDDisplayPane'; -import { EditorModel } from '../../model/editormodel'; -import DataClassEditPage from '../edit/dataclassedit'; -import EnumEditPage from '../edit/enumedit'; -import FigureEditPage from '../edit/figure/FigureEdit'; -import MeasurementEditPage from '../edit/measurementedit'; -import MetaEditPage from '../edit/metaedit'; -import ReferenceEditPage from '../edit/refedit'; -import RegistryEditPage from '../edit/registryedit'; -import RoleEditPage from '../edit/roleedit'; -import SectionEditPage from '../edit/SectionEditPage'; -import TableEditPage from '../edit/table/TableEdit'; -import TermsEditPage from '../edit/TermEdit'; -import ViewProfileEditPage from '../edit/ViewProfileEdit'; -import { EditorAction } from '../../model/editor/state'; +import MGDDisplayPane from '@/smart/MGDComponents/MGDDisplayPane'; +import { EditorModel } from '@/smart/model/editormodel'; +import DataClassEditPage from '@/smart/ui/edit/dataclassedit'; +import EnumEditPage from '@/smart/ui/edit/enumedit'; +import FigureEditPage from '@/smart/ui/edit/figure/FigureEdit'; +import MeasurementEditPage from '@/smart/ui/edit/measurementedit'; +import MetaEditPage from '@/smart/ui/edit/metaedit'; +import ReferenceEditPage from '@/smart/ui/edit/refedit'; +import RegistryEditPage from '@/smart/ui/edit/registryedit'; +import RoleEditPage from '@/smart/ui/edit/roleedit'; +import SectionEditPage from '@/smart/ui/edit/SectionEditPage'; +import TableEditPage from '@/smart/ui/edit/table/TableEdit'; +import TermsEditPage from '@/smart/ui/edit/TermEdit'; +import ViewProfileEditPage from '@/smart/ui/edit/ViewProfileEdit'; +import { EditorAction } from '@/smart/model/editor/state'; export enum SETTINGPAGE { METAPAGE = 'meta', diff --git a/packages/legacy/src/smart/ui/dialog/EditorDialogs.tsx b/packages/legacy/src/smart/ui/dialog/EditorDialogs.tsx index a1c6e772..80b034ae 100644 --- a/packages/legacy/src/smart/ui/dialog/EditorDialogs.tsx +++ b/packages/legacy/src/smart/ui/dialog/EditorDialogs.tsx @@ -13,13 +13,13 @@ import { EditAction, } from '../../utils/constants'; import { DataType } from '@paneron/libmmel/interface/baseinterface'; -import EditProcessPage from '../edit/processedit'; -import EditApprovalPage from '../edit/approvaledit'; -import EditEGatePage from '../edit/egateedit'; -import EditTimerPage from '../edit/timeredit'; -import EditSignalEventPage from '../edit/signaleventedit'; -import { EditorAction } from '../../model/editor/state'; -import { ConfirmDialog } from './confirmdialog'; +import EditProcessPage from '@/smart/ui/edit/processedit'; +import EditApprovalPage from '@/smart/ui/edit/approvaledit'; +import EditEGatePage from '@/smart/ui/edit/egateedit'; +import EditTimerPage from '@/smart/ui/edit/timeredit'; +import EditSignalEventPage from '@/smart/ui/edit/signaleventedit'; +import { EditorAction } from '@/smart/model/editor/state'; +import { ConfirmDialog } from '@/smart/ui/dialog/confirmdialog'; export type DialogSetterInterface = ( nodeType: EditableNodeTypes | DeletableNodeTypes, diff --git a/packages/legacy/src/smart/ui/dialog/WorkspaceDiag.tsx b/packages/legacy/src/smart/ui/dialog/WorkspaceDiag.tsx index a84e54dd..3c50b26a 100644 --- a/packages/legacy/src/smart/ui/dialog/WorkspaceDiag.tsx +++ b/packages/legacy/src/smart/ui/dialog/WorkspaceDiag.tsx @@ -1,11 +1,11 @@ import { Dialog } from '@blueprintjs/core'; import React from 'react'; -import { dialogLayout } from '../../../css/layout'; -import MGDDisplayPane from '../../MGDComponents/MGDDisplayPane'; -import { EditorModel } from '../../model/editormodel'; -import { SMARTDocumentStore, SMARTModelStore } from '../../model/workspace'; -import RegistryDocManagement from '../workspace/RegistryDocManagement'; -import WorkspaceRegistryList from '../workspace/RegistryList'; +import { dialogLayout } from '@/css/layout'; +import MGDDisplayPane from '@/smart/MGDComponents/MGDDisplayPane'; +import { EditorModel } from '@/smart/model/editormodel'; +import { SMARTDocumentStore, SMARTModelStore } from '@/smart/model/workspace'; +import RegistryDocManagement from '@/smart/ui/workspace/RegistryDocManagement'; +import WorkspaceRegistryList from '@/smart/ui/workspace/RegistryList'; export interface WorkspaceDiagPackage { regid: string; diff --git a/packages/legacy/src/smart/ui/dialog/confirmdialog.tsx b/packages/legacy/src/smart/ui/dialog/confirmdialog.tsx index df651990..cdc4156b 100644 --- a/packages/legacy/src/smart/ui/dialog/confirmdialog.tsx +++ b/packages/legacy/src/smart/ui/dialog/confirmdialog.tsx @@ -1,6 +1,6 @@ import { Button } from '@blueprintjs/core'; import React from 'react'; -import MGDButtonGroup from '../../MGDComponents/MGDButtonGroup'; +import MGDButtonGroup from '@/smart/MGDComponents/MGDButtonGroup'; /** * A confirmation dialog. diff --git a/packages/legacy/src/smart/ui/doc/DocImport.tsx b/packages/legacy/src/smart/ui/doc/DocImport.tsx index 0918b6eb..ba500faf 100644 --- a/packages/legacy/src/smart/ui/doc/DocImport.tsx +++ b/packages/legacy/src/smart/ui/doc/DocImport.tsx @@ -1,9 +1,9 @@ import { Button, FormGroup } from '@blueprintjs/core'; import React, { useState } from 'react'; -import MGDDisplayPane from '../../MGDComponents/MGDDisplayPane'; -import { MMELDocument } from '../../model/document'; -import { plainToDoc } from '../../utils/DocumentFunctions'; -import { NormalTextField } from '../common/fields'; +import MGDDisplayPane from '@/smart/MGDComponents/MGDDisplayPane'; +import { MMELDocument } from '@/smart/model/document'; +import { plainToDoc } from '@/smart/utils/DocumentFunctions'; +import { NormalTextField } from '@/smart/ui/common/fields'; const DocImport: React.FC<{ setDoc: (x: MMELDocument) => void; diff --git a/packages/legacy/src/smart/ui/doc/DocSettings.tsx b/packages/legacy/src/smart/ui/doc/DocSettings.tsx index aa66e823..d200fbb3 100644 --- a/packages/legacy/src/smart/ui/doc/DocSettings.tsx +++ b/packages/legacy/src/smart/ui/doc/DocSettings.tsx @@ -1,8 +1,8 @@ import { Button, FormGroup } from '@blueprintjs/core'; import React from 'react'; -import MGDDisplayPane from '../../MGDComponents/MGDDisplayPane'; -import { MMELDocument } from '../../model/document'; -import { NormalTextField } from '../common/fields'; +import MGDDisplayPane from '@/smart/MGDComponents/MGDDisplayPane'; +import { MMELDocument } from '@/smart/model/document'; +import { NormalTextField } from '@/smart/ui/common/fields'; const DocSettings: React.FC<{ doc: MMELDocument; diff --git a/packages/legacy/src/smart/ui/doc/ParagraphEdit.tsx b/packages/legacy/src/smart/ui/doc/ParagraphEdit.tsx index 497d869b..a14929e6 100644 --- a/packages/legacy/src/smart/ui/doc/ParagraphEdit.tsx +++ b/packages/legacy/src/smart/ui/doc/ParagraphEdit.tsx @@ -1,6 +1,6 @@ import React from 'react'; -import { DocParagraph, DocStatement } from '../../model/document'; -import StatementEdit from './StatementEdit'; +import { DocParagraph, DocStatement } from '@/smart/model/document'; +import StatementEdit from '@/smart/ui/doc/StatementEdit'; const ParagraphEdit: React.FC<{ para: DocParagraph; diff --git a/packages/legacy/src/smart/ui/doc/SMARTDocumentEdit.tsx b/packages/legacy/src/smart/ui/doc/SMARTDocumentEdit.tsx index fd55a487..b73843d7 100644 --- a/packages/legacy/src/smart/ui/doc/SMARTDocumentEdit.tsx +++ b/packages/legacy/src/smart/ui/doc/SMARTDocumentEdit.tsx @@ -1,6 +1,6 @@ import React from 'react'; -import { MMELDocument } from '../../model/document'; -import SectionEdit from './SectionEdit'; +import { MMELDocument } from '@/smart/model/document'; +import SectionEdit from '@/smart/ui/doc/SectionEdit'; const SMARTDocumentEdit: React.FC<{ doc: MMELDocument; diff --git a/packages/legacy/src/smart/ui/doc/SectionEdit.tsx b/packages/legacy/src/smart/ui/doc/SectionEdit.tsx index df968edb..6fbf2090 100644 --- a/packages/legacy/src/smart/ui/doc/SectionEdit.tsx +++ b/packages/legacy/src/smart/ui/doc/SectionEdit.tsx @@ -1,6 +1,6 @@ import React from 'react'; -import { DocSection, DocStatement } from '../../model/document'; -import ParagraphEdit from './ParagraphEdit'; +import { DocSection, DocStatement } from '@/smart/model/document'; +import ParagraphEdit from '@/smart/ui/doc/ParagraphEdit'; const SectionEdit: React.FC<{ sec: DocSection; diff --git a/packages/legacy/src/smart/ui/doc/StatementEdit.tsx b/packages/legacy/src/smart/ui/doc/StatementEdit.tsx index d3e94250..fe4e22f6 100644 --- a/packages/legacy/src/smart/ui/doc/StatementEdit.tsx +++ b/packages/legacy/src/smart/ui/doc/StatementEdit.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import { DocStatement } from '../../model/document'; +import { DocStatement } from '@/smart/model/document'; const StatementEdit: React.FC<{ statement: DocStatement; diff --git a/packages/legacy/src/smart/ui/docviewer.tsx b/packages/legacy/src/smart/ui/docviewer.tsx index 6b819100..2ce2c550 100644 --- a/packages/legacy/src/smart/ui/docviewer.tsx +++ b/packages/legacy/src/smart/ui/docviewer.tsx @@ -1,14 +1,14 @@ -import { MMELRepo } from '../model/repo'; +import { MMELRepo } from '@/smart/model/repo'; import Workspace from '@riboseinc/paneron-extension-kit/widgets/Workspace'; -import SMARTDocumentView from './mapper/document/DocumentView'; +import SMARTDocumentView from '@/smart/ui/mapper/document/DocumentView'; import { useContext } from 'react'; import { DatasetContext } from '@riboseinc/paneron-extension-kit/context'; -import { getPathByNS, RepoFileType } from '../utils/repo/io'; -import { MMELDocument } from '../model/document'; -import { LoadingScreen } from './common/Loading'; +import { getPathByNS, RepoFileType } from '@/smart/utils/repo/io'; +import { MMELDocument } from '@/smart/model/document'; +import { LoadingScreen } from '@/smart/ui/common/Loading'; import React from 'react'; -import { DOCVERSION } from '../utils/constants'; -import * as Logger from '../../lib/logger'; +import { DOCVERSION } from '@/smart/utils/constants'; +import * as Logger from '@/lib/logger'; const DocumentViewer: React.FC<{ isVisible: boolean; diff --git a/packages/legacy/src/smart/ui/edit/LinkEdit.tsx b/packages/legacy/src/smart/ui/edit/LinkEdit.tsx index eff03cf3..7888e8df 100644 --- a/packages/legacy/src/smart/ui/edit/LinkEdit.tsx +++ b/packages/legacy/src/smart/ui/edit/LinkEdit.tsx @@ -5,8 +5,8 @@ import { LINK_TYPES, MMELLink, } from '@paneron/libmmel/interface/supportinterface'; -import { NormalComboBox, NormalTextField } from '../common/fields'; -import { IMMELObject } from '../common/listmanagement/listPopoverItem'; +import { NormalComboBox, NormalTextField } from '@/smart/ui/common/fields'; +import { IMMELObject } from '@/smart/ui/common/listmanagement/listPopoverItem'; export function matchLinkFilter(x: IMMELObject, filter: string): boolean { const link = x as MMELLink; diff --git a/packages/legacy/src/smart/ui/edit/NoteEdit.tsx b/packages/legacy/src/smart/ui/edit/NoteEdit.tsx index dd9c4ee0..16e51ea7 100644 --- a/packages/legacy/src/smart/ui/edit/NoteEdit.tsx +++ b/packages/legacy/src/smart/ui/edit/NoteEdit.tsx @@ -1,18 +1,18 @@ import { FormGroup } from '@blueprintjs/core'; import React from 'react'; -import { EditorModel } from '../../model/editormodel'; +import { EditorModel } from '@/smart/model/editormodel'; import { MMELNote, NOTE_TYPE, NOTE_TYPES, } from '@paneron/libmmel/interface/supportinterface'; -import { getModelAllRefs } from '../../utils/ModelFunctions'; +import { getModelAllRefs } from '@/smart/utils/ModelFunctions'; import { MultiReferenceSelector, NormalComboBox, NormalTextField, } from '../common/fields'; -import { IMMELObject } from '../common/listmanagement/listPopoverItem'; +import { IMMELObject } from '@/smart/ui/common/listmanagement/listPopoverItem'; export function matchNoteFilter(x: IMMELObject, filter: string): boolean { const note = x as MMELNote; diff --git a/packages/legacy/src/smart/ui/edit/SectionEditPage.tsx b/packages/legacy/src/smart/ui/edit/SectionEditPage.tsx index e90bc9cf..4b25354f 100644 --- a/packages/legacy/src/smart/ui/edit/SectionEditPage.tsx +++ b/packages/legacy/src/smart/ui/edit/SectionEditPage.tsx @@ -1,13 +1,13 @@ import { FormGroup } from '@blueprintjs/core'; import React from 'react'; -import { EditorModel } from '../../model/editormodel'; +import { EditorModel } from '@/smart/model/editormodel'; import { MMELTextSection } from '@paneron/libmmel/interface/supportinterface'; -import { checkId, defaultItemSorter } from '../../utils/ModelFunctions'; -import { createTextSection } from '../../utils/EditorFactory'; -import { IListItem, IManageHandler, NormalTextField } from '../common/fields'; -import ListManagePage from '../common/listmanagement/listmanagement'; -import { EditorAction } from '../../model/editor/state'; -import { ModelAction } from '../../model/editor/model'; +import { checkId, defaultItemSorter } from '@/smart/utils/ModelFunctions'; +import { createTextSection } from '@/smart/utils/EditorFactory'; +import { IListItem, IManageHandler, NormalTextField } from '@/smart/ui/common/fields'; +import ListManagePage from '@/smart/ui/common/listmanagement/listmanagement'; +import { EditorAction } from '@/smart/model/editor/state'; +import { ModelAction } from '@/smart/model/editor/model'; const SectionEditPage: React.FC<{ model: EditorModel; diff --git a/packages/legacy/src/smart/ui/edit/TermEdit.tsx b/packages/legacy/src/smart/ui/edit/TermEdit.tsx index 410b5040..4dbad168 100644 --- a/packages/legacy/src/smart/ui/edit/TermEdit.tsx +++ b/packages/legacy/src/smart/ui/edit/TermEdit.tsx @@ -1,14 +1,14 @@ import { FormGroup } from '@blueprintjs/core'; // import { LocalizedConceptForm } from '@riboseinc/paneron-extension-glossarist/classes/localizedConcept/LocalizedConceptForm'; import React from 'react'; -import { EditorModel } from '../../model/editormodel'; +import { EditorModel } from '@/smart/model/editormodel'; import { MMELTerm } from '@paneron/libmmel/interface/supportinterface'; -import { checkId, defaultItemSorter } from '../../utils/ModelFunctions'; -import { createTerm } from '../../utils/EditorFactory'; -import { IListItem, IManageHandler, NormalTextField } from '../common/fields'; -import ListManagePage from '../common/listmanagement/listmanagement'; -import StringListQuickEdit from './components/StringListQuickEdit'; -import { ModelAction } from '../../model/editor/model'; +import { checkId, defaultItemSorter } from '@/smart/utils/ModelFunctions'; +import { createTerm } from '@/smart/utils/EditorFactory'; +import { IListItem, IManageHandler, NormalTextField } from '@/smart/ui/common/fields'; +import ListManagePage from '@/smart/ui/common/listmanagement/listmanagement'; +import StringListQuickEdit from '@/smart/ui/edit/components/StringListQuickEdit'; +import { ModelAction } from '@/smart/model/editor/model'; const TermsEditPage: React.FC<{ model: EditorModel; diff --git a/packages/legacy/src/smart/ui/edit/ViewProfileEdit.tsx b/packages/legacy/src/smart/ui/edit/ViewProfileEdit.tsx index b338ef69..e1b6a8ec 100644 --- a/packages/legacy/src/smart/ui/edit/ViewProfileEdit.tsx +++ b/packages/legacy/src/smart/ui/edit/ViewProfileEdit.tsx @@ -7,19 +7,19 @@ import { Switch, } from '@blueprintjs/core'; import React from 'react'; -import { EditorModel } from '../../model/editormodel'; +import { EditorModel } from '@/smart/model/editormodel'; import { MMELView, VarType } from '@paneron/libmmel/interface/supportinterface'; -import { checkId, defaultItemSorter } from '../../utils/ModelFunctions'; -import { createView } from '../../utils/EditorFactory'; +import { checkId, defaultItemSorter } from '@/smart/utils/ModelFunctions'; +import { createView } from '@/smart/utils/EditorFactory'; import { IListItem, IManageHandler, NormalComboBox, NormalTextField, } from '../common/fields'; -import ListManagePage from '../common/listmanagement/listmanagement'; -import { InputableVarType } from '../../model/Measurement'; -import { ModelAction } from '../../model/editor/model'; +import ListManagePage from '@/smart/ui/common/listmanagement/listmanagement'; +import { InputableVarType } from '@/smart/model/Measurement'; +import { ModelAction } from '@/smart/model/editor/model'; const ViewProfileEditPage: React.FC<{ model: EditorModel; diff --git a/packages/legacy/src/smart/ui/edit/approvaledit.tsx b/packages/legacy/src/smart/ui/edit/approvaledit.tsx index 6ff9138f..8c041250 100644 --- a/packages/legacy/src/smart/ui/edit/approvaledit.tsx +++ b/packages/legacy/src/smart/ui/edit/approvaledit.tsx @@ -1,6 +1,6 @@ import { FormGroup } from '@blueprintjs/core'; import React, { useEffect, useMemo, useState } from 'react'; -import MGDDisplayPane from '../../MGDComponents/MGDDisplayPane'; +import MGDDisplayPane from '@/smart/MGDComponents/MGDDisplayPane'; import { EditorApproval, EditorModel, @@ -13,25 +13,25 @@ import { getModelAllRoles, removeSpace, } from '../../utils/ModelFunctions'; -import { MODAILITYOPTIONS } from '../../utils/constants'; +import { MODAILITYOPTIONS } from '@/smart/utils/constants'; import { MultiReferenceSelector, NormalComboBox, NormalTextField, ReferenceSelector, } from '../common/fields'; -import { EditPageButtons } from './commons'; +import { EditPageButtons } from '@/smart/ui/edit/commons'; import { MMELReference, MMELRole, } from '@paneron/libmmel/interface/supportinterface'; -import { DescriptionItem } from '../common/description/fields'; -import RoleSelector from './components/RoleSelector'; -import RegistrySelector from './components/RegistrySelector'; -import SimpleReferenceSelector from './components/ReferenceSelector'; -import { ModelAction } from '../../model/editor/model'; -import PopoverChangeIDButton from '../popover/PopoverChangeIDButton'; -import { editElmCommand } from '../../model/editor/commands/elements'; +import { DescriptionItem } from '@/smart/ui/common/description/fields'; +import RoleSelector from '@/smart/ui/edit/components/RoleSelector'; +import RegistrySelector from '@/smart/ui/edit/components/RegistrySelector'; +import SimpleReferenceSelector from '@/smart/ui/edit/components/ReferenceSelector'; +import { ModelAction } from '@/smart/model/editor/model'; +import PopoverChangeIDButton from '@/smart/ui/popover/PopoverChangeIDButton'; +import { editElmCommand } from '@/smart/model/editor/commands/elements'; interface CommonApprovalEditProps { onUpdateClick: () => void; diff --git a/packages/legacy/src/smart/ui/edit/attributeedit.tsx b/packages/legacy/src/smart/ui/edit/attributeedit.tsx index 00966c4d..140a2f10 100644 --- a/packages/legacy/src/smart/ui/edit/attributeedit.tsx +++ b/packages/legacy/src/smart/ui/edit/attributeedit.tsx @@ -1,6 +1,6 @@ import { FormGroup } from '@blueprintjs/core'; import React from 'react'; -import MGDDisplayPane from '../../MGDComponents/MGDDisplayPane'; +import MGDDisplayPane from '@/smart/MGDComponents/MGDDisplayPane'; import { EditorModel, isEditorDataClass, @@ -11,16 +11,16 @@ import { getReferenceDCTypeName, referenceSorter, } from '../../utils/ModelFunctions'; -import { DATATYPE, MODAILITYOPTIONS } from '../../utils/constants'; -import { createDataAttribute } from '../../utils/EditorFactory'; +import { DATATYPE, MODAILITYOPTIONS } from '@/smart/utils/constants'; +import { createDataAttribute } from '@/smart/utils/EditorFactory'; import { MultiReferenceSelector, NormalComboBox, NormalTextField, ReferenceSelector, } from '../common/fields'; -import ListWithPopoverItem from '../common/listmanagement/listPopoverItem'; -import { CardinalityField } from './components/CardinalityEdit'; +import ListWithPopoverItem from '@/smart/ui/common/listmanagement/listPopoverItem'; +import { CardinalityField } from '@/smart/ui/edit/components/CardinalityEdit'; const AttributeEditPage: React.FC<{ attributes: Record; diff --git a/packages/legacy/src/smart/ui/edit/commons.tsx b/packages/legacy/src/smart/ui/edit/commons.tsx index b9727b24..b2a7532b 100644 --- a/packages/legacy/src/smart/ui/edit/commons.tsx +++ b/packages/legacy/src/smart/ui/edit/commons.tsx @@ -1,6 +1,6 @@ import { Button } from '@blueprintjs/core'; import React from 'react'; -import MGDButtonGroup from '../../MGDComponents/MGDButtonGroup'; +import MGDButtonGroup from '@/smart/MGDComponents/MGDButtonGroup'; import { AddSubprocessButton, BringOutButton, diff --git a/packages/legacy/src/smart/ui/edit/components/AttributeList.tsx b/packages/legacy/src/smart/ui/edit/components/AttributeList.tsx index a0f6a794..b0644893 100644 --- a/packages/legacy/src/smart/ui/edit/components/AttributeList.tsx +++ b/packages/legacy/src/smart/ui/edit/components/AttributeList.tsx @@ -6,22 +6,22 @@ import { isEditorDataClass, isEditorRegistry, } from '../../../model/editormodel'; -import { RefTextSelection } from '../../../model/selectionImport'; +import { RefTextSelection } from '@/smart/model/selectionImport'; import { DataType } from '@paneron/libmmel/interface/baseinterface'; import { MMELDataAttribute } from '@paneron/libmmel/interface/datainterface'; import { MMELReference } from '@paneron/libmmel/interface/supportinterface'; -import { DATATYPE, MODAILITYOPTIONS } from '../../../utils/constants'; -import { createDataAttribute } from '../../../utils/EditorFactory'; +import { DATATYPE, MODAILITYOPTIONS } from '@/smart/utils/constants'; +import { createDataAttribute } from '@/smart/utils/EditorFactory'; import { findUniqueID, getModelAllRefs, getReferenceDCTypeName, trydefaultID, } from '../../../utils/ModelFunctions'; -import { findExistingRef } from '../../../utils/ModelImport'; -import { NormalComboBox, NormalTextField } from '../../common/fields'; -import DataTypeSelector from './DataTypeSelector'; -import SimpleReferenceSelector from './ReferenceSelector'; +import { findExistingRef } from '@/smart/utils/ModelImport'; +import { NormalComboBox, NormalTextField } from '@/smart/ui/common/fields'; +import DataTypeSelector from '@/smart/ui/edit/components/DataTypeSelector'; +import SimpleReferenceSelector from '@/smart/ui/edit/components/ReferenceSelector'; export interface AttributeType { id: string; diff --git a/packages/legacy/src/smart/ui/edit/components/CardinalityEdit.tsx b/packages/legacy/src/smart/ui/edit/components/CardinalityEdit.tsx index 3a51aa37..61518e06 100644 --- a/packages/legacy/src/smart/ui/edit/components/CardinalityEdit.tsx +++ b/packages/legacy/src/smart/ui/edit/components/CardinalityEdit.tsx @@ -1,11 +1,11 @@ import { FormGroup } from '@blueprintjs/core'; import React from 'react'; -import MGDLabel from '../../../MGDComponents/MGDLabel'; +import MGDLabel from '@/smart/MGDComponents/MGDLabel'; import { cardinalityToString, parseCardinality, } from '../../../utils/ModelFunctions'; -import { NormalComboBox } from '../../common/fields'; +import { NormalComboBox } from '@/smart/ui/common/fields'; export const CardinalityField: React.FC<{ value: string; diff --git a/packages/legacy/src/smart/ui/edit/components/DataTypeSelector.tsx b/packages/legacy/src/smart/ui/edit/components/DataTypeSelector.tsx index d4f3cde7..3327703a 100644 --- a/packages/legacy/src/smart/ui/edit/components/DataTypeSelector.tsx +++ b/packages/legacy/src/smart/ui/edit/components/DataTypeSelector.tsx @@ -6,7 +6,7 @@ import { Select, } from '@blueprintjs/select'; import React from 'react'; -import { AttributeType } from './AttributeList'; +import { AttributeType } from '@/smart/ui/edit/components/AttributeList'; const DataTypeSelect = Select.ofType(); diff --git a/packages/legacy/src/smart/ui/edit/components/EdgeListEdit.tsx b/packages/legacy/src/smart/ui/edit/components/EdgeListEdit.tsx index 348e444f..dccc2fae 100644 --- a/packages/legacy/src/smart/ui/edit/components/EdgeListEdit.tsx +++ b/packages/legacy/src/smart/ui/edit/components/EdgeListEdit.tsx @@ -1,6 +1,6 @@ import React from 'react'; import { MMELEdge } from '@paneron/libmmel/interface/flowcontrolinterface'; -import { NormalTextField } from '../../common/fields'; +import { NormalTextField } from '@/smart/ui/common/fields'; const EdgeQuickEdit: React.FC<{ edge: MMELEdge; diff --git a/packages/legacy/src/smart/ui/edit/components/MeasurementListEdit.tsx b/packages/legacy/src/smart/ui/edit/components/MeasurementListEdit.tsx index ffe42dd5..65908475 100644 --- a/packages/legacy/src/smart/ui/edit/components/MeasurementListEdit.tsx +++ b/packages/legacy/src/smart/ui/edit/components/MeasurementListEdit.tsx @@ -1,6 +1,6 @@ import { Button, FormGroup } from '@blueprintjs/core'; import React from 'react'; -import { NormalTextField } from '../../common/fields'; +import { NormalTextField } from '@/smart/ui/common/fields'; const MeasureListQuickEdit: React.FC<{ measurements: string[]; diff --git a/packages/legacy/src/smart/ui/edit/components/NoteList.tsx b/packages/legacy/src/smart/ui/edit/components/NoteList.tsx index 34ba2770..ab7cd6db 100644 --- a/packages/legacy/src/smart/ui/edit/components/NoteList.tsx +++ b/packages/legacy/src/smart/ui/edit/components/NoteList.tsx @@ -1,8 +1,8 @@ import { Button, FormGroup } from '@blueprintjs/core'; import React from 'react'; import { useMemo } from 'react'; -import { EditorModel } from '../../../model/editormodel'; -import { RefTextSelection } from '../../../model/selectionImport'; +import { EditorModel } from '@/smart/model/editormodel'; +import { RefTextSelection } from '@/smart/model/selectionImport'; import { DataType } from '@paneron/libmmel/interface/baseinterface'; import { MMELNote, @@ -10,15 +10,15 @@ import { NOTE_TYPE, NOTE_TYPES, } from '@paneron/libmmel/interface/supportinterface'; -import { createNote } from '../../../utils/EditorFactory'; +import { createNote } from '@/smart/utils/EditorFactory'; import { findUniqueID, getModelAllRefs, trydefaultID, } from '../../../utils/ModelFunctions'; -import { findExistingRef } from '../../../utils/ModelImport'; -import { NormalComboBox, NormalTextField } from '../../common/fields'; -import SimpleReferenceSelector from './ReferenceSelector'; +import { findExistingRef } from '@/smart/utils/ModelImport'; +import { NormalComboBox, NormalTextField } from '@/smart/ui/common/fields'; +import SimpleReferenceSelector from '@/smart/ui/edit/components/ReferenceSelector'; const NoteListQuickEdit: React.FC<{ notes: Record; diff --git a/packages/legacy/src/smart/ui/edit/components/ProvisionList.tsx b/packages/legacy/src/smart/ui/edit/components/ProvisionList.tsx index d71bab99..c3de850c 100644 --- a/packages/legacy/src/smart/ui/edit/components/ProvisionList.tsx +++ b/packages/legacy/src/smart/ui/edit/components/ProvisionList.tsx @@ -1,23 +1,23 @@ import { Button, FormGroup } from '@blueprintjs/core'; import React from 'react'; import { useMemo } from 'react'; -import { EditorModel } from '../../../model/editormodel'; -import { RefTextSelection } from '../../../model/selectionImport'; +import { EditorModel } from '@/smart/model/editormodel'; +import { RefTextSelection } from '@/smart/model/selectionImport'; import { DataType } from '@paneron/libmmel/interface/baseinterface'; import { MMELProvision, MMELReference, } from '@paneron/libmmel/interface/supportinterface'; -import { MODAILITYOPTIONS, ModalityType } from '../../../utils/constants'; -import { createProvision } from '../../../utils/EditorFactory'; +import { MODAILITYOPTIONS, ModalityType } from '@/smart/utils/constants'; +import { createProvision } from '@/smart/utils/EditorFactory'; import { findUniqueID, getModelAllRefs, trydefaultID, } from '../../../utils/ModelFunctions'; -import { findExistingRef } from '../../../utils/ModelImport'; -import { NormalComboBox, NormalTextField } from '../../common/fields'; -import SimpleReferenceSelector from './ReferenceSelector'; +import { findExistingRef } from '@/smart/utils/ModelImport'; +import { NormalComboBox, NormalTextField } from '@/smart/ui/common/fields'; +import SimpleReferenceSelector from '@/smart/ui/edit/components/ReferenceSelector'; const ProvisionListQuickEdit: React.FC<{ provisions: Record; diff --git a/packages/legacy/src/smart/ui/edit/components/ReferenceSelector.tsx b/packages/legacy/src/smart/ui/edit/components/ReferenceSelector.tsx index c3c705cf..2462dfb4 100644 --- a/packages/legacy/src/smart/ui/edit/components/ReferenceSelector.tsx +++ b/packages/legacy/src/smart/ui/edit/components/ReferenceSelector.tsx @@ -7,7 +7,7 @@ import { } from '@blueprintjs/select'; import React from 'react'; import { MMELReference } from '@paneron/libmmel/interface/supportinterface'; -import { toRefSummary } from '../../../utils/ModelFunctions'; +import { toRefSummary } from '@/smart/utils/ModelFunctions'; const ReferenceMultiSelect = MultiSelect.ofType(); diff --git a/packages/legacy/src/smart/ui/edit/components/RegistrySelector.tsx b/packages/legacy/src/smart/ui/edit/components/RegistrySelector.tsx index 53a6a540..ca1cd76d 100644 --- a/packages/legacy/src/smart/ui/edit/components/RegistrySelector.tsx +++ b/packages/legacy/src/smart/ui/edit/components/RegistrySelector.tsx @@ -6,7 +6,7 @@ import { MultiSelect, } from '@blueprintjs/select'; import React from 'react'; -import { EditorRegistry } from '../../../model/editormodel'; +import { EditorRegistry } from '@/smart/model/editormodel'; const RegistryMultiSelect = MultiSelect.ofType(); diff --git a/packages/legacy/src/smart/ui/edit/components/StringListQuickEdit.tsx b/packages/legacy/src/smart/ui/edit/components/StringListQuickEdit.tsx index 88ca02b7..50164c8f 100644 --- a/packages/legacy/src/smart/ui/edit/components/StringListQuickEdit.tsx +++ b/packages/legacy/src/smart/ui/edit/components/StringListQuickEdit.tsx @@ -1,6 +1,6 @@ import { Button, FormGroup } from '@blueprintjs/core'; import React from 'react'; -import { NormalTextField } from '../../common/fields'; +import { NormalTextField } from '@/smart/ui/common/fields'; const StringListQuickEdit: React.FC<{ data: string[]; diff --git a/packages/legacy/src/smart/ui/edit/dataclassedit.tsx b/packages/legacy/src/smart/ui/edit/dataclassedit.tsx index 925d732e..6de984e8 100644 --- a/packages/legacy/src/smart/ui/edit/dataclassedit.tsx +++ b/packages/legacy/src/smart/ui/edit/dataclassedit.tsx @@ -5,12 +5,12 @@ import { EditorModel, isEditorDataClass, } from '../../model/editormodel'; -import { checkId, defaultItemSorter } from '../../utils/ModelFunctions'; -import { createDataClass } from '../../utils/EditorFactory'; -import { IListItem, IManageHandler, NormalTextField } from '../common/fields'; -import ListManagePage from '../common/listmanagement/listmanagement'; -import AttributeEditPage from './attributeedit'; -import { ModelAction } from '../../model/editor/model'; +import { checkId, defaultItemSorter } from '@/smart/utils/ModelFunctions'; +import { createDataClass } from '@/smart/utils/EditorFactory'; +import { IListItem, IManageHandler, NormalTextField } from '@/smart/ui/common/fields'; +import ListManagePage from '@/smart/ui/common/listmanagement/listmanagement'; +import AttributeEditPage from '@/smart/ui/edit/attributeedit'; +import { ModelAction } from '@/smart/model/editor/model'; import { addDCCommand, delDCCommand, diff --git a/packages/legacy/src/smart/ui/edit/egateedit.tsx b/packages/legacy/src/smart/ui/edit/egateedit.tsx index 6eb18386..85bc61d8 100644 --- a/packages/legacy/src/smart/ui/edit/egateedit.tsx +++ b/packages/legacy/src/smart/ui/edit/egateedit.tsx @@ -1,8 +1,8 @@ import { Button, FormGroup } from '@blueprintjs/core'; import React, { useEffect, useState } from 'react'; -import MGDDisplayPane from '../../MGDComponents/MGDDisplayPane'; -import { editEGateCommand } from '../../model/editor/commands/elements'; -import { ModelAction } from '../../model/editor/model'; +import MGDDisplayPane from '@/smart/MGDComponents/MGDDisplayPane'; +import { editEGateCommand } from '@/smart/model/editor/commands/elements'; +import { ModelAction } from '@/smart/model/editor/model'; import { EditorEGate, EditorModel, @@ -14,11 +14,11 @@ import { getModelAllMeasures, removeSpace, } from '../../utils/ModelFunctions'; -import { DescriptionItem } from '../common/description/fields'; -import { NormalTextField, ReferenceSelector } from '../common/fields'; -import PopoverChangeIDButton from '../popover/PopoverChangeIDButton'; -import { EditPageButtons } from './commons'; -import EdgeQuickEdit from './components/EdgeListEdit'; +import { DescriptionItem } from '@/smart/ui/common/description/fields'; +import { NormalTextField, ReferenceSelector } from '@/smart/ui/common/fields'; +import PopoverChangeIDButton from '@/smart/ui/popover/PopoverChangeIDButton'; +import { EditPageButtons } from '@/smart/ui/edit/commons'; +import EdgeQuickEdit from '@/smart/ui/edit/components/EdgeListEdit'; interface CommonEGateEditProps { onUpdateClick: () => void; diff --git a/packages/legacy/src/smart/ui/edit/enumedit.tsx b/packages/legacy/src/smart/ui/edit/enumedit.tsx index ca9004ba..ffe87575 100644 --- a/packages/legacy/src/smart/ui/edit/enumedit.tsx +++ b/packages/legacy/src/smart/ui/edit/enumedit.tsx @@ -1,13 +1,13 @@ import { FormGroup } from '@blueprintjs/core'; import React from 'react'; -import { EditorModel } from '../../model/editormodel'; +import { EditorModel } from '@/smart/model/editormodel'; import { MMELEnum } from '@paneron/libmmel/interface/datainterface'; -import { checkId, defaultItemSorter } from '../../utils/ModelFunctions'; -import { createEnum } from '../../utils/EditorFactory'; -import { IListItem, IManageHandler, NormalTextField } from '../common/fields'; -import ListManagePage from '../common/listmanagement/listmanagement'; -import EnumValueEditPage from './enumvalueedit'; -import { ModelAction } from '../../model/editor/model'; +import { checkId, defaultItemSorter } from '@/smart/utils/ModelFunctions'; +import { createEnum } from '@/smart/utils/EditorFactory'; +import { IListItem, IManageHandler, NormalTextField } from '@/smart/ui/common/fields'; +import ListManagePage from '@/smart/ui/common/listmanagement/listmanagement'; +import EnumValueEditPage from '@/smart/ui/edit/enumvalueedit'; +import { ModelAction } from '@/smart/model/editor/model'; const initObj = createEnum(''); diff --git a/packages/legacy/src/smart/ui/edit/enumvalueedit.tsx b/packages/legacy/src/smart/ui/edit/enumvalueedit.tsx index 6b9f7456..a87abebb 100644 --- a/packages/legacy/src/smart/ui/edit/enumvalueedit.tsx +++ b/packages/legacy/src/smart/ui/edit/enumvalueedit.tsx @@ -1,10 +1,10 @@ import { FormGroup } from '@blueprintjs/core'; import React from 'react'; -import MGDDisplayPane from '../../MGDComponents/MGDDisplayPane'; -import { EditorModel } from '../../model/editormodel'; +import MGDDisplayPane from '@/smart/MGDComponents/MGDDisplayPane'; +import { EditorModel } from '@/smart/model/editormodel'; import { MMELEnumValue } from '@paneron/libmmel/interface/datainterface'; -import { createEnumValue } from '../../utils/EditorFactory'; -import { NormalTextField } from '../common/fields'; +import { createEnumValue } from '@/smart/utils/EditorFactory'; +import { NormalTextField } from '@/smart/ui/common/fields'; import ListWithPopoverItem, { IMMELObject, } from '../common/listmanagement/listPopoverItem'; diff --git a/packages/legacy/src/smart/ui/edit/figure/FigureEdit.tsx b/packages/legacy/src/smart/ui/edit/figure/FigureEdit.tsx index 6696ddaa..38943188 100644 --- a/packages/legacy/src/smart/ui/edit/figure/FigureEdit.tsx +++ b/packages/legacy/src/smart/ui/edit/figure/FigureEdit.tsx @@ -1,12 +1,12 @@ import React from 'react'; -import { EditorModel } from '../../../model/editormodel'; +import { EditorModel } from '@/smart/model/editormodel'; import { MMELFigure } from '@paneron/libmmel/interface/supportinterface'; -import { checkId, defaultItemSorter } from '../../../utils/ModelFunctions'; -import { createFig } from '../../../utils/EditorFactory'; -import { IListItem, IManageHandler } from '../../common/fields'; -import ListManagePage from '../../common/listmanagement/listmanagement'; -import FigItemEditPage from './FigureItemEdit'; -import { ModelAction } from '../../../model/editor/model'; +import { checkId, defaultItemSorter } from '@/smart/utils/ModelFunctions'; +import { createFig } from '@/smart/utils/EditorFactory'; +import { IListItem, IManageHandler } from '@/smart/ui/common/fields'; +import ListManagePage from '@/smart/ui/common/listmanagement/listmanagement'; +import FigItemEditPage from '@/smart/ui/edit/figure/FigureItemEdit'; +import { ModelAction } from '@/smart/model/editor/model'; const FigureEditPage: React.FC<{ model: EditorModel; diff --git a/packages/legacy/src/smart/ui/edit/figure/FigureItemEdit.tsx b/packages/legacy/src/smart/ui/edit/figure/FigureItemEdit.tsx index 4eaa89f6..d7422e3b 100644 --- a/packages/legacy/src/smart/ui/edit/figure/FigureItemEdit.tsx +++ b/packages/legacy/src/smart/ui/edit/figure/FigureItemEdit.tsx @@ -4,12 +4,12 @@ import { BINARY_TYPES, MMELFigure, } from '@paneron/libmmel/interface/supportinterface'; -import { NormalComboBox, NormalTextField } from '../../common/fields'; +import { NormalComboBox, NormalTextField } from '@/smart/ui/common/fields'; import { useContext } from 'react'; -import { FILE_TYPE, handleFileOpen } from '../../../utils/IOFunctions'; +import { FILE_TYPE, handleFileOpen } from '@/smart/utils/IOFunctions'; import { DatasetContext } from '@riboseinc/paneron-extension-kit/context'; import React from 'react'; -import MultimediaView from '../../common/description/Multimedia'; +import MultimediaView from '@/smart/ui/common/description/Multimedia'; const FigItemEditPage: React.FC<{ object: MMELFigure; diff --git a/packages/legacy/src/smart/ui/edit/mappingedit.tsx b/packages/legacy/src/smart/ui/edit/mappingedit.tsx index f080698c..ff0f024f 100644 --- a/packages/legacy/src/smart/ui/edit/mappingedit.tsx +++ b/packages/legacy/src/smart/ui/edit/mappingedit.tsx @@ -1,11 +1,11 @@ import React, { useState } from 'react'; -import { NormalTextField } from '../common/fields'; -import { MappingMeta } from '../../model/mapmodel'; +import { NormalTextField } from '@/smart/ui/common/fields'; +import { MappingMeta } from '@/smart/model/mapmodel'; import { Button, FormGroup } from '@blueprintjs/core'; -import { EditPageButtons } from './commons'; -import { mgdLabel } from '../../../css/form'; -import MGDDisplayPane from '../../MGDComponents/MGDDisplayPane'; -import { wrapperContainer } from '../../../css/layout'; +import { EditPageButtons } from '@/smart/ui/edit/commons'; +import { mgdLabel } from '@/css/form'; +import MGDDisplayPane from '@/smart/MGDComponents/MGDDisplayPane'; +import { wrapperContainer } from '@/css/layout'; export interface EditElmInfo { id: string; diff --git a/packages/legacy/src/smart/ui/edit/measurementExpressionEdit.tsx b/packages/legacy/src/smart/ui/edit/measurementExpressionEdit.tsx index 38a09f28..dad91234 100644 --- a/packages/legacy/src/smart/ui/edit/measurementExpressionEdit.tsx +++ b/packages/legacy/src/smart/ui/edit/measurementExpressionEdit.tsx @@ -1,9 +1,9 @@ import { Button, FormGroup } from '@blueprintjs/core'; import React from 'react'; -import { EditorModel } from '../../model/editormodel'; -import { measurementValidCheck } from '../../utils/measurement/BasicFunctions'; -import { ReferenceSelector } from '../common/fields'; -import { IMMELObject } from '../common/listmanagement/listPopoverItem'; +import { EditorModel } from '@/smart/model/editormodel'; +import { measurementValidCheck } from '@/smart/utils/measurement/BasicFunctions'; +import { ReferenceSelector } from '@/smart/ui/common/fields'; +import { IMMELObject } from '@/smart/ui/common/listmanagement/listPopoverItem'; export type IMeasure = IMMELObject & { measure: string; diff --git a/packages/legacy/src/smart/ui/edit/measurementedit.tsx b/packages/legacy/src/smart/ui/edit/measurementedit.tsx index e3cfc2d4..9da7e5b1 100644 --- a/packages/legacy/src/smart/ui/edit/measurementedit.tsx +++ b/packages/legacy/src/smart/ui/edit/measurementedit.tsx @@ -1,14 +1,14 @@ import { Button, FormGroup } from '@blueprintjs/core'; import React from 'react'; -import { mgdLabel } from '../../../css/form'; -import { EditorModel } from '../../model/editormodel'; +import { mgdLabel } from '@/css/form'; +import { EditorModel } from '@/smart/model/editormodel'; import { MMELVariable, VarType, } from '@paneron/libmmel/interface/supportinterface'; -import { checkId, defaultItemSorter } from '../../utils/ModelFunctions'; -import { MEASUREMENTTYPES } from '../../utils/constants'; -import { createVariable } from '../../utils/EditorFactory'; +import { checkId, defaultItemSorter } from '@/smart/utils/ModelFunctions'; +import { MEASUREMENTTYPES } from '@/smart/utils/constants'; +import { createVariable } from '@/smart/utils/EditorFactory'; import { IListItem, IManageHandler, @@ -16,9 +16,9 @@ import { NormalTextField, ReferenceSelector, } from '../common/fields'; -import ListManagePage from '../common/listmanagement/listmanagement'; -import { measurementValidCheck } from '../../utils/measurement/BasicFunctions'; -import { ModelAction } from '../../model/editor/model'; +import ListManagePage from '@/smart/ui/common/listmanagement/listmanagement'; +import { measurementValidCheck } from '@/smart/utils/measurement/BasicFunctions'; +import { ModelAction } from '@/smart/model/editor/model'; const MeasurementEditPage: React.FC<{ model: EditorModel; diff --git a/packages/legacy/src/smart/ui/edit/metaedit.tsx b/packages/legacy/src/smart/ui/edit/metaedit.tsx index 1fbcd187..159bfa52 100644 --- a/packages/legacy/src/smart/ui/edit/metaedit.tsx +++ b/packages/legacy/src/smart/ui/edit/metaedit.tsx @@ -1,9 +1,9 @@ import { FormGroup } from '@blueprintjs/core'; import React from 'react'; -import { EditorAction } from '../../model/editor/state'; +import { EditorAction } from '@/smart/model/editor/state'; import { MMELMetadata } from '@paneron/libmmel/interface/supportinterface'; -import { DescriptionItem } from '../common/description/fields'; -import { NormalTextField } from '../common/fields'; +import { DescriptionItem } from '@/smart/ui/common/description/fields'; +import { NormalTextField } from '@/smart/ui/common/fields'; const MetaEditPage: React.FC<{ meta: MMELMetadata; diff --git a/packages/legacy/src/smart/ui/edit/processedit.tsx b/packages/legacy/src/smart/ui/edit/processedit.tsx index 43c1402e..fe1fd642 100644 --- a/packages/legacy/src/smart/ui/edit/processedit.tsx +++ b/packages/legacy/src/smart/ui/edit/processedit.tsx @@ -1,6 +1,6 @@ import { FormGroup } from '@blueprintjs/core'; import React, { useEffect, useMemo, useRef, useState } from 'react'; -import MGDDisplayPane from '../../MGDComponents/MGDDisplayPane'; +import MGDDisplayPane from '@/smart/MGDComponents/MGDDisplayPane'; import { EditorModel, EditorProcess, @@ -20,32 +20,32 @@ import { getModelAllRoles, removeSpace, } from '../../utils/ModelFunctions'; -import { createNote, createProvision } from '../../utils/EditorFactory'; +import { createNote, createProvision } from '@/smart/utils/EditorFactory'; import { MultiReferenceSelector, NormalTextField, ReferenceSelector, } from '../common/fields'; -import ListWithPopoverItem from '../common/listmanagement/listPopoverItem'; -import { EditPageButtons } from './commons'; +import ListWithPopoverItem from '@/smart/ui/common/listmanagement/listPopoverItem'; +import { EditPageButtons } from '@/smart/ui/edit/commons'; import { IMeasure, matchMeasurementFilter, MeasurementItem, } from './measurementExpressionEdit'; -import { matchProvisionFilter, ProvisonItem } from './provisionedit'; -import RoleSelector from './components/RoleSelector'; -import { DescriptionItem } from '../common/description/fields'; -import RegistrySelector from './components/RegistrySelector'; -import ProvisionListQuickEdit from './components/ProvisionList'; -import MeasureListQuickEdit from './components/MeasurementListEdit'; -import { RefTextSelection } from '../../model/selectionImport'; -import { matchNoteFilter, NoteItem } from './NoteEdit'; -import NoteListQuickEdit from './components/NoteList'; -import { LinkItem, matchLinkFilter } from './LinkEdit'; -import { ModelAction } from '../../model/editor/model'; -import PopoverChangeIDButton from '../popover/PopoverChangeIDButton'; -import { editProcessCommand } from '../../model/editor/commands/elements'; +import { matchProvisionFilter, ProvisonItem } from '@/smart/ui/edit/provisionedit'; +import RoleSelector from '@/smart/ui/edit/components/RoleSelector'; +import { DescriptionItem } from '@/smart/ui/common/description/fields'; +import RegistrySelector from '@/smart/ui/edit/components/RegistrySelector'; +import ProvisionListQuickEdit from '@/smart/ui/edit/components/ProvisionList'; +import MeasureListQuickEdit from '@/smart/ui/edit/components/MeasurementListEdit'; +import { RefTextSelection } from '@/smart/model/selectionImport'; +import { matchNoteFilter, NoteItem } from '@/smart/ui/edit/NoteEdit'; +import NoteListQuickEdit from '@/smart/ui/edit/components/NoteList'; +import { LinkItem, matchLinkFilter } from '@/smart/ui/edit/LinkEdit'; +import { ModelAction } from '@/smart/model/editor/model'; +import PopoverChangeIDButton from '@/smart/ui/popover/PopoverChangeIDButton'; +import { editProcessCommand } from '@/smart/model/editor/commands/elements'; function getInitProvisions( model: EditorModel, diff --git a/packages/legacy/src/smart/ui/edit/provisionedit.tsx b/packages/legacy/src/smart/ui/edit/provisionedit.tsx index 08327070..7408bdde 100644 --- a/packages/legacy/src/smart/ui/edit/provisionedit.tsx +++ b/packages/legacy/src/smart/ui/edit/provisionedit.tsx @@ -1,15 +1,15 @@ import { FormGroup } from '@blueprintjs/core'; import React from 'react'; -import { EditorModel } from '../../model/editormodel'; +import { EditorModel } from '@/smart/model/editormodel'; import { MMELProvision } from '@paneron/libmmel/interface/supportinterface'; -import { getModelAllRefs } from '../../utils/ModelFunctions'; -import { MODAILITYOPTIONS } from '../../utils/constants'; +import { getModelAllRefs } from '@/smart/utils/ModelFunctions'; +import { MODAILITYOPTIONS } from '@/smart/utils/constants'; import { MultiReferenceSelector, NormalComboBox, NormalTextField, } from '../common/fields'; -import { IMMELObject } from '../common/listmanagement/listPopoverItem'; +import { IMMELObject } from '@/smart/ui/common/listmanagement/listPopoverItem'; export function matchProvisionFilter(x: IMMELObject, filter: string): boolean { const provision = x as MMELProvision; diff --git a/packages/legacy/src/smart/ui/edit/refedit.tsx b/packages/legacy/src/smart/ui/edit/refedit.tsx index 25334a29..1c250735 100644 --- a/packages/legacy/src/smart/ui/edit/refedit.tsx +++ b/packages/legacy/src/smart/ui/edit/refedit.tsx @@ -1,16 +1,16 @@ import { FormGroup } from '@blueprintjs/core'; import React from 'react'; -import { EditorModel } from '../../model/editormodel'; +import { EditorModel } from '@/smart/model/editormodel'; import { MMELReference } from '@paneron/libmmel/interface/supportinterface'; import { checkId, referenceSorter, toRefSummary, } from '../../utils/ModelFunctions'; -import { createReference } from '../../utils/EditorFactory'; -import { IListItem, IManageHandler, NormalTextField } from '../common/fields'; -import ListManagePage from '../common/listmanagement/listmanagement'; -import { ModelAction } from '../../model/editor/model'; +import { createReference } from '@/smart/utils/EditorFactory'; +import { IListItem, IManageHandler, NormalTextField } from '@/smart/ui/common/fields'; +import ListManagePage from '@/smart/ui/common/listmanagement/listmanagement'; +import { ModelAction } from '@/smart/model/editor/model'; import { addRefCommand, delRefCommand, diff --git a/packages/legacy/src/smart/ui/edit/registryedit.tsx b/packages/legacy/src/smart/ui/edit/registryedit.tsx index eb39cfe0..dc1557db 100644 --- a/packages/legacy/src/smart/ui/edit/registryedit.tsx +++ b/packages/legacy/src/smart/ui/edit/registryedit.tsx @@ -11,12 +11,12 @@ import { defaultItemSorter, genDCIdByRegId, } from '../../utils/ModelFunctions'; -import { createDataClass } from '../../utils/EditorFactory'; -import { IListItem, IManageHandler, NormalTextField } from '../common/fields'; -import ListManagePage from '../common/listmanagement/listmanagement'; -import AttributeEditPage from './attributeedit'; -import { ModelAction } from '../../model/editor/model'; -import { RegistryCombined } from '../../model/editor/components/element/registry'; +import { createDataClass } from '@/smart/utils/EditorFactory'; +import { IListItem, IManageHandler, NormalTextField } from '@/smart/ui/common/fields'; +import ListManagePage from '@/smart/ui/common/listmanagement/listmanagement'; +import AttributeEditPage from '@/smart/ui/edit/attributeedit'; +import { ModelAction } from '@/smart/model/editor/model'; +import { RegistryCombined } from '@/smart/model/editor/components/element/registry'; import { addRegistryCommand, delRegistryCommand, diff --git a/packages/legacy/src/smart/ui/edit/roleedit.tsx b/packages/legacy/src/smart/ui/edit/roleedit.tsx index d7dc0c62..d78a0ffb 100644 --- a/packages/legacy/src/smart/ui/edit/roleedit.tsx +++ b/packages/legacy/src/smart/ui/edit/roleedit.tsx @@ -1,12 +1,12 @@ import { FormGroup } from '@blueprintjs/core'; import React from 'react'; -import { EditorModel } from '../../model/editormodel'; +import { EditorModel } from '@/smart/model/editormodel'; import { MMELRole } from '@paneron/libmmel/interface/supportinterface'; -import { checkId, defaultItemSorter } from '../../utils/ModelFunctions'; -import { createRole } from '../../utils/EditorFactory'; -import { IListItem, IManageHandler, NormalTextField } from '../common/fields'; -import ListManagePage from '../common/listmanagement/listmanagement'; -import { ModelAction } from '../../model/editor/model'; +import { checkId, defaultItemSorter } from '@/smart/utils/ModelFunctions'; +import { createRole } from '@/smart/utils/EditorFactory'; +import { IListItem, IManageHandler, NormalTextField } from '@/smart/ui/common/fields'; +import ListManagePage from '@/smart/ui/common/listmanagement/listmanagement'; +import { ModelAction } from '@/smart/model/editor/model'; import { addRoleCommand, deleteRoleCommand, diff --git a/packages/legacy/src/smart/ui/edit/signaleventedit.tsx b/packages/legacy/src/smart/ui/edit/signaleventedit.tsx index 890da93c..4c27c910 100644 --- a/packages/legacy/src/smart/ui/edit/signaleventedit.tsx +++ b/packages/legacy/src/smart/ui/edit/signaleventedit.tsx @@ -1,18 +1,18 @@ import { FormGroup } from '@blueprintjs/core'; import React, { useEffect, useState } from 'react'; -import MGDDisplayPane from '../../MGDComponents/MGDDisplayPane'; -import { editElmCommand } from '../../model/editor/commands/elements'; -import { ModelAction } from '../../model/editor/model'; -import { EditorModel, EditorSignalEvent } from '../../model/editormodel'; +import MGDDisplayPane from '@/smart/MGDComponents/MGDDisplayPane'; +import { editElmCommand } from '@/smart/model/editor/commands/elements'; +import { ModelAction } from '@/smart/model/editor/model'; +import { EditorModel, EditorSignalEvent } from '@/smart/model/editormodel'; import { checkId, getModelAllSignals, removeSpace, } from '../../utils/ModelFunctions'; -import { DescriptionItem } from '../common/description/fields'; -import { NormalTextField, ReferenceSelector } from '../common/fields'; -import PopoverChangeIDButton from '../popover/PopoverChangeIDButton'; -import { EditPageButtons } from './commons'; +import { DescriptionItem } from '@/smart/ui/common/description/fields'; +import { NormalTextField, ReferenceSelector } from '@/smart/ui/common/fields'; +import PopoverChangeIDButton from '@/smart/ui/popover/PopoverChangeIDButton'; +import { EditPageButtons } from '@/smart/ui/edit/commons'; interface CommonSignalEditProps { onUpdateClick: () => void; diff --git a/packages/legacy/src/smart/ui/edit/table/ClassItemDisplayEdit.tsx b/packages/legacy/src/smart/ui/edit/table/ClassItemDisplayEdit.tsx index aa16c4f7..15572fb0 100644 --- a/packages/legacy/src/smart/ui/edit/table/ClassItemDisplayEdit.tsx +++ b/packages/legacy/src/smart/ui/edit/table/ClassItemDisplayEdit.tsx @@ -1,9 +1,9 @@ import { Button } from '@blueprintjs/core'; import React, { useState } from 'react'; -import MGDButtonGroup from '../../../MGDComponents/MGDButtonGroup'; -import MGDDisplayPane from '../../../MGDComponents/MGDDisplayPane'; +import MGDButtonGroup from '@/smart/MGDComponents/MGDButtonGroup'; +import MGDDisplayPane from '@/smart/MGDComponents/MGDDisplayPane'; import { MMELTable } from '@paneron/libmmel/interface/supportinterface'; -import { ReferenceSelector } from '../../common/fields'; +import { ReferenceSelector } from '@/smart/ui/common/fields'; const ClassItemDisplayEdit: React.FC<{ table: MMELTable; diff --git a/packages/legacy/src/smart/ui/edit/table/EditClassView.tsx b/packages/legacy/src/smart/ui/edit/table/EditClassView.tsx index 0fe5a706..fef25df5 100644 --- a/packages/legacy/src/smart/ui/edit/table/EditClassView.tsx +++ b/packages/legacy/src/smart/ui/edit/table/EditClassView.tsx @@ -1,14 +1,14 @@ import { Button, ButtonGroup, Dialog } from '@blueprintjs/core'; import React, { useState } from 'react'; import { useMemo } from 'react'; -import { dialogLayout } from '../../../../css/layout'; +import { dialogLayout } from '@/css/layout'; import { DataType } from '@paneron/libmmel/interface/baseinterface'; import { MMELTable } from '@paneron/libmmel/interface/supportinterface'; -import { IListItem } from '../../common/fields'; -import ListWithPopoverItem from '../../common/listmanagement/listPopoverItem'; -import ClassItemDisplayEdit from './ClassItemDisplayEdit'; -import TableClassDefinitionEdit from './TableClassDefinitionEdit'; -import TableClassItemEdit, { TableRowClass } from './TableClassItem'; +import { IListItem } from '@/smart/ui/common/fields'; +import ListWithPopoverItem from '@/smart/ui/common/listmanagement/listPopoverItem'; +import ClassItemDisplayEdit from '@/smart/ui/edit/table/ClassItemDisplayEdit'; +import TableClassDefinitionEdit from '@/smart/ui/edit/table/TableClassDefinitionEdit'; +import TableClassItemEdit, { TableRowClass } from '@/smart/ui/edit/table/TableClassItem'; type DialogType = 'class' | 'display'; diff --git a/packages/legacy/src/smart/ui/edit/table/EditTableView.tsx b/packages/legacy/src/smart/ui/edit/table/EditTableView.tsx index 3c948450..4f104ff7 100644 --- a/packages/legacy/src/smart/ui/edit/table/EditTableView.tsx +++ b/packages/legacy/src/smart/ui/edit/table/EditTableView.tsx @@ -3,7 +3,7 @@ import { Tooltip2 } from '@blueprintjs/popover2'; import React from 'react'; import { useMemo } from 'react'; import { MMELTable } from '@paneron/libmmel/interface/supportinterface'; -import MMELTableRow from './TableRow'; +import MMELTableRow from '@/smart/ui/edit/table/TableRow'; const EditTableView: React.FC<{ table: MMELTable; diff --git a/packages/legacy/src/smart/ui/edit/table/TableClassDefinitionEdit.tsx b/packages/legacy/src/smart/ui/edit/table/TableClassDefinitionEdit.tsx index df4e0180..374e91b2 100644 --- a/packages/legacy/src/smart/ui/edit/table/TableClassDefinitionEdit.tsx +++ b/packages/legacy/src/smart/ui/edit/table/TableClassDefinitionEdit.tsx @@ -1,13 +1,13 @@ import { FormGroup } from '@blueprintjs/core'; import React from 'react'; -import MGDDisplayPane from '../../../MGDComponents/MGDDisplayPane'; +import MGDDisplayPane from '@/smart/MGDComponents/MGDDisplayPane'; import { MMELTable } from '@paneron/libmmel/interface/supportinterface'; import { IListItem, IManageHandler, NormalTextField, } from '../../common/fields'; -import ListManagePage from '../../common/listmanagement/listmanagement'; +import ListManagePage from '@/smart/ui/common/listmanagement/listmanagement'; export interface TableClassAttribute { id: string; diff --git a/packages/legacy/src/smart/ui/edit/table/TableClassItem.tsx b/packages/legacy/src/smart/ui/edit/table/TableClassItem.tsx index 49c8b20d..12fc087c 100644 --- a/packages/legacy/src/smart/ui/edit/table/TableClassItem.tsx +++ b/packages/legacy/src/smart/ui/edit/table/TableClassItem.tsx @@ -1,7 +1,7 @@ import React from 'react'; import { DataType } from '@paneron/libmmel/interface/baseinterface'; import { MMELTable } from '@paneron/libmmel/interface/supportinterface'; -import { NormalComboBox, NormalTextField } from '../../common/fields'; +import { NormalComboBox, NormalTextField } from '@/smart/ui/common/fields'; export interface TableRowClass { id: string; diff --git a/packages/legacy/src/smart/ui/edit/table/TableEdit.tsx b/packages/legacy/src/smart/ui/edit/table/TableEdit.tsx index 6a656218..bf3c16b8 100644 --- a/packages/legacy/src/smart/ui/edit/table/TableEdit.tsx +++ b/packages/legacy/src/smart/ui/edit/table/TableEdit.tsx @@ -1,12 +1,12 @@ import React from 'react'; -import { EditorModel } from '../../../model/editormodel'; +import { EditorModel } from '@/smart/model/editormodel'; import { MMELTable } from '@paneron/libmmel/interface/supportinterface'; -import { checkId, defaultItemSorter } from '../../../utils/ModelFunctions'; -import { createTable } from '../../../utils/EditorFactory'; -import { IListItem, IManageHandler } from '../../common/fields'; -import ListManagePage from '../../common/listmanagement/listmanagement'; -import TableItemEditPage from './TableItemEdit'; -import { ModelAction } from '../../../model/editor/model'; +import { checkId, defaultItemSorter } from '@/smart/utils/ModelFunctions'; +import { createTable } from '@/smart/utils/EditorFactory'; +import { IListItem, IManageHandler } from '@/smart/ui/common/fields'; +import ListManagePage from '@/smart/ui/common/listmanagement/listmanagement'; +import TableItemEditPage from '@/smart/ui/edit/table/TableItemEdit'; +import { ModelAction } from '@/smart/model/editor/model'; const TableEditPage: React.FC<{ model: EditorModel; diff --git a/packages/legacy/src/smart/ui/edit/table/TableItemEdit.tsx b/packages/legacy/src/smart/ui/edit/table/TableItemEdit.tsx index 1526549d..127931f1 100644 --- a/packages/legacy/src/smart/ui/edit/table/TableItemEdit.tsx +++ b/packages/legacy/src/smart/ui/edit/table/TableItemEdit.tsx @@ -1,6 +1,6 @@ import { Button, ButtonGroup, FormGroup, Tab, Tabs } from '@blueprintjs/core'; import { MMELTable } from '@paneron/libmmel/interface/supportinterface'; -import { NormalTextField } from '../../common/fields'; +import { NormalTextField } from '@/smart/ui/common/fields'; import { useContext, useState } from 'react'; import { FILE_TYPE, @@ -8,8 +8,8 @@ import { saveToFileSystem, } from '../../../utils/IOFunctions'; import { DatasetContext } from '@riboseinc/paneron-extension-kit/context'; -import EditTableView from './EditTableView'; -import EditClassView from './EditClassView'; +import EditTableView from '@/smart/ui/edit/table/EditTableView'; +import EditClassView from '@/smart/ui/edit/table/EditClassView'; import React from 'react'; type TabType = 'table' | 'class'; diff --git a/packages/legacy/src/smart/ui/edit/table/TableRow.tsx b/packages/legacy/src/smart/ui/edit/table/TableRow.tsx index 6cbe099a..5e8c2ef8 100644 --- a/packages/legacy/src/smart/ui/edit/table/TableRow.tsx +++ b/packages/legacy/src/smart/ui/edit/table/TableRow.tsx @@ -1,7 +1,7 @@ import { Button, Text } from '@blueprintjs/core'; import { Tooltip2 } from '@blueprintjs/popover2'; import React from 'react'; -import { NormalTextField } from '../../common/fields'; +import { NormalTextField } from '@/smart/ui/common/fields'; const MMELTableRow: React.FC<{ row: string[]; diff --git a/packages/legacy/src/smart/ui/edit/timeredit.tsx b/packages/legacy/src/smart/ui/edit/timeredit.tsx index a95db47c..454a275b 100644 --- a/packages/legacy/src/smart/ui/edit/timeredit.tsx +++ b/packages/legacy/src/smart/ui/edit/timeredit.tsx @@ -1,15 +1,15 @@ import { FormGroup } from '@blueprintjs/core'; import React, { useEffect, useState } from 'react'; -import MGDDisplayPane from '../../MGDComponents/MGDDisplayPane'; -import { EditorModel, EditorTimerEvent } from '../../model/editormodel'; -import { checkId, removeSpace } from '../../utils/ModelFunctions'; -import { TimerType } from '../../utils/constants'; -import { NormalComboBox, NormalTextField } from '../common/fields'; -import { EditPageButtons } from './commons'; -import { DescriptionItem } from '../common/description/fields'; -import { ModelAction } from '../../model/editor/model'; -import PopoverChangeIDButton from '../popover/PopoverChangeIDButton'; -import { editElmCommand } from '../../model/editor/commands/elements'; +import MGDDisplayPane from '@/smart/MGDComponents/MGDDisplayPane'; +import { EditorModel, EditorTimerEvent } from '@/smart/model/editormodel'; +import { checkId, removeSpace } from '@/smart/utils/ModelFunctions'; +import { TimerType } from '@/smart/utils/constants'; +import { NormalComboBox, NormalTextField } from '@/smart/ui/common/fields'; +import { EditPageButtons } from '@/smart/ui/edit/commons'; +import { DescriptionItem } from '@/smart/ui/common/description/fields'; +import { ModelAction } from '@/smart/model/editor/model'; +import PopoverChangeIDButton from '@/smart/ui/popover/PopoverChangeIDButton'; +import { editElmCommand } from '@/smart/model/editor/commands/elements'; interface CommonTimerEditProps { onUpdateClick: () => void; diff --git a/packages/legacy/src/smart/ui/editFunctions/EditWrapper.tsx b/packages/legacy/src/smart/ui/editFunctions/EditWrapper.tsx index c5bcc05f..7209b91e 100644 --- a/packages/legacy/src/smart/ui/editFunctions/EditWrapper.tsx +++ b/packages/legacy/src/smart/ui/editFunctions/EditWrapper.tsx @@ -7,14 +7,14 @@ import { import { DatasetContext } from '@riboseinc/paneron-extension-kit/context'; import React, { useContext } from 'react'; import { useState } from 'react'; -import { addToLog, ChangeLog } from '../../model/changelog'; -import { EditorAction, useEditorState } from '../../model/editor/state'; -import { EditorModel, isEditorProcess } from '../../model/editormodel'; -import { createModelHistory } from '../../model/history'; -import { MMELRepo, RepoIndex } from '../../model/repo'; -import { EditorState } from '../../model/States'; -import { addExisingProcessToPage } from '../../utils/ModelAddComponentHandler'; -import ModelEditor from '../maineditor'; +import { addToLog, ChangeLog } from '@/smart/model/changelog'; +import { EditorAction, useEditorState } from '@/smart/model/editor/state'; +import { EditorModel, isEditorProcess } from '@/smart/model/editormodel'; +import { createModelHistory } from '@/smart/model/history'; +import { MMELRepo, RepoIndex } from '@/smart/model/repo'; +import { EditorState } from '@/smart/model/States'; +import { addExisingProcessToPage } from '@/smart/utils/ModelAddComponentHandler'; +import ModelEditor from '@/smart/ui/maineditor'; const EditWrapper: React.FC<{ isVisible: boolean; diff --git a/packages/legacy/src/smart/ui/editreference/DocumentReferenceView.tsx b/packages/legacy/src/smart/ui/editreference/DocumentReferenceView.tsx index fbe94c1c..e0e4f045 100644 --- a/packages/legacy/src/smart/ui/editreference/DocumentReferenceView.tsx +++ b/packages/legacy/src/smart/ui/editreference/DocumentReferenceView.tsx @@ -1,9 +1,9 @@ import { ControlGroup } from '@blueprintjs/core'; import Workspace from '@riboseinc/paneron-extension-kit/widgets/Workspace'; import React, { useEffect } from 'react'; -import { MMELDocument } from '../../model/document'; -import { RefTextSelection } from '../../model/selectionImport'; -import SMARTDocumentView from '../mapper/document/DocumentView'; +import { MMELDocument } from '@/smart/model/document'; +import { RefTextSelection } from '@/smart/model/selectionImport'; +import SMARTDocumentView from '@/smart/ui/mapper/document/DocumentView'; const DocumentReferenceView: React.FC<{ className?: string; diff --git a/packages/legacy/src/smart/ui/editreference/ModelReferenceView.tsx b/packages/legacy/src/smart/ui/editreference/ModelReferenceView.tsx index 0e7f49ee..cd715279 100644 --- a/packages/legacy/src/smart/ui/editreference/ModelReferenceView.tsx +++ b/packages/legacy/src/smart/ui/editreference/ModelReferenceView.tsx @@ -12,8 +12,8 @@ import { react_flow_container_layout, sidebar_layout, } from '../../../css/layout'; -import { MGDButtonType } from '../../../css/MGDButton'; -import MGDButton from '../../MGDComponents/MGDButton'; +import { MGDButtonType } from '@/css/MGDButton'; +import MGDButton from '@/smart/MGDComponents/MGDButton'; import { addToHistory, createPageHistory, @@ -27,19 +27,19 @@ import { getEditorReferenceFlowElementsFrom, ModelWrapper, } from '../../model/modelwrapper'; -import { MMELRepo, RepoIndex } from '../../model/repo'; -import { EdgeTypes, NodeTypes } from '../../model/States'; +import { MMELRepo, RepoIndex } from '@/smart/model/repo'; +import { EdgeTypes, NodeTypes } from '@/smart/model/States'; import { getHighlightedStyleById, getHighlightedSVGColorById, SearchResultStyles, } from '../../utils/SearchFunctions'; -import LegendPane from '../common/description/LegendPane'; -import { DataVisibilityButton, IdVisibleButton } from '../control/buttons'; -import RepoBreadcrumb from '../common/description/RepoBreadcrumb'; -import { SelectedNodeDescription } from '../sidebar/selected'; -import { EditorModel } from '../../model/editormodel'; -import SearchComponentPane from '../sidebar/search'; +import LegendPane from '@/smart/ui/common/description/LegendPane'; +import { DataVisibilityButton, IdVisibleButton } from '@/smart/ui/control/buttons'; +import RepoBreadcrumb from '@/smart/ui/common/description/RepoBreadcrumb'; +import { SelectedNodeDescription } from '@/smart/ui/sidebar/selected'; +import { EditorModel } from '@/smart/model/editormodel'; +import SearchComponentPane from '@/smart/ui/sidebar/search'; const ModelReferenceView: React.FC<{ className?: string; diff --git a/packages/legacy/src/smart/ui/flowui/NodeIDField.tsx b/packages/legacy/src/smart/ui/flowui/NodeIDField.tsx index 9387c9eb..3ec38c4e 100644 --- a/packages/legacy/src/smart/ui/flowui/NodeIDField.tsx +++ b/packages/legacy/src/smart/ui/flowui/NodeIDField.tsx @@ -1,6 +1,6 @@ import { Text } from '@blueprintjs/core'; import React from 'react'; -import { CSSROOTVARIABLES } from '../../../css/root.css'; +import { CSSROOTVARIABLES } from '@/css/root.css'; const NodeIDField: React.FC<{ nodeid: string; wide?: boolean }> = function ({ nodeid, diff --git a/packages/legacy/src/smart/ui/flowui/edgeUI.tsx b/packages/legacy/src/smart/ui/flowui/edgeUI.tsx index b733a1a3..a8830051 100644 --- a/packages/legacy/src/smart/ui/flowui/edgeUI.tsx +++ b/packages/legacy/src/smart/ui/flowui/edgeUI.tsx @@ -8,8 +8,8 @@ import { getBezierPath, Position, } from 'react-flow-renderer'; -import { CSSROOTVARIABLES } from '../../../css/root.css'; -import { DataLinkNodeData, EdgePackage } from '../../model/FlowContainer'; +import { CSSROOTVARIABLES } from '@/css/root.css'; +import { DataLinkNodeData, EdgePackage } from '@/smart/model/FlowContainer'; const SandyBrown = CSSROOTVARIABLES['--colour--sandy-brown']; const Black = CSSROOTVARIABLES['--colour--black']; diff --git a/packages/legacy/src/smart/ui/flowui/nodeUI.tsx b/packages/legacy/src/smart/ui/flowui/nodeUI.tsx index 33361645..e236be37 100644 --- a/packages/legacy/src/smart/ui/flowui/nodeUI.tsx +++ b/packages/legacy/src/smart/ui/flowui/nodeUI.tsx @@ -9,7 +9,7 @@ import { isEditorRegistry, isMMELTable, } from '../../model/editormodel'; -import { NodeCallBack } from '../../model/FlowContainer'; +import { NodeCallBack } from '@/smart/model/FlowContainer'; import { DatacubeShape, EgateShape, @@ -30,22 +30,22 @@ import { shameLabelShort, tooltipLabel, } from '../../../css/shame'; -import { flownodeTopLeftButtonLayout } from '../../../css/layout'; -import PopoverWrapper from '../popover/PopoverWrapper'; -import ViewMappingbutton from '../mapper/viewmapbutton'; -import ViewWorkspaceButton from '../workspace/ViewDataWorkspaceButton'; +import { flownodeTopLeftButtonLayout } from '@/css/layout'; +import PopoverWrapper from '@/smart/ui/popover/PopoverWrapper'; +import ViewMappingbutton from '@/smart/ui/mapper/viewmapbutton'; +import ViewWorkspaceButton from '@/smart/ui/workspace/ViewDataWorkspaceButton'; import { Button, Classes, Dialog, Icon } from '@blueprintjs/core'; -import NodeIDField from './NodeIDField'; +import NodeIDField from '@/smart/ui/flowui/NodeIDField'; import { MMELFigure, MMELTable, } from '@paneron/libmmel/interface/supportinterface'; -import NonTextReferenceList from '../popover/NonTextReferenceList'; -import TableViewer from '../common/description/TableViewer'; -import FigureViewer from '../common/description/FigureViewer'; -import LinksList from '../popover/LinksList'; -import { handleCSS } from '../../../css/visual'; -import NodeComment from '../comment/NodeComment'; +import NonTextReferenceList from '@/smart/ui/popover/NonTextReferenceList'; +import TableViewer from '@/smart/ui/common/description/TableViewer'; +import FigureViewer from '@/smart/ui/common/description/FigureViewer'; +import LinksList from '@/smart/ui/popover/LinksList'; +import { handleCSS } from '@/css/visual'; +import NodeComment from '@/smart/ui/comment/NodeComment'; export const Datacube: FC = function ({ data }) { const node = data as EditorNode; diff --git a/packages/legacy/src/smart/ui/flowui/shapes.tsx b/packages/legacy/src/smart/ui/flowui/shapes.tsx index 536a1edb..42685e8d 100644 --- a/packages/legacy/src/smart/ui/flowui/shapes.tsx +++ b/packages/legacy/src/smart/ui/flowui/shapes.tsx @@ -1,9 +1,9 @@ import { SerializedStyles } from '@emotion/react'; import React from 'react'; import { RefObject } from 'react'; -import { mgdLabel } from '../../../css/form'; -import MGDProcessBox from '../../MGDComponents/MGDProcessBox'; -import { ModelType } from '../../model/editormodel'; +import { mgdLabel } from '@/css/form'; +import MGDProcessBox from '@/smart/MGDComponents/MGDProcessBox'; +import { ModelType } from '@/smart/model/editormodel'; import { DragAndDropImportRefType, DragAndDropMappingType, diff --git a/packages/legacy/src/smart/ui/maindocedit.tsx b/packages/legacy/src/smart/ui/maindocedit.tsx index 52a0aba1..2e17fff8 100644 --- a/packages/legacy/src/smart/ui/maindocedit.tsx +++ b/packages/legacy/src/smart/ui/maindocedit.tsx @@ -1,9 +1,9 @@ import Workspace from '@riboseinc/paneron-extension-kit/widgets/Workspace'; import React, { useState } from 'react'; -import { MMELDocument } from '../model/document'; -import { createNewMMELDocument } from '../utils/EditorFactory'; -import SMARTDocumentEdit from './doc/SMARTDocumentEdit'; -import DocEditToolbar from './menu/DocEditToolbar'; +import { MMELDocument } from '@/smart/model/document'; +import { createNewMMELDocument } from '@/smart/utils/EditorFactory'; +import SMARTDocumentEdit from '@/smart/ui/doc/SMARTDocumentEdit'; +import DocEditToolbar from '@/smart/ui/menu/DocEditToolbar'; const DocumentEdit: React.FC<{ isVisible: boolean; diff --git a/packages/legacy/src/smart/ui/maineditor.tsx b/packages/legacy/src/smart/ui/maineditor.tsx index f397c82c..a193c94e 100644 --- a/packages/legacy/src/smart/ui/maineditor.tsx +++ b/packages/legacy/src/smart/ui/maineditor.tsx @@ -51,24 +51,24 @@ import { NodeTypes, ReferenceContent, } from '../model/States'; -import { EditorDataClass } from '../model/editormodel'; -import EditorFileMenu from './menu/EditorFileMenu'; +import { EditorDataClass } from '@/smart/model/editormodel'; +import EditorFileMenu from '@/smart/ui/menu/EditorFileMenu'; import { DataVisibilityButton, EdgeEditButton, IdVisibleButton, } from './control/buttons'; -import NewComponentPane from './control/newComponentPane'; +import NewComponentPane from '@/smart/ui/control/newComponentPane'; import { DOCVERSION, DragAndDropImportRefType, DragAndDropNewFormatType, NewComponentTypes, } from '../utils/constants'; -import { getAddComponentAction } from '../utils/ModelAddComponentHandler'; -import { EdgePackage } from '../model/FlowContainer'; -import MGDButton from '../MGDComponents/MGDButton'; -import { MGDButtonType } from '../../css/MGDButton'; +import { getAddComponentAction } from '@/smart/utils/ModelAddComponentHandler'; +import { EdgePackage } from '@/smart/model/FlowContainer'; +import MGDButton from '@/smart/MGDComponents/MGDButton'; +import { MGDButtonType } from '@/css/MGDButton'; import { dialog_layout, dialog_layout__full, @@ -76,21 +76,21 @@ import { react_flow_container_layout, sidebar_layout, } from '../../css/layout'; -import { checkId, genDCIdByRegId } from '../utils/ModelFunctions'; -import * as Logger from '../../lib/logger'; -import LegendPane from './common/description/LegendPane'; +import { checkId, genDCIdByRegId } from '@/smart/utils/ModelFunctions'; +import * as Logger from '@/lib/logger'; +import LegendPane from '@/smart/ui/common/description/LegendPane'; import { getHighlightedStyleById, getHighlightedSVGColorById, SearchResultStyles, } from '../utils/SearchFunctions'; import { MMELRole } from '@paneron/libmmel/interface/supportinterface'; -import ModelReferenceView from './editreference/ModelReferenceView'; -import DocumentReferenceView from './editreference/DocumentReferenceView'; -import { RefTextSelection } from '../model/selectionImport'; -import ImportFromSelectionButton from './popover/ImportFromSelectionButton'; +import ModelReferenceView from '@/smart/ui/editreference/ModelReferenceView'; +import DocumentReferenceView from '@/smart/ui/editreference/DocumentReferenceView'; +import { RefTextSelection } from '@/smart/model/selectionImport'; +import ImportFromSelectionButton from '@/smart/ui/popover/ImportFromSelectionButton'; import { DataType } from '@paneron/libmmel/interface/baseinterface'; -import EditorEditMenu from './menu/EditorEditMenu'; +import EditorEditMenu from '@/smart/ui/menu/EditorEditMenu'; import { COMMITMSG, getPathByNS, @@ -98,16 +98,16 @@ import { MMELToSerializable, RepoFileType, } from '../utils/repo/io'; -import { MMELJSON } from '../model/json'; -import { MMELRepo, RepoIndex, repoIndexPath } from '../model/repo'; -import { setValueToIndex } from '../utils/repo/CommonFunctions'; -import EditorReferenceMenuButton from './menu/EditorReferenceMenuButton'; -import { indexModel } from '../model/mapmodel'; -import { MMELDocument } from '../model/document'; -import { LoadingContainer } from './common/Loading'; -import { createNewComment } from '../utils/Comments'; -import EditorViewMenu from './menu/EditorViewMenu'; -import { EditorAction } from '../model/editor/state'; +import { MMELJSON } from '@/smart/model/json'; +import { MMELRepo, RepoIndex, repoIndexPath } from '@/smart/model/repo'; +import { setValueToIndex } from '@/smart/utils/repo/CommonFunctions'; +import EditorReferenceMenuButton from '@/smart/ui/menu/EditorReferenceMenuButton'; +import { indexModel } from '@/smart/model/mapmodel'; +import { MMELDocument } from '@/smart/model/document'; +import { LoadingContainer } from '@/smart/ui/common/Loading'; +import { createNewComment } from '@/smart/utils/Comments'; +import EditorViewMenu from '@/smart/ui/menu/EditorViewMenu'; +import { EditorAction } from '@/smart/model/editor/state'; import { addCommentCommand, deleteCommentCommand, @@ -123,15 +123,15 @@ import { newEdgeCommand, removeEdgeCommand, } from '../model/editor/commands/page'; -import SearchComponentPane from './sidebar/search'; -import { SelectedNodeDescription } from './sidebar/selected'; -import BasicSettingPane from './control/settings'; -import { addRoleCommand } from '../model/editor/commands/role'; -import { addRegistryCommand } from '../model/editor/commands/data'; -import { RegistryCombined } from '../model/editor/components/element/registry'; -import { importElmCommand } from '../model/editor/commands/import'; -import { ChangeLog } from '../model/changelog'; -import ChangeLogDialog from './control/ChangeLogViewer'; +import SearchComponentPane from '@/smart/ui/sidebar/search'; +import { SelectedNodeDescription } from '@/smart/ui/sidebar/selected'; +import BasicSettingPane from '@/smart/ui/control/settings'; +import { addRoleCommand } from '@/smart/model/editor/commands/role'; +import { addRegistryCommand } from '@/smart/model/editor/commands/data'; +import { RegistryCombined } from '@/smart/model/editor/components/element/registry'; +import { importElmCommand } from '@/smart/model/editor/commands/import'; +import { ChangeLog } from '@/smart/model/changelog'; +import ChangeLogDialog from '@/smart/ui/control/ChangeLogViewer'; const ModelEditor: React.FC<{ isVisible: boolean; diff --git a/packages/legacy/src/smart/ui/mainmapper.tsx b/packages/legacy/src/smart/ui/mainmapper.tsx index cec0d97a..bef58a4c 100644 --- a/packages/legacy/src/smart/ui/mainmapper.tsx +++ b/packages/legacy/src/smart/ui/mainmapper.tsx @@ -10,7 +10,7 @@ import React, { useState, } from 'react'; -import ModelDiagram from './mapper/ModelDiagram'; +import ModelDiagram from '@/smart/ui/mapper/ModelDiagram'; import { EditorModel, EditorSubprocess, @@ -34,16 +34,16 @@ import { IToastProps, Toaster, } from '@blueprintjs/core'; -import MapperFileMenu from './menu/MapperFileMenu'; -import { createPageHistory, PageHistory } from '../model/history'; +import MapperFileMenu from '@/smart/ui/menu/MapperFileMenu'; +import { createPageHistory, PageHistory } from '@/smart/model/history'; import { isModelWrapper, MapperSelectedInterface, MapperState, MapperViewOption, } from '../model/States'; -import { createNewEditorModel } from '../utils/EditorFactory'; -import { createEditorModelWrapper, ModelWrapper } from '../model/modelwrapper'; +import { createNewEditorModel } from '@/smart/utils/EditorFactory'; +import { createEditorModelWrapper, ModelWrapper } from '@/smart/model/modelwrapper'; import { calculateMapping, filterMappings, @@ -51,15 +51,15 @@ import { MapDiffEdgeResult, mergeMapProfiles, } from '../utils/map/MappingCalculator'; -import MappingCanvus from './mapper/MappingsCanvus'; -import MapperOptionMenu from './menu/mapperOptionMenu'; -import { EditMPropsInterface } from './dialog/dialogs'; -import { multi_model_container } from '../../css/layout'; -import { vertical_line } from '../../css/components'; -import { findPageContainingElement } from '../utils/SearchFunctions'; -import { getDocumentMetaById } from '../utils/DocumentFunctions'; -import { getNamespace } from '../utils/ModelFunctions'; -import * as Logger from '../../lib/logger'; +import MappingCanvus from '@/smart/ui/mapper/MappingsCanvus'; +import MapperOptionMenu from '@/smart/ui/menu/mapperOptionMenu'; +import { EditMPropsInterface } from '@/smart/ui/dialog/dialogs'; +import { multi_model_container } from '@/css/layout'; +import { vertical_line } from '@/css/components'; +import { findPageContainingElement } from '@/smart/utils/SearchFunctions'; +import { getDocumentMetaById } from '@/smart/utils/DocumentFunctions'; +import { getNamespace } from '@/smart/utils/ModelFunctions'; +import * as Logger from '@/lib/logger'; import { COMMITMSG, getPathByNS, @@ -68,16 +68,16 @@ import { RepoFileType, } from '../utils/repo/io'; import { DatasetContext } from '@riboseinc/paneron-extension-kit/context'; -import { MMELJSON } from '../model/json'; -import { MMELRepo, RepoIndex } from '../model/repo'; -import RepoMapMainView from './mapper/repo/RepoMapMainView'; -import { LoadingContainer } from './common/Loading'; -import { MMELDocument } from '../model/document'; -import MapperCompareMenu from './menu/MapperCompareMenu'; -import MapperDialog from './popover/MapperDialog'; -import { calEdgeDiff } from '../utils/map/MappingDiff'; -import { DOCVERSION, MAPVERSION } from '../utils/constants'; -import MenuButton from './menu/MenuButton'; +import { MMELJSON } from '@/smart/model/json'; +import { MMELRepo, RepoIndex } from '@/smart/model/repo'; +import RepoMapMainView from '@/smart/ui/mapper/repo/RepoMapMainView'; +import { LoadingContainer } from '@/smart/ui/common/Loading'; +import { MMELDocument } from '@/smart/model/document'; +import MapperCompareMenu from '@/smart/ui/menu/MapperCompareMenu'; +import MapperDialog from '@/smart/ui/popover/MapperDialog'; +import { calEdgeDiff } from '@/smart/utils/map/MappingDiff'; +import { DOCVERSION, MAPVERSION } from '@/smart/utils/constants'; +import MenuButton from '@/smart/ui/menu/MenuButton'; const initModel = createNewEditorModel(); const initModelWrapper = createEditorModelWrapper(initModel); diff --git a/packages/legacy/src/smart/ui/mainviewer.tsx b/packages/legacy/src/smart/ui/mainviewer.tsx index 8a8d43b2..a9091d7b 100644 --- a/packages/legacy/src/smart/ui/mainviewer.tsx +++ b/packages/legacy/src/smart/ui/mainviewer.tsx @@ -27,43 +27,43 @@ import { popPage, RepoHistory, } from '../model/history'; -import { EdgeTypes, FunModel, NodeTypes, ViewerOption } from '../model/States'; -import MGDButton from '../MGDComponents/MGDButton'; -import { MGDButtonType } from '../../css/MGDButton'; -import { react_flow_container_layout, sidebar_layout } from '../../css/layout'; -import { DataVisibilityButton, IdVisibleButton } from './control/buttons'; +import { EdgeTypes, FunModel, NodeTypes, ViewerOption } from '@/smart/model/States'; +import MGDButton from '@/smart/MGDComponents/MGDButton'; +import { MGDButtonType } from '@/css/MGDButton'; +import { react_flow_container_layout, sidebar_layout } from '@/css/layout'; +import { DataVisibilityButton, IdVisibleButton } from '@/smart/ui/control/buttons'; import { getHighlightedStyleById, getHighlightedSVGColorById, } from '../utils/SearchFunctions'; import { SidebarBlockConfig } from '@riboseinc/paneron-extension-kit/widgets/Sidebar/Block'; -import ViewToolMenu from './menu/ViewToolMenu'; -import MeasureCheckPane from './measurement/MeasurementValidationPane'; -import { ViewFunctionInterface } from '../model/ViewFunctionModel'; -import LegendPane from './common/description/LegendPane'; -import { loadPlugin } from './application/plugin'; -import { getNamespace } from '../utils/ModelFunctions'; -import * as Logger from '../../lib/logger'; -import ChecklistConfigPane from './checklist/CheckListConfigPane'; +import ViewToolMenu from '@/smart/ui/menu/ViewToolMenu'; +import MeasureCheckPane from '@/smart/ui/measurement/MeasurementValidationPane'; +import { ViewFunctionInterface } from '@/smart/model/ViewFunctionModel'; +import LegendPane from '@/smart/ui/common/description/LegendPane'; +import { loadPlugin } from '@/smart/ui/application/plugin'; +import { getNamespace } from '@/smart/utils/ModelFunctions'; +import * as Logger from '@/lib/logger'; +import ChecklistConfigPane from '@/smart/ui/checklist/CheckListConfigPane'; import { MMELProvision, MMELReference, } from '@paneron/libmmel/interface/supportinterface'; import { MMELDataAttribute } from '@paneron/libmmel/interface/datainterface'; -import SimulationPane from './sidebar/SimulationPane'; -import RegistrySummary from './summary/RegistrySummary'; -import ProvisionSettings from './summary/ProvisionSettings'; -import VersionTrackerSettingPane from './version/VersionTrackerSetting'; -import { MMELRepo, RepoIndex } from '../model/repo'; -import RepoBreadcrumb from './common/description/RepoBreadcrumb'; -import ViewOptionMenu from './menu/ViewOptionMenu'; -import MenuButton from './menu/MenuButton'; -import { EditorModel } from '../model/editormodel'; -import { HistoryAction, useHistory } from '../model/editor/history'; -import { getBreadcrumbs } from './common/description/fields'; -import { SelectedNodeDescription } from './sidebar/selected'; -import SearchComponentPane from './sidebar/search'; +import SimulationPane from '@/smart/ui/sidebar/SimulationPane'; +import RegistrySummary from '@/smart/ui/summary/RegistrySummary'; +import ProvisionSettings from '@/smart/ui/summary/ProvisionSettings'; +import VersionTrackerSettingPane from '@/smart/ui/version/VersionTrackerSetting'; +import { MMELRepo, RepoIndex } from '@/smart/model/repo'; +import RepoBreadcrumb from '@/smart/ui/common/description/RepoBreadcrumb'; +import ViewOptionMenu from '@/smart/ui/menu/ViewOptionMenu'; +import MenuButton from '@/smart/ui/menu/MenuButton'; +import { EditorModel } from '@/smart/model/editormodel'; +import { HistoryAction, useHistory } from '@/smart/model/editor/history'; +import { getBreadcrumbs } from '@/smart/ui/common/description/fields'; +import { SelectedNodeDescription } from '@/smart/ui/sidebar/selected'; +import SearchComponentPane from '@/smart/ui/sidebar/search'; export enum FunctionPage { Simulation = 'simulation', diff --git a/packages/legacy/src/smart/ui/mapper/AutoMapper.tsx b/packages/legacy/src/smart/ui/mapper/AutoMapper.tsx index a93b6552..2ecc9070 100644 --- a/packages/legacy/src/smart/ui/mapper/AutoMapper.tsx +++ b/packages/legacy/src/smart/ui/mapper/AutoMapper.tsx @@ -2,13 +2,13 @@ import { Button, IToastProps, Text } from '@blueprintjs/core'; import { DatasetContext } from '@riboseinc/paneron-extension-kit/context'; import React from 'react'; import { CSSProperties, useContext, useState } from 'react'; -import MGDDisplayPane from '../../MGDComponents/MGDDisplayPane'; -import MGDHeading from '../../MGDComponents/MGDHeading'; -import { MapProfile } from '../../model/mapmodel'; -import { ModelWrapper } from '../../model/modelwrapper'; -import { handleMappingOpen, handleModelOpen } from '../../utils/IOFunctions'; -import { mapAI } from '../../utils/map/MappingCalculator'; -import { getNamespace } from '../../utils/ModelFunctions'; +import MGDDisplayPane from '@/smart/MGDComponents/MGDDisplayPane'; +import MGDHeading from '@/smart/MGDComponents/MGDHeading'; +import { MapProfile } from '@/smart/model/mapmodel'; +import { ModelWrapper } from '@/smart/model/modelwrapper'; +import { handleMappingOpen, handleModelOpen } from '@/smart/utils/IOFunctions'; +import { mapAI } from '@/smart/utils/map/MappingCalculator'; +import { getNamespace } from '@/smart/utils/ModelFunctions'; const centeredLayout: CSSProperties = { display : 'flex', diff --git a/packages/legacy/src/smart/ui/mapper/MappingsCanvus.tsx b/packages/legacy/src/smart/ui/mapper/MappingsCanvus.tsx index 5f8322e9..3719e1ab 100644 --- a/packages/legacy/src/smart/ui/mapper/MappingsCanvus.tsx +++ b/packages/legacy/src/smart/ui/mapper/MappingsCanvus.tsx @@ -4,8 +4,8 @@ import { MapDiffType, MapDiffValues, } from '../../utils/map/MappingCalculator'; -import { mgdCanvas } from '../../../css/layout'; -import { LegendInterface } from '../../model/States'; +import { mgdCanvas } from '@/css/layout'; +import { LegendInterface } from '@/smart/model/States'; export const MapDiffStyles: Record = { 'new' : { label : 'New mapping', color : 'green' }, diff --git a/packages/legacy/src/smart/ui/mapper/ModelDiagram.tsx b/packages/legacy/src/smart/ui/mapper/ModelDiagram.tsx index ee63a4e8..32f64a44 100644 --- a/packages/legacy/src/smart/ui/mapper/ModelDiagram.tsx +++ b/packages/legacy/src/smart/ui/mapper/ModelDiagram.tsx @@ -7,10 +7,10 @@ import ReactFlow, { OnLoadParams, ReactFlowProvider, } from 'react-flow-renderer'; -import { reactFlowContainerLayout } from '../../../css/layout'; -import { MGDButtonType } from '../../../css/MGDButton'; -import MGDButton from '../../MGDComponents/MGDButton'; -import { EditorModel, ModelType } from '../../model/editormodel'; +import { reactFlowContainerLayout } from '@/css/layout'; +import { MGDButtonType } from '@/css/MGDButton'; +import MGDButton from '@/smart/MGDComponents/MGDButton'; +import { EditorModel, ModelType } from '@/smart/model/editormodel'; import { addToHistory, createPageHistory, @@ -30,7 +30,7 @@ import { MapperViewOption, NodeTypes, } from '../../model/States'; -import ComponentSummary from '../popover/ComponentSummary'; +import ComponentSummary from '@/smart/ui/popover/ComponentSummary'; import { buildHistoryMap, indexModel, @@ -44,16 +44,16 @@ import { MappingSourceStyles, MapResultType, } from '../../utils/map/MappingCalculator'; -import LegendPane from '../common/description/LegendPane'; -import MappingPartyList from './mappartylist'; -import { handleModelOpen } from '../../utils/IOFunctions'; -import { MMELDocument } from '../../model/document'; -import SMARTDocumentView from './document/DocumentView'; +import LegendPane from '@/smart/ui/common/description/LegendPane'; +import MappingPartyList from '@/smart/ui/mapper/mappartylist'; +import { handleModelOpen } from '@/smart/utils/IOFunctions'; +import { MMELDocument } from '@/smart/model/document'; +import SMARTDocumentView from '@/smart/ui/mapper/document/DocumentView'; import { Popover2 } from '@blueprintjs/popover2'; -import MapperDocumentMenu from '../menu/MapperDocumentMenu'; -import RepoMapRefMenus from './repo/RepoMapRefMenu'; -import { MMELRepo, RepoIndex } from '../../model/repo'; -import { MapDiffStyles } from './MappingsCanvus'; +import MapperDocumentMenu from '@/smart/ui/menu/MapperDocumentMenu'; +import RepoMapRefMenus from '@/smart/ui/mapper/repo/RepoMapRefMenu'; +import { MMELRepo, RepoIndex } from '@/smart/model/repo'; +import { MapDiffStyles } from '@/smart/ui/mapper/MappingsCanvus'; import { MappingDiffResultStyles, MappingDiffSourceStyles, diff --git a/packages/legacy/src/smart/ui/mapper/document/DocumentView.tsx b/packages/legacy/src/smart/ui/mapper/document/DocumentView.tsx index cd2744c6..7627b063 100644 --- a/packages/legacy/src/smart/ui/mapper/document/DocumentView.tsx +++ b/packages/legacy/src/smart/ui/mapper/document/DocumentView.tsx @@ -1,9 +1,9 @@ import React from 'react'; import { useMemo } from 'react'; -import { MMELDocument } from '../../../model/document'; -import { MapSet } from '../../../model/mapmodel'; -import { calculateDocumentMapping } from '../../../utils/DocumentFunctions'; -import SectionView from './SectionView'; +import { MMELDocument } from '@/smart/model/document'; +import { MapSet } from '@/smart/model/mapmodel'; +import { calculateDocumentMapping } from '@/smart/utils/DocumentFunctions'; +import SectionView from '@/smart/ui/mapper/document/SectionView'; const SMARTDocumentView: React.FC<{ mmelDoc: MMELDocument; diff --git a/packages/legacy/src/smart/ui/mapper/document/ParagraphView.tsx b/packages/legacy/src/smart/ui/mapper/document/ParagraphView.tsx index 7a53d314..df758bb8 100644 --- a/packages/legacy/src/smart/ui/mapper/document/ParagraphView.tsx +++ b/packages/legacy/src/smart/ui/mapper/document/ParagraphView.tsx @@ -4,7 +4,7 @@ import { DocParagraph, DocStatement, } from '../../../model/document'; -import StatementView from './StatementView'; +import StatementView from '@/smart/ui/mapper/document/StatementView'; const ParagraphView: React.FC<{ para: DocParagraph; diff --git a/packages/legacy/src/smart/ui/mapper/document/SectionView.tsx b/packages/legacy/src/smart/ui/mapper/document/SectionView.tsx index 1c66c11d..3b230026 100644 --- a/packages/legacy/src/smart/ui/mapper/document/SectionView.tsx +++ b/packages/legacy/src/smart/ui/mapper/document/SectionView.tsx @@ -1,6 +1,6 @@ import React from 'react'; -import { DocMapIndex, DocSection, DocStatement } from '../../../model/document'; -import ParagraphView from './ParagraphView'; +import { DocMapIndex, DocSection, DocStatement } from '@/smart/model/document'; +import ParagraphView from '@/smart/ui/mapper/document/ParagraphView'; const SectionView: React.FC<{ sec: DocSection; diff --git a/packages/legacy/src/smart/ui/mapper/document/StatementView.tsx b/packages/legacy/src/smart/ui/mapper/document/StatementView.tsx index bc7a16f9..425b7ab7 100644 --- a/packages/legacy/src/smart/ui/mapper/document/StatementView.tsx +++ b/packages/legacy/src/smart/ui/mapper/document/StatementView.tsx @@ -2,8 +2,8 @@ import { Button } from '@blueprintjs/core'; import { Popover2 } from '@blueprintjs/popover2'; import React from 'react'; import { useState } from 'react'; -import { DocStatement } from '../../../model/document'; -import { DragAndDropMappingType } from '../../../utils/constants'; +import { DocStatement } from '@/smart/model/document'; +import { DragAndDropMappingType } from '@/smart/utils/constants'; const StatementView: React.FC<{ statement: DocStatement; diff --git a/packages/legacy/src/smart/ui/mapper/mappartylist.tsx b/packages/legacy/src/smart/ui/mapper/mappartylist.tsx index 7c39aaac..cfc8824e 100644 --- a/packages/legacy/src/smart/ui/mapper/mappartylist.tsx +++ b/packages/legacy/src/smart/ui/mapper/mappartylist.tsx @@ -1,13 +1,13 @@ import React from 'react'; -import { mgdLabel } from '../../../css/form'; -import { popoverPanelContainer } from '../../../css/layout'; -import { ModelType } from '../../model/editormodel'; -import { MappingType } from '../../model/mapmodel'; +import { mgdLabel } from '@/css/form'; +import { popoverPanelContainer } from '@/css/layout'; +import { ModelType } from '@/smart/model/editormodel'; +import { MappingType } from '@/smart/model/mapmodel'; import { findImpMapPartners, findRefMapPartners, } from '../../utils/map/MappingCalculator'; -import { EditMappingButton, MapPartnerNavigateButton } from '../common/buttons'; +import { EditMappingButton, MapPartnerNavigateButton } from '@/smart/ui/common/buttons'; const MappingPartyList: React.FC<{ id: string; diff --git a/packages/legacy/src/smart/ui/mapper/repo/RepoAutoMapper.tsx b/packages/legacy/src/smart/ui/mapper/repo/RepoAutoMapper.tsx index 8ce2ad23..fd275104 100644 --- a/packages/legacy/src/smart/ui/mapper/repo/RepoAutoMapper.tsx +++ b/packages/legacy/src/smart/ui/mapper/repo/RepoAutoMapper.tsx @@ -2,26 +2,26 @@ import { Button, ButtonGroup } from '@blueprintjs/core'; import { DatasetContext } from '@riboseinc/paneron-extension-kit/context'; import React, { useContext, useMemo, useState } from 'react'; import { Edge, Elements, Node } from 'react-flow-renderer'; -import MGDDisplayPane from '../../../MGDComponents/MGDDisplayPane'; -import { MMELJSON } from '../../../model/json'; -import { MapProfile } from '../../../model/mapmodel'; +import MGDDisplayPane from '@/smart/MGDComponents/MGDDisplayPane'; +import { MMELJSON } from '@/smart/model/json'; +import { MapProfile } from '@/smart/model/mapmodel'; import { createEditorModelWrapper, ModelWrapper, } from '../../../model/modelwrapper'; -import { MMELRepo, RepoIndex } from '../../../model/repo'; -import { repoAutoMapExplore, repoMapAI } from '../../../utils/map/AutoMap'; -import * as Logger from '../../../../lib/logger'; +import { MMELRepo, RepoIndex } from '@/smart/model/repo'; +import { repoAutoMapExplore, repoMapAI } from '@/smart/utils/map/AutoMap'; +import * as Logger from '@/lib/logger'; import { getAllRepoMaps, getAllRepoModels, getRepoItemDesc, } from '../../../utils/repo/CommonFunctions'; -import { JSONToMMEL } from '../../../utils/repo/io'; -import { createAutoMapNode } from './automapper/AutoMapNode'; -import AutoMapLoading from './automapper/calculating'; -import RepoLoading from './automapper/loading'; -import RepoAutoMapView from './automapper/mapview'; +import { JSONToMMEL } from '@/smart/utils/repo/io'; +import { createAutoMapNode } from '@/smart/ui/mapper/repo/automapper/AutoMapNode'; +import AutoMapLoading from '@/smart/ui/mapper/repo/automapper/calculating'; +import RepoLoading from '@/smart/ui/mapper/repo/automapper/loading'; +import RepoAutoMapView from '@/smart/ui/mapper/repo/automapper/mapview'; type Status = 'initial' | 'run' | 'done'; diff --git a/packages/legacy/src/smart/ui/mapper/repo/RepoExternalFileMenu.tsx b/packages/legacy/src/smart/ui/mapper/repo/RepoExternalFileMenu.tsx index 34f12ec8..77ba3de3 100644 --- a/packages/legacy/src/smart/ui/mapper/repo/RepoExternalFileMenu.tsx +++ b/packages/legacy/src/smart/ui/mapper/repo/RepoExternalFileMenu.tsx @@ -2,9 +2,9 @@ import { Menu, MenuItem } from '@blueprintjs/core'; import { DatasetContext } from '@riboseinc/paneron-extension-kit/context'; import React from 'react'; import { useContext } from 'react'; -import { MMELDocument } from '../../../model/document'; -import { indexModel } from '../../../model/mapmodel'; -import { ModelWrapper } from '../../../model/modelwrapper'; +import { MMELDocument } from '@/smart/model/document'; +import { indexModel } from '@/smart/model/mapmodel'; +import { ModelWrapper } from '@/smart/model/modelwrapper'; import { FILE_TYPE, handleDocumentOpen, diff --git a/packages/legacy/src/smart/ui/mapper/repo/RepoIndexDiagram.tsx b/packages/legacy/src/smart/ui/mapper/repo/RepoIndexDiagram.tsx index bc31ff7c..626c5172 100644 --- a/packages/legacy/src/smart/ui/mapper/repo/RepoIndexDiagram.tsx +++ b/packages/legacy/src/smart/ui/mapper/repo/RepoIndexDiagram.tsx @@ -1,12 +1,12 @@ import React from 'react'; import { useMemo } from 'react'; import ReactFlow from 'react-flow-renderer'; -import { ModelWrapper } from '../../../model/modelwrapper'; -import { MMELRepo, RepoIndex } from '../../../model/repo'; -import { RepoLegend } from '../../../utils/repo/CommonFunctions'; -import { repoLinkExploreNode } from '../../../utils/repo/LinkAnalysis'; -import LegendPane from '../../common/description/LegendPane'; -import RepoEdge from '../../flowui/RepoEdge'; +import { ModelWrapper } from '@/smart/model/modelwrapper'; +import { MMELRepo, RepoIndex } from '@/smart/model/repo'; +import { RepoLegend } from '@/smart/utils/repo/CommonFunctions'; +import { repoLinkExploreNode } from '@/smart/utils/repo/LinkAnalysis'; +import LegendPane from '@/smart/ui/common/description/LegendPane'; +import RepoEdge from '@/smart/ui/flowui/RepoEdge'; const RepoIndexDiagram: React.FC<{ index: RepoIndex; diff --git a/packages/legacy/src/smart/ui/mapper/repo/RepoIndexMainView.tsx b/packages/legacy/src/smart/ui/mapper/repo/RepoIndexMainView.tsx index 305d4463..f5b86a01 100644 --- a/packages/legacy/src/smart/ui/mapper/repo/RepoIndexMainView.tsx +++ b/packages/legacy/src/smart/ui/mapper/repo/RepoIndexMainView.tsx @@ -1,15 +1,15 @@ import { DatasetContext } from '@riboseinc/paneron-extension-kit/context'; import React, { useContext, useMemo } from 'react'; -import { MMELJSON } from '../../../model/json'; +import { MMELJSON } from '@/smart/model/json'; import { createEditorModelWrapper, ModelWrapper, } from '../../../model/modelwrapper'; -import { MMELRepo, RepoIndex } from '../../../model/repo'; -import { getAllRepoModels } from '../../../utils/repo/CommonFunctions'; -import { JSONToMMEL } from '../../../utils/repo/io'; -import { LoadingScreen } from '../../common/Loading'; -import RepoIndexDiagram from './RepoIndexDiagram'; +import { MMELRepo, RepoIndex } from '@/smart/model/repo'; +import { getAllRepoModels } from '@/smart/utils/repo/CommonFunctions'; +import { JSONToMMEL } from '@/smart/utils/repo/io'; +import { LoadingScreen } from '@/smart/ui/common/Loading'; +import RepoIndexDiagram from '@/smart/ui/mapper/repo/RepoIndexDiagram'; const RepoIndexMainView: React.FC<{ repo?: MMELRepo; diff --git a/packages/legacy/src/smart/ui/mapper/repo/RepoInternalFileMenu.tsx b/packages/legacy/src/smart/ui/mapper/repo/RepoInternalFileMenu.tsx index 37da76db..d9e7b09b 100644 --- a/packages/legacy/src/smart/ui/mapper/repo/RepoInternalFileMenu.tsx +++ b/packages/legacy/src/smart/ui/mapper/repo/RepoInternalFileMenu.tsx @@ -1,6 +1,6 @@ import { Menu, MenuItem } from '@blueprintjs/core'; import React from 'react'; -import { RepoItemType } from '../../../model/repo'; +import { RepoItemType } from '@/smart/model/repo'; const RepoInternalFileMenu: React.FC<{ setType: (x: RepoItemType) => void; diff --git a/packages/legacy/src/smart/ui/mapper/repo/RepoMapDiagram.tsx b/packages/legacy/src/smart/ui/mapper/repo/RepoMapDiagram.tsx index ec46ca6b..984d0992 100644 --- a/packages/legacy/src/smart/ui/mapper/repo/RepoMapDiagram.tsx +++ b/packages/legacy/src/smart/ui/mapper/repo/RepoMapDiagram.tsx @@ -1,17 +1,17 @@ import React from 'react'; import { useMemo } from 'react'; import ReactFlow, { ReactFlowProvider } from 'react-flow-renderer'; -import { MapProfile } from '../../../model/mapmodel'; -import { MMELRepo, RepoIndex } from '../../../model/repo'; -import { MapperViewOption } from '../../../model/States'; -import { repoMapDiffNode } from '../../../utils/map/MappingDiff'; -import { repoMapExploreNode } from '../../../utils/map/RepoMap'; +import { MapProfile } from '@/smart/model/mapmodel'; +import { MMELRepo, RepoIndex } from '@/smart/model/repo'; +import { MapperViewOption } from '@/smart/model/States'; +import { repoMapDiffNode } from '@/smart/utils/map/MappingDiff'; +import { repoMapExploreNode } from '@/smart/utils/map/RepoMap'; import { RepoDiffLegend, RepoLegend, } from '../../../utils/repo/CommonFunctions'; -import LegendPane from '../../common/description/LegendPane'; -import RepoEdge from '../../flowui/RepoEdge'; +import LegendPane from '@/smart/ui/common/description/LegendPane'; +import RepoEdge from '@/smart/ui/flowui/RepoEdge'; const RepoMapDiagram: React.FC<{ index: RepoIndex; diff --git a/packages/legacy/src/smart/ui/mapper/repo/RepoMapMainView.tsx b/packages/legacy/src/smart/ui/mapper/repo/RepoMapMainView.tsx index 94302f09..7e315726 100644 --- a/packages/legacy/src/smart/ui/mapper/repo/RepoMapMainView.tsx +++ b/packages/legacy/src/smart/ui/mapper/repo/RepoMapMainView.tsx @@ -1,12 +1,12 @@ import { Button } from '@blueprintjs/core'; import { DatasetContext } from '@riboseinc/paneron-extension-kit/context'; import React, { useContext, useMemo } from 'react'; -import { MapProfile } from '../../../model/mapmodel'; -import { MMELRepo, RepoIndex } from '../../../model/repo'; -import { MapperViewOption } from '../../../model/States'; -import { getAllRepoMaps } from '../../../utils/repo/CommonFunctions'; -import { LoadingIcon } from '../../common/Loading'; -import RepoMapDiagram from './RepoMapDiagram'; +import { MapProfile } from '@/smart/model/mapmodel'; +import { MMELRepo, RepoIndex } from '@/smart/model/repo'; +import { MapperViewOption } from '@/smart/model/States'; +import { getAllRepoMaps } from '@/smart/utils/repo/CommonFunctions'; +import { LoadingIcon } from '@/smart/ui/common/Loading'; +import RepoMapDiagram from '@/smart/ui/mapper/repo/RepoMapDiagram'; const RepoMapMainView: React.FC<{ isVisible: boolean; diff --git a/packages/legacy/src/smart/ui/mapper/repo/RepoMapNode.tsx b/packages/legacy/src/smart/ui/mapper/repo/RepoMapNode.tsx index 774aa528..54820138 100644 --- a/packages/legacy/src/smart/ui/mapper/repo/RepoMapNode.tsx +++ b/packages/legacy/src/smart/ui/mapper/repo/RepoMapNode.tsx @@ -1,5 +1,5 @@ import { Button, Text } from '@blueprintjs/core'; -import { RepoItems } from '../../../model/repo'; +import { RepoItems } from '@/smart/model/repo'; import { Tooltip2 } from '@blueprintjs/popover2'; import React from 'react'; diff --git a/packages/legacy/src/smart/ui/mapper/repo/RepoMapRefMenu.tsx b/packages/legacy/src/smart/ui/mapper/repo/RepoMapRefMenu.tsx index 10f9300b..e18196c9 100644 --- a/packages/legacy/src/smart/ui/mapper/repo/RepoMapRefMenu.tsx +++ b/packages/legacy/src/smart/ui/mapper/repo/RepoMapRefMenu.tsx @@ -1,12 +1,12 @@ import { Popover2 } from '@blueprintjs/popover2'; import React, { useState } from 'react'; import { Button, Dialog } from '@blueprintjs/core'; -import RepoExternalFileMenu from './RepoExternalFileMenu'; -import { MMELDocument } from '../../../model/document'; -import { ModelWrapper } from '../../../model/modelwrapper'; -import RepoInternalFileMenu from './RepoInternalFileMenu'; -import { MMELRepo, RepoIndex, RepoItemType } from '../../../model/repo'; -import RepoItemSelector from '../../repo/RepoItemSelector'; +import RepoExternalFileMenu from '@/smart/ui/mapper/repo/RepoExternalFileMenu'; +import { MMELDocument } from '@/smart/model/document'; +import { ModelWrapper } from '@/smart/model/modelwrapper'; +import RepoInternalFileMenu from '@/smart/ui/mapper/repo/RepoInternalFileMenu'; +import { MMELRepo, RepoIndex, RepoItemType } from '@/smart/model/repo'; +import RepoItemSelector from '@/smart/ui/repo/RepoItemSelector'; const RepoMapRefMenus: React.FC<{ setModelWrapper: (x: ModelWrapper) => void; diff --git a/packages/legacy/src/smart/ui/mapper/repo/automapper/AutoMapNode.tsx b/packages/legacy/src/smart/ui/mapper/repo/automapper/AutoMapNode.tsx index 85b994a4..301e533b 100644 --- a/packages/legacy/src/smart/ui/mapper/repo/automapper/AutoMapNode.tsx +++ b/packages/legacy/src/smart/ui/mapper/repo/automapper/AutoMapNode.tsx @@ -1,7 +1,7 @@ import { Checkbox, Text } from '@blueprintjs/core'; import { Tooltip2 } from '@blueprintjs/popover2'; import React from 'react'; -import { RepoItems } from '../../../../model/repo'; +import { RepoItems } from '@/smart/model/repo'; export function createAutoMapNode( label: string, diff --git a/packages/legacy/src/smart/ui/mapper/repo/automapper/calculating.tsx b/packages/legacy/src/smart/ui/mapper/repo/automapper/calculating.tsx index 82361d74..4b1403a2 100644 --- a/packages/legacy/src/smart/ui/mapper/repo/automapper/calculating.tsx +++ b/packages/legacy/src/smart/ui/mapper/repo/automapper/calculating.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import { LoadingContainer } from '../../../common/Loading'; +import { LoadingContainer } from '@/smart/ui/common/Loading'; const AutoMapLoading: React.FC<{ isLoading: boolean; diff --git a/packages/legacy/src/smart/ui/mapper/repo/automapper/loading.tsx b/packages/legacy/src/smart/ui/mapper/repo/automapper/loading.tsx index 7e5b1131..ee0a1aa0 100644 --- a/packages/legacy/src/smart/ui/mapper/repo/automapper/loading.tsx +++ b/packages/legacy/src/smart/ui/mapper/repo/automapper/loading.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import { LoadingContainer } from '../../../common/Loading'; +import { LoadingContainer } from '@/smart/ui/common/Loading'; const RepoLoading: React.FC<{ isLoading: boolean; diff --git a/packages/legacy/src/smart/ui/mapper/repo/automapper/mapview.tsx b/packages/legacy/src/smart/ui/mapper/repo/automapper/mapview.tsx index 6924a431..be75966c 100644 --- a/packages/legacy/src/smart/ui/mapper/repo/automapper/mapview.tsx +++ b/packages/legacy/src/smart/ui/mapper/repo/automapper/mapview.tsx @@ -1,8 +1,8 @@ import React from 'react'; import ReactFlow, { Elements, ReactFlowProvider } from 'react-flow-renderer'; -import { RepoLegend } from '../../../../utils/repo/CommonFunctions'; -import LegendPane from '../../../common/description/LegendPane'; -import RepoEdge from '../../../flowui/RepoEdge'; +import { RepoLegend } from '@/smart/utils/repo/CommonFunctions'; +import LegendPane from '@/smart/ui/common/description/LegendPane'; +import RepoEdge from '@/smart/ui/flowui/RepoEdge'; const RepoAutoMapView: React.FC<{ fnodes: Elements; diff --git a/packages/legacy/src/smart/ui/mapper/viewmapbutton.tsx b/packages/legacy/src/smart/ui/mapper/viewmapbutton.tsx index 314f8eea..d7c5f30f 100644 --- a/packages/legacy/src/smart/ui/mapper/viewmapbutton.tsx +++ b/packages/legacy/src/smart/ui/mapper/viewmapbutton.tsx @@ -1,9 +1,9 @@ import { Button } from '@blueprintjs/core'; import { Popover2, Tooltip2 } from '@blueprintjs/popover2'; import React, { useState } from 'react'; -import { flownodeTopRightButtonLayout } from '../../../css/layout'; -import { ModelType } from '../../model/editormodel'; -import { MapViewButtonToolTip } from '../../utils/map/MappingCalculator'; +import { flownodeTopRightButtonLayout } from '@/css/layout'; +import { ModelType } from '@/smart/model/editormodel'; +import { MapViewButtonToolTip } from '@/smart/utils/map/MappingCalculator'; interface MouseState { isHover: boolean; diff --git a/packages/legacy/src/smart/ui/measurement/MeasurementResultFormatter.ts b/packages/legacy/src/smart/ui/measurement/MeasurementResultFormatter.ts index a95303c2..255dce10 100644 --- a/packages/legacy/src/smart/ui/measurement/MeasurementResultFormatter.ts +++ b/packages/legacy/src/smart/ui/measurement/MeasurementResultFormatter.ts @@ -1,8 +1,8 @@ -import { flow_node__highlighed, no_highlight } from '../../../css/visual'; -import { MeasureResult } from '../../model/Measurement'; -import { ViewFunctionInterface } from '../../model/ViewFunctionModel'; -import { MeasureResultStyles } from '../../utils/measurement/Checker'; -import MeasurementTooltip from './MeasurementTooltip'; +import { flow_node__highlighed, no_highlight } from '@/css/visual'; +import { MeasureResult } from '@/smart/model/Measurement'; +import { ViewFunctionInterface } from '@/smart/model/ViewFunctionModel'; +import { MeasureResultStyles } from '@/smart/utils/measurement/Checker'; +import MeasurementTooltip from '@/smart/ui/measurement/MeasurementTooltip'; export default function updateMeasurementView( result: MeasureResult, diff --git a/packages/legacy/src/smart/ui/measurement/MeasurementTooltip.tsx b/packages/legacy/src/smart/ui/measurement/MeasurementTooltip.tsx index f52f8689..1f37f21d 100644 --- a/packages/legacy/src/smart/ui/measurement/MeasurementTooltip.tsx +++ b/packages/legacy/src/smart/ui/measurement/MeasurementTooltip.tsx @@ -1,14 +1,14 @@ import React from 'react'; -import { popoverPanelContainer } from '../../../css/layout'; -import MGDHeading from '../../MGDComponents/MGDHeading'; -import MGDLabel from '../../MGDComponents/MGDLabel'; +import { popoverPanelContainer } from '@/css/layout'; +import MGDHeading from '@/smart/MGDComponents/MGDHeading'; +import MGDLabel from '@/smart/MGDComponents/MGDLabel'; import { MeasureResult, MeasureRType, MTestItem, MTestReport, } from '../../model/Measurement'; -import { DescriptionItem } from '../common/description/fields'; +import { DescriptionItem } from '@/smart/ui/common/description/fields'; const MeasurementTooltip: React.FC<{ id: string; diff --git a/packages/legacy/src/smart/ui/measurement/MeasurementValidationPane.tsx b/packages/legacy/src/smart/ui/measurement/MeasurementValidationPane.tsx index 433251ac..7d9ac2ba 100644 --- a/packages/legacy/src/smart/ui/measurement/MeasurementValidationPane.tsx +++ b/packages/legacy/src/smart/ui/measurement/MeasurementValidationPane.tsx @@ -1,20 +1,20 @@ import { Text, FormGroup, IToastProps, Button } from '@blueprintjs/core'; import React from 'react'; import { useEffect, useMemo, useState } from 'react'; -import MGDSidebar from '../../MGDComponents/MGDSidebar'; -import { EditorModel } from '../../model/editormodel'; -import { MeasureResult } from '../../model/Measurement'; -import { ViewFunctionInterface } from '../../model/ViewFunctionModel'; +import MGDSidebar from '@/smart/MGDComponents/MGDSidebar'; +import { EditorModel } from '@/smart/model/editormodel'; +import { MeasureResult } from '@/smart/model/Measurement'; +import { ViewFunctionInterface } from '@/smart/model/ViewFunctionModel'; import { MMELVariable, MMELView, VarType, } from '@paneron/libmmel/interface/supportinterface'; -import { measureTest } from '../../utils/measurement/Checker'; -import updateMeasurementView from './MeasurementResultFormatter'; -import updateParaView from './ParameterizedViewFormatter'; -import VariableSettingItem from './VariableSettingItem'; -import ProfileControl from './ViewProfileControl'; +import { measureTest } from '@/smart/utils/measurement/Checker'; +import updateMeasurementView from '@/smart/ui/measurement/MeasurementResultFormatter'; +import updateParaView from '@/smart/ui/measurement/ParameterizedViewFormatter'; +import VariableSettingItem from '@/smart/ui/measurement/VariableSettingItem'; +import ProfileControl from '@/smart/ui/measurement/ViewProfileControl'; function simpleFilter(v: MMELVariable): boolean { return ( diff --git a/packages/legacy/src/smart/ui/measurement/ParameterizedViewFormatter.ts b/packages/legacy/src/smart/ui/measurement/ParameterizedViewFormatter.ts index 8234f1a7..4a19539c 100644 --- a/packages/legacy/src/smart/ui/measurement/ParameterizedViewFormatter.ts +++ b/packages/legacy/src/smart/ui/measurement/ParameterizedViewFormatter.ts @@ -1,7 +1,7 @@ -import { flow_node__highlighed } from '../../../css/visual'; -import { MeasureResult } from '../../model/Measurement'; -import { LegendInterface } from '../../model/States'; -import { ViewFunctionInterface } from '../../model/ViewFunctionModel'; +import { flow_node__highlighed } from '@/css/visual'; +import { MeasureResult } from '@/smart/model/Measurement'; +import { LegendInterface } from '@/smart/model/States'; +import { ViewFunctionInterface } from '@/smart/model/ViewFunctionModel'; export default function updateParaView( result: MeasureResult, diff --git a/packages/legacy/src/smart/ui/measurement/VariableSettingItem.tsx b/packages/legacy/src/smart/ui/measurement/VariableSettingItem.tsx index b6349726..c3bd8c72 100644 --- a/packages/legacy/src/smart/ui/measurement/VariableSettingItem.tsx +++ b/packages/legacy/src/smart/ui/measurement/VariableSettingItem.tsx @@ -1,10 +1,10 @@ import React from 'react'; -import { CSSROOTVARIABLES } from '../../../css/root.css'; -import { InputableVarType, VarInputInterface } from '../../model/Measurement'; +import { CSSROOTVARIABLES } from '@/css/root.css'; +import { InputableVarType, VarInputInterface } from '@/smart/model/Measurement'; import { VarType } from '@paneron/libmmel/interface/supportinterface'; -import BooleanMeasureEdit from './fields/boolean'; -import TableComboBox from './fields/TableComboBox'; -import TextMeasureEdit from './fields/text'; +import BooleanMeasureEdit from '@/smart/ui/measurement/fields/boolean'; +import TableComboBox from '@/smart/ui/measurement/fields/TableComboBox'; +import TextMeasureEdit from '@/smart/ui/measurement/fields/text'; const VarInputs: Record> = { [VarType.BOOLEAN] : BooleanMeasureEdit, diff --git a/packages/legacy/src/smart/ui/measurement/ViewProfileControl.tsx b/packages/legacy/src/smart/ui/measurement/ViewProfileControl.tsx index 22b32778..c2014152 100644 --- a/packages/legacy/src/smart/ui/measurement/ViewProfileControl.tsx +++ b/packages/legacy/src/smart/ui/measurement/ViewProfileControl.tsx @@ -1,8 +1,8 @@ import { Text, Button, ControlGroup, Icon } from '@blueprintjs/core'; import { Classes, Popover2, Tooltip2 } from '@blueprintjs/popover2'; import React from 'react'; -import MGDContainer from '../../MGDComponents/MGDContainer'; -import MGDSidebar from '../../MGDComponents/MGDSidebar'; +import MGDContainer from '@/smart/MGDComponents/MGDContainer'; +import MGDSidebar from '@/smart/MGDComponents/MGDSidebar'; import { MMELView } from '@paneron/libmmel/interface/supportinterface'; const ProfileControl: React.FC<{ diff --git a/packages/legacy/src/smart/ui/measurement/fields/TableComboBox.tsx b/packages/legacy/src/smart/ui/measurement/fields/TableComboBox.tsx index 0b88c96a..a3e1515a 100644 --- a/packages/legacy/src/smart/ui/measurement/fields/TableComboBox.tsx +++ b/packages/legacy/src/smart/ui/measurement/fields/TableComboBox.tsx @@ -1,9 +1,9 @@ import React from 'react'; import { useMemo } from 'react'; -import { EditorModel } from '../../../model/editormodel'; -import { VarInputInterface } from '../../../model/Measurement'; +import { EditorModel } from '@/smart/model/editormodel'; +import { VarInputInterface } from '@/smart/model/Measurement'; import { MMELVariable } from '@paneron/libmmel/interface/supportinterface'; -import { NormalTextField, NormalComboBox } from '../../common/fields'; +import { NormalTextField, NormalComboBox } from '@/smart/ui/common/fields'; function calOptions( model: EditorModel, diff --git a/packages/legacy/src/smart/ui/measurement/fields/boolean.tsx b/packages/legacy/src/smart/ui/measurement/fields/boolean.tsx index ee596726..4d13d1b5 100644 --- a/packages/legacy/src/smart/ui/measurement/fields/boolean.tsx +++ b/packages/legacy/src/smart/ui/measurement/fields/boolean.tsx @@ -1,6 +1,6 @@ import { Switch } from '@blueprintjs/core'; import React from 'react'; -import { VarInputInterface } from '../../../model/Measurement'; +import { VarInputInterface } from '@/smart/model/Measurement'; const BooleanMeasureEdit: React.FC = function ({ variable, diff --git a/packages/legacy/src/smart/ui/measurement/fields/text.tsx b/packages/legacy/src/smart/ui/measurement/fields/text.tsx index 999872fe..33a5088d 100644 --- a/packages/legacy/src/smart/ui/measurement/fields/text.tsx +++ b/packages/legacy/src/smart/ui/measurement/fields/text.tsx @@ -1,10 +1,10 @@ import React from 'react'; -import { VarInputInterface } from '../../../model/Measurement'; +import { VarInputInterface } from '@/smart/model/Measurement'; import { MMELVariable, VarType, } from '@paneron/libmmel/interface/supportinterface'; -import { NormalTextField } from '../../common/fields'; +import { NormalTextField } from '@/smart/ui/common/fields'; function getDesc(v: MMELVariable) { return ( diff --git a/packages/legacy/src/smart/ui/menu/DocEditFileMenu.tsx b/packages/legacy/src/smart/ui/menu/DocEditFileMenu.tsx index 7a3db26e..aba9a0bb 100644 --- a/packages/legacy/src/smart/ui/menu/DocEditFileMenu.tsx +++ b/packages/legacy/src/smart/ui/menu/DocEditFileMenu.tsx @@ -1,15 +1,15 @@ import { Menu, MenuDivider, MenuItem } from '@blueprintjs/core'; import { DatasetContext } from '@riboseinc/paneron-extension-kit/context'; import React, { useContext } from 'react'; -import { MMELDocument } from '../../model/document'; -import { docToText } from '../../utils/DocumentFunctions'; -import { createNewMMELDocument } from '../../utils/EditorFactory'; +import { MMELDocument } from '@/smart/model/document'; +import { docToText } from '@/smart/utils/DocumentFunctions'; +import { createNewMMELDocument } from '@/smart/utils/EditorFactory'; import { FILE_TYPE, handleDocumentOpen, saveToFileSystem, } from '../../utils/IOFunctions'; -import MenuButton from './MenuButton'; +import MenuButton from '@/smart/ui/menu/MenuButton'; const DocEditFileMenu: React.FC<{ doc: MMELDocument; diff --git a/packages/legacy/src/smart/ui/menu/DocEditImportMenu.tsx b/packages/legacy/src/smart/ui/menu/DocEditImportMenu.tsx index 60545815..5368abe5 100644 --- a/packages/legacy/src/smart/ui/menu/DocEditImportMenu.tsx +++ b/packages/legacy/src/smart/ui/menu/DocEditImportMenu.tsx @@ -1,6 +1,6 @@ import { Menu, MenuItem } from '@blueprintjs/core'; import React from 'react'; -import MenuButton from './MenuButton'; +import MenuButton from '@/smart/ui/menu/MenuButton'; const DocEditImportMenu: React.FC<{ open: () => void; diff --git a/packages/legacy/src/smart/ui/menu/DocEditToolbar.tsx b/packages/legacy/src/smart/ui/menu/DocEditToolbar.tsx index a5a0cbd6..3cff8286 100644 --- a/packages/legacy/src/smart/ui/menu/DocEditToolbar.tsx +++ b/packages/legacy/src/smart/ui/menu/DocEditToolbar.tsx @@ -1,11 +1,11 @@ import { ControlGroup, Dialog } from '@blueprintjs/core'; import React, { useState } from 'react'; -import { dialogLayout } from '../../../css/layout'; -import { MMELDocument } from '../../model/document'; -import DocImport from '../doc/DocImport'; -import DocSettings from '../doc/DocSettings'; -import DocEditFileMenu from './DocEditFileMenu'; -import DocEditImportMenu from './DocEditImportMenu'; +import { dialogLayout } from '@/css/layout'; +import { MMELDocument } from '@/smart/model/document'; +import DocImport from '@/smart/ui/doc/DocImport'; +import DocSettings from '@/smart/ui/doc/DocSettings'; +import DocEditFileMenu from '@/smart/ui/menu/DocEditFileMenu'; +import DocEditImportMenu from '@/smart/ui/menu/DocEditImportMenu'; type DiagMode = 'setting' | 'import'; diff --git a/packages/legacy/src/smart/ui/menu/EditorFileMenu.tsx b/packages/legacy/src/smart/ui/menu/EditorFileMenu.tsx index b0852af3..142bbcb9 100644 --- a/packages/legacy/src/smart/ui/menu/EditorFileMenu.tsx +++ b/packages/legacy/src/smart/ui/menu/EditorFileMenu.tsx @@ -2,8 +2,8 @@ import React, { useContext } from 'react'; import { Menu, MenuDivider, MenuItem } from '@blueprintjs/core'; import { DatasetContext } from '@riboseinc/paneron-extension-kit/context'; import { MMELToText } from '@paneron/libmmel'; -import { FILE_TYPE, saveToFileSystem } from '../../utils/IOFunctions'; -import { EditorModel } from '../../model/editormodel'; +import { FILE_TYPE, saveToFileSystem } from '@/smart/utils/IOFunctions'; +import { EditorModel } from '@/smart/model/editormodel'; const EditorFileMenu: React.FC<{ model: EditorModel; diff --git a/packages/legacy/src/smart/ui/menu/EditorReferenceMenu.tsx b/packages/legacy/src/smart/ui/menu/EditorReferenceMenu.tsx index 1b377623..d9fea9c5 100644 --- a/packages/legacy/src/smart/ui/menu/EditorReferenceMenu.tsx +++ b/packages/legacy/src/smart/ui/menu/EditorReferenceMenu.tsx @@ -6,9 +6,9 @@ import { handleDocumentOpen, handleModelOpen, } from '../../utils/IOFunctions'; -import { ReferenceContent } from '../../model/States'; -import { indexModel } from '../../model/mapmodel'; -import { RepoItemType } from '../../model/repo'; +import { ReferenceContent } from '@/smart/model/States'; +import { indexModel } from '@/smart/model/mapmodel'; +import { RepoItemType } from '@/smart/model/repo'; const EditorReferenceMenu: React.FC<{ setReference: (x: ReferenceContent | undefined) => void; diff --git a/packages/legacy/src/smart/ui/menu/EditorReferenceMenuButton.tsx b/packages/legacy/src/smart/ui/menu/EditorReferenceMenuButton.tsx index d0d8f99d..66f8b16d 100644 --- a/packages/legacy/src/smart/ui/menu/EditorReferenceMenuButton.tsx +++ b/packages/legacy/src/smart/ui/menu/EditorReferenceMenuButton.tsx @@ -1,10 +1,10 @@ import { Button, Dialog } from '@blueprintjs/core'; import { Popover2 } from '@blueprintjs/popover2'; import React, { useState } from 'react'; -import { MMELRepo, RepoIndex, RepoItemType } from '../../model/repo'; -import { ReferenceContent } from '../../model/States'; -import RepoItemSelector from '../repo/RepoItemSelector'; -import EditorReferenceMenu from './EditorReferenceMenu'; +import { MMELRepo, RepoIndex, RepoItemType } from '@/smart/model/repo'; +import { ReferenceContent } from '@/smart/model/States'; +import RepoItemSelector from '@/smart/ui/repo/RepoItemSelector'; +import EditorReferenceMenu from '@/smart/ui/menu/EditorReferenceMenu'; const EditorReferenceMenuButton: React.FC<{ setReference: (x: ReferenceContent | undefined) => void; diff --git a/packages/legacy/src/smart/ui/menu/EditorViewMenu.tsx b/packages/legacy/src/smart/ui/menu/EditorViewMenu.tsx index 54cd1944..b14886a4 100644 --- a/packages/legacy/src/smart/ui/menu/EditorViewMenu.tsx +++ b/packages/legacy/src/smart/ui/menu/EditorViewMenu.tsx @@ -1,6 +1,6 @@ import React from 'react'; import { IconName, Menu, MenuItem } from '@blueprintjs/core'; -import { EditorViewOption } from '../../model/States'; +import { EditorViewOption } from '@/smart/model/States'; const items: (keyof EditorViewOption)[] = [ 'dvisible', diff --git a/packages/legacy/src/smart/ui/menu/MapperCompareMenu.tsx b/packages/legacy/src/smart/ui/menu/MapperCompareMenu.tsx index 02dc488d..1f7f31f9 100644 --- a/packages/legacy/src/smart/ui/menu/MapperCompareMenu.tsx +++ b/packages/legacy/src/smart/ui/menu/MapperCompareMenu.tsx @@ -1,8 +1,8 @@ import React, { useContext } from 'react'; import { Menu, MenuItem } from '@blueprintjs/core'; -import { FILE_TYPE, handleMappingOpen } from '../../utils/IOFunctions'; +import { FILE_TYPE, handleMappingOpen } from '@/smart/utils/IOFunctions'; import { DatasetContext } from '@riboseinc/paneron-extension-kit/context'; -import { MapProfile } from '../../model/mapmodel'; +import { MapProfile } from '@/smart/model/mapmodel'; const MapperCompareMenu: React.FC<{ opponent: MapProfile | undefined; diff --git a/packages/legacy/src/smart/ui/menu/MapperDocumentMenu.tsx b/packages/legacy/src/smart/ui/menu/MapperDocumentMenu.tsx index f37acefb..5c0eac6a 100644 --- a/packages/legacy/src/smart/ui/menu/MapperDocumentMenu.tsx +++ b/packages/legacy/src/smart/ui/menu/MapperDocumentMenu.tsx @@ -1,8 +1,8 @@ import React, { useContext } from 'react'; import { Menu, MenuItem } from '@blueprintjs/core'; import { DatasetContext } from '@riboseinc/paneron-extension-kit/context'; -import { FILE_TYPE, handleDocumentOpen } from '../../utils/IOFunctions'; -import { MMELDocument } from '../../model/document'; +import { FILE_TYPE, handleDocumentOpen } from '@/smart/utils/IOFunctions'; +import { MMELDocument } from '@/smart/model/document'; const MapperDocumentMenu: React.FC<{ setDocument: (x: MMELDocument) => void; diff --git a/packages/legacy/src/smart/ui/menu/MapperFileMenu.tsx b/packages/legacy/src/smart/ui/menu/MapperFileMenu.tsx index 0292d39a..01cd58f0 100644 --- a/packages/legacy/src/smart/ui/menu/MapperFileMenu.tsx +++ b/packages/legacy/src/smart/ui/menu/MapperFileMenu.tsx @@ -1,13 +1,13 @@ import React, { useContext } from 'react'; import { Menu, MenuDivider, MenuItem } from '@blueprintjs/core'; import { DatasetContext } from '@riboseinc/paneron-extension-kit/context'; -import { createMapProfile, MapProfile } from '../../model/mapmodel'; +import { createMapProfile, MapProfile } from '@/smart/model/mapmodel'; import { FILE_TYPE, handleMappingOpen, saveToFileSystem, } from '../../utils/IOFunctions'; -import { MMELRepo } from '../../model/repo'; +import { MMELRepo } from '@/smart/model/repo'; const MapperFileMenu: React.FC<{ mapProfile: MapProfile; diff --git a/packages/legacy/src/smart/ui/menu/ViewOptionMenu.tsx b/packages/legacy/src/smart/ui/menu/ViewOptionMenu.tsx index 014e8744..b4524e28 100644 --- a/packages/legacy/src/smart/ui/menu/ViewOptionMenu.tsx +++ b/packages/legacy/src/smart/ui/menu/ViewOptionMenu.tsx @@ -1,6 +1,6 @@ import React from 'react'; import { IconName, Menu, MenuItem } from '@blueprintjs/core'; -import { ViewerOption } from '../../model/States'; +import { ViewerOption } from '@/smart/model/States'; const items: (keyof ViewerOption)[] = [ 'dvisible', diff --git a/packages/legacy/src/smart/ui/menu/ViewToolMenu.tsx b/packages/legacy/src/smart/ui/menu/ViewToolMenu.tsx index bf7e2868..93edfe2f 100644 --- a/packages/legacy/src/smart/ui/menu/ViewToolMenu.tsx +++ b/packages/legacy/src/smart/ui/menu/ViewToolMenu.tsx @@ -1,6 +1,6 @@ import React from 'react'; import { IconName, Menu, MenuItem } from '@blueprintjs/core'; -import { FunctionPage, FuntionNames } from '../mainviewer'; +import { FunctionPage, FuntionNames } from '@/smart/ui/mainviewer'; const ViewToolMenu: React.FC<{ funPage: FunctionPage; diff --git a/packages/legacy/src/smart/ui/menu/WorkspaceFileMenu.tsx b/packages/legacy/src/smart/ui/menu/WorkspaceFileMenu.tsx index 3be8c3c8..905ffdb5 100644 --- a/packages/legacy/src/smart/ui/menu/WorkspaceFileMenu.tsx +++ b/packages/legacy/src/smart/ui/menu/WorkspaceFileMenu.tsx @@ -1,9 +1,9 @@ import React from 'react'; import { Button, ControlGroup, Menu, MenuItem } from '@blueprintjs/core'; import { Popover2 } from '@blueprintjs/popover2'; -import MGDButton from '../../MGDComponents/MGDButton'; -import { MGDButtonType } from '../../../css/MGDButton'; -import { WorkspaceDiagPackage } from '../dialog/WorkspaceDiag'; +import MGDButton from '@/smart/MGDComponents/MGDButton'; +import { MGDButtonType } from '@/css/MGDButton'; +import { WorkspaceDiagPackage } from '@/smart/ui/dialog/WorkspaceDiag'; const WorkspaceFileMenu: React.FC<{ onRepoSave: () => void; diff --git a/packages/legacy/src/smart/ui/menu/mapperOptionMenu.tsx b/packages/legacy/src/smart/ui/menu/mapperOptionMenu.tsx index c7eeeff2..ee886b71 100644 --- a/packages/legacy/src/smart/ui/menu/mapperOptionMenu.tsx +++ b/packages/legacy/src/smart/ui/menu/mapperOptionMenu.tsx @@ -1,6 +1,6 @@ import React from 'react'; import { IconName, Menu, MenuDivider, MenuItem } from '@blueprintjs/core'; -import { MapperViewOption } from '../../model/States'; +import { MapperViewOption } from '@/smart/model/States'; const MapperOptionMenu: React.FC<{ viewOption: MapperViewOption; diff --git a/packages/legacy/src/smart/ui/modelWorkspace.tsx b/packages/legacy/src/smart/ui/modelWorkspace.tsx index 8d4826f6..e17d3802 100644 --- a/packages/legacy/src/smart/ui/modelWorkspace.tsx +++ b/packages/legacy/src/smart/ui/modelWorkspace.tsx @@ -16,27 +16,27 @@ import { getActionReactFlowElementsFrom, ModelWrapper, } from '../model/modelwrapper'; -import { createModelHistory, HistoryItem } from '../model/history'; -import { EdgeTypes, NodeTypes } from '../model/States'; -import { DataVisibilityButton, IdVisibleButton } from './control/buttons'; -import { react_flow_container_layout, sidebar_layout } from '../../css/layout'; -import LegendPane from './common/description/LegendPane'; +import { createModelHistory, HistoryItem } from '@/smart/model/history'; +import { EdgeTypes, NodeTypes } from '@/smart/model/States'; +import { DataVisibilityButton, IdVisibleButton } from '@/smart/ui/control/buttons'; +import { react_flow_container_layout, sidebar_layout } from '@/css/layout'; +import LegendPane from '@/smart/ui/common/description/LegendPane'; import { getHighlightedStyleById, getHighlightedSVGColorById, SearchResultStyles, } from '../utils/SearchFunctions'; -import { SMARTModelStore, SMARTWorkspace } from '../model/workspace'; -import WorkspaceFileMenu from './menu/WorkspaceFileMenu'; -import { WorkspaceDiagPackage, WorkspaceDialog } from './dialog/WorkspaceDiag'; -import { getNamespace } from '../utils/ModelFunctions'; -import { COMMITMSG, getPathByNS, RepoFileType } from '../utils/repo/io'; -import { MMELRepo, RepoIndex } from '../model/repo'; -import { EditorModel } from '../model/editormodel'; -import { HistoryAction, useHistory } from '../model/editor/history'; -import { getBreadcrumbs } from './common/description/fields'; -import { SelectedNodeDescription } from './sidebar/selected'; -import SearchComponentPane from './sidebar/search'; +import { SMARTModelStore, SMARTWorkspace } from '@/smart/model/workspace'; +import WorkspaceFileMenu from '@/smart/ui/menu/WorkspaceFileMenu'; +import { WorkspaceDiagPackage, WorkspaceDialog } from '@/smart/ui/dialog/WorkspaceDiag'; +import { getNamespace } from '@/smart/utils/ModelFunctions'; +import { COMMITMSG, getPathByNS, RepoFileType } from '@/smart/utils/repo/io'; +import { MMELRepo, RepoIndex } from '@/smart/model/repo'; +import { EditorModel } from '@/smart/model/editormodel'; +import { HistoryAction, useHistory } from '@/smart/model/editor/history'; +import { getBreadcrumbs } from '@/smart/ui/common/description/fields'; +import { SelectedNodeDescription } from '@/smart/ui/sidebar/selected'; +import SearchComponentPane from '@/smart/ui/sidebar/search'; const ModelWorkspace: React.FC<{ isVisible: boolean; diff --git a/packages/legacy/src/smart/ui/nlp/NLPMain.tsx b/packages/legacy/src/smart/ui/nlp/NLPMain.tsx index c75f89f7..ac1c5fe7 100644 --- a/packages/legacy/src/smart/ui/nlp/NLPMain.tsx +++ b/packages/legacy/src/smart/ui/nlp/NLPMain.tsx @@ -7,20 +7,20 @@ import makeSidebar from '@riboseinc/paneron-extension-kit/widgets/Sidebar'; import Workspace from '@riboseinc/paneron-extension-kit/widgets/Workspace'; import React, { useContext, useEffect, useMemo, useState } from 'react'; import { ReactFlowProvider } from 'react-flow-renderer'; -import { sidebar_layout } from '../../../css/layout'; -import { MMELJSON } from '../../model/json'; +import { sidebar_layout } from '@/css/layout'; +import { MMELJSON } from '@/smart/model/json'; import { createEditorModelWrapper, ModelWrapper, } from '../../model/modelwrapper'; -import { MMELRepo } from '../../model/repo'; -import { ProvisionRDF, RDFVersion } from '../../model/SemanticTriple'; -import { buildModelLinks } from '../../utils/ModelFunctions'; -import { getPathByNS, JSONToMMEL, RepoFileType } from '../../utils/repo/io'; -import { LoadingScreen } from '../common/Loading'; -import RDFControlPane from './RDFControlPane'; -import RDFDiagram from './RDFDiagram'; -import RDFQueryPane from './RDFQueryPane'; +import { MMELRepo } from '@/smart/model/repo'; +import { ProvisionRDF, RDFVersion } from '@/smart/model/SemanticTriple'; +import { buildModelLinks } from '@/smart/utils/ModelFunctions'; +import { getPathByNS, JSONToMMEL, RepoFileType } from '@/smart/utils/repo/io'; +import { LoadingScreen } from '@/smart/ui/common/Loading'; +import RDFControlPane from '@/smart/ui/nlp/RDFControlPane'; +import RDFDiagram from '@/smart/ui/nlp/RDFDiagram'; +import RDFQueryPane from '@/smart/ui/nlp/RDFQueryPane'; const NLPMain: React.FC<{ isVisible: boolean; diff --git a/packages/legacy/src/smart/ui/nlp/NLPQuestionGraphView.tsx b/packages/legacy/src/smart/ui/nlp/NLPQuestionGraphView.tsx index c177f92c..dfe1c821 100644 --- a/packages/legacy/src/smart/ui/nlp/NLPQuestionGraphView.tsx +++ b/packages/legacy/src/smart/ui/nlp/NLPQuestionGraphView.tsx @@ -1,7 +1,7 @@ import { Button } from '@blueprintjs/core'; import React from 'react'; -import { ProvisionRDF } from '../../model/SemanticTriple'; -import RDFDiagram from './RDFDiagram'; +import { ProvisionRDF } from '@/smart/model/SemanticTriple'; +import RDFDiagram from '@/smart/ui/nlp/RDFDiagram'; const NLPQuestionGraphView: React.FC<{ isVisible: boolean; diff --git a/packages/legacy/src/smart/ui/nlp/RDFControlPane.tsx b/packages/legacy/src/smart/ui/nlp/RDFControlPane.tsx index 05f9c1fc..01da01b8 100644 --- a/packages/legacy/src/smart/ui/nlp/RDFControlPane.tsx +++ b/packages/legacy/src/smart/ui/nlp/RDFControlPane.tsx @@ -1,14 +1,14 @@ import { Button, Text } from '@blueprintjs/core'; import { DatasetContext } from '@riboseinc/paneron-extension-kit/context'; import React, { useContext, useState } from 'react'; -import MGDSidebar from '../../MGDComponents/MGDSidebar'; -import { ModelWrapper } from '../../model/modelwrapper'; -import { MMELRepo } from '../../model/repo'; -import { ProvisionRDF } from '../../model/SemanticTriple'; -import { computeRDF } from '../../utils/nlp/nlp'; -import { COMMITMSG, getPathByNS, RepoFileType } from '../../utils/repo/io'; -import { DescriptionItem } from '../common/description/fields'; -import { LoadingScreen } from '../common/Loading'; +import MGDSidebar from '@/smart/MGDComponents/MGDSidebar'; +import { ModelWrapper } from '@/smart/model/modelwrapper'; +import { MMELRepo } from '@/smart/model/repo'; +import { ProvisionRDF } from '@/smart/model/SemanticTriple'; +import { computeRDF } from '@/smart/utils/nlp/nlp'; +import { COMMITMSG, getPathByNS, RepoFileType } from '@/smart/utils/repo/io'; +import { DescriptionItem } from '@/smart/ui/common/description/fields'; +import { LoadingScreen } from '@/smart/ui/common/Loading'; const RDFControlPane: React.FC<{ repo: MMELRepo; diff --git a/packages/legacy/src/smart/ui/nlp/RDFDiagram.tsx b/packages/legacy/src/smart/ui/nlp/RDFDiagram.tsx index ef1c3860..c201d2b4 100644 --- a/packages/legacy/src/smart/ui/nlp/RDFDiagram.tsx +++ b/packages/legacy/src/smart/ui/nlp/RDFDiagram.tsx @@ -1,8 +1,8 @@ import React, { useMemo } from 'react'; import ReactFlow from 'react-flow-renderer'; -import { reactFlowContainerLayout } from '../../../css/layout'; -import { ProvisionRDF } from '../../model/SemanticTriple'; -import { getElementsFromRDF } from '../../utils/nlp/nlp'; +import { reactFlowContainerLayout } from '@/css/layout'; +import { ProvisionRDF } from '@/smart/model/SemanticTriple'; +import { getElementsFromRDF } from '@/smart/utils/nlp/nlp'; const RDFDiagram: React.FC<{ diagram: ProvisionRDF | undefined | null; diff --git a/packages/legacy/src/smart/ui/nlp/RDFQueryPane.tsx b/packages/legacy/src/smart/ui/nlp/RDFQueryPane.tsx index 99aaea53..a2b61e22 100644 --- a/packages/legacy/src/smart/ui/nlp/RDFQueryPane.tsx +++ b/packages/legacy/src/smart/ui/nlp/RDFQueryPane.tsx @@ -1,12 +1,12 @@ import { Button, FormGroup, Text } from '@blueprintjs/core'; import React, { useState } from 'react'; import { ReactFlowProvider } from 'react-flow-renderer'; -import MGDSidebar from '../../MGDComponents/MGDSidebar'; -import { ProvisionRDF } from '../../model/SemanticTriple'; -import { askRDF } from '../../utils/nlp/query'; -import { NormalTextField } from '../common/fields'; -import { LoadingContainer } from '../common/Loading'; -import RDFDiagram from './RDFDiagram'; +import MGDSidebar from '@/smart/MGDComponents/MGDSidebar'; +import { ProvisionRDF } from '@/smart/model/SemanticTriple'; +import { askRDF } from '@/smart/utils/nlp/query'; +import { NormalTextField } from '@/smart/ui/common/fields'; +import { LoadingContainer } from '@/smart/ui/common/Loading'; +import RDFDiagram from '@/smart/ui/nlp/RDFDiagram'; const RDFQueryPane: React.FC<{ rdf?: ProvisionRDF; diff --git a/packages/legacy/src/smart/ui/popover/AskIDForSaveMenu.tsx b/packages/legacy/src/smart/ui/popover/AskIDForSaveMenu.tsx index 485ede90..4270dc86 100644 --- a/packages/legacy/src/smart/ui/popover/AskIDForSaveMenu.tsx +++ b/packages/legacy/src/smart/ui/popover/AskIDForSaveMenu.tsx @@ -1,8 +1,8 @@ import { Button } from '@blueprintjs/core'; import React, { useState } from 'react'; -import { popoverPanelContainer } from '../../../css/layout'; -import { removeSpace } from '../../utils/ModelFunctions'; -import { NormalTextField } from '../common/fields'; +import { popoverPanelContainer } from '@/css/layout'; +import { removeSpace } from '@/smart/utils/ModelFunctions'; +import { NormalTextField } from '@/smart/ui/common/fields'; const AskIDForSaveMenu: React.FC<{ title: string; diff --git a/packages/legacy/src/smart/ui/popover/ComponentSummary.tsx b/packages/legacy/src/smart/ui/popover/ComponentSummary.tsx index e53e57a1..35a95940 100644 --- a/packages/legacy/src/smart/ui/popover/ComponentSummary.tsx +++ b/packages/legacy/src/smart/ui/popover/ComponentSummary.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import { popoverPanelContainer } from '../../../css/layout'; +import { popoverPanelContainer } from '@/css/layout'; import { EditorApproval, @@ -14,12 +14,12 @@ import { getEditorDataClassById, } from '../../model/editormodel'; import { DataType } from '@paneron/libmmel/interface/baseinterface'; -import { DescribableNodeTypes } from '../../utils/constants'; -import { DescribeDC, DescribeRegistry } from '../common/description/data'; -import ApprovalSummary from './components/ApprovalSummary'; -import EGateSummary from './components/EGateSummary'; -import { SignalSummary, TimerSummary } from './components/EventSummary'; -import ProcessSummary from './components/ProcessSummary'; +import { DescribableNodeTypes } from '@/smart/utils/constants'; +import { DescribeDC, DescribeRegistry } from '@/smart/ui/common/description/data'; +import ApprovalSummary from '@/smart/ui/popover/components/ApprovalSummary'; +import EGateSummary from '@/smart/ui/popover/components/EGateSummary'; +import { SignalSummary, TimerSummary } from '@/smart/ui/popover/components/EventSummary'; +import ProcessSummary from '@/smart/ui/popover/components/ProcessSummary'; const ComponentSummary: React.FC<{ id: string; diff --git a/packages/legacy/src/smart/ui/popover/ImportFromSelectionButton.tsx b/packages/legacy/src/smart/ui/popover/ImportFromSelectionButton.tsx index 4dc36478..e9e43356 100644 --- a/packages/legacy/src/smart/ui/popover/ImportFromSelectionButton.tsx +++ b/packages/legacy/src/smart/ui/popover/ImportFromSelectionButton.tsx @@ -1,7 +1,7 @@ import { Button, IconName } from '@blueprintjs/core'; import { Popover2 } from '@blueprintjs/popover2'; import React from 'react'; -import AskIDForSaveMenu from './AskIDForSaveMenu'; +import AskIDForSaveMenu from '@/smart/ui/popover/AskIDForSaveMenu'; const ImportFromSelectionButton: React.FC<{ title: string; diff --git a/packages/legacy/src/smart/ui/popover/LinksList.tsx b/packages/legacy/src/smart/ui/popover/LinksList.tsx index 1229b80e..50f746ca 100644 --- a/packages/legacy/src/smart/ui/popover/LinksList.tsx +++ b/packages/legacy/src/smart/ui/popover/LinksList.tsx @@ -1,6 +1,6 @@ import { Intent, Menu, MenuItem } from '@blueprintjs/core'; import React from 'react'; -import { MMELRepo, RepoIndex } from '../../model/repo'; +import { MMELRepo, RepoIndex } from '@/smart/model/repo'; import { MMELLink } from '@paneron/libmmel/interface/supportinterface'; const LinksList: React.FC<{ diff --git a/packages/legacy/src/smart/ui/popover/MapperDialog.tsx b/packages/legacy/src/smart/ui/popover/MapperDialog.tsx index 842f8315..60a7a8cd 100644 --- a/packages/legacy/src/smart/ui/popover/MapperDialog.tsx +++ b/packages/legacy/src/smart/ui/popover/MapperDialog.tsx @@ -1,22 +1,22 @@ import { Dialog, IToastProps } from '@blueprintjs/core'; import React from 'react'; -import { dialogLayout } from '../../../css/layout'; -import { EditorApproval, EditorProcess } from '../../model/editormodel'; -import { MappingMeta, MapProfile } from '../../model/mapmodel'; -import { ModelWrapper } from '../../model/modelwrapper'; -import { MMELRepo, RepoIndex } from '../../model/repo'; +import { dialogLayout } from '@/css/layout'; +import { EditorApproval, EditorProcess } from '@/smart/model/editormodel'; +import { MappingMeta, MapProfile } from '@/smart/model/mapmodel'; +import { ModelWrapper } from '@/smart/model/modelwrapper'; +import { MMELRepo, RepoIndex } from '@/smart/model/repo'; import { isModelWrapper, MapperViewOption, ReferenceContent, } from '../../model/States'; -import { getDocumentMetaById } from '../../utils/DocumentFunctions'; -import { getNamespace } from '../../utils/ModelFunctions'; -import { EditMPropsInterface } from '../dialog/dialogs'; -import MappingEditPage from '../edit/mappingedit'; -import AutoMapper from '../mapper/AutoMapper'; -import RepoAutoMapper from '../mapper/repo/RepoAutoMapper'; -import DocTemplatePane from '../reporttemplate/doctemplatepane'; +import { getDocumentMetaById } from '@/smart/utils/DocumentFunctions'; +import { getNamespace } from '@/smart/utils/ModelFunctions'; +import { EditMPropsInterface } from '@/smart/ui/dialog/dialogs'; +import MappingEditPage from '@/smart/ui/edit/mappingedit'; +import AutoMapper from '@/smart/ui/mapper/AutoMapper'; +import RepoAutoMapper from '@/smart/ui/mapper/repo/RepoAutoMapper'; +import DocTemplatePane from '@/smart/ui/reporttemplate/doctemplatepane'; type MapperDialogMode = 'mapping' | 'report' | 'automap' | 'repomap'; diff --git a/packages/legacy/src/smart/ui/popover/NonTextReferenceList.tsx b/packages/legacy/src/smart/ui/popover/NonTextReferenceList.tsx index 40d67ed4..11024b25 100644 --- a/packages/legacy/src/smart/ui/popover/NonTextReferenceList.tsx +++ b/packages/legacy/src/smart/ui/popover/NonTextReferenceList.tsx @@ -5,7 +5,7 @@ import { MMELFigure, MMELTable, } from '@paneron/libmmel/interface/supportinterface'; -import { isMMELTable } from '../../model/editormodel'; +import { isMMELTable } from '@/smart/model/editormodel'; const titles: Record = { 'fig' : 'Figure', diff --git a/packages/legacy/src/smart/ui/popover/PopoverChangeIDButton.tsx b/packages/legacy/src/smart/ui/popover/PopoverChangeIDButton.tsx index fbc90160..5904e79c 100644 --- a/packages/legacy/src/smart/ui/popover/PopoverChangeIDButton.tsx +++ b/packages/legacy/src/smart/ui/popover/PopoverChangeIDButton.tsx @@ -2,7 +2,7 @@ import { Button } from '@blueprintjs/core'; import { Popover2, Tooltip2 } from '@blueprintjs/popover2'; import React from 'react'; import { useState } from 'react'; -import AskIDForSaveMenu from './AskIDForSaveMenu'; +import AskIDForSaveMenu from '@/smart/ui/popover/AskIDForSaveMenu'; const PopoverChangeIDButton: React.FC<{ initValue: string; diff --git a/packages/legacy/src/smart/ui/popover/components/ApprovalSummary.tsx b/packages/legacy/src/smart/ui/popover/components/ApprovalSummary.tsx index fc55db1a..1db5d99a 100644 --- a/packages/legacy/src/smart/ui/popover/components/ApprovalSummary.tsx +++ b/packages/legacy/src/smart/ui/popover/components/ApprovalSummary.tsx @@ -1,6 +1,6 @@ import React from 'react'; -import { EditorApproval } from '../../../model/editormodel'; -import { DescriptionItem } from '../../common/description/fields'; +import { EditorApproval } from '@/smart/model/editormodel'; +import { DescriptionItem } from '@/smart/ui/common/description/fields'; const ApprovalSummary: React.FC<{ approval: EditorApproval; diff --git a/packages/legacy/src/smart/ui/popover/components/EGateSummary.tsx b/packages/legacy/src/smart/ui/popover/components/EGateSummary.tsx index f9bb20cf..9f4203ec 100644 --- a/packages/legacy/src/smart/ui/popover/components/EGateSummary.tsx +++ b/packages/legacy/src/smart/ui/popover/components/EGateSummary.tsx @@ -1,6 +1,6 @@ import React from 'react'; -import { EditorEGate } from '../../../model/editormodel'; -import { DescriptionItem } from '../../common/description/fields'; +import { EditorEGate } from '@/smart/model/editormodel'; +import { DescriptionItem } from '@/smart/ui/common/description/fields'; const EGateSummary: React.FC<{ egate: EditorEGate; diff --git a/packages/legacy/src/smart/ui/popover/components/EventSummary.tsx b/packages/legacy/src/smart/ui/popover/components/EventSummary.tsx index d25af452..215c07ef 100644 --- a/packages/legacy/src/smart/ui/popover/components/EventSummary.tsx +++ b/packages/legacy/src/smart/ui/popover/components/EventSummary.tsx @@ -3,7 +3,7 @@ import { EditorSignalEvent, EditorTimerEvent, } from '../../../model/editormodel'; -import { DescriptionItem } from '../../common/description/fields'; +import { DescriptionItem } from '@/smart/ui/common/description/fields'; export const TimerSummary: React.FC<{ timer: EditorTimerEvent; diff --git a/packages/legacy/src/smart/ui/popover/components/ProcessSummary.tsx b/packages/legacy/src/smart/ui/popover/components/ProcessSummary.tsx index cae0a2a5..0be8cccd 100644 --- a/packages/legacy/src/smart/ui/popover/components/ProcessSummary.tsx +++ b/packages/legacy/src/smart/ui/popover/components/ProcessSummary.tsx @@ -1,7 +1,7 @@ import React from 'react'; -import { EditorModel, EditorProcess } from '../../../model/editormodel'; -import { ProvisionList } from '../../common/description/ComponentList'; -import { DescriptionItem } from '../../common/description/fields'; +import { EditorModel, EditorProcess } from '@/smart/model/editormodel'; +import { ProvisionList } from '@/smart/ui/common/description/ComponentList'; +import { DescriptionItem } from '@/smart/ui/common/description/fields'; const ProcessSummary: React.FC<{ process: EditorProcess; diff --git a/packages/legacy/src/smart/ui/quickedit/approval.tsx b/packages/legacy/src/smart/ui/quickedit/approval.tsx index 8fbb1718..23612f09 100644 --- a/packages/legacy/src/smart/ui/quickedit/approval.tsx +++ b/packages/legacy/src/smart/ui/quickedit/approval.tsx @@ -1,10 +1,10 @@ import React from 'react'; -import { ModelAction } from '../../model/editor/model'; -import { EditorApproval, EditorModel } from '../../model/editormodel'; +import { ModelAction } from '@/smart/model/editor/model'; +import { EditorApproval, EditorModel } from '@/smart/model/editormodel'; import { DataType } from '@paneron/libmmel/interface/baseinterface'; -import { EditAction } from '../../utils/constants'; -import { DialogSetterInterface } from '../dialog/EditorDialogs'; -import EditApprovalPage from '../edit/approvaledit'; +import { EditAction } from '@/smart/utils/constants'; +import { DialogSetterInterface } from '@/smart/ui/dialog/EditorDialogs'; +import EditApprovalPage from '@/smart/ui/edit/approvaledit'; const QuickEditApproval: React.FC<{ approval: EditorApproval; diff --git a/packages/legacy/src/smart/ui/quickedit/dataclass.tsx b/packages/legacy/src/smart/ui/quickedit/dataclass.tsx index c3ad4c99..931a5724 100644 --- a/packages/legacy/src/smart/ui/quickedit/dataclass.tsx +++ b/packages/legacy/src/smart/ui/quickedit/dataclass.tsx @@ -4,13 +4,13 @@ import { editDCCommand, editImportDCCommand, } from '../../model/editor/commands/data'; -import { ModelAction } from '../../model/editor/model'; -import { EditorDataClass, EditorModel } from '../../model/editormodel'; -import { RefTextSelection } from '../../model/selectionImport'; +import { ModelAction } from '@/smart/model/editor/model'; +import { EditorDataClass, EditorModel } from '@/smart/model/editormodel'; +import { RefTextSelection } from '@/smart/model/selectionImport'; import { MMELDataAttribute } from '@paneron/libmmel/interface/datainterface'; import { MMELReference } from '@paneron/libmmel/interface/supportinterface'; -import { DescriptionItem } from '../common/description/fields'; -import { EditPageButtons } from '../edit/commons'; +import { DescriptionItem } from '@/smart/ui/common/description/fields'; +import { EditPageButtons } from '@/smart/ui/edit/commons'; import AttributeListQuickEdit, { findAllAttributeTypes, } from '../edit/components/AttributeList'; diff --git a/packages/legacy/src/smart/ui/quickedit/egate.tsx b/packages/legacy/src/smart/ui/quickedit/egate.tsx index 659d1ed5..e712e2e8 100644 --- a/packages/legacy/src/smart/ui/quickedit/egate.tsx +++ b/packages/legacy/src/smart/ui/quickedit/egate.tsx @@ -1,14 +1,14 @@ import React from 'react'; -import { ModelAction } from '../../model/editor/model'; +import { ModelAction } from '@/smart/model/editor/model'; import { EditorEGate, EditorModel, EditorSubprocess, } from '../../model/editormodel'; import { DataType } from '@paneron/libmmel/interface/baseinterface'; -import { EditAction } from '../../utils/constants'; -import { DialogSetterInterface } from '../dialog/EditorDialogs'; -import EditEGatePage from '../edit/egateedit'; +import { EditAction } from '@/smart/utils/constants'; +import { DialogSetterInterface } from '@/smart/ui/dialog/EditorDialogs'; +import EditEGatePage from '@/smart/ui/edit/egateedit'; const QuickEditEGate: React.FC<{ egate: EditorEGate; diff --git a/packages/legacy/src/smart/ui/quickedit/end.tsx b/packages/legacy/src/smart/ui/quickedit/end.tsx index 74bada30..f007f599 100644 --- a/packages/legacy/src/smart/ui/quickedit/end.tsx +++ b/packages/legacy/src/smart/ui/quickedit/end.tsx @@ -1,11 +1,11 @@ import { FormGroup } from '@blueprintjs/core'; import React from 'react'; -import { EditorEndEvent } from '../../model/editormodel'; +import { EditorEndEvent } from '@/smart/model/editormodel'; import { DataType } from '@paneron/libmmel/interface/baseinterface'; -import { EditAction } from '../../utils/constants'; -import { DescribeEnd } from '../common/description/ComponentDescription'; -import { DialogSetterInterface } from '../dialog/EditorDialogs'; -import { EditPageButtons } from '../edit/commons'; +import { EditAction } from '@/smart/utils/constants'; +import { DescribeEnd } from '@/smart/ui/common/description/ComponentDescription'; +import { DialogSetterInterface } from '@/smart/ui/dialog/EditorDialogs'; +import { EditPageButtons } from '@/smart/ui/edit/commons'; const QuickEditEnd: React.FC<{ end: EditorEndEvent; diff --git a/packages/legacy/src/smart/ui/quickedit/process.tsx b/packages/legacy/src/smart/ui/quickedit/process.tsx index bfb02550..0cf0f740 100644 --- a/packages/legacy/src/smart/ui/quickedit/process.tsx +++ b/packages/legacy/src/smart/ui/quickedit/process.tsx @@ -4,17 +4,17 @@ import { createSubprocessCommand, deleteSubprocessCommand, } from '../../model/editor/commands/elements'; -import { ModelAction } from '../../model/editor/model'; +import { ModelAction } from '@/smart/model/editor/model'; import { EditorModel, EditorProcess, EditorSubprocess, } from '../../model/editormodel'; -import { RefTextSelection } from '../../model/selectionImport'; +import { RefTextSelection } from '@/smart/model/selectionImport'; import { DataType } from '@paneron/libmmel/interface/baseinterface'; -import { EditAction } from '../../utils/constants'; -import { DialogSetterInterface } from '../dialog/EditorDialogs'; -import EditProcessPage from '../edit/processedit'; +import { EditAction } from '@/smart/utils/constants'; +import { DialogSetterInterface } from '@/smart/ui/dialog/EditorDialogs'; +import EditProcessPage from '@/smart/ui/edit/processedit'; const QuickEditProcess: React.FC<{ process: EditorProcess; diff --git a/packages/legacy/src/smart/ui/quickedit/registry.tsx b/packages/legacy/src/smart/ui/quickedit/registry.tsx index 7f446f68..fc09ba60 100644 --- a/packages/legacy/src/smart/ui/quickedit/registry.tsx +++ b/packages/legacy/src/smart/ui/quickedit/registry.tsx @@ -4,19 +4,19 @@ import { editImportRegistryCommand, editRegistryCommand, } from '../../model/editor/commands/data'; -import { RegistryCombined } from '../../model/editor/components/element/registry'; -import { ModelAction } from '../../model/editor/model'; +import { RegistryCombined } from '@/smart/model/editor/components/element/registry'; +import { ModelAction } from '@/smart/model/editor/model'; import { EditorDataClass, EditorModel, EditorRegistry, } from '../../model/editormodel'; -import { RefTextSelection } from '../../model/selectionImport'; +import { RefTextSelection } from '@/smart/model/selectionImport'; import { MMELDataAttribute } from '@paneron/libmmel/interface/datainterface'; import { MMELReference } from '@paneron/libmmel/interface/supportinterface'; -import { DescriptionItem } from '../common/description/fields'; -import { NormalTextField } from '../common/fields'; -import { EditPageButtons } from '../edit/commons'; +import { DescriptionItem } from '@/smart/ui/common/description/fields'; +import { NormalTextField } from '@/smart/ui/common/fields'; +import { EditPageButtons } from '@/smart/ui/edit/commons'; import AttributeListQuickEdit, { findAllAttributeTypes, } from '../edit/components/AttributeList'; diff --git a/packages/legacy/src/smart/ui/quickedit/signalevent.tsx b/packages/legacy/src/smart/ui/quickedit/signalevent.tsx index 3fb1b598..64dcb407 100644 --- a/packages/legacy/src/smart/ui/quickedit/signalevent.tsx +++ b/packages/legacy/src/smart/ui/quickedit/signalevent.tsx @@ -1,10 +1,10 @@ import React from 'react'; -import { ModelAction } from '../../model/editor/model'; -import { EditorModel, EditorSignalEvent } from '../../model/editormodel'; +import { ModelAction } from '@/smart/model/editor/model'; +import { EditorModel, EditorSignalEvent } from '@/smart/model/editormodel'; import { DataType } from '@paneron/libmmel/interface/baseinterface'; -import { EditAction } from '../../utils/constants'; -import { DialogSetterInterface } from '../dialog/EditorDialogs'; -import EditSignalEventPage from '../edit/signaleventedit'; +import { EditAction } from '@/smart/utils/constants'; +import { DialogSetterInterface } from '@/smart/ui/dialog/EditorDialogs'; +import EditSignalEventPage from '@/smart/ui/edit/signaleventedit'; const QuickEditSignalEvent: React.FC<{ event: EditorSignalEvent; diff --git a/packages/legacy/src/smart/ui/quickedit/timer.tsx b/packages/legacy/src/smart/ui/quickedit/timer.tsx index 05fdd474..441c34c6 100644 --- a/packages/legacy/src/smart/ui/quickedit/timer.tsx +++ b/packages/legacy/src/smart/ui/quickedit/timer.tsx @@ -1,10 +1,10 @@ import React from 'react'; -import { ModelAction } from '../../model/editor/model'; -import { EditorModel, EditorTimerEvent } from '../../model/editormodel'; +import { ModelAction } from '@/smart/model/editor/model'; +import { EditorModel, EditorTimerEvent } from '@/smart/model/editormodel'; import { DataType } from '@paneron/libmmel/interface/baseinterface'; -import { EditAction } from '../../utils/constants'; -import { DialogSetterInterface } from '../dialog/EditorDialogs'; -import EditTimerPage from '../edit/timeredit'; +import { EditAction } from '@/smart/utils/constants'; +import { DialogSetterInterface } from '@/smart/ui/dialog/EditorDialogs'; +import EditTimerPage from '@/smart/ui/edit/timeredit'; const QuickEditTimer: React.FC<{ timer: EditorTimerEvent; diff --git a/packages/legacy/src/smart/ui/repo/AITranslateLoading.tsx b/packages/legacy/src/smart/ui/repo/AITranslateLoading.tsx index b144fd22..e6bc8f0c 100644 --- a/packages/legacy/src/smart/ui/repo/AITranslateLoading.tsx +++ b/packages/legacy/src/smart/ui/repo/AITranslateLoading.tsx @@ -2,12 +2,12 @@ import { IToastProps } from '@blueprintjs/core'; import { DatasetContext } from '@riboseinc/paneron-extension-kit/context'; import React from 'react'; import { useContext, useMemo } from 'react'; -import { MMELDocument } from '../../model/document'; -import { ModelWrapper } from '../../model/modelwrapper'; -import { MMELRepo } from '../../model/repo'; -import { aiTranslate } from '../../utils/ai/aiagent'; -import { getPathByNS, RepoFileType } from '../../utils/repo/io'; -import { LoadingIcon } from '../common/Loading'; +import { MMELDocument } from '@/smart/model/document'; +import { ModelWrapper } from '@/smart/model/modelwrapper'; +import { MMELRepo } from '@/smart/model/repo'; +import { aiTranslate } from '@/smart/utils/ai/aiagent'; +import { getPathByNS, RepoFileType } from '@/smart/utils/repo/io'; +import { LoadingIcon } from '@/smart/ui/common/Loading'; const AITranslateLoading: React.FC<{ source: MMELRepo; diff --git a/packages/legacy/src/smart/ui/repo/RepoChangeNSButton.tsx b/packages/legacy/src/smart/ui/repo/RepoChangeNSButton.tsx index 985e1170..38071282 100644 --- a/packages/legacy/src/smart/ui/repo/RepoChangeNSButton.tsx +++ b/packages/legacy/src/smart/ui/repo/RepoChangeNSButton.tsx @@ -2,8 +2,8 @@ import { Button, IToastProps } from '@blueprintjs/core'; import { Popover2, Tooltip2 } from '@blueprintjs/popover2'; import React from 'react'; import { useState } from 'react'; -import { RepoIndex } from '../../model/repo'; -import AskIDForSaveMenu from '../popover/AskIDForSaveMenu'; +import { RepoIndex } from '@/smart/model/repo'; +import AskIDForSaveMenu from '@/smart/ui/popover/AskIDForSaveMenu'; const RepoChangeNSButton: React.FC<{ initValue: string; diff --git a/packages/legacy/src/smart/ui/repo/RepoGroup.tsx b/packages/legacy/src/smart/ui/repo/RepoGroup.tsx index df14d943..a8bfeda8 100644 --- a/packages/legacy/src/smart/ui/repo/RepoGroup.tsx +++ b/packages/legacy/src/smart/ui/repo/RepoGroup.tsx @@ -1,9 +1,9 @@ import { IToastProps } from '@blueprintjs/core'; import React from 'react'; -import { reactFlowContainerLayout } from '../../../css/layout'; -import { MMELRepo, RepoIndex, RepoItems, RepoItemType } from '../../model/repo'; -import RepoChangeNSButton from './RepoChangeNSButton'; -import RepoModelFile from './RepoItem'; +import { reactFlowContainerLayout } from '@/css/layout'; +import { MMELRepo, RepoIndex, RepoItems, RepoItemType } from '@/smart/model/repo'; +import RepoChangeNSButton from '@/smart/ui/repo/RepoChangeNSButton'; +import RepoModelFile from '@/smart/ui/repo/RepoItem'; const RepoGroup: React.FC<{ legend: string; diff --git a/packages/legacy/src/smart/ui/repo/RepoImportMenu.tsx b/packages/legacy/src/smart/ui/repo/RepoImportMenu.tsx index 5e99c5f3..9551d1dc 100644 --- a/packages/legacy/src/smart/ui/repo/RepoImportMenu.tsx +++ b/packages/legacy/src/smart/ui/repo/RepoImportMenu.tsx @@ -1,13 +1,13 @@ import { Menu, MenuItem } from '@blueprintjs/core'; import { DatasetContext } from '@riboseinc/paneron-extension-kit/context'; import { useContext } from 'react'; -import { ModelWrapper } from '../../model/modelwrapper'; +import { ModelWrapper } from '@/smart/model/modelwrapper'; import { FILE_TYPE, handleDocumentOpen, handleModelOpen, } from '../../utils/IOFunctions'; -import { MMELDocument } from '../../model/document'; +import { MMELDocument } from '@/smart/model/document'; import React from 'react'; const RepoImportMenu: React.FC<{ diff --git a/packages/legacy/src/smart/ui/repo/RepoInfoPane.tsx b/packages/legacy/src/smart/ui/repo/RepoInfoPane.tsx index 9b51de4a..86d09b75 100644 --- a/packages/legacy/src/smart/ui/repo/RepoInfoPane.tsx +++ b/packages/legacy/src/smart/ui/repo/RepoInfoPane.tsx @@ -1,8 +1,8 @@ import React from 'react'; -import { MMELRepo, RepoIndex } from '../../model/repo'; -import { getRepoItemDesc } from '../../utils/repo/CommonFunctions'; -import { DescriptionItem } from '../common/description/fields'; -import RepoCloseButton from './RepoCloseButton'; +import { MMELRepo, RepoIndex } from '@/smart/model/repo'; +import { getRepoItemDesc } from '@/smart/utils/repo/CommonFunctions'; +import { DescriptionItem } from '@/smart/ui/common/description/fields'; +import RepoCloseButton from '@/smart/ui/repo/RepoCloseButton'; const RepoInfoPane: React.FC<{ repo?: MMELRepo; diff --git a/packages/legacy/src/smart/ui/repo/RepoItem.tsx b/packages/legacy/src/smart/ui/repo/RepoItem.tsx index b66315da..2d8e7cb6 100644 --- a/packages/legacy/src/smart/ui/repo/RepoItem.tsx +++ b/packages/legacy/src/smart/ui/repo/RepoItem.tsx @@ -1,7 +1,7 @@ import { Card, Icon, Menu, MenuItem, Text } from '@blueprintjs/core'; import { ContextMenu2, Tooltip2 } from '@blueprintjs/popover2'; import React from 'react'; -import { RepoItems } from '../../model/repo'; +import { RepoItems } from '@/smart/model/repo'; type VF = () => void; diff --git a/packages/legacy/src/smart/ui/repo/RepoItemSelector.tsx b/packages/legacy/src/smart/ui/repo/RepoItemSelector.tsx index d46d8c38..cb42d45a 100644 --- a/packages/legacy/src/smart/ui/repo/RepoItemSelector.tsx +++ b/packages/legacy/src/smart/ui/repo/RepoItemSelector.tsx @@ -2,8 +2,8 @@ import { Button, Card, Icon, InputGroup, Text } from '@blueprintjs/core'; import { Tooltip2 } from '@blueprintjs/popover2'; import React from 'react'; import { CSSProperties, useState } from 'react'; -import { MMELRepo, RepoIndex, RepoItems, RepoItemType } from '../../model/repo'; -import { LoadingContainer } from '../common/Loading'; +import { MMELRepo, RepoIndex, RepoItems, RepoItemType } from '@/smart/model/repo'; +import { LoadingContainer } from '@/smart/ui/common/Loading'; function matchFilter(item: RepoItems, filter: string) { return ( diff --git a/packages/legacy/src/smart/ui/repo/RepoRenameLoading.tsx b/packages/legacy/src/smart/ui/repo/RepoRenameLoading.tsx index 628e3700..57d70e28 100644 --- a/packages/legacy/src/smart/ui/repo/RepoRenameLoading.tsx +++ b/packages/legacy/src/smart/ui/repo/RepoRenameLoading.tsx @@ -3,11 +3,11 @@ import { DatasetContext } from '@riboseinc/paneron-extension-kit/context'; import { ObjectChangeset } from '@riboseinc/paneron-extension-kit/types/objects'; import React from 'react'; import { useContext, useMemo } from 'react'; -import { MMELJSON } from '../../model/json'; -import { RepoIndex, repoIndexPath } from '../../model/repo'; -import { getAllObjectPaths } from '../../utils/repo/CommonFunctions'; -import { COMMITMSG, getPathByNS, RepoFileType } from '../../utils/repo/io'; -import { LoadingIcon } from '../common/Loading'; +import { MMELJSON } from '@/smart/model/json'; +import { RepoIndex, repoIndexPath } from '@/smart/model/repo'; +import { getAllObjectPaths } from '@/smart/utils/repo/CommonFunctions'; +import { COMMITMSG, getPathByNS, RepoFileType } from '@/smart/utils/repo/io'; +import { LoadingIcon } from '@/smart/ui/common/Loading'; export interface RepoRenameAction { old: string; diff --git a/packages/legacy/src/smart/ui/repo/RepoToolbar.tsx b/packages/legacy/src/smart/ui/repo/RepoToolbar.tsx index a9635864..8c1dfaef 100644 --- a/packages/legacy/src/smart/ui/repo/RepoToolbar.tsx +++ b/packages/legacy/src/smart/ui/repo/RepoToolbar.tsx @@ -1,22 +1,22 @@ import { Button, ControlGroup, Dialog } from '@blueprintjs/core'; import { Popover2 } from '@blueprintjs/popover2'; import React, { useState } from 'react'; -import { MMELDocument } from '../../model/document'; +import { MMELDocument } from '@/smart/model/document'; import { createEditorModelWrapper, ModelWrapper, } from '../../model/modelwrapper'; -import { MMELRepo, RepoIndex, RepoItemType } from '../../model/repo'; +import { MMELRepo, RepoIndex, RepoItemType } from '@/smart/model/repo'; import { EXTENSIONVERSION, MODELVERSION, PANERONVERSION, } from '../../utils/constants'; -import { createNewEditorModel } from '../../utils/EditorFactory'; -import AskIDForSaveMenu from '../popover/AskIDForSaveMenu'; -import RepoAIMenu from './RepoAIMenu'; -import RepoImportMenu from './RepoImportMenu'; -import RepoItemSelector from './RepoItemSelector'; +import { createNewEditorModel } from '@/smart/utils/EditorFactory'; +import AskIDForSaveMenu from '@/smart/ui/popover/AskIDForSaveMenu'; +import RepoAIMenu from '@/smart/ui/repo/RepoAIMenu'; +import RepoImportMenu from '@/smart/ui/repo/RepoImportMenu'; +import RepoItemSelector from '@/smart/ui/repo/RepoItemSelector'; const RepoToolbar: React.FC<{ addMW: (m: ModelWrapper, type: RepoItemType) => void; diff --git a/packages/legacy/src/smart/ui/repo/RepoViewer.tsx b/packages/legacy/src/smart/ui/repo/RepoViewer.tsx index db311cc2..08d743fd 100644 --- a/packages/legacy/src/smart/ui/repo/RepoViewer.tsx +++ b/packages/legacy/src/smart/ui/repo/RepoViewer.tsx @@ -2,7 +2,7 @@ import { InputGroup, IToaster, IToastProps, Toaster } from '@blueprintjs/core'; import { DatasetContext } from '@riboseinc/paneron-extension-kit/context'; import Workspace from '@riboseinc/paneron-extension-kit/widgets/Workspace'; import { useContext, useMemo, useState } from 'react'; -import { ModelWrapper } from '../../model/modelwrapper'; +import { ModelWrapper } from '@/smart/model/modelwrapper'; import { MMELRepo, RepoIndex, @@ -16,20 +16,20 @@ import { MMELToSerializable, RepoFileType, } from '../../utils/repo/io'; -import RepoInfoPane from './RepoInfoPane'; -import { EditorModel } from '../../model/editormodel'; -import { createNewSMARTWorkspace } from '../../model/workspace'; -import { getNamespace } from '../../utils/ModelFunctions'; -import { groupItems, setValueToIndex } from '../../utils/repo/CommonFunctions'; -import { MMELDocument } from '../../model/document'; +import RepoInfoPane from '@/smart/ui/repo/RepoInfoPane'; +import { EditorModel } from '@/smart/model/editormodel'; +import { createNewSMARTWorkspace } from '@/smart/model/workspace'; +import { getNamespace } from '@/smart/utils/ModelFunctions'; +import { groupItems, setValueToIndex } from '@/smart/utils/repo/CommonFunctions'; +import { MMELDocument } from '@/smart/model/document'; import React from 'react'; -import RepoToolbar from './RepoToolbar'; -import { createMapProfile } from '../../model/mapmodel'; -import RepoGroup from './RepoGroup'; -import { ProvisionRDF, RDFVersion } from '../../model/SemanticTriple'; -import RepoRenameLoading, { RepoRenameAction } from './RepoRenameLoading'; -import AITranslateLoading from './AITranslateLoading'; -import { createChangeLog } from '../../model/changelog'; +import RepoToolbar from '@/smart/ui/repo/RepoToolbar'; +import { createMapProfile } from '@/smart/model/mapmodel'; +import RepoGroup from '@/smart/ui/repo/RepoGroup'; +import { ProvisionRDF, RDFVersion } from '@/smart/model/SemanticTriple'; +import RepoRenameLoading, { RepoRenameAction } from '@/smart/ui/repo/RepoRenameLoading'; +import AITranslateLoading from '@/smart/ui/repo/AITranslateLoading'; +import { createChangeLog } from '@/smart/model/changelog'; function matchFilter(item: RepoItems, filter: string) { return ( diff --git a/packages/legacy/src/smart/ui/reporttemplate/MetanormaPrint.tsx b/packages/legacy/src/smart/ui/reporttemplate/MetanormaPrint.tsx index 8b8ea463..d5aabcde 100644 --- a/packages/legacy/src/smart/ui/reporttemplate/MetanormaPrint.tsx +++ b/packages/legacy/src/smart/ui/reporttemplate/MetanormaPrint.tsx @@ -1,9 +1,9 @@ import { Button } from '@blueprintjs/core'; import { DatasetContext } from '@riboseinc/paneron-extension-kit/context'; import React, { useContext } from 'react'; -import MGDDisplayPane from '../../MGDComponents/MGDDisplayPane'; -import { FILE_TYPE, saveToFileSystem } from '../../utils/IOFunctions'; -import * as Logger from '../../../lib/logger'; +import MGDDisplayPane from '@/smart/MGDComponents/MGDDisplayPane'; +import { FILE_TYPE, saveToFileSystem } from '@/smart/utils/IOFunctions'; +import * as Logger from '@/lib/logger'; const MetanormaPrint: React.FC<{ report: string; diff --git a/packages/legacy/src/smart/ui/reporttemplate/doctemplatepane.tsx b/packages/legacy/src/smart/ui/reporttemplate/doctemplatepane.tsx index b6d562a0..358a2dde 100644 --- a/packages/legacy/src/smart/ui/reporttemplate/doctemplatepane.tsx +++ b/packages/legacy/src/smart/ui/reporttemplate/doctemplatepane.tsx @@ -1,19 +1,19 @@ import { Dialog, FormGroup } from '@blueprintjs/core'; import React, { useState } from 'react'; -import { dialogLayout } from '../../../css/layout'; -import MGDDisplayPane from '../../MGDComponents/MGDDisplayPane'; -import { EditorModel } from '../../model/editormodel'; -import { checkId, defaultItemSorter } from '../../utils/ModelFunctions'; +import { dialogLayout } from '@/css/layout'; +import MGDDisplayPane from '@/smart/MGDComponents/MGDDisplayPane'; +import { EditorModel } from '@/smart/model/editormodel'; +import { checkId, defaultItemSorter } from '@/smart/utils/ModelFunctions'; import { IAdditionalListButton, IListItem, IManageHandler, NormalTextField, } from '../common/fields'; -import ListManagePage from '../common/listmanagement/listmanagement'; -import { MappingDoc, MapProfile } from '../../model/mapmodel'; -import { genReport } from '../../utils/reportFunctions'; -import ReportGen from './reportgen'; +import ListManagePage from '@/smart/ui/common/listmanagement/listmanagement'; +import { MappingDoc, MapProfile } from '@/smart/model/mapmodel'; +import { genReport } from '@/smart/utils/reportFunctions'; +import ReportGen from '@/smart/ui/reporttemplate/reportgen'; const DocTemplatePane: React.FC<{ mapProfile: MapProfile; diff --git a/packages/legacy/src/smart/ui/reporttemplate/reportgen.tsx b/packages/legacy/src/smart/ui/reporttemplate/reportgen.tsx index 442107bf..4874bf2f 100644 --- a/packages/legacy/src/smart/ui/reporttemplate/reportgen.tsx +++ b/packages/legacy/src/smart/ui/reporttemplate/reportgen.tsx @@ -1,11 +1,11 @@ import React, { useContext, useState } from 'react'; import { Button, Dialog, FormGroup } from '@blueprintjs/core'; import { DatasetContext } from '@riboseinc/paneron-extension-kit/context'; -import MGDButtonGroup from '../../MGDComponents/MGDButtonGroup'; -import { NormalTextField } from '../common/fields'; -import MGDDisplayPane from '../../MGDComponents/MGDDisplayPane'; -import { FILE_TYPE, saveToFileSystem } from '../../utils/IOFunctions'; -import MetanormaPrint from './MetanormaPrint'; +import MGDButtonGroup from '@/smart/MGDComponents/MGDButtonGroup'; +import { NormalTextField } from '@/smart/ui/common/fields'; +import MGDDisplayPane from '@/smart/MGDComponents/MGDDisplayPane'; +import { FILE_TYPE, saveToFileSystem } from '@/smart/utils/IOFunctions'; +import MetanormaPrint from '@/smart/ui/reporttemplate/MetanormaPrint'; const ReportGen: React.FC<{ report: string; diff --git a/packages/legacy/src/smart/ui/sidebar/QuickEditComponents.tsx b/packages/legacy/src/smart/ui/sidebar/QuickEditComponents.tsx index b1d6f923..07a9dd40 100644 --- a/packages/legacy/src/smart/ui/sidebar/QuickEditComponents.tsx +++ b/packages/legacy/src/smart/ui/sidebar/QuickEditComponents.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import { EditorAction } from '../../model/editor/state'; +import { EditorAction } from '@/smart/model/editor/state'; import { EditorApproval, EditorDataClass, @@ -13,18 +13,18 @@ import { EditorSubprocess, EditorTimerEvent, } from '../../model/editormodel'; -import { RefTextSelection } from '../../model/selectionImport'; +import { RefTextSelection } from '@/smart/model/selectionImport'; import { DataType } from '@paneron/libmmel/interface/baseinterface'; -import { QuickEditableNodeTypes } from '../../utils/constants'; -import { DialogSetterInterface } from '../dialog/EditorDialogs'; -import QuickEditApproval from '../quickedit/approval'; -import QuickEditDataClass from '../quickedit/dataclass'; -import QuickEditEGate from '../quickedit/egate'; -import QuickEditEnd from '../quickedit/end'; -import QuickEditProcess from '../quickedit/process'; -import QuickEditRegistry from '../quickedit/registry'; -import QuickEditSignalEvent from '../quickedit/signalevent'; -import QuickEditTimer from '../quickedit/timer'; +import { QuickEditableNodeTypes } from '@/smart/utils/constants'; +import { DialogSetterInterface } from '@/smart/ui/dialog/EditorDialogs'; +import QuickEditApproval from '@/smart/ui/quickedit/approval'; +import QuickEditDataClass from '@/smart/ui/quickedit/dataclass'; +import QuickEditEGate from '@/smart/ui/quickedit/egate'; +import QuickEditEnd from '@/smart/ui/quickedit/end'; +import QuickEditProcess from '@/smart/ui/quickedit/process'; +import QuickEditRegistry from '@/smart/ui/quickedit/registry'; +import QuickEditSignalEvent from '@/smart/ui/quickedit/signalevent'; +import QuickEditTimer from '@/smart/ui/quickedit/timer'; interface Props { node: EditorNode; diff --git a/packages/legacy/src/smart/ui/sidebar/SimulationDetails.tsx b/packages/legacy/src/smart/ui/sidebar/SimulationDetails.tsx index b12c1a4b..1e3ccc9f 100644 --- a/packages/legacy/src/smart/ui/sidebar/SimulationDetails.tsx +++ b/packages/legacy/src/smart/ui/sidebar/SimulationDetails.tsx @@ -11,7 +11,7 @@ import { import React from 'react'; import { MMELEdge } from '@paneron/libmmel/interface/flowcontrolinterface'; import { Button, Text } from '@blueprintjs/core'; -import { MainFlowNodeTypes } from '../../utils/constants'; +import { MainFlowNodeTypes } from '@/smart/utils/constants'; import { DataType } from '@paneron/libmmel/interface/baseinterface'; import { MMELNote, @@ -25,9 +25,9 @@ import { DescribeStart, DescribeTimer, } from '../common/description/ComponentDescription'; -import { DescribeProcess } from '../common/description/process'; -import { PageHistory } from '../../model/history'; -import { DescribeApproval } from '../common/description/approval'; +import { DescribeProcess } from '@/smart/ui/common/description/process'; +import { PageHistory } from '@/smart/model/history'; +import { DescribeApproval } from '@/smart/ui/common/description/approval'; const SimulationDetails: React.FC<{ location: string; diff --git a/packages/legacy/src/smart/ui/sidebar/SimulationPane.tsx b/packages/legacy/src/smart/ui/sidebar/SimulationPane.tsx index 18348393..d94b1d67 100644 --- a/packages/legacy/src/smart/ui/sidebar/SimulationPane.tsx +++ b/packages/legacy/src/smart/ui/sidebar/SimulationPane.tsx @@ -1,13 +1,13 @@ -import MGDSidebar from '../../MGDComponents/MGDSidebar'; -import { EditorModel, EditorNode } from '../../model/editormodel'; -import { ViewFunctionInterface } from '../../model/ViewFunctionModel'; +import MGDSidebar from '@/smart/MGDComponents/MGDSidebar'; +import { EditorModel, EditorNode } from '@/smart/model/editormodel'; +import { ViewFunctionInterface } from '@/smart/model/ViewFunctionModel'; import { FlowElement, isNode, useStoreState } from 'react-flow-renderer'; import { Button, Text } from '@blueprintjs/core'; import { useEffect, useState } from 'react'; import React from 'react'; -import SimulationDetails from './SimulationDetails'; -import { getSimulationView } from '../../utils/simulation/viewFunctions'; -import { PageHistory } from '../../model/history'; +import SimulationDetails from '@/smart/ui/sidebar/SimulationDetails'; +import { getSimulationView } from '@/smart/utils/simulation/viewFunctions'; +import { PageHistory } from '@/smart/model/history'; const SimulationPane: React.FC<{ model: EditorModel; diff --git a/packages/legacy/src/smart/ui/sidebar/ViewComponentDetails.tsx b/packages/legacy/src/smart/ui/sidebar/ViewComponentDetails.tsx index 8148f01d..89eca5ba 100644 --- a/packages/legacy/src/smart/ui/sidebar/ViewComponentDetails.tsx +++ b/packages/legacy/src/smart/ui/sidebar/ViewComponentDetails.tsx @@ -28,8 +28,8 @@ import { MMELReference, MMELRole, } from '@paneron/libmmel/interface/supportinterface'; -import { SelectableNodeTypes } from '../../utils/constants'; -import { DescribeApproval } from '../common/description/approval'; +import { SelectableNodeTypes } from '@/smart/utils/constants'; +import { DescribeApproval } from '@/smart/ui/common/description/approval'; import { DescribeEGate, DescribeEnd, @@ -37,8 +37,8 @@ import { DescribeStart, DescribeTimer, } from '../common/description/ComponentDescription'; -import { DescribeDC, DescribeRegistry } from '../common/description/data'; -import { DescribeProcess } from '../common/description/process'; +import { DescribeDC, DescribeRegistry } from '@/smart/ui/common/description/data'; +import { DescribeProcess } from '@/smart/ui/common/description/process'; interface Props { node: EditorNode; diff --git a/packages/legacy/src/smart/ui/sidebar/search.tsx b/packages/legacy/src/smart/ui/sidebar/search.tsx index 12132d7f..821b334c 100644 --- a/packages/legacy/src/smart/ui/sidebar/search.tsx +++ b/packages/legacy/src/smart/ui/sidebar/search.tsx @@ -1,17 +1,17 @@ import { Button, InputGroup } from '@blueprintjs/core'; import React, { useMemo, useState } from 'react'; -import { searchResultEntryRow } from '../../../css/shame'; -import MGDContainer from '../../MGDComponents/MGDContainer'; -import MGDLabel from '../../MGDComponents/MGDLabel'; -import MGDSidebar from '../../MGDComponents/MGDSidebar'; -import { EditorModel } from '../../model/editormodel'; -import { HistoryItem } from '../../model/history'; -import * as Logger from '../../../lib/logger'; +import { searchResultEntryRow } from '@/css/shame'; +import MGDContainer from '@/smart/MGDComponents/MGDContainer'; +import MGDLabel from '@/smart/MGDComponents/MGDLabel'; +import MGDSidebar from '@/smart/MGDComponents/MGDSidebar'; +import { EditorModel } from '@/smart/model/editormodel'; +import { HistoryItem } from '@/smart/model/history'; +import * as Logger from '@/lib/logger'; import { findComponent, SearchComponentRecord, } from '../../utils/SearchFunctions'; -import { NumericComboBox } from '../common/fields'; +import { NumericComboBox } from '@/smart/ui/common/fields'; const RECORD_PER_PAGE = 10; diff --git a/packages/legacy/src/smart/ui/sidebar/selected.tsx b/packages/legacy/src/smart/ui/sidebar/selected.tsx index d419e1ab..dda214f9 100644 --- a/packages/legacy/src/smart/ui/sidebar/selected.tsx +++ b/packages/legacy/src/smart/ui/sidebar/selected.tsx @@ -4,32 +4,32 @@ import { jsx } from '@emotion/react'; import React, { useMemo, useState } from 'react'; import { useStoreActions, useStoreState } from 'react-flow-renderer'; -import { EditorModel, isEditorStartEvent } from '../../model/editormodel'; +import { EditorModel, isEditorStartEvent } from '@/smart/model/editormodel'; import { DeletableNodeTypes, EditableNodeTypes, EditAction, } from '../../utils/constants'; -import MGDSidebar from '../../MGDComponents/MGDSidebar'; -import { Describe } from './ViewComponentDetails'; +import MGDSidebar from '@/smart/MGDComponents/MGDSidebar'; +import { Describe } from '@/smart/ui/sidebar/ViewComponentDetails'; import { MMELDataAttribute } from '@paneron/libmmel/interface/datainterface'; import { MMELProvision, MMELReference, } from '@paneron/libmmel/interface/supportinterface'; -import QuickEdit from './QuickEditComponents'; -import { RefTextSelection } from '../../model/selectionImport'; +import QuickEdit from '@/smart/ui/sidebar/QuickEditComponents'; +import { RefTextSelection } from '@/smart/model/selectionImport'; import { Dialog } from '@blueprintjs/core'; -import { dialog_layout, dialog_layout__full } from '../../../css/layout'; -import { EditorAction } from '../../model/editor/state'; +import { dialog_layout, dialog_layout__full } from '@/css/layout'; +import { EditorAction } from '@/smart/model/editor/state'; import { EditNodeType, EditorDiag, EditorDiagPackage, EditorDiagTypes, } from '../dialog/EditorDialogs'; -import { DeleteConfirmMessgae } from '../../utils/ModelRemoveComponentHandler'; -import { deleteNodeAction } from '../../model/editor/commands/elements'; +import { DeleteConfirmMessgae } from '@/smart/utils/ModelRemoveComponentHandler'; +import { deleteNodeAction } from '@/smart/model/editor/commands/elements'; export const SelectedNodeDescription: React.FC<{ model: EditorModel; diff --git a/packages/legacy/src/smart/ui/summary/ProvisionSettings.tsx b/packages/legacy/src/smart/ui/summary/ProvisionSettings.tsx index ad0fad8b..1a8547b7 100644 --- a/packages/legacy/src/smart/ui/summary/ProvisionSettings.tsx +++ b/packages/legacy/src/smart/ui/summary/ProvisionSettings.tsx @@ -1,8 +1,8 @@ import { Button, Checkbox, Dialog, Text } from '@blueprintjs/core'; import React, { useEffect } from 'react'; import { useMemo, useState } from 'react'; -import { dialogLayout, dialogLayoutFull } from '../../../css/layout'; -import MGDSidebar from '../../MGDComponents/MGDSidebar'; +import { dialogLayout, dialogLayoutFull } from '@/css/layout'; +import MGDSidebar from '@/smart/MGDComponents/MGDSidebar'; import { EditorModel, EditorProcess, @@ -13,10 +13,10 @@ import { MMELReference, MMELRole, } from '@paneron/libmmel/interface/supportinterface'; -import { MODAILITYOPTIONS, ModalityType } from '../../utils/constants'; -import { clauseSorter } from '../../utils/ModelFunctions'; -import { NormalComboBox } from '../common/fields'; -import ProvisionSummary from './ProvisionSummary'; +import { MODAILITYOPTIONS, ModalityType } from '@/smart/utils/constants'; +import { clauseSorter } from '@/smart/utils/ModelFunctions'; +import { NormalComboBox } from '@/smart/ui/common/fields'; +import ProvisionSummary from '@/smart/ui/summary/ProvisionSummary'; export interface ClauseSummary { title: string; diff --git a/packages/legacy/src/smart/ui/summary/ProvisionSummary.tsx b/packages/legacy/src/smart/ui/summary/ProvisionSummary.tsx index e4a85289..927de844 100644 --- a/packages/legacy/src/smart/ui/summary/ProvisionSummary.tsx +++ b/packages/legacy/src/smart/ui/summary/ProvisionSummary.tsx @@ -1,11 +1,11 @@ import { Button, ButtonGroup, Text } from '@blueprintjs/core'; import { DatasetContext } from '@riboseinc/paneron-extension-kit/context'; import React, { useContext } from 'react'; -import MGDDisplayPane from '../../MGDComponents/MGDDisplayPane'; -import { FILE_TYPE, saveToFileSystem } from '../../utils/IOFunctions'; -import { clauseSorter } from '../../utils/ModelFunctions'; -import translateObjectToXML from '../../utils/xml/XMLWriter'; -import type { ClauseSummary } from './ProvisionSettings'; +import MGDDisplayPane from '@/smart/MGDComponents/MGDDisplayPane'; +import { FILE_TYPE, saveToFileSystem } from '@/smart/utils/IOFunctions'; +import { clauseSorter } from '@/smart/utils/ModelFunctions'; +import translateObjectToXML from '@/smart/utils/xml/XMLWriter'; +import type { ClauseSummary } from '@/smart/ui/summary/ProvisionSettings'; const ProvisionSummary: React.FC<{ result: Record>; diff --git a/packages/legacy/src/smart/ui/summary/RegistrySummary.tsx b/packages/legacy/src/smart/ui/summary/RegistrySummary.tsx index 678d0226..cca80e69 100644 --- a/packages/legacy/src/smart/ui/summary/RegistrySummary.tsx +++ b/packages/legacy/src/smart/ui/summary/RegistrySummary.tsx @@ -1,17 +1,17 @@ import { Button, Text } from '@blueprintjs/core'; import React from 'react'; import { useMemo, useState } from 'react'; -import { searchResultEntryRow } from '../../../css/shame'; -import MGDContainer from '../../MGDComponents/MGDContainer'; -import MGDLabel from '../../MGDComponents/MGDLabel'; -import MGDSidebar from '../../MGDComponents/MGDSidebar'; -import { EditorModel, isEditorRegistry } from '../../model/editormodel'; -import { PageHistory } from '../../model/history'; +import { searchResultEntryRow } from '@/css/shame'; +import MGDContainer from '@/smart/MGDComponents/MGDContainer'; +import MGDLabel from '@/smart/MGDComponents/MGDLabel'; +import MGDSidebar from '@/smart/MGDComponents/MGDSidebar'; +import { EditorModel, isEditorRegistry } from '@/smart/model/editormodel'; +import { PageHistory } from '@/smart/model/history'; import { computeRegistrySummary, RegSummarySearchRecord, } from '../../utils/summary/RegistrySummary'; -import { NormalComboBox, NumericComboBox } from '../common/fields'; +import { NormalComboBox, NumericComboBox } from '@/smart/ui/common/fields'; const RECORD_PER_PAGE = 10; diff --git a/packages/legacy/src/smart/ui/version/VersionDiffLogView.tsx b/packages/legacy/src/smart/ui/version/VersionDiffLogView.tsx index 72c1660c..eabc56d1 100644 --- a/packages/legacy/src/smart/ui/version/VersionDiffLogView.tsx +++ b/packages/legacy/src/smart/ui/version/VersionDiffLogView.tsx @@ -1,7 +1,7 @@ import { Text } from '@blueprintjs/core'; import React from 'react'; -import { popoverPanelContainer } from '../../../css/layout'; -import { VersionState } from '../../model/versioncompare'; +import { popoverPanelContainer } from '@/css/layout'; +import { VersionState } from '@/smart/model/versioncompare'; const VersionDiffLogView: React.FC<{ id: string; diff --git a/packages/legacy/src/smart/ui/version/VersionTrackerSetting.tsx b/packages/legacy/src/smart/ui/version/VersionTrackerSetting.tsx index 4894cdd8..4b2cb14a 100644 --- a/packages/legacy/src/smart/ui/version/VersionTrackerSetting.tsx +++ b/packages/legacy/src/smart/ui/version/VersionTrackerSetting.tsx @@ -1,20 +1,20 @@ import { Button, Switch, Text } from '@blueprintjs/core'; import { DatasetContext } from '@riboseinc/paneron-extension-kit/context'; import React, { useContext, useEffect, useRef, useState } from 'react'; -import MGDSidebar from '../../MGDComponents/MGDSidebar'; -import { PageHistory } from '../../model/history'; -import { ModelWrapper } from '../../model/modelwrapper'; -import { FunModel } from '../../model/States'; -import { ViewFunctionInterface } from '../../model/ViewFunctionModel'; -import { handleModelOpen } from '../../utils/IOFunctions'; -import { buildModelLinks } from '../../utils/ModelFunctions'; -import * as Logger from '../../../lib/logger'; +import MGDSidebar from '@/smart/MGDComponents/MGDSidebar'; +import { PageHistory } from '@/smart/model/history'; +import { ModelWrapper } from '@/smart/model/modelwrapper'; +import { FunModel } from '@/smart/model/States'; +import { ViewFunctionInterface } from '@/smart/model/ViewFunctionModel'; +import { handleModelOpen } from '@/smart/utils/IOFunctions'; +import { buildModelLinks } from '@/smart/utils/ModelFunctions'; +import * as Logger from '@/lib/logger'; import { computeDiff, getDiffViewProps, getHistroyFromRefModel, } from '../../utils/VersionTracker'; -import { DescriptionItem } from '../common/description/fields'; +import { DescriptionItem } from '@/smart/ui/common/description/fields'; const VersionTrackerSettingPane: React.FC<{ mw: ModelWrapper; diff --git a/packages/legacy/src/smart/ui/workspace/DCDocumentAttributes.tsx b/packages/legacy/src/smart/ui/workspace/DCDocumentAttributes.tsx index d13135e3..ee34971e 100644 --- a/packages/legacy/src/smart/ui/workspace/DCDocumentAttributes.tsx +++ b/packages/legacy/src/smart/ui/workspace/DCDocumentAttributes.tsx @@ -1,17 +1,17 @@ import React from 'react'; -import { EditorDataClass, EditorModel } from '../../model/editormodel'; -import { SMARTDocumentStore } from '../../model/workspace'; +import { EditorDataClass, EditorModel } from '@/smart/model/editormodel'; +import { SMARTDocumentStore } from '@/smart/model/workspace'; import { MMELDataAttribute } from '@paneron/libmmel/interface/datainterface'; import { getModelAllRolesWithEmpty, getRegistryReference, } from '../../utils/ModelFunctions'; -import { isBasicType, isDCClass, isEnum } from '../../utils/typecheckings'; -import { NormalTextField } from '../common/fields'; -import BasicTypeAttribute from './BasicTypeAttribute'; -import { DocumentEditInterface } from './DocumentEditor'; -import EnumAttribute from './EnumAttribute'; -import ReferenceAttributes from './ReferenceAttributes'; +import { isBasicType, isDCClass, isEnum } from '@/smart/utils/typecheckings'; +import { NormalTextField } from '@/smart/ui/common/fields'; +import BasicTypeAttribute from '@/smart/ui/workspace/BasicTypeAttribute'; +import { DocumentEditInterface } from '@/smart/ui/workspace/DocumentEditor'; +import EnumAttribute from '@/smart/ui/workspace/EnumAttribute'; +import ReferenceAttributes from '@/smart/ui/workspace/ReferenceAttributes'; interface DCDocumentAttributesProps { dc: EditorDataClass; diff --git a/packages/legacy/src/smart/ui/workspace/DocumentEditor.tsx b/packages/legacy/src/smart/ui/workspace/DocumentEditor.tsx index aa6e1d3d..e827388a 100644 --- a/packages/legacy/src/smart/ui/workspace/DocumentEditor.tsx +++ b/packages/legacy/src/smart/ui/workspace/DocumentEditor.tsx @@ -1,13 +1,13 @@ import { FormGroup } from '@blueprintjs/core'; import React from 'react'; -import MGDDisplayPane from '../../MGDComponents/MGDDisplayPane'; +import MGDDisplayPane from '@/smart/MGDComponents/MGDDisplayPane'; import { EditorDataClass, EditorModel, isEditorRegistry, } from '../../model/editormodel'; -import { SMARTDocument, SMARTDocumentStore } from '../../model/workspace'; -import DCDocumentAttributes from './DCDocumentAttributes'; +import { SMARTDocument, SMARTDocumentStore } from '@/smart/model/workspace'; +import DCDocumentAttributes from '@/smart/ui/workspace/DCDocumentAttributes'; export type DocumentEditInterface = SMARTDocument & { regid: string }; diff --git a/packages/legacy/src/smart/ui/workspace/EnumAttribute.tsx b/packages/legacy/src/smart/ui/workspace/EnumAttribute.tsx index 464d2cd9..bf0be7d3 100644 --- a/packages/legacy/src/smart/ui/workspace/EnumAttribute.tsx +++ b/packages/legacy/src/smart/ui/workspace/EnumAttribute.tsx @@ -1,6 +1,6 @@ import React from 'react'; import { MMELEnum } from '@paneron/libmmel/interface/datainterface'; -import { NormalComboBox } from '../common/fields'; +import { NormalComboBox } from '@/smart/ui/common/fields'; const EnumAttribute: React.FC<{ value: string; diff --git a/packages/legacy/src/smart/ui/workspace/ReferenceAttributes.tsx b/packages/legacy/src/smart/ui/workspace/ReferenceAttributes.tsx index d9fec57d..daab7129 100644 --- a/packages/legacy/src/smart/ui/workspace/ReferenceAttributes.tsx +++ b/packages/legacy/src/smart/ui/workspace/ReferenceAttributes.tsx @@ -1,8 +1,8 @@ import React from 'react'; -import { SMARTDocumentStore } from '../../model/workspace'; -import { ReferenceSelector } from '../common/fields'; +import { SMARTDocumentStore } from '@/smart/model/workspace'; +import { ReferenceSelector } from '@/smart/ui/common/fields'; -import { isNotUndefined } from '../../../lib/typeHelpers'; +import { isNotUndefined } from '@/lib/typeHelpers'; const ReferenceAttributes: React.FC<{ value: string; diff --git a/packages/legacy/src/smart/ui/workspace/RegistryDocManagement.tsx b/packages/legacy/src/smart/ui/workspace/RegistryDocManagement.tsx index 831864f1..7a0f1f82 100644 --- a/packages/legacy/src/smart/ui/workspace/RegistryDocManagement.tsx +++ b/packages/legacy/src/smart/ui/workspace/RegistryDocManagement.tsx @@ -1,16 +1,16 @@ import React from 'react'; -import { EditorModel } from '../../model/editormodel'; -import { itemSorterByText } from '../../utils/ModelFunctions'; +import { EditorModel } from '@/smart/model/editormodel'; +import { itemSorterByText } from '@/smart/utils/ModelFunctions'; import { IAdditionalListButton, IListItem, IManageHandler, } from '../common/fields'; -import ListManagePage from '../common/listmanagement/listmanagement'; -import { SMARTDocument, SMARTDocumentStore } from '../../model/workspace'; -import DocumentEdit, { DocumentEditInterface } from './DocumentEditor'; +import ListManagePage from '@/smart/ui/common/listmanagement/listmanagement'; +import { SMARTDocument, SMARTDocumentStore } from '@/smart/model/workspace'; +import DocumentEdit, { DocumentEditInterface } from '@/smart/ui/workspace/DocumentEditor'; -import { isNotUndefined } from '../../../lib/typeHelpers'; +import { isNotUndefined } from '@/lib/typeHelpers'; const RegistryDocManagement: React.FC<{ model: EditorModel; diff --git a/packages/legacy/src/smart/ui/workspace/RegistryList.tsx b/packages/legacy/src/smart/ui/workspace/RegistryList.tsx index 74c23e1a..d13001b6 100644 --- a/packages/legacy/src/smart/ui/workspace/RegistryList.tsx +++ b/packages/legacy/src/smart/ui/workspace/RegistryList.tsx @@ -4,13 +4,13 @@ import { EditorRegistry, isEditorRegistry, } from '../../model/editormodel'; -import { defaultItemSorter } from '../../utils/ModelFunctions'; +import { defaultItemSorter } from '@/smart/utils/ModelFunctions'; import { IAdditionalListButton, IListItem, IViewListInterface, } from '../common/fields'; -import ListViewPane from '../common/listmanagement/listview'; +import ListViewPane from '@/smart/ui/common/listmanagement/listview'; const WorkspaceRegistryList: React.FC<{ model: EditorModel; diff --git a/packages/legacy/src/smart/ui/workspace/ViewDataWorkspaceButton.tsx b/packages/legacy/src/smart/ui/workspace/ViewDataWorkspaceButton.tsx index 510f540a..f09da280 100644 --- a/packages/legacy/src/smart/ui/workspace/ViewDataWorkspaceButton.tsx +++ b/packages/legacy/src/smart/ui/workspace/ViewDataWorkspaceButton.tsx @@ -1,7 +1,7 @@ import { Button } from '@blueprintjs/core'; import { Tooltip2 } from '@blueprintjs/popover2'; import React from 'react'; -import { flownodeTopRightButtonLayout } from '../../../css/layout'; +import { flownodeTopRightButtonLayout } from '@/css/layout'; const ViewWorkspaceButton: React.FC<{ onClick: () => void; diff --git a/packages/legacy/src/smart/utils/Comments.ts b/packages/legacy/src/smart/utils/Comments.ts index 86a2debb..7e3feb78 100644 --- a/packages/legacy/src/smart/utils/Comments.ts +++ b/packages/legacy/src/smart/utils/Comments.ts @@ -1,6 +1,6 @@ import { DataType } from '@paneron/libmmel/interface/baseinterface'; import { MMELComment } from '@paneron/libmmel/interface/supportinterface'; -import { findUniqueID } from './ModelFunctions'; +import { findUniqueID } from '@/smart/utils/ModelFunctions'; export interface CommentInstance { id: string; diff --git a/packages/legacy/src/smart/utils/DocumentFunctions.ts b/packages/legacy/src/smart/utils/DocumentFunctions.ts index 3fbc8139..f690fa7c 100644 --- a/packages/legacy/src/smart/utils/DocumentFunctions.ts +++ b/packages/legacy/src/smart/utils/DocumentFunctions.ts @@ -1,9 +1,9 @@ import React from 'react'; -import { DocMapIndex, MMELDocument } from '../model/document'; -import { MappingType } from '../model/mapmodel'; -import { DOCVERSION } from './constants'; -import { createNewMMELDocument } from './EditorFactory'; -import * as Logger from '../../lib/logger'; +import { DocMapIndex, MMELDocument } from '@/smart/model/document'; +import { MappingType } from '@/smart/model/mapmodel'; +import { DOCVERSION } from '@/smart/utils/constants'; +import { createNewMMELDocument } from '@/smart/utils/EditorFactory'; +import * as Logger from '@/lib/logger'; function addMetaField(doc: MMELDocument, id: string, value: string) { if (id === 'namespace') { diff --git a/packages/legacy/src/smart/utils/EditorFactory.ts b/packages/legacy/src/smart/utils/EditorFactory.ts index 2f56ad17..02770f34 100644 --- a/packages/legacy/src/smart/utils/EditorFactory.ts +++ b/packages/legacy/src/smart/utils/EditorFactory.ts @@ -35,8 +35,8 @@ import { EditorSubprocess, EditorTimerEvent, } from '../model/editormodel'; -import { DOCVERSION, MODELVERSION } from './constants'; -import { MMELDocument } from '../model/document'; +import { DOCVERSION, MODELVERSION } from '@/smart/utils/constants'; +import { MMELDocument } from '@/smart/model/document'; export function createNewEditorModel(): EditorModel { const start = createStartEvent('Start1'); diff --git a/packages/legacy/src/smart/utils/IOFunctions.ts b/packages/legacy/src/smart/utils/IOFunctions.ts index 742911f5..0f178458 100644 --- a/packages/legacy/src/smart/utils/IOFunctions.ts +++ b/packages/legacy/src/smart/utils/IOFunctions.ts @@ -1,9 +1,9 @@ import { SaveFileDialogProps } from '@riboseinc/paneron-extension-kit/types/dialogs'; -import { MMELDocument } from '../model/document'; -import { EditorModel } from '../model/editormodel'; -import { MapProfile } from '../model/mapmodel'; -import { createEditorModelWrapper, ModelWrapper } from '../model/modelwrapper'; -import { SMARTWorkspace } from '../model/workspace'; +import { MMELDocument } from '@/smart/model/document'; +import { EditorModel } from '@/smart/model/editormodel'; +import { MapProfile } from '@/smart/model/mapmodel'; +import { createEditorModelWrapper, ModelWrapper } from '@/smart/model/modelwrapper'; +import { SMARTWorkspace } from '@/smart/model/workspace'; import { textToMMEL } from '@paneron/libmmel'; import { LoggerInterface, @@ -12,10 +12,10 @@ import { OpenFileInterface, WSVERSION, } from './constants'; -import { textToDoc } from './DocumentFunctions'; -import * as Logger from '../../lib/logger'; -import { bsiToDocument } from './xml/BSIXML'; -import { xmlToDocument } from './xml/XMLDocumentFunctions'; +import { textToDoc } from '@/smart/utils/DocumentFunctions'; +import * as Logger from '@/lib/logger'; +import { bsiToDocument } from '@/smart/utils/xml/BSIXML'; +import { xmlToDocument } from '@/smart/utils/xml/XMLDocumentFunctions'; export interface FileTypeDescriptionInterface { filtername: string; diff --git a/packages/legacy/src/smart/utils/ModelAddComponentHandler.ts b/packages/legacy/src/smart/utils/ModelAddComponentHandler.ts index f563f205..2a2f7f84 100644 --- a/packages/legacy/src/smart/utils/ModelAddComponentHandler.ts +++ b/packages/legacy/src/smart/utils/ModelAddComponentHandler.ts @@ -12,8 +12,8 @@ import { EditorTimerEvent, } from '../model/editormodel'; import { DataType } from '@paneron/libmmel/interface/baseinterface'; -import { capitalizeString, findUniqueID, trydefaultID } from './ModelFunctions'; -import { NewComponentTypes } from './constants'; +import { capitalizeString, findUniqueID, trydefaultID } from '@/smart/utils/ModelFunctions'; +import { NewComponentTypes } from '@/smart/utils/constants'; import { createApproval, createEGate, @@ -25,8 +25,8 @@ import { createSubprocessComponent, createTimerEvent, } from './EditorFactory'; -import { HistoryItem } from '../model/history'; -import { ModelAction } from '../model/editor/model'; +import { HistoryItem } from '@/smart/model/history'; +import { ModelAction } from '@/smart/model/editor/model'; type Elements = Record; diff --git a/packages/legacy/src/smart/utils/ModelFunctions.ts b/packages/legacy/src/smart/utils/ModelFunctions.ts index 8916b979..69513477 100644 --- a/packages/legacy/src/smart/utils/ModelFunctions.ts +++ b/packages/legacy/src/smart/utils/ModelFunctions.ts @@ -21,7 +21,7 @@ import { MMELReference, MMELRole, } from '@paneron/libmmel/interface/supportinterface'; -import { IListItem } from '../ui/common/fields'; +import { IListItem } from '@/smart/ui/common/fields'; const TypeReferenceHead = 'reference('; const TypeReferenceTail = ')'; diff --git a/packages/legacy/src/smart/utils/ModelImport.ts b/packages/legacy/src/smart/utils/ModelImport.ts index 7e4f578c..578964e5 100644 --- a/packages/legacy/src/smart/utils/ModelImport.ts +++ b/packages/legacy/src/smart/utils/ModelImport.ts @@ -31,7 +31,7 @@ import { getReferenceDCTypeName, findUniqueID, } from './ModelFunctions'; -import * as Logger from '../../lib/logger'; +import * as Logger from '@/lib/logger'; export interface NewImportItems { elements: Record; diff --git a/packages/legacy/src/smart/utils/ModelRemoveComponentHandler.ts b/packages/legacy/src/smart/utils/ModelRemoveComponentHandler.ts index 6027c181..682c54ff 100644 --- a/packages/legacy/src/smart/utils/ModelRemoveComponentHandler.ts +++ b/packages/legacy/src/smart/utils/ModelRemoveComponentHandler.ts @@ -1,5 +1,5 @@ import { DataType } from '@paneron/libmmel/interface/baseinterface'; -import { DeletableNodeTypes } from './constants'; +import { DeletableNodeTypes } from '@/smart/utils/constants'; export const DeleteConfirmMessgae: Record = { [DataType.PROCESS] : 'Confirm deleting the process?', diff --git a/packages/legacy/src/smart/utils/SearchFunctions.ts b/packages/legacy/src/smart/utils/SearchFunctions.ts index a95cc4e3..b13fbb1c 100644 --- a/packages/legacy/src/smart/utils/SearchFunctions.ts +++ b/packages/legacy/src/smart/utils/SearchFunctions.ts @@ -1,5 +1,5 @@ import { SerializedStyles } from '@emotion/react'; -import { search_style__highlight } from '../../css/visual'; +import { search_style__highlight } from '@/css/visual'; import { EditorApproval, EditorDataClass, @@ -16,12 +16,12 @@ import { isEditorProcess, isEditorRegistry, } from '../model/editormodel'; -import { createModelHistory, HistoryItem } from '../model/history'; -import { LegendInterface } from '../model/States'; +import { createModelHistory, HistoryItem } from '@/smart/model/history'; +import { LegendInterface } from '@/smart/model/States'; import { DataType } from '@paneron/libmmel/interface/baseinterface'; import { isRegistry } from '@paneron/libmmel/util/validation'; -import { SearchableNodeTypes } from './constants'; -import { isSearchableNodeTypes } from './typecheckings'; +import { SearchableNodeTypes } from '@/smart/utils/constants'; +import { isSearchableNodeTypes } from '@/smart/utils/typecheckings'; type SearchResultType = 'Process' | 'Approval' | 'Data' | 'Event' | 'Gateway'; diff --git a/packages/legacy/src/smart/utils/VersionTracker.ts b/packages/legacy/src/smart/utils/VersionTracker.ts index 24c4a8e5..a3893293 100644 --- a/packages/legacy/src/smart/utils/VersionTracker.ts +++ b/packages/legacy/src/smart/utils/VersionTracker.ts @@ -1,5 +1,5 @@ import React from 'react'; -import { flow_node__highlighed, no_highlight } from '../../css/visual'; +import { flow_node__highlighed, no_highlight } from '@/css/visual'; import { EditorApproval, EditorDataClass, @@ -18,13 +18,13 @@ import { isEditorSignalEvent, isEditorTimerEvent, } from '../model/editormodel'; -import { HistoryItem, PageHistory } from '../model/history'; -import { ModelWrapper } from '../model/modelwrapper'; -import { LegendInterface } from '../model/States'; -import { VersionState, VersionStatus } from '../model/versioncompare'; -import { ViewFunctionInterface } from '../model/ViewFunctionModel'; -import VersionDiffLogView from '../ui/version/VersionDiffLogView'; -import { getRootName } from './ModelFunctions'; +import { HistoryItem, PageHistory } from '@/smart/model/history'; +import { ModelWrapper } from '@/smart/model/modelwrapper'; +import { LegendInterface } from '@/smart/model/States'; +import { VersionState, VersionStatus } from '@/smart/model/versioncompare'; +import { ViewFunctionInterface } from '@/smart/model/ViewFunctionModel'; +import VersionDiffLogView from '@/smart/ui/version/VersionDiffLogView'; +import { getRootName } from '@/smart/utils/ModelFunctions'; const ComparisonResultStyles: Record = { 'same' : { label : 'Identical', color : 'lightblue' }, diff --git a/packages/legacy/src/smart/utils/ai/aiagent.ts b/packages/legacy/src/smart/utils/ai/aiagent.ts index 83cb1a54..437c58ec 100644 --- a/packages/legacy/src/smart/utils/ai/aiagent.ts +++ b/packages/legacy/src/smart/utils/ai/aiagent.ts @@ -1,4 +1,4 @@ -import { MMELDocument } from '../../model/document'; +import { MMELDocument } from '@/smart/model/document'; import { EditorModel, EditorProcess, @@ -15,7 +15,7 @@ import { MMELNote, MMELTextSection, } from '@paneron/libmmel/interface/supportinterface'; -import { detectModality } from '../../ui/edit/components/ProvisionList'; +import { detectModality } from '@/smart/ui/edit/components/ProvisionList'; import { createEdge, createNewEditorModel, @@ -27,8 +27,8 @@ import { createSubprocessComponent, createTerm, } from '../EditorFactory'; -import { createNewPage } from '../ModelAddComponentHandler'; -import * as Logger from '../../../lib/logger'; +import { createNewPage } from '@/smart/utils/ModelAddComponentHandler'; +import * as Logger from '@/lib/logger'; type Sections = Record; type NoteType = MMELNote['type']; diff --git a/packages/legacy/src/smart/utils/checklist/ChecklistViewer.ts b/packages/legacy/src/smart/utils/checklist/ChecklistViewer.ts index a7c92a78..c9c63687 100644 --- a/packages/legacy/src/smart/utils/checklist/ChecklistViewer.ts +++ b/packages/legacy/src/smart/utils/checklist/ChecklistViewer.ts @@ -1,15 +1,15 @@ import React from 'react'; -import { CSSROOTVARIABLES } from '../../../css/root.css'; -import { flow_node__highlighed } from '../../../css/visual'; -import { ChecklistPackage } from '../../model/checklist'; -import { EditorModel } from '../../model/editormodel'; -import { ViewFunctionInterface } from '../../model/ViewFunctionModel'; +import { CSSROOTVARIABLES } from '@/css/root.css'; +import { flow_node__highlighed } from '@/css/visual'; +import { ChecklistPackage } from '@/smart/model/checklist'; +import { EditorModel } from '@/smart/model/editormodel'; +import { ViewFunctionInterface } from '@/smart/model/ViewFunctionModel'; import { MMELDataAttribute } from '@paneron/libmmel/interface/datainterface'; import { MMELProvision, MMELReference, } from '@paneron/libmmel/interface/supportinterface'; -import CheckListAddon from '../../ui/checklist/CheckListAddon'; +import CheckListAddon from '@/smart/ui/checklist/CheckListAddon'; const okcolor = 'lightgreen'; const normalcolor = CSSROOTVARIABLES['--plain-node-color']; diff --git a/packages/legacy/src/smart/utils/checklist/CheckllistInitializer.ts b/packages/legacy/src/smart/utils/checklist/CheckllistInitializer.ts index c2b7da7d..b192c5ed 100644 --- a/packages/legacy/src/smart/utils/checklist/CheckllistInitializer.ts +++ b/packages/legacy/src/smart/utils/checklist/CheckllistInitializer.ts @@ -23,8 +23,8 @@ import { isEditorProcess, isEditorRegistry, } from '../../model/editormodel'; -import { ModalityType } from '../constants'; -import { calculateReach, calInitEGates } from './ChecklistCalculator'; +import { ModalityType } from '@/smart/utils/constants'; +import { calculateReach, calInitEGates } from '@/smart/utils/checklist/ChecklistCalculator'; export function calculateTaskList( model: EditorModel, diff --git a/packages/legacy/src/smart/utils/handler/cascadeModelHandler.ts b/packages/legacy/src/smart/utils/handler/cascadeModelHandler.ts index 3f45fcfb..2d9b0941 100644 --- a/packages/legacy/src/smart/utils/handler/cascadeModelHandler.ts +++ b/packages/legacy/src/smart/utils/handler/cascadeModelHandler.ts @@ -18,7 +18,7 @@ import { MMELProvision, } from '@paneron/libmmel/interface/supportinterface'; import { isApproval } from '@paneron/libmmel/util/validation'; -import { setReplace } from '../ModelFunctions'; +import { setReplace } from '@/smart/utils/ModelFunctions'; export type RoleAttribute = 'actor' | 'approver'; diff --git a/packages/legacy/src/smart/utils/map/AutoMap.ts b/packages/legacy/src/smart/utils/map/AutoMap.ts index 162f7171..ffa364d7 100644 --- a/packages/legacy/src/smart/utils/map/AutoMap.ts +++ b/packages/legacy/src/smart/utils/map/AutoMap.ts @@ -1,10 +1,10 @@ import { Edge, Node, Position } from 'react-flow-renderer'; -import { EditorModel, isEditorProcess } from '../../model/editormodel'; -import { MapProfile } from '../../model/mapmodel'; -import { ModelWrapper } from '../../model/modelwrapper'; -import { MMELRepo, RepoIndex } from '../../model/repo'; -import { createEdge, RepoLegend, RepoNodeType } from '../repo/CommonFunctions'; -import { getPathByNS, RepoFileType } from '../repo/io'; +import { EditorModel, isEditorProcess } from '@/smart/model/editormodel'; +import { MapProfile } from '@/smart/model/mapmodel'; +import { ModelWrapper } from '@/smart/model/modelwrapper'; +import { MMELRepo, RepoIndex } from '@/smart/model/repo'; +import { createEdge, RepoLegend, RepoNodeType } from '@/smart/utils/repo/CommonFunctions'; +import { getPathByNS, RepoFileType } from '@/smart/utils/repo/io'; type Maps = Record; type Nodes = Record; diff --git a/packages/legacy/src/smart/utils/map/MappingCalculator.ts b/packages/legacy/src/smart/utils/map/MappingCalculator.ts index c8ad9a7b..032b30d4 100644 --- a/packages/legacy/src/smart/utils/map/MappingCalculator.ts +++ b/packages/legacy/src/smart/utils/map/MappingCalculator.ts @@ -1,5 +1,5 @@ import { RefObject } from 'react'; -import { CSSROOTVARIABLES } from '../../../css/root.css'; +import { CSSROOTVARIABLES } from '@/css/root.css'; import { map_style_diff__source, map_style__coverage, @@ -14,8 +14,8 @@ import { isEditorProcess, ModelType, } from '../../model/editormodel'; -import { PageHistory } from '../../model/history'; -import { LegendInterface, MapperSelectedInterface } from '../../model/States'; +import { PageHistory } from '@/smart/model/history'; +import { LegendInterface, MapperSelectedInterface } from '@/smart/model/States'; import { MappingDoc, MappingMeta, @@ -24,9 +24,9 @@ import { MapSet, } from '../../model/mapmodel'; import { SerializedStyles } from '@emotion/react'; -import { DocStatement, MMELDocument } from '../../model/document'; -import { getNamespace } from '../ModelFunctions'; -import { getMapDiffStyleById } from './MappingDiff'; +import { DocStatement, MMELDocument } from '@/smart/model/document'; +import { getNamespace } from '@/smart/utils/ModelFunctions'; +import { getMapDiffStyleById } from '@/smart/utils/map/MappingDiff'; export enum MapCoverType { FULL = 'full', diff --git a/packages/legacy/src/smart/utils/map/MappingDiff.ts b/packages/legacy/src/smart/utils/map/MappingDiff.ts index cd315150..2659e87d 100644 --- a/packages/legacy/src/smart/utils/map/MappingDiff.ts +++ b/packages/legacy/src/smart/utils/map/MappingDiff.ts @@ -1,18 +1,18 @@ import { SerializedStyles } from '@emotion/react'; import { Edge, Elements, Node, Position } from 'react-flow-renderer'; -import { map_style_diff__coverage } from '../../../css/visual'; -import { MappingType, MapProfile } from '../../model/mapmodel'; -import { MMELRepo, RepoIndex } from '../../model/repo'; -import { LegendInterface } from '../../model/States'; -import { createNodeContent } from '../../ui/mapper/repo/RepoMapNode'; -import { calculateDocumentMapping } from '../DocumentFunctions'; +import { map_style_diff__coverage } from '@/css/visual'; +import { MappingType, MapProfile } from '@/smart/model/mapmodel'; +import { MMELRepo, RepoIndex } from '@/smart/model/repo'; +import { LegendInterface } from '@/smart/model/States'; +import { createNodeContent } from '@/smart/ui/mapper/repo/RepoMapNode'; +import { calculateDocumentMapping } from '@/smart/utils/DocumentFunctions'; import { createEdge, getRepoItemDesc, RepoDiffLegend, RepoNodeDiffType, } from '../repo/CommonFunctions'; -import { getPathByNS, RepoFileType } from '../repo/io'; +import { getPathByNS, RepoFileType } from '@/smart/utils/repo/io'; import { MapCoverType, MapDiffEdgeResult, diff --git a/packages/legacy/src/smart/utils/map/RepoMap.ts b/packages/legacy/src/smart/utils/map/RepoMap.ts index d224845e..6e2e2ecb 100644 --- a/packages/legacy/src/smart/utils/map/RepoMap.ts +++ b/packages/legacy/src/smart/utils/map/RepoMap.ts @@ -1,14 +1,14 @@ import { Edge, Elements, Node, Position } from 'react-flow-renderer'; -import { MapProfile } from '../../model/mapmodel'; -import { MMELRepo, RepoIndex } from '../../model/repo'; -import { createNodeContent } from '../../ui/mapper/repo/RepoMapNode'; +import { MapProfile } from '@/smart/model/mapmodel'; +import { MMELRepo, RepoIndex } from '@/smart/model/repo'; +import { createNodeContent } from '@/smart/ui/mapper/repo/RepoMapNode'; import { createEdge, getRepoItemDesc, RepoLegend, RepoNodeType, } from '../repo/CommonFunctions'; -import { getPathByNS, RepoFileType } from '../repo/io'; +import { getPathByNS, RepoFileType } from '@/smart/utils/repo/io'; type Maps = Record; type Nodes = Record; diff --git a/packages/legacy/src/smart/utils/measurement/BasicFunctions.ts b/packages/legacy/src/smart/utils/measurement/BasicFunctions.ts index 48981799..490463c1 100644 --- a/packages/legacy/src/smart/utils/measurement/BasicFunctions.ts +++ b/packages/legacy/src/smart/utils/measurement/BasicFunctions.ts @@ -1,4 +1,4 @@ -import { MTreeNode } from '../../model/Measurement'; +import { MTreeNode } from '@/smart/model/Measurement'; import { MMELVariable } from '@paneron/libmmel/interface/supportinterface'; import { MBinaryOperators, diff --git a/packages/legacy/src/smart/utils/measurement/Checker.ts b/packages/legacy/src/smart/utils/measurement/Checker.ts index 724f3943..2c02eb51 100644 --- a/packages/legacy/src/smart/utils/measurement/Checker.ts +++ b/packages/legacy/src/smart/utils/measurement/Checker.ts @@ -13,12 +13,12 @@ import { MeasureRType, MTestReport, } from '../../model/Measurement'; -import { LegendInterface } from '../../model/States'; +import { LegendInterface } from '@/smart/model/States'; import { MMELEdge } from '@paneron/libmmel/interface/flowcontrolinterface'; import { MMELTable, VarType } from '@paneron/libmmel/interface/supportinterface'; -import { buildEdgeConnections } from '../ModelFunctions'; -import { evaluateCondition, resolveMTNode } from './Evaluator'; -import { parseMeasurement } from './Parser'; +import { buildEdgeConnections } from '@/smart/utils/ModelFunctions'; +import { evaluateCondition, resolveMTNode } from '@/smart/utils/measurement/Evaluator'; +import { parseMeasurement } from '@/smart/utils/measurement/Parser'; export const MeasureResultStyles: Record = { [MeasureRType.OK] : { label : 'OK: Test passed', color : 'lightgreen' }, diff --git a/packages/legacy/src/smart/utils/measurement/Evaluator.ts b/packages/legacy/src/smart/utils/measurement/Evaluator.ts index 8878846f..f01eb1fd 100644 --- a/packages/legacy/src/smart/utils/measurement/Evaluator.ts +++ b/packages/legacy/src/smart/utils/measurement/Evaluator.ts @@ -4,9 +4,9 @@ import { MTestReport, MTreeNode, } from '../../model/Measurement'; -import { isBinaryOperator, isListOperator } from './BasicFunctions'; -import { MBOperators, MComparison, MLOperators } from './Operators'; -import { parseCondition } from './Parser'; +import { isBinaryOperator, isListOperator } from '@/smart/utils/measurement/BasicFunctions'; +import { MBOperators, MComparison, MLOperators } from '@/smart/utils/measurement/Operators'; +import { parseCondition } from '@/smart/utils/measurement/Parser'; export function getFinalValueFromNode(a: MTreeNode): string | number { if (Array.isArray(a.value)) { diff --git a/packages/legacy/src/smart/utils/measurement/Operators.ts b/packages/legacy/src/smart/utils/measurement/Operators.ts index 86538fa1..ff7b425e 100644 --- a/packages/legacy/src/smart/utils/measurement/Operators.ts +++ b/packages/legacy/src/smart/utils/measurement/Operators.ts @@ -3,8 +3,8 @@ import { EnviromentVariables, MTreeNode, } from '../../model/Measurement'; -import { createMTreeNodeWithValue } from './BasicFunctions'; -import { getListFromNode, getValueFromNode } from './Evaluator'; +import { createMTreeNodeWithValue } from '@/smart/utils/measurement/BasicFunctions'; +import { getListFromNode, getValueFromNode } from '@/smart/utils/measurement/Evaluator'; export type BinaryOperator = ( a: MTreeNode, diff --git a/packages/legacy/src/smart/utils/measurement/Parser.ts b/packages/legacy/src/smart/utils/measurement/Parser.ts index 88884675..9bcff9b1 100644 --- a/packages/legacy/src/smart/utils/measurement/Parser.ts +++ b/packages/legacy/src/smart/utils/measurement/Parser.ts @@ -1,5 +1,5 @@ -import { MTreeNode } from '../../model/Measurement'; -import { isSpace } from '../parser_helpers'; +import { MTreeNode } from '@/smart/model/Measurement'; +import { isSpace } from '@/smart/utils/parser_helpers'; import { createMTreeNodeWithOperator, createMTreeNodeWithValue, @@ -7,7 +7,7 @@ import { isBinaryOperator, isListOperator, } from './BasicFunctions'; -import { MComparators, MComparatorTypes } from './Operators'; +import { MComparators, MComparatorTypes } from '@/smart/utils/measurement/Operators'; export interface MToken { text: string; diff --git a/packages/legacy/src/smart/utils/nlp/nlp.ts b/packages/legacy/src/smart/utils/nlp/nlp.ts index 6499b11a..767096f7 100644 --- a/packages/legacy/src/smart/utils/nlp/nlp.ts +++ b/packages/legacy/src/smart/utils/nlp/nlp.ts @@ -1,6 +1,6 @@ import { ArrowHeadType, Edge, Elements, Node } from 'react-flow-renderer'; -import { isEditorProcess } from '../../model/editormodel'; -import { ModelWrapper } from '../../model/modelwrapper'; +import { isEditorProcess } from '@/smart/model/editormodel'; +import { ModelWrapper } from '@/smart/model/modelwrapper'; import { NLPItem, NLPJSON, @@ -11,7 +11,7 @@ import { STNode, STRelation, } from '../../model/SemanticTriple'; -import * as Logger from '../../../lib/logger'; +import * as Logger from '@/lib/logger'; const nlpServer = 'http://localhost:9000'; const width = 180; diff --git a/packages/legacy/src/smart/utils/nlp/query.ts b/packages/legacy/src/smart/utils/nlp/query.ts index 4832bd6d..eac40359 100644 --- a/packages/legacy/src/smart/utils/nlp/query.ts +++ b/packages/legacy/src/smart/utils/nlp/query.ts @@ -4,8 +4,8 @@ import { RDFVersion, STNode, } from '../../model/SemanticTriple'; -import * as Logger from '../../../lib/logger'; -import { converQuestionRDF, parseText } from './nlp'; +import * as Logger from '@/lib/logger'; +import { converQuestionRDF, parseText } from '@/smart/utils/nlp/nlp'; const QuestionWords = [ 'what', diff --git a/packages/legacy/src/smart/utils/repo/CommonFunctions.ts b/packages/legacy/src/smart/utils/repo/CommonFunctions.ts index e5e994cd..b6c1bd25 100644 --- a/packages/legacy/src/smart/utils/repo/CommonFunctions.ts +++ b/packages/legacy/src/smart/utils/repo/CommonFunctions.ts @@ -6,8 +6,8 @@ import { RepoItems, RepoRefItem, } from '../../model/repo'; -import { LegendInterface } from '../../model/States'; -import { getPathByNS, RepoFileType } from './io'; +import { LegendInterface } from '@/smart/model/States'; +import { getPathByNS, RepoFileType } from '@/smart/utils/repo/io'; export type RepoNodeType = 'own' | 'repo' | 'outside'; diff --git a/packages/legacy/src/smart/utils/repo/LinkAnalysis.ts b/packages/legacy/src/smart/utils/repo/LinkAnalysis.ts index f3e5b28d..f52e3500 100644 --- a/packages/legacy/src/smart/utils/repo/LinkAnalysis.ts +++ b/packages/legacy/src/smart/utils/repo/LinkAnalysis.ts @@ -1,13 +1,13 @@ import { Edge, Elements, Node, Position } from 'react-flow-renderer'; -import { ModelWrapper } from '../../model/modelwrapper'; -import { MMELRepo, RepoIndex } from '../../model/repo'; -import { createNodeContent } from '../../ui/mapper/repo/RepoMapNode'; +import { ModelWrapper } from '@/smart/model/modelwrapper'; +import { MMELRepo, RepoIndex } from '@/smart/model/repo'; +import { createNodeContent } from '@/smart/ui/mapper/repo/RepoMapNode'; import { getRepoItemDesc, RepoLegend, RepoNodeType, } from '../repo/CommonFunctions'; -import { getPathByNS, RepoFileType } from './io'; +import { getPathByNS, RepoFileType } from '@/smart/utils/repo/io'; type Nodes = Record; type Edges = Record; diff --git a/packages/legacy/src/smart/utils/repo/io.ts b/packages/legacy/src/smart/utils/repo/io.ts index 09dc6aa6..82428ec0 100644 --- a/packages/legacy/src/smart/utils/repo/io.ts +++ b/packages/legacy/src/smart/utils/repo/io.ts @@ -33,9 +33,9 @@ import { MMELNote, MMELProvision, } from '@paneron/libmmel/interface/supportinterface'; -import { MODELVERSION } from '../constants'; -import { createMetaData } from '../EditorFactory'; -import * as Logger from '../../../lib/logger'; +import { MODELVERSION } from '@/smart/utils/constants'; +import { createMetaData } from '@/smart/utils/EditorFactory'; +import * as Logger from '@/lib/logger'; export enum RepoFileType { MODEL = 'model', diff --git a/packages/legacy/src/smart/utils/reportFunctions.ts b/packages/legacy/src/smart/utils/reportFunctions.ts index 757ce4fa..841d1fed 100644 --- a/packages/legacy/src/smart/utils/reportFunctions.ts +++ b/packages/legacy/src/smart/utils/reportFunctions.ts @@ -3,11 +3,11 @@ import { isEditorApproval, isEditorProcess, } from '../model/editormodel'; -import { getNamespace, referenceSorter } from './ModelFunctions'; -import * as Logger from '../../lib/logger'; -import { MapProfile } from '../model/mapmodel'; +import { getNamespace, referenceSorter } from '@/smart/utils/ModelFunctions'; +import * as Logger from '@/lib/logger'; +import { MapProfile } from '@/smart/model/mapmodel'; import { Liquid } from 'liquidjs'; -import { MMELToSerializable } from './repo/io'; +import { MMELToSerializable } from '@/smart/utils/repo/io'; export function genReport( text: string, diff --git a/packages/legacy/src/smart/utils/simulation/viewFunctions.ts b/packages/legacy/src/smart/utils/simulation/viewFunctions.ts index 44bb3ded..ffb0111d 100644 --- a/packages/legacy/src/smart/utils/simulation/viewFunctions.ts +++ b/packages/legacy/src/smart/utils/simulation/viewFunctions.ts @@ -1,7 +1,7 @@ -import { CSSROOTVARIABLES } from '../../../css/root.css'; -import { flow_node__highlighed } from '../../../css/visual'; -import { SimulationState } from '../../model/simulation'; -import { ViewFunctionInterface } from '../../model/ViewFunctionModel'; +import { CSSROOTVARIABLES } from '@/css/root.css'; +import { flow_node__highlighed } from '@/css/visual'; +import { SimulationState } from '@/smart/model/simulation'; +import { ViewFunctionInterface } from '@/smart/model/ViewFunctionModel'; const selectedcolor = 'lightyellow'; const normalcolor = CSSROOTVARIABLES['--plain-node-color']; diff --git a/packages/legacy/src/smart/utils/summary/RegistrySummary.ts b/packages/legacy/src/smart/utils/summary/RegistrySummary.ts index ba00acf3..8da4adbf 100644 --- a/packages/legacy/src/smart/utils/summary/RegistrySummary.ts +++ b/packages/legacy/src/smart/utils/summary/RegistrySummary.ts @@ -11,7 +11,7 @@ import { createPageHistory, PageHistory, } from '../../model/history'; -import { LegendInterface } from '../../model/States'; +import { LegendInterface } from '@/smart/model/States'; export enum SearchHighlightType { SELECTED = 'selected', diff --git a/packages/legacy/src/smart/utils/typecheckings.ts b/packages/legacy/src/smart/utils/typecheckings.ts index 5fef9942..3e5a1448 100644 --- a/packages/legacy/src/smart/utils/typecheckings.ts +++ b/packages/legacy/src/smart/utils/typecheckings.ts @@ -1,4 +1,4 @@ -import { EditorNode, isEditorDataClass } from '../model/editormodel'; +import { EditorNode, isEditorDataClass } from '@/smart/model/editormodel'; import { DataType } from '@paneron/libmmel/interface/baseinterface'; import { MMELEnum } from '@paneron/libmmel/interface/datainterface'; import { diff --git a/packages/legacy/src/smart/utils/xml/BSIXML.ts b/packages/legacy/src/smart/utils/xml/BSIXML.ts index 4f3e22a7..7032b42b 100644 --- a/packages/legacy/src/smart/utils/xml/BSIXML.ts +++ b/packages/legacy/src/smart/utils/xml/BSIXML.ts @@ -1,8 +1,8 @@ import React from 'react'; -import { DocSection, DocStatement, MMELDocument } from '../../model/document'; -import { XMLElement } from '../../model/xmlelement'; -import { DOCVERSION } from '../constants'; -import { elementToString, isXMLElement, parseXML } from './XMLParser'; +import { DocSection, DocStatement, MMELDocument } from '@/smart/model/document'; +import { XMLElement } from '@/smart/model/xmlelement'; +import { DOCVERSION } from '@/smart/utils/constants'; +import { elementToString, isXMLElement, parseXML } from '@/smart/utils/xml/XMLParser'; function getElementValue(xml: XMLElement, name: string): string { const array = xml.xmlChild[name]; diff --git a/packages/legacy/src/smart/utils/xml/XMLDocumentFunctions.ts b/packages/legacy/src/smart/utils/xml/XMLDocumentFunctions.ts index e5e65f21..af8d88a8 100644 --- a/packages/legacy/src/smart/utils/xml/XMLDocumentFunctions.ts +++ b/packages/legacy/src/smart/utils/xml/XMLDocumentFunctions.ts @@ -1,8 +1,8 @@ import React from 'react'; -import { DocSection, DocStatement, MMELDocument } from '../../model/document'; -import { XMLElement } from '../../model/xmlelement'; -import { DOCVERSION } from '../constants'; -import { elementToString, isXMLElement, parseXML } from './XMLParser'; +import { DocSection, DocStatement, MMELDocument } from '@/smart/model/document'; +import { XMLElement } from '@/smart/model/xmlelement'; +import { DOCVERSION } from '@/smart/utils/constants'; +import { elementToString, isXMLElement, parseXML } from '@/smart/utils/xml/XMLParser'; interface CountFigTable { fig: number; diff --git a/packages/libmmel/src/handler/datahandler.ts b/packages/libmmel/src/handler/datahandler.ts index 97ce1369..b96c7247 100644 --- a/packages/libmmel/src/handler/datahandler.ts +++ b/packages/libmmel/src/handler/datahandler.ts @@ -1,4 +1,4 @@ -import { DataType } from '../interface/baseinterface'; +import { DataType } from '@/interface/baseinterface'; import { MMELDataAttribute, MMELDataClass, diff --git a/packages/libmmel/src/handler/eventhandler.ts b/packages/libmmel/src/handler/eventhandler.ts index 7c676f35..e0d29dd2 100644 --- a/packages/libmmel/src/handler/eventhandler.ts +++ b/packages/libmmel/src/handler/eventhandler.ts @@ -1,5 +1,5 @@ -import { DataType } from '../interface/baseinterface'; -import { MMELremovePackage, MMELtokenizePackage } from '../util/tokenizer'; +import { DataType } from '@/interface/baseinterface'; +import { MMELremovePackage, MMELtokenizePackage } from '@/util/tokenizer'; import { MMELEndEvent, MMELSignalCatchEvent, diff --git a/packages/libmmel/src/handler/flowcontrolhandler.ts b/packages/libmmel/src/handler/flowcontrolhandler.ts index 49a7c0ac..46204b9f 100644 --- a/packages/libmmel/src/handler/flowcontrolhandler.ts +++ b/packages/libmmel/src/handler/flowcontrolhandler.ts @@ -1,11 +1,11 @@ -import { DataType } from '../interface/baseinterface'; +import { DataType } from '@/interface/baseinterface'; import { MMELEdge, MMELEGate, MMELSubprocess, MMELSubprocessComponent, } from '../interface/flowcontrolinterface'; -import { MMELremovePackage, MMELtokenizePackage } from '../util/tokenizer'; +import { MMELremovePackage, MMELtokenizePackage } from '@/util/tokenizer'; export function parseEdge(id: string, data: string): MMELEdge { const edge: MMELEdge = { diff --git a/packages/libmmel/src/handler/processhandler.ts b/packages/libmmel/src/handler/processhandler.ts index 6bda1d78..7fd3b7db 100644 --- a/packages/libmmel/src/handler/processhandler.ts +++ b/packages/libmmel/src/handler/processhandler.ts @@ -1,5 +1,5 @@ -import { DataType } from '../interface/baseinterface'; -import { MMELApproval, MMELProcess } from '../interface/processinterface'; +import { DataType } from '@/interface/baseinterface'; +import { MMELApproval, MMELProcess } from '@/interface/processinterface'; import { MMELremovePackage, MMELtokenizePackage, diff --git a/packages/libmmel/src/handler/supporthandler.ts b/packages/libmmel/src/handler/supporthandler.ts index c9fb95a2..2cba6879 100644 --- a/packages/libmmel/src/handler/supporthandler.ts +++ b/packages/libmmel/src/handler/supporthandler.ts @@ -1,4 +1,4 @@ -import { DataType } from '../interface/baseinterface'; +import { DataType } from '@/interface/baseinterface'; import { BINARY_TYPE, LINK_TYPE, diff --git a/packages/libmmel/src/interface/datainterface.ts b/packages/libmmel/src/interface/datainterface.ts index 2a525ebc..7c2f7065 100644 --- a/packages/libmmel/src/interface/datainterface.ts +++ b/packages/libmmel/src/interface/datainterface.ts @@ -1,4 +1,4 @@ -import { DataType, MMELNode, MMELObject } from './baseinterface'; +import { DataType, MMELNode, MMELObject } from '@/interface/baseinterface'; // data structure for data attribute export interface MMELDataAttribute extends MMELObject { diff --git a/packages/libmmel/src/interface/eventinterface.ts b/packages/libmmel/src/interface/eventinterface.ts index 0cfd435d..8bb67448 100644 --- a/packages/libmmel/src/interface/eventinterface.ts +++ b/packages/libmmel/src/interface/eventinterface.ts @@ -1,4 +1,4 @@ -import { DataType, MMELNode } from './baseinterface'; +import { DataType, MMELNode } from '@/interface/baseinterface'; export type MMELEventNode = MMELNode; diff --git a/packages/libmmel/src/interface/flowcontrolinterface.ts b/packages/libmmel/src/interface/flowcontrolinterface.ts index 94ce7393..923efa37 100644 --- a/packages/libmmel/src/interface/flowcontrolinterface.ts +++ b/packages/libmmel/src/interface/flowcontrolinterface.ts @@ -1,4 +1,4 @@ -import { DataType, MMELNode, MMELObject } from './baseinterface'; +import { DataType, MMELNode, MMELObject } from '@/interface/baseinterface'; export interface MMELSubprocessComponent extends MMELObject { element: string; diff --git a/packages/libmmel/src/interface/model.ts b/packages/libmmel/src/interface/model.ts index 21e18cd8..dce74157 100644 --- a/packages/libmmel/src/interface/model.ts +++ b/packages/libmmel/src/interface/model.ts @@ -1,6 +1,6 @@ -import { MMELNode } from './baseinterface'; -import { MMELEnum } from './datainterface'; -import { MMELSubprocess } from './flowcontrolinterface'; +import { MMELNode } from '@/interface/baseinterface'; +import { MMELEnum } from '@/interface/datainterface'; +import { MMELSubprocess } from '@/interface/flowcontrolinterface'; import { MMELComment, MMELFigure, diff --git a/packages/libmmel/src/interface/processinterface.ts b/packages/libmmel/src/interface/processinterface.ts index e4374984..49dc6ff2 100644 --- a/packages/libmmel/src/interface/processinterface.ts +++ b/packages/libmmel/src/interface/processinterface.ts @@ -1,4 +1,4 @@ -import { DataType, MMELNode } from './baseinterface'; +import { DataType, MMELNode } from '@/interface/baseinterface'; export interface MMELApproval extends MMELNode { id: string; diff --git a/packages/libmmel/src/interface/supportinterface.ts b/packages/libmmel/src/interface/supportinterface.ts index c200089b..8637876b 100644 --- a/packages/libmmel/src/interface/supportinterface.ts +++ b/packages/libmmel/src/interface/supportinterface.ts @@ -1,4 +1,4 @@ -import { DataType, MMELObject } from './baseinterface'; +import { DataType, MMELObject } from '@/interface/baseinterface'; export enum VarType { DATA = 'NUMERIC', diff --git a/packages/libmmel/src/main.ts b/packages/libmmel/src/main.ts index bb62dae0..b6ee871c 100644 --- a/packages/libmmel/src/main.ts +++ b/packages/libmmel/src/main.ts @@ -13,9 +13,9 @@ import { parseVariable, parseView, } from './handler/supporthandler'; -import { MMELModel } from './interface/model'; -import { MMELremovePackage, MMELtokenize } from './util/tokenizer'; -import { parseApproval, parseProcess } from './handler/processhandler'; +import { MMELModel } from '@/interface/model'; +import { MMELremovePackage, MMELtokenize } from '@/util/tokenizer'; +import { parseApproval, parseProcess } from '@/handler/processhandler'; import { parseDataClass, parseEnum, @@ -27,7 +27,7 @@ import { parseStartEvent, parseTimerEvent, } from './handler/eventhandler'; -import { parseEGate, parseSubprocess } from './handler/flowcontrolhandler'; +import { parseEGate, parseSubprocess } from '@/handler/flowcontrolhandler'; import { toCommentModel, toEnumModel, @@ -46,7 +46,7 @@ import { toVariableModel, toViewProfile as toViewProfileModel, } from './util/serailizeformater'; -import { validateModel } from './util/validation'; +import { validateModel } from '@/util/validation'; /** * the function to convert text to MMEL diff --git a/packages/libmmel/src/util/serailizeformater.ts b/packages/libmmel/src/util/serailizeformater.ts index f56fd2f3..2bef5317 100644 --- a/packages/libmmel/src/util/serailizeformater.ts +++ b/packages/libmmel/src/util/serailizeformater.ts @@ -1,4 +1,4 @@ -import { MMELNode } from '../interface/baseinterface'; +import { MMELNode } from '@/interface/baseinterface'; import { MMELDataAttribute, MMELDataClass, @@ -18,7 +18,7 @@ import { MMELSubprocess, MMELSubprocessComponent, } from '../interface/flowcontrolinterface'; -import { MMELApproval, MMELProcess } from '../interface/processinterface'; +import { MMELApproval, MMELProcess } from '@/interface/processinterface'; import { MMELComment, MMELFigure, diff --git a/packages/libmmel/src/util/validation.ts b/packages/libmmel/src/util/validation.ts index 50685e54..e612ec71 100644 --- a/packages/libmmel/src/util/validation.ts +++ b/packages/libmmel/src/util/validation.ts @@ -2,7 +2,7 @@ * Perform basic validation on the parsed model */ -import { DataType, MMELNode, MMELObject } from '../interface/baseinterface'; +import { DataType, MMELNode, MMELObject } from '@/interface/baseinterface'; import { MMELDataAttribute, MMELDataClass, @@ -20,8 +20,8 @@ import { MMELSubprocess, MMELSubprocessComponent, } from '../interface/flowcontrolinterface'; -import { MMELModel } from '../interface/model'; -import { MMELApproval, MMELProcess } from '../interface/processinterface'; +import { MMELModel } from '@/interface/model'; +import { MMELApproval, MMELProcess } from '@/interface/processinterface'; import { MMELProvision, MMELReference,