svell_jerry 3 years ago
parent
commit
4ba3151535

+ 8 - 0
packages/xlsx/src/Cell.ts

@@ -0,0 +1,8 @@
+export class Cell {
+    // origin value
+    v: string | number | boolean;
+    // formatted value
+    m: string;
+    // formula '=SUM(1)'
+    f: string;
+}

+ 182 - 0
packages/xlsx/src/CellStyle.ts

@@ -0,0 +1,182 @@
+export enum BorderStyleTypes {
+    NONE,
+    THIN,
+    HAIR,
+    DOTTED,
+    DASHED,
+    DASH_DOT,
+    DASH_DOT_DOT,
+    DOUBLE,
+    MEDIUM,
+    MEDIUM_DASHED,
+    MEDIUM_DASHDOT,
+    MEDIUM_DASH_DOT_DOT,
+    SLANT_DASH_DOT,
+    THICK,
+}
+
+export enum ThemeColor{
+    TEXT,
+    BACKGROUND,
+    ACCENT1,
+    ACCENT2,
+    ACCENT3,
+    ACCENT4,
+    ACCENT5,
+    ACCENT6,
+    LINK,
+}
+
+export enum TextDecoration {
+    DASH,
+    DASH_DOT_DOT_HEAVY,
+    DASH_DOT_HEAVY,
+    DASHED_HEAVY,
+    DASH_LONG,
+    DASH_LONG_HEAVY,
+    DOT_DASH,
+    DOT_DOT_DASH,
+    DOTTED,
+    DOTTED_HEAVY,
+    DOUBLE,
+    NONE,
+    SINGLE,
+    THICK,
+    WAVE,
+    WAVY_DOUBLE,
+    WAVY_HEAVY,
+    WORDS,
+}
+
+export interface IBorderStyleData {
+    /**
+     * color type
+     */
+    cl: IColorStyle;
+
+    /**
+     * border type
+     */
+    s: BorderStyleTypes;
+}
+
+export interface IBorderData {
+    /**
+     * top border
+     */
+    t: IBorderStyleData;
+
+    /**
+     * right border
+     */
+    r: IBorderStyleData;
+
+    /**
+     * bottom border
+     */
+    b: IBorderStyleData;
+
+    /**
+     * left border
+     */
+    l: IBorderStyleData;
+}
+
+export interface IColorStyle {
+    /**
+     * rgb color
+     */
+    rgb: string;
+
+    /**
+     * theme color
+     */
+    th: ThemeColor;
+}
+
+export interface ITextRotation {
+    /**
+     * angle
+     */
+    a: number;
+
+    /**
+     * vertical
+     * true : 1
+     * false : 0
+     */
+    v?: number;
+}
+
+export interface ITextDecoration {
+    /**
+     * colorType
+     */
+    cl: IColorStyle;
+
+    /**
+     * controller display textDecoration
+     */
+    s: boolean;
+
+    /**
+     * text decoration type
+     */
+    t: TextDecoration;
+}
+
+export class CellStyle {
+    /**
+     * fontFamily
+     */
+    ff: string;
+
+    /**
+     * fontSize
+     */
+    fs: number;
+
+    /**
+     * italic
+     * 0: false
+     * 1: true
+     */
+    it: number;
+
+    /**
+     * bold
+     * 0: false
+     * 1: true
+     */
+    bl: number;
+
+    /**
+     * underline
+     */
+    ul: ITextDecoration;
+
+    /**
+     * strikethrough
+     */
+    st: ITextDecoration;
+
+    /**
+     * overline
+     */
+    ol: ITextDecoration;
+
+    /**
+     * background
+     */
+    bg: IColorStyle;
+
+    /**
+     * border
+     */
+    bd: IBorderData;
+
+    /**
+     * foreground
+     */
+    cl: IColorStyle;
+}

+ 0 - 0
packages/xlsx/src/Column.ts


+ 0 - 0
packages/xlsx/src/LuckySheetApp.ts


+ 0 - 0
packages/xlsx/src/Row.ts


+ 0 - 0
packages/xlsx/src/WorkBook.ts


+ 0 - 0
packages/xlsx/src/WorkShhet.ts


+ 3 - 0
packages/xlsx/src/Zipper.ts

@@ -0,0 +1,3 @@
+export class Zipper {
+
+}

+ 0 - 9
packages/xlsx/src/doc/Alignment.ts

@@ -1,9 +0,0 @@
-export interface Alignment  {
-    horizontal: 'left' | 'center' | 'right' | 'fill' | 'justify' | 'centerContinuous' | 'distributed';
-    vertical: 'top' | 'middle' | 'bottom' | 'distributed' | 'justify';
-    wrapText: boolean;
-    shrinkToFit: boolean;
-    indent: number;
-    readingOrder: 'rtl' | 'ltr';
-    textRotation: number | 'vertical';
-}

+ 0 - 4
packages/xlsx/src/doc/Border.ts

@@ -1,4 +0,0 @@
-export interface Border {
-    style: BorderStyle;
-    color: Partial<Color>;
-}

+ 0 - 3
packages/xlsx/src/doc/CalcProperties.ts

@@ -1,3 +0,0 @@
-export class CalcProperties {
-
-}

+ 0 - 4
packages/xlsx/src/doc/Color.ts

@@ -1,4 +0,0 @@
-export interface Color {
-    argb: string;
-    theme: number;
-}

+ 0 - 3
packages/xlsx/src/doc/Properties.ts

@@ -1,3 +0,0 @@
-export class Properties {
-    public tabColor: string
-}

+ 0 - 3
packages/xlsx/src/doc/Protection.ts

@@ -1,3 +0,0 @@
-export interface Protection {
-    locked: boolean;
-}

+ 0 - 3
packages/xlsx/src/doc/Style.ts

@@ -1,3 +0,0 @@
-export class Style {
-
-}

+ 0 - 16
packages/xlsx/src/doc/WorkBook.ts

@@ -1,16 +0,0 @@
-import {
-    CalcProperties,
-    Properties
-} from "../internal";
-
-export class WorkBook {
-    public category: string;
-    public company: string;
-    public created: Date = new Date();
-    public description: string;
-    public keywords: string;
-    public manager: string;
-    public modified: Date = this.created;
-    public properties: Properties;
-    public calcProperties: CalcProperties
-}

+ 0 - 6
packages/xlsx/src/doc/WorkSheet.ts

@@ -1,6 +0,0 @@
-export class WorkSheet {
-    public id: string;
-    public orderNo: string;
-    public name: string;
-    public state: string;
-}

+ 0 - 5
packages/xlsx/src/internal.ts

@@ -1,5 +0,0 @@
-export  * from './doc/Properties'
-export  * from './doc/CalcProperties'
-export * from './doc/WorkBook'
-
-export * from './xlsx/BaseXForm'

+ 0 - 3
packages/xlsx/src/xlsx/BaseXForm.ts

@@ -1,3 +0,0 @@
-export class BaseXForm {
-
-}