@visactor/vtable 1.2.1-alpha.2 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/ListTable.js +2 -1
- package/cjs/ListTable.js.map +1 -1
- package/cjs/PivotChart.d.ts +1 -5
- package/cjs/PivotChart.js +7 -30
- package/cjs/PivotChart.js.map +1 -1
- package/cjs/PivotTable.d.ts +7 -2
- package/cjs/PivotTable.js +85 -17
- package/cjs/PivotTable.js.map +1 -1
- package/cjs/body-helper/style/Style.d.ts +3 -0
- package/cjs/body-helper/style/Style.js +32 -25
- package/cjs/body-helper/style/Style.js.map +1 -1
- package/cjs/components/tooltip/TooltipHandler.js +4 -2
- package/cjs/components/tooltip/TooltipHandler.js.map +1 -1
- package/cjs/components/tooltip/logic/BubbleTooltipElement.d.ts +2 -0
- package/cjs/components/tooltip/logic/BubbleTooltipElement.js +18 -4
- package/cjs/components/tooltip/logic/BubbleTooltipElement.js.map +1 -1
- package/cjs/components/tooltip/logic/BubbleTooltipElementStyle.js +1 -1
- package/cjs/components/tooltip/logic/BubbleTooltipElementStyle.js.map +1 -1
- package/cjs/core/BaseTable.d.ts +1 -1
- package/cjs/core/BaseTable.js +7 -7
- package/cjs/core/BaseTable.js.map +1 -1
- package/cjs/core/tableHelper.js +2 -1
- package/cjs/core/tableHelper.js.map +1 -1
- package/cjs/event/listener/container-dom.js +9 -6
- package/cjs/event/listener/container-dom.js.map +1 -1
- package/cjs/event/listener/table-group.js +8 -7
- package/cjs/event/listener/table-group.js.map +1 -1
- package/cjs/header-helper/header-helper.d.ts +1 -0
- package/cjs/header-helper/header-helper.js +12 -2
- package/cjs/header-helper/header-helper.js.map +1 -1
- package/cjs/header-helper/style/Style.d.ts +3 -0
- package/cjs/header-helper/style/Style.js +34 -27
- package/cjs/header-helper/style/Style.js.map +1 -1
- package/cjs/index.d.ts +1 -1
- package/cjs/index.js +2 -2
- package/cjs/index.js.map +1 -1
- package/cjs/layout/pivot-header-layout.js +26 -8
- package/cjs/layout/pivot-header-layout.js.map +1 -1
- package/cjs/layout/tree-helper.js +4 -1
- package/cjs/layout/tree-helper.js.map +1 -1
- package/cjs/scenegraph/icon/icon-update.js +1 -0
- package/cjs/scenegraph/icon/icon-update.js.map +1 -1
- package/cjs/scenegraph/utils/text-icon-layout.js +1 -1
- package/cjs/scenegraph/utils/text-icon-layout.js.map +1 -1
- package/cjs/state/select/update-position.js +1 -1
- package/cjs/state/select/update-position.js.map +1 -1
- package/cjs/state/state.js +7 -5
- package/cjs/state/state.js.map +1 -1
- package/cjs/themes/theme.js +3 -0
- package/cjs/themes/theme.js.map +1 -1
- package/cjs/ts-types/base-table.d.ts +3 -1
- package/cjs/ts-types/base-table.js.map +1 -1
- package/cjs/ts-types/column/style.d.ts +1 -0
- package/cjs/ts-types/column/style.js.map +1 -1
- package/cjs/ts-types/common.d.ts +4 -13
- package/cjs/ts-types/common.js.map +1 -1
- package/cjs/ts-types/icon.d.ts +1 -0
- package/cjs/ts-types/icon.js.map +1 -1
- package/cjs/ts-types/list-table/layout-map/api.d.ts +2 -1
- package/cjs/ts-types/list-table/layout-map/api.js.map +1 -1
- package/cjs/ts-types/pivot-table/dimension/basic-dimension.d.ts +3 -1
- package/cjs/ts-types/pivot-table/dimension/basic-dimension.js.map +1 -1
- package/cjs/ts-types/pivot-table/indicator/basic-indicator.d.ts +1 -0
- package/cjs/ts-types/pivot-table/indicator/basic-indicator.js.map +1 -1
- package/cjs/ts-types/style-define.d.ts +1 -0
- package/cjs/ts-types/style-define.js.map +1 -1
- package/cjs/ts-types/table-engine.d.ts +4 -1
- package/cjs/ts-types/table-engine.js.map +1 -1
- package/cjs/ts-types/tooltip.d.ts +1 -0
- package/cjs/ts-types/tooltip.js.map +1 -1
- package/cjs/vrender.js.map +1 -1
- package/dist/vtable.js +354 -91
- package/dist/vtable.min.js +2 -2
- package/es/ListTable.js +2 -1
- package/es/ListTable.js.map +1 -1
- package/es/PivotChart.d.ts +1 -5
- package/es/PivotChart.js +6 -31
- package/es/PivotChart.js.map +1 -1
- package/es/PivotTable.d.ts +7 -2
- package/es/PivotTable.js +87 -19
- package/es/PivotTable.js.map +1 -1
- package/es/body-helper/style/Style.d.ts +3 -0
- package/es/body-helper/style/Style.js +32 -25
- package/es/body-helper/style/Style.js.map +1 -1
- package/es/components/tooltip/TooltipHandler.js +4 -2
- package/es/components/tooltip/TooltipHandler.js.map +1 -1
- package/es/components/tooltip/logic/BubbleTooltipElement.d.ts +2 -0
- package/es/components/tooltip/logic/BubbleTooltipElement.js +18 -4
- package/es/components/tooltip/logic/BubbleTooltipElement.js.map +1 -1
- package/es/components/tooltip/logic/BubbleTooltipElementStyle.js +1 -1
- package/es/components/tooltip/logic/BubbleTooltipElementStyle.js.map +1 -1
- package/es/core/BaseTable.d.ts +1 -1
- package/es/core/BaseTable.js +7 -7
- package/es/core/BaseTable.js.map +1 -1
- package/es/core/tableHelper.js +2 -1
- package/es/core/tableHelper.js.map +1 -1
- package/es/event/listener/container-dom.js +9 -6
- package/es/event/listener/container-dom.js.map +1 -1
- package/es/event/listener/table-group.js +8 -7
- package/es/event/listener/table-group.js.map +1 -1
- package/es/header-helper/header-helper.d.ts +1 -0
- package/es/header-helper/header-helper.js +12 -2
- package/es/header-helper/header-helper.js.map +1 -1
- package/es/header-helper/style/Style.d.ts +3 -0
- package/es/header-helper/style/Style.js +34 -27
- package/es/header-helper/style/Style.js.map +1 -1
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/index.js.map +1 -1
- package/es/layout/pivot-header-layout.js +26 -8
- package/es/layout/pivot-header-layout.js.map +1 -1
- package/es/layout/tree-helper.js +4 -1
- package/es/layout/tree-helper.js.map +1 -1
- package/es/scenegraph/icon/icon-update.js +1 -0
- package/es/scenegraph/icon/icon-update.js.map +1 -1
- package/es/scenegraph/utils/text-icon-layout.js +1 -1
- package/es/scenegraph/utils/text-icon-layout.js.map +1 -1
- package/es/state/select/update-position.js +1 -1
- package/es/state/select/update-position.js.map +1 -1
- package/es/state/state.js +7 -5
- package/es/state/state.js.map +1 -1
- package/es/themes/theme.js +3 -0
- package/es/themes/theme.js.map +1 -1
- package/es/ts-types/base-table.d.ts +3 -1
- package/es/ts-types/base-table.js.map +1 -1
- package/es/ts-types/column/style.d.ts +1 -0
- package/es/ts-types/column/style.js.map +1 -1
- package/es/ts-types/common.d.ts +4 -13
- package/es/ts-types/common.js.map +1 -1
- package/es/ts-types/icon.d.ts +1 -0
- package/es/ts-types/icon.js.map +1 -1
- package/es/ts-types/list-table/layout-map/api.d.ts +2 -1
- package/es/ts-types/list-table/layout-map/api.js.map +1 -1
- package/es/ts-types/pivot-table/dimension/basic-dimension.d.ts +3 -1
- package/es/ts-types/pivot-table/dimension/basic-dimension.js.map +1 -1
- package/es/ts-types/pivot-table/indicator/basic-indicator.d.ts +1 -0
- package/es/ts-types/pivot-table/indicator/basic-indicator.js.map +1 -1
- package/es/ts-types/style-define.d.ts +1 -0
- package/es/ts-types/style-define.js.map +1 -1
- package/es/ts-types/table-engine.d.ts +4 -1
- package/es/ts-types/table-engine.js.map +1 -1
- package/es/ts-types/tooltip.d.ts +1 -0
- package/es/ts-types/tooltip.js.map +1 -1
- package/es/vrender.js.map +1 -1
- package/package.json +5 -5
|
@@ -14,34 +14,35 @@ export class Style extends EventTarget {
|
|
|
14
14
|
return defaultStyle || (defaultStyle = new Style);
|
|
15
15
|
}
|
|
16
16
|
constructor(style = {}, headerStyle = {}) {
|
|
17
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6;
|
|
17
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7;
|
|
18
18
|
super(), this._defaultPadding = [ 10, 16, 10, 16 ], this._color = null !== (_a = style.color) && void 0 !== _a ? _a : null == headerStyle ? void 0 : headerStyle.color,
|
|
19
|
-
this.
|
|
20
|
-
this.
|
|
21
|
-
this.
|
|
22
|
-
this.
|
|
23
|
-
this.
|
|
24
|
-
this.
|
|
25
|
-
this.
|
|
26
|
-
this.
|
|
27
|
-
this.
|
|
28
|
-
this.
|
|
29
|
-
this.
|
|
30
|
-
this.
|
|
31
|
-
this.
|
|
32
|
-
this.
|
|
33
|
-
this.
|
|
34
|
-
this.
|
|
35
|
-
this.
|
|
36
|
-
this.
|
|
37
|
-
this.
|
|
38
|
-
this.
|
|
39
|
-
this.
|
|
40
|
-
this.
|
|
41
|
-
this.
|
|
42
|
-
this.
|
|
43
|
-
this.
|
|
44
|
-
this.
|
|
19
|
+
this._strokeColor = null !== (_b = null == style ? void 0 : style.strokeColor) && void 0 !== _b ? _b : null == headerStyle ? void 0 : headerStyle.strokeColor,
|
|
20
|
+
this._fontSize = null !== (_c = style.fontSize) && void 0 !== _c ? _c : null == headerStyle ? void 0 : headerStyle.fontSize,
|
|
21
|
+
this._fontFamily = null !== (_d = style.fontFamily) && void 0 !== _d ? _d : null == headerStyle ? void 0 : headerStyle.fontFamily,
|
|
22
|
+
this._fontWeight = null !== (_e = style.fontWeight) && void 0 !== _e ? _e : null == headerStyle ? void 0 : headerStyle.fontWeight,
|
|
23
|
+
this._fontVariant = null !== (_f = style.fontVariant) && void 0 !== _f ? _f : null == headerStyle ? void 0 : headerStyle.fontVariant,
|
|
24
|
+
this._fontStyle = null !== (_g = style.fontStyle) && void 0 !== _g ? _g : null == headerStyle ? void 0 : headerStyle.fontStyle,
|
|
25
|
+
this._textOverflow = (null !== (_h = style.textOverflow) && void 0 !== _h ? _h : null == headerStyle ? void 0 : headerStyle.textOverflow) || "ellipsis",
|
|
26
|
+
this._textStick = null !== (_k = null !== (_j = style.textStick) && void 0 !== _j ? _j : null == headerStyle ? void 0 : headerStyle.textStick) && void 0 !== _k && _k,
|
|
27
|
+
this._textStickBaseOnAlign = null !== (_m = null !== (_l = style.textStickBaseOnAlign) && void 0 !== _l ? _l : null == headerStyle ? void 0 : headerStyle.textStickBaseOnAlign) && void 0 !== _m && _m,
|
|
28
|
+
this._marked = null !== (_p = null !== (_o = style.marked) && void 0 !== _o ? _o : null == headerStyle ? void 0 : headerStyle.marked) && void 0 !== _p && _p,
|
|
29
|
+
this._textAlign = (null !== (_q = style.textAlign) && void 0 !== _q ? _q : null == headerStyle ? void 0 : headerStyle.textAlign) || "left",
|
|
30
|
+
this._textBaseline = (null !== (_r = style.textBaseline) && void 0 !== _r ? _r : null == headerStyle ? void 0 : headerStyle.textBaseline) || "middle",
|
|
31
|
+
this._bgColor = null !== (_s = style.bgColor) && void 0 !== _s ? _s : null == headerStyle ? void 0 : headerStyle.bgColor,
|
|
32
|
+
this._padding = null !== (_u = null !== (_t = style.padding) && void 0 !== _t ? _t : null == headerStyle ? void 0 : headerStyle.padding) && void 0 !== _u ? _u : this._defaultPadding,
|
|
33
|
+
this._borderColor = null !== (_v = style.borderColor) && void 0 !== _v ? _v : null == headerStyle ? void 0 : headerStyle.borderColor,
|
|
34
|
+
this._lineHeight = null !== (_w = style.lineHeight) && void 0 !== _w ? _w : null == headerStyle ? void 0 : headerStyle.lineHeight,
|
|
35
|
+
this._underline = null !== (_x = style.underline) && void 0 !== _x ? _x : null == headerStyle ? void 0 : headerStyle.underline,
|
|
36
|
+
this._underlineColor = null !== (_y = style.underlineColor) && void 0 !== _y ? _y : null == headerStyle ? void 0 : headerStyle.underlineColor,
|
|
37
|
+
this._underlineDash = null !== (_z = style.underlineDash) && void 0 !== _z ? _z : null == headerStyle ? void 0 : headerStyle.underlineDash,
|
|
38
|
+
this._underlineOffset = null !== (_0 = style.underlineOffset) && void 0 !== _0 ? _0 : null == headerStyle ? void 0 : headerStyle.underlineOffset,
|
|
39
|
+
this._lineThrough = null !== (_1 = style.lineThrough) && void 0 !== _1 ? _1 : null == headerStyle ? void 0 : headerStyle.lineThrough,
|
|
40
|
+
this._lineThroughColor = null !== (_2 = style.lineThroughColor) && void 0 !== _2 ? _2 : null == headerStyle ? void 0 : headerStyle.lineThroughColor,
|
|
41
|
+
this._lineThroughDash = null !== (_3 = style.lineThroughDash) && void 0 !== _3 ? _3 : null == headerStyle ? void 0 : headerStyle.lineThroughDash,
|
|
42
|
+
this._linkColor = null !== (_4 = style.linkColor) && void 0 !== _4 ? _4 : null == headerStyle ? void 0 : headerStyle.linkColor,
|
|
43
|
+
this._cursor = null !== (_5 = style.cursor) && void 0 !== _5 ? _5 : null == headerStyle ? void 0 : headerStyle.cursor,
|
|
44
|
+
this._borderLineWidth = null !== (_6 = style.borderLineWidth) && void 0 !== _6 ? _6 : null == headerStyle ? void 0 : headerStyle.borderLineWidth,
|
|
45
|
+
this._borderLineDash = null !== (_7 = style.borderLineDash) && void 0 !== _7 ? _7 : null == headerStyle ? void 0 : headerStyle.borderLineDash;
|
|
45
46
|
}
|
|
46
47
|
get bgColor() {
|
|
47
48
|
return this._bgColor;
|
|
@@ -55,6 +56,12 @@ export class Style extends EventTarget {
|
|
|
55
56
|
set color(color) {
|
|
56
57
|
this._color = color;
|
|
57
58
|
}
|
|
59
|
+
get strokeColor() {
|
|
60
|
+
return this._strokeColor;
|
|
61
|
+
}
|
|
62
|
+
set strokeColor(strokeColor) {
|
|
63
|
+
this._strokeColor = strokeColor;
|
|
64
|
+
}
|
|
58
65
|
get fontSize() {
|
|
59
66
|
return this._fontSize;
|
|
60
67
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/header-helper/style/Style.ts"],"names":[],"mappings":"AAsBA,IAAI,YAAmB,CAAC;AACxB,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,MAAM,UAAU,GAAG;IACjB,YAAY,EAAE,cAAc;CAC7B,CAAC;AACF,MAAM,OAAO,KAAM,SAAQ,WAAW;IAsCpC,MAAM,KAAK,UAAU;QACnB,OAAO,UAAU,CAAC;IACpB,CAAC;IACD,MAAM,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AAC;IACD,IAAI,eAAe,CAAC,eAAqD;QACvE,IAAI,CAAC,gBAAgB,GAAG,eAAe,CAAC;IAE1C,CAAC;IACD,IAAI,cAAc;QAChB,OAAO,IAAI,CAAC,eAAe,CAAC;IAC9B,CAAC;IACD,IAAI,cAAc,CAAC,cAAmD;QACpE,IAAI,CAAC,eAAe,GAAG,cAAc,CAAC;IAExC,CAAC;IAID,KAAK;QACH,OAAO,IAAI,KAAK,CAAC,IAAI,CAAC,CAAC;IACzB,CAAC;CACF","file":"Style.js","sourcesContent":["import type {\n ColorPropertyDefine,\n ColorsPropertyDefine,\n ColumnStyle,\n IStyleOption,\n TextOverflow,\n UnderlinePropertyDefine,\n LineThroughPropertyDefine,\n LineDashPropertyDefine,\n PaddingsPropertyDefine,\n CursorPropertyDefine,\n LineWidthsPropertyDefine,\n LineDashsPropertyDefine,\n MarkedPropertyDefine,\n FontSizePropertyDefine,\n FontFamilyPropertyDefine,\n FontWeightPropertyDefine,\n FontVariantPropertyDefine,\n FontStylePropertyDefine,\n TextAlignType,\n TextBaselineType\n} from '../../ts-types';\nlet defaultStyle: Style;\nimport { EventTarget } from '../../event/EventTarget';\nconst EVENT_TYPE = {\n CHANGE_STYLE: 'change_style'\n};\nexport class Style extends EventTarget implements ColumnStyle {\n private _color?: ColorPropertyDefine;\n private _fontSize?: FontSizePropertyDefine;\n private _fontFamily?: FontFamilyPropertyDefine;\n private _fontWeight?: FontWeightPropertyDefine;\n private _fontVariant?: FontVariantPropertyDefine;\n private _fontStyle?: FontStylePropertyDefine;\n private _textOverflow: TextOverflow;\n private _padding: PaddingsPropertyDefine | undefined;\n private _defaultPadding: PaddingsPropertyDefine = [10, 16, 10, 16];\n private _textStick: boolean;\n private _textStickBaseOnAlign: boolean;\n private _marked: MarkedPropertyDefine;\n // eslint-disable-next-line no-undef\n private _textAlign: TextAlignType;\n // eslint-disable-next-line no-undef\n private _textBaseline: TextBaselineType;\n private _bgColor?: ColorPropertyDefine;\n private _borderColor?: ColorsPropertyDefine;\n private _lineHeight?: number;\n private _underline?: UnderlinePropertyDefine;\n private _underlineColor?: ColorPropertyDefine;\n private _underlineDash?: LineDashPropertyDefine;\n private _underlineOffset?: number;\n private _lineThrough?: LineThroughPropertyDefine;\n private _lineThroughColor?: ColorPropertyDefine;\n private _lineThroughDash?: LineDashPropertyDefine;\n private _linkColor?: ColorPropertyDefine;\n\n // private _tag?: TagPropertyDefine;\n // private _tagFont?: FontPropertyDefine;\n // private _tagColor?: ColorPropertyDefine;\n // private _tagBgColor?: ColorPropertyDefine;\n // private _tagMargin?: number | string | (number | string)[];\n\n private _cursor?: CursorPropertyDefine;\n private _borderLineWidth?: LineWidthsPropertyDefine;\n private _borderLineDash?: LineDashsPropertyDefine;\n static get EVENT_TYPE(): { CHANGE_STYLE: string } {\n return EVENT_TYPE;\n }\n static get DEFAULT(): Style {\n return defaultStyle ? defaultStyle : (defaultStyle = new Style());\n }\n constructor(style: IStyleOption = {}, headerStyle: IStyleOption = {}) {\n super();\n this._color = style.color ?? headerStyle?.color;\n // icon为文字前后可添加的图标\n // this._icon = style.icon;\n this._fontSize = style.fontSize ?? headerStyle?.fontSize;\n this._fontFamily = style.fontFamily ?? headerStyle?.fontFamily;\n this._fontWeight = style.fontWeight ?? headerStyle?.fontWeight;\n this._fontVariant = style.fontVariant ?? headerStyle?.fontVariant;\n this._fontStyle = style.fontStyle ?? headerStyle?.fontStyle;\n this._textOverflow = (style.textOverflow ?? headerStyle?.textOverflow) || 'ellipsis';\n this._textStick = style.textStick ?? headerStyle?.textStick ?? false;\n this._textStickBaseOnAlign = style.textStickBaseOnAlign ?? headerStyle?.textStickBaseOnAlign ?? false;\n this._marked = style.marked ?? headerStyle?.marked ?? false;\n this._textAlign = (style.textAlign ?? headerStyle?.textAlign) || 'left';\n this._textBaseline = (style.textBaseline ?? headerStyle?.textBaseline) || 'middle';\n this._bgColor = style.bgColor ?? headerStyle?.bgColor;\n this._padding = style.padding ?? headerStyle?.padding ?? this._defaultPadding;\n this._borderColor = style.borderColor ?? headerStyle?.borderColor;\n this._lineHeight = style.lineHeight ?? headerStyle?.lineHeight;\n this._underline = style.underline ?? headerStyle?.underline;\n this._underlineColor = style.underlineColor ?? headerStyle?.underlineColor;\n this._underlineDash = style.underlineDash ?? headerStyle?.underlineDash;\n this._underlineOffset = style.underlineOffset ?? headerStyle?.underlineOffset;\n this._lineThrough = style.lineThrough ?? headerStyle?.lineThrough;\n this._lineThroughColor = style.lineThroughColor ?? headerStyle?.lineThroughColor;\n this._lineThroughDash = style.lineThroughDash ?? headerStyle?.lineThroughDash;\n this._linkColor = style.linkColor ?? headerStyle?.linkColor;\n\n // this._tag = style.tag ?? headerStyle?.tag;\n // this._tagFont = style.tagFont ?? headerStyle?.tagFont;\n // this._tagColor = style.tagColor ?? headerStyle?.tagColor;\n // this._tagBgColor = style.tagBgColor ?? headerStyle?.tagBgColor;\n // this._tagMargin = style.tagMargin ?? headerStyle?.tagMargin;\n this._cursor = style.cursor ?? headerStyle?.cursor;\n this._borderLineWidth = style.borderLineWidth ?? headerStyle?.borderLineWidth;\n this._borderLineDash = style.borderLineDash ?? headerStyle?.borderLineDash;\n }\n get bgColor(): ColorPropertyDefine | undefined {\n return this._bgColor;\n }\n set bgColor(bgColor: ColorPropertyDefine | undefined) {\n this._bgColor = bgColor;\n //this.doChangeStyle();\n }\n get color(): ColorPropertyDefine | undefined {\n return this._color;\n }\n set color(color: ColorPropertyDefine | undefined) {\n this._color = color;\n //this.doChangeStyle();\n }\n get fontSize(): FontSizePropertyDefine | undefined {\n return this._fontSize;\n }\n set fontSize(fontSize: FontSizePropertyDefine | undefined) {\n this._fontSize = fontSize;\n //this.doChangeStyle();\n }\n get fontFamily(): FontFamilyPropertyDefine | undefined {\n return this._fontFamily;\n }\n set fontFamily(fontFamily: FontFamilyPropertyDefine | undefined) {\n this._fontFamily = fontFamily;\n //this.doChangeStyle();\n }\n get fontWeight(): FontWeightPropertyDefine | undefined {\n return this._fontWeight;\n }\n set fontWeight(fontWeight: FontWeightPropertyDefine | undefined) {\n this._fontWeight = fontWeight;\n //this.doChangeStyle();\n }\n get fontVariant(): FontVariantPropertyDefine | undefined {\n return this._fontVariant;\n }\n set fontVariant(fontVariant: FontVariantPropertyDefine | undefined) {\n this._fontVariant = fontVariant;\n //this.doChangeStyle();\n }\n get fontStyle(): FontStylePropertyDefine | undefined {\n return this._fontStyle;\n }\n set fontStyle(fontStyle: FontStylePropertyDefine | undefined) {\n this._fontStyle = fontStyle;\n //this.doChangeStyle();\n }\n get textOverflow(): TextOverflow {\n return this._textOverflow;\n }\n set textOverflow(textOverflow: TextOverflow) {\n this._textOverflow = textOverflow;\n //this.doChangeStyle();\n }\n get padding(): PaddingsPropertyDefine | undefined {\n return this._padding ?? this._defaultPadding;\n }\n set padding(padding: PaddingsPropertyDefine | undefined) {\n this._padding = padding;\n //this.doChangeStyle();\n }\n get borderColor(): ColorsPropertyDefine | undefined {\n return this._borderColor;\n }\n set borderColor(borderColor: ColorsPropertyDefine | undefined) {\n this._borderColor = borderColor;\n //this.doChangeStyle();\n }\n get textStick(): boolean {\n return this._textStick;\n }\n set textStick(textStick: boolean) {\n this._textStick = textStick;\n //this.doChangeStyle();\n }\n get textStickBaseOnAlign(): boolean {\n return this._textStickBaseOnAlign;\n }\n set textStickBaseOnAlign(textStickBaseOnAlign: boolean) {\n this._textStickBaseOnAlign = textStickBaseOnAlign;\n // this.doChangeStyle();\n }\n get marked(): MarkedPropertyDefine | undefined {\n return this._marked;\n }\n set marked(marked: MarkedPropertyDefine | undefined) {\n this._marked = marked;\n //this.doChangeStyle();\n }\n // eslint-disable-next-line no-undef\n get textAlign(): TextAlignType {\n return this._textAlign;\n }\n // eslint-disable-next-line no-undef\n set textAlign(textAlign: TextAlignType) {\n this._textAlign = textAlign;\n //this.doChangeStyle();\n }\n // eslint-disable-next-line no-undef\n get textBaseline(): TextBaselineType {\n return this._textBaseline;\n }\n // eslint-disable-next-line no-undef\n set textBaseline(textBaseline: TextBaselineType) {\n this._textBaseline = textBaseline;\n //this.doChangeStyle();\n }\n get lineHeight(): number | undefined {\n return this._lineHeight;\n }\n set lineHeight(lineHeight: number | undefined) {\n this._lineHeight = lineHeight;\n //this.doChangeStyle();\n }\n get underline(): UnderlinePropertyDefine | undefined {\n return this._underline;\n }\n set underline(underline: UnderlinePropertyDefine | undefined) {\n this._underline = underline;\n //this.doChangeStyle();\n }\n get underlineColor(): ColorPropertyDefine | undefined {\n return this._underlineColor;\n }\n set underlineColor(underlineColor: ColorPropertyDefine | undefined) {\n this._underlineColor = underlineColor;\n //this.doChangeStyle();\n }\n get underlineDash(): LineDashPropertyDefine | undefined {\n return this._underlineDash;\n }\n set underlineDash(underlineDash: LineDashPropertyDefine | undefined) {\n this._underlineDash = underlineDash;\n //this.doChangeStyle();\n }\n\n get underlineOffset(): number | undefined {\n return this._underlineOffset;\n }\n set underlineOffset(underlineOffset: number | undefined) {\n this._underlineOffset = underlineOffset;\n //this.doChangeStyle();\n }\n\n get lineThrough(): LineThroughPropertyDefine | undefined {\n return this._lineThrough;\n }\n set lineThrough(lineThrough: LineThroughPropertyDefine | undefined) {\n this._lineThrough = lineThrough;\n //this.doChangeStyle();\n }\n get lineThroughColor(): ColorPropertyDefine | undefined {\n return this._lineThroughColor;\n }\n set lineThroughColor(lineThroughColor: ColorPropertyDefine | undefined) {\n this._lineThroughColor = lineThroughColor;\n //this.doChangeStyle();\n }\n get lineThroughDash(): LineDashPropertyDefine | undefined {\n return this._lineThroughDash;\n }\n set lineThroughDash(lineThroughDash: LineDashPropertyDefine | undefined) {\n this._lineThroughDash = lineThroughDash;\n //this.doChangeStyle();\n }\n get linkColor(): ColorPropertyDefine | undefined {\n return this._linkColor;\n }\n set linkColor(linkColor: ColorPropertyDefine | undefined) {\n this._linkColor = linkColor;\n //this.doChangeStyle();\n }\n // get tag(): TagPropertyDefine | undefined {\n // return this._tag;\n // }\n // set tag(tag: TagPropertyDefine | undefined) {\n // this._tag = tag;\n // //this.doChangeStyle();\n // }\n // get tagFont(): FontPropertyDefine | undefined {\n // return this._tagFont;\n // }\n // set tagFont(tagFont: FontPropertyDefine | undefined) {\n // this._tagFont = tagFont;\n // //this.doChangeStyle();\n // }\n // get tagColor(): ColorPropertyDefine | undefined {\n // return this._tagColor;\n // }\n // set tagColor(tagColor: ColorPropertyDefine | undefined) {\n // this._tagColor = tagColor;\n // //this.doChangeStyle();\n // }\n // get tagBgColor(): ColorPropertyDefine | undefined {\n // return this._tagBgColor;\n // }\n // set tagBgColor(tagBgColor: ColorPropertyDefine | undefined) {\n // this._tagBgColor = tagBgColor;\n // //this.doChangeStyle();\n // }\n // get tagMargin(): number | string | (number | string)[] | undefined {\n // return this._tagMargin;\n // }\n // set tagMargin(tagMargin: number | string | (number | string)[] | undefined) {\n // this._tagMargin = tagMargin;\n // //this.doChangeStyle();\n // }\n get cursor(): CursorPropertyDefine | undefined {\n return this._cursor;\n }\n set cursor(cursor: CursorPropertyDefine | undefined) {\n this._cursor = cursor;\n //this.doChangeStyle();\n }\n get borderLineWidth(): LineWidthsPropertyDefine | undefined {\n return this._borderLineWidth;\n }\n set borderLineWidth(borderLineWidth: LineWidthsPropertyDefine | undefined) {\n this._borderLineWidth = borderLineWidth;\n //this.doChangeStyle();\n }\n get borderLineDash(): LineDashsPropertyDefine | undefined {\n return this._borderLineDash;\n }\n set borderLineDash(borderLineDash: LineDashsPropertyDefine | undefined) {\n this._borderLineDash = borderLineDash;\n //this.doChangeStyle();\n }\n // doChangeStyle(): void {\n // this.fireListeners(EVENT_TYPE.CHANGE_STYLE);\n // }\n clone(): Style {\n return new Style(this);\n }\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/header-helper/style/Style.ts"],"names":[],"mappings":"AAsBA,IAAI,YAAmB,CAAC;AACxB,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,MAAM,UAAU,GAAG;IACjB,YAAY,EAAE,cAAc;CAC7B,CAAC;AACF,MAAM,OAAO,KAAM,SAAQ,WAA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ACD,IAAI,SAAS;QACX,OAAO,IAAI,CAAC,UAAU,CAAC;IACzB,CAAC;IACD,IAAI,SAAS,CAAC,SAA0C;QACtD,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;IAE9B,CAAC;IAoCD,IAAI,MAAM;QACR,OAAO,IAAI,CAAC,OAAO,CAAC;IACtB,CAAC;IACD,IAAI,MAAM,CAAC,MAAwC;QACjD,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;IAExB,CAAC;IACD,IAAI,eAAe;QACjB,OAAO,IAAI,CAAC,gBAAgB,CAAC;IAC/B,CAAC;IACD,IAAI,eAAe,CAAC,eAAqD;QACvE,IAAI,CAAC,gBAAgB,GAAG,eAAe,CAAC;IAE1C,CAAC;IACD,IAAI,cAAc;QAChB,OAAO,IAAI,CAAC,eAAe,CAAC;IAC9B,CAAC;IACD,IAAI,cAAc,CAAC,cAAmD;QACpE,IAAI,CAAC,eAAe,GAAG,cAAc,CAAC;IAExC,CAAC;IAID,KAAK;QACH,OAAO,IAAI,KAAK,CAAC,IAAI,CAAC,CAAC;IACzB,CAAC;CACF","file":"Style.js","sourcesContent":["import type {\n ColorPropertyDefine,\n ColorsPropertyDefine,\n ColumnStyle,\n IStyleOption,\n TextOverflow,\n UnderlinePropertyDefine,\n LineThroughPropertyDefine,\n LineDashPropertyDefine,\n PaddingsPropertyDefine,\n CursorPropertyDefine,\n LineWidthsPropertyDefine,\n LineDashsPropertyDefine,\n MarkedPropertyDefine,\n FontSizePropertyDefine,\n FontFamilyPropertyDefine,\n FontWeightPropertyDefine,\n FontVariantPropertyDefine,\n FontStylePropertyDefine,\n TextAlignType,\n TextBaselineType\n} from '../../ts-types';\nlet defaultStyle: Style;\nimport { EventTarget } from '../../event/EventTarget';\nconst EVENT_TYPE = {\n CHANGE_STYLE: 'change_style'\n};\nexport class Style extends EventTarget implements ColumnStyle {\n private _color?: ColorPropertyDefine;\n private _strokeColor?: ColorPropertyDefine;\n private _fontSize?: FontSizePropertyDefine;\n private _fontFamily?: FontFamilyPropertyDefine;\n private _fontWeight?: FontWeightPropertyDefine;\n private _fontVariant?: FontVariantPropertyDefine;\n private _fontStyle?: FontStylePropertyDefine;\n private _textOverflow: TextOverflow;\n private _padding: PaddingsPropertyDefine | undefined;\n private _defaultPadding: PaddingsPropertyDefine = [10, 16, 10, 16];\n private _textStick: boolean;\n private _textStickBaseOnAlign: boolean;\n private _marked: MarkedPropertyDefine;\n // eslint-disable-next-line no-undef\n private _textAlign: TextAlignType;\n // eslint-disable-next-line no-undef\n private _textBaseline: TextBaselineType;\n private _bgColor?: ColorPropertyDefine;\n private _borderColor?: ColorsPropertyDefine;\n private _lineHeight?: number;\n private _underline?: UnderlinePropertyDefine;\n private _underlineColor?: ColorPropertyDefine;\n private _underlineDash?: LineDashPropertyDefine;\n private _underlineOffset?: number;\n private _lineThrough?: LineThroughPropertyDefine;\n private _lineThroughColor?: ColorPropertyDefine;\n private _lineThroughDash?: LineDashPropertyDefine;\n private _linkColor?: ColorPropertyDefine;\n\n // private _tag?: TagPropertyDefine;\n // private _tagFont?: FontPropertyDefine;\n // private _tagColor?: ColorPropertyDefine;\n // private _tagBgColor?: ColorPropertyDefine;\n // private _tagMargin?: number | string | (number | string)[];\n\n private _cursor?: CursorPropertyDefine;\n private _borderLineWidth?: LineWidthsPropertyDefine;\n private _borderLineDash?: LineDashsPropertyDefine;\n static get EVENT_TYPE(): { CHANGE_STYLE: string } {\n return EVENT_TYPE;\n }\n static get DEFAULT(): Style {\n return defaultStyle ? defaultStyle : (defaultStyle = new Style());\n }\n constructor(style: IStyleOption = {}, headerStyle: IStyleOption = {}) {\n super();\n this._color = style.color ?? headerStyle?.color;\n this._strokeColor = style?.strokeColor ?? headerStyle?.strokeColor;\n // icon为文字前后可添加的图标\n // this._icon = style.icon;\n this._fontSize = style.fontSize ?? headerStyle?.fontSize;\n this._fontFamily = style.fontFamily ?? headerStyle?.fontFamily;\n this._fontWeight = style.fontWeight ?? headerStyle?.fontWeight;\n this._fontVariant = style.fontVariant ?? headerStyle?.fontVariant;\n this._fontStyle = style.fontStyle ?? headerStyle?.fontStyle;\n this._textOverflow = (style.textOverflow ?? headerStyle?.textOverflow) || 'ellipsis';\n this._textStick = style.textStick ?? headerStyle?.textStick ?? false;\n this._textStickBaseOnAlign = style.textStickBaseOnAlign ?? headerStyle?.textStickBaseOnAlign ?? false;\n this._marked = style.marked ?? headerStyle?.marked ?? false;\n this._textAlign = (style.textAlign ?? headerStyle?.textAlign) || 'left';\n this._textBaseline = (style.textBaseline ?? headerStyle?.textBaseline) || 'middle';\n this._bgColor = style.bgColor ?? headerStyle?.bgColor;\n this._padding = style.padding ?? headerStyle?.padding ?? this._defaultPadding;\n this._borderColor = style.borderColor ?? headerStyle?.borderColor;\n this._lineHeight = style.lineHeight ?? headerStyle?.lineHeight;\n this._underline = style.underline ?? headerStyle?.underline;\n this._underlineColor = style.underlineColor ?? headerStyle?.underlineColor;\n this._underlineDash = style.underlineDash ?? headerStyle?.underlineDash;\n this._underlineOffset = style.underlineOffset ?? headerStyle?.underlineOffset;\n this._lineThrough = style.lineThrough ?? headerStyle?.lineThrough;\n this._lineThroughColor = style.lineThroughColor ?? headerStyle?.lineThroughColor;\n this._lineThroughDash = style.lineThroughDash ?? headerStyle?.lineThroughDash;\n this._linkColor = style.linkColor ?? headerStyle?.linkColor;\n\n // this._tag = style.tag ?? headerStyle?.tag;\n // this._tagFont = style.tagFont ?? headerStyle?.tagFont;\n // this._tagColor = style.tagColor ?? headerStyle?.tagColor;\n // this._tagBgColor = style.tagBgColor ?? headerStyle?.tagBgColor;\n // this._tagMargin = style.tagMargin ?? headerStyle?.tagMargin;\n this._cursor = style.cursor ?? headerStyle?.cursor;\n this._borderLineWidth = style.borderLineWidth ?? headerStyle?.borderLineWidth;\n this._borderLineDash = style.borderLineDash ?? headerStyle?.borderLineDash;\n }\n get bgColor(): ColorPropertyDefine | undefined {\n return this._bgColor;\n }\n set bgColor(bgColor: ColorPropertyDefine | undefined) {\n this._bgColor = bgColor;\n //this.doChangeStyle();\n }\n get color(): ColorPropertyDefine | undefined {\n return this._color;\n }\n set color(color: ColorPropertyDefine | undefined) {\n this._color = color;\n //this.doChangeStyle();\n }\n get strokeColor(): ColorPropertyDefine | undefined {\n return this._strokeColor;\n }\n set strokeColor(strokeColor: ColorPropertyDefine | undefined) {\n this._strokeColor = strokeColor;\n // this.doChangeStyle();\n }\n get fontSize(): FontSizePropertyDefine | undefined {\n return this._fontSize;\n }\n set fontSize(fontSize: FontSizePropertyDefine | undefined) {\n this._fontSize = fontSize;\n //this.doChangeStyle();\n }\n get fontFamily(): FontFamilyPropertyDefine | undefined {\n return this._fontFamily;\n }\n set fontFamily(fontFamily: FontFamilyPropertyDefine | undefined) {\n this._fontFamily = fontFamily;\n //this.doChangeStyle();\n }\n get fontWeight(): FontWeightPropertyDefine | undefined {\n return this._fontWeight;\n }\n set fontWeight(fontWeight: FontWeightPropertyDefine | undefined) {\n this._fontWeight = fontWeight;\n //this.doChangeStyle();\n }\n get fontVariant(): FontVariantPropertyDefine | undefined {\n return this._fontVariant;\n }\n set fontVariant(fontVariant: FontVariantPropertyDefine | undefined) {\n this._fontVariant = fontVariant;\n //this.doChangeStyle();\n }\n get fontStyle(): FontStylePropertyDefine | undefined {\n return this._fontStyle;\n }\n set fontStyle(fontStyle: FontStylePropertyDefine | undefined) {\n this._fontStyle = fontStyle;\n //this.doChangeStyle();\n }\n get textOverflow(): TextOverflow {\n return this._textOverflow;\n }\n set textOverflow(textOverflow: TextOverflow) {\n this._textOverflow = textOverflow;\n //this.doChangeStyle();\n }\n get padding(): PaddingsPropertyDefine | undefined {\n return this._padding ?? this._defaultPadding;\n }\n set padding(padding: PaddingsPropertyDefine | undefined) {\n this._padding = padding;\n //this.doChangeStyle();\n }\n get borderColor(): ColorsPropertyDefine | undefined {\n return this._borderColor;\n }\n set borderColor(borderColor: ColorsPropertyDefine | undefined) {\n this._borderColor = borderColor;\n //this.doChangeStyle();\n }\n get textStick(): boolean {\n return this._textStick;\n }\n set textStick(textStick: boolean) {\n this._textStick = textStick;\n //this.doChangeStyle();\n }\n get textStickBaseOnAlign(): boolean {\n return this._textStickBaseOnAlign;\n }\n set textStickBaseOnAlign(textStickBaseOnAlign: boolean) {\n this._textStickBaseOnAlign = textStickBaseOnAlign;\n // this.doChangeStyle();\n }\n get marked(): MarkedPropertyDefine | undefined {\n return this._marked;\n }\n set marked(marked: MarkedPropertyDefine | undefined) {\n this._marked = marked;\n //this.doChangeStyle();\n }\n // eslint-disable-next-line no-undef\n get textAlign(): TextAlignType {\n return this._textAlign;\n }\n // eslint-disable-next-line no-undef\n set textAlign(textAlign: TextAlignType) {\n this._textAlign = textAlign;\n //this.doChangeStyle();\n }\n // eslint-disable-next-line no-undef\n get textBaseline(): TextBaselineType {\n return this._textBaseline;\n }\n // eslint-disable-next-line no-undef\n set textBaseline(textBaseline: TextBaselineType) {\n this._textBaseline = textBaseline;\n //this.doChangeStyle();\n }\n get lineHeight(): number | undefined {\n return this._lineHeight;\n }\n set lineHeight(lineHeight: number | undefined) {\n this._lineHeight = lineHeight;\n //this.doChangeStyle();\n }\n get underline(): UnderlinePropertyDefine | undefined {\n return this._underline;\n }\n set underline(underline: UnderlinePropertyDefine | undefined) {\n this._underline = underline;\n //this.doChangeStyle();\n }\n get underlineColor(): ColorPropertyDefine | undefined {\n return this._underlineColor;\n }\n set underlineColor(underlineColor: ColorPropertyDefine | undefined) {\n this._underlineColor = underlineColor;\n //this.doChangeStyle();\n }\n get underlineDash(): LineDashPropertyDefine | undefined {\n return this._underlineDash;\n }\n set underlineDash(underlineDash: LineDashPropertyDefine | undefined) {\n this._underlineDash = underlineDash;\n //this.doChangeStyle();\n }\n\n get underlineOffset(): number | undefined {\n return this._underlineOffset;\n }\n set underlineOffset(underlineOffset: number | undefined) {\n this._underlineOffset = underlineOffset;\n //this.doChangeStyle();\n }\n\n get lineThrough(): LineThroughPropertyDefine | undefined {\n return this._lineThrough;\n }\n set lineThrough(lineThrough: LineThroughPropertyDefine | undefined) {\n this._lineThrough = lineThrough;\n //this.doChangeStyle();\n }\n get lineThroughColor(): ColorPropertyDefine | undefined {\n return this._lineThroughColor;\n }\n set lineThroughColor(lineThroughColor: ColorPropertyDefine | undefined) {\n this._lineThroughColor = lineThroughColor;\n //this.doChangeStyle();\n }\n get lineThroughDash(): LineDashPropertyDefine | undefined {\n return this._lineThroughDash;\n }\n set lineThroughDash(lineThroughDash: LineDashPropertyDefine | undefined) {\n this._lineThroughDash = lineThroughDash;\n //this.doChangeStyle();\n }\n get linkColor(): ColorPropertyDefine | undefined {\n return this._linkColor;\n }\n set linkColor(linkColor: ColorPropertyDefine | undefined) {\n this._linkColor = linkColor;\n //this.doChangeStyle();\n }\n // get tag(): TagPropertyDefine | undefined {\n // return this._tag;\n // }\n // set tag(tag: TagPropertyDefine | undefined) {\n // this._tag = tag;\n // //this.doChangeStyle();\n // }\n // get tagFont(): FontPropertyDefine | undefined {\n // return this._tagFont;\n // }\n // set tagFont(tagFont: FontPropertyDefine | undefined) {\n // this._tagFont = tagFont;\n // //this.doChangeStyle();\n // }\n // get tagColor(): ColorPropertyDefine | undefined {\n // return this._tagColor;\n // }\n // set tagColor(tagColor: ColorPropertyDefine | undefined) {\n // this._tagColor = tagColor;\n // //this.doChangeStyle();\n // }\n // get tagBgColor(): ColorPropertyDefine | undefined {\n // return this._tagBgColor;\n // }\n // set tagBgColor(tagBgColor: ColorPropertyDefine | undefined) {\n // this._tagBgColor = tagBgColor;\n // //this.doChangeStyle();\n // }\n // get tagMargin(): number | string | (number | string)[] | undefined {\n // return this._tagMargin;\n // }\n // set tagMargin(tagMargin: number | string | (number | string)[] | undefined) {\n // this._tagMargin = tagMargin;\n // //this.doChangeStyle();\n // }\n get cursor(): CursorPropertyDefine | undefined {\n return this._cursor;\n }\n set cursor(cursor: CursorPropertyDefine | undefined) {\n this._cursor = cursor;\n //this.doChangeStyle();\n }\n get borderLineWidth(): LineWidthsPropertyDefine | undefined {\n return this._borderLineWidth;\n }\n set borderLineWidth(borderLineWidth: LineWidthsPropertyDefine | undefined) {\n this._borderLineWidth = borderLineWidth;\n //this.doChangeStyle();\n }\n get borderLineDash(): LineDashsPropertyDefine | undefined {\n return this._borderLineDash;\n }\n set borderLineDash(borderLineDash: LineDashsPropertyDefine | undefined) {\n this._borderLineDash = borderLineDash;\n //this.doChangeStyle();\n }\n // doChangeStyle(): void {\n // this.fireListeners(EVENT_TYPE.CHANGE_STYLE);\n // }\n clone(): Style {\n return new Style(this);\n }\n}\n"]}
|
package/es/index.d.ts
CHANGED
|
@@ -16,7 +16,7 @@ import { renderChart } from './scenegraph/graphic/contributions/chart-render-hel
|
|
|
16
16
|
import { restoreMeasureText, setCustomAlphabetCharSet } from './scenegraph/utils/text-measure';
|
|
17
17
|
export { getDataCellPath } from './tools/get-data-path';
|
|
18
18
|
export * from './render/jsx';
|
|
19
|
-
export declare const version = "1.
|
|
19
|
+
export declare const version = "1.3.0";
|
|
20
20
|
export { TYPES, core, ListTable, ListTableConstructorOptions, PivotTable, PivotTableConstructorOptions, PivotChartConstructorOptions, PivotChart, IHeaderTreeDefine, IDimension, IIndicator, ITitleDefine, ICornerDefine, ColumnsDefine, ColumnDefine, LinkColumnDefine, ChartColumnDefine, ImageColumnDefine, SparklineColumnDefine, ProgressbarColumnDefine, TextColumnDefine, GroupColumnDefine, TextAlignType, TextBaselineType, themes, data, MousePointerCellEvent, getIcons, clearGlobal, register, DataStatistics, CustomLayout, updateCell, renderChart, graphicUtil, setCustomAlphabetCharSet, restoreMeasureText };
|
|
21
21
|
declare function getIcons(): {
|
|
22
22
|
[key: string]: TYPES.ColumnIconOption;
|
package/es/index.js
CHANGED
|
@@ -34,7 +34,7 @@ export { getDataCellPath } from "./tools/get-data-path";
|
|
|
34
34
|
|
|
35
35
|
export * from "./render/jsx";
|
|
36
36
|
|
|
37
|
-
export const version = "1.
|
|
37
|
+
export const version = "1.3.0";
|
|
38
38
|
|
|
39
39
|
export { TYPES, core, ListTable, PivotTable, PivotChart, themes, data, getIcons, clearGlobal, register, DataStatistics, CustomLayout, updateCell, renderChart, graphicUtil, setCustomAlphabetCharSet, restoreMeasureText };
|
|
40
40
|
|
package/es/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAC5D,kBAAkB,EAAE,CAAC;AAErB,OAAO,KAAK,KAAK,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,IAAI,MAAM,QAAQ,CAAC;AAC/B,OAAO,KAAK,IAAI,MAAM,QAAQ,CAAC;AAC/B,OAAO,KAAK,KAAK,MAAM,SAAS,CAAC;AACjC,OAAO,KAAK,QAAQ,MAAM,YAAY,CAAC;AACvC,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC;AACnC,OAAO,KAAK,cAAc,MAAM,0BAA0B,CAAC;AAsB3D,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,OAAO,KAAK,YAAY,MAAM,iBAAiB,CAAC;AAEhD,OAAO,EAAE,UAAU,EAAE,MAAM,wCAAwC,CAAC;AACpE,OAAO,EAAE,WAAW,EAAE,MAAM,wDAAwD,CAAC;AACrF,OAAO,EAAE,kBAAkB,EAAE,wBAAwB,EAAE,MAAM,iCAAiC,CAAC;AAK/F,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,cAAc,cAAc,CAAC;AAE7B,MAAM,CAAC,MAAM,OAAO,GAAG,
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAC5D,kBAAkB,EAAE,CAAC;AAErB,OAAO,KAAK,KAAK,MAA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registerForVrender();\n\nimport * as TYPES from './ts-types';\nimport * as core from './core';\nimport * as data from './data';\nimport * as icons from './icons';\nimport * as register from './register';\nimport * as themes from './themes';\nimport * as DataStatistics from './dataset/DataStatistics';\nimport type {\n ColumnDefine,\n ColumnsDefine,\n LinkColumnDefine,\n ChartColumnDefine,\n ImageColumnDefine,\n SparklineColumnDefine,\n ProgressbarColumnDefine,\n TextColumnDefine,\n GroupColumnDefine,\n ListTableConstructorOptions,\n PivotTableConstructorOptions,\n PivotChartConstructorOptions,\n IHeaderTreeDefine,\n IDimension,\n IIndicator,\n ITitleDefine,\n ICornerDefine,\n TextAlignType,\n TextBaselineType\n} from './ts-types';\nimport { ListTable } from './ListTable';\nimport { PivotTable } from './PivotTable';\nimport { PivotChart } from './PivotChart';\nimport type { MousePointerCellEvent } from './ts-types/events';\nimport * as CustomLayout from './render/layout';\n\nimport { updateCell } from './scenegraph/group-creater/cell-helper';\nimport { renderChart } from './scenegraph/graphic/contributions/chart-render-helper';\nimport { restoreMeasureText, setCustomAlphabetCharSet } from './scenegraph/utils/text-measure';\n\n// import { container, loadCanvasPicker } from '@src/vrender';\n// loadCanvasPicker(container);\n\nexport { getDataCellPath } from './tools/get-data-path';\nexport * from './render/jsx';\n\nexport const version = \"1.3.0\";\n/**\n * @namespace VTable\n */\nexport {\n /**\n * Types\n * @namespace VTable.TYPES\n */\n TYPES,\n core,\n ListTable,\n ListTableConstructorOptions,\n PivotTable,\n PivotTableConstructorOptions,\n PivotChartConstructorOptions,\n PivotChart,\n IHeaderTreeDefine,\n IDimension,\n IIndicator,\n ITitleDefine,\n ICornerDefine,\n ColumnsDefine,\n ColumnDefine,\n LinkColumnDefine,\n ChartColumnDefine,\n ImageColumnDefine,\n SparklineColumnDefine,\n ProgressbarColumnDefine,\n TextColumnDefine,\n GroupColumnDefine,\n TextAlignType,\n TextBaselineType,\n themes,\n data,\n MousePointerCellEvent,\n getIcons,\n clearGlobal,\n //plugin registers\n register,\n /**\n * 暂不推荐使用\n */\n DataStatistics,\n CustomLayout,\n updateCell,\n renderChart,\n graphicUtil,\n setCustomAlphabetCharSet,\n restoreMeasureText\n};\n\n/** @private */\nfunction getIcons(): {\n [key: string]: TYPES.ColumnIconOption;\n} {\n return icons.get();\n}\n/** 清理内部的全局变量 如注册的icon theme等 以及共享的header column类实例 */\nfunction clearGlobal() {\n register.clearAll();\n // headers.type.clearGlobal();\n // columns.type.clearGlobal();\n}\nTYPES.AggregationType;\n"]}
|
|
@@ -212,11 +212,15 @@ export class PivotHeaderLayoutMap {
|
|
|
212
212
|
const id = ++this.sharedVar.seqId, dimensionInfo = dimensions.find((dimension => "string" != typeof dimension && dimension.dimensionKey === dimensionKey)), cell = {
|
|
213
213
|
id: id,
|
|
214
214
|
title: dimensionKey === this.indicatorDimensionKey ? this.indicatorTitle : dimensionInfo ? dimensionInfo.title : "axis" === dimensionKey ? "" : dimensionKey,
|
|
215
|
-
field:
|
|
215
|
+
field: dimensionKey,
|
|
216
216
|
style: this.cornerSetting.headerStyle,
|
|
217
217
|
headerType: null !== (_a = this.cornerSetting.headerType) && void 0 !== _a ? _a : "text",
|
|
218
|
+
showSort: null == dimensionInfo ? void 0 : dimensionInfo.showSortInCorner,
|
|
219
|
+
sort: null == dimensionInfo ? void 0 : dimensionInfo.sort,
|
|
218
220
|
define: {
|
|
219
|
-
|
|
221
|
+
showSort: null == dimensionInfo ? void 0 : dimensionInfo.showSortInCorner,
|
|
222
|
+
sort: null == dimensionInfo ? void 0 : dimensionInfo.sort,
|
|
223
|
+
dimensionKey: dimensionKey,
|
|
220
224
|
id: id,
|
|
221
225
|
value: dimensionKey,
|
|
222
226
|
disableHeaderHover: !!this.cornerSetting.disableHeaderHover,
|
|
@@ -1022,7 +1026,7 @@ export class PivotHeaderLayoutMap {
|
|
|
1022
1026
|
}
|
|
1023
1027
|
getCellAdressByHeaderPath(dimensionPaths) {
|
|
1024
1028
|
var _a, _b;
|
|
1025
|
-
let colHeaderPaths, rowHeaderPaths, forceBody = !1;
|
|
1029
|
+
let colHeaderPaths, rowHeaderPaths, isCornerCell = !1, forceBody = !1;
|
|
1026
1030
|
if (Array.isArray(dimensionPaths)) {
|
|
1027
1031
|
if (dimensionPaths.length > this.rowDimensionKeys.length + this.colDimensionKeys.length) return;
|
|
1028
1032
|
colHeaderPaths = dimensionPaths.filter((path => this.colDimensionKeys.indexOf(path.dimensionKey) >= 0 || this.colDimensionKeys.indexOf(this.indicatorDimensionKey) >= 0 && path.indicatorKey)),
|
|
@@ -1030,13 +1034,25 @@ export class PivotHeaderLayoutMap {
|
|
|
1030
1034
|
} else colHeaderPaths = dimensionPaths.colHeaderPaths, rowHeaderPaths = dimensionPaths.rowHeaderPaths,
|
|
1031
1035
|
"body" === (null == dimensionPaths ? void 0 : dimensionPaths.cellLocation) && this._table.isPivotTable() && (forceBody = !0);
|
|
1032
1036
|
if (!Array.isArray(colHeaderPaths) && !Array.isArray(rowHeaderPaths)) return;
|
|
1033
|
-
null == colHeaderPaths || colHeaderPaths.sort(((a, b) => {
|
|
1037
|
+
if (null == colHeaderPaths || colHeaderPaths.sort(((a, b) => {
|
|
1034
1038
|
var _a, _b;
|
|
1035
1039
|
return this.colDimensionKeys.indexOf(null !== (_a = a.dimensionKey) && void 0 !== _a ? _a : this.indicatorDimensionKey) - this.colDimensionKeys.indexOf(null !== (_b = b.dimensionKey) && void 0 !== _b ? _b : this.indicatorDimensionKey);
|
|
1036
1040
|
})), null == rowHeaderPaths || rowHeaderPaths.sort(((a, b) => {
|
|
1037
1041
|
var _a, _b;
|
|
1038
1042
|
return this.fullRowDimensionKeys.indexOf(null !== (_a = a.dimensionKey) && void 0 !== _a ? _a : this.indicatorDimensionKey) - this.fullRowDimensionKeys.indexOf(null !== (_b = b.dimensionKey) && void 0 !== _b ? _b : this.indicatorDimensionKey);
|
|
1039
|
-
}))
|
|
1043
|
+
})), null == colHeaderPaths || colHeaderPaths.forEach((a => {
|
|
1044
|
+
a.isPivotCorner && (isCornerCell = !0);
|
|
1045
|
+
})), null == rowHeaderPaths || rowHeaderPaths.forEach((a => {
|
|
1046
|
+
a.isPivotCorner && (isCornerCell = !0);
|
|
1047
|
+
})), isCornerCell) if ("row" === this.cornerSetting.titleOnDimension) {
|
|
1048
|
+
for (let i = 0; i < this.rowDimensionKeys.length; i++) if (rowHeaderPaths[0].dimensionKey === this.rowDimensionKeys[i]) return {
|
|
1049
|
+
col: i + this.leftRowSeriesNumberColumnCount,
|
|
1050
|
+
row: 0
|
|
1051
|
+
};
|
|
1052
|
+
} else for (let i = 0; i < this.colDimensionKeys.length; i++) if (colHeaderPaths[0].dimensionKey === this.colDimensionKeys[i]) return {
|
|
1053
|
+
col: 0,
|
|
1054
|
+
row: i
|
|
1055
|
+
};
|
|
1040
1056
|
let col, row, defaultCol, defaultRow, needLowestLevel = !1;
|
|
1041
1057
|
(null == colHeaderPaths ? void 0 : colHeaderPaths.length) >= 1 && (null == rowHeaderPaths ? void 0 : rowHeaderPaths.length) >= 1 && (needLowestLevel = !0);
|
|
1042
1058
|
let rowDimensionFinded, colDimensionFinded, rowArr = this.rowTree, colArr = this.columnTree;
|
|
@@ -1076,7 +1092,7 @@ export class PivotHeaderLayoutMap {
|
|
|
1076
1092
|
row += null != startInTotal ? startInTotal : 0, defaultCol = "grid" === this.rowHierarchyType ? (this.rowHeaderTitle ? level + 1 : level) + this.leftRowSeriesNumberColumnCount : 0;
|
|
1077
1093
|
}
|
|
1078
1094
|
if (colDimensionFinded || forceBody) {
|
|
1079
|
-
col = this.rowHeaderLevelCount;
|
|
1095
|
+
col = this.rowHeaderLevelCount + this.leftRowSeriesNumberColumnCount;
|
|
1080
1096
|
const {startInTotal: startInTotal, level: level} = null !== (_b = colDimensionFinded) && void 0 !== _b ? _b : defaultDimension;
|
|
1081
1097
|
col += null != startInTotal ? startInTotal : 0, defaultRow = this.columnHeaderTitle ? level + 1 : level;
|
|
1082
1098
|
}
|
|
@@ -1371,14 +1387,16 @@ export class PivotHeaderLayoutMap {
|
|
|
1371
1387
|
}
|
|
1372
1388
|
resetHeaderTree() {
|
|
1373
1389
|
var _a, _b;
|
|
1374
|
-
this._rowHeaderCellFullPathIds_FULL = [], this.
|
|
1390
|
+
this.colIndex = 0, this._rowHeaderCellFullPathIds_FULL = [], this._columnHeaderCellFullPathIds = [],
|
|
1391
|
+
this._columnHeaderCellIds = [];
|
|
1375
1392
|
const dataset = this.dataset;
|
|
1376
1393
|
this.rowTree = dataset.rowHeaderTree, this.columnTree = dataset.colHeaderTree, this.columnDimensionTree = new DimensionTree(null !== (_a = this.columnTree) && void 0 !== _a ? _a : [], this.sharedVar),
|
|
1377
1394
|
this.rowDimensionTree = new DimensionTree(null !== (_b = this.rowTree) && void 0 !== _b ? _b : [], this.sharedVar, this.rowHierarchyType, "tree" === this.rowHierarchyType ? this.rowExpandLevel : void 0),
|
|
1378
1395
|
this._generateColHeaderIds(), this.colIndex = 0, this._generateRowHeaderIds(), this.resetColumnHeaderLevelCount(),
|
|
1379
1396
|
this._rowHeaderCellFullPathIds_FULL = transpose(this._rowHeaderCellFullPathIds_FULL),
|
|
1380
1397
|
this._headerObjectMap = this._headerObjects.reduce(((o, e) => (o[e.id] = e, o)), {}),
|
|
1381
|
-
this.
|
|
1398
|
+
this._CellHeaderPathMap = new Map, this._largeCellRangeCache.length = 0, this.generateCellIdsConsiderHideHeader(),
|
|
1399
|
+
this.setPagination(this.pagination);
|
|
1382
1400
|
}
|
|
1383
1401
|
isSeriesNumberInHeader(col, row) {
|
|
1384
1402
|
return this.leftRowSeriesNumberColumnCount > 0 && col >= 0 && row >= 0 && col < this.leftRowSeriesNumberColumnCount && row < this.headerLevelCount || this.rightRowSeriesNumberColumnCount > 0 && row >= 0 && col >= this.colCount - this.rightRowSeriesNumberColumnCount && row < this.headerLevelCount;
|