@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
|
@@ -116,7 +116,7 @@ class PivotHeaderLayoutMap {
|
|
|
116
116
|
this._columnHeaderCellIds.unshift(firstRowIds);
|
|
117
117
|
const cell = {
|
|
118
118
|
id: id,
|
|
119
|
-
|
|
119
|
+
title: "string" == typeof this.columnHeaderTitle.title ? this.columnHeaderTitle.title : this.columnsDefine.reduce(((title, value) => "string" == typeof value ? title : title + (title ? `/${value.title}` : `${value.title}`)), ""),
|
|
120
120
|
field: void 0,
|
|
121
121
|
headerType: null !== (_p = this.columnHeaderTitle.headerType) && void 0 !== _p ? _p : "text",
|
|
122
122
|
style: this.columnHeaderTitle.headerStyle,
|
|
@@ -132,7 +132,7 @@ class PivotHeaderLayoutMap {
|
|
|
132
132
|
this._rowHeaderCellIds.unshift(firstColIds);
|
|
133
133
|
const cell = {
|
|
134
134
|
id: id,
|
|
135
|
-
|
|
135
|
+
title: "string" == typeof this.rowHeaderTitle.title ? this.rowHeaderTitle.title : this.rowsDefine.reduce(((title, value) => "string" == typeof value ? title : title + (title ? `/${value.title}` : `${value.title}`)), ""),
|
|
136
136
|
field: void 0,
|
|
137
137
|
headerType: null !== (_q = this.rowHeaderTitle.headerType) && void 0 !== _q ? _q : "text",
|
|
138
138
|
style: this.rowHeaderTitle.headerStyle,
|
|
@@ -156,9 +156,9 @@ class PivotHeaderLayoutMap {
|
|
|
156
156
|
for (let col = 0; col < (null == prev ? void 0 : prev.length); col++) newRow[col] = prev[col];
|
|
157
157
|
}(row), header.forEach((hd => {
|
|
158
158
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
|
|
159
|
-
const id = hd.id, dimensionInfo = null !== (_b = null === (_a = this.rowsDefine) || void 0 === _a ? void 0 : _a.find((dimension => "string" != typeof dimension && dimension.dimensionKey === hd.dimensionKey))) && void 0 !== _b ? _b : null === (_c = this.columnsDefine) || void 0 === _c ? void 0 : _c.find((dimension => "string" != typeof dimension && dimension.dimensionKey === hd.dimensionKey)), indicatorInfo = null === (_d = this.indicatorsDefine) || void 0 === _d ? void 0 : _d.find((indicator => "string" != typeof indicator && (hd.indicatorKey ? indicator.indicatorKey === hd.indicatorKey : indicator.
|
|
159
|
+
const id = hd.id, dimensionInfo = null !== (_b = null === (_a = this.rowsDefine) || void 0 === _a ? void 0 : _a.find((dimension => "string" != typeof dimension && dimension.dimensionKey === hd.dimensionKey))) && void 0 !== _b ? _b : null === (_c = this.columnsDefine) || void 0 === _c ? void 0 : _c.find((dimension => "string" != typeof dimension && dimension.dimensionKey === hd.dimensionKey)), indicatorInfo = null === (_d = this.indicatorsDefine) || void 0 === _d ? void 0 : _d.find((indicator => "string" != typeof indicator && (hd.indicatorKey ? indicator.indicatorKey === hd.indicatorKey : indicator.title === hd.value))), cell = {
|
|
160
160
|
id: id,
|
|
161
|
-
|
|
161
|
+
title: null !== (_e = hd.value) && void 0 !== _e ? _e : indicatorInfo.title,
|
|
162
162
|
field: hd.dimensionKey,
|
|
163
163
|
style: "function" == typeof (null === (_f = null != indicatorInfo ? indicatorInfo : dimensionInfo) || void 0 === _f ? void 0 : _f.headerStyle) ? null === (_g = null != indicatorInfo ? indicatorInfo : dimensionInfo) || void 0 === _g ? void 0 : _g.headerStyle : Object.assign({}, null === (_h = null != indicatorInfo ? indicatorInfo : dimensionInfo) || void 0 === _h ? void 0 : _h.headerStyle),
|
|
164
164
|
headerType: null !== (_k = null !== (_j = null == indicatorInfo ? void 0 : indicatorInfo.headerType) && void 0 !== _j ? _j : null == dimensionInfo ? void 0 : dimensionInfo.headerType) && void 0 !== _k ? _k : "text",
|
|
@@ -221,7 +221,7 @@ class PivotHeaderLayoutMap {
|
|
|
221
221
|
var _a, _b, _c, _d, _e, _f;
|
|
222
222
|
const id = hd.id, dimensionInfo = null !== (_b = null === (_a = this.rowsDefine) || void 0 === _a ? void 0 : _a.find((dimension => "string" != typeof dimension && dimension.dimensionKey === hd.dimensionKey))) && void 0 !== _b ? _b : null === (_c = this.columnsDefine) || void 0 === _c ? void 0 : _c.find((dimension => "string" != typeof dimension && dimension.dimensionKey === hd.dimensionKey)), cell = {
|
|
223
223
|
id: id,
|
|
224
|
-
|
|
224
|
+
title: hd.value,
|
|
225
225
|
field: hd.dimensionKey,
|
|
226
226
|
style: hd.level + 1 === totalLevel || "function" == typeof (null == dimensionInfo ? void 0 : dimensionInfo.headerStyle) ? null == dimensionInfo ? void 0 : dimensionInfo.headerStyle : Object.assign({}, null == dimensionInfo ? void 0 : dimensionInfo.headerStyle, {
|
|
227
227
|
textAlign: "left"
|
|
@@ -268,7 +268,7 @@ class PivotHeaderLayoutMap {
|
|
|
268
268
|
var _a, _b, _c, _d, _e, _f;
|
|
269
269
|
const id = ++seqId, dimensionInfo = null !== (_b = null === (_a = this.rowsDefine) || void 0 === _a ? void 0 : _a.find((dimension => "string" != typeof dimension && dimension.dimensionKey === dimensionKey))) && void 0 !== _b ? _b : null === (_c = this.columnsDefine) || void 0 === _c ? void 0 : _c.find((dimension => "string" != typeof dimension && dimension.dimensionKey === dimensionKey)), cell = {
|
|
270
270
|
id: id,
|
|
271
|
-
|
|
271
|
+
title: dimensionKey === this.indicatorDimensionKey ? this.indicatorTitle : null !== (_d = null == dimensionInfo ? void 0 : dimensionInfo.title) && void 0 !== _d ? _d : "",
|
|
272
272
|
field: "维度名称",
|
|
273
273
|
style: this.cornerSetting.headerStyle,
|
|
274
274
|
headerType: null !== (_e = this.cornerSetting.headerType) && void 0 !== _e ? _e : "text",
|
|
@@ -279,7 +279,7 @@ class PivotHeaderLayoutMap {
|
|
|
279
279
|
},
|
|
280
280
|
dropDownMenu: null == dimensionInfo ? void 0 : dimensionInfo.cornerDropDownMenu,
|
|
281
281
|
pivotInfo: {
|
|
282
|
-
value: null !== (_f = null == dimensionInfo ? void 0 : dimensionInfo.
|
|
282
|
+
value: null !== (_f = null == dimensionInfo ? void 0 : dimensionInfo.title) && void 0 !== _f ? _f : "",
|
|
283
283
|
dimensionKey: dimensionKey,
|
|
284
284
|
isPivotCorner: !0
|
|
285
285
|
},
|
|
@@ -293,7 +293,7 @@ class PivotHeaderLayoutMap {
|
|
|
293
293
|
})); else {
|
|
294
294
|
const id = ++seqId, cell = {
|
|
295
295
|
id: id,
|
|
296
|
-
|
|
296
|
+
title: "",
|
|
297
297
|
field: "维度名称",
|
|
298
298
|
style: this.cornerSetting.headerStyle,
|
|
299
299
|
headerType: null !== (_a = this.cornerSetting.headerType) && void 0 !== _a ? _a : "text",
|
|
@@ -647,13 +647,13 @@ class PivotHeaderLayoutMap {
|
|
|
647
647
|
var _a, _b, _c;
|
|
648
648
|
const colHeaderPath = {};
|
|
649
649
|
colHeaderPath.dimensionKey = colHeader.dimensionKey, colHeaderPath.indicatorKey = colHeader.indicatorKey,
|
|
650
|
-
colHeaderPath.value = null !== (_c = null !== (_a = colHeader.value) && void 0 !== _a ? _a : null === (_b = this.getIndicatorInfoByIndicatorKey(colHeader.indicatorKey)) || void 0 === _b ? void 0 : _b.
|
|
650
|
+
colHeaderPath.value = null !== (_c = null !== (_a = colHeader.value) && void 0 !== _a ? _a : null === (_b = this.getIndicatorInfoByIndicatorKey(colHeader.indicatorKey)) || void 0 === _b ? void 0 : _b.title) && void 0 !== _c ? _c : "",
|
|
651
651
|
headerPaths.colHeaderPaths.push(colHeaderPath);
|
|
652
652
|
})), headerPathsWidthNode.rowHeaderPaths.forEach((rowHeader => {
|
|
653
653
|
var _a, _b, _c;
|
|
654
654
|
const rowHeaderPath = {};
|
|
655
655
|
rowHeaderPath.dimensionKey = rowHeader.dimensionKey, rowHeaderPath.indicatorKey = rowHeader.indicatorKey,
|
|
656
|
-
rowHeaderPath.value = null !== (_c = null !== (_a = rowHeader.value) && void 0 !== _a ? _a : null === (_b = this.getIndicatorInfoByIndicatorKey(rowHeader.indicatorKey)) || void 0 === _b ? void 0 : _b.
|
|
656
|
+
rowHeaderPath.value = null !== (_c = null !== (_a = rowHeader.value) && void 0 !== _a ? _a : null === (_b = this.getIndicatorInfoByIndicatorKey(rowHeader.indicatorKey)) || void 0 === _b ? void 0 : _b.title) && void 0 !== _c ? _c : "",
|
|
657
657
|
headerPaths.rowHeaderPaths.push(rowHeaderPath);
|
|
658
658
|
})), headerPaths;
|
|
659
659
|
}
|
|
@@ -688,7 +688,7 @@ class PivotHeaderLayoutMap {
|
|
|
688
688
|
this._rowHeaderCellIds.unshift(firstColIds);
|
|
689
689
|
const cell = {
|
|
690
690
|
id: id,
|
|
691
|
-
|
|
691
|
+
title: "string" == typeof this.rowHeaderTitle.title ? this.rowHeaderTitle.title : this.rowsDefine.reduce(((title, value) => "string" == typeof value ? title : title + (title ? `/${value.title}` : `${value.title}`)), ""),
|
|
692
692
|
field: void 0,
|
|
693
693
|
headerType: null !== (_a = this.rowHeaderTitle.headerType) && void 0 !== _a ? _a : "text",
|
|
694
694
|
style: this.rowHeaderTitle.headerStyle,
|