From 537fa52e77115db9414fa357133a664d49b26401 Mon Sep 17 00:00:00 2001 From: Richard Shiue <71320345+richardshiue@users.noreply.github.com> Date: Sun, 25 Feb 2024 18:38:18 +0800 Subject: [PATCH] chore: move database domain code to its own folder (#4556) --- .../field/mobile_edit_field_screen.dart | 4 ++-- .../field/mobile_full_field_editor.dart | 2 +- .../field/mobile_quick_field_editor.dart | 4 ++-- .../view/edit_database_view_screen.dart | 4 ++-- .../cell/bloc/checklist_cell_bloc.dart | 2 +- .../cell/bloc/date_cell_editor_bloc.dart | 4 ++-- .../cell/bloc/select_option_editor_bloc.dart | 2 +- .../application/cell/cell_controller.dart | 6 ++--- .../application/cell/cell_data_loader.dart | 2 +- .../cell/cell_data_persistence.dart | 2 +- .../application/database_controller.dart | 16 ++++--------- .../application/field/field_cell_bloc.dart | 2 +- .../application/field/field_controller.dart | 24 +++++++------------ .../application/field/field_editor_bloc.dart | 6 ++--- .../select_type_option_actions.dart | 3 +-- .../application/layout/layout_bloc.dart | 3 +-- .../application/row/row_banner_bloc.dart | 6 ++--- .../application/setting/group_bloc.dart | 3 +-- .../application/setting/property_bloc.dart | 5 ++-- .../database/application/tab_bar_bloc.dart | 2 +- .../board/application/board_bloc.dart | 2 +- .../application/calendar_setting_bloc.dart | 2 +- .../cell => domain}/cell_listener.dart | 2 +- .../cell => domain}/cell_service.dart | 2 +- .../checklist_cell_service.dart | 0 .../database_service.dart | 0 .../database_view_service.dart | 2 +- .../cell => domain}/date_cell_service.dart | 0 .../field_backend_service.dart | 4 ++-- .../field => domain}/field_listener.dart | 0 .../field => domain}/field_service.dart | 0 .../field_settings_listener.dart | 0 .../field_settings_service.dart | 0 .../filter => domain}/filter_listener.dart | 0 .../filter => domain}/filter_service.dart | 0 .../group => domain}/group_listener.dart | 0 .../group => domain}/group_service.dart | 0 .../layout => domain}/layout_service.dart | 0 .../layout_setting_listener.dart | 0 .../row => domain}/row_listener.dart | 0 .../row => domain}/row_meta_listener.dart | 0 .../select_option_cell_service.dart | 6 ++--- .../sort => domain}/sort_listener.dart | 0 .../sort => domain}/sort_service.dart | 0 .../type_option_service.dart | 0 .../filter/checkbox_filter_editor_bloc.dart | 4 ++-- .../filter/checklist_filter_bloc.dart | 4 ++-- .../filter/filter_create_bloc.dart | 2 +- .../filter/number_filter_editor_bloc.dart | 4 ++-- .../filter/select_option_filter_bloc.dart | 4 ++-- .../filter/text_filter_editor_bloc.dart | 4 ++-- .../grid/application/grid_header_bloc.dart | 2 +- .../grid/application/row/row_detail_bloc.dart | 4 ++-- .../application/sort/sort_editor_bloc.dart | 2 +- .../widgets/header/field_editor.dart | 2 +- .../widgets/header/grid_header.dart | 2 +- .../database/widgets/card/card_bloc.dart | 2 +- .../database/widgets/row/row_property.dart | 2 +- .../base/insert_page_command.dart | 2 +- .../grid_test/filter/create_filter_test.dart | 2 +- .../grid_test/filter/filter_menu_test.dart | 2 +- .../filter/filter_rows_by_checkbox_test.dart | 2 +- .../filter/filter_rows_by_text_test.dart | 2 +- .../test/bloc_test/grid_test/util.dart | 2 +- 64 files changed, 78 insertions(+), 94 deletions(-) rename frontend/appflowy_flutter/lib/plugins/database/{application/cell => domain}/cell_listener.dart (97%) rename frontend/appflowy_flutter/lib/plugins/database/{application/cell => domain}/cell_service.dart (95%) rename frontend/appflowy_flutter/lib/plugins/database/{application/cell => domain}/checklist_cell_service.dart (100%) rename frontend/appflowy_flutter/lib/plugins/database/{application => domain}/database_service.dart (100%) rename frontend/appflowy_flutter/lib/plugins/database/{application => domain}/database_view_service.dart (99%) rename frontend/appflowy_flutter/lib/plugins/database/{application/cell => domain}/date_cell_service.dart (100%) rename frontend/appflowy_flutter/lib/plugins/database/{application/field => domain}/field_backend_service.dart (91%) rename frontend/appflowy_flutter/lib/plugins/database/{application/field => domain}/field_listener.dart (100%) rename frontend/appflowy_flutter/lib/plugins/database/{application/field => domain}/field_service.dart (100%) rename frontend/appflowy_flutter/lib/plugins/database/{application/field_settings => domain}/field_settings_listener.dart (100%) rename frontend/appflowy_flutter/lib/plugins/database/{application/field_settings => domain}/field_settings_service.dart (100%) rename frontend/appflowy_flutter/lib/plugins/database/{application/filter => domain}/filter_listener.dart (100%) rename frontend/appflowy_flutter/lib/plugins/database/{application/filter => domain}/filter_service.dart (100%) rename frontend/appflowy_flutter/lib/plugins/database/{application/group => domain}/group_listener.dart (100%) rename frontend/appflowy_flutter/lib/plugins/database/{application/group => domain}/group_service.dart (100%) rename frontend/appflowy_flutter/lib/plugins/database/{application/layout => domain}/layout_service.dart (100%) rename frontend/appflowy_flutter/lib/plugins/database/{application/layout => domain}/layout_setting_listener.dart (100%) rename frontend/appflowy_flutter/lib/plugins/database/{application/row => domain}/row_listener.dart (100%) rename frontend/appflowy_flutter/lib/plugins/database/{application/row => domain}/row_meta_listener.dart (100%) rename frontend/appflowy_flutter/lib/plugins/database/{application/cell => domain}/select_option_cell_service.dart (90%) rename frontend/appflowy_flutter/lib/plugins/database/{application/sort => domain}/sort_listener.dart (100%) rename frontend/appflowy_flutter/lib/plugins/database/{application/sort => domain}/sort_service.dart (100%) rename frontend/appflowy_flutter/lib/plugins/database/{application/field/type_option => domain}/type_option_service.dart (100%) diff --git a/frontend/appflowy_flutter/lib/mobile/presentation/database/field/mobile_edit_field_screen.dart b/frontend/appflowy_flutter/lib/mobile/presentation/database/field/mobile_edit_field_screen.dart index 958c282bbb..d541c201dd 100644 --- a/frontend/appflowy_flutter/lib/mobile/presentation/database/field/mobile_edit_field_screen.dart +++ b/frontend/appflowy_flutter/lib/mobile/presentation/database/field/mobile_edit_field_screen.dart @@ -1,9 +1,9 @@ import 'package:appflowy/generated/locale_keys.g.dart'; import 'package:appflowy/mobile/presentation/base/app_bar.dart'; import 'package:appflowy/mobile/presentation/database/field/mobile_full_field_editor.dart'; -import 'package:appflowy/plugins/database/application/field/field_backend_service.dart'; +import 'package:appflowy/plugins/database/domain/field_backend_service.dart'; import 'package:appflowy/plugins/database/application/field/field_info.dart'; -import 'package:appflowy/plugins/database/application/field/field_service.dart'; +import 'package:appflowy/plugins/database/domain/field_service.dart'; import 'package:appflowy/plugins/database/widgets/setting/field_visibility_extension.dart'; import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; diff --git a/frontend/appflowy_flutter/lib/mobile/presentation/database/field/mobile_full_field_editor.dart b/frontend/appflowy_flutter/lib/mobile/presentation/database/field/mobile_full_field_editor.dart index 2d48b3ca58..f63aeeb163 100644 --- a/frontend/appflowy_flutter/lib/mobile/presentation/database/field/mobile_full_field_editor.dart +++ b/frontend/appflowy_flutter/lib/mobile/presentation/database/field/mobile_full_field_editor.dart @@ -10,7 +10,7 @@ import 'package:appflowy/mobile/presentation/bottom_sheet/bottom_sheet.dart'; import 'package:appflowy/mobile/presentation/database/card/card_detail/widgets/widgets.dart'; import 'package:appflowy/mobile/presentation/widgets/widgets.dart'; import 'package:appflowy/plugins/base/drag_handler.dart'; -import 'package:appflowy/plugins/database/application/field/field_service.dart'; +import 'package:appflowy/plugins/database/domain/field_service.dart'; import 'package:appflowy/plugins/database/application/field/type_option/number_format_bloc.dart'; import 'package:appflowy/plugins/database/grid/presentation/widgets/header/type_option/date/date_time_format.dart'; import 'package:appflowy/plugins/database/widgets/cell_editor/extension.dart'; diff --git a/frontend/appflowy_flutter/lib/mobile/presentation/database/field/mobile_quick_field_editor.dart b/frontend/appflowy_flutter/lib/mobile/presentation/database/field/mobile_quick_field_editor.dart index b70c508aab..942936b71d 100644 --- a/frontend/appflowy_flutter/lib/mobile/presentation/database/field/mobile_quick_field_editor.dart +++ b/frontend/appflowy_flutter/lib/mobile/presentation/database/field/mobile_quick_field_editor.dart @@ -4,9 +4,9 @@ import 'package:appflowy/mobile/presentation/database/card/card_detail/widgets/w import 'package:appflowy/mobile/presentation/database/field/mobile_field_bottom_sheets.dart'; import 'package:appflowy/mobile/presentation/database/field/mobile_full_field_editor.dart'; import 'package:appflowy/mobile/presentation/widgets/widgets.dart'; -import 'package:appflowy/plugins/database/application/field/field_backend_service.dart'; +import 'package:appflowy/plugins/database/domain/field_backend_service.dart'; import 'package:appflowy/plugins/database/application/field/field_info.dart'; -import 'package:appflowy/plugins/database/application/field/field_service.dart'; +import 'package:appflowy/plugins/database/domain/field_service.dart'; import 'package:appflowy/plugins/database/widgets/setting/field_visibility_extension.dart'; import 'package:appflowy_backend/protobuf/flowy-database2/protobuf.dart'; import 'package:easy_localization/easy_localization.dart'; diff --git a/frontend/appflowy_flutter/lib/mobile/presentation/database/view/edit_database_view_screen.dart b/frontend/appflowy_flutter/lib/mobile/presentation/database/view/edit_database_view_screen.dart index 7b81a70d96..a2771ece26 100644 --- a/frontend/appflowy_flutter/lib/mobile/presentation/database/view/edit_database_view_screen.dart +++ b/frontend/appflowy_flutter/lib/mobile/presentation/database/view/edit_database_view_screen.dart @@ -3,8 +3,8 @@ import 'package:appflowy/generated/locale_keys.g.dart'; import 'package:appflowy/mobile/presentation/bottom_sheet/bottom_sheet.dart'; import 'package:appflowy/mobile/presentation/widgets/flowy_option_tile.dart'; import 'package:appflowy/plugins/database/application/database_controller.dart'; -import 'package:appflowy/plugins/database/application/database_view_service.dart'; -import 'package:appflowy/plugins/database/application/layout/layout_service.dart'; +import 'package:appflowy/plugins/database/domain/database_view_service.dart'; +import 'package:appflowy/plugins/database/domain/layout_service.dart'; import 'package:appflowy/plugins/database/widgets/database_layout_ext.dart'; import 'package:appflowy/workspace/application/view/view_bloc.dart'; import 'package:appflowy_backend/protobuf/flowy-database2/protobuf.dart'; diff --git a/frontend/appflowy_flutter/lib/plugins/database/application/cell/bloc/checklist_cell_bloc.dart b/frontend/appflowy_flutter/lib/plugins/database/application/cell/bloc/checklist_cell_bloc.dart index f315e8f768..756a3dafb5 100644 --- a/frontend/appflowy_flutter/lib/plugins/database/application/cell/bloc/checklist_cell_bloc.dart +++ b/frontend/appflowy_flutter/lib/plugins/database/application/cell/bloc/checklist_cell_bloc.dart @@ -1,7 +1,7 @@ import 'dart:async'; import 'package:appflowy/plugins/database/application/cell/cell_controller_builder.dart'; -import 'package:appflowy/plugins/database/application/cell/checklist_cell_service.dart'; +import 'package:appflowy/plugins/database/domain/checklist_cell_service.dart'; import 'package:appflowy_backend/log.dart'; import 'package:appflowy_backend/protobuf/flowy-database2/checklist_entities.pb.dart'; import 'package:appflowy_backend/protobuf/flowy-database2/select_option_entities.pb.dart'; diff --git a/frontend/appflowy_flutter/lib/plugins/database/application/cell/bloc/date_cell_editor_bloc.dart b/frontend/appflowy_flutter/lib/plugins/database/application/cell/bloc/date_cell_editor_bloc.dart index 6b133a3a61..bb6c50c2e0 100644 --- a/frontend/appflowy_flutter/lib/plugins/database/application/cell/bloc/date_cell_editor_bloc.dart +++ b/frontend/appflowy_flutter/lib/plugins/database/application/cell/bloc/date_cell_editor_bloc.dart @@ -2,8 +2,8 @@ import 'dart:async'; import 'package:appflowy/generated/locale_keys.g.dart'; import 'package:appflowy/plugins/database/application/cell/cell_controller_builder.dart'; -import 'package:appflowy/plugins/database/application/cell/date_cell_service.dart'; -import 'package:appflowy/plugins/database/application/field/field_service.dart'; +import 'package:appflowy/plugins/database/domain/date_cell_service.dart'; +import 'package:appflowy/plugins/database/domain/field_service.dart'; import 'package:appflowy/plugins/database/application/field/type_option/type_option_data_parser.dart'; import 'package:appflowy/user/application/reminder/reminder_bloc.dart'; import 'package:appflowy/user/application/reminder/reminder_extension.dart'; diff --git a/frontend/appflowy_flutter/lib/plugins/database/application/cell/bloc/select_option_editor_bloc.dart b/frontend/appflowy_flutter/lib/plugins/database/application/cell/bloc/select_option_editor_bloc.dart index 2685957a8f..224d916719 100644 --- a/frontend/appflowy_flutter/lib/plugins/database/application/cell/bloc/select_option_editor_bloc.dart +++ b/frontend/appflowy_flutter/lib/plugins/database/application/cell/bloc/select_option_editor_bloc.dart @@ -1,7 +1,7 @@ import 'dart:async'; import 'package:appflowy/plugins/database/application/cell/cell_controller_builder.dart'; -import 'package:appflowy/plugins/database/application/cell/select_option_cell_service.dart'; +import 'package:appflowy/plugins/database/domain/select_option_cell_service.dart'; import 'package:appflowy_backend/log.dart'; import 'package:appflowy_backend/protobuf/flowy-database2/select_option_entities.pb.dart'; import 'package:flutter/widgets.dart'; diff --git a/frontend/appflowy_flutter/lib/plugins/database/application/cell/cell_controller.dart b/frontend/appflowy_flutter/lib/plugins/database/application/cell/cell_controller.dart index 0e08a7a88c..10c37b57ed 100644 --- a/frontend/appflowy_flutter/lib/plugins/database/application/cell/cell_controller.dart +++ b/frontend/appflowy_flutter/lib/plugins/database/application/cell/cell_controller.dart @@ -2,10 +2,11 @@ import 'dart:async'; import 'package:appflowy/plugins/database/application/field/field_controller.dart'; import 'package:appflowy/plugins/database/application/field/field_info.dart'; -import 'package:appflowy/plugins/database/application/field/field_listener.dart'; +import 'package:appflowy/plugins/database/domain/cell_listener.dart'; +import 'package:appflowy/plugins/database/domain/field_listener.dart'; import 'package:appflowy/plugins/database/application/field/type_option/type_option_data_parser.dart'; import 'package:appflowy/plugins/database/application/row/row_cache.dart'; -import 'package:appflowy/plugins/database/application/row/row_meta_listener.dart'; +import 'package:appflowy/plugins/database/domain/row_meta_listener.dart'; import 'package:appflowy/plugins/database/application/row/row_service.dart'; import 'package:appflowy_backend/log.dart'; import 'package:appflowy_backend/protobuf/flowy-database2/protobuf.dart'; @@ -16,7 +17,6 @@ import 'package:freezed_annotation/freezed_annotation.dart'; import 'cell_cache.dart'; import 'cell_data_loader.dart'; import 'cell_data_persistence.dart'; -import 'cell_listener.dart'; part 'cell_controller.freezed.dart'; diff --git a/frontend/appflowy_flutter/lib/plugins/database/application/cell/cell_data_loader.dart b/frontend/appflowy_flutter/lib/plugins/database/application/cell/cell_data_loader.dart index e02d21ab85..b05a4abdb3 100644 --- a/frontend/appflowy_flutter/lib/plugins/database/application/cell/cell_data_loader.dart +++ b/frontend/appflowy_flutter/lib/plugins/database/application/cell/cell_data_loader.dart @@ -1,10 +1,10 @@ import 'dart:convert'; +import 'package:appflowy/plugins/database/domain/cell_service.dart'; import 'package:appflowy_backend/log.dart'; import 'package:appflowy_backend/protobuf/flowy-database2/protobuf.dart'; import 'cell_controller.dart'; -import 'cell_service.dart'; abstract class IGridCellDataConfig { // The cell data will reload if it receives the field's change notification. diff --git a/frontend/appflowy_flutter/lib/plugins/database/application/cell/cell_data_persistence.dart b/frontend/appflowy_flutter/lib/plugins/database/application/cell/cell_data_persistence.dart index 56424e376b..f377515ac4 100644 --- a/frontend/appflowy_flutter/lib/plugins/database/application/cell/cell_data_persistence.dart +++ b/frontend/appflowy_flutter/lib/plugins/database/application/cell/cell_data_persistence.dart @@ -1,7 +1,7 @@ +import 'package:appflowy/plugins/database/domain/cell_service.dart'; import 'package:appflowy_backend/protobuf/flowy-error/protobuf.dart'; import 'cell_controller.dart'; -import 'cell_service.dart'; /// Save the cell data to disk /// You can extend this class to do custom operations. diff --git a/frontend/appflowy_flutter/lib/plugins/database/application/database_controller.dart b/frontend/appflowy_flutter/lib/plugins/database/application/database_controller.dart index a9712f9ea8..877c470ff6 100644 --- a/frontend/appflowy_flutter/lib/plugins/database/application/database_controller.dart +++ b/frontend/appflowy_flutter/lib/plugins/database/application/database_controller.dart @@ -2,25 +2,19 @@ import 'dart:async'; import 'package:appflowy/plugins/database/application/field/field_controller.dart'; import 'package:appflowy/plugins/database/application/view/view_cache.dart'; +import 'package:appflowy/plugins/database/domain/database_view_service.dart'; +import 'package:appflowy/plugins/database/domain/group_listener.dart'; +import 'package:appflowy/plugins/database/domain/layout_service.dart'; +import 'package:appflowy/plugins/database/domain/layout_setting_listener.dart'; import 'package:appflowy_backend/log.dart'; -import 'package:appflowy_backend/protobuf/flowy-database2/board_entities.pb.dart'; -import 'package:appflowy_backend/protobuf/flowy-database2/calendar_entities.pb.dart'; -import 'package:appflowy_backend/protobuf/flowy-database2/database_entities.pb.dart'; -import 'package:appflowy_backend/protobuf/flowy-database2/group.pb.dart'; -import 'package:appflowy_backend/protobuf/flowy-database2/group_changeset.pb.dart'; -import 'package:appflowy_backend/protobuf/flowy-database2/row_entities.pb.dart'; -import 'package:appflowy_backend/protobuf/flowy-database2/setting_entities.pb.dart'; +import 'package:appflowy_backend/protobuf/flowy-database2/protobuf.dart'; import 'package:appflowy_backend/protobuf/flowy-error/errors.pb.dart'; import 'package:appflowy_backend/protobuf/flowy-folder/view.pb.dart'; import 'package:appflowy_result/appflowy_result.dart'; import 'package:collection/collection.dart'; import 'package:flutter/material.dart'; -import 'database_view_service.dart'; import 'defines.dart'; -import 'group/group_listener.dart'; -import 'layout/layout_service.dart'; -import 'layout/layout_setting_listener.dart'; import 'row/row_cache.dart'; typedef OnGroupConfigurationChanged = void Function(List); diff --git a/frontend/appflowy_flutter/lib/plugins/database/application/field/field_cell_bloc.dart b/frontend/appflowy_flutter/lib/plugins/database/application/field/field_cell_bloc.dart index 1e6d953d1f..a8983a98c5 100644 --- a/frontend/appflowy_flutter/lib/plugins/database/application/field/field_cell_bloc.dart +++ b/frontend/appflowy_flutter/lib/plugins/database/application/field/field_cell_bloc.dart @@ -1,6 +1,6 @@ import 'dart:math'; -import 'package:appflowy/plugins/database/application/field_settings/field_settings_service.dart'; +import 'package:appflowy/plugins/database/domain/field_settings_service.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:freezed_annotation/freezed_annotation.dart'; diff --git a/frontend/appflowy_flutter/lib/plugins/database/application/field/field_controller.dart b/frontend/appflowy_flutter/lib/plugins/database/application/field/field_controller.dart index 59822261af..c22554b31f 100644 --- a/frontend/appflowy_flutter/lib/plugins/database/application/field/field_controller.dart +++ b/frontend/appflowy_flutter/lib/plugins/database/application/field/field_controller.dart @@ -1,24 +1,19 @@ import 'dart:collection'; -import 'package:appflowy/plugins/database/application/database_view_service.dart'; -import 'package:appflowy/plugins/database/application/field_settings/field_settings_listener.dart'; -import 'package:appflowy/plugins/database/application/field_settings/field_settings_service.dart'; -import 'package:appflowy/plugins/database/application/filter/filter_listener.dart'; -import 'package:appflowy/plugins/database/application/filter/filter_service.dart'; +import 'package:appflowy/plugins/database/domain/database_view_service.dart'; +import 'package:appflowy/plugins/database/domain/field_listener.dart'; +import 'package:appflowy/plugins/database/domain/field_settings_listener.dart'; +import 'package:appflowy/plugins/database/domain/field_settings_service.dart'; +import 'package:appflowy/plugins/database/domain/filter_listener.dart'; +import 'package:appflowy/plugins/database/domain/filter_service.dart'; import 'package:appflowy/plugins/database/application/row/row_cache.dart'; import 'package:appflowy/plugins/database/application/setting/setting_listener.dart'; -import 'package:appflowy/plugins/database/application/sort/sort_listener.dart'; -import 'package:appflowy/plugins/database/application/sort/sort_service.dart'; +import 'package:appflowy/plugins/database/domain/sort_listener.dart'; +import 'package:appflowy/plugins/database/domain/sort_service.dart'; import 'package:appflowy/plugins/database/grid/presentation/widgets/filter/filter_info.dart'; import 'package:appflowy/plugins/database/grid/presentation/widgets/sort/sort_info.dart'; import 'package:appflowy_backend/log.dart'; -import 'package:appflowy_backend/protobuf/flowy-database2/field_entities.pb.dart'; -import 'package:appflowy_backend/protobuf/flowy-database2/field_settings_entities.pb.dart'; -import 'package:appflowy_backend/protobuf/flowy-database2/filter_changeset.pb.dart'; -import 'package:appflowy_backend/protobuf/flowy-database2/group.pb.dart'; -import 'package:appflowy_backend/protobuf/flowy-database2/setting_entities.pb.dart'; -import 'package:appflowy_backend/protobuf/flowy-database2/sort_entities.pb.dart'; -import 'package:appflowy_backend/protobuf/flowy-database2/util.pb.dart'; +import 'package:appflowy_backend/protobuf/flowy-database2/protobuf.dart'; import 'package:appflowy_backend/protobuf/flowy-error/errors.pb.dart'; import 'package:appflowy_result/appflowy_result.dart'; import 'package:collection/collection.dart'; @@ -26,7 +21,6 @@ import 'package:flutter/foundation.dart'; import '../setting/setting_service.dart'; import 'field_info.dart'; -import 'field_listener.dart'; class _GridFieldNotifier extends ChangeNotifier { List _fieldInfos = []; diff --git a/frontend/appflowy_flutter/lib/plugins/database/application/field/field_editor_bloc.dart b/frontend/appflowy_flutter/lib/plugins/database/application/field/field_editor_bloc.dart index 955a4701b2..316bb50bdb 100644 --- a/frontend/appflowy_flutter/lib/plugins/database/application/field/field_editor_bloc.dart +++ b/frontend/appflowy_flutter/lib/plugins/database/application/field/field_editor_bloc.dart @@ -1,6 +1,8 @@ import 'dart:typed_data'; -import 'package:appflowy/plugins/database/application/field_settings/field_settings_service.dart'; +import 'package:appflowy/plugins/database/domain/field_listener.dart'; +import 'package:appflowy/plugins/database/domain/field_service.dart'; +import 'package:appflowy/plugins/database/domain/field_settings_service.dart'; import 'package:appflowy_backend/log.dart'; import 'package:appflowy_backend/protobuf/flowy-database2/protobuf.dart'; import 'package:appflowy_backend/protobuf/flowy-error/errors.pb.dart'; @@ -10,8 +12,6 @@ import 'package:freezed_annotation/freezed_annotation.dart'; import 'field_controller.dart'; import 'field_info.dart'; -import 'field_listener.dart'; -import 'field_service.dart'; part 'field_editor_bloc.freezed.dart'; diff --git a/frontend/appflowy_flutter/lib/plugins/database/application/field/type_option/select_type_option_actions.dart b/frontend/appflowy_flutter/lib/plugins/database/application/field/type_option/select_type_option_actions.dart index 19d23963af..8d46b994bb 100644 --- a/frontend/appflowy_flutter/lib/plugins/database/application/field/type_option/select_type_option_actions.dart +++ b/frontend/appflowy_flutter/lib/plugins/database/application/field/type_option/select_type_option_actions.dart @@ -1,11 +1,10 @@ import 'dart:async'; +import 'package:appflowy/plugins/database/domain/type_option_service.dart'; import 'package:appflowy/plugins/database/grid/presentation/widgets/header/type_option/builder.dart'; import 'package:appflowy_backend/log.dart'; import 'package:appflowy_backend/protobuf/flowy-database2/select_option_entities.pb.dart'; -import 'type_option_service.dart'; - abstract class ISelectOptionAction { ISelectOptionAction({ required this.onTypeOptionUpdated, diff --git a/frontend/appflowy_flutter/lib/plugins/database/application/layout/layout_bloc.dart b/frontend/appflowy_flutter/lib/plugins/database/application/layout/layout_bloc.dart index 1694b9e70e..a5dd0d9ca1 100644 --- a/frontend/appflowy_flutter/lib/plugins/database/application/layout/layout_bloc.dart +++ b/frontend/appflowy_flutter/lib/plugins/database/application/layout/layout_bloc.dart @@ -1,9 +1,8 @@ +import 'package:appflowy/plugins/database/domain/database_view_service.dart'; import 'package:appflowy_backend/protobuf/flowy-database2/setting_entities.pb.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:freezed_annotation/freezed_annotation.dart'; -import '../database_view_service.dart'; - part 'layout_bloc.freezed.dart'; class DatabaseLayoutBloc diff --git a/frontend/appflowy_flutter/lib/plugins/database/application/row/row_banner_bloc.dart b/frontend/appflowy_flutter/lib/plugins/database/application/row/row_banner_bloc.dart index a78d70d307..e946b7146d 100644 --- a/frontend/appflowy_flutter/lib/plugins/database/application/row/row_banner_bloc.dart +++ b/frontend/appflowy_flutter/lib/plugins/database/application/row/row_banner_bloc.dart @@ -1,12 +1,12 @@ -import 'package:appflowy/plugins/database/application/field/field_listener.dart'; -import 'package:appflowy/plugins/database/application/field/field_service.dart'; +import 'package:appflowy/plugins/database/domain/field_listener.dart'; +import 'package:appflowy/plugins/database/domain/field_service.dart'; import 'package:appflowy/plugins/database/application/row/row_service.dart'; import 'package:appflowy_backend/log.dart'; import 'package:appflowy_backend/protobuf/flowy-database2/protobuf.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:freezed_annotation/freezed_annotation.dart'; -import 'row_meta_listener.dart'; +import '../../domain/row_meta_listener.dart'; part 'row_banner_bloc.freezed.dart'; diff --git a/frontend/appflowy_flutter/lib/plugins/database/application/setting/group_bloc.dart b/frontend/appflowy_flutter/lib/plugins/database/application/setting/group_bloc.dart index e1ae90c724..cef3ad6d7f 100644 --- a/frontend/appflowy_flutter/lib/plugins/database/application/setting/group_bloc.dart +++ b/frontend/appflowy_flutter/lib/plugins/database/application/setting/group_bloc.dart @@ -2,14 +2,13 @@ import 'dart:async'; import 'package:appflowy/plugins/database/application/database_controller.dart'; import 'package:appflowy/plugins/database/application/field/field_info.dart'; +import 'package:appflowy/plugins/database/domain/group_service.dart'; import 'package:appflowy_backend/log.dart'; import 'package:appflowy_backend/protobuf/flowy-database2/board_entities.pb.dart'; import 'package:appflowy_backend/protobuf/flowy-database2/field_entities.pb.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:freezed_annotation/freezed_annotation.dart'; -import '../group/group_service.dart'; - part 'group_bloc.freezed.dart'; class DatabaseGroupBloc extends Bloc { diff --git a/frontend/appflowy_flutter/lib/plugins/database/application/setting/property_bloc.dart b/frontend/appflowy_flutter/lib/plugins/database/application/setting/property_bloc.dart index 9bcd66355f..46414791f2 100644 --- a/frontend/appflowy_flutter/lib/plugins/database/application/setting/property_bloc.dart +++ b/frontend/appflowy_flutter/lib/plugins/database/application/setting/property_bloc.dart @@ -2,14 +2,13 @@ import 'dart:async'; import 'package:appflowy/plugins/database/application/field/field_controller.dart'; import 'package:appflowy/plugins/database/application/field/field_info.dart'; -import 'package:appflowy/plugins/database/application/field_settings/field_settings_service.dart'; +import 'package:appflowy/plugins/database/domain/field_service.dart'; +import 'package:appflowy/plugins/database/domain/field_settings_service.dart'; import 'package:appflowy_backend/log.dart'; import 'package:appflowy_backend/protobuf/flowy-database2/field_settings_entities.pb.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:freezed_annotation/freezed_annotation.dart'; -import '../field/field_service.dart'; - part 'property_bloc.freezed.dart'; class DatabasePropertyBloc diff --git a/frontend/appflowy_flutter/lib/plugins/database/application/tab_bar_bloc.dart b/frontend/appflowy_flutter/lib/plugins/database/application/tab_bar_bloc.dart index 6d5f0b4984..943f8ec20c 100644 --- a/frontend/appflowy_flutter/lib/plugins/database/application/tab_bar_bloc.dart +++ b/frontend/appflowy_flutter/lib/plugins/database/application/tab_bar_bloc.dart @@ -1,3 +1,4 @@ +import 'package:appflowy/plugins/database/domain/database_view_service.dart'; import 'package:appflowy/plugins/database/tab_bar/tab_bar_view.dart'; import 'package:appflowy/plugins/database/widgets/database_layout_ext.dart'; import 'package:appflowy/workspace/application/view/prelude.dart'; @@ -11,7 +12,6 @@ import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:freezed_annotation/freezed_annotation.dart'; import 'database_controller.dart'; -import 'database_view_service.dart'; part 'tab_bar_bloc.freezed.dart'; diff --git a/frontend/appflowy_flutter/lib/plugins/database/board/application/board_bloc.dart b/frontend/appflowy_flutter/lib/plugins/database/board/application/board_bloc.dart index 026a1a4db5..8ea1d004fa 100644 --- a/frontend/appflowy_flutter/lib/plugins/database/board/application/board_bloc.dart +++ b/frontend/appflowy_flutter/lib/plugins/database/board/application/board_bloc.dart @@ -3,7 +3,7 @@ import 'dart:collection'; import 'package:appflowy/plugins/database/application/defines.dart'; import 'package:appflowy/plugins/database/application/field/field_info.dart'; -import 'package:appflowy/plugins/database/application/group/group_service.dart'; +import 'package:appflowy/plugins/database/domain/group_service.dart'; import 'package:appflowy/plugins/database/application/row/row_service.dart'; import 'package:appflowy_backend/log.dart'; import 'package:appflowy_backend/protobuf/flowy-database2/protobuf.dart'; diff --git a/frontend/appflowy_flutter/lib/plugins/database/calendar/application/calendar_setting_bloc.dart b/frontend/appflowy_flutter/lib/plugins/database/calendar/application/calendar_setting_bloc.dart index 5835756887..8ea42d2d3b 100644 --- a/frontend/appflowy_flutter/lib/plugins/database/calendar/application/calendar_setting_bloc.dart +++ b/frontend/appflowy_flutter/lib/plugins/database/calendar/application/calendar_setting_bloc.dart @@ -1,5 +1,5 @@ import 'package:appflowy/plugins/database/application/database_controller.dart'; -import 'package:appflowy/plugins/database/application/layout/layout_setting_listener.dart'; +import 'package:appflowy/plugins/database/domain/layout_setting_listener.dart'; import 'package:appflowy_backend/log.dart'; import 'package:appflowy_backend/protobuf/flowy-database2/protobuf.dart'; import 'package:bloc/bloc.dart'; diff --git a/frontend/appflowy_flutter/lib/plugins/database/application/cell/cell_listener.dart b/frontend/appflowy_flutter/lib/plugins/database/domain/cell_listener.dart similarity index 97% rename from frontend/appflowy_flutter/lib/plugins/database/application/cell/cell_listener.dart rename to frontend/appflowy_flutter/lib/plugins/database/domain/cell_listener.dart index 6c2d7ef857..0b58300b97 100644 --- a/frontend/appflowy_flutter/lib/plugins/database/application/cell/cell_listener.dart +++ b/frontend/appflowy_flutter/lib/plugins/database/domain/cell_listener.dart @@ -7,7 +7,7 @@ import 'package:appflowy_backend/protobuf/flowy-error/errors.pb.dart'; import 'package:appflowy_result/appflowy_result.dart'; import 'package:flowy_infra/notifier.dart'; -import '../row/row_service.dart'; +import '../application/row/row_service.dart'; typedef UpdateFieldNotifiedValue = FlowyResult; diff --git a/frontend/appflowy_flutter/lib/plugins/database/application/cell/cell_service.dart b/frontend/appflowy_flutter/lib/plugins/database/domain/cell_service.dart similarity index 95% rename from frontend/appflowy_flutter/lib/plugins/database/application/cell/cell_service.dart rename to frontend/appflowy_flutter/lib/plugins/database/domain/cell_service.dart index 94e62c6288..a4090d7c88 100644 --- a/frontend/appflowy_flutter/lib/plugins/database/application/cell/cell_service.dart +++ b/frontend/appflowy_flutter/lib/plugins/database/domain/cell_service.dart @@ -5,7 +5,7 @@ import 'package:appflowy_backend/protobuf/flowy-database2/protobuf.dart'; import 'package:appflowy_backend/protobuf/flowy-error/errors.pb.dart'; import 'package:appflowy_result/appflowy_result.dart'; -import 'cell_controller.dart'; +import '../application/cell/cell_controller.dart'; class CellBackendService { CellBackendService(); diff --git a/frontend/appflowy_flutter/lib/plugins/database/application/cell/checklist_cell_service.dart b/frontend/appflowy_flutter/lib/plugins/database/domain/checklist_cell_service.dart similarity index 100% rename from frontend/appflowy_flutter/lib/plugins/database/application/cell/checklist_cell_service.dart rename to frontend/appflowy_flutter/lib/plugins/database/domain/checklist_cell_service.dart diff --git a/frontend/appflowy_flutter/lib/plugins/database/application/database_service.dart b/frontend/appflowy_flutter/lib/plugins/database/domain/database_service.dart similarity index 100% rename from frontend/appflowy_flutter/lib/plugins/database/application/database_service.dart rename to frontend/appflowy_flutter/lib/plugins/database/domain/database_service.dart diff --git a/frontend/appflowy_flutter/lib/plugins/database/application/database_view_service.dart b/frontend/appflowy_flutter/lib/plugins/database/domain/database_view_service.dart similarity index 99% rename from frontend/appflowy_flutter/lib/plugins/database/application/database_view_service.dart rename to frontend/appflowy_flutter/lib/plugins/database/domain/database_view_service.dart index a28819e2db..de06c8d1d8 100644 --- a/frontend/appflowy_flutter/lib/plugins/database/application/database_view_service.dart +++ b/frontend/appflowy_flutter/lib/plugins/database/domain/database_view_service.dart @@ -5,7 +5,7 @@ import 'package:appflowy_backend/protobuf/flowy-error/errors.pb.dart'; import 'package:appflowy_backend/protobuf/flowy-folder/view.pb.dart'; import 'package:appflowy_result/appflowy_result.dart'; -import 'layout/layout_service.dart'; +import 'layout_service.dart'; class DatabaseViewBackendService { DatabaseViewBackendService({required this.viewId}); diff --git a/frontend/appflowy_flutter/lib/plugins/database/application/cell/date_cell_service.dart b/frontend/appflowy_flutter/lib/plugins/database/domain/date_cell_service.dart similarity index 100% rename from frontend/appflowy_flutter/lib/plugins/database/application/cell/date_cell_service.dart rename to frontend/appflowy_flutter/lib/plugins/database/domain/date_cell_service.dart diff --git a/frontend/appflowy_flutter/lib/plugins/database/application/field/field_backend_service.dart b/frontend/appflowy_flutter/lib/plugins/database/domain/field_backend_service.dart similarity index 91% rename from frontend/appflowy_flutter/lib/plugins/database/application/field/field_backend_service.dart rename to frontend/appflowy_flutter/lib/plugins/database/domain/field_backend_service.dart index 386394d2f6..21933700ba 100644 --- a/frontend/appflowy_flutter/lib/plugins/database/application/field/field_backend_service.dart +++ b/frontend/appflowy_flutter/lib/plugins/database/domain/field_backend_service.dart @@ -1,5 +1,5 @@ -import 'package:appflowy/plugins/database/application/field/field_service.dart'; -import 'package:appflowy/plugins/database/application/field_settings/field_settings_service.dart'; +import 'package:appflowy/plugins/database/domain/field_service.dart'; +import 'package:appflowy/plugins/database/domain/field_settings_service.dart'; import 'package:appflowy_backend/protobuf/flowy-database2/protobuf.dart'; // This class is used for combining the diff --git a/frontend/appflowy_flutter/lib/plugins/database/application/field/field_listener.dart b/frontend/appflowy_flutter/lib/plugins/database/domain/field_listener.dart similarity index 100% rename from frontend/appflowy_flutter/lib/plugins/database/application/field/field_listener.dart rename to frontend/appflowy_flutter/lib/plugins/database/domain/field_listener.dart diff --git a/frontend/appflowy_flutter/lib/plugins/database/application/field/field_service.dart b/frontend/appflowy_flutter/lib/plugins/database/domain/field_service.dart similarity index 100% rename from frontend/appflowy_flutter/lib/plugins/database/application/field/field_service.dart rename to frontend/appflowy_flutter/lib/plugins/database/domain/field_service.dart diff --git a/frontend/appflowy_flutter/lib/plugins/database/application/field_settings/field_settings_listener.dart b/frontend/appflowy_flutter/lib/plugins/database/domain/field_settings_listener.dart similarity index 100% rename from frontend/appflowy_flutter/lib/plugins/database/application/field_settings/field_settings_listener.dart rename to frontend/appflowy_flutter/lib/plugins/database/domain/field_settings_listener.dart diff --git a/frontend/appflowy_flutter/lib/plugins/database/application/field_settings/field_settings_service.dart b/frontend/appflowy_flutter/lib/plugins/database/domain/field_settings_service.dart similarity index 100% rename from frontend/appflowy_flutter/lib/plugins/database/application/field_settings/field_settings_service.dart rename to frontend/appflowy_flutter/lib/plugins/database/domain/field_settings_service.dart diff --git a/frontend/appflowy_flutter/lib/plugins/database/application/filter/filter_listener.dart b/frontend/appflowy_flutter/lib/plugins/database/domain/filter_listener.dart similarity index 100% rename from frontend/appflowy_flutter/lib/plugins/database/application/filter/filter_listener.dart rename to frontend/appflowy_flutter/lib/plugins/database/domain/filter_listener.dart diff --git a/frontend/appflowy_flutter/lib/plugins/database/application/filter/filter_service.dart b/frontend/appflowy_flutter/lib/plugins/database/domain/filter_service.dart similarity index 100% rename from frontend/appflowy_flutter/lib/plugins/database/application/filter/filter_service.dart rename to frontend/appflowy_flutter/lib/plugins/database/domain/filter_service.dart diff --git a/frontend/appflowy_flutter/lib/plugins/database/application/group/group_listener.dart b/frontend/appflowy_flutter/lib/plugins/database/domain/group_listener.dart similarity index 100% rename from frontend/appflowy_flutter/lib/plugins/database/application/group/group_listener.dart rename to frontend/appflowy_flutter/lib/plugins/database/domain/group_listener.dart diff --git a/frontend/appflowy_flutter/lib/plugins/database/application/group/group_service.dart b/frontend/appflowy_flutter/lib/plugins/database/domain/group_service.dart similarity index 100% rename from frontend/appflowy_flutter/lib/plugins/database/application/group/group_service.dart rename to frontend/appflowy_flutter/lib/plugins/database/domain/group_service.dart diff --git a/frontend/appflowy_flutter/lib/plugins/database/application/layout/layout_service.dart b/frontend/appflowy_flutter/lib/plugins/database/domain/layout_service.dart similarity index 100% rename from frontend/appflowy_flutter/lib/plugins/database/application/layout/layout_service.dart rename to frontend/appflowy_flutter/lib/plugins/database/domain/layout_service.dart diff --git a/frontend/appflowy_flutter/lib/plugins/database/application/layout/layout_setting_listener.dart b/frontend/appflowy_flutter/lib/plugins/database/domain/layout_setting_listener.dart similarity index 100% rename from frontend/appflowy_flutter/lib/plugins/database/application/layout/layout_setting_listener.dart rename to frontend/appflowy_flutter/lib/plugins/database/domain/layout_setting_listener.dart diff --git a/frontend/appflowy_flutter/lib/plugins/database/application/row/row_listener.dart b/frontend/appflowy_flutter/lib/plugins/database/domain/row_listener.dart similarity index 100% rename from frontend/appflowy_flutter/lib/plugins/database/application/row/row_listener.dart rename to frontend/appflowy_flutter/lib/plugins/database/domain/row_listener.dart diff --git a/frontend/appflowy_flutter/lib/plugins/database/application/row/row_meta_listener.dart b/frontend/appflowy_flutter/lib/plugins/database/domain/row_meta_listener.dart similarity index 100% rename from frontend/appflowy_flutter/lib/plugins/database/application/row/row_meta_listener.dart rename to frontend/appflowy_flutter/lib/plugins/database/domain/row_meta_listener.dart diff --git a/frontend/appflowy_flutter/lib/plugins/database/application/cell/select_option_cell_service.dart b/frontend/appflowy_flutter/lib/plugins/database/domain/select_option_cell_service.dart similarity index 90% rename from frontend/appflowy_flutter/lib/plugins/database/application/cell/select_option_cell_service.dart rename to frontend/appflowy_flutter/lib/plugins/database/domain/select_option_cell_service.dart index 8d5a6cd849..165671b211 100644 --- a/frontend/appflowy_flutter/lib/plugins/database/application/cell/select_option_cell_service.dart +++ b/frontend/appflowy_flutter/lib/plugins/database/domain/select_option_cell_service.dart @@ -1,10 +1,10 @@ -import 'package:appflowy/plugins/database/application/field/type_option/type_option_service.dart'; import 'package:appflowy_backend/dispatch/dispatch.dart'; -import 'package:appflowy_backend/protobuf/flowy-database2/cell_entities.pb.dart'; -import 'package:appflowy_backend/protobuf/flowy-database2/select_option_entities.pb.dart'; +import 'package:appflowy_backend/protobuf/flowy-database2/protobuf.dart'; import 'package:appflowy_backend/protobuf/flowy-error/errors.pb.dart'; import 'package:appflowy_result/appflowy_result.dart'; +import 'type_option_service.dart'; + class SelectOptionCellBackendService { SelectOptionCellBackendService({ required this.viewId, diff --git a/frontend/appflowy_flutter/lib/plugins/database/application/sort/sort_listener.dart b/frontend/appflowy_flutter/lib/plugins/database/domain/sort_listener.dart similarity index 100% rename from frontend/appflowy_flutter/lib/plugins/database/application/sort/sort_listener.dart rename to frontend/appflowy_flutter/lib/plugins/database/domain/sort_listener.dart diff --git a/frontend/appflowy_flutter/lib/plugins/database/application/sort/sort_service.dart b/frontend/appflowy_flutter/lib/plugins/database/domain/sort_service.dart similarity index 100% rename from frontend/appflowy_flutter/lib/plugins/database/application/sort/sort_service.dart rename to frontend/appflowy_flutter/lib/plugins/database/domain/sort_service.dart diff --git a/frontend/appflowy_flutter/lib/plugins/database/application/field/type_option/type_option_service.dart b/frontend/appflowy_flutter/lib/plugins/database/domain/type_option_service.dart similarity index 100% rename from frontend/appflowy_flutter/lib/plugins/database/application/field/type_option/type_option_service.dart rename to frontend/appflowy_flutter/lib/plugins/database/domain/type_option_service.dart diff --git a/frontend/appflowy_flutter/lib/plugins/database/grid/application/filter/checkbox_filter_editor_bloc.dart b/frontend/appflowy_flutter/lib/plugins/database/grid/application/filter/checkbox_filter_editor_bloc.dart index 7b87d725c1..67c4662b56 100644 --- a/frontend/appflowy_flutter/lib/plugins/database/grid/application/filter/checkbox_filter_editor_bloc.dart +++ b/frontend/appflowy_flutter/lib/plugins/database/grid/application/filter/checkbox_filter_editor_bloc.dart @@ -1,7 +1,7 @@ import 'dart:async'; -import 'package:appflowy/plugins/database/application/filter/filter_listener.dart'; -import 'package:appflowy/plugins/database/application/filter/filter_service.dart'; +import 'package:appflowy/plugins/database/domain/filter_listener.dart'; +import 'package:appflowy/plugins/database/domain/filter_service.dart'; import 'package:appflowy/plugins/database/grid/presentation/widgets/filter/filter_info.dart'; import 'package:appflowy_backend/protobuf/flowy-database2/checkbox_filter.pb.dart'; import 'package:appflowy_backend/protobuf/flowy-database2/util.pb.dart'; diff --git a/frontend/appflowy_flutter/lib/plugins/database/grid/application/filter/checklist_filter_bloc.dart b/frontend/appflowy_flutter/lib/plugins/database/grid/application/filter/checklist_filter_bloc.dart index c4b5cab844..5b91cd9195 100644 --- a/frontend/appflowy_flutter/lib/plugins/database/grid/application/filter/checklist_filter_bloc.dart +++ b/frontend/appflowy_flutter/lib/plugins/database/grid/application/filter/checklist_filter_bloc.dart @@ -1,7 +1,7 @@ import 'dart:async'; -import 'package:appflowy/plugins/database/application/filter/filter_listener.dart'; -import 'package:appflowy/plugins/database/application/filter/filter_service.dart'; +import 'package:appflowy/plugins/database/domain/filter_listener.dart'; +import 'package:appflowy/plugins/database/domain/filter_service.dart'; import 'package:appflowy/plugins/database/grid/presentation/widgets/filter/filter_info.dart'; import 'package:appflowy_backend/protobuf/flowy-database2/checklist_filter.pb.dart'; import 'package:appflowy_backend/protobuf/flowy-database2/util.pb.dart'; diff --git a/frontend/appflowy_flutter/lib/plugins/database/grid/application/filter/filter_create_bloc.dart b/frontend/appflowy_flutter/lib/plugins/database/grid/application/filter/filter_create_bloc.dart index 624ef06d6a..6f6f078536 100644 --- a/frontend/appflowy_flutter/lib/plugins/database/grid/application/filter/filter_create_bloc.dart +++ b/frontend/appflowy_flutter/lib/plugins/database/grid/application/filter/filter_create_bloc.dart @@ -2,7 +2,7 @@ import 'dart:async'; import 'package:appflowy/plugins/database/application/field/field_controller.dart'; import 'package:appflowy/plugins/database/application/field/field_info.dart'; -import 'package:appflowy/plugins/database/application/filter/filter_service.dart'; +import 'package:appflowy/plugins/database/domain/filter_service.dart'; import 'package:appflowy_backend/protobuf/flowy-database2/checkbox_filter.pbenum.dart'; import 'package:appflowy_backend/protobuf/flowy-database2/checklist_filter.pb.dart'; import 'package:appflowy_backend/protobuf/flowy-database2/date_filter.pbenum.dart'; diff --git a/frontend/appflowy_flutter/lib/plugins/database/grid/application/filter/number_filter_editor_bloc.dart b/frontend/appflowy_flutter/lib/plugins/database/grid/application/filter/number_filter_editor_bloc.dart index 832bfa905a..5b1de6d782 100644 --- a/frontend/appflowy_flutter/lib/plugins/database/grid/application/filter/number_filter_editor_bloc.dart +++ b/frontend/appflowy_flutter/lib/plugins/database/grid/application/filter/number_filter_editor_bloc.dart @@ -1,7 +1,7 @@ import 'dart:async'; -import 'package:appflowy/plugins/database/application/filter/filter_listener.dart'; -import 'package:appflowy/plugins/database/application/filter/filter_service.dart'; +import 'package:appflowy/plugins/database/domain/filter_listener.dart'; +import 'package:appflowy/plugins/database/domain/filter_service.dart'; import 'package:appflowy/plugins/database/grid/presentation/widgets/filter/filter_info.dart'; import 'package:appflowy_backend/protobuf/flowy-database2/protobuf.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; diff --git a/frontend/appflowy_flutter/lib/plugins/database/grid/application/filter/select_option_filter_bloc.dart b/frontend/appflowy_flutter/lib/plugins/database/grid/application/filter/select_option_filter_bloc.dart index 144e6f014c..cc92d2d906 100644 --- a/frontend/appflowy_flutter/lib/plugins/database/grid/application/filter/select_option_filter_bloc.dart +++ b/frontend/appflowy_flutter/lib/plugins/database/grid/application/filter/select_option_filter_bloc.dart @@ -1,7 +1,7 @@ import 'dart:async'; -import 'package:appflowy/plugins/database/application/filter/filter_listener.dart'; -import 'package:appflowy/plugins/database/application/filter/filter_service.dart'; +import 'package:appflowy/plugins/database/domain/filter_listener.dart'; +import 'package:appflowy/plugins/database/domain/filter_service.dart'; import 'package:appflowy/plugins/database/grid/presentation/widgets/filter/choicechip/select_option/select_option_loader.dart'; import 'package:appflowy/plugins/database/grid/presentation/widgets/filter/filter_info.dart'; import 'package:appflowy_backend/protobuf/flowy-database2/select_option_filter.pbserver.dart'; diff --git a/frontend/appflowy_flutter/lib/plugins/database/grid/application/filter/text_filter_editor_bloc.dart b/frontend/appflowy_flutter/lib/plugins/database/grid/application/filter/text_filter_editor_bloc.dart index 33147c68b4..1c2791d8d0 100644 --- a/frontend/appflowy_flutter/lib/plugins/database/grid/application/filter/text_filter_editor_bloc.dart +++ b/frontend/appflowy_flutter/lib/plugins/database/grid/application/filter/text_filter_editor_bloc.dart @@ -1,7 +1,7 @@ import 'dart:async'; -import 'package:appflowy/plugins/database/application/filter/filter_listener.dart'; -import 'package:appflowy/plugins/database/application/filter/filter_service.dart'; +import 'package:appflowy/plugins/database/domain/filter_listener.dart'; +import 'package:appflowy/plugins/database/domain/filter_service.dart'; import 'package:appflowy/plugins/database/grid/presentation/widgets/filter/filter_info.dart'; import 'package:appflowy_backend/protobuf/flowy-database2/text_filter.pbserver.dart'; import 'package:appflowy_backend/protobuf/flowy-database2/util.pb.dart'; diff --git a/frontend/appflowy_flutter/lib/plugins/database/grid/application/grid_header_bloc.dart b/frontend/appflowy_flutter/lib/plugins/database/grid/application/grid_header_bloc.dart index 59e5a61e7f..b9fa5b7e92 100644 --- a/frontend/appflowy_flutter/lib/plugins/database/grid/application/grid_header_bloc.dart +++ b/frontend/appflowy_flutter/lib/plugins/database/grid/application/grid_header_bloc.dart @@ -7,7 +7,7 @@ import 'package:appflowy_backend/protobuf/flowy-database2/field_settings_entitie import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:freezed_annotation/freezed_annotation.dart'; -import '../../application/field/field_service.dart'; +import '../../domain/field_service.dart'; part 'grid_header_bloc.freezed.dart'; diff --git a/frontend/appflowy_flutter/lib/plugins/database/grid/application/row/row_detail_bloc.dart b/frontend/appflowy_flutter/lib/plugins/database/grid/application/row/row_detail_bloc.dart index 2545309868..0d655a840b 100644 --- a/frontend/appflowy_flutter/lib/plugins/database/grid/application/row/row_detail_bloc.dart +++ b/frontend/appflowy_flutter/lib/plugins/database/grid/application/row/row_detail_bloc.dart @@ -1,8 +1,8 @@ import 'package:appflowy/plugins/database/application/cell/cell_controller.dart'; import 'package:appflowy/plugins/database/application/field/field_controller.dart'; import 'package:appflowy/plugins/database/application/field/field_info.dart'; -import 'package:appflowy/plugins/database/application/field/field_service.dart'; -import 'package:appflowy/plugins/database/application/field_settings/field_settings_service.dart'; +import 'package:appflowy/plugins/database/domain/field_service.dart'; +import 'package:appflowy/plugins/database/domain/field_settings_service.dart'; import 'package:appflowy/plugins/database/application/row/row_controller.dart'; import 'package:appflowy/plugins/database/widgets/setting/field_visibility_extension.dart'; import 'package:appflowy_backend/log.dart'; diff --git a/frontend/appflowy_flutter/lib/plugins/database/grid/application/sort/sort_editor_bloc.dart b/frontend/appflowy_flutter/lib/plugins/database/grid/application/sort/sort_editor_bloc.dart index 713bfc442d..5f2bd8cf89 100644 --- a/frontend/appflowy_flutter/lib/plugins/database/grid/application/sort/sort_editor_bloc.dart +++ b/frontend/appflowy_flutter/lib/plugins/database/grid/application/sort/sort_editor_bloc.dart @@ -2,7 +2,7 @@ import 'dart:async'; import 'package:appflowy/plugins/database/application/field/field_controller.dart'; import 'package:appflowy/plugins/database/application/field/field_info.dart'; -import 'package:appflowy/plugins/database/application/sort/sort_service.dart'; +import 'package:appflowy/plugins/database/domain/sort_service.dart'; import 'package:appflowy/plugins/database/grid/presentation/widgets/sort/sort_info.dart'; import 'package:appflowy_backend/log.dart'; import 'package:appflowy_backend/protobuf/flowy-database2/protobuf.dart'; diff --git a/frontend/appflowy_flutter/lib/plugins/database/grid/presentation/widgets/header/field_editor.dart b/frontend/appflowy_flutter/lib/plugins/database/grid/presentation/widgets/header/field_editor.dart index 6ababc0a1d..d7040d54c2 100644 --- a/frontend/appflowy_flutter/lib/plugins/database/grid/presentation/widgets/header/field_editor.dart +++ b/frontend/appflowy_flutter/lib/plugins/database/grid/presentation/widgets/header/field_editor.dart @@ -5,7 +5,7 @@ import 'package:appflowy/generated/locale_keys.g.dart'; import 'package:appflowy/plugins/database/application/field/field_controller.dart'; import 'package:appflowy/plugins/database/application/field/field_editor_bloc.dart'; import 'package:appflowy/plugins/database/application/field/field_info.dart'; -import 'package:appflowy/plugins/database/application/field/field_service.dart'; +import 'package:appflowy/plugins/database/domain/field_service.dart'; import 'package:appflowy/plugins/database/grid/presentation/layout/sizes.dart'; import 'package:appflowy/plugins/database/grid/presentation/widgets/common/type_option_separator.dart'; import 'package:appflowy/util/field_type_extension.dart'; diff --git a/frontend/appflowy_flutter/lib/plugins/database/grid/presentation/widgets/header/grid_header.dart b/frontend/appflowy_flutter/lib/plugins/database/grid/presentation/widgets/header/grid_header.dart index b9ba4f0749..97acedf097 100644 --- a/frontend/appflowy_flutter/lib/plugins/database/grid/presentation/widgets/header/grid_header.dart +++ b/frontend/appflowy_flutter/lib/plugins/database/grid/presentation/widgets/header/grid_header.dart @@ -1,7 +1,7 @@ import 'package:appflowy/generated/flowy_svgs.g.dart'; import 'package:appflowy/generated/locale_keys.g.dart'; import 'package:appflowy/plugins/database/application/field/field_controller.dart'; -import 'package:appflowy/plugins/database/application/field/field_service.dart'; +import 'package:appflowy/plugins/database/domain/field_service.dart'; import 'package:appflowy/plugins/database/grid/application/grid_bloc.dart'; import 'package:appflowy/plugins/database/grid/application/grid_header_bloc.dart'; import 'package:appflowy_backend/log.dart'; diff --git a/frontend/appflowy_flutter/lib/plugins/database/widgets/card/card_bloc.dart b/frontend/appflowy_flutter/lib/plugins/database/widgets/card/card_bloc.dart index ba2e8f0e00..1db75c0a73 100644 --- a/frontend/appflowy_flutter/lib/plugins/database/widgets/card/card_bloc.dart +++ b/frontend/appflowy_flutter/lib/plugins/database/widgets/card/card_bloc.dart @@ -5,7 +5,7 @@ import 'package:flutter/foundation.dart'; import 'package:appflowy/plugins/database/application/cell/cell_controller.dart'; import 'package:appflowy/plugins/database/application/field/field_controller.dart'; import 'package:appflowy/plugins/database/application/row/row_cache.dart'; -import 'package:appflowy/plugins/database/application/row/row_listener.dart'; +import 'package:appflowy/plugins/database/domain/row_listener.dart'; import 'package:appflowy/plugins/database/widgets/setting/field_visibility_extension.dart'; import 'package:appflowy_backend/protobuf/flowy-database2/row_entities.pb.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; diff --git a/frontend/appflowy_flutter/lib/plugins/database/widgets/row/row_property.dart b/frontend/appflowy_flutter/lib/plugins/database/widgets/row/row_property.dart index a5b92ab9cb..7a5f802179 100644 --- a/frontend/appflowy_flutter/lib/plugins/database/widgets/row/row_property.dart +++ b/frontend/appflowy_flutter/lib/plugins/database/widgets/row/row_property.dart @@ -5,7 +5,7 @@ import 'package:appflowy/generated/locale_keys.g.dart'; import 'package:appflowy/plugins/database/application/cell/cell_controller.dart'; import 'package:appflowy/plugins/database/application/field/field_controller.dart'; import 'package:appflowy/plugins/database/application/field/field_info.dart'; -import 'package:appflowy/plugins/database/application/field/field_service.dart'; +import 'package:appflowy/plugins/database/domain/field_service.dart'; import 'package:appflowy/plugins/database/grid/application/row/row_detail_bloc.dart'; import 'package:appflowy/plugins/database/grid/presentation/widgets/header/desktop_field_cell.dart'; import 'package:appflowy/plugins/database/grid/presentation/widgets/header/field_editor.dart'; diff --git a/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/base/insert_page_command.dart b/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/base/insert_page_command.dart index eadb5b43a1..9bcd0e18b8 100644 --- a/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/base/insert_page_command.dart +++ b/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/base/insert_page_command.dart @@ -1,5 +1,5 @@ import 'package:appflowy/generated/locale_keys.g.dart'; -import 'package:appflowy/plugins/database/application/database_view_service.dart'; +import 'package:appflowy/plugins/database/domain/database_view_service.dart'; import 'package:appflowy/plugins/document/presentation/editor_plugins/mention/mention_block.dart'; import 'package:appflowy/plugins/document/presentation/editor_plugins/plugins.dart'; import 'package:appflowy/workspace/application/view/view_service.dart'; diff --git a/frontend/appflowy_flutter/test/bloc_test/grid_test/filter/create_filter_test.dart b/frontend/appflowy_flutter/test/bloc_test/grid_test/filter/create_filter_test.dart index 8826db712b..e27f9b6b6c 100644 --- a/frontend/appflowy_flutter/test/bloc_test/grid_test/filter/create_filter_test.dart +++ b/frontend/appflowy_flutter/test/bloc_test/grid_test/filter/create_filter_test.dart @@ -1,4 +1,4 @@ -import 'package:appflowy/plugins/database/application/filter/filter_service.dart'; +import 'package:appflowy/plugins/database/domain/filter_service.dart'; import 'package:appflowy/plugins/database/grid/application/grid_bloc.dart'; import 'package:appflowy/plugins/database/application/database_controller.dart'; import 'package:appflowy_backend/protobuf/flowy-database2/checkbox_filter.pbenum.dart'; diff --git a/frontend/appflowy_flutter/test/bloc_test/grid_test/filter/filter_menu_test.dart b/frontend/appflowy_flutter/test/bloc_test/grid_test/filter/filter_menu_test.dart index 696f61f7c9..4b35a1dc7a 100644 --- a/frontend/appflowy_flutter/test/bloc_test/grid_test/filter/filter_menu_test.dart +++ b/frontend/appflowy_flutter/test/bloc_test/grid_test/filter/filter_menu_test.dart @@ -1,4 +1,4 @@ -import 'package:appflowy/plugins/database/application/filter/filter_service.dart'; +import 'package:appflowy/plugins/database/domain/filter_service.dart'; import 'package:appflowy/plugins/database/grid/application/filter/filter_menu_bloc.dart'; import 'package:appflowy_backend/protobuf/flowy-database2/text_filter.pb.dart'; import 'package:flutter_test/flutter_test.dart'; diff --git a/frontend/appflowy_flutter/test/bloc_test/grid_test/filter/filter_rows_by_checkbox_test.dart b/frontend/appflowy_flutter/test/bloc_test/grid_test/filter/filter_rows_by_checkbox_test.dart index 006b1cccf2..675ee8fc57 100644 --- a/frontend/appflowy_flutter/test/bloc_test/grid_test/filter/filter_rows_by_checkbox_test.dart +++ b/frontend/appflowy_flutter/test/bloc_test/grid_test/filter/filter_rows_by_checkbox_test.dart @@ -1,4 +1,4 @@ -import 'package:appflowy/plugins/database/application/filter/filter_service.dart'; +import 'package:appflowy/plugins/database/domain/filter_service.dart'; import 'package:appflowy_backend/protobuf/flowy-database2/checkbox_filter.pbenum.dart'; import 'package:flutter_test/flutter_test.dart'; diff --git a/frontend/appflowy_flutter/test/bloc_test/grid_test/filter/filter_rows_by_text_test.dart b/frontend/appflowy_flutter/test/bloc_test/grid_test/filter/filter_rows_by_text_test.dart index e2243f0339..432fd339ae 100644 --- a/frontend/appflowy_flutter/test/bloc_test/grid_test/filter/filter_rows_by_text_test.dart +++ b/frontend/appflowy_flutter/test/bloc_test/grid_test/filter/filter_rows_by_text_test.dart @@ -1,4 +1,4 @@ -import 'package:appflowy/plugins/database/application/filter/filter_service.dart'; +import 'package:appflowy/plugins/database/domain/filter_service.dart'; import 'package:appflowy_backend/protobuf/flowy-database2/text_filter.pb.dart'; import 'package:flutter_test/flutter_test.dart'; diff --git a/frontend/appflowy_flutter/test/bloc_test/grid_test/util.dart b/frontend/appflowy_flutter/test/bloc_test/grid_test/util.dart index f6cb9308e9..cd67f1b889 100644 --- a/frontend/appflowy_flutter/test/bloc_test/grid_test/util.dart +++ b/frontend/appflowy_flutter/test/bloc_test/grid_test/util.dart @@ -3,7 +3,7 @@ import 'package:appflowy/plugins/database/application/cell/cell_controller_build import 'package:appflowy/plugins/database/application/field/field_controller.dart'; import 'package:appflowy/plugins/database/application/field/field_editor_bloc.dart'; import 'package:appflowy/plugins/database/application/field/field_info.dart'; -import 'package:appflowy/plugins/database/application/field/field_service.dart'; +import 'package:appflowy/plugins/database/domain/field_service.dart'; import 'package:appflowy/plugins/database/application/row/row_cache.dart'; import 'package:appflowy/plugins/database/application/database_controller.dart'; import 'package:appflowy/plugins/database/application/row/row_service.dart';