@visactor/vtable 0.10.1-alpha.2 → 0.10.1-alpha.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/ListTable.d.ts +1 -0
- package/cjs/ListTable.js +9 -7
- package/cjs/ListTable.js.map +1 -1
- package/cjs/PivotChart.js +4 -4
- package/cjs/PivotChart.js.map +1 -1
- package/cjs/PivotTable.js +4 -4
- package/cjs/PivotTable.js.map +1 -1
- package/cjs/core/BaseTable.d.ts +6 -2
- package/cjs/core/BaseTable.js +37 -18
- package/cjs/core/BaseTable.js.map +1 -1
- package/cjs/event/drill.js +1 -1
- package/cjs/event/drill.js.map +1 -1
- package/cjs/event/listener/table-group.js +1 -1
- package/cjs/event/listener/table-group.js.map +1 -1
- package/cjs/header-helper/header-helper.js +1 -3
- package/cjs/header-helper/header-helper.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/chart-helper/get-axis-config.js +2 -2
- package/cjs/layout/chart-helper/get-axis-config.js.map +1 -1
- package/cjs/layout/pivot-header-layout.js +11 -11
- package/cjs/layout/pivot-header-layout.js.map +1 -1
- package/cjs/layout/pivot-layout.js +22 -22
- package/cjs/layout/pivot-layout.js.map +1 -1
- package/cjs/layout/simple-header-layout.js +5 -6
- package/cjs/layout/simple-header-layout.js.map +1 -1
- package/cjs/scenegraph/graphic/text.d.ts +2 -15
- package/cjs/scenegraph/graphic/text.js +6 -139
- package/cjs/scenegraph/graphic/text.js.map +1 -1
- package/cjs/scenegraph/layout/compute-row-height.js +1 -1
- package/cjs/scenegraph/layout/compute-row-height.js.map +1 -1
- package/cjs/scenegraph/scenegraph.js +8 -3
- package/cjs/scenegraph/scenegraph.js.map +1 -1
- package/cjs/scenegraph/utils/text-icon-layout.js +3 -1
- package/cjs/scenegraph/utils/text-icon-layout.js.map +1 -1
- package/cjs/state/spark-line/index.js +1 -1
- package/cjs/state/spark-line/index.js.map +1 -1
- package/cjs/state/state.d.ts +2 -2
- package/cjs/state/state.js +3 -4
- package/cjs/state/state.js.map +1 -1
- package/cjs/ts-types/base-table.d.ts +3 -2
- package/cjs/ts-types/base-table.js.map +1 -1
- package/cjs/ts-types/common.d.ts +1 -1
- package/cjs/ts-types/common.js.map +1 -1
- package/cjs/ts-types/events.d.ts +1 -1
- package/cjs/ts-types/events.js.map +1 -1
- package/cjs/ts-types/list-table/define/basic-define.d.ts +1 -2
- package/cjs/ts-types/list-table/define/basic-define.js.map +1 -1
- package/cjs/ts-types/list-table/layout-map/api.d.ts +1 -2
- package/cjs/ts-types/list-table/layout-map/api.js.map +1 -1
- package/cjs/ts-types/pivot-table/dimension/basic-dimension.d.ts +1 -1
- package/cjs/ts-types/pivot-table/dimension/basic-dimension.js.map +1 -1
- package/cjs/ts-types/pivot-table/indicator/basic-indicator.d.ts +1 -1
- package/cjs/ts-types/pivot-table/indicator/basic-indicator.js.map +1 -1
- package/dist/vtable.js +8129 -4478
- package/dist/vtable.min.js +3 -3
- package/es/ListTable.d.ts +1 -0
- package/es/ListTable.js +9 -7
- package/es/ListTable.js.map +1 -1
- package/es/PivotChart.js +4 -4
- package/es/PivotChart.js.map +1 -1
- package/es/PivotTable.js +4 -4
- package/es/PivotTable.js.map +1 -1
- package/es/core/BaseTable.d.ts +6 -2
- package/es/core/BaseTable.js +33 -15
- package/es/core/BaseTable.js.map +1 -1
- package/es/event/drill.js +1 -1
- package/es/event/drill.js.map +1 -1
- package/es/event/listener/table-group.js +1 -1
- package/es/event/listener/table-group.js.map +1 -1
- package/es/header-helper/header-helper.js +1 -3
- package/es/header-helper/header-helper.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/chart-helper/get-axis-config.js +2 -2
- package/es/layout/chart-helper/get-axis-config.js.map +1 -1
- package/es/layout/pivot-header-layout.js +11 -11
- package/es/layout/pivot-header-layout.js.map +1 -1
- package/es/layout/pivot-layout.js +22 -22
- package/es/layout/pivot-layout.js.map +1 -1
- package/es/layout/simple-header-layout.js +5 -6
- package/es/layout/simple-header-layout.js.map +1 -1
- package/es/scenegraph/graphic/text.d.ts +2 -15
- package/es/scenegraph/graphic/text.js +1 -143
- package/es/scenegraph/graphic/text.js.map +1 -1
- package/es/scenegraph/layout/compute-row-height.js +1 -1
- package/es/scenegraph/layout/compute-row-height.js.map +1 -1
- package/es/scenegraph/scenegraph.js +7 -3
- package/es/scenegraph/scenegraph.js.map +1 -1
- package/es/scenegraph/utils/text-icon-layout.js +3 -1
- package/es/scenegraph/utils/text-icon-layout.js.map +1 -1
- package/es/state/spark-line/index.js +1 -1
- package/es/state/spark-line/index.js.map +1 -1
- package/es/state/state.d.ts +2 -2
- package/es/state/state.js +3 -4
- package/es/state/state.js.map +1 -1
- package/es/ts-types/base-table.d.ts +3 -2
- package/es/ts-types/base-table.js.map +1 -1
- package/es/ts-types/common.d.ts +1 -1
- package/es/ts-types/common.js.map +1 -1
- package/es/ts-types/events.d.ts +1 -1
- package/es/ts-types/events.js.map +1 -1
- package/es/ts-types/list-table/define/basic-define.d.ts +1 -2
- package/es/ts-types/list-table/define/basic-define.js.map +1 -1
- package/es/ts-types/list-table/layout-map/api.d.ts +1 -2
- package/es/ts-types/list-table/layout-map/api.js.map +1 -1
- package/es/ts-types/pivot-table/dimension/basic-dimension.d.ts +1 -1
- package/es/ts-types/pivot-table/dimension/basic-dimension.js.map +1 -1
- package/es/ts-types/pivot-table/indicator/basic-indicator.d.ts +1 -1
- package/es/ts-types/pivot-table/indicator/basic-indicator.js.map +1 -1
- package/package.json +5 -5
- package/cjs/scenegraph/component/menu.d.ts +0 -41
- package/es/scenegraph/component/menu.d.ts +0 -41
|
@@ -42,45 +42,45 @@ class PivotLayoutMap {
|
|
|
42
42
|
this.rowShowAttrs = "row" === this._indicatorShowType ? this.rows.concat(this.indicatorDimensionKey) : Array.from(this.rows),
|
|
43
43
|
this._bodyRowCount = this.rowKeysPath.length * (this.indicatorsAsCol ? 1 : this.indicatorKeys.length),
|
|
44
44
|
this.initHeaderObjects(), this.initIndicatorObjects(), this.rowHeaderTitle) {
|
|
45
|
-
const cell_id = "rowHeaderTitle",
|
|
46
|
-
this._headerObjectMap[
|
|
47
|
-
id:
|
|
48
|
-
|
|
45
|
+
const cell_id = "rowHeaderTitle", title = "string" == typeof this.rowHeaderTitle.title ? this.rowHeaderTitle.title : this.rowsDefine.reduce(((title, value) => "string" == typeof value ? title : title + (title ? `/${value.title}` : `${value.title}`)), "");
|
|
46
|
+
this._headerObjectMap[title] = {
|
|
47
|
+
id: title,
|
|
48
|
+
title: title,
|
|
49
49
|
field: cell_id,
|
|
50
50
|
headerType: null !== (_a = this.rowHeaderTitle.headerType) && void 0 !== _a ? _a : "text",
|
|
51
51
|
style: this.rowHeaderTitle.headerStyle,
|
|
52
52
|
define: {}
|
|
53
53
|
}, this._headerObjectMap[cell_id] = {
|
|
54
54
|
id: cell_id,
|
|
55
|
-
|
|
55
|
+
title: "",
|
|
56
56
|
field: cell_id,
|
|
57
57
|
headerType: null !== (_b = this.cornerSetting.headerType) && void 0 !== _b ? _b : "text",
|
|
58
58
|
style: this.cornerSetting.headerStyle,
|
|
59
59
|
define: {}
|
|
60
|
-
}, this._headerObjects.push(this._headerObjectMap[
|
|
60
|
+
}, this._headerObjects.push(this._headerObjectMap[title]), this._headerObjects.push(this._headerObjectMap[cell_id]),
|
|
61
61
|
this.rowShowAttrs.unshift(cell_id), this.rowKeysPath.forEach(((rowKey, index) => {
|
|
62
|
-
rowKey.unshift(
|
|
62
|
+
rowKey.unshift(title);
|
|
63
63
|
}));
|
|
64
64
|
}
|
|
65
65
|
if (this.columnHeaderTitle) {
|
|
66
|
-
const cell_id = "columnHeaderTitleCell",
|
|
67
|
-
this._headerObjectMap[
|
|
68
|
-
id:
|
|
69
|
-
|
|
66
|
+
const cell_id = "columnHeaderTitleCell", title = "string" == typeof this.columnHeaderTitle.title ? this.columnHeaderTitle.title : this.columnsDefine.reduce(((title, value) => "string" == typeof value ? title : title + (title ? `/${value.title}` : `${value.title}`)), "");
|
|
67
|
+
this._headerObjectMap[title] = {
|
|
68
|
+
id: title,
|
|
69
|
+
title: title,
|
|
70
70
|
field: cell_id,
|
|
71
71
|
headerType: null !== (_c = this.columnHeaderTitle.headerType) && void 0 !== _c ? _c : "text",
|
|
72
72
|
style: this.columnHeaderTitle.headerStyle,
|
|
73
73
|
define: {}
|
|
74
74
|
}, this._headerObjectMap[cell_id] = {
|
|
75
75
|
id: cell_id,
|
|
76
|
-
|
|
76
|
+
title: "",
|
|
77
77
|
field: cell_id,
|
|
78
78
|
headerType: null !== (_d = this.cornerSetting.headerType) && void 0 !== _d ? _d : "text",
|
|
79
79
|
style: this.cornerSetting.headerStyle,
|
|
80
80
|
define: {}
|
|
81
|
-
}, this._headerObjects.push(this._headerObjectMap[
|
|
81
|
+
}, this._headerObjects.push(this._headerObjectMap[title]), this._headerObjects.push(this._headerObjectMap[cell_id]),
|
|
82
82
|
this.colShowAttrs.unshift(cell_id), this.colKeysPath.forEach(((columnKey, index) => {
|
|
83
|
-
columnKey.unshift(
|
|
83
|
+
columnKey.unshift(title);
|
|
84
84
|
}));
|
|
85
85
|
}
|
|
86
86
|
if (this._table.isPivotChart()) if (this.hasTwoIndicatorAxes = this._indicatorObjects.some((indicatorObject => !!(indicatorObject.chartSpec && indicatorObject.chartSpec.series && indicatorObject.chartSpec.series.length > 1))),
|
|
@@ -93,7 +93,7 @@ class PivotLayoutMap {
|
|
|
93
93
|
const cell_id = "rowHeaderEmpty";
|
|
94
94
|
this._headerObjectMap[cell_id] = {
|
|
95
95
|
id: cell_id,
|
|
96
|
-
|
|
96
|
+
title: "",
|
|
97
97
|
field: cell_id,
|
|
98
98
|
headerType: null !== (_e = this.cornerSetting.headerType) && void 0 !== _e ? _e : "text",
|
|
99
99
|
style: this.cornerSetting.headerStyle,
|
|
@@ -151,7 +151,7 @@ class PivotLayoutMap {
|
|
|
151
151
|
}
|
|
152
152
|
getIndicatorInfo(indicatorKey, indicatorValue = "") {
|
|
153
153
|
var _a;
|
|
154
|
-
return null === (_a = this.indicatorsDefine) || void 0 === _a ? void 0 : _a.find((indicator => "string" != typeof indicator && (indicatorKey ? indicator.indicatorKey === indicatorKey : !!indicatorValue && indicator.
|
|
154
|
+
return null === (_a = this.indicatorsDefine) || void 0 === _a ? void 0 : _a.find((indicator => "string" != typeof indicator && (indicatorKey ? indicator.indicatorKey === indicatorKey : !!indicatorValue && indicator.title === indicatorValue)));
|
|
155
155
|
}
|
|
156
156
|
getColKeysPath() {
|
|
157
157
|
return this.colKeysPath;
|
|
@@ -168,7 +168,7 @@ class PivotLayoutMap {
|
|
|
168
168
|
this._headerObjectMap[rowKey[j]] = {
|
|
169
169
|
id: rowKey[j],
|
|
170
170
|
field: null !== (_a = null == dimensionInfo ? void 0 : dimensionInfo.dimensionKey) && void 0 !== _a ? _a : this.rows[ids.length - 1],
|
|
171
|
-
|
|
171
|
+
title: ids[ids.length - 1],
|
|
172
172
|
style: null == dimensionInfo ? void 0 : dimensionInfo.headerStyle,
|
|
173
173
|
define: {
|
|
174
174
|
field: null !== (_b = null == dimensionInfo ? void 0 : dimensionInfo.dimensionKey) && void 0 !== _b ? _b : this.rows[ids.length - 1],
|
|
@@ -189,7 +189,7 @@ class PivotLayoutMap {
|
|
|
189
189
|
this._headerObjectMap[colKey[j]] = {
|
|
190
190
|
id: colKey[j],
|
|
191
191
|
field: null !== (_e = null == dimensionInfo ? void 0 : dimensionInfo.dimensionKey) && void 0 !== _e ? _e : this.columns[ids.length - 1],
|
|
192
|
-
|
|
192
|
+
title: ids[ids.length - 1],
|
|
193
193
|
style: null == dimensionInfo ? void 0 : dimensionInfo.headerStyle,
|
|
194
194
|
define: {
|
|
195
195
|
field: null !== (_f = null == dimensionInfo ? void 0 : dimensionInfo.dimensionKey) && void 0 !== _f ? _f : this.columns[ids.length - 1],
|
|
@@ -210,7 +210,7 @@ class PivotLayoutMap {
|
|
|
210
210
|
this._headerObjectMap[indicatorKey] || (this._headerObjectMap[indicatorKey] = {
|
|
211
211
|
id: indicatorKey,
|
|
212
212
|
field: this.indicatorDimensionKey,
|
|
213
|
-
|
|
213
|
+
title: null !== (_a = null == indicatorInfo ? void 0 : indicatorInfo.title) && void 0 !== _a ? _a : indicatorKey,
|
|
214
214
|
style: null == indicatorInfo ? void 0 : indicatorInfo.headerStyle,
|
|
215
215
|
define: {
|
|
216
216
|
field: this.indicatorDimensionKey,
|
|
@@ -229,7 +229,7 @@ class PivotLayoutMap {
|
|
|
229
229
|
this._headerObjectMap[cornerAttrStr] = {
|
|
230
230
|
id: cornerAttrStr,
|
|
231
231
|
field: cornerAttrStr,
|
|
232
|
-
|
|
232
|
+
title: cornerAttrStr === this.indicatorDimensionKey ? this.indicatorTitle : null !== (_a = null == dimensionInfo ? void 0 : dimensionInfo.title) && void 0 !== _a ? _a : cornerAttrStr,
|
|
233
233
|
style: null === (_b = this.cornerSetting) || void 0 === _b ? void 0 : _b.headerStyle,
|
|
234
234
|
define: {
|
|
235
235
|
field: cornerAttrStr,
|
|
@@ -564,7 +564,7 @@ class PivotLayoutMap {
|
|
|
564
564
|
return {
|
|
565
565
|
dimensionKey: indicatorObject ? void 0 : this.colShowAttrs[index],
|
|
566
566
|
indicatorKey: indicatorObject ? key : void 0,
|
|
567
|
-
value: indicatorObject ? indicatorObject.define.
|
|
567
|
+
value: indicatorObject ? indicatorObject.define.title : key
|
|
568
568
|
};
|
|
569
569
|
}))) && void 0 !== _c ? _c : [],
|
|
570
570
|
rowHeaderPaths: null !== (_d = null == rowHeaderPaths ? void 0 : rowHeaderPaths.map(((key, index) => {
|
|
@@ -572,7 +572,7 @@ class PivotLayoutMap {
|
|
|
572
572
|
return {
|
|
573
573
|
dimensionKey: indicatorObject ? void 0 : this.rowShowAttrs[index],
|
|
574
574
|
indicatorKey: indicatorObject ? key : void 0,
|
|
575
|
-
value: indicatorObject ? indicatorObject.define.
|
|
575
|
+
value: indicatorObject ? indicatorObject.define.title : key
|
|
576
576
|
};
|
|
577
577
|
}))) && void 0 !== _d ? _d : []
|
|
578
578
|
};
|