@visactor/vtable 0.23.4 → 0.24.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 +5 -1
- package/cjs/ListTable.js +20 -5
- package/cjs/ListTable.js.map +1 -1
- package/cjs/PivotChart.d.ts +1 -1
- package/cjs/PivotChart.js +5 -3
- package/cjs/PivotChart.js.map +1 -1
- package/cjs/PivotTable.d.ts +4 -1
- package/cjs/PivotTable.js +31 -14
- package/cjs/PivotTable.js.map +1 -1
- package/cjs/body-helper/body-helper.d.ts +2 -1
- package/cjs/body-helper/body-helper.js +4 -1
- package/cjs/body-helper/body-helper.js.map +1 -1
- package/cjs/body-helper/style/RadioStyle.d.ts +45 -0
- package/cjs/body-helper/style/RadioStyle.js +111 -0
- package/cjs/body-helper/style/RadioStyle.js.map +1 -0
- package/cjs/body-helper/style.js +3 -3
- package/cjs/body-helper/style.js.map +1 -1
- package/cjs/core/BaseTable.d.ts +3 -1
- package/cjs/core/BaseTable.js +16 -6
- package/cjs/core/BaseTable.js.map +1 -1
- package/cjs/core/TABLE_EVENT_TYPE.d.ts +1 -0
- package/cjs/core/TABLE_EVENT_TYPE.js +1 -0
- package/cjs/core/TABLE_EVENT_TYPE.js.map +1 -1
- package/cjs/dataset/dataset.js +1 -1
- package/cjs/dataset/dataset.js.map +1 -1
- package/cjs/dataset/flatDataToObject.d.ts +1 -0
- package/cjs/dataset/flatDataToObject.js +7 -1
- package/cjs/dataset/flatDataToObject.js.map +1 -1
- package/cjs/edit/edit-manager.js +2 -0
- package/cjs/edit/edit-manager.js.map +1 -1
- package/cjs/event/event.js +1 -1
- package/cjs/event/event.js.map +1 -1
- package/cjs/event/listener/table-group.js +42 -0
- package/cjs/event/listener/table-group.js.map +1 -1
- package/cjs/event/util.d.ts +1 -0
- package/cjs/event/util.js +3 -2
- package/cjs/event/util.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/pivot-header-layout.d.ts +2 -2
- package/cjs/layout/pivot-header-layout.js +8 -11
- package/cjs/layout/pivot-header-layout.js.map +1 -1
- package/cjs/layout/tree-helper.js +6 -6
- package/cjs/layout/tree-helper.js.map +1 -1
- package/cjs/render/jsx/index.d.ts +3 -1
- package/cjs/render/jsx/index.js +10 -2
- package/cjs/render/jsx/index.js.map +1 -1
- package/cjs/render/layout/index.d.ts +1 -0
- package/cjs/render/layout/index.js +20 -6
- package/cjs/render/layout/index.js.map +1 -1
- package/cjs/scenegraph/component/custom.js +3 -3
- package/cjs/scenegraph/component/custom.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-helper.js +13 -11
- package/cjs/scenegraph/group-creater/cell-helper.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-type/chart-cell.d.ts +1 -1
- package/cjs/scenegraph/group-creater/cell-type/chart-cell.js +20 -5
- package/cjs/scenegraph/group-creater/cell-type/chart-cell.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-type/checkbox-cell.d.ts +1 -1
- package/cjs/scenegraph/group-creater/cell-type/checkbox-cell.js +24 -9
- package/cjs/scenegraph/group-creater/cell-type/checkbox-cell.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-type/image-cell.d.ts +5 -5
- package/cjs/scenegraph/group-creater/cell-type/image-cell.js +21 -5
- package/cjs/scenegraph/group-creater/cell-type/image-cell.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-type/radio-cell.d.ts +5 -0
- package/cjs/scenegraph/group-creater/cell-type/radio-cell.js +148 -0
- package/cjs/scenegraph/group-creater/cell-type/radio-cell.js.map +1 -0
- package/cjs/scenegraph/group-creater/cell-type/spark-line-cell.d.ts +1 -1
- package/cjs/scenegraph/group-creater/cell-type/spark-line-cell.js +19 -4
- package/cjs/scenegraph/group-creater/cell-type/spark-line-cell.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-type/text-cell.d.ts +1 -1
- package/cjs/scenegraph/group-creater/cell-type/text-cell.js +24 -8
- package/cjs/scenegraph/group-creater/cell-type/text-cell.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-type/video-cell.d.ts +1 -1
- package/cjs/scenegraph/group-creater/cell-type/video-cell.js +21 -5
- package/cjs/scenegraph/group-creater/cell-type/video-cell.js.map +1 -1
- package/cjs/scenegraph/group-creater/column-helper.d.ts +1 -1
- package/cjs/scenegraph/group-creater/column-helper.js +12 -2
- package/cjs/scenegraph/group-creater/column-helper.js.map +1 -1
- package/cjs/scenegraph/group-creater/progress/proxy.js.map +1 -1
- package/cjs/scenegraph/layout/compute-col-width.js +26 -6
- package/cjs/scenegraph/layout/compute-col-width.js.map +1 -1
- package/cjs/scenegraph/layout/compute-row-height.js +12 -34
- package/cjs/scenegraph/layout/compute-row-height.js.map +1 -1
- package/cjs/scenegraph/layout/height-util.d.ts +5 -0
- package/cjs/scenegraph/layout/height-util.js +88 -0
- package/cjs/scenegraph/layout/height-util.js.map +1 -0
- package/cjs/scenegraph/layout/update-height.js +1 -1
- package/cjs/scenegraph/layout/update-height.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/scenegraph.js +1 -1
- package/cjs/scenegraph/utils/break-string.d.ts +2 -1
- package/cjs/scenegraph/utils/break-string.js +13 -30
- package/cjs/scenegraph/utils/break-string.js.map +1 -1
- package/cjs/scenegraph/utils/text-icon-layout.js +7 -7
- package/cjs/scenegraph/utils/text-icon-layout.js.map +1 -1
- package/cjs/state/checkbox/checkbox.d.ts +9 -0
- package/cjs/state/checkbox/checkbox.js +108 -0
- package/cjs/state/checkbox/checkbox.js.map +1 -0
- package/cjs/state/radio/radio.d.ts +6 -0
- package/cjs/state/radio/radio.js +80 -0
- package/cjs/state/radio/radio.js.map +1 -0
- package/cjs/state/state.d.ts +3 -0
- package/cjs/state/state.js +15 -71
- package/cjs/state/state.js.map +1 -1
- package/cjs/themes/component.js +1 -1
- package/cjs/themes/theme.d.ts +2 -0
- package/cjs/themes/theme.js +10 -1
- package/cjs/themes/theme.js.map +1 -1
- package/cjs/ts-types/base-table.d.ts +4 -1
- package/cjs/ts-types/base-table.js.map +1 -1
- package/cjs/ts-types/column/style.d.ts +20 -0
- package/cjs/ts-types/column/style.js.map +1 -1
- package/cjs/ts-types/column/type.d.ts +1 -1
- package/cjs/ts-types/column/type.js.map +1 -1
- package/cjs/ts-types/events.d.ts +4 -0
- package/cjs/ts-types/events.js.map +1 -1
- package/cjs/ts-types/list-table/define/index.d.ts +4 -2
- package/cjs/ts-types/list-table/define/index.js.map +1 -1
- package/cjs/ts-types/list-table/define/radio-define.d.ts +11 -0
- package/cjs/ts-types/list-table/define/radio-define.js +6 -0
- package/cjs/ts-types/list-table/define/radio-define.js.map +1 -0
- package/cjs/ts-types/list-table/layout-map/api.d.ts +1 -1
- package/cjs/ts-types/list-table/layout-map/api.js.map +1 -1
- package/cjs/ts-types/table-engine.d.ts +1 -1
- package/cjs/ts-types/table-engine.js.map +1 -1
- package/cjs/ts-types/theme.d.ts +2 -1
- package/cjs/ts-types/theme.js.map +1 -1
- package/cjs/vrender.js.map +1 -1
- package/dist/vtable.js +2286 -901
- package/dist/vtable.min.js +2 -2
- package/es/ListTable.d.ts +5 -1
- package/es/ListTable.js +23 -4
- package/es/ListTable.js.map +1 -1
- package/es/PivotChart.d.ts +1 -1
- package/es/PivotChart.js +5 -3
- package/es/PivotChart.js.map +1 -1
- package/es/PivotTable.d.ts +4 -1
- package/es/PivotTable.js +31 -14
- package/es/PivotTable.js.map +1 -1
- package/es/body-helper/body-helper.d.ts +2 -1
- package/es/body-helper/body-helper.js +5 -0
- package/es/body-helper/body-helper.js.map +1 -1
- package/es/body-helper/style/RadioStyle.d.ts +45 -0
- package/es/body-helper/style/RadioStyle.js +103 -0
- package/es/body-helper/style/RadioStyle.js.map +1 -0
- package/es/body-helper/style.js +4 -2
- package/es/body-helper/style.js.map +1 -1
- package/es/core/BaseTable.d.ts +3 -1
- package/es/core/BaseTable.js +16 -6
- package/es/core/BaseTable.js.map +1 -1
- package/es/core/TABLE_EVENT_TYPE.d.ts +1 -0
- package/es/core/TABLE_EVENT_TYPE.js +1 -0
- package/es/core/TABLE_EVENT_TYPE.js.map +1 -1
- package/es/dataset/dataset.js +1 -1
- package/es/dataset/dataset.js.map +1 -1
- package/es/dataset/flatDataToObject.d.ts +1 -0
- package/es/dataset/flatDataToObject.js +7 -1
- package/es/dataset/flatDataToObject.js.map +1 -1
- package/es/edit/edit-manager.js +2 -0
- package/es/edit/edit-manager.js.map +1 -1
- package/es/event/event.js +1 -1
- package/es/event/event.js.map +1 -1
- package/es/event/listener/table-group.js +41 -1
- package/es/event/listener/table-group.js.map +1 -1
- package/es/event/util.d.ts +1 -0
- package/es/event/util.js +2 -0
- package/es/event/util.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/pivot-header-layout.d.ts +2 -2
- package/es/layout/pivot-header-layout.js +8 -11
- package/es/layout/pivot-header-layout.js.map +1 -1
- package/es/layout/tree-helper.js +6 -6
- package/es/layout/tree-helper.js.map +1 -1
- package/es/render/jsx/index.d.ts +3 -1
- package/es/render/jsx/index.js +9 -1
- package/es/render/jsx/index.js.map +1 -1
- package/es/render/layout/index.d.ts +1 -0
- package/es/render/layout/index.js +2 -0
- package/es/render/layout/index.js.map +1 -1
- package/es/scenegraph/component/custom.js +3 -3
- package/es/scenegraph/component/custom.js.map +1 -1
- package/es/scenegraph/group-creater/cell-helper.js +12 -10
- package/es/scenegraph/group-creater/cell-helper.js.map +1 -1
- package/es/scenegraph/group-creater/cell-type/chart-cell.d.ts +1 -1
- package/es/scenegraph/group-creater/cell-type/chart-cell.js +20 -5
- package/es/scenegraph/group-creater/cell-type/chart-cell.js.map +1 -1
- package/es/scenegraph/group-creater/cell-type/checkbox-cell.d.ts +1 -1
- package/es/scenegraph/group-creater/cell-type/checkbox-cell.js +23 -8
- package/es/scenegraph/group-creater/cell-type/checkbox-cell.js.map +1 -1
- package/es/scenegraph/group-creater/cell-type/image-cell.d.ts +5 -5
- package/es/scenegraph/group-creater/cell-type/image-cell.js +21 -5
- package/es/scenegraph/group-creater/cell-type/image-cell.js.map +1 -1
- package/es/scenegraph/group-creater/cell-type/radio-cell.d.ts +5 -0
- package/es/scenegraph/group-creater/cell-type/radio-cell.js +141 -0
- package/es/scenegraph/group-creater/cell-type/radio-cell.js.map +1 -0
- package/es/scenegraph/group-creater/cell-type/spark-line-cell.d.ts +1 -1
- package/es/scenegraph/group-creater/cell-type/spark-line-cell.js +19 -4
- package/es/scenegraph/group-creater/cell-type/spark-line-cell.js.map +1 -1
- package/es/scenegraph/group-creater/cell-type/text-cell.d.ts +1 -1
- package/es/scenegraph/group-creater/cell-type/text-cell.js +24 -8
- package/es/scenegraph/group-creater/cell-type/text-cell.js.map +1 -1
- package/es/scenegraph/group-creater/cell-type/video-cell.d.ts +1 -1
- package/es/scenegraph/group-creater/cell-type/video-cell.js +21 -5
- package/es/scenegraph/group-creater/cell-type/video-cell.js.map +1 -1
- package/es/scenegraph/group-creater/column-helper.d.ts +1 -1
- package/es/scenegraph/group-creater/column-helper.js +13 -1
- package/es/scenegraph/group-creater/column-helper.js.map +1 -1
- package/es/scenegraph/group-creater/progress/proxy.js.map +1 -1
- package/es/scenegraph/layout/compute-col-width.js +22 -7
- package/es/scenegraph/layout/compute-col-width.js.map +1 -1
- package/es/scenegraph/layout/compute-row-height.js +12 -36
- package/es/scenegraph/layout/compute-row-height.js.map +1 -1
- package/es/scenegraph/layout/height-util.d.ts +5 -0
- package/es/scenegraph/layout/height-util.js +83 -0
- package/es/scenegraph/layout/height-util.js.map +1 -0
- package/es/scenegraph/layout/update-height.js +1 -1
- package/es/scenegraph/layout/update-height.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/scenegraph.js +1 -1
- package/es/scenegraph/utils/break-string.d.ts +2 -1
- package/es/scenegraph/utils/break-string.js +6 -27
- package/es/scenegraph/utils/break-string.js.map +1 -1
- package/es/scenegraph/utils/text-icon-layout.js +8 -8
- package/es/scenegraph/utils/text-icon-layout.js.map +1 -1
- package/es/state/checkbox/checkbox.d.ts +9 -0
- package/es/state/checkbox/checkbox.js +99 -0
- package/es/state/checkbox/checkbox.js.map +1 -0
- package/es/state/radio/radio.d.ts +6 -0
- package/es/state/radio/radio.js +65 -0
- package/es/state/radio/radio.js.map +1 -0
- package/es/state/state.d.ts +3 -0
- package/es/state/state.js +18 -71
- package/es/state/state.js.map +1 -1
- package/es/themes/component.js +1 -1
- package/es/themes/theme.d.ts +2 -0
- package/es/themes/theme.js +9 -1
- package/es/themes/theme.js.map +1 -1
- package/es/ts-types/base-table.d.ts +4 -1
- package/es/ts-types/base-table.js.map +1 -1
- package/es/ts-types/column/style.d.ts +20 -0
- package/es/ts-types/column/style.js.map +1 -1
- package/es/ts-types/column/type.d.ts +1 -1
- package/es/ts-types/column/type.js.map +1 -1
- package/es/ts-types/events.d.ts +4 -0
- package/es/ts-types/events.js.map +1 -1
- package/es/ts-types/list-table/define/index.d.ts +4 -2
- package/es/ts-types/list-table/define/index.js.map +1 -1
- package/es/ts-types/list-table/define/radio-define.d.ts +11 -0
- package/es/ts-types/list-table/define/radio-define.js +2 -0
- package/es/ts-types/list-table/define/radio-define.js.map +1 -0
- package/es/ts-types/list-table/layout-map/api.d.ts +1 -1
- package/es/ts-types/list-table/layout-map/api.js.map +1 -1
- package/es/ts-types/table-engine.d.ts +1 -1
- package/es/ts-types/table-engine.js.map +1 -1
- package/es/ts-types/theme.d.ts +2 -1
- package/es/ts-types/theme.js.map +1 -1
- package/es/vrender.js.map +1 -1
- package/package.json +7 -7
- package/cjs/scenegraph/layout/auto-height.d.ts +0 -1
- package/cjs/scenegraph/layout/auto-height.js +0 -15
- package/cjs/scenegraph/layout/auto-height.js.map +0 -1
- package/es/scenegraph/layout/auto-height.d.ts +0 -1
- package/es/scenegraph/layout/auto-height.js +0 -11
- package/es/scenegraph/layout/auto-height.js.map +0 -1
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type { RadioStyleOption, IStyleOption } from '../../ts-types';
|
|
2
|
+
import { Style } from './Style';
|
|
3
|
+
import type { RadioStyle as RadioStyleThemeOption } from '../../ts-types/column/style';
|
|
4
|
+
export declare class RadioStyle extends Style {
|
|
5
|
+
private _size;
|
|
6
|
+
private _spaceBetweenTextAndIcon;
|
|
7
|
+
private _spaceBetweenRadio;
|
|
8
|
+
private _outerRadius?;
|
|
9
|
+
private _innerRadius?;
|
|
10
|
+
private _defaultFill?;
|
|
11
|
+
private _defaultStroke?;
|
|
12
|
+
private _disableFill?;
|
|
13
|
+
private _checkedFill?;
|
|
14
|
+
private _checkedStroke?;
|
|
15
|
+
private _disableCheckedFill?;
|
|
16
|
+
private _disableCheckedStroke?;
|
|
17
|
+
static get DEFAULT(): RadioStyle;
|
|
18
|
+
constructor(style?: RadioStyleOption, headerStyle?: RadioStyleOption, radioThemeStyle?: RadioStyleThemeOption);
|
|
19
|
+
get size(): number;
|
|
20
|
+
set size(size: number);
|
|
21
|
+
get spaceBetweenTextAndIcon(): number;
|
|
22
|
+
set spaceBetweenTextAndIcon(spaceBetweenTextAndIcon: number);
|
|
23
|
+
get spaceBetweenRadio(): number;
|
|
24
|
+
set spaceBetweenRadio(spaceBetweenRadio: number);
|
|
25
|
+
get innerRadius(): number;
|
|
26
|
+
set innerRadius(innerRadius: number);
|
|
27
|
+
get outerRadius(): number;
|
|
28
|
+
set outerRadius(outerRadius: number);
|
|
29
|
+
get defaultFill(): string;
|
|
30
|
+
set defaultFill(defaultFill: string);
|
|
31
|
+
get defaultStroke(): string;
|
|
32
|
+
set defaultStroke(defaultStroke: string);
|
|
33
|
+
get disableFill(): string;
|
|
34
|
+
set disableFill(disableFill: string);
|
|
35
|
+
get checkedFill(): string;
|
|
36
|
+
set checkedFill(checkedFill: string);
|
|
37
|
+
get checkedStroke(): string;
|
|
38
|
+
set checkedStroke(checkedStroke: string);
|
|
39
|
+
get disableCheckedFill(): string;
|
|
40
|
+
set disableCheckedFill(disableCheckedFill: string);
|
|
41
|
+
get disableCheckedStroke(): string;
|
|
42
|
+
set disableCheckedStroke(disableCheckedStroke: string);
|
|
43
|
+
getStyle(style: IStyleOption): RadioStyle;
|
|
44
|
+
clone(): RadioStyle;
|
|
45
|
+
}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { Style } from "./Style";
|
|
2
|
+
|
|
3
|
+
let defaultStyle;
|
|
4
|
+
|
|
5
|
+
export class RadioStyle extends Style {
|
|
6
|
+
static get DEFAULT() {
|
|
7
|
+
return defaultStyle || (defaultStyle = new RadioStyle);
|
|
8
|
+
}
|
|
9
|
+
constructor(style = {}, headerStyle = {}, radioThemeStyle = {}) {
|
|
10
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z;
|
|
11
|
+
super(style, headerStyle), this._size = (null !== (_b = null !== (_a = null == style ? void 0 : style.size) && void 0 !== _a ? _a : null == headerStyle ? void 0 : headerStyle.size) && void 0 !== _b ? _b : null == radioThemeStyle ? void 0 : radioThemeStyle.size) || 14,
|
|
12
|
+
this._spaceBetweenTextAndIcon = (null !== (_d = null !== (_c = null == style ? void 0 : style.spaceBetweenTextAndIcon) && void 0 !== _c ? _c : null == headerStyle ? void 0 : headerStyle.spaceBetweenTextAndIcon) && void 0 !== _d ? _d : null == radioThemeStyle ? void 0 : radioThemeStyle.spaceBetweenTextAndIcon) || 8,
|
|
13
|
+
this._spaceBetweenRadio = (null !== (_f = null !== (_e = null == style ? void 0 : style.spaceBetweenRadio) && void 0 !== _e ? _e : null == headerStyle ? void 0 : headerStyle.spaceBetweenRadio) && void 0 !== _f ? _f : null == radioThemeStyle ? void 0 : radioThemeStyle.spaceBetweenRadio) || 2,
|
|
14
|
+
this._innerRadius = null !== (_h = null === (_g = null == style ? void 0 : style.radioStyle) || void 0 === _g ? void 0 : _g.innerRadius) && void 0 !== _h ? _h : null == radioThemeStyle ? void 0 : radioThemeStyle.innerRadius,
|
|
15
|
+
this._outerRadius = null !== (_k = null === (_j = null == style ? void 0 : style.radioStyle) || void 0 === _j ? void 0 : _j.outerRadius) && void 0 !== _k ? _k : null == radioThemeStyle ? void 0 : radioThemeStyle.outerRadius,
|
|
16
|
+
this._defaultFill = null !== (_m = null === (_l = null == style ? void 0 : style.radioStyle) || void 0 === _l ? void 0 : _l.defaultFill) && void 0 !== _m ? _m : null == radioThemeStyle ? void 0 : radioThemeStyle.defaultFill,
|
|
17
|
+
this._defaultStroke = null !== (_p = null === (_o = null == style ? void 0 : style.radioStyle) || void 0 === _o ? void 0 : _o.defaultStroke) && void 0 !== _p ? _p : null == radioThemeStyle ? void 0 : radioThemeStyle.defaultStroke,
|
|
18
|
+
this._disableFill = null !== (_r = null === (_q = null == style ? void 0 : style.radioStyle) || void 0 === _q ? void 0 : _q.disableFill) && void 0 !== _r ? _r : null == radioThemeStyle ? void 0 : radioThemeStyle.disableFill,
|
|
19
|
+
this._checkedFill = null !== (_t = null === (_s = null == style ? void 0 : style.radioStyle) || void 0 === _s ? void 0 : _s.checkedFill) && void 0 !== _t ? _t : null == radioThemeStyle ? void 0 : radioThemeStyle.checkedFill,
|
|
20
|
+
this._checkedStroke = null !== (_v = null === (_u = null == style ? void 0 : style.radioStyle) || void 0 === _u ? void 0 : _u.checkedStroke) && void 0 !== _v ? _v : null == radioThemeStyle ? void 0 : radioThemeStyle.checkedStroke,
|
|
21
|
+
this._disableCheckedFill = null !== (_x = null === (_w = null == style ? void 0 : style.radioStyle) || void 0 === _w ? void 0 : _w.disableCheckedFill) && void 0 !== _x ? _x : null == radioThemeStyle ? void 0 : radioThemeStyle.disableCheckedFill,
|
|
22
|
+
this._disableCheckedStroke = null !== (_z = null === (_y = null == style ? void 0 : style.radioStyle) || void 0 === _y ? void 0 : _y.disableCheckedStroke) && void 0 !== _z ? _z : null == radioThemeStyle ? void 0 : radioThemeStyle.disableCheckedStroke;
|
|
23
|
+
}
|
|
24
|
+
get size() {
|
|
25
|
+
return this._size;
|
|
26
|
+
}
|
|
27
|
+
set size(size) {
|
|
28
|
+
this._size = size;
|
|
29
|
+
}
|
|
30
|
+
get spaceBetweenTextAndIcon() {
|
|
31
|
+
return this._spaceBetweenTextAndIcon;
|
|
32
|
+
}
|
|
33
|
+
set spaceBetweenTextAndIcon(spaceBetweenTextAndIcon) {
|
|
34
|
+
this._spaceBetweenTextAndIcon = spaceBetweenTextAndIcon;
|
|
35
|
+
}
|
|
36
|
+
get spaceBetweenRadio() {
|
|
37
|
+
return this._spaceBetweenRadio;
|
|
38
|
+
}
|
|
39
|
+
set spaceBetweenRadio(spaceBetweenRadio) {
|
|
40
|
+
this._spaceBetweenRadio = spaceBetweenRadio;
|
|
41
|
+
}
|
|
42
|
+
get innerRadius() {
|
|
43
|
+
return this._innerRadius;
|
|
44
|
+
}
|
|
45
|
+
set innerRadius(innerRadius) {
|
|
46
|
+
this._innerRadius = innerRadius;
|
|
47
|
+
}
|
|
48
|
+
get outerRadius() {
|
|
49
|
+
return this._outerRadius;
|
|
50
|
+
}
|
|
51
|
+
set outerRadius(outerRadius) {
|
|
52
|
+
this._outerRadius = outerRadius;
|
|
53
|
+
}
|
|
54
|
+
get defaultFill() {
|
|
55
|
+
return this._defaultFill;
|
|
56
|
+
}
|
|
57
|
+
set defaultFill(defaultFill) {
|
|
58
|
+
this._defaultFill = defaultFill;
|
|
59
|
+
}
|
|
60
|
+
get defaultStroke() {
|
|
61
|
+
return this._defaultStroke;
|
|
62
|
+
}
|
|
63
|
+
set defaultStroke(defaultStroke) {
|
|
64
|
+
this._defaultStroke = defaultStroke;
|
|
65
|
+
}
|
|
66
|
+
get disableFill() {
|
|
67
|
+
return this._disableFill;
|
|
68
|
+
}
|
|
69
|
+
set disableFill(disableFill) {
|
|
70
|
+
this._disableFill = disableFill;
|
|
71
|
+
}
|
|
72
|
+
get checkedFill() {
|
|
73
|
+
return this._checkedFill;
|
|
74
|
+
}
|
|
75
|
+
set checkedFill(checkedFill) {
|
|
76
|
+
this._checkedFill = checkedFill;
|
|
77
|
+
}
|
|
78
|
+
get checkedStroke() {
|
|
79
|
+
return this._checkedStroke;
|
|
80
|
+
}
|
|
81
|
+
set checkedStroke(checkedStroke) {
|
|
82
|
+
this._checkedStroke = checkedStroke;
|
|
83
|
+
}
|
|
84
|
+
get disableCheckedFill() {
|
|
85
|
+
return this._disableCheckedFill;
|
|
86
|
+
}
|
|
87
|
+
set disableCheckedFill(disableCheckedFill) {
|
|
88
|
+
this._disableCheckedFill = disableCheckedFill;
|
|
89
|
+
}
|
|
90
|
+
get disableCheckedStroke() {
|
|
91
|
+
return this._disableCheckedStroke;
|
|
92
|
+
}
|
|
93
|
+
set disableCheckedStroke(disableCheckedStroke) {
|
|
94
|
+
this._disableCheckedStroke = disableCheckedStroke;
|
|
95
|
+
}
|
|
96
|
+
getStyle(style) {
|
|
97
|
+
return new RadioStyle(style, this);
|
|
98
|
+
}
|
|
99
|
+
clone() {
|
|
100
|
+
return new RadioStyle(this);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
//# sourceMappingURL=RadioStyle.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/body-helper/style/RadioStyle.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAGhC,IAAI,YAAwB,CAAC;AAE7B,MAAM,OAAO,UAAW,SAAQ,KAAK;IAgBnC,MAAM,KAAK,OAAO;QAChB,OAAO,YAAY,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,YAAY,GAAG,IAAI,UAAU,EAAE,CAAC,CAAC;IACzE,CAAC;IACD,YACE,QAA0B,EAAE,EAC5B,cAAgC,EAAE,EAClC,kBAAyC,EAAE;;QAE3C,KAAK,CAAC,KAAK,E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CAAC;IAClC,CAAC;IACD,IAAI,kBAAkB,CAAC,kBAA0B;QAC/C,IAAI,CAAC,mBAAmB,GAAG,kBAAkB,CAAC;IAChD,CAAC;IACD,IAAI,oBAAoB;QACtB,OAAO,IAAI,CAAC,qBAAqB,CAAC;IACpC,CAAC;IACD,IAAI,oBAAoB,CAAC,oBAA4B;QACnD,IAAI,CAAC,qBAAqB,GAAG,oBAAoB,CAAC;IACpD,CAAC;IACD,QAAQ,CAAC,KAAmB;QAC1B,OAAO,IAAI,UAAU,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;IACrC,CAAC;IACD,KAAK;QACH,OAAO,IAAI,UAAU,CAAC,IAAI,CAAC,CAAC;IAC9B,CAAC;CACF","file":"RadioStyle.js","sourcesContent":["import type { RadioStyleOption, IStyleOption } from '../../ts-types';\nimport { Style } from './Style';\nimport type { RadioStyle as RadioStyleThemeOption } from '../../ts-types/column/style';\n\nlet defaultStyle: RadioStyle;\n\nexport class RadioStyle extends Style {\n private _size: number;\n private _spaceBetweenTextAndIcon: number;\n private _spaceBetweenRadio: number;\n\n private _outerRadius?: number;\n private _innerRadius?: number;\n\n private _defaultFill?: string;\n private _defaultStroke?: string;\n private _disableFill?: string;\n private _checkedFill?: string;\n private _checkedStroke?: string;\n private _disableCheckedFill?: string;\n private _disableCheckedStroke?: string;\n\n static get DEFAULT(): RadioStyle {\n return defaultStyle ? defaultStyle : (defaultStyle = new RadioStyle());\n }\n constructor(\n style: RadioStyleOption = {},\n headerStyle: RadioStyleOption = {},\n radioThemeStyle: RadioStyleThemeOption = {}\n ) {\n super(style, headerStyle);\n this._size = (style?.size ?? headerStyle?.size ?? radioThemeStyle?.size) || 14;\n this._spaceBetweenTextAndIcon =\n (style?.spaceBetweenTextAndIcon ??\n headerStyle?.spaceBetweenTextAndIcon ??\n radioThemeStyle?.spaceBetweenTextAndIcon) ||\n 8;\n this._spaceBetweenRadio =\n (style?.spaceBetweenRadio ?? headerStyle?.spaceBetweenRadio ?? radioThemeStyle?.spaceBetweenRadio) || 2;\n\n this._innerRadius = style?.radioStyle?.innerRadius ?? radioThemeStyle?.innerRadius;\n this._outerRadius = style?.radioStyle?.outerRadius ?? radioThemeStyle?.outerRadius;\n\n this._defaultFill = style?.radioStyle?.defaultFill ?? radioThemeStyle?.defaultFill;\n this._defaultStroke = style?.radioStyle?.defaultStroke ?? radioThemeStyle?.defaultStroke;\n this._disableFill = style?.radioStyle?.disableFill ?? radioThemeStyle?.disableFill;\n this._checkedFill = style?.radioStyle?.checkedFill ?? radioThemeStyle?.checkedFill;\n this._checkedStroke = style?.radioStyle?.checkedStroke ?? radioThemeStyle?.checkedStroke;\n this._disableCheckedFill = style?.radioStyle?.disableCheckedFill ?? radioThemeStyle?.disableCheckedFill;\n this._disableCheckedStroke = style?.radioStyle?.disableCheckedStroke ?? radioThemeStyle?.disableCheckedStroke;\n }\n get size(): number {\n return this._size;\n }\n set size(size: number) {\n this._size = size;\n }\n get spaceBetweenTextAndIcon(): number {\n return this._spaceBetweenTextAndIcon;\n }\n set spaceBetweenTextAndIcon(spaceBetweenTextAndIcon: number) {\n this._spaceBetweenTextAndIcon = spaceBetweenTextAndIcon;\n }\n get spaceBetweenRadio(): number {\n return this._spaceBetweenRadio;\n }\n set spaceBetweenRadio(spaceBetweenRadio: number) {\n this._spaceBetweenRadio = spaceBetweenRadio;\n }\n get innerRadius(): number {\n return this._innerRadius;\n }\n set innerRadius(innerRadius: number) {\n this._innerRadius = innerRadius;\n }\n get outerRadius(): number {\n return this._outerRadius;\n }\n set outerRadius(outerRadius: number) {\n this._outerRadius = outerRadius;\n }\n get defaultFill(): string {\n return this._defaultFill;\n }\n set defaultFill(defaultFill: string) {\n this._defaultFill = defaultFill;\n }\n get defaultStroke(): string {\n return this._defaultStroke;\n }\n set defaultStroke(defaultStroke: string) {\n this._defaultStroke = defaultStroke;\n }\n get disableFill(): string {\n return this._disableFill;\n }\n set disableFill(disableFill: string) {\n this._disableFill = disableFill;\n }\n get checkedFill(): string {\n return this._checkedFill;\n }\n set checkedFill(checkedFill: string) {\n this._checkedFill = checkedFill;\n }\n get checkedStroke(): string {\n return this._checkedStroke;\n }\n set checkedStroke(checkedStroke: string) {\n this._checkedStroke = checkedStroke;\n }\n get disableCheckedFill(): string {\n return this._disableCheckedFill;\n }\n set disableCheckedFill(disableCheckedFill: string) {\n this._disableCheckedFill = disableCheckedFill;\n }\n get disableCheckedStroke(): string {\n return this._disableCheckedStroke;\n }\n set disableCheckedStroke(disableCheckedStroke: string) {\n this._disableCheckedStroke = disableCheckedStroke;\n }\n getStyle(style: IStyleOption): RadioStyle {\n return new RadioStyle(style, this);\n }\n clone(): RadioStyle {\n return new RadioStyle(this);\n }\n}\n"]}
|
package/es/body-helper/style.js
CHANGED
|
@@ -10,14 +10,16 @@ import { Style } from "./style/Style";
|
|
|
10
10
|
|
|
11
11
|
import { CheckboxStyle } from "./style/CheckboxStyle";
|
|
12
12
|
|
|
13
|
+
import { RadioStyle } from "./style/RadioStyle";
|
|
14
|
+
|
|
13
15
|
const {EVENT_TYPE: EVENT_TYPE} = Style;
|
|
14
16
|
|
|
15
17
|
export { EVENT_TYPE, Style, NumberStyle, ImageStyle, TextStyle };
|
|
16
18
|
|
|
17
19
|
export function of(columnStyle, bodyStyle, styleArg, StyleClassDef = Style, globalAutoWrapText, theme) {
|
|
18
|
-
var _a;
|
|
20
|
+
var _a, _b;
|
|
19
21
|
return columnStyle || bodyStyle ? columnStyle instanceof Style ? columnStyle : "function" == typeof columnStyle ? of(columnStyle(styleArg), bodyStyle, styleArg, StyleClassDef, globalAutoWrapText, theme) : (columnStyle || (columnStyle = {}),
|
|
20
22
|
globalAutoWrapText && !isValid(columnStyle.autoWrapText) && (columnStyle.autoWrapText = !0),
|
|
21
|
-
StyleClassDef === CheckboxStyle ? new CheckboxStyle(null != columnStyle ? columnStyle : {}, null != bodyStyle ? bodyStyle : {}, null !== (_a = theme.checkboxStyle) && void 0 !== _a ? _a : {}) : new StyleClassDef(null != columnStyle ? columnStyle : {}, null != bodyStyle ? bodyStyle : {})) : StyleClassDef.DEFAULT;
|
|
23
|
+
StyleClassDef === CheckboxStyle ? new CheckboxStyle(null != columnStyle ? columnStyle : {}, null != bodyStyle ? bodyStyle : {}, null !== (_a = theme.checkboxStyle) && void 0 !== _a ? _a : {}) : StyleClassDef === RadioStyle ? new RadioStyle(null != columnStyle ? columnStyle : {}, null != bodyStyle ? bodyStyle : {}, null !== (_b = theme.radioStyle) && void 0 !== _b ? _b : {}) : new StyleClassDef(null != columnStyle ? columnStyle : {}, null != bodyStyle ? bodyStyle : {})) : StyleClassDef.DEFAULT;
|
|
22
24
|
}
|
|
23
25
|
//# sourceMappingURL=style.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/body-helper/style.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAW3C,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAEtC,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"sources":["../src/body-helper/style.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAW3C,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAEtC,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEhD,MAAM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AAX,WAAW,cAAX,WAAW,GAAI,EAAE,CAAQ,EAAE,CAAC,SAAS,aAAT,SAAS,cAAT,SAAS,GAAI,EAAE,CAAQ,CAAC,CAAC;KAChF;IACD,OAAO,aAAa,CAAC,OAAO,CAAC;AAC/B,CAAC","file":"style.js","sourcesContent":["import { isValid } from '@visactor/vutils';\nimport type {\n ColumnStyle,\n ColumnStyleOption,\n FullExtendStyle,\n IImageStyleOption,\n ITextStyleOption,\n IStyleOption,\n StylePropertyFunctionArg\n} from '../ts-types';\n\nimport { ImageStyle } from './style/ImageStyle';\nimport { TextStyle } from './style/MultilineTextStyle';\nimport { NumberStyle } from './style/NumberStyle';\nimport { Style } from './style/Style';\nimport type { TableTheme } from '../themes/theme';\nimport { CheckboxStyle } from './style/CheckboxStyle';\nimport { RadioStyle } from './style/RadioStyle';\n\nconst { EVENT_TYPE } = Style;\nexport {\n EVENT_TYPE,\n Style,\n NumberStyle,\n ImageStyle,\n TextStyle,\n // types\n IStyleOption,\n IImageStyleOption,\n ITextStyleOption\n};\nexport function of(\n columnStyle: ColumnStyleOption,\n bodyStyle: ColumnStyleOption,\n styleArg: StylePropertyFunctionArg,\n StyleClassDef: typeof Style = Style,\n globalAutoWrapText: boolean,\n theme: TableTheme\n): FullExtendStyle {\n if (columnStyle || bodyStyle) {\n if (columnStyle instanceof Style) {\n return columnStyle;\n } else if (typeof columnStyle === 'function') {\n return of(columnStyle(styleArg), bodyStyle, styleArg, StyleClassDef, globalAutoWrapText, theme);\n }\n if (!columnStyle) {\n columnStyle = {};\n }\n if (globalAutoWrapText && !isValid((columnStyle as any).autoWrapText)) {\n (columnStyle as any).autoWrapText = true;\n }\n if (StyleClassDef === CheckboxStyle) {\n return new CheckboxStyle(columnStyle ?? {}, (bodyStyle ?? {}) as any, (theme.checkboxStyle ?? {}) as any);\n } else if (StyleClassDef === RadioStyle) {\n return new RadioStyle(columnStyle ?? {}, (bodyStyle ?? {}) as any, (theme.radioStyle ?? {}) as any);\n }\n return new StyleClassDef((columnStyle ?? {}) as any, (bodyStyle ?? {}) as any);\n }\n return StyleClassDef.DEFAULT;\n}\n"]}
|
package/es/core/BaseTable.d.ts
CHANGED
|
@@ -284,7 +284,7 @@ export declare abstract class BaseTable extends EventTarget implements BaseTable
|
|
|
284
284
|
abstract getRecordShowIndexByCell(col: number, row: number): number;
|
|
285
285
|
abstract getCellOriginRecord(col: number, row: number): MaybePromiseOrUndefined;
|
|
286
286
|
abstract getCellRawRecord(col: number, row: number): MaybePromiseOrUndefined;
|
|
287
|
-
abstract getCellValue(col: number, row: number): FieldData;
|
|
287
|
+
abstract getCellValue(col: number, row: number, skipCustomMerge?: boolean): FieldData;
|
|
288
288
|
abstract getCellOriginValue(col: number, row: number): FieldData;
|
|
289
289
|
abstract getCellRawValue(col: number, row: number): FieldData;
|
|
290
290
|
abstract getTableIndexByRecordIndex(recordIndex: number): number;
|
|
@@ -301,6 +301,8 @@ export declare abstract class BaseTable extends EventTarget implements BaseTable
|
|
|
301
301
|
set dataSource(dataSource: DataSource | CachedDataSource);
|
|
302
302
|
get autoWrapText(): boolean;
|
|
303
303
|
set autoWrapText(autoWrapText: boolean);
|
|
304
|
+
get enableLineBreak(): boolean;
|
|
305
|
+
set enableLineBreak(enableLineBreak: boolean);
|
|
304
306
|
updateAutoWrapText(autoWrapText: boolean): void;
|
|
305
307
|
get theme(): TableTheme;
|
|
306
308
|
set theme(theme: TableTheme);
|
package/es/core/BaseTable.js
CHANGED
|
@@ -82,7 +82,7 @@ export class BaseTable extends EventTarget {
|
|
|
82
82
|
}
|
|
83
83
|
constructor(container, options = {}) {
|
|
84
84
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
85
|
-
if (super(), this.showFrozenIcon = !0, this.version = "0.
|
|
85
|
+
if (super(), this.showFrozenIcon = !0, this.version = "0.24.0", this.id = `VTable${Date.now()}`,
|
|
86
86
|
this.isReleased = !1, this._chartEventMap = {}, this.throttleInvalidate = throttle2(this.render.bind(this), 200),
|
|
87
87
|
!container && "node" !== options.mode) throw new Error("vtable's container is undefined");
|
|
88
88
|
const {frozenColCount: frozenColCount = 0, defaultRowHeight: defaultRowHeight = 40, defaultHeaderRowHeight: defaultHeaderRowHeight, defaultColWidth: defaultColWidth = 80, defaultHeaderColWidth: defaultHeaderColWidth, widthMode: widthMode = "standard", heightMode: heightMode = "standard", autoFillWidth: autoFillWidth = !1, autoFillHeight: autoFillHeight = !1, widthAdaptiveMode: widthAdaptiveMode = "only-body", heightAdaptiveMode: heightAdaptiveMode = "only-body", keyboardOptions: keyboardOptions, eventOptions: eventOptions, rowSeriesNumber: rowSeriesNumber, columnResizeMode: columnResizeMode, dragHeaderMode: dragHeaderMode, 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} = options;
|
|
@@ -128,7 +128,8 @@ export class BaseTable extends EventTarget {
|
|
|
128
128
|
this.options = options, internalProps.theme = themes.of(null !== (_c = options.theme) && void 0 !== _c ? _c : themes.DEFAULT),
|
|
129
129
|
internalProps.theme.isPivot = this.isPivotTable(), internalProps.bodyHelper = new BodyHelper(this),
|
|
130
130
|
internalProps.headerHelper = new HeaderHelper(this), internalProps.rowSeriesNumberHelper = new RowSeriesNumberHelper(this),
|
|
131
|
-
internalProps.autoWrapText = options.autoWrapText, internalProps.
|
|
131
|
+
internalProps.autoWrapText = options.autoWrapText, internalProps.enableLineBreak = options.enableLineBreak,
|
|
132
|
+
internalProps.allowFrozenColCount = null !== (_d = options.allowFrozenColCount) && void 0 !== _d ? _d : 0,
|
|
132
133
|
internalProps.limitMaxAutoWidth = null !== (_e = options.limitMaxAutoWidth) && void 0 !== _e ? _e : 450,
|
|
133
134
|
internalProps.limitMinWidth = null != limitMinWidth ? "number" == typeof limitMinWidth ? limitMinWidth : limitMinWidth ? 10 : 0 : 10,
|
|
134
135
|
this._vDataSet = new DataSet, this.scenegraph = new Scenegraph(this), this.stateManager = new StateManager(this),
|
|
@@ -748,7 +749,7 @@ export class BaseTable extends EventTarget {
|
|
|
748
749
|
return super.fireListeners(type, event);
|
|
749
750
|
}
|
|
750
751
|
updateOption(options) {
|
|
751
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
752
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
752
753
|
this.options = options;
|
|
753
754
|
const {frozenColCount: frozenColCount = 0, defaultRowHeight: defaultRowHeight = 40, defaultHeaderRowHeight: defaultHeaderRowHeight, defaultColWidth: defaultColWidth = 80, defaultHeaderColWidth: defaultHeaderColWidth = 80, keyboardOptions: keyboardOptions, eventOptions: eventOptions, rowSeriesNumber: rowSeriesNumber, columnResizeMode: columnResizeMode, dragHeaderMode: dragHeaderMode, 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, overscrollBehavior: overscrollBehavior, limitMinWidth: limitMinWidth} = options;
|
|
754
755
|
pixelRatio && pixelRatio !== this.internalProps.pixelRatio && (this.internalProps.pixelRatio = pixelRatio),
|
|
@@ -778,7 +779,8 @@ export class BaseTable extends EventTarget {
|
|
|
778
779
|
this.colContentWidthsMap = new NumberMap, this.colWidthsLimit = {}, internalProps.stick.changedCells.clear(),
|
|
779
780
|
internalProps.theme = themes.of(null !== (_b = options.theme) && void 0 !== _b ? _b : themes.DEFAULT),
|
|
780
781
|
internalProps.theme.isPivot = this.isPivotTable(), this.scenegraph.updateStageBackground(),
|
|
781
|
-
internalProps.autoWrapText = options.autoWrapText, internalProps.
|
|
782
|
+
internalProps.autoWrapText = options.autoWrapText, internalProps.enableLineBreak = options.enableLineBreak,
|
|
783
|
+
internalProps.allowFrozenColCount = null !== (_c = options.allowFrozenColCount) && void 0 !== _c ? _c : 0,
|
|
782
784
|
internalProps.limitMaxAutoWidth = null !== (_d = options.limitMaxAutoWidth) && void 0 !== _d ? _d : 450,
|
|
783
785
|
internalProps.limitMinWidth = null != limitMinWidth ? "number" == typeof limitMinWidth ? limitMinWidth : limitMinWidth ? 10 : 0 : 10,
|
|
784
786
|
this._vDataSet = new DataSet, null === (_e = internalProps.legends) || void 0 === _e || _e.release(),
|
|
@@ -795,9 +797,11 @@ export class BaseTable extends EventTarget {
|
|
|
795
797
|
}, options.tooltip), "html" !== internalProps.tooltip.renderMode || internalProps.tooltipHandler || (internalProps.tooltipHandler = new TooltipHandler(this, internalProps.tooltip.confine)),
|
|
796
798
|
internalProps.menu = Object.assign({
|
|
797
799
|
renderMode: "html"
|
|
798
|
-
}, options.menu),
|
|
800
|
+
}, options.menu), Array.isArray(null === (_g = options.menu) || void 0 === _g ? void 0 : _g.dropDownMenuHighlight) && this.setDropDownMenuHighlight(null === (_h = options.menu) || void 0 === _h ? void 0 : _h.dropDownMenuHighlight),
|
|
801
|
+
Array.isArray(null === (_j = options.menu) || void 0 === _j ? void 0 : _j.defaultHeaderMenuItems) && (this.globalDropDownMenu = options.menu.defaultHeaderMenuItems),
|
|
802
|
+
"html" !== internalProps.menu.renderMode || internalProps.menuHandler || (internalProps.menuHandler = new MenuHandler(this)),
|
|
799
803
|
this.clearCellStyleCache(), this.clearColWidthCache(), this.clearRowHeightCache(),
|
|
800
|
-
internalProps.customMergeCell = options.customMergeCell, this.customCellStylePlugin.updateCustomCell(null !== (
|
|
804
|
+
internalProps.customMergeCell = options.customMergeCell, this.customCellStylePlugin.updateCustomCell(null !== (_k = options.customCellStyle) && void 0 !== _k ? _k : [], null !== (_l = options.customCellStyleArrangement) && void 0 !== _l ? _l : []);
|
|
801
805
|
}
|
|
802
806
|
renderWithRecreateCells() {
|
|
803
807
|
const oldHoverState = {
|
|
@@ -1021,6 +1025,12 @@ export class BaseTable extends EventTarget {
|
|
|
1021
1025
|
set autoWrapText(autoWrapText) {
|
|
1022
1026
|
this.internalProps.autoWrapText = autoWrapText, this.options.autoWrapText = autoWrapText;
|
|
1023
1027
|
}
|
|
1028
|
+
get enableLineBreak() {
|
|
1029
|
+
return this.internalProps.enableLineBreak;
|
|
1030
|
+
}
|
|
1031
|
+
set enableLineBreak(enableLineBreak) {
|
|
1032
|
+
this.internalProps.enableLineBreak = enableLineBreak, this.options.enableLineBreak = enableLineBreak;
|
|
1033
|
+
}
|
|
1024
1034
|
updateAutoWrapText(autoWrapText) {
|
|
1025
1035
|
this.internalProps.autoWrapText !== autoWrapText && (this.internalProps.autoWrapText = autoWrapText,
|
|
1026
1036
|
this.options.autoWrapText = autoWrapText, this.scenegraph.clearCells(), this.clearCellStyleCache(),
|