@visactor/vtable 1.5.3-alpha.1 → 1.5.3
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 +1 -2
- package/cjs/ListTable.js +194 -26
- package/cjs/ListTable.js.map +1 -1
- package/cjs/PivotTable.d.ts +1 -1
- package/cjs/PivotTable.js +3 -3
- package/cjs/PivotTable.js.map +1 -1
- package/cjs/core/BaseTable.d.ts +3 -5
- package/cjs/core/BaseTable.js +79 -8
- package/cjs/core/BaseTable.js.map +1 -1
- package/cjs/core/tableHelper.d.ts +2 -0
- package/cjs/core/tableHelper.js +18 -9
- package/cjs/core/tableHelper.js.map +1 -1
- package/cjs/data/CachedDataSource.d.ts +1 -10
- package/cjs/data/CachedDataSource.js +3 -78
- package/cjs/data/CachedDataSource.js.map +1 -1
- package/cjs/dataset/statistics-helper.js +1 -0
- package/cjs/edit/edit-manager.d.ts +1 -1
- package/cjs/edit/edit-manager.js +4 -5
- package/cjs/edit/edit-manager.js.map +1 -1
- package/cjs/event/listener/container-dom.js +6 -5
- package/cjs/event/listener/container-dom.js.map +1 -1
- package/cjs/event/listener/table-group.js.map +1 -1
- package/cjs/event/scroll.js +6 -4
- package/cjs/event/scroll.js.map +1 -1
- package/cjs/index.d.ts +1 -1
- package/cjs/index.js +1 -1
- package/cjs/index.js.map +1 -1
- package/cjs/layout/layout-helper.js +2 -2
- package/cjs/layout/layout-helper.js.map +1 -1
- package/cjs/layout/row-height-map.js +0 -1
- package/cjs/layout/simple-header-layout.d.ts +2 -1
- package/cjs/layout/simple-header-layout.js +88 -2
- package/cjs/layout/simple-header-layout.js.map +1 -1
- package/cjs/plugins/icons.js +1 -1
- package/cjs/plugins/themes.js +1 -1
- package/cjs/scenegraph/group-creater/cell-helper.js +6 -11
- package/cjs/scenegraph/group-creater/cell-helper.js.map +1 -1
- package/cjs/scenegraph/group-creater/column-helper.js +2 -7
- package/cjs/scenegraph/group-creater/column-helper.js.map +1 -1
- package/cjs/scenegraph/scenegraph.js +1 -1
- package/cjs/scenegraph/utils/get-cell-merge.js +1 -1
- package/cjs/scenegraph/utils/get-cell-merge.js.map +1 -1
- package/cjs/scenegraph/utils/get-hierarchy-offset.js +8 -6
- package/cjs/scenegraph/utils/get-hierarchy-offset.js.map +1 -1
- package/cjs/state/select/is-cell-select-highlight.d.ts +1 -0
- package/cjs/state/select/is-cell-select-highlight.js +8 -2
- package/cjs/state/select/is-cell-select-highlight.js.map +1 -1
- package/cjs/themes/theme.d.ts +0 -2
- package/cjs/themes/theme.js +4 -12
- package/cjs/themes/theme.js.map +1 -1
- package/cjs/tools/helper.js.map +1 -1
- package/cjs/ts-types/base-table.d.ts +0 -9
- package/cjs/ts-types/base-table.js.map +1 -1
- package/cjs/ts-types/new-data-set.d.ts +0 -1
- package/cjs/ts-types/new-data-set.js.map +1 -1
- package/cjs/ts-types/table-engine.d.ts +1 -9
- package/cjs/ts-types/table-engine.js.map +1 -1
- package/cjs/ts-types/theme.d.ts +0 -1
- package/cjs/ts-types/theme.js.map +1 -1
- package/cjs/vrender.js.map +1 -1
- package/dist/vtable.js +2901 -3149
- package/dist/vtable.min.js +2 -2
- package/es/ListTable.d.ts +1 -2
- package/es/ListTable.js +192 -30
- package/es/ListTable.js.map +1 -1
- package/es/PivotTable.d.ts +1 -1
- package/es/PivotTable.js +3 -3
- package/es/PivotTable.js.map +1 -1
- package/es/core/BaseTable.d.ts +3 -5
- package/es/core/BaseTable.js +83 -11
- package/es/core/BaseTable.js.map +1 -1
- package/es/core/tableHelper.d.ts +2 -0
- package/es/core/tableHelper.js +16 -6
- package/es/core/tableHelper.js.map +1 -1
- package/es/data/CachedDataSource.d.ts +1 -10
- package/es/data/CachedDataSource.js +0 -79
- package/es/data/CachedDataSource.js.map +1 -1
- package/es/dataset/statistics-helper.js +2 -1
- package/es/edit/edit-manager.d.ts +1 -1
- package/es/edit/edit-manager.js +5 -4
- package/es/edit/edit-manager.js.map +1 -1
- package/es/event/listener/container-dom.js +7 -4
- package/es/event/listener/container-dom.js.map +1 -1
- package/es/event/listener/table-group.js.map +1 -1
- package/es/event/scroll.js +6 -4
- package/es/event/scroll.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/layout-helper.js +2 -2
- package/es/layout/layout-helper.js.map +1 -1
- package/es/layout/row-height-map.js +1 -2
- package/es/layout/simple-header-layout.d.ts +2 -1
- package/es/layout/simple-header-layout.js +87 -3
- package/es/layout/simple-header-layout.js.map +1 -1
- package/es/plugins/icons.js +1 -1
- package/es/plugins/themes.js +1 -1
- package/es/scenegraph/group-creater/cell-helper.js +6 -11
- package/es/scenegraph/group-creater/cell-helper.js.map +1 -1
- package/es/scenegraph/group-creater/column-helper.js +2 -7
- package/es/scenegraph/group-creater/column-helper.js.map +1 -1
- package/es/scenegraph/scenegraph.js +1 -1
- package/es/scenegraph/utils/get-cell-merge.js +1 -1
- package/es/scenegraph/utils/get-cell-merge.js.map +1 -1
- package/es/scenegraph/utils/get-hierarchy-offset.js +9 -7
- package/es/scenegraph/utils/get-hierarchy-offset.js.map +1 -1
- package/es/state/select/is-cell-select-highlight.d.ts +1 -0
- package/es/state/select/is-cell-select-highlight.js +5 -0
- package/es/state/select/is-cell-select-highlight.js.map +1 -1
- package/es/themes/theme.d.ts +0 -2
- package/es/themes/theme.js +4 -11
- package/es/themes/theme.js.map +1 -1
- package/es/tools/helper.js.map +1 -1
- package/es/ts-types/base-table.d.ts +0 -9
- package/es/ts-types/base-table.js.map +1 -1
- package/es/ts-types/new-data-set.d.ts +0 -1
- package/es/ts-types/new-data-set.js.map +1 -1
- package/es/ts-types/table-engine.d.ts +1 -9
- package/es/ts-types/table-engine.js.map +1 -1
- package/es/ts-types/theme.d.ts +0 -1
- package/es/ts-types/theme.js.map +1 -1
- package/es/vrender.js.map +1 -1
- package/package.json +5 -5
- package/cjs/core/group-helper.d.ts +0 -6
- package/cjs/core/group-helper.js +0 -22
- package/cjs/core/group-helper.js.map +0 -1
- package/cjs/core/record-helper.d.ts +0 -6
- package/cjs/core/record-helper.js +0 -230
- package/cjs/core/record-helper.js.map +0 -1
- package/cjs/core/style-helper.d.ts +0 -3
- package/cjs/core/style-helper.js +0 -110
- package/cjs/core/style-helper.js.map +0 -1
- package/cjs/layout/cell-range/simple-cell-range.d.ts +0 -4
- package/cjs/layout/cell-range/simple-cell-range.js +0 -106
- package/cjs/layout/cell-range/simple-cell-range.js.map +0 -1
- package/es/core/group-helper.d.ts +0 -6
- package/es/core/group-helper.js +0 -14
- package/es/core/group-helper.js.map +0 -1
- package/es/core/record-helper.d.ts +0 -6
- package/es/core/record-helper.js +0 -220
- package/es/core/record-helper.js.map +0 -1
- package/es/core/style-helper.d.ts +0 -3
- package/es/core/style-helper.js +0 -86
- package/es/core/style-helper.js.map +0 -1
- package/es/layout/cell-range/simple-cell-range.d.ts +0 -4
- package/es/layout/cell-range/simple-cell-range.js +0 -99
- package/es/layout/cell-range/simple-cell-range.js.map +0 -1
package/cjs/core/BaseTable.d.ts
CHANGED
|
@@ -52,10 +52,9 @@ export declare abstract class BaseTable extends EventTarget implements BaseTable
|
|
|
52
52
|
version: string;
|
|
53
53
|
pagination?: IPagination | undefined;
|
|
54
54
|
id: string;
|
|
55
|
-
headerStyleCache:
|
|
56
|
-
bodyStyleCache:
|
|
57
|
-
|
|
58
|
-
bodyBottomStyleCache: Map<string, any>;
|
|
55
|
+
headerStyleCache: any;
|
|
56
|
+
bodyStyleCache: any;
|
|
57
|
+
bodyBottomStyleCache: any;
|
|
59
58
|
container: HTMLElement;
|
|
60
59
|
isReleased: boolean;
|
|
61
60
|
_chartEventMap: Record<string, {
|
|
@@ -405,5 +404,4 @@ export declare abstract class BaseTable extends EventTarget implements BaseTable
|
|
|
405
404
|
hideMoverLine(col: number, row: number): void;
|
|
406
405
|
disableScroll(): void;
|
|
407
406
|
enableScroll(): void;
|
|
408
|
-
getGroupTitleLevel(col: number, row: number): number | undefined;
|
|
409
407
|
}
|
package/cjs/core/BaseTable.js
CHANGED
|
@@ -33,17 +33,19 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
33
33
|
value: !0
|
|
34
34
|
}), exports.BaseTable = void 0;
|
|
35
35
|
|
|
36
|
-
const columnStyleContents = __importStar(require("../body-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"), 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"), FouseInput_1 = require("./FouseInput"), pixel_ratio_1 = require("../tools/pixel-ratio"), chart_render_helper_1 = require("../scenegraph/graphic/contributions/chart-render-helper"), row_height_map_1 = require("../layout/row-height-map"), row_series_number_helper_1 = require("./row-series-number-helper"), custom_cell_style_1 = require("../plugins/custom-cell-style"), update_select_border_1 = require("../scenegraph/select/update-select-border"), react_custom_layout_1 = require("../components/react/react-custom-layout"), layout_helper_1 = require("../layout/layout-helper"), factory_1 = require("./factory"), get_cell_position_1 = require("./utils/get-cell-position"),
|
|
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"), 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"), FouseInput_1 = require("./FouseInput"), pixel_ratio_1 = require("../tools/pixel-ratio"), 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"), row_series_number_helper_1 = require("./row-series-number-helper"), custom_cell_style_1 = require("../plugins/custom-cell-style"), update_select_border_1 = require("../scenegraph/select/update-select-border"), react_custom_layout_1 = require("../components/react/react-custom-layout"), layout_helper_1 = require("../layout/layout-helper"), factory_1 = require("./factory"), get_cell_position_1 = require("./utils/get-cell-position"), {toBoxArray: toBoxArray} = helper_1.style, {isTouchEvent: isTouchEvent} = helper_1.event, rangeReg = /^\$(\d+)\$(\d+)$/;
|
|
37
37
|
|
|
38
38
|
(0, style_1.importStyle)();
|
|
39
39
|
|
|
40
|
+
const EMPTY_STYLE = {};
|
|
41
|
+
|
|
40
42
|
class BaseTable extends EventTarget_1.EventTarget {
|
|
41
43
|
static get EVENT_TYPE() {
|
|
42
44
|
return TABLE_EVENT_TYPE_1.TABLE_EVENT_TYPE;
|
|
43
45
|
}
|
|
44
46
|
constructor(container, options = {}) {
|
|
45
47
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
46
|
-
if (super(), this.showFrozenIcon = !0, this.version = "1.5.3
|
|
48
|
+
if (super(), this.showFrozenIcon = !0, this.version = "1.5.3", this.id = `VTable${Date.now()}`,
|
|
47
49
|
this.isReleased = !1, this._chartEventMap = {}, this.throttleInvalidate = (0, util_1.throttle2)(this.render.bind(this), 200),
|
|
48
50
|
!container && "node" !== options.mode) throw new Error("vtable's container is undefined");
|
|
49
51
|
const {frozenColCount: frozenColCount = 0, frozenRowCount: frozenRowCount, defaultRowHeight: defaultRowHeight = 40, defaultHeaderRowHeight: defaultHeaderRowHeight, defaultColWidth: defaultColWidth = 80, defaultHeaderColWidth: defaultHeaderColWidth, widthMode: widthMode = "standard", heightMode: heightMode = "standard", autoFillWidth: autoFillWidth = !1, autoFillHeight: autoFillHeight = !1, widthAdaptiveMode: widthAdaptiveMode = "only-body", heightAdaptiveMode: heightAdaptiveMode = "only-body", keyboardOptions: keyboardOptions, eventOptions: eventOptions, rowSeriesNumber: rowSeriesNumber, columnResizeMode: columnResizeMode, rowResizeMode: rowResizeMode = "none", 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, limitMinHeight: limitMinHeight, clearDOM: clearDOM = !0} = options;
|
|
@@ -132,8 +134,8 @@ class BaseTable extends EventTarget_1.EventTarget {
|
|
|
132
134
|
const MenuHandler = factory_1.Factory.getComponent("menuHandler");
|
|
133
135
|
internalProps.menuHandler = new MenuHandler(this);
|
|
134
136
|
}
|
|
135
|
-
this.headerStyleCache = new Map, this.bodyStyleCache = new Map, this.
|
|
136
|
-
|
|
137
|
+
this.headerStyleCache = new Map, this.bodyStyleCache = new Map, this.bodyBottomStyleCache = new Map,
|
|
138
|
+
internalProps.stick = {
|
|
137
139
|
changedCells: new Map
|
|
138
140
|
}, internalProps.customMergeCell = options.customMergeCell, this.customCellStylePlugin = new custom_cell_style_1.CustomCellStylePlugin(this, null !== (_k = options.customCellStyle) && void 0 !== _k ? _k : [], null !== (_l = options.customCellStyleArrangement) && void 0 !== _l ? _l : []);
|
|
139
141
|
}
|
|
@@ -1173,11 +1175,81 @@ class BaseTable extends EventTarget_1.EventTarget {
|
|
|
1173
1175
|
return null === (_a = this.internalProps.dataSource) || void 0 === _a ? void 0 : _a.hasField(index, field);
|
|
1174
1176
|
}
|
|
1175
1177
|
_getCellStyle(col, row) {
|
|
1176
|
-
|
|
1178
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
1179
|
+
const customCellStyle = this.customCellStylePlugin.getCustomCellStyle(col, row), {layoutMap: layoutMap} = this.internalProps;
|
|
1180
|
+
if (layoutMap.isHeader(col, row)) {
|
|
1181
|
+
let cacheKey;
|
|
1182
|
+
if (!this.isPivotTable() || this.isBottomFrozenRow(row) || this.isRightFrozenColumn(col)) cacheKey = `${col}-${row}`; else {
|
|
1183
|
+
const define = this.getHeaderDefine(col, row), isCorner = this.isCornerHeader(col, row);
|
|
1184
|
+
cacheKey = (null == define ? void 0 : define.dimensionKey) ? isCorner ? `dim-cor-${define.dimensionKey}` : `dim-${define.dimensionKey}` : (null == define ? void 0 : define.indicatorKey) ? `ind-${define.indicatorKey}` : `${col}-${row}`;
|
|
1185
|
+
}
|
|
1186
|
+
let cacheStyle = this.headerStyleCache.get(cacheKey);
|
|
1187
|
+
if (cacheStyle) return customCellStyle ? (0, custom_cell_style_1.mergeStyle)(cacheStyle, customCellStyle) : cacheStyle;
|
|
1188
|
+
const hd = layoutMap.getHeader(col, row);
|
|
1189
|
+
let paddingForAxis;
|
|
1190
|
+
if (this.isPivotChart() && (0, get_axis_config_1.isTopOrBottomAxis)(col, row, layoutMap) && layoutMap.isAxisCell(col, row)) {
|
|
1191
|
+
paddingForAxis = null !== (_b = null === (_a = layoutMap.getBody(col, this.rowHeaderLevelCount).style) || void 0 === _a ? void 0 : _a.padding) && void 0 !== _b ? _b : this.theme.bodyStyle.padding;
|
|
1192
|
+
} else if (this.isPivotChart() && (0, get_axis_config_1.isLeftOrRightAxis)(col, row, layoutMap) && layoutMap.isAxisCell(col, row)) {
|
|
1193
|
+
paddingForAxis = null !== (_d = null === (_c = layoutMap.getBody(this.columnHeaderLevelCount, row).style) || void 0 === _c ? void 0 : _c.padding) && void 0 !== _d ? _d : this.theme.bodyStyle.padding;
|
|
1194
|
+
}
|
|
1195
|
+
if ((!hd || hd.isEmpty) && (layoutMap.isLeftBottomCorner(col, row) || layoutMap.isRightBottomCorner(col, row) || layoutMap.isCornerHeader(col, row) || layoutMap.isRightTopCorner(col, row))) return EMPTY_STYLE;
|
|
1196
|
+
const styleClass = this.internalProps.headerHelper.getStyleClass((null == hd ? void 0 : hd.headerType) || "text");
|
|
1197
|
+
if (layoutMap.isBottomFrozenRow(col, row) && this.theme.bottomFrozenStyle) cacheStyle = headerStyleContents.of(paddingForAxis ? {
|
|
1198
|
+
padding: paddingForAxis
|
|
1199
|
+
} : {}, this.theme.bottomFrozenStyle, {
|
|
1200
|
+
col: col,
|
|
1201
|
+
row: row,
|
|
1202
|
+
table: this,
|
|
1203
|
+
value: this.getCellValue(col, row),
|
|
1204
|
+
dataValue: this.getCellOriginValue(col, row),
|
|
1205
|
+
cellHeaderPaths: this.getCellHeaderPaths(col, row)
|
|
1206
|
+
}, styleClass, this.options.autoWrapText, this.theme); else if (layoutMap.isRightFrozenColumn(col, row) && this.theme.rightFrozenStyle) cacheStyle = headerStyleContents.of(paddingForAxis ? {
|
|
1207
|
+
padding: paddingForAxis
|
|
1208
|
+
} : {}, this.theme.rightFrozenStyle, {
|
|
1209
|
+
col: col,
|
|
1210
|
+
row: row,
|
|
1211
|
+
table: this,
|
|
1212
|
+
value: this.getCellValue(col, row),
|
|
1213
|
+
dataValue: this.getCellOriginValue(col, row),
|
|
1214
|
+
cellHeaderPaths: this.getCellHeaderPaths(col, row)
|
|
1215
|
+
}, styleClass, this.options.autoWrapText, this.theme); else {
|
|
1216
|
+
const style = (null == hd ? void 0 : hd.style) || {};
|
|
1217
|
+
paddingForAxis && (style.padding = paddingForAxis), cacheStyle = headerStyleContents.of(style, layoutMap.isColumnHeader(col, row) || layoutMap.isBottomFrozenRow(col, row) ? this.theme.headerStyle : layoutMap.isRowHeader(col, row) || layoutMap.isRightFrozenColumn(col, row) ? this.theme.rowHeaderStyle : this.theme.cornerHeaderStyle, {
|
|
1218
|
+
col: col,
|
|
1219
|
+
row: row,
|
|
1220
|
+
table: this,
|
|
1221
|
+
value: this.getCellValue(col, row),
|
|
1222
|
+
dataValue: this.getCellOriginValue(col, row),
|
|
1223
|
+
cellHeaderPaths: this.getCellHeaderPaths(col, row)
|
|
1224
|
+
}, styleClass, this.options.autoWrapText, this.theme);
|
|
1225
|
+
}
|
|
1226
|
+
return this.headerStyleCache.set(cacheKey, cacheStyle), customCellStyle ? (0, custom_cell_style_1.mergeStyle)(cacheStyle, customCellStyle) : cacheStyle;
|
|
1227
|
+
}
|
|
1228
|
+
let bgColorFunc, cacheKey;
|
|
1229
|
+
(null === (_f = null === (_e = this.internalProps) || void 0 === _e ? void 0 : _e.dataConfig) || void 0 === _f ? void 0 : _f.mappingRules) && !this.isHeader(col, row) && (null === (_j = null === (_h = null === (_g = this.internalProps) || void 0 === _g ? void 0 : _g.dataConfig) || void 0 === _h ? void 0 : _h.mappingRules) || void 0 === _j || _j.forEach(((mappingRule, i) => {
|
|
1230
|
+
mappingRule.bgColor && this.internalProps.layoutMap.getIndicatorKey(col, row) === mappingRule.bgColor.indicatorKey && (bgColorFunc = mappingRule.bgColor.mapping);
|
|
1231
|
+
})));
|
|
1232
|
+
const cellType = this.getCellType(col, row);
|
|
1233
|
+
let cacheStyle;
|
|
1234
|
+
if (cacheKey = this.isSeriesNumberInBody(col, row) ? `${col}-series-` + cellType : this.isListTable() && !this.transpose || this.isPivotTable() && this.internalProps.layoutMap.indicatorsAsCol ? col + cellType : row + cellType,
|
|
1235
|
+
cacheStyle = layoutMap.isBottomFrozenRow(row) ? this.bodyBottomStyleCache.get(cacheKey) : this.bodyStyleCache.get(cacheKey),
|
|
1236
|
+
cacheStyle) return customCellStyle ? (0, custom_cell_style_1.mergeStyle)(cacheStyle, customCellStyle) : cacheStyle;
|
|
1237
|
+
const column = layoutMap.getBody(col, row), styleClass = this.internalProps.bodyHelper.getStyleClass(this.getCellType(col, row)), style = null == column ? void 0 : column.style;
|
|
1238
|
+
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, {
|
|
1239
|
+
col: col,
|
|
1240
|
+
row: row,
|
|
1241
|
+
table: this,
|
|
1242
|
+
value: this.getCellValue(col, row),
|
|
1243
|
+
dataValue: this.getCellOriginValue(col, row),
|
|
1244
|
+
cellHeaderPaths: this.getCellHeaderPaths(col, row)
|
|
1245
|
+
}, styleClass, this.options.autoWrapText, this.theme), bgColorFunc && (cacheStyle = (0,
|
|
1246
|
+
custom_cell_style_1.mergeStyle)(cacheStyle, {
|
|
1247
|
+
bgColor: bgColorFunc
|
|
1248
|
+
})), (0, vutils_1.isFunction)(style) || (layoutMap.isBottomFrozenRow(row) ? this.bodyBottomStyleCache.set(cacheKey, cacheStyle) : this.bodyStyleCache.set(cacheKey, cacheStyle)),
|
|
1249
|
+
customCellStyle ? (0, custom_cell_style_1.mergeStyle)(cacheStyle, customCellStyle) : cacheStyle;
|
|
1177
1250
|
}
|
|
1178
1251
|
clearCellStyleCache() {
|
|
1179
|
-
this.headerStyleCache.clear(), this.bodyStyleCache.clear(), this.
|
|
1180
|
-
this.bodyBottomStyleCache.clear();
|
|
1252
|
+
this.headerStyleCache.clear(), this.bodyStyleCache.clear(), this.bodyBottomStyleCache.clear();
|
|
1181
1253
|
}
|
|
1182
1254
|
clearRowHeightCache() {
|
|
1183
1255
|
this.internalProps._rowHeightsMap.clear(), this._clearRowRangeHeightsMap();
|
|
@@ -1683,7 +1755,6 @@ class BaseTable extends EventTarget_1.EventTarget {
|
|
|
1683
1755
|
enableScroll() {
|
|
1684
1756
|
this.eventManager.enableScroll();
|
|
1685
1757
|
}
|
|
1686
|
-
getGroupTitleLevel(col, row) {}
|
|
1687
1758
|
}
|
|
1688
1759
|
|
|
1689
1760
|
exports.BaseTable = BaseTable;
|