From 2f1cd0d12742a0e5ffe09b4d08b4613fc562f8d9 Mon Sep 17 00:00:00 2001 From: bokuweb Date: Tue, 20 Oct 2020 16:26:34 +0900 Subject: [PATCH] publish (#182) --- docx-core/src/types/border_type.rs | 84 ++++++++++++++++++++++-------- docx-wasm/js/table-cell-border.ts | 23 +++++++- docx-wasm/package.json | 2 +- 3 files changed, 86 insertions(+), 23 deletions(-) diff --git a/docx-core/src/types/border_type.rs b/docx-core/src/types/border_type.rs index f752e47..06bd765 100644 --- a/docx-core/src/types/border_type.rs +++ b/docx-core/src/types/border_type.rs @@ -22,6 +22,27 @@ pub enum BorderType { DotDash, DotDotDash, Triple, + ThinThickSmallGap, + ThickThinSmallGap, + ThinThickThinSmallGap, + ThinThickMediumGap, + ThickThinMediumGap, + ThinThickThinMediumGap, + ThinThickLargeGap, + ThickThinLargeGap, + ThinThickThinLargeGap, + Wave, + DoubleWave, + DashSmallGap, + DashDotStroked, + ThreeDEmboss, + ThreeDEngrave, + Outset, + Inset, + Apples, + ArchedScallops, + BabyPacifier, + BabyRattle, } impl fmt::Display for BorderType { @@ -37,6 +58,27 @@ impl fmt::Display for BorderType { BorderType::DotDash => write!(f, "dotDash"), BorderType::DotDotDash => write!(f, "dotDotDash"), BorderType::Triple => write!(f, "triple"), + BorderType::ThinThickSmallGap => write!(f, "thinThickSmallGap"), + BorderType::ThickThinSmallGap => write!(f, "thickThinSmallGap"), + BorderType::ThinThickThinSmallGap => write!(f, "thinThickThinSmallGap"), + BorderType::ThinThickMediumGap => write!(f, "thinThickMediumGap"), + BorderType::ThickThinMediumGap => write!(f, "thickThinMediumGap"), + BorderType::ThinThickThinMediumGap => write!(f, "thinThickThinMediumGap"), + BorderType::ThinThickLargeGap => write!(f, "thinThickLargeGap"), + BorderType::ThickThinLargeGap => write!(f, "thickThinLargeGap"), + BorderType::ThinThickThinLargeGap => write!(f, "thinThickThinLargeGap"), + BorderType::Wave => write!(f, "wave"), + BorderType::DoubleWave => write!(f, "doubleWave"), + BorderType::DashSmallGap => write!(f, "dashSmallGap"), + BorderType::DashDotStroked => write!(f, "dashDotStroked"), + BorderType::ThreeDEmboss => write!(f, "threeDEmboss"), + BorderType::ThreeDEngrave => write!(f, "threeDEngrave"), + BorderType::Outset => write!(f, "outset"), + BorderType::Inset => write!(f, "inset"), + BorderType::Apples => write!(f, "apples"), + BorderType::ArchedScallops => write!(f, "archedScallops"), + BorderType::BabyPacifier => write!(f, "babyPacifier"), + BorderType::BabyRattle => write!(f, "babyRattle"), } } } @@ -55,6 +97,27 @@ impl FromStr for BorderType { "dotDash" => Ok(BorderType::DotDash), "dotDotDash" => Ok(BorderType::DotDotDash), "triple" => Ok(BorderType::Triple), + "thinThickSmallGap" => Ok(BorderType::ThinThickSmallGap), + "thickThinSmallGap" => Ok(BorderType::ThickThinSmallGap), + "thinThickThinSmallGap" => Ok(BorderType::ThinThickThinSmallGap), + "thinThickMediumGap" => Ok(BorderType::ThinThickMediumGap), + "thickThinMediumGap" => Ok(BorderType::ThickThinMediumGap), + "thinThickThinMediumGap" => Ok(BorderType::ThinThickThinMediumGap), + "thinThickLargeGap" => Ok(BorderType::ThinThickLargeGap), + "thickThinLargeGap" => Ok(BorderType::ThickThinLargeGap), + "thinThickThinLargeGap" => Ok(BorderType::ThinThickThinLargeGap), + "wave" => Ok(BorderType::Wave), + "doubleWave" => Ok(BorderType::DoubleWave), + "dashSmallGap" => Ok(BorderType::DashSmallGap), + "dashDotStroked" => Ok(BorderType::DashDotStroked), + "threeDEmboss" => Ok(BorderType::ThreeDEmboss), + "threeDEngrave" => Ok(BorderType::ThreeDEngrave), + "outset" => Ok(BorderType::Outset), + "inset" => Ok(BorderType::Inset), + "apples" => Ok(BorderType::Apples), + "archedScallops" => Ok(BorderType::ArchedScallops), + "babyPacifier" => Ok(BorderType::BabyPacifier), + "babyRattle" => Ok(BorderType::BabyRattle), _ => Ok(BorderType::Single), } } @@ -62,27 +125,6 @@ impl FromStr for BorderType { /* Unsupported types -"thinThickSmallGap" -"thickThinSmallGap" -"thinThickThinSmallGap" -"thinThickMediumGap" -"thickThinMediumGap" -"thinThickThinMediumGap" -"thinThickLargeGap" -"thickThinLargeGap" -"thinThickThinLargeGap" -"wave" -"doubleWave" -"dashSmallGap" -"dashDotStroked" -"threeDEmboss" -"threeDEngrave" -"outset" -"inset" -"apples" -"archedScallops" -"babyPacifier" -"babyRattle" "balloons3Colors" "balloonsHotAir" "basicBlackDashes" diff --git a/docx-wasm/js/table-cell-border.ts b/docx-wasm/js/table-cell-border.ts index 612a260..92c09aa 100644 --- a/docx-wasm/js/table-cell-border.ts +++ b/docx-wasm/js/table-cell-border.ts @@ -8,7 +8,28 @@ export type BorderType = | "dashed" | "dotDash" | "dotDotDash" - | "triple"; + | "triple" + | "thinThickSmallGap" + | "thickThinSmallGap" + | "thinThickThinSmallGap" + | "thinThickMediumGap" + | "thickThinMediumGap" + | "thinThickThinMediumGap" + | "thinThickLargeGap" + | "thickThinLargeGap" + | "thinThickThinLargeGap" + | "wave" + | "doubleWave" + | "dashSmallGap" + | "dashDotStroked" + | "threeDEmboss" + | "threeDEngrave" + | "outset" + | "inset" + | "apples" + | "archedScallops" + | "babyPacifier" + | "babyRattle"; export type BorderPosition = | "left" diff --git a/docx-wasm/package.json b/docx-wasm/package.json index cb50baa..2cf0cdc 100644 --- a/docx-wasm/package.json +++ b/docx-wasm/package.json @@ -1,6 +1,6 @@ { "name": "docx-wasm", - "version": "0.0.112", + "version": "0.0.113", "main": "dist/node/index.js", "browser": "dist/web/index.js", "author": "bokuweb ",