@visactor/vtable 1.22.4-alpha.5 → 1.22.5-alpha.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/components/axis/axis.d.ts +5 -3
- package/cjs/components/axis/axis.js +20 -14
- package/cjs/components/axis/axis.js.map +1 -1
- package/cjs/components/axis/get-axis-attributes.d.ts +1 -0
- package/cjs/components/axis/get-axis-attributes.js +2 -1
- package/cjs/components/axis/get-axis-attributes.js.map +1 -1
- package/cjs/components/axis/get-axis-component-size.js +11 -5
- package/cjs/components/axis/get-axis-component-size.js.map +1 -1
- package/cjs/core/BaseTable.d.ts +2 -2
- package/cjs/core/BaseTable.js +5 -5
- package/cjs/core/BaseTable.js.map +1 -1
- package/cjs/dataset/dataset-pivot-table.js +1 -2
- package/cjs/edit/edit-manager.js +1 -0
- package/cjs/edit/edit-manager.js.map +1 -1
- package/cjs/edit/editors.js +2 -1
- package/cjs/index.d.ts +1 -1
- package/cjs/index.js +1 -1
- package/cjs/index.js.map +1 -1
- package/cjs/layout/chart-helper/get-axis-config.js +19 -16
- package/cjs/layout/chart-helper/get-axis-config.js.map +1 -1
- package/cjs/layout/pivot-header-layout.d.ts +1 -0
- package/cjs/layout/pivot-header-layout.js +39 -31
- package/cjs/layout/pivot-header-layout.js.map +1 -1
- package/cjs/scenegraph/component/menu.d.ts +41 -0
- package/cjs/scenegraph/graphic/active-cell-chart-list.d.ts +13 -0
- package/cjs/scenegraph/graphic/active-cell-chart-list.js +118 -0
- package/cjs/scenegraph/graphic/active-cell-chart-list.js.map +1 -0
- package/cjs/scenegraph/graphic/chart.d.ts +6 -2
- package/cjs/scenegraph/graphic/chart.js +49 -14
- package/cjs/scenegraph/graphic/chart.js.map +1 -1
- package/cjs/scenegraph/graphic/contributions/chart-render.js +2 -2
- package/cjs/scenegraph/graphic/contributions/chart-render.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-helper.js +1 -1
- package/cjs/scenegraph/group-creater/cell-helper.js.map +1 -1
- package/cjs/scenegraph/layout/update-width.js +1 -1
- package/cjs/scenegraph/layout/update-width.js.map +1 -1
- package/cjs/scenegraph/refresh-node/update-chart.js +1 -1
- package/cjs/scenegraph/refresh-node/update-chart.js.map +1 -1
- package/cjs/scenegraph/scenegraph.js +9 -2
- package/cjs/scenegraph/scenegraph.js.map +1 -1
- package/cjs/scenegraph/utils/text-measure.d.ts +38 -0
- package/cjs/state/state.js +1 -1
- package/cjs/state/state.js.map +1 -1
- package/cjs/themes/theme-define.js +16 -16
- package/cjs/themes/theme-define.js.map +1 -1
- package/cjs/ts-types/base-table.d.ts +2 -2
- package/cjs/ts-types/base-table.js.map +1 -1
- package/cjs/ts-types/table-engine.d.ts +12 -0
- package/cjs/ts-types/table-engine.js.map +1 -1
- package/cjs/ts-types/theme.d.ts +12 -4
- package/cjs/ts-types/theme.js.map +1 -1
- package/cjs/vrender.js.map +1 -1
- package/dist/vtable.js +635 -117
- package/dist/vtable.min.js +2 -2
- package/es/components/axis/axis.d.ts +5 -3
- package/es/components/axis/axis.js +19 -12
- package/es/components/axis/axis.js.map +1 -1
- package/es/components/axis/get-axis-attributes.d.ts +1 -0
- package/es/components/axis/get-axis-attributes.js +2 -1
- package/es/components/axis/get-axis-attributes.js.map +1 -1
- package/es/components/axis/get-axis-component-size.js +12 -4
- package/es/components/axis/get-axis-component-size.js.map +1 -1
- package/es/core/BaseTable.d.ts +2 -2
- package/es/core/BaseTable.js +5 -5
- package/es/core/BaseTable.js.map +1 -1
- package/es/dataset/dataset-pivot-table.js +1 -2
- package/es/edit/edit-manager.js +1 -0
- package/es/edit/edit-manager.js.map +1 -1
- package/es/edit/editors.js +2 -1
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/index.js.map +1 -1
- package/es/layout/chart-helper/get-axis-config.js +19 -16
- package/es/layout/chart-helper/get-axis-config.js.map +1 -1
- package/es/layout/pivot-header-layout.d.ts +1 -0
- package/es/layout/pivot-header-layout.js +36 -26
- package/es/layout/pivot-header-layout.js.map +1 -1
- package/es/scenegraph/component/menu.d.ts +41 -0
- package/es/scenegraph/graphic/active-cell-chart-list.d.ts +13 -0
- package/es/scenegraph/graphic/active-cell-chart-list.js +107 -0
- package/es/scenegraph/graphic/active-cell-chart-list.js.map +1 -0
- package/es/scenegraph/graphic/chart.d.ts +6 -2
- package/es/scenegraph/graphic/chart.js +49 -13
- package/es/scenegraph/graphic/chart.js.map +1 -1
- package/es/scenegraph/graphic/contributions/chart-render.js +2 -2
- package/es/scenegraph/graphic/contributions/chart-render.js.map +1 -1
- package/es/scenegraph/group-creater/cell-helper.js +1 -1
- package/es/scenegraph/group-creater/cell-helper.js.map +1 -1
- package/es/scenegraph/layout/update-width.js +1 -1
- package/es/scenegraph/layout/update-width.js.map +1 -1
- package/es/scenegraph/refresh-node/update-chart.js +1 -1
- package/es/scenegraph/refresh-node/update-chart.js.map +1 -1
- package/es/scenegraph/scenegraph.js +9 -2
- package/es/scenegraph/scenegraph.js.map +1 -1
- package/es/scenegraph/utils/text-measure.d.ts +38 -0
- package/es/state/state.js +1 -1
- package/es/state/state.js.map +1 -1
- package/es/themes/theme-define.js +12 -12
- package/es/themes/theme-define.js.map +1 -1
- package/es/ts-types/base-table.d.ts +2 -2
- package/es/ts-types/base-table.js.map +1 -1
- package/es/ts-types/table-engine.d.ts +12 -0
- package/es/ts-types/table-engine.js.map +1 -1
- package/es/ts-types/theme.d.ts +12 -4
- package/es/ts-types/theme.js.map +1 -1
- package/es/vrender.js.map +1 -1
- package/package.json +9 -9
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { ITextGraphicAttribute, TextOptionsType } from './../../vrender';
|
|
2
|
+
import { DefaultTextMeasureContribution, ContainerModule } from './../../vrender';
|
|
3
|
+
import type { ITextMeasureOption, ITextSize } from '@visactor/vutils';
|
|
4
|
+
import { TextMeasure } from '@visactor/vutils';
|
|
5
|
+
type ITextGraphicAttributeFroMeasure = Omit<ITextGraphicAttribute, 'lineHeight'> & {
|
|
6
|
+
lineHeight?: number;
|
|
7
|
+
};
|
|
8
|
+
declare const textMeasureModule: ContainerModule;
|
|
9
|
+
export default textMeasureModule;
|
|
10
|
+
export declare const initTextMeasure: (textSpec?: ITextGraphicAttributeFroMeasure, option?: Partial<ITextMeasureOption>, useNaiveCanvas?: boolean) => TextMeasure<ITextGraphicAttributeFroMeasure>;
|
|
11
|
+
export declare class FastTextMeasureContribution extends DefaultTextMeasureContribution {
|
|
12
|
+
_fastMeasure(text: string, options: TextOptionsType): ITextSize;
|
|
13
|
+
measureTextWidth(text: string, options: TextOptionsType): number;
|
|
14
|
+
measureText(text: string, options: TextOptionsType): TextMetrics | {
|
|
15
|
+
width: number;
|
|
16
|
+
};
|
|
17
|
+
protected _measureTextWithoutAlignBaseline(text: string, options: TextOptionsType, compatible?: boolean): {
|
|
18
|
+
width: number;
|
|
19
|
+
} | TextMetrics;
|
|
20
|
+
protected _measureTextWithAlignBaseline(text: string, options: TextOptionsType, compatible?: boolean): ITextSize;
|
|
21
|
+
}
|
|
22
|
+
export declare class TextMeasureTool {
|
|
23
|
+
measureText(text: string, options: ITextGraphicAttribute): ITextSize;
|
|
24
|
+
measureTextWidth(text: string, options: ITextGraphicAttribute): number;
|
|
25
|
+
clipText(text: string, options: ITextGraphicAttribute, width: number): {
|
|
26
|
+
str: string;
|
|
27
|
+
width: number;
|
|
28
|
+
};
|
|
29
|
+
private _clipText;
|
|
30
|
+
clipTextWithSuffix(text: string, options: ITextGraphicAttribute, width: number, suffix: string): {
|
|
31
|
+
str: string;
|
|
32
|
+
width: number;
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
export declare const textMeasure: TextMeasureTool;
|
|
36
|
+
export declare function setCustomAlphabetCharSet(str: string): void;
|
|
37
|
+
export declare function restoreMeasureText(): void;
|
|
38
|
+
export declare function measureTextBounds(attribute: ITextGraphicAttribute): import("@visactor/vchart").IBounds;
|
package/cjs/state/state.js
CHANGED
|
@@ -358,7 +358,7 @@ class StateManager {
|
|
|
358
358
|
}
|
|
359
359
|
checkFrozen() {
|
|
360
360
|
var _a, _b;
|
|
361
|
-
let originalFrozenColCount =
|
|
361
|
+
let originalFrozenColCount = null !== (_a = this.table.options.frozenColCount) && void 0 !== _a ? _a : this.table.isPivotTable() || this.table.isListTable() && this.table.internalProps.transpose ? (null !== (_b = this.table.rowHeaderLevelCount) && void 0 !== _b ? _b : 0) + this.table.internalProps.layoutMap.leftRowSeriesNumberColumnCount : 0;
|
|
362
362
|
if (originalFrozenColCount) {
|
|
363
363
|
originalFrozenColCount = Math.min(originalFrozenColCount, this.table.colCount);
|
|
364
364
|
const container = this.table.getContainer();
|