@visactor/vtable 0.20.4-alpha.2 → 0.21.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.d.ts +9 -2
- package/cjs/ListTable.js +25 -9
- package/cjs/ListTable.js.map +1 -1
- package/cjs/PivotChart.d.ts +7 -1
- package/cjs/PivotChart.js +7 -7
- package/cjs/PivotChart.js.map +1 -1
- package/cjs/PivotTable.d.ts +9 -2
- package/cjs/PivotTable.js +26 -11
- package/cjs/PivotTable.js.map +1 -1
- package/cjs/body-helper/style/Style.d.ts +3 -0
- package/cjs/body-helper/style/Style.js +16 -9
- package/cjs/body-helper/style/Style.js.map +1 -1
- package/cjs/core/BaseTable.d.ts +16 -2
- package/cjs/core/BaseTable.js +18 -10
- package/cjs/core/BaseTable.js.map +1 -1
- package/cjs/core/tableHelper.js +3 -1
- package/cjs/core/tableHelper.js.map +1 -1
- package/cjs/event/listener/container-dom.js +59 -13
- package/cjs/event/listener/container-dom.js.map +1 -1
- package/cjs/event/listener/table-group.js +2 -1
- package/cjs/event/listener/table-group.js.map +1 -1
- package/cjs/header-helper/style/Style.d.ts +3 -0
- package/cjs/header-helper/style/Style.js +15 -8
- package/cjs/header-helper/style/Style.js.map +1 -1
- package/cjs/index.d.ts +3 -2
- package/cjs/index.js +16 -2
- package/cjs/index.js.map +1 -1
- package/cjs/layout/pivot-header-layout.d.ts +3 -2
- package/cjs/layout/pivot-header-layout.js +24 -18
- package/cjs/layout/pivot-header-layout.js.map +1 -1
- package/cjs/layout/row-height-map.d.ts +1 -0
- package/cjs/layout/row-height-map.js +25 -1
- package/cjs/layout/row-height-map.js.map +1 -1
- package/cjs/layout/simple-header-layout.d.ts +3 -2
- package/cjs/layout/simple-header-layout.js +16 -12
- package/cjs/layout/simple-header-layout.js.map +1 -1
- package/cjs/plugins/custom-cell-style.d.ts +19 -0
- package/cjs/plugins/custom-cell-style.js +63 -0
- package/cjs/plugins/custom-cell-style.js.map +1 -0
- package/cjs/scenegraph/graphic/contributions/group-contribution-render.js +29 -7
- package/cjs/scenegraph/graphic/contributions/group-contribution-render.js.map +1 -1
- package/cjs/scenegraph/graphic/contributions/rect-contribution-render.js +9 -2
- package/cjs/scenegraph/graphic/contributions/rect-contribution-render.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-helper.js +11 -4
- package/cjs/scenegraph/group-creater/cell-helper.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-type/chart-cell.js +22 -19
- package/cjs/scenegraph/group-creater/cell-type/chart-cell.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-type/checkbox-cell.js +21 -18
- package/cjs/scenegraph/group-creater/cell-type/checkbox-cell.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-type/image-cell.js +7 -7
- package/cjs/scenegraph/group-creater/cell-type/image-cell.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-type/spark-line-cell.js +21 -18
- package/cjs/scenegraph/group-creater/cell-type/spark-line-cell.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-type/text-cell.js +11 -10
- package/cjs/scenegraph/group-creater/cell-type/text-cell.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-type/video-cell.js +7 -7
- package/cjs/scenegraph/group-creater/cell-type/video-cell.js.map +1 -1
- package/cjs/scenegraph/group-creater/progress/default-width-height.d.ts +3 -0
- package/cjs/scenegraph/group-creater/progress/default-width-height.js +24 -0
- package/cjs/scenegraph/group-creater/progress/default-width-height.js.map +1 -0
- package/cjs/scenegraph/group-creater/progress/proxy.d.ts +8 -4
- package/cjs/scenegraph/group-creater/progress/proxy.js +50 -10
- package/cjs/scenegraph/group-creater/progress/proxy.js.map +1 -1
- package/cjs/scenegraph/group-creater/progress/update-position/dynamic-set-x.d.ts +1 -1
- package/cjs/scenegraph/group-creater/progress/update-position/dynamic-set-x.js +14 -16
- package/cjs/scenegraph/group-creater/progress/update-position/dynamic-set-x.js.map +1 -1
- package/cjs/scenegraph/group-creater/progress/update-position/dynamic-set-y.d.ts +1 -1
- package/cjs/scenegraph/group-creater/progress/update-position/dynamic-set-y.js +28 -30
- package/cjs/scenegraph/group-creater/progress/update-position/dynamic-set-y.js.map +1 -1
- package/cjs/scenegraph/group-creater/progress/update-position/update-auto-row.js +1 -1
- package/cjs/scenegraph/group-creater/progress/update-position/update-auto-row.js.map +1 -1
- package/cjs/scenegraph/group-creater/progress/update-position/util.js.map +1 -1
- package/cjs/scenegraph/layout/compute-row-height.js +3 -2
- package/cjs/scenegraph/layout/compute-row-height.js.map +1 -1
- package/cjs/scenegraph/layout/move-cell.d.ts +1 -2
- package/cjs/scenegraph/layout/move-cell.js +3 -16
- package/cjs/scenegraph/layout/move-cell.js.map +1 -1
- package/cjs/scenegraph/scenegraph.d.ts +4 -4
- package/cjs/scenegraph/scenegraph.js +13 -9
- package/cjs/scenegraph/scenegraph.js.map +1 -1
- package/cjs/scenegraph/stick-text/index.js +1 -1
- package/cjs/scenegraph/stick-text/index.js.map +1 -1
- package/cjs/scenegraph/utils/cell-border-stroke-width.d.ts +3 -0
- package/cjs/scenegraph/utils/cell-border-stroke-width.js +16 -0
- package/cjs/scenegraph/utils/cell-border-stroke-width.js.map +1 -0
- package/cjs/scenegraph/utils/get-prop.js +3 -3
- package/cjs/scenegraph/utils/get-prop.js.map +1 -1
- package/cjs/scenegraph/utils/text-icon-layout.js +9 -3
- package/cjs/scenegraph/utils/text-icon-layout.js.map +1 -1
- package/cjs/scenegraph/utils/text-measure.d.ts +4 -2
- package/cjs/scenegraph/utils/text-measure.js +20 -5
- package/cjs/scenegraph/utils/text-measure.js.map +1 -1
- package/cjs/state/cell-move/index.js +6 -6
- package/cjs/state/cell-move/index.js.map +1 -1
- package/cjs/state/state.js +2 -2
- package/cjs/state/state.js.map +1 -1
- package/cjs/themes/ARCO.js +2 -1
- package/cjs/themes/theme.d.ts +3 -0
- package/cjs/themes/theme.js +21 -1
- package/cjs/themes/theme.js.map +1 -1
- package/cjs/tools/NumberMap.d.ts +1 -0
- package/cjs/tools/NumberMap.js +21 -0
- package/cjs/tools/NumberMap.js.map +1 -1
- package/cjs/tools/isx.d.ts +1 -1
- package/cjs/tools/util.d.ts +1 -1
- package/cjs/ts-types/base-table.d.ts +17 -2
- 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 +14 -2
- package/cjs/ts-types/common.js.map +1 -1
- package/cjs/ts-types/customElement.d.ts +2 -0
- package/cjs/ts-types/customElement.js.map +1 -1
- package/cjs/ts-types/style-define.d.ts +2 -0
- package/cjs/ts-types/style-define.js.map +1 -1
- package/cjs/ts-types/table-engine.d.ts +1 -1
- package/cjs/ts-types/table-engine.js.map +1 -1
- package/cjs/ts-types/theme.d.ts +3 -0
- package/cjs/ts-types/theme.js.map +1 -1
- package/cjs/vrender.js.map +1 -1
- package/dist/vtable.js +3327 -1273
- package/dist/vtable.min.js +2 -2
- package/es/ListTable.d.ts +9 -2
- package/es/ListTable.js +25 -9
- package/es/ListTable.js.map +1 -1
- package/es/PivotChart.d.ts +7 -1
- package/es/PivotChart.js +7 -7
- package/es/PivotChart.js.map +1 -1
- package/es/PivotTable.d.ts +9 -2
- package/es/PivotTable.js +27 -12
- package/es/PivotTable.js.map +1 -1
- package/es/body-helper/style/Style.d.ts +3 -0
- package/es/body-helper/style/Style.js +16 -9
- package/es/body-helper/style/Style.js.map +1 -1
- package/es/core/BaseTable.d.ts +16 -2
- package/es/core/BaseTable.js +19 -9
- package/es/core/BaseTable.js.map +1 -1
- package/es/core/tableHelper.js +3 -1
- package/es/core/tableHelper.js.map +1 -1
- package/es/event/listener/container-dom.js +58 -14
- package/es/event/listener/container-dom.js.map +1 -1
- package/es/event/listener/table-group.js +1 -1
- package/es/event/listener/table-group.js.map +1 -1
- package/es/header-helper/style/Style.d.ts +3 -0
- package/es/header-helper/style/Style.js +15 -8
- package/es/header-helper/style/Style.js.map +1 -1
- package/es/index.d.ts +3 -2
- package/es/index.js +4 -2
- package/es/index.js.map +1 -1
- package/es/layout/pivot-header-layout.d.ts +3 -2
- package/es/layout/pivot-header-layout.js +24 -18
- package/es/layout/pivot-header-layout.js.map +1 -1
- package/es/layout/row-height-map.d.ts +1 -0
- package/es/layout/row-height-map.js +25 -1
- package/es/layout/row-height-map.js.map +1 -1
- package/es/layout/simple-header-layout.d.ts +3 -2
- package/es/layout/simple-header-layout.js +16 -12
- package/es/layout/simple-header-layout.js.map +1 -1
- package/es/plugins/custom-cell-style.d.ts +19 -0
- package/es/plugins/custom-cell-style.js +55 -0
- package/es/plugins/custom-cell-style.js.map +1 -0
- package/es/scenegraph/graphic/contributions/group-contribution-render.js +29 -6
- package/es/scenegraph/graphic/contributions/group-contribution-render.js.map +1 -1
- package/es/scenegraph/graphic/contributions/rect-contribution-render.js +9 -2
- package/es/scenegraph/graphic/contributions/rect-contribution-render.js.map +1 -1
- package/es/scenegraph/group-creater/cell-helper.js +11 -4
- package/es/scenegraph/group-creater/cell-helper.js.map +1 -1
- package/es/scenegraph/group-creater/cell-type/chart-cell.js +23 -18
- package/es/scenegraph/group-creater/cell-type/chart-cell.js.map +1 -1
- package/es/scenegraph/group-creater/cell-type/checkbox-cell.js +22 -17
- package/es/scenegraph/group-creater/cell-type/checkbox-cell.js.map +1 -1
- package/es/scenegraph/group-creater/cell-type/image-cell.js +8 -6
- package/es/scenegraph/group-creater/cell-type/image-cell.js.map +1 -1
- package/es/scenegraph/group-creater/cell-type/spark-line-cell.js +22 -17
- package/es/scenegraph/group-creater/cell-type/spark-line-cell.js.map +1 -1
- package/es/scenegraph/group-creater/cell-type/text-cell.js +11 -9
- package/es/scenegraph/group-creater/cell-type/text-cell.js.map +1 -1
- package/es/scenegraph/group-creater/cell-type/video-cell.js +8 -6
- package/es/scenegraph/group-creater/cell-type/video-cell.js.map +1 -1
- package/es/scenegraph/group-creater/progress/default-width-height.d.ts +3 -0
- package/es/scenegraph/group-creater/progress/default-width-height.js +18 -0
- package/es/scenegraph/group-creater/progress/default-width-height.js.map +1 -0
- package/es/scenegraph/group-creater/progress/proxy.d.ts +8 -4
- package/es/scenegraph/group-creater/progress/proxy.js +51 -11
- package/es/scenegraph/group-creater/progress/proxy.js.map +1 -1
- package/es/scenegraph/group-creater/progress/update-position/dynamic-set-x.d.ts +1 -1
- package/es/scenegraph/group-creater/progress/update-position/dynamic-set-x.js +14 -16
- package/es/scenegraph/group-creater/progress/update-position/dynamic-set-x.js.map +1 -1
- package/es/scenegraph/group-creater/progress/update-position/dynamic-set-y.d.ts +1 -1
- package/es/scenegraph/group-creater/progress/update-position/dynamic-set-y.js +28 -31
- package/es/scenegraph/group-creater/progress/update-position/dynamic-set-y.js.map +1 -1
- package/es/scenegraph/group-creater/progress/update-position/update-auto-row.js +1 -1
- package/es/scenegraph/group-creater/progress/update-position/update-auto-row.js.map +1 -1
- package/es/scenegraph/group-creater/progress/update-position/util.js.map +1 -1
- package/es/scenegraph/layout/compute-row-height.js +3 -1
- package/es/scenegraph/layout/compute-row-height.js.map +1 -1
- package/es/scenegraph/layout/move-cell.d.ts +1 -2
- package/es/scenegraph/layout/move-cell.js +3 -16
- package/es/scenegraph/layout/move-cell.js.map +1 -1
- package/es/scenegraph/scenegraph.d.ts +4 -4
- package/es/scenegraph/scenegraph.js +13 -9
- package/es/scenegraph/scenegraph.js.map +1 -1
- package/es/scenegraph/stick-text/index.js +1 -1
- package/es/scenegraph/stick-text/index.js.map +1 -1
- package/es/scenegraph/utils/cell-border-stroke-width.d.ts +3 -0
- package/es/scenegraph/utils/cell-border-stroke-width.js +10 -0
- package/es/scenegraph/utils/cell-border-stroke-width.js.map +1 -0
- package/es/scenegraph/utils/get-prop.js +3 -3
- package/es/scenegraph/utils/get-prop.js.map +1 -1
- package/es/scenegraph/utils/text-icon-layout.js +9 -3
- package/es/scenegraph/utils/text-icon-layout.js.map +1 -1
- package/es/scenegraph/utils/text-measure.d.ts +4 -2
- package/es/scenegraph/utils/text-measure.js +19 -5
- package/es/scenegraph/utils/text-measure.js.map +1 -1
- package/es/state/cell-move/index.js +6 -6
- package/es/state/cell-move/index.js.map +1 -1
- package/es/state/state.js +2 -2
- package/es/state/state.js.map +1 -1
- package/es/themes/ARCO.js +2 -1
- package/es/themes/theme.d.ts +3 -0
- package/es/themes/theme.js +21 -1
- package/es/themes/theme.js.map +1 -1
- package/es/tools/NumberMap.d.ts +1 -0
- package/es/tools/NumberMap.js +21 -0
- package/es/tools/NumberMap.js.map +1 -1
- package/es/tools/isx.d.ts +1 -1
- package/es/tools/util.d.ts +1 -1
- package/es/ts-types/base-table.d.ts +17 -2
- 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 +14 -2
- package/es/ts-types/common.js.map +1 -1
- package/es/ts-types/customElement.d.ts +2 -0
- package/es/ts-types/customElement.js.map +1 -1
- package/es/ts-types/style-define.d.ts +2 -0
- package/es/ts-types/style-define.js.map +1 -1
- package/es/ts-types/table-engine.d.ts +1 -1
- package/es/ts-types/table-engine.js.map +1 -1
- package/es/ts-types/theme.d.ts +3 -0
- package/es/ts-types/theme.js.map +1 -1
- package/es/vrender.js.map +1 -1
- package/package.json +6 -6
- package/cjs/scenegraph/component/menu.d.ts +0 -41
- package/es/scenegraph/component/menu.d.ts +0 -41
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/body-helper/style/Style.ts"],"names":[],"mappings":";;;AAuBA,IAAI,YAAmB,CAAC;AACxB,yDAAsD;AACtD,MAAM,gBAAgB,GAAG;IACvB,YAAY,EAAE,cAAuB;CACtC,CAAC;AAEF,MAAa,KAAM,SAAQ,yBAAW;IA2BpC,MAAM,KAAK,UAAU;QACnB,OAAO,gBAAgB,CAAC;IAC1B,CAAC;IACD,MAAM,KAAK,OAAO;QAChB,OAAO,YAAY,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,YA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\n ColumnStyle,\n IStyleOption,\n TextOverflow,\n UnderlinePropertyDefine,\n LineThroughPropertyDefine,\n LineDashPropertyDefine,\n ColorsPropertyDefine,\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 STYLE_EVENT_TYPE = {\n CHANGE_STYLE: 'change_style' as const\n};\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 _padding?: PaddingsPropertyDefine;\n private _defaultPadding: PaddingsPropertyDefine = [10, 16, 10, 16];\n private _textStick: boolean;\n private _textOverflow?: TextOverflow;\n private _textAlign?: TextAlignType;\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 _lineThrough?: LineThroughPropertyDefine;\n private _lineThroughColor?: ColorPropertyDefine;\n private _lineThroughDash?: LineDashPropertyDefine;\n private _linkColor?: ColorPropertyDefine;\n private _cursor?: CursorPropertyDefine;\n private _borderLineWidth?: LineWidthsPropertyDefine;\n private _borderLineDash?: LineDashsPropertyDefine;\n private _marked?: MarkedPropertyDefine;\n static get EVENT_TYPE(): { CHANGE_STYLE: 'change_style' } {\n return STYLE_EVENT_TYPE;\n }\n static get DEFAULT(): Style {\n return defaultStyle ? defaultStyle : (defaultStyle = new Style());\n }\n constructor(style: IStyleOption = {}, bodyStyle: IStyleOption = {}) {\n super();\n this._textAlign = style?.textAlign ?? bodyStyle?.textAlign; //|| \"left\";\n this._textBaseline = style?.textBaseline ?? bodyStyle?.textBaseline; //|| \"middle\";\n this._color = style?.color ?? bodyStyle?.color;\n // icon为文字前后可添加的图表\n this._fontSize = style.fontSize ?? bodyStyle?.fontSize;\n this._fontFamily = style.fontFamily ?? bodyStyle?.fontFamily;\n this._fontWeight = style.fontWeight ?? bodyStyle?.fontWeight;\n this._fontVariant = style.fontVariant ?? bodyStyle?.fontVariant;\n this._fontStyle = style.fontStyle ?? bodyStyle?.fontStyle;\n //修改不能设置为0的情况\n this._padding = style?.padding ?? bodyStyle?.padding ?? this._defaultPadding;\n this._borderColor = style?.borderColor ?? bodyStyle?.borderColor;\n this._textOverflow = style?.textOverflow ?? bodyStyle?.textOverflow; //|| \"clip\";\n this._textStick = style.textStick ?? bodyStyle?.textStick ?? false;\n this._bgColor = style?.bgColor ?? bodyStyle?.bgColor;\n this._lineHeight = style?.lineHeight ?? bodyStyle?.lineHeight;\n this._underline = style?.underline ?? bodyStyle?.underline;\n this._underlineColor = style?.underlineColor ?? bodyStyle?.underlineColor;\n this._underlineDash = style?.underlineDash ?? bodyStyle?.underlineDash;\n this._lineThrough = style?.lineThrough ?? bodyStyle?.lineThrough;\n this._lineThroughColor = style?.lineThroughColor ?? bodyStyle?.lineThroughColor;\n this._lineThroughDash = style?.lineThroughDash ?? bodyStyle?.lineThroughDash;\n this._linkColor = style?.linkColor ?? bodyStyle?.linkColor;\n this._cursor = style.cursor ?? bodyStyle?.cursor;\n this._borderLineWidth = style.borderLineWidth ?? bodyStyle?.borderLineWidth;\n this._borderLineDash = style.borderLineDash ?? bodyStyle?.borderLineDash;\n this._marked = style.marked ?? bodyStyle?.marked;\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 padding(): PaddingsPropertyDefine | undefined {\n return this._padding;\n }\n set padding(padding: PaddingsPropertyDefine | undefined) {\n this._padding = padding;\n // this.doChangeStyle();\n }\n get textOverflow(): TextOverflow | undefined {\n return this._textOverflow;\n }\n set textOverflow(textOverflow: TextOverflow | undefined) {\n this._textOverflow = textOverflow;\n // this.doChangeStyle();\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 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 textAlign(): TextAlignType | undefined {\n return this._textAlign;\n }\n set textAlign(textAlign: TextAlignType | undefined) {\n this._textAlign = textAlign;\n // this.doChangeStyle();\n }\n get textBaseline(): TextBaselineType | undefined {\n return this._textBaseline;\n }\n set textBaseline(textBaseline: TextBaselineType | undefined) {\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 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 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 get marked(): MarkedPropertyDefine | undefined {\n return this._marked;\n }\n set marked(marked: MarkedPropertyDefine | undefined) {\n this._marked = marked;\n // this.doChangeStyle();\n }\n // doChangeStyle(): void {\n // this.fireListeners(STYLE_EVENT_TYPE.CHANGE_STYLE, null);\n // }\n clone(): Style {\n return new Style(this, null);\n }\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/body-helper/style/Style.ts"],"names":[],"mappings":";;;AAuBA,IAAI,YAAmB,CAAC;AACxB,yDAAsD;AACtD,MAAM,gBAAgB,GAAG;IACvB,YAAY,EAAE,cAAuB;CACtC,CAAC;AAEF,MAAa,KAAM,SAAQ,yBAAW;IA4BpC,MAAM,KAAK,UAAU;QACnB,OAAO,gBAAgB,CAAC;IAC1B,CAAC;IACD,MAAM,KAAK,OAAO;QAChB,OAAO,YAAY,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC,CAAC;IACpE,CAAC;IACD,YAAY,QAAsB,EAAE,EAAE,YAA0B,EAAE;;QAChE,KAAK,EAAE,CAAC;QA3BF,oBAAe,GAA2B,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC;QA4BjE,IAAI,CAAC,UAAU,GAAG,MAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,SAAS,mCAAI,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAE,SAAS,CAAC;QAC3D,IAAI,CAAC,aAAa,GAAG,MAAA,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BAAgB,CAAC,gBAAiD;QACpE,IAAI,CAAC,iBAAiB,GAAG,gBAAgB,CAAC;IAE5C,CAAC;IACD,IAAI,eAAe;QACjB,OAAO,IAAI,CAAC,gBAAgB,CAAC;IAC/B,CAAC;IACD,IAAI,eAAe,CAAC,eAAmD;QACrE,IAAI,CAAC,gBAAgB,GAAG,eAAe,CAAC;IAE1C,CAAC;IACD,IAAI,SAAS;QACX,OAAO,IAAI,CAAC,UAAU,CAAC;IACzB,CAAC;IACD,IAAI,SAAS,CAAC,SAA0C;QACtD,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;IAE9B,CAAC;IACD,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;IACD,IAAI,MAAM;QACR,OAAO,IAAI,CAAC,OAAO,CAAC;IACtB,CAAC;IACD,IAAI,MAAM,CAAC,MAAwC;QACjD,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;IAExB,CAAC;IAID,KAAK;QACH,OAAO,IAAI,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC/B,CAAC;CACF;AA5PD,sBA4PC","file":"Style.js","sourcesContent":["/* eslint-disable no-undef */\nimport type {\n ColorPropertyDefine,\n ColumnStyle,\n IStyleOption,\n TextOverflow,\n UnderlinePropertyDefine,\n LineThroughPropertyDefine,\n LineDashPropertyDefine,\n ColorsPropertyDefine,\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 STYLE_EVENT_TYPE = {\n CHANGE_STYLE: 'change_style' as const\n};\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 _padding?: PaddingsPropertyDefine;\n private _defaultPadding: PaddingsPropertyDefine = [10, 16, 10, 16];\n private _textStick: boolean;\n private _textOverflow?: TextOverflow;\n private _textAlign?: TextAlignType;\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 private _cursor?: CursorPropertyDefine;\n private _borderLineWidth?: LineWidthsPropertyDefine;\n private _borderLineDash?: LineDashsPropertyDefine;\n private _marked?: MarkedPropertyDefine;\n static get EVENT_TYPE(): { CHANGE_STYLE: 'change_style' } {\n return STYLE_EVENT_TYPE;\n }\n static get DEFAULT(): Style {\n return defaultStyle ? defaultStyle : (defaultStyle = new Style());\n }\n constructor(style: IStyleOption = {}, bodyStyle: IStyleOption = {}) {\n super();\n this._textAlign = style?.textAlign ?? bodyStyle?.textAlign; //|| \"left\";\n this._textBaseline = style?.textBaseline ?? bodyStyle?.textBaseline; //|| \"middle\";\n this._color = style?.color ?? bodyStyle?.color;\n // icon为文字前后可添加的图表\n this._fontSize = style.fontSize ?? bodyStyle?.fontSize;\n this._fontFamily = style.fontFamily ?? bodyStyle?.fontFamily;\n this._fontWeight = style.fontWeight ?? bodyStyle?.fontWeight;\n this._fontVariant = style.fontVariant ?? bodyStyle?.fontVariant;\n this._fontStyle = style.fontStyle ?? bodyStyle?.fontStyle;\n //修改不能设置为0的情况\n this._padding = style?.padding ?? bodyStyle?.padding ?? this._defaultPadding;\n this._borderColor = style?.borderColor ?? bodyStyle?.borderColor;\n this._textOverflow = style?.textOverflow ?? bodyStyle?.textOverflow; //|| \"clip\";\n this._textStick = style.textStick ?? bodyStyle?.textStick ?? false;\n this._bgColor = style?.bgColor ?? bodyStyle?.bgColor;\n this._lineHeight = style?.lineHeight ?? bodyStyle?.lineHeight;\n this._underline = style?.underline ?? bodyStyle?.underline;\n this._underlineColor = style?.underlineColor ?? bodyStyle?.underlineColor;\n this._underlineDash = style?.underlineDash ?? bodyStyle?.underlineDash;\n this._underlineOffset = style?.underlineOffset ?? bodyStyle?.underlineOffset;\n this._lineThrough = style?.lineThrough ?? bodyStyle?.lineThrough;\n this._lineThroughColor = style?.lineThroughColor ?? bodyStyle?.lineThroughColor;\n this._lineThroughDash = style?.lineThroughDash ?? bodyStyle?.lineThroughDash;\n this._linkColor = style?.linkColor ?? bodyStyle?.linkColor;\n this._cursor = style.cursor ?? bodyStyle?.cursor;\n this._borderLineWidth = style.borderLineWidth ?? bodyStyle?.borderLineWidth;\n this._borderLineDash = style.borderLineDash ?? bodyStyle?.borderLineDash;\n this._marked = style.marked ?? bodyStyle?.marked;\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 padding(): PaddingsPropertyDefine | undefined {\n return this._padding;\n }\n set padding(padding: PaddingsPropertyDefine | undefined) {\n this._padding = padding;\n // this.doChangeStyle();\n }\n get textOverflow(): TextOverflow | undefined {\n return this._textOverflow;\n }\n set textOverflow(textOverflow: TextOverflow | undefined) {\n this._textOverflow = textOverflow;\n // this.doChangeStyle();\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 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 textAlign(): TextAlignType | undefined {\n return this._textAlign;\n }\n set textAlign(textAlign: TextAlignType | undefined) {\n this._textAlign = textAlign;\n // this.doChangeStyle();\n }\n get textBaseline(): TextBaselineType | undefined {\n return this._textBaseline;\n }\n set textBaseline(textBaseline: TextBaselineType | undefined) {\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 get underlineOffset(): number | undefined {\n return this._underlineOffset;\n }\n set underlineOffset(underlineOffset: number | undefined) {\n this._underlineOffset = underlineOffset;\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 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 get marked(): MarkedPropertyDefine | undefined {\n return this._marked;\n }\n set marked(marked: MarkedPropertyDefine | undefined) {\n this._marked = marked;\n // this.doChangeStyle();\n }\n // doChangeStyle(): void {\n // this.fireListeners(STYLE_EVENT_TYPE.CHANGE_STYLE, null);\n // }\n clone(): Style {\n return new Style(this, null);\n }\n}\n"]}
|
package/cjs/core/BaseTable.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type CellAddress, type CellRange, type TableEventHandlersEventArgumentMap, type TableEventHandlersReturnMap, type TableKeyboardOptions, type DropDownMenuHighlightInfo, type MenuListItem, type WidthModeDef, type ICustomRender, type ICellHeaderPaths, type HeaderData, type FullExtendStyle, type FieldDef, type ColumnTypeOption, type SortState, type IPagination, type ICustomLayout, type CellInfo, type CellStyle, type DropDownMenuOptions, type FieldData, type MaybePromiseOrUndefined, type MousePointerCellEvent, type DropDownMenuEventInfo, type HierarchyState, type FieldKeyDef, type CellLocation, type LayoutObjectId, type HeightModeDef, type ITableThemeDefine } from '../ts-types';
|
|
2
|
-
import type { AnyFunction, CellAddressWithBound, ColumnIconOption, TableEventOptions } from '../ts-types';
|
|
2
|
+
import type { AnyFunction, CellAddressWithBound, ColumnIconOption, ColumnStyleOption, TableEventOptions } from '../ts-types';
|
|
3
3
|
import { TABLE_EVENT_TYPE } from './TABLE_EVENT_TYPE';
|
|
4
4
|
import { EventTarget } from '../event/EventTarget';
|
|
5
5
|
import { NumberMap } from '../tools/NumberMap';
|
|
@@ -15,6 +15,7 @@ import type { TooltipOptions } from '../ts-types/tooltip';
|
|
|
15
15
|
import type { BaseTableAPI, BaseTableConstructorOptions, IBaseTableProtected } from '../ts-types/base-table';
|
|
16
16
|
import { DataSet } from '@visactor/vdataset';
|
|
17
17
|
import { NumberRangeMap } from '../layout/row-height-map';
|
|
18
|
+
import { CustomCellStylePlugin } from '../plugins/custom-cell-style';
|
|
18
19
|
export declare abstract class BaseTable extends EventTarget implements BaseTableAPI {
|
|
19
20
|
internalProps: IBaseTableProtected;
|
|
20
21
|
showFrozenIcon: boolean;
|
|
@@ -55,6 +56,7 @@ export declare abstract class BaseTable extends EventTarget implements BaseTable
|
|
|
55
56
|
query?: any;
|
|
56
57
|
callback: AnyFunction;
|
|
57
58
|
}[]>;
|
|
59
|
+
customCellStylePlugin: CustomCellStylePlugin;
|
|
58
60
|
constructor(container: HTMLElement, options?: BaseTableConstructorOptions);
|
|
59
61
|
throttleInvalidate: (this: any, ...args: any[]) => void;
|
|
60
62
|
getContainer(): HTMLElement;
|
|
@@ -251,7 +253,13 @@ export declare abstract class BaseTable extends EventTarget implements BaseTable
|
|
|
251
253
|
abstract toggleHierarchyState(col: number, row: number): void;
|
|
252
254
|
abstract _hasHierarchyTreeHeader(): boolean;
|
|
253
255
|
abstract getMenuInfo(col: number, row: number, type: string): DropDownMenuEventInfo;
|
|
254
|
-
abstract
|
|
256
|
+
abstract _moveHeaderPosition(source: CellAddress, target: CellAddress): {
|
|
257
|
+
sourceIndex: number;
|
|
258
|
+
targetIndex: any;
|
|
259
|
+
sourceSize: any;
|
|
260
|
+
targetSize: any;
|
|
261
|
+
moveType: 'column' | 'row';
|
|
262
|
+
};
|
|
255
263
|
abstract getRecordShowIndexByCell(col: number, row: number): number;
|
|
256
264
|
abstract getCellOriginRecord(col: number, row: number): MaybePromiseOrUndefined;
|
|
257
265
|
abstract getCellRawRecord(col: number, row: number): MaybePromiseOrUndefined;
|
|
@@ -360,4 +368,10 @@ export declare abstract class BaseTable extends EventTarget implements BaseTable
|
|
|
360
368
|
onVChartEvent(type: string, query: any, callback: AnyFunction): void;
|
|
361
369
|
offVChartEvent(type: string, callback?: AnyFunction): void;
|
|
362
370
|
_bindChartEvent(activeChartInstance: any): void;
|
|
371
|
+
registerCustomCellStyle(customStyleId: string, customStyle: ColumnStyleOption | undefined | null): void;
|
|
372
|
+
arrangeCustomCellStyle(cellPos: {
|
|
373
|
+
col?: number;
|
|
374
|
+
row?: number;
|
|
375
|
+
range?: CellRange;
|
|
376
|
+
}, customStyleId: string): void;
|
|
363
377
|
}
|
package/cjs/core/BaseTable.js
CHANGED
|
@@ -33,7 +33,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
33
33
|
value: !0
|
|
34
34
|
}), exports.BaseTable = void 0;
|
|
35
35
|
|
|
36
|
-
const columnStyleContents = __importStar(require("../body-helper/style")), headerStyleContents = __importStar(require("../header-helper/style")), style_1 = require("./style"), style = __importStar(require("../tools/style")), ts_types_1 = require("../ts-types"), helper_1 = require("../tools/helper"), TABLE_EVENT_TYPE_1 = require("./TABLE_EVENT_TYPE"), EventHandler_1 = require("../event/EventHandler"), EventTarget_1 = require("../event/EventTarget"), NumberMap_1 = require("../tools/NumberMap"), Rect_1 = require("../tools/Rect"), util_1 = require("../tools/util"), themes_1 = __importDefault(require("../themes")), env_1 = require("../tools/env"), scenegraph_1 = require("../scenegraph/scenegraph"), state_1 = require("../state/state"), event_1 = require("../event/event"), body_helper_1 = require("../body-helper/body-helper"), header_helper_1 = require("../header-helper/header-helper"), TooltipHandler_1 = require("../components/tooltip/TooltipHandler"), vutils_1 = require("@visactor/vutils"), text_measure_1 = require("../scenegraph/utils/text-measure"), get_prop_1 = require("../scenegraph/utils/get-prop"), icons_1 = require("../plugins/icons"), tableHelper_1 = require("./tableHelper"), MenuHandler_1 = require("../components/menu/dom/MenuHandler"), FouseInput_1 = require("./FouseInput"), pixel_ratio_1 = require("../tools/pixel-ratio"), create_legend_1 = require("../components/legend/create-legend"), vdataset_1 = require("@visactor/vdataset"), chart_render_helper_1 = require("../scenegraph/graphic/contributions/chart-render-helper"), get_axis_config_1 = require("../layout/chart-helper/get-axis-config"), row_height_map_1 = require("../layout/row-height-map"), {toBoxArray: toBoxArray} = helper_1.style, {isTouchEvent: isTouchEvent} = helper_1.event, rangeReg = /^\$(\d+)\$(\d+)$/;
|
|
36
|
+
const columnStyleContents = __importStar(require("../body-helper/style")), headerStyleContents = __importStar(require("../header-helper/style")), style_1 = require("./style"), style = __importStar(require("../tools/style")), ts_types_1 = require("../ts-types"), helper_1 = require("../tools/helper"), TABLE_EVENT_TYPE_1 = require("./TABLE_EVENT_TYPE"), EventHandler_1 = require("../event/EventHandler"), EventTarget_1 = require("../event/EventTarget"), NumberMap_1 = require("../tools/NumberMap"), Rect_1 = require("../tools/Rect"), util_1 = require("../tools/util"), themes_1 = __importDefault(require("../themes")), env_1 = require("../tools/env"), scenegraph_1 = require("../scenegraph/scenegraph"), state_1 = require("../state/state"), event_1 = require("../event/event"), body_helper_1 = require("../body-helper/body-helper"), header_helper_1 = require("../header-helper/header-helper"), TooltipHandler_1 = require("../components/tooltip/TooltipHandler"), vutils_1 = require("@visactor/vutils"), text_measure_1 = require("../scenegraph/utils/text-measure"), get_prop_1 = require("../scenegraph/utils/get-prop"), icons_1 = require("../plugins/icons"), tableHelper_1 = require("./tableHelper"), MenuHandler_1 = require("../components/menu/dom/MenuHandler"), FouseInput_1 = require("./FouseInput"), pixel_ratio_1 = require("../tools/pixel-ratio"), create_legend_1 = require("../components/legend/create-legend"), vdataset_1 = require("@visactor/vdataset"), chart_render_helper_1 = require("../scenegraph/graphic/contributions/chart-render-helper"), get_axis_config_1 = require("../layout/chart-helper/get-axis-config"), row_height_map_1 = require("../layout/row-height-map"), custom_cell_style_1 = require("../plugins/custom-cell-style"), {toBoxArray: toBoxArray} = helper_1.style, {isTouchEvent: isTouchEvent} = helper_1.event, rangeReg = /^\$(\d+)\$(\d+)$/;
|
|
37
37
|
|
|
38
38
|
(0, style_1.importStyle)();
|
|
39
39
|
|
|
@@ -44,8 +44,8 @@ class BaseTable extends EventTarget_1.EventTarget {
|
|
|
44
44
|
return TABLE_EVENT_TYPE_1.TABLE_EVENT_TYPE;
|
|
45
45
|
}
|
|
46
46
|
constructor(container, options = {}) {
|
|
47
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
48
|
-
if (super(), this.showFrozenIcon = !0, this.version = "0.
|
|
47
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
48
|
+
if (super(), this.showFrozenIcon = !0, this.version = "0.21.0", this.id = `VTable${Date.now()}`,
|
|
49
49
|
this.isReleased = !1, this._chartEventMap = {}, this.throttleInvalidate = (0, util_1.throttle2)(this.render.bind(this), 200),
|
|
50
50
|
!container && "node" !== options.mode) throw new Error("vtable's container is undefined");
|
|
51
51
|
const {frozenColCount: frozenColCount = 0, defaultRowHeight: defaultRowHeight = 40, defaultHeaderRowHeight: defaultHeaderRowHeight, defaultColWidth: defaultColWidth = 80, defaultHeaderColWidth: defaultHeaderColWidth, widthMode: widthMode = "standard", heightMode: heightMode = "standard", autoFillWidth: autoFillWidth = !1, autoFillHeight: autoFillHeight = !1, keyboardOptions: keyboardOptions, eventOptions: eventOptions, columnResizeMode: columnResizeMode, dragHeaderMode: dragHeaderMode, showFrozenIcon: showFrozenIcon, allowFrozenColCount: allowFrozenColCount, padding: padding, hover: hover, menu: menu, select: click, customRender: customRender, pixelRatio: pixelRatio = pixel_ratio_1.defaultPixelRatio, renderChartAsync: renderChartAsync, renderChartAsyncBatchCount: renderChartAsyncBatchCount, mode: mode, modeParams: modeParams, canvasWidth: canvasWidth, canvasHeight: canvasHeight, overscrollBehavior: overscrollBehavior, limitMinWidth: limitMinWidth} = options;
|
|
@@ -112,7 +112,7 @@ class BaseTable extends EventTarget_1.EventTarget {
|
|
|
112
112
|
this.headerStyleCache = new Map, this.bodyStyleCache = new Map, this.bodyBottomStyleCache = new Map,
|
|
113
113
|
internalProps.stick = {
|
|
114
114
|
changedCells: new Map
|
|
115
|
-
}, internalProps.customMergeCell = options.customMergeCell;
|
|
115
|
+
}, internalProps.customMergeCell = options.customMergeCell, this.customCellStylePlugin = new custom_cell_style_1.CustomCellStylePlugin(this, null !== (_h = options.customCellStyle) && void 0 !== _h ? _h : [], null !== (_j = options.customCellStyleArrangement) && void 0 !== _j ? _j : []);
|
|
116
116
|
}
|
|
117
117
|
getContainer() {
|
|
118
118
|
return this.container;
|
|
@@ -1143,7 +1143,7 @@ class BaseTable extends EventTarget_1.EventTarget {
|
|
|
1143
1143
|
}
|
|
1144
1144
|
_getCellStyle(col, row) {
|
|
1145
1145
|
var _a, _b, _c, _d;
|
|
1146
|
-
const {layoutMap: layoutMap} = this.internalProps;
|
|
1146
|
+
const customCellStyle = this.customCellStylePlugin.getCustomCellStyle(col, row), {layoutMap: layoutMap} = this.internalProps;
|
|
1147
1147
|
if (layoutMap.isHeader(col, row)) {
|
|
1148
1148
|
let cacheKey;
|
|
1149
1149
|
if (!this.isPivotTable() || this.isBottomFrozenRow(row) || this.isRightFrozenColumn(col)) cacheKey = `${col}-${row}`; else {
|
|
@@ -1151,7 +1151,7 @@ class BaseTable extends EventTarget_1.EventTarget {
|
|
|
1151
1151
|
cacheKey = (null == define ? void 0 : define.dimensionKey) ? `dim-${define.dimensionKey}` : (null == define ? void 0 : define.indicatorKey) ? `ind-${define.indicatorKey}` : `${col}-${row}`;
|
|
1152
1152
|
}
|
|
1153
1153
|
let cacheStyle = this.headerStyleCache.get(cacheKey);
|
|
1154
|
-
if (cacheStyle) return cacheStyle;
|
|
1154
|
+
if (cacheStyle) return customCellStyle ? (0, custom_cell_style_1.mergeStyle)(cacheStyle, customCellStyle) : cacheStyle;
|
|
1155
1155
|
const hd = layoutMap.getHeader(col, row);
|
|
1156
1156
|
let paddingForAxis;
|
|
1157
1157
|
if (this.isPivotChart() && (0, get_axis_config_1.isTopOrBottomAxis)(col, row, layoutMap) && layoutMap.isAxisCell(col, row)) {
|
|
@@ -1190,14 +1190,14 @@ class BaseTable extends EventTarget_1.EventTarget {
|
|
|
1190
1190
|
cellHeaderPaths: this.getCellHeaderPaths(col, row)
|
|
1191
1191
|
}, styleClass, this.options.autoWrapText, this.theme);
|
|
1192
1192
|
}
|
|
1193
|
-
return this.headerStyleCache.set(cacheKey, cacheStyle), cacheStyle;
|
|
1193
|
+
return this.headerStyleCache.set(cacheKey, cacheStyle), customCellStyle ? (0, custom_cell_style_1.mergeStyle)(cacheStyle, customCellStyle) : cacheStyle;
|
|
1194
1194
|
}
|
|
1195
1195
|
let cacheKey;
|
|
1196
1196
|
const cellType = this.getCellType(col, row);
|
|
1197
1197
|
let cacheStyle;
|
|
1198
1198
|
if (cacheKey = this.isListTable() && !this.transpose || this.isPivotTable() && this.internalProps.layoutMap.indicatorsAsCol ? col + cellType : row + cellType,
|
|
1199
1199
|
cacheStyle = layoutMap.isBottomFrozenRow(row) ? this.bodyBottomStyleCache.get(cacheKey) : this.bodyStyleCache.get(cacheKey),
|
|
1200
|
-
cacheStyle) return cacheStyle;
|
|
1200
|
+
cacheStyle) return customCellStyle ? (0, custom_cell_style_1.mergeStyle)(cacheStyle, customCellStyle) : cacheStyle;
|
|
1201
1201
|
const column = layoutMap.getBody(col, row), styleClass = this.internalProps.bodyHelper.getStyleClass(this.getCellType(col, row)), style = null == column ? void 0 : column.style;
|
|
1202
1202
|
return cacheStyle = columnStyleContents.of(style, layoutMap.isBottomFrozenRow(row) && this.theme.bottomFrozenStyle ? this.theme.bottomFrozenStyle : layoutMap.isRightFrozenColumn(col) && this.theme.rightFrozenStyle ? this.theme.rightFrozenStyle : this.theme.bodyStyle, {
|
|
1203
1203
|
col: col,
|
|
@@ -1207,7 +1207,7 @@ class BaseTable extends EventTarget_1.EventTarget {
|
|
|
1207
1207
|
dataValue: this.getCellOriginValue(col, row),
|
|
1208
1208
|
cellHeaderPaths: this.getCellHeaderPaths(col, row)
|
|
1209
1209
|
}, styleClass, this.options.autoWrapText, this.theme), (0, vutils_1.isFunction)(style) || (layoutMap.isBottomFrozenRow(row) ? this.bodyBottomStyleCache.set(cacheKey, cacheStyle) : this.bodyStyleCache.set(cacheKey, cacheStyle)),
|
|
1210
|
-
cacheStyle;
|
|
1210
|
+
customCellStyle ? (0, custom_cell_style_1.mergeStyle)(cacheStyle, customCellStyle) : cacheStyle;
|
|
1211
1211
|
}
|
|
1212
1212
|
clearCellStyleCache() {
|
|
1213
1213
|
this.headerStyleCache.clear(), this.bodyStyleCache.clear(), this.bodyBottomStyleCache.clear();
|
|
@@ -1288,6 +1288,8 @@ class BaseTable extends EventTarget_1.EventTarget {
|
|
|
1288
1288
|
borderLineWidth: theme.group.lineWidth,
|
|
1289
1289
|
borderLineDash: theme.group.lineDash,
|
|
1290
1290
|
underline: !!theme.text.underline,
|
|
1291
|
+
underlineDash: theme.text.underlineDash,
|
|
1292
|
+
underlineOffset: theme.text.underlineOffset,
|
|
1291
1293
|
lineThrough: !!theme.text.lineThrough,
|
|
1292
1294
|
padding: theme._vtable.padding,
|
|
1293
1295
|
underlineWidth: theme.text.underline,
|
|
@@ -1378,7 +1380,7 @@ class BaseTable extends EventTarget_1.EventTarget {
|
|
|
1378
1380
|
} else copyValue += "\t";
|
|
1379
1381
|
}
|
|
1380
1382
|
}
|
|
1381
|
-
r < maxRow && (copyValue += "\n");
|
|
1383
|
+
r < maxRow && (copyValue += "\r\n");
|
|
1382
1384
|
}
|
|
1383
1385
|
}
|
|
1384
1386
|
return copyValue;
|
|
@@ -1553,6 +1555,12 @@ class BaseTable extends EventTarget_1.EventTarget {
|
|
|
1553
1555
|
e.query ? activeChartInstance.on(key, e.query, e.callback) : activeChartInstance.on(key, e.callback);
|
|
1554
1556
|
}));
|
|
1555
1557
|
}
|
|
1558
|
+
registerCustomCellStyle(customStyleId, customStyle) {
|
|
1559
|
+
this.customCellStylePlugin.registerCustomCellStyle(customStyleId, customStyle);
|
|
1560
|
+
}
|
|
1561
|
+
arrangeCustomCellStyle(cellPos, customStyleId) {
|
|
1562
|
+
this.customCellStylePlugin.arrangeCustomCellStyle(cellPos, customStyleId);
|
|
1563
|
+
}
|
|
1556
1564
|
}
|
|
1557
1565
|
|
|
1558
1566
|
exports.BaseTable = BaseTable;
|