@visactor/vtable 1.18.7 → 1.19.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 +3 -1
- package/cjs/ListTable.js +4 -4
- package/cjs/ListTable.js.map +1 -1
- package/cjs/body-helper/style/ButtonStyle.d.ts +1 -1
- package/cjs/body-helper/style/ButtonStyle.js +2 -2
- package/cjs/body-helper/style/ButtonStyle.js.map +1 -1
- package/cjs/body-helper/style/SwitchStyle.d.ts +1 -1
- package/cjs/body-helper/style/SwitchStyle.js +2 -2
- package/cjs/body-helper/style/SwitchStyle.js.map +1 -1
- package/cjs/core/BaseTable.d.ts +12 -0
- package/cjs/core/BaseTable.js +68 -32
- package/cjs/core/BaseTable.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/scenegraph/component/custom.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/group-creater/progress/create-group-for-first-screen.js +4 -4
- package/cjs/scenegraph/group-creater/progress/create-group-for-first-screen.js.map +1 -1
- package/cjs/scenegraph/scenegraph.js +22 -17
- package/cjs/scenegraph/scenegraph.js.map +1 -1
- package/cjs/ts-types/base-table.d.ts +9 -0
- package/cjs/ts-types/base-table.js.map +1 -1
- package/cjs/vrender.d.ts +3 -3
- package/cjs/vrender.js +4 -21
- package/cjs/vrender.js.map +1 -1
- package/dist/vtable.js +4327 -3558
- package/dist/vtable.min.js +2 -2
- package/es/ListTable.d.ts +3 -1
- package/es/ListTable.js +2 -1
- package/es/ListTable.js.map +1 -1
- package/es/body-helper/style/ButtonStyle.d.ts +1 -1
- package/es/body-helper/style/ButtonStyle.js +1 -1
- package/es/body-helper/style/ButtonStyle.js.map +1 -1
- package/es/body-helper/style/SwitchStyle.d.ts +1 -1
- package/es/body-helper/style/SwitchStyle.js +1 -1
- package/es/body-helper/style/SwitchStyle.js.map +1 -1
- package/es/core/BaseTable.d.ts +12 -0
- package/es/core/BaseTable.js +68 -32
- package/es/core/BaseTable.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/scenegraph/component/custom.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/group-creater/progress/create-group-for-first-screen.js +4 -4
- package/es/scenegraph/group-creater/progress/create-group-for-first-screen.js.map +1 -1
- package/es/scenegraph/scenegraph.js +22 -17
- package/es/scenegraph/scenegraph.js.map +1 -1
- package/es/ts-types/base-table.d.ts +9 -0
- package/es/ts-types/base-table.js.map +1 -1
- package/es/vrender.d.ts +3 -3
- package/es/vrender.js +2 -4
- package/es/vrender.js.map +1 -1
- package/package.json +7 -6
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/body-helper/style/ButtonStyle.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,
|
|
1
|
+
{"version":3,"sources":["../src/body-helper/style/ButtonStyle.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAGhC,IAAI,YAAyB,CAAC;AAE9B,MAAM,OAAO,WAAY,SAAQ,KAAK;IAcpC,MAAM,KAAK,OAAO;QAChB,OAAO,YAAY,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,YAAY,GAAG,IAAI,WAAW,EAAE,CAAC,CAAC;IAC1E,CAAC;IAED,YACE,QAA2B,EAAE,EAC7B,cAAiC,EAAE,EACnC,mBAA2C,EAAE;;QAE7C,KAAK,CAAC,KAAK,EAAE,WAAW,CAAC,CAAC;QAE1B,IAAI,CAAC,YAAY,GAAG,CAAC,MAAA,MAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,WAAW,0CAAE,WAA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D,IAAI,0BAA0B,CAAC,0BAAkC;QAC/D,IAAI,CAAC,2BAA2B,GAAG,0BAA0B,CAAC;IAChE,CAAC;IAED,IAAI,aAAa;QACf,OAAO,IAAI,CAAC,cAAc,CAAC;IAC7B,CAAC;IACD,IAAI,aAAa,CAAC,aAAqB;QACrC,IAAI,CAAC,cAAc,GAAG,aAAa,CAAC;IACtC,CAAC;IAED,QAAQ,CAAC,KAAmB;QAC1B,OAAO,IAAI,WAAW,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;IACtC,CAAC;IAED,KAAK;QACH,OAAO,IAAI,WAAW,CAAC,IAAI,CAAC,CAAC;IAC/B,CAAC;CACF","file":"ButtonStyle.js","sourcesContent":["import type { IStyleOption, ButtonStyleOption } from '../../ts-types';\nimport { Style } from './Style';\nimport type { ButtonStyle as ButtonStyleThemeOption } from '../../ts-types/column/style';\n\nlet defaultStyle: ButtonStyle;\n\nexport class ButtonStyle extends Style {\n private _buttonColor: string;\n private _buttonBorderColor: string;\n private _buttonLineWidth: number;\n private _buttonBorderRadius: number;\n private _buttonHoverColor: string;\n private _buttonHoverBorderColor: string;\n private _buttonTextHoverColor: string;\n private _buttonDisableColor: string;\n private _buttonDisableBorderColor: string;\n private _buttonTextDisableColor: string;\n private _buttonTextHoverBorderColor: string;\n private _buttonPadding: number;\n\n static get DEFAULT(): ButtonStyle {\n return defaultStyle ? defaultStyle : (defaultStyle = new ButtonStyle());\n }\n\n constructor(\n style: ButtonStyleOption = {},\n headerStyle: ButtonStyleOption = {},\n buttonThemeStyle: ButtonStyleThemeOption = {}\n ) {\n super(style, headerStyle);\n\n this._buttonColor = (style?.buttonStyle?.buttonColor ?? buttonThemeStyle?.buttonColor) || '#165DFF';\n this._buttonBorderColor =\n (style?.buttonStyle?.buttonBorderColor ?? buttonThemeStyle?.buttonBorderColor) || '#165DFF';\n this._buttonLineWidth = (style?.buttonStyle?.buttonLineWidth ?? buttonThemeStyle?.buttonLineWidth) || 1;\n this._buttonBorderRadius = (style?.buttonStyle?.buttonBorderRadius ?? buttonThemeStyle?.buttonBorderRadius) || 2;\n this._buttonHoverColor = (style?.buttonStyle?.buttonHoverColor ?? buttonThemeStyle?.buttonHoverColor) || '#4080FF';\n this._buttonHoverBorderColor =\n (style?.buttonStyle?.buttonHoverBorderColor ?? buttonThemeStyle?.buttonHoverBorderColor) || '#4080FF';\n this._buttonTextHoverColor = style?.buttonStyle?.buttonTextHoverColor ?? buttonThemeStyle?.buttonTextHoverColor;\n this._buttonDisableColor =\n (style?.buttonStyle?.buttonDisableColor ?? buttonThemeStyle?.buttonDisableColor) || '#94bfff';\n this._buttonDisableBorderColor =\n (style?.buttonStyle?.buttonDisableBorderColor ?? buttonThemeStyle?.buttonDisableBorderColor) || '#94bfff';\n this._buttonTextDisableColor =\n style?.buttonStyle?.buttonTextDisableColor ?? buttonThemeStyle?.buttonTextDisableColor;\n this._buttonPadding = (style?.buttonStyle?.buttonPadding ?? buttonThemeStyle?.buttonPadding) || 10;\n }\n\n get buttonColor(): string {\n return this._buttonColor;\n }\n set buttonColor(buttonColor: string) {\n this._buttonColor = buttonColor;\n }\n\n get buttonBorderColor(): string {\n return this._buttonBorderColor;\n }\n set buttonBorderColor(buttonBorderColor: string) {\n this._buttonBorderColor = buttonBorderColor;\n }\n\n get buttonLineWidth(): number {\n return this._buttonLineWidth;\n }\n set buttonLineWidth(buttonLineWidth: number) {\n this._buttonLineWidth = buttonLineWidth;\n }\n\n get buttonBorderRadius(): number {\n return this._buttonBorderRadius;\n }\n set buttonBorderRadius(buttonBorderRadius: number) {\n this._buttonBorderRadius = buttonBorderRadius;\n }\n\n get buttonHoverColor(): string {\n return this._buttonHoverColor;\n }\n set buttonHoverColor(buttonHoverColor: string) {\n this._buttonHoverColor = buttonHoverColor;\n }\n\n get buttonHoverBorderColor(): string {\n return this._buttonHoverBorderColor;\n }\n set buttonHoverBorderColor(buttonHoverBorderColor: string) {\n this._buttonHoverBorderColor = buttonHoverBorderColor;\n }\n\n get buttonTextHoverColor(): string {\n return this._buttonTextHoverColor;\n }\n set buttonTextHoverColor(buttonTextHoverColor: string) {\n this._buttonTextHoverColor = buttonTextHoverColor;\n }\n\n get buttonDisableColor(): string {\n return this._buttonDisableColor;\n }\n set buttonDisableColor(buttonDisableColor: string) {\n this._buttonDisableColor = buttonDisableColor;\n }\n\n get buttonDisableBorderColor(): string {\n return this._buttonDisableBorderColor;\n }\n set buttonDisableBorderColor(buttonDisableBorderColor: string) {\n this._buttonDisableBorderColor = buttonDisableBorderColor;\n }\n\n get buttonTextDisableColor(): string {\n return this._buttonTextDisableColor;\n }\n set buttonTextDisableColor(buttonTextDisableColor: string) {\n this._buttonTextDisableColor = buttonTextDisableColor;\n }\n\n get buttonTextHoverBorderColor(): string {\n return this._buttonTextHoverBorderColor;\n }\n set buttonTextHoverBorderColor(buttonTextHoverBorderColor: string) {\n this._buttonTextHoverBorderColor = buttonTextHoverBorderColor;\n }\n\n get buttonPadding(): number {\n return this._buttonPadding;\n }\n set buttonPadding(buttonPadding: number) {\n this._buttonPadding = buttonPadding;\n }\n\n getStyle(style: IStyleOption): ButtonStyle {\n return new ButtonStyle(style, this);\n }\n\n clone(): ButtonStyle {\n return new ButtonStyle(this);\n }\n}\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { IStyleOption, SwitchStyleOption } from '../../ts-types';
|
|
2
|
-
import { Style } from '
|
|
2
|
+
import { Style } from './Style';
|
|
3
3
|
import type { SwitchStyle as SwitchStyleThemeOption } from '../../ts-types/column/style';
|
|
4
4
|
export declare class SwitchStyle extends Style {
|
|
5
5
|
private _spaceBetweenTextAndCircle;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/body-helper/style/SwitchStyle.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,
|
|
1
|
+
{"version":3,"sources":["../src/body-helper/style/SwitchStyle.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,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SwitchStyle.js","sourcesContent":["import type { IStyleOption, SwitchStyleOption } from '../../ts-types';\nimport { Style } from './Style';\nimport type { SwitchStyle as SwitchStyleThemeOption } from '../../ts-types/column/style';\n\nlet defaultStyle: SwitchStyle;\n\nexport class SwitchStyle extends Style {\n private _spaceBetweenTextAndCircle: number;\n private _circleRadius: number;\n private _boxWidth: number;\n private _boxHeight: number;\n private _checkedFill: string;\n private _uncheckedFill: string;\n private _disableCheckedFill: string;\n private _disableUncheckedFill: string;\n private _circleFill: string;\n\n static get DEFAULT(): SwitchStyle {\n return defaultStyle ? defaultStyle : (defaultStyle = new SwitchStyle());\n }\n constructor(\n style: SwitchStyleOption = {},\n headerStyle: SwitchStyleOption = {},\n switchThemeStyle: SwitchStyleThemeOption = {}\n ) {\n super(style, headerStyle);\n\n this._spaceBetweenTextAndCircle =\n (style?.spaceBetweenTextAndCircle ??\n headerStyle?.spaceBetweenTextAndCircle ??\n switchThemeStyle?.spaceBetweenTextAndCircle) ||\n 6;\n this._circleRadius = (style?.switchStyle?.circleRadius ?? switchThemeStyle?.circleRadius) || 8;\n this._boxWidth = (style?.switchStyle?.boxWidth ?? switchThemeStyle?.boxWidth) || 40;\n this._boxHeight = (style?.switchStyle?.boxHeight ?? switchThemeStyle?.boxHeight) || 24;\n this._checkedFill = (style?.switchStyle?.checkedFill ?? switchThemeStyle?.checkedFill) || '#165DFF';\n this._uncheckedFill = (style?.switchStyle?.uncheckedFill ?? switchThemeStyle?.uncheckedFill) || '#c9cdd4';\n this._disableCheckedFill =\n (style?.switchStyle?.disableCheckedFill ?? switchThemeStyle?.disableCheckedFill) || '#94bfff';\n this._disableUncheckedFill =\n (style?.switchStyle?.disableUncheckedFill ?? switchThemeStyle?.disableUncheckedFill) || '#f2f3f5';\n this._circleFill = (style?.switchStyle?.circleFill ?? switchThemeStyle?.circleFill) || '#FFF';\n }\n\n get spaceBetweenTextAndCircle(): number {\n return this._spaceBetweenTextAndCircle;\n }\n set spaceBetweenTextAndCircle(spaceBetweenTextAndCircle: number) {\n this._spaceBetweenTextAndCircle = spaceBetweenTextAndCircle;\n }\n get circleRadius(): number {\n return this._circleRadius;\n }\n set circleRadius(circleRadius: number) {\n this._circleRadius = circleRadius;\n }\n get boxWidth(): number {\n return this._boxWidth;\n }\n set boxWidth(boxWidth: number) {\n this._boxWidth = boxWidth;\n }\n get boxHeight(): number {\n return this._boxHeight;\n }\n set boxHeight(boxHeight: number) {\n this._boxHeight = boxHeight;\n }\n get checkedFill(): string {\n return this._checkedFill;\n }\n set checkedFill(checkedFill: string) {\n this._checkedFill = checkedFill;\n }\n get uncheckedFill(): string {\n return this._uncheckedFill;\n }\n set uncheckedFill(uncheckedFill: string) {\n this._uncheckedFill = uncheckedFill;\n }\n get disableCheckedFill(): string {\n return this._disableCheckedFill;\n }\n set disableCheckedFill(disableCheckedFill: string) {\n this._disableCheckedFill = disableCheckedFill;\n }\n get disableUncheckedFill(): string {\n return this._disableUncheckedFill;\n }\n set disableUncheckedFill(disableUncheckedFill: string) {\n this._disableUncheckedFill = disableUncheckedFill;\n }\n get circleFill(): string {\n return this._circleFill;\n }\n set circleFill(circleFill: string) {\n this._circleFill = circleFill;\n }\n getStyle(style: IStyleOption): SwitchStyle {\n return new SwitchStyle(style, this);\n }\n clone(): SwitchStyle {\n return new SwitchStyle(this);\n }\n}\n"]}
|
package/es/core/BaseTable.d.ts
CHANGED
|
@@ -46,6 +46,10 @@ export declare abstract class BaseTable extends EventTarget implements BaseTable
|
|
|
46
46
|
_heightMode: HeightModeDef;
|
|
47
47
|
_autoFillWidth: boolean;
|
|
48
48
|
_autoFillHeight: boolean;
|
|
49
|
+
_containerFit: {
|
|
50
|
+
width: boolean;
|
|
51
|
+
height: boolean;
|
|
52
|
+
};
|
|
49
53
|
_widthAdaptiveMode: WidthAdaptiveModeDef;
|
|
50
54
|
_heightAdaptiveMode: HeightAdaptiveModeDef;
|
|
51
55
|
customRender?: ICustomRender;
|
|
@@ -437,4 +441,12 @@ export declare abstract class BaseTable extends EventTarget implements BaseTable
|
|
|
437
441
|
row?: number;
|
|
438
442
|
}, animationOption?: ITableAnimationOption | boolean): void;
|
|
439
443
|
checkHasColumnAutoWidth(): boolean;
|
|
444
|
+
get containerFit(): {
|
|
445
|
+
width: boolean;
|
|
446
|
+
height: boolean;
|
|
447
|
+
};
|
|
448
|
+
set containerFit(containerFit: boolean | {
|
|
449
|
+
width?: boolean;
|
|
450
|
+
height?: boolean;
|
|
451
|
+
});
|
|
440
452
|
}
|
package/es/core/BaseTable.js
CHANGED
|
@@ -89,8 +89,8 @@ export class BaseTable extends EventTarget {
|
|
|
89
89
|
return TABLE_EVENT_TYPE;
|
|
90
90
|
}
|
|
91
91
|
constructor(container, options = {}) {
|
|
92
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
|
|
93
|
-
if (super(), this.showFrozenIcon = !0, this.version = "1.
|
|
92
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
|
|
93
|
+
if (super(), this.showFrozenIcon = !0, this.version = "1.19.0", this.id = `VTable${Date.now()}`,
|
|
94
94
|
this.isReleased = !1, this._chartEventMap = {}, this.throttleInvalidate = throttle2(this.render.bind(this), 200),
|
|
95
95
|
"node" === Env.mode ? (options = container, container = null) : container instanceof HTMLElement || (options = container,
|
|
96
96
|
container = container.container ? container.container : null), !container && "node" !== options.mode && !options.canvas) throw new Error("vtable's container is undefined");
|
|
@@ -99,11 +99,22 @@ export class BaseTable extends EventTarget {
|
|
|
99
99
|
container: container
|
|
100
100
|
}), container = options.container && options.container instanceof HTMLElement ? options.container : container,
|
|
101
101
|
!1 === (null === (_a = options.customConfig) || void 0 === _a ? void 0 : _a.imageAnonymous) && (vglobal.isImageAnonymous = !1);
|
|
102
|
-
const {frozenColCount: frozenColCount = 0, unfreezeAllOnExceedsMaxWidth: unfreezeAllOnExceedsMaxWidth, frozenRowCount: frozenRowCount, defaultRowHeight: defaultRowHeight = 40, defaultHeaderRowHeight: defaultHeaderRowHeight, defaultColWidth: defaultColWidth = 80, defaultHeaderColWidth: defaultHeaderColWidth, widthMode: widthMode = "standard", heightMode: heightMode = "standard", autoFillWidth: autoFillWidth = !1, autoFillHeight: autoFillHeight = !1,
|
|
102
|
+
const {frozenColCount: frozenColCount = 0, unfreezeAllOnExceedsMaxWidth: unfreezeAllOnExceedsMaxWidth, frozenRowCount: frozenRowCount, defaultRowHeight: defaultRowHeight = 40, defaultHeaderRowHeight: defaultHeaderRowHeight, defaultColWidth: defaultColWidth = 80, defaultHeaderColWidth: defaultHeaderColWidth, widthMode: widthMode = "standard", heightMode: heightMode = "standard", autoFillWidth: autoFillWidth = !1, autoFillHeight: autoFillHeight = !1, containerFit: containerFit = {
|
|
103
|
+
width: !1,
|
|
104
|
+
height: !1
|
|
105
|
+
}, widthAdaptiveMode: widthAdaptiveMode = "only-body", heightAdaptiveMode: heightAdaptiveMode = "only-body", keyboardOptions: keyboardOptions, eventOptions: eventOptions, rowSeriesNumber: rowSeriesNumber, enableCheckboxCascade: enableCheckboxCascade, columnResizeMode: columnResizeMode, rowResizeMode: rowResizeMode = "none", resize: resize, dragHeaderMode: dragHeaderMode, dragOrder: dragOrder, showFrozenIcon: showFrozenIcon, allowFrozenColCount: allowFrozenColCount, padding: padding, hover: hover, menu: menu, select: click, customRender: customRender, pixelRatio: pixelRatio = defaultPixelRatio, renderChartAsync: renderChartAsync, renderChartAsyncBatchCount: renderChartAsyncBatchCount, mode: mode, modeParams: modeParams, canvasWidth: canvasWidth, canvasHeight: canvasHeight, overscrollBehavior: overscrollBehavior, limitMinWidth: limitMinWidth, limitMinHeight: limitMinHeight, clearDOM: clearDOM = !0} = options;
|
|
103
106
|
this.container = container, this.options = options, this._widthMode = widthMode,
|
|
104
107
|
this._heightMode = heightMode, this._widthAdaptiveMode = widthAdaptiveMode, this._heightAdaptiveMode = heightAdaptiveMode,
|
|
105
|
-
this._autoFillWidth = autoFillWidth, this._autoFillHeight = autoFillHeight, this.
|
|
106
|
-
|
|
108
|
+
this._autoFillWidth = autoFillWidth, this._autoFillHeight = autoFillHeight, void 0 !== containerFit && (this._containerFit = "boolean" == typeof containerFit ? {
|
|
109
|
+
width: containerFit,
|
|
110
|
+
height: containerFit
|
|
111
|
+
} : containerFit && "object" == typeof containerFit ? {
|
|
112
|
+
width: null === (_b = containerFit.width) || void 0 === _b || _b,
|
|
113
|
+
height: null === (_c = containerFit.height) || void 0 === _c || _c
|
|
114
|
+
} : {
|
|
115
|
+
width: !1,
|
|
116
|
+
height: !1
|
|
117
|
+
}), this.customRender = customRender, this.padding = {
|
|
107
118
|
top: 0,
|
|
108
119
|
right: 0,
|
|
109
120
|
left: 0,
|
|
@@ -113,7 +124,7 @@ export class BaseTable extends EventTarget {
|
|
|
113
124
|
padding.bottom && (this.padding.bottom = padding.bottom), padding.left && (this.padding.left = padding.left),
|
|
114
125
|
padding.right && (this.padding.right = padding.right))), (isValid(canvasHeight) || isValid(canvasWidth)) && (this.canvasSizeSeted = !0),
|
|
115
126
|
this.tableNoFrameWidth = 0, this.tableNoFrameHeight = 0, this.canvasWidth = isNumber(canvasWidth) ? canvasWidth : void 0,
|
|
116
|
-
this.canvasHeight = isNumber(canvasHeight) ? canvasHeight : void 0, this.columnWidthComputeMode = null !== (
|
|
127
|
+
this.canvasHeight = isNumber(canvasHeight) ? canvasHeight : void 0, this.columnWidthComputeMode = null !== (_d = options.columnWidthComputeMode) && void 0 !== _d ? _d : "normal";
|
|
117
128
|
const internalProps = this.internalProps = {};
|
|
118
129
|
void 0 !== showFrozenIcon && (this.showFrozenIcon = showFrozenIcon), "number" == typeof allowFrozenColCount && allowFrozenColCount <= 0 && (this.showFrozenIcon = !1),
|
|
119
130
|
this.options.canvas ? ("node" !== Env.mode && (internalProps.element = this.options.canvas.parentElement,
|
|
@@ -121,7 +132,7 @@ export class BaseTable extends EventTarget {
|
|
|
121
132
|
internalProps.canvas = this.options.canvas, internalProps.context = internalProps.canvas.getContext("2d")) : "node" !== Env.mode && (internalProps.element = createRootElement(this.padding),
|
|
122
133
|
internalProps.focusControl = new FocusInput(this, internalProps.element), internalProps.canvas = document.createElement("canvas"),
|
|
123
134
|
internalProps.element.appendChild(internalProps.canvas), internalProps.context = internalProps.canvas.getContext("2d"),
|
|
124
|
-
(null === (
|
|
135
|
+
(null === (_e = options.customConfig) || void 0 === _e ? void 0 : _e.createReactContainer) && createReactContainer(this)),
|
|
125
136
|
internalProps.handler = new EventHandler, isNumber(this.options.resizeTime) && (internalProps.handler.resizeTime = this.options.resizeTime),
|
|
126
137
|
internalProps.pixelRatio = pixelRatio, internalProps.frozenColCount = frozenColCount,
|
|
127
138
|
internalProps.frozenRowCount = frozenRowCount, internalProps.unfreezeAllOnExceedsMaxWidth = null == unfreezeAllOnExceedsMaxWidth || unfreezeAllOnExceedsMaxWidth,
|
|
@@ -129,9 +140,9 @@ export class BaseTable extends EventTarget {
|
|
|
129
140
|
internalProps.defaultColWidth = defaultColWidth, internalProps.defaultHeaderColWidth = null != defaultHeaderColWidth ? defaultHeaderColWidth : defaultColWidth,
|
|
130
141
|
internalProps.keyboardOptions = keyboardOptions, internalProps.eventOptions = eventOptions,
|
|
131
142
|
internalProps.rowSeriesNumber = rowSeriesNumber, internalProps.enableCheckboxCascade = enableCheckboxCascade,
|
|
132
|
-
internalProps.columnResizeMode = null !== (
|
|
133
|
-
internalProps.rowResizeMode = null !== (
|
|
134
|
-
internalProps.dragHeaderMode = null !== (
|
|
143
|
+
internalProps.columnResizeMode = null !== (_f = null == resize ? void 0 : resize.columnResizeMode) && void 0 !== _f ? _f : columnResizeMode,
|
|
144
|
+
internalProps.rowResizeMode = null !== (_g = null == resize ? void 0 : resize.rowResizeMode) && void 0 !== _g ? _g : rowResizeMode,
|
|
145
|
+
internalProps.dragHeaderMode = null !== (_j = null !== (_h = null == dragOrder ? void 0 : dragOrder.dragHeaderMode) && void 0 !== _h ? _h : dragHeaderMode) && void 0 !== _j ? _j : "none",
|
|
135
146
|
internalProps.renderChartAsync = renderChartAsync, setBatchRenderChartCount(renderChartAsyncBatchCount),
|
|
136
147
|
internalProps.overscrollBehavior = null != overscrollBehavior ? overscrollBehavior : "auto",
|
|
137
148
|
internalProps._rowHeightsMap = new NumberRangeMap(this), internalProps._rowRangeHeightsMap = new Map,
|
|
@@ -145,14 +156,14 @@ export class BaseTable extends EventTarget {
|
|
|
145
156
|
var _a;
|
|
146
157
|
return "node" === Env.mode ? that.canvasWidth / (null != pixelRatio ? pixelRatio : 1) : this._.canvas.width / (null !== (_a = this._.context.pixelRatio) && void 0 !== _a ? _a : window.devicePixelRatio);
|
|
147
158
|
}
|
|
148
|
-
}, internalProps.cellTextOverflows = {}, internalProps.focusedTable = !1, internalProps.theme = themes.of(null !== (
|
|
159
|
+
}, internalProps.cellTextOverflows = {}, internalProps.focusedTable = !1, internalProps.theme = themes.of(null !== (_k = options.theme) && void 0 !== _k ? _k : themes.DEFAULT),
|
|
149
160
|
internalProps.theme.isPivot = this.isPivotTable(), setIconColor(internalProps.theme.functionalIconsStyle),
|
|
150
161
|
container ? (clearDOM && (container.innerHTML = ""), container.appendChild(internalProps.element),
|
|
151
162
|
this._updateSize()) : this._updateSize(), internalProps.bodyHelper = new BodyHelper(this),
|
|
152
163
|
internalProps.headerHelper = new HeaderHelper(this), internalProps.rowSeriesNumberHelper = new RowSeriesNumberHelper(this),
|
|
153
164
|
internalProps.autoWrapText = options.autoWrapText, internalProps.enableLineBreak = options.enableLineBreak,
|
|
154
|
-
internalProps.allowFrozenColCount = null !== (
|
|
155
|
-
internalProps.limitMaxAutoWidth = null !== (
|
|
165
|
+
internalProps.allowFrozenColCount = null !== (_l = options.allowFrozenColCount) && void 0 !== _l ? _l : 0,
|
|
166
|
+
internalProps.limitMaxAutoWidth = null !== (_m = options.limitMaxAutoWidth) && void 0 !== _m ? _m : 450,
|
|
156
167
|
internalProps.limitMinWidth = null != limitMinWidth ? "number" == typeof limitMinWidth ? limitMinWidth : limitMinWidth ? 10 : 0 : 10,
|
|
157
168
|
internalProps.limitMinHeight = null != limitMinHeight ? "number" == typeof limitMinHeight ? limitMinHeight : limitMinHeight ? 10 : 0 : 10,
|
|
158
169
|
this.scenegraph = new Scenegraph(this), this.stateManager = new StateManager(this),
|
|
@@ -183,8 +194,8 @@ export class BaseTable extends EventTarget {
|
|
|
183
194
|
}
|
|
184
195
|
if (internalProps.menu = Object.assign({
|
|
185
196
|
renderMode: "html"
|
|
186
|
-
}, options.menu), Array.isArray(null === (
|
|
187
|
-
(Array.isArray(null === (
|
|
197
|
+
}, options.menu), Array.isArray(null === (_o = options.menu) || void 0 === _o ? void 0 : _o.dropDownMenuHighlight) && this.setDropDownMenuHighlight(null === (_p = options.menu) || void 0 === _p ? void 0 : _p.dropDownMenuHighlight),
|
|
198
|
+
(Array.isArray(null === (_q = options.menu) || void 0 === _q ? void 0 : _q.defaultHeaderMenuItems) || "function" == typeof (null === (_r = options.menu) || void 0 === _r ? void 0 : _r.defaultHeaderMenuItems)) && (this.globalDropDownMenu = options.menu.defaultHeaderMenuItems),
|
|
188
199
|
"html" === internalProps.menu.renderMode) {
|
|
189
200
|
const MenuHandler = Factory.getComponent("menuHandler");
|
|
190
201
|
internalProps.menuHandler = new MenuHandler(this);
|
|
@@ -194,7 +205,7 @@ export class BaseTable extends EventTarget {
|
|
|
194
205
|
changedCells: new Map
|
|
195
206
|
}, internalProps.customMergeCell = getCustomMergeCellFunc(options.customMergeCell);
|
|
196
207
|
const CustomCellStylePlugin = Factory.getComponent("customCellStylePlugin");
|
|
197
|
-
CustomCellStylePlugin && (this.customCellStylePlugin = new CustomCellStylePlugin(this, null !== (
|
|
208
|
+
CustomCellStylePlugin && (this.customCellStylePlugin = new CustomCellStylePlugin(this, null !== (_s = options.customCellStyle) && void 0 !== _s ? _s : [], null !== (_t = options.customCellStyleArrangement) && void 0 !== _t ? _t : [])),
|
|
198
209
|
this._adjustCanvasSizeByOption();
|
|
199
210
|
}
|
|
200
211
|
_adjustCanvasSizeByOption() {
|
|
@@ -904,10 +915,10 @@ export class BaseTable extends EventTarget {
|
|
|
904
915
|
return super.fireListeners(type, event);
|
|
905
916
|
}
|
|
906
917
|
updateOption(options) {
|
|
907
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u;
|
|
918
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w;
|
|
908
919
|
null === (_a = this.editorManager) || void 0 === _a || _a.cancelEdit(), this.options = options,
|
|
909
920
|
this._hasAutoImageColumn = void 0;
|
|
910
|
-
const {frozenColCount: frozenColCount = 0, unfreezeAllOnExceedsMaxWidth: unfreezeAllOnExceedsMaxWidth, defaultRowHeight: defaultRowHeight = 40, defaultHeaderRowHeight: defaultHeaderRowHeight, defaultColWidth: defaultColWidth = 80, defaultHeaderColWidth: defaultHeaderColWidth = 80, keyboardOptions: keyboardOptions, eventOptions: eventOptions, rowSeriesNumber: rowSeriesNumber, enableCheckboxCascade: enableCheckboxCascade, columnResizeMode: columnResizeMode, rowResizeMode: rowResizeMode = "none", resize: resize, dragHeaderMode: dragHeaderMode, dragOrder: dragOrder, showFrozenIcon: showFrozenIcon, allowFrozenColCount: allowFrozenColCount, padding: padding, hover: hover, menu: menu, select: click, pixelRatio: pixelRatio, widthMode: widthMode, heightMode: heightMode, autoFillWidth: autoFillWidth, autoFillHeight: autoFillHeight, widthAdaptiveMode: widthAdaptiveMode, heightAdaptiveMode: heightAdaptiveMode, customRender: customRender, renderChartAsync: renderChartAsync, renderChartAsyncBatchCount: renderChartAsyncBatchCount, canvasWidth: canvasWidth, canvasHeight: canvasHeight, overscrollBehavior: overscrollBehavior, limitMinWidth: limitMinWidth, limitMinHeight: limitMinHeight} = options;
|
|
921
|
+
const {frozenColCount: frozenColCount = 0, unfreezeAllOnExceedsMaxWidth: unfreezeAllOnExceedsMaxWidth, defaultRowHeight: defaultRowHeight = 40, defaultHeaderRowHeight: defaultHeaderRowHeight, defaultColWidth: defaultColWidth = 80, defaultHeaderColWidth: defaultHeaderColWidth = 80, keyboardOptions: keyboardOptions, eventOptions: eventOptions, rowSeriesNumber: rowSeriesNumber, enableCheckboxCascade: enableCheckboxCascade, columnResizeMode: columnResizeMode, rowResizeMode: rowResizeMode = "none", resize: resize, dragHeaderMode: dragHeaderMode, dragOrder: dragOrder, showFrozenIcon: showFrozenIcon, allowFrozenColCount: allowFrozenColCount, padding: padding, hover: hover, menu: menu, select: click, pixelRatio: pixelRatio, widthMode: widthMode, heightMode: heightMode, autoFillWidth: autoFillWidth, autoFillHeight: autoFillHeight, containerFit: containerFit, widthAdaptiveMode: widthAdaptiveMode, heightAdaptiveMode: heightAdaptiveMode, customRender: customRender, renderChartAsync: renderChartAsync, renderChartAsyncBatchCount: renderChartAsyncBatchCount, canvasWidth: canvasWidth, canvasHeight: canvasHeight, overscrollBehavior: overscrollBehavior, limitMinWidth: limitMinWidth, limitMinHeight: limitMinHeight} = options;
|
|
911
922
|
pixelRatio && pixelRatio !== this.internalProps.pixelRatio && (this.internalProps.pixelRatio = pixelRatio),
|
|
912
923
|
padding && ("number" == typeof padding ? (this.padding.top = padding, this.padding.left = padding,
|
|
913
924
|
this.padding.bottom = padding, this.padding.right = padding) : (padding.top && (this.padding.top = padding.top),
|
|
@@ -918,36 +929,45 @@ export class BaseTable extends EventTarget {
|
|
|
918
929
|
this._widthAdaptiveMode = null != widthAdaptiveMode ? widthAdaptiveMode : "only-body",
|
|
919
930
|
this._heightAdaptiveMode = null != heightAdaptiveMode ? heightAdaptiveMode : "only-body",
|
|
920
931
|
this.autoFillWidth = null != autoFillWidth && autoFillWidth, this.autoFillHeight = null != autoFillHeight && autoFillHeight,
|
|
921
|
-
|
|
932
|
+
void 0 !== containerFit && (this._containerFit = "boolean" == typeof containerFit ? {
|
|
933
|
+
width: containerFit,
|
|
934
|
+
height: containerFit
|
|
935
|
+
} : containerFit && "object" == typeof containerFit ? {
|
|
936
|
+
width: null === (_b = containerFit.width) || void 0 === _b || _b,
|
|
937
|
+
height: null === (_c = containerFit.height) || void 0 === _c || _c
|
|
938
|
+
} : {
|
|
939
|
+
width: !1,
|
|
940
|
+
height: !1
|
|
941
|
+
}), this.customRender = customRender, this.canvasWidth = isNumber(canvasWidth) ? canvasWidth : void 0,
|
|
922
942
|
this.canvasHeight = isNumber(canvasHeight) ? canvasHeight : void 0;
|
|
923
943
|
const internalProps = this.internalProps;
|
|
924
944
|
if ("node" === Env.mode || options.canvas || updateRootElementPadding(internalProps.element, this.padding),
|
|
925
|
-
this.columnWidthComputeMode = null !== (
|
|
945
|
+
this.columnWidthComputeMode = null !== (_d = options.columnWidthComputeMode) && void 0 !== _d ? _d : "normal",
|
|
926
946
|
internalProps.frozenColCount = frozenColCount, internalProps.unfreezeAllOnExceedsMaxWidth = null == unfreezeAllOnExceedsMaxWidth || unfreezeAllOnExceedsMaxWidth,
|
|
927
947
|
internalProps.defaultRowHeight = defaultRowHeight, internalProps.defaultHeaderRowHeight = null != defaultHeaderRowHeight ? defaultHeaderRowHeight : defaultRowHeight,
|
|
928
948
|
internalProps.defaultColWidth = defaultColWidth, internalProps.defaultHeaderColWidth = null != defaultHeaderColWidth ? defaultHeaderColWidth : defaultColWidth,
|
|
929
949
|
internalProps.keyboardOptions = keyboardOptions, internalProps.eventOptions = eventOptions,
|
|
930
950
|
internalProps.rowSeriesNumber = rowSeriesNumber, internalProps.enableCheckboxCascade = enableCheckboxCascade,
|
|
931
|
-
internalProps.columnResizeMode = null !== (
|
|
932
|
-
internalProps.rowResizeMode = null !== (
|
|
933
|
-
internalProps.dragHeaderMode = null !== (
|
|
951
|
+
internalProps.columnResizeMode = null !== (_e = null == resize ? void 0 : resize.columnResizeMode) && void 0 !== _e ? _e : columnResizeMode,
|
|
952
|
+
internalProps.rowResizeMode = null !== (_f = null == resize ? void 0 : resize.rowResizeMode) && void 0 !== _f ? _f : rowResizeMode,
|
|
953
|
+
internalProps.dragHeaderMode = null !== (_h = null !== (_g = null == dragOrder ? void 0 : dragOrder.dragHeaderMode) && void 0 !== _g ? _g : dragHeaderMode) && void 0 !== _h ? _h : "none",
|
|
934
954
|
internalProps.renderChartAsync = renderChartAsync, setBatchRenderChartCount(renderChartAsyncBatchCount),
|
|
935
955
|
internalProps.overscrollBehavior = null != overscrollBehavior ? overscrollBehavior : "auto",
|
|
936
956
|
internalProps.cellTextOverflows = {}, internalProps._rowHeightsMap = new NumberRangeMap(this),
|
|
937
957
|
internalProps._rowRangeHeightsMap = new Map, internalProps._colRangeWidthsMap = new Map,
|
|
938
958
|
internalProps._widthResizedColMap = new Set, internalProps._heightResizedRowMap = new Set,
|
|
939
959
|
this.colWidthsMap = new NumberMap, this.colContentWidthsMap = new NumberMap, this.colWidthsLimit = {},
|
|
940
|
-
internalProps.stick.changedCells.clear(), internalProps.theme = themes.of(null !== (
|
|
960
|
+
internalProps.stick.changedCells.clear(), internalProps.theme = themes.of(null !== (_j = options.theme) && void 0 !== _j ? _j : themes.DEFAULT),
|
|
941
961
|
internalProps.theme.isPivot = this.isPivotTable(), setIconColor(internalProps.theme.functionalIconsStyle),
|
|
942
962
|
this.scenegraph.updateStageBackground(), internalProps.autoWrapText = options.autoWrapText,
|
|
943
|
-
internalProps.enableLineBreak = options.enableLineBreak, internalProps.allowFrozenColCount = null !== (
|
|
944
|
-
internalProps.limitMaxAutoWidth = null !== (
|
|
963
|
+
internalProps.enableLineBreak = options.enableLineBreak, internalProps.allowFrozenColCount = null !== (_k = options.allowFrozenColCount) && void 0 !== _k ? _k : 0,
|
|
964
|
+
internalProps.limitMaxAutoWidth = null !== (_l = options.limitMaxAutoWidth) && void 0 !== _l ? _l : 450,
|
|
945
965
|
internalProps.limitMinWidth = null != limitMinWidth ? "number" == typeof limitMinWidth ? limitMinWidth : limitMinWidth ? 10 : 0 : 10,
|
|
946
966
|
internalProps.limitMinHeight = null != limitMinHeight ? "number" == typeof limitMinHeight ? limitMinHeight : limitMinHeight ? 10 : 0 : 10,
|
|
947
|
-
null === (
|
|
967
|
+
null === (_m = internalProps.legends) || void 0 === _m || _m.forEach((legend => {
|
|
948
968
|
null == legend || legend.release();
|
|
949
|
-
})), null === (
|
|
950
|
-
null === (
|
|
969
|
+
})), null === (_o = internalProps.title) || void 0 === _o || _o.release(), internalProps.title = null,
|
|
970
|
+
null === (_p = internalProps.emptyTip) || void 0 === _p || _p.release(), internalProps.emptyTip = null,
|
|
951
971
|
internalProps.layoutMap.release(), clearChartRenderQueue(), this.scenegraph.clearCells(),
|
|
952
972
|
this.scenegraph.updateComponent(), this.stateManager.updateOptionSetState(), this._updateSize(),
|
|
953
973
|
this.eventManager.updateEventBinder(), options.legends) {
|
|
@@ -976,15 +996,15 @@ export class BaseTable extends EventTarget {
|
|
|
976
996
|
}
|
|
977
997
|
if (internalProps.menu = Object.assign({
|
|
978
998
|
renderMode: "html"
|
|
979
|
-
}, options.menu), Array.isArray(null === (
|
|
980
|
-
(Array.isArray(null === (
|
|
999
|
+
}, options.menu), Array.isArray(null === (_q = options.menu) || void 0 === _q ? void 0 : _q.dropDownMenuHighlight) && this.setDropDownMenuHighlight(null === (_r = options.menu) || void 0 === _r ? void 0 : _r.dropDownMenuHighlight),
|
|
1000
|
+
(Array.isArray(null === (_s = options.menu) || void 0 === _s ? void 0 : _s.defaultHeaderMenuItems) || "function" == typeof (null === (_t = options.menu) || void 0 === _t ? void 0 : _t.defaultHeaderMenuItems)) && (this.globalDropDownMenu = options.menu.defaultHeaderMenuItems),
|
|
981
1001
|
"html" === internalProps.menu.renderMode && !internalProps.menuHandler) {
|
|
982
1002
|
const MenuHandler = Factory.getComponent("menuHandler");
|
|
983
1003
|
internalProps.menuHandler = new MenuHandler(this);
|
|
984
1004
|
}
|
|
985
1005
|
this.clearCellStyleCache(), this.clearColWidthCache(), this.clearRowHeightCache(),
|
|
986
1006
|
internalProps.customMergeCell = getCustomMergeCellFunc(options.customMergeCell),
|
|
987
|
-
null === (
|
|
1007
|
+
null === (_u = this.customCellStylePlugin) || void 0 === _u || _u.updateCustomCell(null !== (_v = options.customCellStyle) && void 0 !== _v ? _v : [], null !== (_w = options.customCellStyleArrangement) && void 0 !== _w ? _w : []),
|
|
988
1008
|
this._adjustCanvasSizeByOption();
|
|
989
1009
|
}
|
|
990
1010
|
renderWithRecreateCells() {
|
|
@@ -1922,5 +1942,21 @@ export class BaseTable extends EventTarget {
|
|
|
1922
1942
|
checkHasColumnAutoWidth() {
|
|
1923
1943
|
return checkHasColumnAutoWidth(this);
|
|
1924
1944
|
}
|
|
1945
|
+
get containerFit() {
|
|
1946
|
+
return this._containerFit;
|
|
1947
|
+
}
|
|
1948
|
+
set containerFit(containerFit) {
|
|
1949
|
+
var _a, _b;
|
|
1950
|
+
this._containerFit = "boolean" == typeof containerFit ? {
|
|
1951
|
+
width: containerFit,
|
|
1952
|
+
height: containerFit
|
|
1953
|
+
} : containerFit && "object" == typeof containerFit ? {
|
|
1954
|
+
width: null === (_a = containerFit.width) || void 0 === _a || _a,
|
|
1955
|
+
height: null === (_b = containerFit.height) || void 0 === _b || _b
|
|
1956
|
+
} : {
|
|
1957
|
+
width: !1,
|
|
1958
|
+
height: !1
|
|
1959
|
+
};
|
|
1960
|
+
}
|
|
1925
1961
|
}
|
|
1926
1962
|
//# sourceMappingURL=BaseTable.js.map
|