Move view in metadata-modules/ and create atomic folder + module for each view entity (#14990)
# Introduction Preparing view-filter and view-group introduction in v2 core engine Moving view from `core-modules` to `metadata-modules` ## What happened ### Created dedicated modules for each view entity: - ViewFieldModule - ViewFilterModule - ViewFilterGroupModule - ViewGroupModule - ViewSortModule ### Each module is now completely independent with its own: - Controller - Resolver - Service - Entity ### Created dedicated abstraction metadata module folder for: - flat-view-field - flat-view ### Dependencies - Eleminated circular dep on ViewModule to all others ones - Granular import not importing the whole viewModule anymore everywhere close https://github.com/twentyhq/core-team-issues/issues/1703
This commit is contained in:
+15
@@ -0,0 +1,15 @@
|
||||
import { type FlatView } from 'src/engine/metadata-modules/flat-view/types/flat-view.type';
|
||||
|
||||
export const FLAT_VIEW_EDITABLE_PROPERTIES = [
|
||||
'name',
|
||||
'type',
|
||||
'icon',
|
||||
'position',
|
||||
'isCompact',
|
||||
'openRecordIn',
|
||||
'kanbanAggregateOperation',
|
||||
'kanbanAggregateOperationFieldMetadataId',
|
||||
'anyFieldFilterValue',
|
||||
'calendarLayout',
|
||||
'calendarFieldMetadataId',
|
||||
] as const satisfies (keyof FlatView)[];
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
import { FLAT_VIEW_EDITABLE_PROPERTIES } from 'src/engine/metadata-modules/flat-view/constants/flat-view-editable-properties.constant';
|
||||
import { type FlatView } from 'src/engine/metadata-modules/flat-view/types/flat-view.type';
|
||||
|
||||
export const FLAT_VIEW_PROPERTIES_TO_COMPARE = [
|
||||
'key',
|
||||
'deletedAt',
|
||||
...FLAT_VIEW_EDITABLE_PROPERTIES,
|
||||
] as const satisfies (keyof FlatView)[];
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
import { type ViewEntityRelationProperties } from 'src/engine/metadata-modules/flat-view/types/flat-view.type';
|
||||
|
||||
export const VIEW_ENTITY_RELATION_PROPERTIES = [
|
||||
'objectMetadata',
|
||||
'viewFields',
|
||||
'viewFilters',
|
||||
'viewFilterGroups',
|
||||
'viewGroups',
|
||||
'viewSorts',
|
||||
'workspace',
|
||||
] as const satisfies ViewEntityRelationProperties[];
|
||||
Reference in New Issue
Block a user