Skip to content

Commit

Permalink
Merge pull request #52 from proclml/heyiliang/cell-style
Browse files Browse the repository at this point in the history
Heyiliang/cell style
  • Loading branch information
ImJeremyHe authored May 2, 2022
2 parents 38d3fad + cade223 commit 1ef7664
Show file tree
Hide file tree
Showing 47 changed files with 1,272 additions and 290 deletions.
6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "logisheets"
version = "0.1.0"
version = "0.2.0"
description = "A web spreadsheets application written in Rust and Typescript"
keywords = ["excel", "spreadsheets", "ooxml", "logisheets"]
readme = "README.md"
Expand All @@ -21,5 +21,5 @@ members = [
]

[dependencies]
logisheets_controller = {path = "crates/controller", version = "0.1.0"}
logisheets_workbook = {path = "crates/workbook", version = "0.1.0"}
logisheets_controller = {path = "crates/controller", version = "0.2.0"}
logisheets_workbook = {path = "crates/workbook", version = "0.2.0"}
10 changes: 5 additions & 5 deletions crates/controller/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "logisheets_controller"
version = "0.1.0"
version = "0.2.0"
description = "the core of LogiSheets"
authors = ["ImJeremyHe<[email protected]>"]
edition = "2018"
Expand All @@ -21,7 +21,7 @@ statrs = "0.15.0"
unicode-segmentation = "1.8.0"
ts-rs = "6.1.2"

logisheets_base = {version = "0.1.0", path = "./base"}
logisheets_lexer = {version = "0.1.0", path = "./lexer"}
logisheets_parser = {version = "0.1.1", path = "./parser"}
logisheets_workbook = {version = "0.1.0", path = "../workbook"}
logisheets_base = {version = "0.2.0", path = "./base"}
logisheets_lexer = {version = "0.2.0", path = "./lexer"}
logisheets_parser = {version = "0.2.0", path = "./parser"}
logisheets_workbook = {version = "0.2.0", path = "../workbook"}
4 changes: 2 additions & 2 deletions crates/controller/base/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "logisheets_base"
version = "0.1.0"
version = "0.2.0"
description = "some basic definitions for LogiSheets"
authors = ["ImJeremyHe<[email protected]>"]
license = "MIT"
Expand All @@ -11,4 +11,4 @@ futures = "0.3.19"
im = "15.0.0"
serde = {version = "1.0.125", features = ["derive"]}
ts-rs = "6.1.2"
logisheets_workbook = {version = "0.1.0", path = "../../workbook"}
logisheets_workbook = {version = "0.2.0", path = "../../workbook"}
2 changes: 1 addition & 1 deletion crates/controller/lexer/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "logisheets_lexer"
version = "0.1.0"
version = "0.2.0"
edition = "2018"
description = "the lexer for excel formula"
authors = ["ImJeremyHe<[email protected]>"]
Expand Down
6 changes: 3 additions & 3 deletions crates/controller/parser/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "logisheets_parser"
version = "0.1.1"
version = "0.2.0"
edition = "2018"
description = "the parser of excel formula"
authors = ["ImJeremyHe<[email protected]>"]
Expand All @@ -12,5 +12,5 @@ pest = "2.1.3"
pest_derive = "2.1.0"
chrono = "0.4.19"
regex = "1"
logisheets_lexer = {version = "0.1.0", path = "../lexer"}
logisheets_base = {version = "0.1.0", path = "../base"}
logisheets_lexer = {version = "0.2.0", path = "../lexer"}
logisheets_base = {version = "0.2.0", path = "../base"}
14 changes: 1 addition & 13 deletions crates/controller/src/controller/display.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use super::style::Style;
use logisheets_base::BlockId;
use logisheets_workbook::prelude::*;
use serde::Serialize;

#[derive(Debug, Clone, Serialize, TS)]
Expand Down Expand Up @@ -137,18 +137,6 @@ pub fn get_default_col_width() -> f64 {
8.38
}

#[derive(Debug, Clone, Serialize, TS)]
#[ts(export_to = "../../src/bindings/style.ts")]
#[serde(rename_all = "camelCase")]
pub struct Style {
pub font: CtFont,
pub fill: CtFill,
pub border: CtBorder,
pub alignment: Option<CtCellAlignment>,
pub protection: Option<CtCellProtection>,
pub formatter: String,
}

#[derive(Debug, Clone, Serialize, TS)]
#[ts(export, export_to = "../../src/bindings/value.ts")]
#[serde(rename_all = "camelCase")]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
use super::super::style::PatternFill;
use logisheets_workbook::prelude::*;
use serde::Serialize;

Expand Down Expand Up @@ -37,5 +38,5 @@ pub struct StyleUpdateType {
pub set_bottom_border_style: Option<StBorderStyle>,
pub set_border_giagonal_up: Option<bool>,
pub set_border_giagonal_down: Option<bool>,
pub set_pattern_fill: Option<CtPatternFill>,
pub set_pattern_fill: Option<PatternFill>,
}
1 change: 1 addition & 0 deletions crates/controller/src/controller/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ use logisheets_workbook::prelude::{read, SerdeErr};
pub mod display;
pub mod edit_action;
pub mod status;
pub mod style;
mod transaction;
mod viewer;
use crate::file_loader2::load;
Expand Down
Loading

0 comments on commit 1ef7664

Please sign in to comment.