Merge pull request #1423 from AppFlowy-IO/refactor/revision_model

Refactor/revision model
This commit is contained in:
Nathan.fooo 2022-11-08 14:36:21 +08:00 committed by GitHub
commit 7f6ad504fd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
135 changed files with 271 additions and 331 deletions

View File

@ -927,17 +927,17 @@ dependencies = [
"flowy-document",
"flowy-error",
"flowy-folder",
"flowy-folder-data-model",
"flowy-revision",
"flowy-sync",
"flowy-test",
"folder-rev-model",
"futures",
"lazy_static",
"lib-dispatch",
"lib-infra",
"lib-ot",
"log",
"parking_lot 0.11.2",
"parking_lot 0.12.1",
"pin-project",
"protobuf",
"serde",
@ -949,27 +949,6 @@ dependencies = [
"unicode-segmentation",
]
[[package]]
name = "flowy-folder-data-model"
version = "0.1.0"
dependencies = [
"bytes",
"chrono",
"derive_more",
"flowy-derive",
"flowy-error-code",
"lib-infra",
"log",
"nanoid",
"protobuf",
"serde",
"serde_json",
"serde_repr",
"strum",
"strum_macros",
"unicode-segmentation",
]
[[package]]
name = "flowy-grid"
version = "0.1.0"
@ -986,11 +965,11 @@ dependencies = [
"flowy-derive",
"flowy-error",
"flowy-grid",
"flowy-grid-data-model",
"flowy-revision",
"flowy-sync",
"flowy-test",
"futures",
"grid-rev-model",
"indexmap",
"lazy_static",
"lib-dispatch",
@ -1012,21 +991,6 @@ dependencies = [
"url",
]
[[package]]
name = "flowy-grid-data-model"
version = "0.1.0"
dependencies = [
"bytes",
"flowy-error-code",
"indexmap",
"lib-infra",
"nanoid",
"serde",
"serde_json",
"serde_repr",
"tracing",
]
[[package]]
name = "flowy-net"
version = "0.1.0"
@ -1040,9 +1004,9 @@ dependencies = [
"flowy-document",
"flowy-error",
"flowy-folder",
"flowy-folder-data-model",
"flowy-sync",
"flowy-user",
"folder-rev-model",
"futures-util",
"http-flowy",
"hyper",
@ -1078,7 +1042,7 @@ dependencies = [
"lib-infra",
"lib-ws",
"nanoid",
"parking_lot 0.11.2",
"parking_lot 0.12.1",
"serde",
"serde_json",
"strum",
@ -1099,13 +1063,13 @@ dependencies = [
"flowy-document",
"flowy-folder",
"flowy-grid",
"flowy-grid-data-model",
"flowy-net",
"flowy-revision",
"flowy-sync",
"flowy-user",
"futures-core",
"futures-util",
"grid-rev-model",
"lib-dispatch",
"lib-infra",
"lib-log",
@ -1128,14 +1092,14 @@ dependencies = [
"dashmap",
"dissimilar",
"flowy-derive",
"flowy-folder-data-model",
"flowy-grid-data-model",
"folder-rev-model",
"futures",
"grid-rev-model",
"lib-infra",
"lib-ot",
"log",
"md5",
"parking_lot 0.11.2",
"parking_lot 0.12.1",
"protobuf",
"serde",
"serde_json",
@ -1223,6 +1187,20 @@ version = "1.0.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1"
[[package]]
name = "folder-rev-model"
version = "0.1.0"
dependencies = [
"bytes",
"chrono",
"nanoid",
"serde",
"serde_json",
"serde_repr",
"strum",
"strum_macros",
]
[[package]]
name = "foreign-types"
version = "0.3.2"
@ -1418,6 +1396,19 @@ dependencies = [
"walkdir",
]
[[package]]
name = "grid-rev-model"
version = "0.1.0"
dependencies = [
"bytes",
"flowy-error-code",
"indexmap",
"nanoid",
"serde",
"serde_json",
"serde_repr",
]
[[package]]
name = "h2"
version = "0.3.10"

View File

@ -6,7 +6,7 @@ edition = "2018"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
flowy-folder-data-model = { path = "../../../shared-lib/flowy-folder-data-model" }
folder-rev-model = { path = "../../../shared-lib/folder-rev-model" }
flowy-sync = { path = "../../../shared-lib/flowy-sync" }
flowy-derive = { path = "../../../shared-lib/flowy-derive" }
lib-ot = { path = "../../../shared-lib/lib-ot" }
@ -19,7 +19,7 @@ dart-notify = { path = "../dart-notify" }
lib-dispatch = { path = "../lib-dispatch" }
flowy-revision = { path = "../flowy-revision" }
parking_lot = "0.11"
parking_lot = "0.12.1"
protobuf = {version = "2.18.0"}
log = "0.4.14"
diesel = {version = "1.4.8", features = ["sqlite"]}

View File

@ -8,7 +8,7 @@ use crate::{
impl_def_and_def_mut,
};
use flowy_derive::ProtoBuf;
use flowy_folder_data_model::revision::AppRevision;
use folder_rev_model::AppRevision;
use std::convert::TryInto;
#[derive(Eq, PartialEq, ProtoBuf, Debug, Default, Clone)]

View File

@ -1,6 +1,6 @@
use crate::impl_def_and_def_mut;
use flowy_derive::{ProtoBuf, ProtoBuf_Enum};
use flowy_folder_data_model::revision::{TrashRevision, TrashTypeRevision};
use folder_rev_model::{TrashRevision, TrashTypeRevision};
use serde::{Deserialize, Serialize};
use std::fmt::Formatter;

View File

@ -7,7 +7,7 @@ use crate::{
impl_def_and_def_mut,
};
use flowy_derive::{ProtoBuf, ProtoBuf_Enum};
use flowy_folder_data_model::revision::{gen_view_id, ViewDataFormatRevision, ViewLayoutTypeRevision, ViewRevision};
use folder_rev_model::{gen_view_id, ViewDataFormatRevision, ViewLayoutTypeRevision, ViewRevision};
use std::convert::TryInto;
#[derive(Eq, PartialEq, ProtoBuf, Debug, Default, Clone)]

View File

@ -5,7 +5,7 @@ use crate::{
impl_def_and_def_mut,
};
use flowy_derive::ProtoBuf;
use flowy_folder_data_model::revision::WorkspaceRevision;
use folder_rev_model::WorkspaceRevision;
use std::convert::TryInto;
#[derive(Eq, PartialEq, ProtoBuf, Default, Debug, Clone)]

View File

@ -11,7 +11,7 @@ use crate::{
};
use flowy_database::{ConnectionPool, DBConnection};
use flowy_derive::{Flowy_Event, ProtoBuf_Enum};
use flowy_folder_data_model::revision::{AppRevision, TrashRevision, ViewRevision, WorkspaceRevision};
use folder_rev_model::{AppRevision, TrashRevision, ViewRevision, WorkspaceRevision};
use lib_dispatch::prelude::*;
use lib_infra::future::FutureResult;
use std::sync::Arc;

View File

@ -14,12 +14,12 @@ use crate::{
use bytes::Bytes;
use flowy_document::editor::initial_read_me;
use flowy_error::FlowyError;
use flowy_folder_data_model::user_default;
use flowy_revision::{
RevisionManager, RevisionPersistence, RevisionPersistenceConfiguration, RevisionWebSocket,
SQLiteRevisionSnapshotPersistence,
};
use flowy_sync::{client_folder::FolderPad, entities::ws_data::ServerRevisionWSData};
use folder_rev_model::user_default;
use lazy_static::lazy_static;
use lib_infra::future::FutureResult;

View File

@ -12,7 +12,7 @@ use crate::{
},
};
use flowy_folder_data_model::revision::AppRevision;
use folder_rev_model::AppRevision;
use futures::{FutureExt, StreamExt};
use std::{collections::HashSet, sync::Arc};

View File

@ -3,7 +3,7 @@ use crate::{
errors::FlowyError,
services::{AppController, TrashController, ViewController},
};
use flowy_folder_data_model::revision::TrashRevision;
use folder_rev_model::TrashRevision;
use lib_dispatch::prelude::{data_result, AppData, Data, DataResult};
use std::{convert::TryInto, sync::Arc};

View File

@ -6,12 +6,12 @@ use crate::{
use bytes::Bytes;
use flowy_database::kv::KV;
use flowy_error::{FlowyError, FlowyResult};
use flowy_folder_data_model::revision::{AppRevision, FolderRevision, ViewRevision, WorkspaceRevision};
use flowy_revision::reset::{RevisionResettable, RevisionStructReset};
use flowy_sync::client_folder::make_folder_rev_json_str;
use flowy_sync::client_folder::FolderPad;
use flowy_sync::entities::revision::Revision;
use flowy_sync::server_folder::FolderOperationsBuilder;
use folder_rev_model::{AppRevision, FolderRevision, ViewRevision, WorkspaceRevision};
use crate::services::persistence::rev_sqlite::SQLiteFolderRevisionPersistence;
use flowy_sync::util::md5;

View File

@ -10,9 +10,9 @@ use crate::{
};
use flowy_database::ConnectionPool;
use flowy_error::{FlowyError, FlowyResult};
use flowy_folder_data_model::revision::{AppRevision, TrashRevision, ViewRevision, WorkspaceRevision};
use flowy_revision::disk::{RevisionDiskCache, RevisionState, SyncRecord};
use flowy_sync::{client_folder::FolderPad, entities::revision::Revision};
use folder_rev_model::{AppRevision, TrashRevision, ViewRevision, WorkspaceRevision};
use crate::services::persistence::rev_sqlite::SQLiteFolderRevisionPersistence;
use flowy_sync::server_folder::FolderOperationsBuilder;

View File

@ -8,7 +8,7 @@ use flowy_database::{
schema::{app_table, app_table::dsl},
SqliteConnection,
};
use flowy_folder_data_model::revision::AppRevision;
use folder_rev_model::AppRevision;
pub struct AppTableSql();
impl AppTableSql {

View File

@ -5,7 +5,7 @@ use flowy_database::{
schema::{trash_table, trash_table::dsl},
SqliteConnection,
};
use flowy_folder_data_model::revision::{TrashRevision, TrashTypeRevision};
use folder_rev_model::{TrashRevision, TrashTypeRevision};
pub struct TrashTableSql();
impl TrashTableSql {

View File

@ -8,7 +8,7 @@ use crate::services::persistence::{
};
use flowy_database::DBConnection;
use flowy_error::FlowyResult;
use flowy_folder_data_model::revision::{AppRevision, TrashRevision, ViewRevision, WorkspaceRevision};
use folder_rev_model::{AppRevision, TrashRevision, ViewRevision, WorkspaceRevision};
/// V1Transaction is deprecated since version 0.0.2 version
pub struct V1Transaction<'a>(pub &'a DBConnection);

View File

@ -13,7 +13,7 @@ use flowy_database::{
SqliteConnection,
};
use flowy_folder_data_model::revision::{ViewDataFormatRevision, ViewLayoutTypeRevision, ViewRevision};
use folder_rev_model::{ViewDataFormatRevision, ViewLayoutTypeRevision, ViewRevision};
use lib_infra::util::timestamp;
pub struct ViewTableSql();

View File

@ -4,7 +4,7 @@ use flowy_database::{
prelude::*,
schema::{workspace_table, workspace_table::dsl},
};
use flowy_folder_data_model::revision::WorkspaceRevision;
use folder_rev_model::WorkspaceRevision;
pub(crate) struct WorkspaceTableSql();
impl WorkspaceTableSql {

View File

@ -3,7 +3,7 @@ use crate::services::{
persistence::{AppChangeset, FolderPersistenceTransaction, ViewChangeset, WorkspaceChangeset},
};
use flowy_error::{FlowyError, FlowyResult};
use flowy_folder_data_model::revision::{AppRevision, TrashRevision, ViewRevision, WorkspaceRevision};
use folder_rev_model::{AppRevision, TrashRevision, ViewRevision, WorkspaceRevision};
use std::sync::Arc;
impl FolderPersistenceTransaction for FolderEditor {

View File

@ -6,7 +6,7 @@ use crate::{
services::persistence::{FolderPersistence, FolderPersistenceTransaction},
};
use flowy_folder_data_model::revision::TrashRevision;
use folder_rev_model::TrashRevision;
use std::{fmt::Formatter, sync::Arc};
use tokio::sync::{broadcast, mpsc};

View File

@ -16,8 +16,8 @@ use crate::{
};
use bytes::Bytes;
use flowy_database::kv::KV;
use flowy_folder_data_model::revision::{gen_view_id, ViewRevision};
use flowy_sync::entities::document::DocumentIdPB;
use folder_rev_model::{gen_view_id, ViewRevision};
use futures::{FutureExt, StreamExt};
use std::{collections::HashSet, sync::Arc};

View File

@ -13,7 +13,7 @@ use crate::{
errors::FlowyError,
services::{TrashController, ViewController},
};
use flowy_folder_data_model::revision::TrashRevision;
use folder_rev_model::TrashRevision;
use lib_dispatch::prelude::{data_result, AppData, Data, DataResult};
use std::{convert::TryInto, sync::Arc};

View File

@ -10,7 +10,7 @@ use crate::{
},
};
use flowy_database::kv::KV;
use flowy_folder_data_model::revision::{AppRevision, WorkspaceRevision};
use folder_rev_model::{AppRevision, WorkspaceRevision};
use std::sync::Arc;
pub struct WorkspaceController {

View File

@ -13,7 +13,7 @@ flowy-error = { path = "../flowy-error", features = ["db"]}
flowy-derive = { path = "../../../shared-lib/flowy-derive" }
lib-ot = { path = "../../../shared-lib/lib-ot" }
lib-infra = { path = "../../../shared-lib/lib-infra" }
flowy-grid-data-model = { path = "../../../shared-lib/flowy-grid-data-model" }
grid-rev-model = { path = "../../../shared-lib/grid-rev-model" }
flowy-sync = { path = "../../../shared-lib/flowy-sync" }
flowy-database = { path = "../flowy-database" }

View File

@ -1,7 +1,7 @@
use crate::entities::parser::NotEmptyStr;
use flowy_derive::ProtoBuf;
use flowy_error::ErrorCode;
use flowy_grid_data_model::parser::NotEmptyStr;
use flowy_grid_data_model::revision::RowRevision;
use grid_rev_model::RowRevision;
use std::sync::Arc;
/// [BlockPB] contains list of row ids. The rows here does not contain any data, just the id

View File

@ -1,8 +1,8 @@
use crate::entities::parser::NotEmptyStr;
use crate::entities::FieldType;
use flowy_derive::ProtoBuf;
use flowy_error::ErrorCode;
use flowy_grid_data_model::parser::NotEmptyStr;
use flowy_grid_data_model::revision::{CellRevision, RowChangeset};
use grid_rev_model::{CellRevision, RowChangeset};
use std::collections::HashMap;
#[derive(ProtoBuf, Default)]

View File

@ -1,10 +1,10 @@
use flowy_derive::{ProtoBuf, ProtoBuf_Enum};
use flowy_error::ErrorCode;
use flowy_grid_data_model::parser::NotEmptyStr;
use flowy_grid_data_model::revision::{FieldRevision, FieldTypeRevision};
use grid_rev_model::{FieldRevision, FieldTypeRevision};
use serde_repr::*;
use std::sync::Arc;
use crate::entities::parser::NotEmptyStr;
use strum_macros::{Display, EnumCount as EnumCountMacro, EnumIter, EnumString};
/// [FieldPB] defines a Field's attributes. Such as the name, field_type, and width. etc.

View File

@ -1,6 +1,6 @@
use flowy_derive::{ProtoBuf, ProtoBuf_Enum};
use flowy_error::ErrorCode;
use flowy_grid_data_model::revision::FilterConfigurationRevision;
use grid_rev_model::FilterConfigurationRevision;
use std::sync::Arc;
#[derive(Eq, PartialEq, ProtoBuf, Debug, Default, Clone)]

View File

@ -1,8 +1,8 @@
use crate::entities::parser::NotEmptyStr;
use crate::entities::FieldType;
use flowy_derive::{ProtoBuf, ProtoBuf_Enum};
use flowy_error::ErrorCode;
use flowy_grid_data_model::parser::NotEmptyStr;
use flowy_grid_data_model::revision::FilterConfigurationRevision;
use grid_rev_model::FilterConfigurationRevision;
use serde::{Deserialize, Serialize};
use std::str::FromStr;
use std::sync::Arc;

View File

@ -1,6 +1,6 @@
use flowy_derive::{ProtoBuf, ProtoBuf_Enum};
use flowy_error::ErrorCode;
use flowy_grid_data_model::revision::FilterConfigurationRevision;
use grid_rev_model::FilterConfigurationRevision;
use std::sync::Arc;

View File

@ -1,7 +1,7 @@
use crate::services::field::SelectOptionIds;
use flowy_derive::{ProtoBuf, ProtoBuf_Enum};
use flowy_error::ErrorCode;
use flowy_grid_data_model::revision::FilterConfigurationRevision;
use grid_rev_model::FilterConfigurationRevision;
use std::sync::Arc;
#[derive(Eq, PartialEq, ProtoBuf, Debug, Default, Clone)]

View File

@ -1,6 +1,6 @@
use flowy_derive::{ProtoBuf, ProtoBuf_Enum};
use flowy_error::ErrorCode;
use flowy_grid_data_model::revision::FilterConfigurationRevision;
use grid_rev_model::FilterConfigurationRevision;
use std::sync::Arc;
#[derive(Eq, PartialEq, ProtoBuf, Debug, Default, Clone)]

View File

@ -1,11 +1,11 @@
use crate::entities::parser::NotEmptyStr;
use crate::entities::{
CheckboxCondition, DateFilterCondition, FieldType, NumberFilterCondition, SelectOptionCondition,
TextFilterCondition,
};
use flowy_derive::ProtoBuf;
use flowy_error::ErrorCode;
use flowy_grid_data_model::parser::NotEmptyStr;
use flowy_grid_data_model::revision::{FieldRevision, FieldTypeRevision, FilterConfigurationRevision};
use grid_rev_model::{FieldRevision, FieldTypeRevision, FilterConfigurationRevision};
use std::convert::TryInto;
use std::sync::Arc;

View File

@ -1,7 +1,7 @@
use crate::entities::parser::NotEmptyStr;
use crate::entities::{BlockPB, FieldIdPB};
use flowy_derive::ProtoBuf;
use flowy_error::ErrorCode;
use flowy_grid_data_model::parser::NotEmptyStr;
/// [GridPB] describes how many fields and blocks the grid has
#[derive(Debug, Clone, Default, ProtoBuf)]

View File

@ -1,5 +1,5 @@
use flowy_derive::{ProtoBuf, ProtoBuf_Enum};
use flowy_grid_data_model::revision::{GroupRevision, SelectOptionGroupConfigurationRevision};
use grid_rev_model::{GroupRevision, SelectOptionGroupConfigurationRevision};
#[derive(Eq, PartialEq, ProtoBuf, Debug, Default, Clone)]
pub struct UrlGroupConfigurationPB {

View File

@ -1,9 +1,9 @@
use crate::entities::parser::NotEmptyStr;
use crate::entities::{CreateRowParams, FieldType, GridLayout, RowPB};
use crate::services::group::Group;
use flowy_derive::ProtoBuf;
use flowy_error::ErrorCode;
use flowy_grid_data_model::parser::NotEmptyStr;
use flowy_grid_data_model::revision::{FieldTypeRevision, GroupConfigurationRevision};
use grid_rev_model::{FieldTypeRevision, GroupConfigurationRevision};
use std::convert::TryInto;
use std::sync::Arc;

View File

@ -1,7 +1,7 @@
use crate::entities::parser::NotEmptyStr;
use crate::entities::{GroupPB, InsertedRowPB, RowPB};
use flowy_derive::ProtoBuf;
use flowy_error::ErrorCode;
use flowy_grid_data_model::parser::NotEmptyStr;
use std::fmt::Formatter;
#[derive(Debug, Default, ProtoBuf)]

View File

@ -4,6 +4,7 @@ mod field_entities;
mod filter_entities;
mod grid_entities;
mod group_entities;
pub mod parser;
mod row_entities;
mod setting_entities;

View File

@ -1,7 +1,7 @@
use crate::entities::parser::NotEmptyStr;
use crate::entities::GridLayout;
use flowy_derive::ProtoBuf;
use flowy_error::ErrorCode;
use flowy_grid_data_model::parser::NotEmptyStr;
#[derive(Debug, Default, Clone, ProtoBuf)]
pub struct RowIdPB {

View File

@ -1,3 +1,4 @@
use crate::entities::parser::NotEmptyStr;
use crate::entities::{
DeleteFilterParams, DeleteFilterPayloadPB, DeleteGroupParams, DeleteGroupPayloadPB, InsertFilterParams,
InsertFilterPayloadPB, InsertGroupParams, InsertGroupPayloadPB, RepeatedGridFilterConfigurationPB,
@ -5,8 +6,7 @@ use crate::entities::{
};
use flowy_derive::{ProtoBuf, ProtoBuf_Enum};
use flowy_error::ErrorCode;
use flowy_grid_data_model::parser::NotEmptyStr;
use flowy_grid_data_model::revision::LayoutRevision;
use grid_rev_model::LayoutRevision;
use std::convert::TryInto;
use strum::IntoEnumIterator;
use strum_macros::EnumIter;

View File

@ -9,7 +9,7 @@ use crate::services::field::{
};
use crate::services::row::make_row_from_row_rev;
use flowy_error::{ErrorCode, FlowyError, FlowyResult};
use flowy_grid_data_model::revision::FieldRevision;
use grid_rev_model::FieldRevision;
use lib_dispatch::prelude::{data_result, AppData, Data, DataResult};
use std::sync::Arc;

View File

@ -12,13 +12,13 @@ use bytes::Bytes;
use flowy_database::ConnectionPool;
use flowy_error::{FlowyError, FlowyResult};
use flowy_grid_data_model::revision::{BuildGridContext, GridRevision, GridViewRevision};
use flowy_revision::{
RevisionManager, RevisionPersistence, RevisionPersistenceConfiguration, RevisionWebSocket,
SQLiteRevisionSnapshotPersistence,
};
use flowy_sync::client_grid::{make_grid_block_operations, make_grid_operations, make_grid_view_operations};
use flowy_sync::entities::revision::Revision;
use grid_rev_model::{BuildGridContext, GridRevision, GridViewRevision};
use lib_infra::ref_map::{RefCountHashMap, RefCountValue};
use crate::services::block_manager::make_grid_block_rev_manager;

View File

@ -1,13 +1,13 @@
use crate::entities::RowPB;
use bytes::Bytes;
use flowy_error::{FlowyError, FlowyResult};
use flowy_grid_data_model::revision::{CellRevision, GridBlockRevision, RowChangeset, RowRevision};
use flowy_revision::{
RevisionCloudService, RevisionManager, RevisionMergeable, RevisionObjectDeserializer, RevisionObjectSerializer,
};
use flowy_sync::client_grid::{GridBlockRevisionChangeset, GridBlockRevisionPad};
use flowy_sync::entities::revision::Revision;
use flowy_sync::util::make_operations_from_revisions;
use grid_rev_model::{CellRevision, GridBlockRevision, RowChangeset, RowRevision};
use lib_infra::future::FutureResult;
use flowy_database::ConnectionPool;

View File

@ -8,12 +8,10 @@ use crate::services::row::{block_from_row_orders, make_row_from_row_rev, GridBlo
use dashmap::DashMap;
use flowy_database::ConnectionPool;
use flowy_error::FlowyResult;
use flowy_grid_data_model::revision::{
GridBlockMetaRevision, GridBlockMetaRevisionChangeset, RowChangeset, RowRevision,
};
use flowy_revision::{
RevisionManager, RevisionPersistence, RevisionPersistenceConfiguration, SQLiteRevisionSnapshotPersistence,
};
use grid_rev_model::{GridBlockMetaRevision, GridBlockMetaRevisionChangeset, RowChangeset, RowRevision};
use std::borrow::Cow;
use std::collections::HashMap;
use std::sync::Arc;

View File

@ -1,7 +1,7 @@
use crate::services::block_manager::GridBlockManager;
use crate::services::grid_view_manager::GridViewRowDelegate;
use flowy_grid_data_model::revision::RowRevision;
use grid_rev_model::RowRevision;
use lib_infra::future::{wrap_future, AFFuture};
use std::sync::Arc;

View File

@ -2,7 +2,7 @@ use crate::entities::FieldType;
use crate::services::cell::{CellData, FromCellString};
use bytes::Bytes;
use flowy_error::{internal_error, FlowyError, FlowyResult};
use flowy_grid_data_model::revision::CellRevision;
use grid_rev_model::CellRevision;
use serde::{Deserialize, Serialize};
use std::str::FromStr;

View File

@ -4,7 +4,7 @@ use crate::services::field::*;
use std::fmt::Debug;
use flowy_error::{ErrorCode, FlowyError, FlowyResult};
use flowy_grid_data_model::revision::{CellRevision, FieldRevision, FieldTypeRevision};
use grid_rev_model::{CellRevision, FieldRevision, FieldTypeRevision};
/// This trait is used when doing filter/search on the grid.
pub trait CellFilterOperation<T> {

View File

@ -2,7 +2,7 @@ use crate::entities::{FieldPB, FieldType};
use crate::services::field::{default_type_option_builder_from_type, TypeOptionBuilder};
use flowy_grid_data_model::revision::FieldRevision;
use grid_rev_model::FieldRevision;
use indexmap::IndexMap;
pub struct FieldBuilder {

View File

@ -1,7 +1,7 @@
use crate::services::field::{MultiSelectTypeOptionPB, SingleSelectTypeOptionPB};
use crate::services::grid_editor::GridRevisionEditor;
use flowy_error::FlowyResult;
use flowy_grid_data_model::revision::{TypeOptionDataDeserializer, TypeOptionDataSerializer};
use grid_rev_model::{TypeOptionDataDeserializer, TypeOptionDataSerializer};
use std::sync::Arc;
pub async fn edit_field_type_option<T>(

View File

@ -1,7 +1,7 @@
use crate::entities::FieldType;
use crate::services::field::type_options::*;
use bytes::Bytes;
use flowy_grid_data_model::revision::TypeOptionDataSerializer;
use grid_rev_model::TypeOptionDataSerializer;
pub trait TypeOptionBuilder {
/// Returns the type of the type-option data

View File

@ -4,7 +4,7 @@ mod tests {
use crate::services::cell::CellDataOperation;
use crate::services::field::type_options::checkbox_type_option::*;
use crate::services::field::FieldBuilder;
use flowy_grid_data_model::revision::FieldRevision;
use grid_rev_model::FieldRevision;
#[test]
fn checkout_box_description_test() {

View File

@ -5,9 +5,7 @@ use crate::services::field::{BoxTypeOptionBuilder, CheckboxCellData, TypeOptionB
use bytes::Bytes;
use flowy_derive::ProtoBuf;
use flowy_error::{FlowyError, FlowyResult};
use flowy_grid_data_model::revision::{
CellRevision, FieldRevision, TypeOptionDataDeserializer, TypeOptionDataSerializer,
};
use grid_rev_model::{CellRevision, FieldRevision, TypeOptionDataDeserializer, TypeOptionDataSerializer};
use serde::{Deserialize, Serialize};
use std::str::FromStr;

View File

@ -4,7 +4,7 @@ mod tests {
use crate::services::cell::CellDataOperation;
use crate::services::field::*;
// use crate::services::field::{DateCellChangeset, DateCellData, DateFormat, DateTypeOptionPB, TimeFormat};
use flowy_grid_data_model::revision::FieldRevision;
use grid_rev_model::FieldRevision;
use strum::IntoEnumIterator;
#[test]

View File

@ -9,9 +9,7 @@ use chrono::format::strftime::StrftimeItems;
use chrono::{NaiveDateTime, Timelike};
use flowy_derive::ProtoBuf;
use flowy_error::{ErrorCode, FlowyError, FlowyResult};
use flowy_grid_data_model::revision::{
CellRevision, FieldRevision, TypeOptionDataDeserializer, TypeOptionDataSerializer,
};
use grid_rev_model::{CellRevision, FieldRevision, TypeOptionDataDeserializer, TypeOptionDataSerializer};
use serde::{Deserialize, Serialize};
// Date

View File

@ -4,7 +4,7 @@ mod tests {
use crate::services::cell::CellDataOperation;
use crate::services::field::FieldBuilder;
use crate::services::field::{strip_currency_symbol, NumberFormat, NumberTypeOptionPB};
use flowy_grid_data_model::revision::FieldRevision;
use grid_rev_model::FieldRevision;
use strum::IntoEnumIterator;
/// Testing when the input is not a number.

View File

@ -6,9 +6,7 @@ use crate::services::field::{BoxTypeOptionBuilder, NumberCellData, TypeOptionBui
use bytes::Bytes;
use flowy_derive::ProtoBuf;
use flowy_error::{FlowyError, FlowyResult};
use flowy_grid_data_model::revision::{
CellRevision, FieldRevision, TypeOptionDataDeserializer, TypeOptionDataSerializer,
};
use grid_rev_model::{CellRevision, FieldRevision, TypeOptionDataDeserializer, TypeOptionDataSerializer};
use rust_decimal::Decimal;

View File

@ -10,9 +10,7 @@ use crate::services::field::{
use bytes::Bytes;
use flowy_derive::ProtoBuf;
use flowy_error::{FlowyError, FlowyResult};
use flowy_grid_data_model::revision::{
CellRevision, FieldRevision, TypeOptionDataDeserializer, TypeOptionDataSerializer,
};
use grid_rev_model::{CellRevision, FieldRevision, TypeOptionDataDeserializer, TypeOptionDataSerializer};
use serde::{Deserialize, Serialize};
// Multiple select

View File

@ -1,3 +1,4 @@
use crate::entities::parser::NotEmptyStr;
use crate::entities::{CellChangesetPB, FieldType, GridCellIdPB, GridCellIdParams};
use crate::services::cell::{
CellBytes, CellBytesParser, CellData, CellDataIsEmpty, CellDisplayable, FromCellChangeset, FromCellString,
@ -7,8 +8,7 @@ use crate::services::field::{MultiSelectTypeOptionPB, SingleSelectTypeOptionPB};
use bytes::Bytes;
use flowy_derive::{ProtoBuf, ProtoBuf_Enum};
use flowy_error::{internal_error, ErrorCode, FlowyResult};
use flowy_grid_data_model::parser::NotEmptyStr;
use flowy_grid_data_model::revision::{FieldRevision, TypeOptionDataSerializer};
use grid_rev_model::{FieldRevision, TypeOptionDataSerializer};
use nanoid::nanoid;
use serde::{Deserialize, Serialize};

View File

@ -9,9 +9,7 @@ use crate::services::field::{
use bytes::Bytes;
use flowy_derive::ProtoBuf;
use flowy_error::{FlowyError, FlowyResult};
use flowy_grid_data_model::revision::{
CellRevision, FieldRevision, TypeOptionDataDeserializer, TypeOptionDataSerializer,
};
use grid_rev_model::{CellRevision, FieldRevision, TypeOptionDataDeserializer, TypeOptionDataSerializer};
use serde::{Deserialize, Serialize};
// Single select

View File

@ -4,7 +4,7 @@ use crate::services::field::{
SelectOptionColorPB, SelectOptionIds, SelectOptionPB, SelectTypeOptionSharedAction, CHECK, UNCHECK,
};
use flowy_error::FlowyResult;
use flowy_grid_data_model::revision::FieldRevision;
use grid_rev_model::FieldRevision;
/// Handles how to transform the cell data when switching between different field types
pub struct SelectOptionTypeOptionTransformer();

View File

@ -8,9 +8,7 @@ use crate::services::field::{BoxTypeOptionBuilder, TypeOptionBuilder};
use bytes::Bytes;
use flowy_derive::ProtoBuf;
use flowy_error::{FlowyError, FlowyResult};
use flowy_grid_data_model::revision::{
CellRevision, FieldRevision, TypeOptionDataDeserializer, TypeOptionDataSerializer,
};
use grid_rev_model::{CellRevision, FieldRevision, TypeOptionDataDeserializer, TypeOptionDataSerializer};
use serde::{Deserialize, Serialize};
#[derive(Default)]

View File

@ -4,7 +4,7 @@ mod tests {
use crate::services::cell::{CellData, CellDataOperation};
use crate::services::field::{FieldBuilder, URLCellDataParser};
use crate::services::field::{URLCellDataPB, URLTypeOptionPB};
use flowy_grid_data_model::revision::FieldRevision;
use grid_rev_model::FieldRevision;
/// The expected_str will equal to the input string, but the expected_url will be empty if there's no
/// http url in the input string.

View File

@ -6,9 +6,7 @@ use bytes::Bytes;
use fancy_regex::Regex;
use flowy_derive::ProtoBuf;
use flowy_error::{FlowyError, FlowyResult};
use flowy_grid_data_model::revision::{
CellRevision, FieldRevision, TypeOptionDataDeserializer, TypeOptionDataSerializer,
};
use grid_rev_model::{CellRevision, FieldRevision, TypeOptionDataDeserializer, TypeOptionDataSerializer};
use lazy_static::lazy_static;
use serde::{Deserialize, Serialize};

View File

@ -1,5 +1,5 @@
use crate::services::cell::AnyCellData;
use flowy_grid_data_model::revision::CellRevision;
use grid_rev_model::CellRevision;
use std::str::FromStr;
pub fn get_cell_data(cell_rev: &CellRevision) -> String {

View File

@ -3,8 +3,8 @@ use crate::entities::{
SelectOptionFilterConfigurationPB, TextFilterConfigurationPB,
};
use dashmap::DashMap;
use flowy_grid_data_model::revision::{FieldRevision, FilterConfigurationRevision, RowRevision};
use flowy_sync::client_grid::GridRevisionPad;
use grid_rev_model::{FieldRevision, FilterConfigurationRevision, RowRevision};
use std::collections::HashMap;
use std::sync::Arc;
use tokio::sync::RwLock;

View File

@ -18,8 +18,8 @@ use crate::services::grid_editor_task::GridServiceTaskScheduler;
use crate::services::row::GridBlockSnapshot;
use crate::services::tasks::{FilterTaskContext, Task, TaskContent};
use flowy_error::FlowyResult;
use flowy_grid_data_model::revision::{CellRevision, FieldId, FieldRevision, RowRevision};
use flowy_sync::client_grid::GridRevisionPad;
use grid_rev_model::{CellRevision, FieldId, FieldRevision, RowRevision};
use rayon::prelude::*;
use std::collections::HashMap;
use std::sync::Arc;

View File

@ -15,7 +15,6 @@ use crate::services::persistence::block_index::BlockIndexCache;
use crate::services::row::{make_grid_blocks, make_rows_from_row_revs, GridBlockSnapshot, RowRevisionBuilder};
use bytes::Bytes;
use flowy_error::{ErrorCode, FlowyError, FlowyResult};
use flowy_grid_data_model::revision::*;
use flowy_revision::{
RevisionCloudService, RevisionManager, RevisionMergeable, RevisionObjectDeserializer, RevisionObjectSerializer,
};
@ -23,6 +22,7 @@ use flowy_sync::client_grid::{GridRevisionChangeset, GridRevisionPad, JsonDeseri
use flowy_sync::entities::revision::Revision;
use flowy_sync::errors::{CollaborateError, CollaborateResult};
use flowy_sync::util::make_operations_from_revisions;
use grid_rev_model::*;
use lib_infra::future::{wrap_future, FutureResult};
use flowy_database::ConnectionPool;

View File

@ -1,6 +1,6 @@
use crate::services::grid_view_manager::GridViewFieldDelegate;
use flowy_grid_data_model::revision::FieldRevision;
use flowy_sync::client_grid::GridRevisionPad;
use grid_rev_model::FieldRevision;
use lib_infra::future::{wrap_future, AFFuture};
use std::sync::Arc;
use tokio::sync::RwLock;

View File

@ -14,16 +14,16 @@ use crate::services::group::{
use bytes::Bytes;
use flowy_database::ConnectionPool;
use flowy_error::{FlowyError, FlowyResult};
use flowy_grid_data_model::revision::{
gen_grid_filter_id, FieldRevision, FieldTypeRevision, FilterConfigurationRevision, GroupConfigurationRevision,
RowChangeset, RowRevision,
};
use flowy_revision::{
RevisionCloudService, RevisionManager, RevisionMergeable, RevisionObjectDeserializer, RevisionObjectSerializer,
};
use flowy_sync::client_grid::{GridViewRevisionChangeset, GridViewRevisionPad};
use flowy_sync::entities::revision::Revision;
use flowy_sync::util::make_operations_from_revisions;
use grid_rev_model::{
gen_grid_filter_id, FieldRevision, FieldTypeRevision, FilterConfigurationRevision, GroupConfigurationRevision,
RowChangeset, RowRevision,
};
use lib_infra::future::{wrap_future, AFFuture, FutureResult};
use lib_ot::core::EmptyAttributes;
use std::future::Future;

View File

@ -10,10 +10,10 @@ use crate::services::persistence::rev_sqlite::SQLiteGridViewRevisionPersistence;
use dashmap::DashMap;
use flowy_database::ConnectionPool;
use flowy_error::FlowyResult;
use flowy_grid_data_model::revision::{FieldRevision, RowChangeset, RowRevision};
use flowy_revision::{
RevisionManager, RevisionPersistence, RevisionPersistenceConfiguration, SQLiteRevisionSnapshotPersistence,
};
use grid_rev_model::{FieldRevision, RowChangeset, RowRevision};
use lib_infra::future::AFFuture;
use std::sync::Arc;

View File

@ -3,7 +3,7 @@ use crate::services::cell::CellDataIsEmpty;
use crate::services::group::controller::MoveGroupRowContext;
use crate::services::group::Group;
use flowy_error::FlowyResult;
use flowy_grid_data_model::revision::{CellRevision, FieldRevision, RowRevision};
use grid_rev_model::{CellRevision, FieldRevision, RowRevision};
use std::sync::Arc;
/// Using polymorphism to provides the customs action for different group controller.

View File

@ -1,7 +1,7 @@
use crate::entities::{GroupPB, GroupViewChangesetPB};
use crate::services::group::{default_group_configuration, GeneratedGroupContext, Group};
use flowy_error::{FlowyError, FlowyResult};
use flowy_grid_data_model::revision::{
use grid_rev_model::{
FieldRevision, FieldTypeRevision, GroupConfigurationContentSerde, GroupConfigurationRevision, GroupRevision,
};
use indexmap::IndexMap;

View File

@ -4,7 +4,7 @@ use crate::services::group::action::{GroupControllerCustomActions, GroupControll
use crate::services::group::configuration::GroupContext;
use crate::services::group::entities::Group;
use flowy_error::FlowyResult;
use flowy_grid_data_model::revision::{
use grid_rev_model::{
FieldRevision, GroupConfigurationContentSerde, GroupRevision, RowChangeset, RowRevision, TypeOptionDataDeserializer,
};
use std::marker::PhantomData;

View File

@ -8,9 +8,7 @@ use crate::services::group::controller::{
use crate::services::cell::insert_checkbox_cell;
use crate::services::group::{move_group_row, GeneratedGroupConfig, GeneratedGroupContext};
use flowy_grid_data_model::revision::{
CellRevision, CheckboxGroupConfigurationRevision, FieldRevision, GroupRevision, RowRevision,
};
use grid_rev_model::{CellRevision, CheckboxGroupConfigurationRevision, FieldRevision, GroupRevision, RowRevision};
pub type CheckboxGroupController = GenericGroupController<
CheckboxGroupConfigurationRevision,

View File

@ -2,7 +2,7 @@ use crate::entities::{GroupChangesetPB, GroupViewChangesetPB, RowPB};
use crate::services::group::action::GroupControllerSharedActions;
use crate::services::group::{Group, GroupController, MoveGroupRowContext};
use flowy_error::FlowyResult;
use flowy_grid_data_model::revision::{FieldRevision, RowRevision};
use grid_rev_model::{FieldRevision, RowRevision};
use std::sync::Arc;
/// A [DefaultGroupController] is used to handle the group actions for the [FieldType] that doesn't

View File

@ -9,7 +9,7 @@ use crate::services::group::controller::{
use crate::services::group::controller_impls::select_option_controller::util::*;
use crate::services::group::{make_no_status_group, GeneratedGroupContext};
use flowy_grid_data_model::revision::{FieldRevision, RowRevision, SelectOptionGroupConfigurationRevision};
use grid_rev_model::{FieldRevision, RowRevision, SelectOptionGroupConfigurationRevision};
// MultiSelect
pub type MultiSelectGroupController = GenericGroupController<

View File

@ -10,7 +10,7 @@ use crate::services::group::controller_impls::select_option_controller::util::*;
use crate::services::group::entities::Group;
use crate::services::group::{make_no_status_group, GeneratedGroupContext};
use flowy_grid_data_model::revision::{FieldRevision, RowRevision, SelectOptionGroupConfigurationRevision};
use grid_rev_model::{FieldRevision, RowRevision, SelectOptionGroupConfigurationRevision};
// SingleSelect
pub type SingleSelectGroupController = GenericGroupController<

View File

@ -4,9 +4,7 @@ use crate::services::field::{SelectOptionCellDataPB, SelectOptionPB, CHECK};
use crate::services::group::configuration::GroupContext;
use crate::services::group::controller::MoveGroupRowContext;
use crate::services::group::{GeneratedGroupConfig, Group};
use flowy_grid_data_model::revision::{
CellRevision, FieldRevision, GroupRevision, RowRevision, SelectOptionGroupConfigurationRevision,
};
use grid_rev_model::{CellRevision, FieldRevision, GroupRevision, RowRevision, SelectOptionGroupConfigurationRevision};
pub type SelectOptionGroupContext = GroupContext<SelectOptionGroupConfigurationRevision>;

View File

@ -6,7 +6,7 @@ use crate::services::group::{
MultiSelectGroupController, SelectOptionGroupContext, SingleSelectGroupController,
};
use flowy_error::FlowyResult;
use flowy_grid_data_model::revision::{
use grid_rev_model::{
CheckboxGroupConfigurationRevision, DateGroupConfigurationRevision, FieldRevision, GroupConfigurationRevision,
GroupRevision, LayoutRevision, NumberGroupConfigurationRevision, RowRevision,
SelectOptionGroupConfigurationRevision, TextGroupConfigurationRevision, UrlGroupConfigurationRevision,

View File

@ -3,11 +3,11 @@ use crate::services::persistence::GridDatabase;
use bytes::Bytes;
use flowy_database::kv::KV;
use flowy_error::FlowyResult;
use flowy_grid_data_model::revision::GridRevision;
use flowy_revision::reset::{RevisionResettable, RevisionStructReset};
use flowy_sync::client_grid::{make_grid_rev_json_str, GridOperationsBuilder, GridRevisionPad};
use flowy_sync::entities::revision::Revision;
use flowy_sync::util::md5;
use grid_rev_model::GridRevision;
use crate::services::persistence::rev_sqlite::SQLiteGridRevisionPersistence;
use std::sync::Arc;

View File

@ -3,7 +3,7 @@ use crate::services::cell::{
insert_url_cell,
};
use flowy_grid_data_model::revision::{gen_row_id, CellRevision, FieldRevision, RowRevision, DEFAULT_ROW_HEIGHT};
use grid_rev_model::{gen_row_id, CellRevision, FieldRevision, RowRevision, DEFAULT_ROW_HEIGHT};
use indexmap::IndexMap;
use std::collections::HashMap;
use std::sync::Arc;

View File

@ -1,6 +1,6 @@
use crate::entities::{BlockPB, RepeatedBlockPB, RowPB};
use flowy_error::FlowyResult;
use flowy_grid_data_model::revision::RowRevision;
use grid_rev_model::RowRevision;
use std::collections::HashMap;
use std::sync::Arc;

View File

@ -1,8 +1,8 @@
use crate::entities::FieldType;
use crate::services::field::*;
use crate::services::row::RowRevisionBuilder;
use flowy_grid_data_model::revision::BuildGridContext;
use flowy_sync::client_grid::GridBuilder;
use grid_rev_model::BuildGridContext;
pub fn make_default_grid() -> BuildGridContext {
let mut grid_builder = GridBuilder::new();

View File

@ -1,7 +1,7 @@
use crate::grid::block_test::script::GridRowTest;
use crate::grid::block_test::script::RowScript::*;
use flowy_grid_data_model::revision::{GridBlockMetaRevision, GridBlockMetaRevisionChangeset};
use grid_rev_model::{GridBlockMetaRevision, GridBlockMetaRevisionChangeset};
#[tokio::test]
async fn grid_create_block() {

View File

@ -3,7 +3,7 @@ use crate::grid::block_test::script::{CreateRowScriptBuilder, GridRowTest};
use crate::grid::grid_editor::{COMPLETED, FACEBOOK, GOOGLE, PAUSED, TWITTER};
use flowy_grid::entities::FieldType;
use flowy_grid::services::field::{SELECTION_IDS_SEPARATOR, UNCHECK};
use flowy_grid_data_model::revision::RowChangeset;
use grid_rev_model::RowChangeset;
#[tokio::test]
async fn grid_create_row_count_test() {

View File

@ -4,9 +4,7 @@ use crate::grid::grid_editor::GridEditorTest;
use flowy_grid::entities::{CreateRowParams, FieldType, GridCellIdParams, GridLayout, RowPB};
use flowy_grid::services::field::*;
use flowy_grid_data_model::revision::{
GridBlockMetaRevision, GridBlockMetaRevisionChangeset, RowChangeset, RowRevision,
};
use grid_rev_model::{GridBlockMetaRevision, GridBlockMetaRevisionChangeset, RowChangeset, RowRevision};
use std::collections::HashMap;
use std::sync::Arc;
use strum::IntoEnumIterator;

View File

@ -5,7 +5,7 @@ use flowy_grid::services::field::{
DateCellChangesetPB, MultiSelectTypeOptionPB, SelectOptionPB, SingleSelectTypeOptionPB,
};
use flowy_grid::services::row::RowRevisionBuilder;
use flowy_grid_data_model::revision::{FieldRevision, RowRevision};
use grid_rev_model::{FieldRevision, RowRevision};
use strum::EnumCount;

View File

@ -1,6 +1,6 @@
use crate::grid::grid_editor::GridEditorTest;
use flowy_grid::entities::{CreateFieldParams, FieldChangesetParams};
use flowy_grid_data_model::revision::FieldRevision;
use grid_rev_model::FieldRevision;
pub enum FieldScript {
CreateField {

View File

@ -4,7 +4,7 @@ use crate::grid::field_test::util::*;
use flowy_grid::entities::FieldChangesetParams;
use flowy_grid::services::field::selection_type_option::SelectOptionPB;
use flowy_grid::services::field::SingleSelectTypeOptionPB;
use flowy_grid_data_model::revision::TypeOptionDataSerializer;
use grid_rev_model::TypeOptionDataSerializer;
#[tokio::test]
async fn grid_create_field() {

View File

@ -1,7 +1,7 @@
use flowy_grid::entities::*;
use flowy_grid::services::field::selection_type_option::SelectOptionPB;
use flowy_grid::services::field::*;
use flowy_grid_data_model::revision::*;
use grid_rev_model::*;
pub fn create_text_field(grid_id: &str) -> (CreateFieldParams, FieldRevision) {
let mut field_rev = FieldBuilder::new(RichTextTypeOptionBuilder::default())

View File

@ -5,7 +5,7 @@
use flowy_grid::entities::{InsertFilterParams, InsertFilterPayloadPB, DeleteFilterParams, GridLayout, GridSettingChangesetParams, GridSettingPB};
use flowy_grid::services::setting::GridSettingChangesetBuilder;
use flowy_grid_data_model::revision::{FieldRevision, FieldTypeRevision};
use grid_rev_model::{FieldRevision, FieldTypeRevision};
use crate::grid::grid_editor::GridEditorTest;
pub enum FilterScript {

View File

@ -1,7 +1,7 @@
use crate::grid::filter_test::script::FilterScript::*;
use crate::grid::filter_test::script::*;
use flowy_grid::entities::{FieldType, InsertFilterPayloadPB, TextFilterCondition};
use flowy_grid_data_model::revision::FieldRevision;
use grid_rev_model::FieldRevision;
#[tokio::test]
async fn grid_filter_create_test() {

View File

@ -9,11 +9,11 @@ use flowy_grid::services::field::*;
use flowy_grid::services::grid_editor::{GridRevisionEditor, GridRevisionSerde};
use flowy_grid::services::row::{CreateRowRevisionPayload, RowRevisionBuilder};
use flowy_grid::services::setting::GridSettingChangesetBuilder;
use flowy_grid_data_model::revision::*;
use flowy_revision::REVISION_WRITE_INTERVAL_IN_MILLIS;
use flowy_sync::client_grid::GridBuilder;
use flowy_test::helper::ViewTest;
use flowy_test::FlowySDKTest;
use grid_rev_model::*;
use std::collections::HashMap;
use std::sync::Arc;
use std::time::Duration;

View File

@ -6,7 +6,7 @@ use flowy_grid::services::field::{
SingleSelectTypeOption, SELECTION_IDS_SEPARATOR,
};
use flowy_grid::services::row::{decode_cell_data_from_type_option_cell_data, CreateRowMetaBuilder};
use flowy_grid_data_model::entities::{
use grid_rev_model::entities::{
CellChangeset, FieldChangesetParams, FieldType, GridBlockInfoChangeset, GridBlockMetaSnapshot, RowMetaChangeset,
TypeOptionDataFormat,
};

View File

@ -6,7 +6,7 @@ use flowy_grid::services::cell::{delete_select_option_cell, insert_select_option
use flowy_grid::services::field::{
edit_single_select_type_option, SelectOptionPB, SelectTypeOptionSharedAction, SingleSelectTypeOptionPB,
};
use flowy_grid_data_model::revision::{FieldRevision, RowChangeset};
use grid_rev_model::{FieldRevision, RowChangeset};
use std::sync::Arc;
pub enum GroupScript {

View File

@ -2,15 +2,15 @@ use bytes::Bytes;
use flowy_grid::services::field::*;
use flowy_grid::services::grid_meta_editor::{GridMetaEditor, GridPadBuilder};
use flowy_grid::services::row::CreateRowMetaPayload;
use flowy_grid_data_model::entities::{
BuildGridContext, CellChangeset, Field, FieldChangesetParams, FieldMeta, FieldOrder, FieldType,
GridBlockInfoChangeset, GridBlockMetaSnapshot, InsertFieldParams, RowMeta, RowMetaChangeset, RowOrder,
TypeOptionDataFormat,
};
use flowy_revision::REVISION_WRITE_INTERVAL_IN_MILLIS;
use flowy_sync::client_grid::GridBuilder;
use flowy_test::helper::ViewTest;
use flowy_test::FlowySDKTest;
use grid_rev_model::entities::{
BuildGridContext, CellChangeset, Field, FieldChangesetParams, FieldMeta, FieldOrder, FieldType,
GridBlockInfoChangeset, GridBlockMetaSnapshot, InsertFieldParams, RowMeta, RowMetaChangeset, RowOrder,
TypeOptionDataFormat,
};
use std::collections::HashMap;
use std::sync::Arc;
use std::time::Duration;

View File

@ -10,7 +10,7 @@ lib-dispatch = { path = "../lib-dispatch" }
flowy-error = { path = "../flowy-error", features = ["collaboration", "http_server"] }
flowy-derive = { path = "../../../shared-lib/flowy-derive" }
flowy-sync = { path = "../../../shared-lib/flowy-sync"}
flowy-folder-data-model = { path = "../../../shared-lib/flowy-folder-data-model"}
folder-rev-model = { path = "../../../shared-lib/folder-rev-model"}
flowy-folder = { path = "../flowy-folder" }
flowy-user = { path = "../flowy-user" }
flowy-document = { path = "../flowy-document" }
@ -21,7 +21,7 @@ lib-ws = { path = "../../../shared-lib/lib-ws" }
bytes = { version = "1.0" }
anyhow = "1.0"
tokio = {version = "1", features = ["sync"]}
parking_lot = "0.11"
parking_lot = "0.12.1"
strum = "0.21"
strum_macros = "0.21"
tracing = { version = "0.1", features = ["log"] }
@ -45,7 +45,6 @@ dart = [
"flowy-user/dart",
"flowy-sync/dart",
"flowy-error/dart",
"flowy-folder-data-model/dart"
]
[build-dependencies]

View File

@ -10,7 +10,7 @@ use flowy_folder::entities::{
{AppIdPB, CreateAppParams, UpdateAppParams},
};
use flowy_folder::event_map::FolderCouldServiceV1;
use flowy_folder_data_model::revision::{AppRevision, TrashRevision, ViewRevision, WorkspaceRevision};
use folder_rev_model::{AppRevision, TrashRevision, ViewRevision, WorkspaceRevision};
use http_flowy::errors::ServerError;
use http_flowy::response::FlowyResponse;
use lazy_static::lazy_static;

View File

@ -258,13 +258,11 @@ use flowy_folder::entities::{
view::{CreateViewParams, RepeatedViewIdPB, UpdateViewParams, ViewIdPB},
workspace::{CreateWorkspaceParams, UpdateWorkspaceParams, WorkspaceIdPB},
};
use flowy_folder_data_model::revision::{
gen_app_id, gen_workspace_id, AppRevision, TrashRevision, ViewRevision, WorkspaceRevision,
};
use flowy_user::entities::{
SignInParams, SignInResponse, SignUpParams, SignUpResponse, UpdateUserProfileParams, UserProfilePB,
};
use flowy_user::event_map::UserCloudService;
use folder_rev_model::{gen_app_id, gen_workspace_id, AppRevision, TrashRevision, ViewRevision, WorkspaceRevision};
use lib_infra::{future::FutureResult, util::timestamp};
impl FolderCouldServiceV1 for LocalServer {

View File

@ -26,7 +26,7 @@ nanoid = "0.4.0"
flowy-revision = {path = "../flowy-revision", features = ["flowy_unit_test"]}
serde = { version = "1.0", features = ["derive"] }
serde_json = { version = "1.0" }
parking_lot = "0.11"
parking_lot = "0.12.1"
[features]
flowy_unit_test = []

Some files were not shown because too many files have changed in this diff Show More