@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,
|
|
1
|
+
{"version":3,"sources":["../src/body-helper/style/ButtonStyle.ts"],"names":[],"mappings":";;;AACA,mCAAgC;AAGhC,IAAI,YAAyB,CAAC;AAE9B,MAAa,WAAY,SAAQ,aAAK;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,WAAW,mCAAI,gBAAgB,aAAhB,gBAAgB,uBAAhB,gBAAgB,CAAE,WAAW,CA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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;AAtID,kCAsIC","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;
|
|
@@ -4,11 +4,11 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: !0
|
|
5
5
|
}), exports.SwitchStyle = void 0;
|
|
6
6
|
|
|
7
|
-
const
|
|
7
|
+
const Style_1 = require("./Style");
|
|
8
8
|
|
|
9
9
|
let defaultStyle;
|
|
10
10
|
|
|
11
|
-
class SwitchStyle extends
|
|
11
|
+
class SwitchStyle extends Style_1.Style {
|
|
12
12
|
static get DEFAULT() {
|
|
13
13
|
return defaultStyle || (defaultStyle = new SwitchStyle);
|
|
14
14
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/body-helper/style/SwitchStyle.ts"],"names":[],"mappings":";;;AACA,
|
|
1
|
+
{"version":3,"sources":["../src/body-helper/style/SwitchStyle.ts"],"names":[],"mappings":";;;AACA,mCAAgC;AAGhC,IAAI,YAAyB,CAAC;AAE9B,MAAa,WAAY,SAAQ,aAAK;IAWpC,MAAM,KAAK,OAAO;QAChB,OAAO,YAAY,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,YAAY,GAAG,IAAI,WAAW,EAAE,CAAC,CAAC;IAC1E,CAAC;IACD,YACE,QAA2B,EAAE,EAC7B,cAAiC,EAAE,EACnC,mBAA2C,EAAE;;QAE7C,KAAK,CAAC,KAAK,EAAE,WAAW,CAAC,CAAC;QAE1B,IAAI,CAAC,0BAA0B;YAC7B,CAAC,MAAA,MAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,yBAAyB,mCAC/B,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,yBAAyB,mCACtC,gBAAgB,aAAhB,gBAAgB,uBAAhB,gBAAgB,CAAE,yBAAyB,CAAC;gBAC9C,CAAC,CAAC;QACJ,IAAI,CAAC,aAAa,GAAG,CAAC,MAAA,MAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,WAAW,0CAAE,YAAY,mCAAI,gBAAgB,aAAhB,gBAAgB,uBAAhB,gBAAgB,CAAE,YAAY,CAAC,IAAI,CAAC,CAAC;QAC/F,IAAI,CAAC,SAAS,GAAG,CAAC,MAAA,MAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,WAAW,0CAAE,QAAQ,mCAAI,gBAAgB,aAAhB,gBAAgB,uBAAhB,gBAAgB,CAAE,QAAQ,CAAC,IAAI,EAAE,CAAC;QACpF,IAAI,CAAC,UAAU,GAAG,CAAC,MA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AC/B,IAAI,CAAC,WAAW,GAAG,UAAU,CAAC;IAChC,CAAC;IACD,QAAQ,CAAC,KAAmB;QAC1B,OAAO,IAAI,WAAW,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;IACtC,CAAC;IACD,KAAK;QACH,OAAO,IAAI,WAAW,CAAC,IAAI,CAAC,CAAC;IAC/B,CAAC;CACF;AAlGD,kCAkGC","file":"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/cjs/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/cjs/core/BaseTable.js
CHANGED
|
@@ -42,8 +42,8 @@ class BaseTable extends EventTarget_1.EventTarget {
|
|
|
42
42
|
return TABLE_EVENT_TYPE_1.TABLE_EVENT_TYPE;
|
|
43
43
|
}
|
|
44
44
|
constructor(container, options = {}) {
|
|
45
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
|
|
46
|
-
if (super(), this.showFrozenIcon = !0, this.version = "1.
|
|
45
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
|
|
46
|
+
if (super(), this.showFrozenIcon = !0, this.version = "1.19.0", this.id = `VTable${Date.now()}`,
|
|
47
47
|
this.isReleased = !1, this._chartEventMap = {}, this.throttleInvalidate = (0, util_1.throttle2)(this.render.bind(this), 200),
|
|
48
48
|
"node" === env_1.Env.mode ? (options = container, container = null) : container instanceof HTMLElement || (options = container,
|
|
49
49
|
container = container.container ? container.container : null), !container && "node" !== options.mode && !options.canvas) throw new Error("vtable's container is undefined");
|
|
@@ -52,11 +52,22 @@ class BaseTable extends EventTarget_1.EventTarget {
|
|
|
52
52
|
container: container
|
|
53
53
|
}), container = options.container && options.container instanceof HTMLElement ? options.container : container,
|
|
54
54
|
!1 === (null === (_a = options.customConfig) || void 0 === _a ? void 0 : _a.imageAnonymous) && (vrender_1.vglobal.isImageAnonymous = !1);
|
|
55
|
-
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,
|
|
55
|
+
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 = {
|
|
56
|
+
width: !1,
|
|
57
|
+
height: !1
|
|
58
|
+
}, 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 = 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;
|
|
56
59
|
this.container = container, this.options = options, this._widthMode = widthMode,
|
|
57
60
|
this._heightMode = heightMode, this._widthAdaptiveMode = widthAdaptiveMode, this._heightAdaptiveMode = heightAdaptiveMode,
|
|
58
|
-
this._autoFillWidth = autoFillWidth, this._autoFillHeight = autoFillHeight, this.
|
|
59
|
-
|
|
61
|
+
this._autoFillWidth = autoFillWidth, this._autoFillHeight = autoFillHeight, void 0 !== containerFit && (this._containerFit = "boolean" == typeof containerFit ? {
|
|
62
|
+
width: containerFit,
|
|
63
|
+
height: containerFit
|
|
64
|
+
} : containerFit && "object" == typeof containerFit ? {
|
|
65
|
+
width: null === (_b = containerFit.width) || void 0 === _b || _b,
|
|
66
|
+
height: null === (_c = containerFit.height) || void 0 === _c || _c
|
|
67
|
+
} : {
|
|
68
|
+
width: !1,
|
|
69
|
+
height: !1
|
|
70
|
+
}), this.customRender = customRender, this.padding = {
|
|
60
71
|
top: 0,
|
|
61
72
|
right: 0,
|
|
62
73
|
left: 0,
|
|
@@ -68,7 +79,7 @@ class BaseTable extends EventTarget_1.EventTarget {
|
|
|
68
79
|
vutils_1.isValid)(canvasWidth)) && (this.canvasSizeSeted = !0), this.tableNoFrameWidth = 0,
|
|
69
80
|
this.tableNoFrameHeight = 0, this.canvasWidth = (0, vutils_1.isNumber)(canvasWidth) ? canvasWidth : void 0,
|
|
70
81
|
this.canvasHeight = (0, vutils_1.isNumber)(canvasHeight) ? canvasHeight : void 0,
|
|
71
|
-
this.columnWidthComputeMode = null !== (
|
|
82
|
+
this.columnWidthComputeMode = null !== (_d = options.columnWidthComputeMode) && void 0 !== _d ? _d : "normal";
|
|
72
83
|
const internalProps = this.internalProps = {};
|
|
73
84
|
void 0 !== showFrozenIcon && (this.showFrozenIcon = showFrozenIcon), "number" == typeof allowFrozenColCount && allowFrozenColCount <= 0 && (this.showFrozenIcon = !1),
|
|
74
85
|
this.options.canvas ? ("node" !== env_1.Env.mode && (internalProps.element = this.options.canvas.parentElement,
|
|
@@ -76,7 +87,7 @@ class BaseTable extends EventTarget_1.EventTarget {
|
|
|
76
87
|
internalProps.canvas = this.options.canvas, internalProps.context = internalProps.canvas.getContext("2d")) : "node" !== env_1.Env.mode && (internalProps.element = (0,
|
|
77
88
|
tableHelper_1.createRootElement)(this.padding), internalProps.focusControl = new FouseInput_1.FocusInput(this, internalProps.element),
|
|
78
89
|
internalProps.canvas = document.createElement("canvas"), internalProps.element.appendChild(internalProps.canvas),
|
|
79
|
-
internalProps.context = internalProps.canvas.getContext("2d"), (null === (
|
|
90
|
+
internalProps.context = internalProps.canvas.getContext("2d"), (null === (_e = options.customConfig) || void 0 === _e ? void 0 : _e.createReactContainer) && (0,
|
|
80
91
|
frozen_react_1.createReactContainer)(this)), internalProps.handler = new EventHandler_1.EventHandler,
|
|
81
92
|
(0, vutils_1.isNumber)(this.options.resizeTime) && (internalProps.handler.resizeTime = this.options.resizeTime),
|
|
82
93
|
internalProps.pixelRatio = pixelRatio, internalProps.frozenColCount = frozenColCount,
|
|
@@ -85,9 +96,9 @@ class BaseTable extends EventTarget_1.EventTarget {
|
|
|
85
96
|
internalProps.defaultColWidth = defaultColWidth, internalProps.defaultHeaderColWidth = null != defaultHeaderColWidth ? defaultHeaderColWidth : defaultColWidth,
|
|
86
97
|
internalProps.keyboardOptions = keyboardOptions, internalProps.eventOptions = eventOptions,
|
|
87
98
|
internalProps.rowSeriesNumber = rowSeriesNumber, internalProps.enableCheckboxCascade = enableCheckboxCascade,
|
|
88
|
-
internalProps.columnResizeMode = null !== (
|
|
89
|
-
internalProps.rowResizeMode = null !== (
|
|
90
|
-
internalProps.dragHeaderMode = null !== (
|
|
99
|
+
internalProps.columnResizeMode = null !== (_f = null == resize ? void 0 : resize.columnResizeMode) && void 0 !== _f ? _f : columnResizeMode,
|
|
100
|
+
internalProps.rowResizeMode = null !== (_g = null == resize ? void 0 : resize.rowResizeMode) && void 0 !== _g ? _g : rowResizeMode,
|
|
101
|
+
internalProps.dragHeaderMode = null !== (_j = null !== (_h = null == dragOrder ? void 0 : dragOrder.dragHeaderMode) && void 0 !== _h ? _h : dragHeaderMode) && void 0 !== _j ? _j : "none",
|
|
91
102
|
internalProps.renderChartAsync = renderChartAsync, (0, chart_render_helper_1.setBatchRenderChartCount)(renderChartAsyncBatchCount),
|
|
92
103
|
internalProps.overscrollBehavior = null != overscrollBehavior ? overscrollBehavior : "auto",
|
|
93
104
|
internalProps._rowHeightsMap = new row_height_map_1.NumberRangeMap(this), internalProps._rowRangeHeightsMap = new Map,
|
|
@@ -101,14 +112,14 @@ class BaseTable extends EventTarget_1.EventTarget {
|
|
|
101
112
|
var _a;
|
|
102
113
|
return "node" === env_1.Env.mode ? that.canvasWidth / (null != pixelRatio ? pixelRatio : 1) : this._.canvas.width / (null !== (_a = this._.context.pixelRatio) && void 0 !== _a ? _a : window.devicePixelRatio);
|
|
103
114
|
}
|
|
104
|
-
}, internalProps.cellTextOverflows = {}, internalProps.focusedTable = !1, internalProps.theme = themes_1.default.of(null !== (
|
|
115
|
+
}, internalProps.cellTextOverflows = {}, internalProps.focusedTable = !1, internalProps.theme = themes_1.default.of(null !== (_k = options.theme) && void 0 !== _k ? _k : themes_1.default.DEFAULT),
|
|
105
116
|
internalProps.theme.isPivot = this.isPivotTable(), (0, icons_1.setIconColor)(internalProps.theme.functionalIconsStyle),
|
|
106
117
|
container ? (clearDOM && (container.innerHTML = ""), container.appendChild(internalProps.element),
|
|
107
118
|
this._updateSize()) : this._updateSize(), internalProps.bodyHelper = new body_helper_1.BodyHelper(this),
|
|
108
119
|
internalProps.headerHelper = new header_helper_1.HeaderHelper(this), internalProps.rowSeriesNumberHelper = new row_series_number_helper_1.RowSeriesNumberHelper(this),
|
|
109
120
|
internalProps.autoWrapText = options.autoWrapText, internalProps.enableLineBreak = options.enableLineBreak,
|
|
110
|
-
internalProps.allowFrozenColCount = null !== (
|
|
111
|
-
internalProps.limitMaxAutoWidth = null !== (
|
|
121
|
+
internalProps.allowFrozenColCount = null !== (_l = options.allowFrozenColCount) && void 0 !== _l ? _l : 0,
|
|
122
|
+
internalProps.limitMaxAutoWidth = null !== (_m = options.limitMaxAutoWidth) && void 0 !== _m ? _m : 450,
|
|
112
123
|
internalProps.limitMinWidth = null != limitMinWidth ? "number" == typeof limitMinWidth ? limitMinWidth : limitMinWidth ? 10 : 0 : 10,
|
|
113
124
|
internalProps.limitMinHeight = null != limitMinHeight ? "number" == typeof limitMinHeight ? limitMinHeight : limitMinHeight ? 10 : 0 : 10,
|
|
114
125
|
this.scenegraph = new scenegraph_1.Scenegraph(this), this.stateManager = new state_1.StateManager(this),
|
|
@@ -139,8 +150,8 @@ class BaseTable extends EventTarget_1.EventTarget {
|
|
|
139
150
|
}
|
|
140
151
|
if (internalProps.menu = Object.assign({
|
|
141
152
|
renderMode: "html"
|
|
142
|
-
}, options.menu), Array.isArray(null === (
|
|
143
|
-
(Array.isArray(null === (
|
|
153
|
+
}, 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),
|
|
154
|
+
(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),
|
|
144
155
|
"html" === internalProps.menu.renderMode) {
|
|
145
156
|
const MenuHandler = factory_1.Factory.getComponent("menuHandler");
|
|
146
157
|
internalProps.menuHandler = new MenuHandler(this);
|
|
@@ -150,7 +161,7 @@ class BaseTable extends EventTarget_1.EventTarget {
|
|
|
150
161
|
changedCells: new Map
|
|
151
162
|
}, internalProps.customMergeCell = (0, get_custom_merge_cell_func_1.getCustomMergeCellFunc)(options.customMergeCell);
|
|
152
163
|
const CustomCellStylePlugin = factory_1.Factory.getComponent("customCellStylePlugin");
|
|
153
|
-
CustomCellStylePlugin && (this.customCellStylePlugin = new CustomCellStylePlugin(this, null !== (
|
|
164
|
+
CustomCellStylePlugin && (this.customCellStylePlugin = new CustomCellStylePlugin(this, null !== (_s = options.customCellStyle) && void 0 !== _s ? _s : [], null !== (_t = options.customCellStyleArrangement) && void 0 !== _t ? _t : [])),
|
|
154
165
|
this._adjustCanvasSizeByOption();
|
|
155
166
|
}
|
|
156
167
|
_adjustCanvasSizeByOption() {
|
|
@@ -862,10 +873,10 @@ class BaseTable extends EventTarget_1.EventTarget {
|
|
|
862
873
|
return super.fireListeners(type, event);
|
|
863
874
|
}
|
|
864
875
|
updateOption(options) {
|
|
865
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u;
|
|
876
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w;
|
|
866
877
|
null === (_a = this.editorManager) || void 0 === _a || _a.cancelEdit(), this.options = options,
|
|
867
878
|
this._hasAutoImageColumn = void 0;
|
|
868
|
-
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;
|
|
879
|
+
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;
|
|
869
880
|
pixelRatio && pixelRatio !== this.internalProps.pixelRatio && (this.internalProps.pixelRatio = pixelRatio),
|
|
870
881
|
padding && ("number" == typeof padding ? (this.padding.top = padding, this.padding.left = padding,
|
|
871
882
|
this.padding.bottom = padding, this.padding.right = padding) : (padding.top && (this.padding.top = padding.top),
|
|
@@ -876,36 +887,45 @@ class BaseTable extends EventTarget_1.EventTarget {
|
|
|
876
887
|
this._widthAdaptiveMode = null != widthAdaptiveMode ? widthAdaptiveMode : "only-body",
|
|
877
888
|
this._heightAdaptiveMode = null != heightAdaptiveMode ? heightAdaptiveMode : "only-body",
|
|
878
889
|
this.autoFillWidth = null != autoFillWidth && autoFillWidth, this.autoFillHeight = null != autoFillHeight && autoFillHeight,
|
|
879
|
-
|
|
890
|
+
void 0 !== containerFit && (this._containerFit = "boolean" == typeof containerFit ? {
|
|
891
|
+
width: containerFit,
|
|
892
|
+
height: containerFit
|
|
893
|
+
} : containerFit && "object" == typeof containerFit ? {
|
|
894
|
+
width: null === (_b = containerFit.width) || void 0 === _b || _b,
|
|
895
|
+
height: null === (_c = containerFit.height) || void 0 === _c || _c
|
|
896
|
+
} : {
|
|
897
|
+
width: !1,
|
|
898
|
+
height: !1
|
|
899
|
+
}), this.customRender = customRender, this.canvasWidth = (0, vutils_1.isNumber)(canvasWidth) ? canvasWidth : void 0,
|
|
880
900
|
this.canvasHeight = (0, vutils_1.isNumber)(canvasHeight) ? canvasHeight : void 0;
|
|
881
901
|
const internalProps = this.internalProps;
|
|
882
902
|
if ("node" === env_1.Env.mode || options.canvas || (0, tableHelper_1.updateRootElementPadding)(internalProps.element, this.padding),
|
|
883
|
-
this.columnWidthComputeMode = null !== (
|
|
903
|
+
this.columnWidthComputeMode = null !== (_d = options.columnWidthComputeMode) && void 0 !== _d ? _d : "normal",
|
|
884
904
|
internalProps.frozenColCount = frozenColCount, internalProps.unfreezeAllOnExceedsMaxWidth = null == unfreezeAllOnExceedsMaxWidth || unfreezeAllOnExceedsMaxWidth,
|
|
885
905
|
internalProps.defaultRowHeight = defaultRowHeight, internalProps.defaultHeaderRowHeight = null != defaultHeaderRowHeight ? defaultHeaderRowHeight : defaultRowHeight,
|
|
886
906
|
internalProps.defaultColWidth = defaultColWidth, internalProps.defaultHeaderColWidth = null != defaultHeaderColWidth ? defaultHeaderColWidth : defaultColWidth,
|
|
887
907
|
internalProps.keyboardOptions = keyboardOptions, internalProps.eventOptions = eventOptions,
|
|
888
908
|
internalProps.rowSeriesNumber = rowSeriesNumber, internalProps.enableCheckboxCascade = enableCheckboxCascade,
|
|
889
|
-
internalProps.columnResizeMode = null !== (
|
|
890
|
-
internalProps.rowResizeMode = null !== (
|
|
891
|
-
internalProps.dragHeaderMode = null !== (
|
|
909
|
+
internalProps.columnResizeMode = null !== (_e = null == resize ? void 0 : resize.columnResizeMode) && void 0 !== _e ? _e : columnResizeMode,
|
|
910
|
+
internalProps.rowResizeMode = null !== (_f = null == resize ? void 0 : resize.rowResizeMode) && void 0 !== _f ? _f : rowResizeMode,
|
|
911
|
+
internalProps.dragHeaderMode = null !== (_h = null !== (_g = null == dragOrder ? void 0 : dragOrder.dragHeaderMode) && void 0 !== _g ? _g : dragHeaderMode) && void 0 !== _h ? _h : "none",
|
|
892
912
|
internalProps.renderChartAsync = renderChartAsync, (0, chart_render_helper_1.setBatchRenderChartCount)(renderChartAsyncBatchCount),
|
|
893
913
|
internalProps.overscrollBehavior = null != overscrollBehavior ? overscrollBehavior : "auto",
|
|
894
914
|
internalProps.cellTextOverflows = {}, internalProps._rowHeightsMap = new row_height_map_1.NumberRangeMap(this),
|
|
895
915
|
internalProps._rowRangeHeightsMap = new Map, internalProps._colRangeWidthsMap = new Map,
|
|
896
916
|
internalProps._widthResizedColMap = new Set, internalProps._heightResizedRowMap = new Set,
|
|
897
917
|
this.colWidthsMap = new NumberMap_1.NumberMap, this.colContentWidthsMap = new NumberMap_1.NumberMap,
|
|
898
|
-
this.colWidthsLimit = {}, internalProps.stick.changedCells.clear(), internalProps.theme = themes_1.default.of(null !== (
|
|
918
|
+
this.colWidthsLimit = {}, internalProps.stick.changedCells.clear(), internalProps.theme = themes_1.default.of(null !== (_j = options.theme) && void 0 !== _j ? _j : themes_1.default.DEFAULT),
|
|
899
919
|
internalProps.theme.isPivot = this.isPivotTable(), (0, icons_1.setIconColor)(internalProps.theme.functionalIconsStyle),
|
|
900
920
|
this.scenegraph.updateStageBackground(), internalProps.autoWrapText = options.autoWrapText,
|
|
901
|
-
internalProps.enableLineBreak = options.enableLineBreak, internalProps.allowFrozenColCount = null !== (
|
|
902
|
-
internalProps.limitMaxAutoWidth = null !== (
|
|
921
|
+
internalProps.enableLineBreak = options.enableLineBreak, internalProps.allowFrozenColCount = null !== (_k = options.allowFrozenColCount) && void 0 !== _k ? _k : 0,
|
|
922
|
+
internalProps.limitMaxAutoWidth = null !== (_l = options.limitMaxAutoWidth) && void 0 !== _l ? _l : 450,
|
|
903
923
|
internalProps.limitMinWidth = null != limitMinWidth ? "number" == typeof limitMinWidth ? limitMinWidth : limitMinWidth ? 10 : 0 : 10,
|
|
904
924
|
internalProps.limitMinHeight = null != limitMinHeight ? "number" == typeof limitMinHeight ? limitMinHeight : limitMinHeight ? 10 : 0 : 10,
|
|
905
|
-
null === (
|
|
925
|
+
null === (_m = internalProps.legends) || void 0 === _m || _m.forEach((legend => {
|
|
906
926
|
null == legend || legend.release();
|
|
907
|
-
})), null === (
|
|
908
|
-
null === (
|
|
927
|
+
})), null === (_o = internalProps.title) || void 0 === _o || _o.release(), internalProps.title = null,
|
|
928
|
+
null === (_p = internalProps.emptyTip) || void 0 === _p || _p.release(), internalProps.emptyTip = null,
|
|
909
929
|
internalProps.layoutMap.release(), (0, chart_render_helper_1.clearChartRenderQueue)(),
|
|
910
930
|
this.scenegraph.clearCells(), this.scenegraph.updateComponent(), this.stateManager.updateOptionSetState(),
|
|
911
931
|
this._updateSize(), this.eventManager.updateEventBinder(), options.legends) {
|
|
@@ -934,15 +954,15 @@ class BaseTable extends EventTarget_1.EventTarget {
|
|
|
934
954
|
}
|
|
935
955
|
if (internalProps.menu = Object.assign({
|
|
936
956
|
renderMode: "html"
|
|
937
|
-
}, options.menu), Array.isArray(null === (
|
|
938
|
-
(Array.isArray(null === (
|
|
957
|
+
}, 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),
|
|
958
|
+
(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),
|
|
939
959
|
"html" === internalProps.menu.renderMode && !internalProps.menuHandler) {
|
|
940
960
|
const MenuHandler = factory_1.Factory.getComponent("menuHandler");
|
|
941
961
|
internalProps.menuHandler = new MenuHandler(this);
|
|
942
962
|
}
|
|
943
963
|
this.clearCellStyleCache(), this.clearColWidthCache(), this.clearRowHeightCache(),
|
|
944
964
|
internalProps.customMergeCell = (0, get_custom_merge_cell_func_1.getCustomMergeCellFunc)(options.customMergeCell),
|
|
945
|
-
null === (
|
|
965
|
+
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 : []),
|
|
946
966
|
this._adjustCanvasSizeByOption();
|
|
947
967
|
}
|
|
948
968
|
renderWithRecreateCells() {
|
|
@@ -1886,6 +1906,22 @@ class BaseTable extends EventTarget_1.EventTarget {
|
|
|
1886
1906
|
checkHasColumnAutoWidth() {
|
|
1887
1907
|
return (0, tableHelper_1.checkHasColumnAutoWidth)(this);
|
|
1888
1908
|
}
|
|
1909
|
+
get containerFit() {
|
|
1910
|
+
return this._containerFit;
|
|
1911
|
+
}
|
|
1912
|
+
set containerFit(containerFit) {
|
|
1913
|
+
var _a, _b;
|
|
1914
|
+
this._containerFit = "boolean" == typeof containerFit ? {
|
|
1915
|
+
width: containerFit,
|
|
1916
|
+
height: containerFit
|
|
1917
|
+
} : containerFit && "object" == typeof containerFit ? {
|
|
1918
|
+
width: null === (_a = containerFit.width) || void 0 === _a || _a,
|
|
1919
|
+
height: null === (_b = containerFit.height) || void 0 === _b || _b
|
|
1920
|
+
} : {
|
|
1921
|
+
width: !1,
|
|
1922
|
+
height: !1
|
|
1923
|
+
};
|
|
1924
|
+
}
|
|
1889
1925
|
}
|
|
1890
1926
|
|
|
1891
1927
|
exports.BaseTable = BaseTable;
|