168 lines
2.6 KiB
Markdown
168 lines
2.6 KiB
Markdown
# Component Architecture
|
|
|
|
## Рекомендуемая структура
|
|
|
|
```txt
|
|
src/
|
|
app/
|
|
(auth)/
|
|
(workspace)/
|
|
dashboard/
|
|
projects/
|
|
objects/
|
|
graph/
|
|
editor/
|
|
designer/
|
|
review/
|
|
impact/
|
|
knowledge/
|
|
integrations/
|
|
jobs/
|
|
ai/
|
|
settings/
|
|
components/
|
|
ui/
|
|
layout/
|
|
data-table/
|
|
editor/
|
|
designer/
|
|
graph/
|
|
command/
|
|
ai/
|
|
entities/
|
|
one-c-projects/
|
|
one-c-objects/
|
|
bsl-modules/
|
|
forms/
|
|
reports/
|
|
roles/
|
|
features/
|
|
one-c-projects/
|
|
semantic-graph/
|
|
bsl-editor/
|
|
object-designer/
|
|
form-designer/
|
|
report-designer/
|
|
impact-analysis/
|
|
review/
|
|
ai-authoring/
|
|
ai-usage/
|
|
integrations/
|
|
scheduled-jobs/
|
|
lib/
|
|
api/
|
|
auth/
|
|
permissions/
|
|
validators/
|
|
formatters/
|
|
one-c/
|
|
store/
|
|
styles/
|
|
```
|
|
|
|
## Правило разделения
|
|
|
|
### `components/ui`
|
|
|
|
Только базовые shadcn-like компоненты:
|
|
- Button
|
|
- Input
|
|
- Dialog
|
|
- Drawer
|
|
- Badge
|
|
- Card
|
|
- Tabs
|
|
|
|
### `components/editor`
|
|
|
|
IDE primitives:
|
|
- BslEditor
|
|
- ProblemsPanel
|
|
- ReferencesPanel
|
|
- OutlinePanel
|
|
- SemanticDiffView
|
|
- CompletionList
|
|
|
|
### `components/designer`
|
|
|
|
Object/form/report designer primitives:
|
|
- ObjectTree
|
|
- MetadataInspector
|
|
- FormCanvas
|
|
- FormElementPalette
|
|
- PropertiesInspector
|
|
- ReportDesigner
|
|
|
|
### `components/entities`
|
|
|
|
Переиспользуемые 1С entity-компоненты:
|
|
- OneCProjectCard
|
|
- OneCObjectBadge
|
|
- ObjectKindBadge
|
|
- RoleAccessBadge
|
|
- ReviewSeverityBadge
|
|
- SnapshotStatusBadge
|
|
|
|
### `features`
|
|
|
|
Полные feature-модули:
|
|
- список 1С-проектов
|
|
- дерево конфигурации
|
|
- карточка объекта 1С
|
|
- BSL editor workspace
|
|
- дизайнер формы
|
|
- дизайнер отчёта
|
|
- semantic graph
|
|
- impact analysis
|
|
- AI authoring panel
|
|
- AI usage dashboard
|
|
|
|
## Data Table стандарт
|
|
|
|
Каждая таблица должна иметь:
|
|
|
|
- search
|
|
- filters
|
|
- saved views
|
|
- column visibility
|
|
- sorting
|
|
- pagination / virtualization
|
|
- row actions
|
|
- bulk actions
|
|
- export
|
|
- audit-friendly row details
|
|
|
|
## IDE Page Standard
|
|
|
|
Каждая IDE-страница строится по шаблону:
|
|
|
|
```txt
|
|
PageHeader
|
|
Toolbar
|
|
ObjectTree
|
|
PrimaryEditorOrDesigner
|
|
RightInspector
|
|
ProblemsPanel
|
|
SemanticDiffPreview
|
|
AIAssistantContext
|
|
```
|
|
|
|
## Naming conventions
|
|
|
|
```txt
|
|
OneCProjectList
|
|
OneCObjectTree
|
|
BslEditorWorkspace
|
|
BslCompletionPanel
|
|
FormDesignerCanvas
|
|
MetadataPropertiesInspector
|
|
SemanticDiffPreview
|
|
AiAuthoringPanel
|
|
```
|
|
|
|
Не использовать абстрактные имена вроде:
|
|
- MainTable
|
|
- CustomCard
|
|
- ModalWindow
|
|
- BigForm
|