@visactor/vtable 1.1.1-alpha.0 → 1.1.1
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.js +7 -6
- package/cjs/ListTable.js.map +1 -1
- package/cjs/PivotChart.js +40 -19
- package/cjs/PivotChart.js.map +1 -1
- package/cjs/PivotTable.js +77 -34
- package/cjs/PivotTable.js.map +1 -1
- package/cjs/components/empty-tip/empty-tip.js +1 -5
- package/cjs/components/empty-tip/empty-tip.js.map +1 -1
- package/cjs/core/BaseTable.js +1 -1
- package/cjs/core/BaseTable.js.map +1 -1
- package/cjs/dataset/dataset.d.ts +4 -1
- package/cjs/dataset/dataset.js +5 -5
- package/cjs/dataset/dataset.js.map +1 -1
- package/cjs/index.d.ts +1 -1
- package/cjs/index.js +2 -2
- package/cjs/index.js.map +1 -1
- package/cjs/layout/tree-helper.js +1 -0
- package/cjs/plugins/themes.js +1 -2
- package/cjs/scenegraph/style/frame-border.js +3 -2
- package/cjs/scenegraph/style/frame-border.js.map +1 -1
- package/cjs/vrender.js +9 -9
- package/cjs/vrender.js.map +1 -1
- package/dist/vtable.js +184 -51
- package/dist/vtable.min.js +2 -2
- package/es/ListTable.js +6 -6
- package/es/ListTable.js.map +1 -1
- package/es/PivotChart.js +40 -19
- package/es/PivotChart.js.map +1 -1
- package/es/PivotTable.js +77 -34
- package/es/PivotTable.js.map +1 -1
- package/es/components/empty-tip/empty-tip.js +1 -5
- package/es/components/empty-tip/empty-tip.js.map +1 -1
- package/es/core/BaseTable.js +1 -1
- package/es/core/BaseTable.js.map +1 -1
- package/es/dataset/dataset.d.ts +4 -1
- package/es/dataset/dataset.js +5 -5
- package/es/dataset/dataset.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/tree-helper.js +2 -1
- package/es/plugins/themes.js +1 -2
- package/es/scenegraph/style/frame-border.js +3 -2
- package/es/scenegraph/style/frame-border.js.map +1 -1
- package/es/vrender.js +2 -2
- package/es/vrender.js.map +1 -1
- package/package.json +3 -3
package/es/PivotChart.js
CHANGED
|
@@ -86,8 +86,8 @@ export class PivotChart extends BaseTable {
|
|
|
86
86
|
rowDimensionTree = new DimensionTree(null !== (_t = this.dataset.rowHeaderTree) && void 0 !== _t ? _t : [], this.layoutNodeId),
|
|
87
87
|
this.internalProps.layoutMap = new PivotHeaderLayoutMap(this, this.dataset, columnDimensionTree, rowDimensionTree),
|
|
88
88
|
this.refreshHeader(), this.scenegraph.createSceneGraph(), options.title && (this.internalProps.title = new Title(options.title, this),
|
|
89
|
-
this.scenegraph.resize()), this.options.emptyTip && (this.internalProps.emptyTip
|
|
90
|
-
setTimeout((() => {
|
|
89
|
+
this.scenegraph.resize()), this.options.emptyTip && (this.internalProps.emptyTip || (this.internalProps.emptyTip = new EmptyTip(this.options.emptyTip, this)),
|
|
90
|
+
this.internalProps.emptyTip.resetVisible()), setTimeout((() => {
|
|
91
91
|
this.fireListeners(TABLE_EVENT_TYPE.INITIALIZED, null);
|
|
92
92
|
}), 0);
|
|
93
93
|
}
|
|
@@ -170,8 +170,8 @@ export class PivotChart extends BaseTable {
|
|
|
170
170
|
return null === (_a = null == releaseObj ? void 0 : releaseObj.release) || void 0 === _a ? void 0 : _a.call(releaseObj);
|
|
171
171
|
})), internalProps.releaseList = null), this.scenegraph.clearCells(), this.scenegraph.createSceneGraph(),
|
|
172
172
|
options.title && (this.internalProps.title = new Title(options.title, this), this.scenegraph.resize()),
|
|
173
|
-
this.options.emptyTip && (this.internalProps.emptyTip
|
|
174
|
-
new Promise((resolve => {
|
|
173
|
+
this.options.emptyTip && (this.internalProps.emptyTip || (this.internalProps.emptyTip = new EmptyTip(this.options.emptyTip, this)),
|
|
174
|
+
this.internalProps.emptyTip.resetVisible()), new Promise((resolve => {
|
|
175
175
|
setTimeout(resolve, 0);
|
|
176
176
|
}));
|
|
177
177
|
}
|
|
@@ -228,13 +228,20 @@ export class PivotChart extends BaseTable {
|
|
|
228
228
|
return "function" == typeof fieldFormat ? fieldFormat(title, col, row, this) : title;
|
|
229
229
|
}
|
|
230
230
|
if (this.dataset) {
|
|
231
|
-
|
|
231
|
+
let indicatorPosition;
|
|
232
|
+
const cellDimensionPath = this.internalProps.layoutMap.getCellHeaderPaths(col, row), colKeys = cellDimensionPath.colHeaderPaths.map(((colPath, index) => {
|
|
232
233
|
var _a;
|
|
233
|
-
return
|
|
234
|
-
|
|
234
|
+
return colPath.indicatorKey && (indicatorPosition = {
|
|
235
|
+
position: "col",
|
|
236
|
+
index: index
|
|
237
|
+
}), null !== (_a = colPath.indicatorKey) && void 0 !== _a ? _a : colPath.value;
|
|
238
|
+
})), rowKeys = cellDimensionPath.rowHeaderPaths.map(((rowPath, index) => {
|
|
235
239
|
var _a;
|
|
236
|
-
return
|
|
237
|
-
|
|
240
|
+
return rowPath.indicatorKey && (indicatorPosition = {
|
|
241
|
+
position: "row",
|
|
242
|
+
index: index
|
|
243
|
+
}), null !== (_a = rowPath.indicatorKey) && void 0 !== _a ? _a : rowPath.value;
|
|
244
|
+
})), aggregator = this.dataset.getAggregator(rowKeys, colKeys, this.internalProps.layoutMap.getIndicatorKey(col, row), !0, indicatorPosition);
|
|
238
245
|
return aggregator.value ? aggregator.value() : void 0;
|
|
239
246
|
}
|
|
240
247
|
const {fieldFormat: fieldFormat} = this.internalProps.layoutMap.getBody(col, row), rowIndex = this.getBodyIndexByRow(row), colIndex = this.getBodyIndexByCol(col), dataValue = null === (_c = this.records[rowIndex]) || void 0 === _c ? void 0 : _c[colIndex];
|
|
@@ -259,13 +266,20 @@ export class PivotChart extends BaseTable {
|
|
|
259
266
|
return "function" == typeof title ? title() : title;
|
|
260
267
|
}
|
|
261
268
|
if (this.dataset) {
|
|
262
|
-
|
|
269
|
+
let indicatorPosition;
|
|
270
|
+
const cellDimensionPath = this.internalProps.layoutMap.getCellHeaderPaths(col, row), colKeys = cellDimensionPath.colHeaderPaths.map(((colPath, index) => {
|
|
263
271
|
var _a;
|
|
264
|
-
return
|
|
265
|
-
|
|
272
|
+
return colPath.indicatorKey && (indicatorPosition = {
|
|
273
|
+
position: "col",
|
|
274
|
+
index: index
|
|
275
|
+
}), null !== (_a = colPath.indicatorKey) && void 0 !== _a ? _a : colPath.value;
|
|
276
|
+
})), rowKeys = cellDimensionPath.rowHeaderPaths.map(((rowPath, index) => {
|
|
266
277
|
var _a;
|
|
267
|
-
return
|
|
268
|
-
|
|
278
|
+
return rowPath.indicatorKey && (indicatorPosition = {
|
|
279
|
+
position: "row",
|
|
280
|
+
index: index
|
|
281
|
+
}), null !== (_a = rowPath.indicatorKey) && void 0 !== _a ? _a : rowPath.value;
|
|
282
|
+
})), aggregator = this.dataset.getAggregator(rowKeys, colKeys, this.internalProps.layoutMap.getIndicatorKey(col, row), !0, indicatorPosition);
|
|
269
283
|
return aggregator.value ? aggregator.value() : void 0;
|
|
270
284
|
}
|
|
271
285
|
const rowIndex = this.getBodyIndexByRow(row), colIndex = this.getBodyIndexByCol(col);
|
|
@@ -276,14 +290,21 @@ export class PivotChart extends BaseTable {
|
|
|
276
290
|
}
|
|
277
291
|
getCellOriginRecord(col, row) {
|
|
278
292
|
if (!this.internalProps.layoutMap.isHeader(col, row) && this.dataset) {
|
|
279
|
-
|
|
293
|
+
let indicatorPosition;
|
|
294
|
+
const cellDimensionPath = this.internalProps.layoutMap.getCellHeaderPaths(col, row), colKeys = cellDimensionPath.colHeaderPaths.map(((colPath, index) => {
|
|
280
295
|
var _a;
|
|
281
|
-
return
|
|
282
|
-
|
|
296
|
+
return colPath.indicatorKey && (indicatorPosition = {
|
|
297
|
+
position: "col",
|
|
298
|
+
index: index
|
|
299
|
+
}), null !== (_a = colPath.indicatorKey) && void 0 !== _a ? _a : colPath.value;
|
|
300
|
+
})), rowKeys = cellDimensionPath.rowHeaderPaths.map(((rowPath, index) => {
|
|
283
301
|
var _a;
|
|
284
|
-
return
|
|
302
|
+
return rowPath.indicatorKey && (indicatorPosition = {
|
|
303
|
+
position: "row",
|
|
304
|
+
index: index
|
|
305
|
+
}), null !== (_a = rowPath.indicatorKey) && void 0 !== _a ? _a : rowPath.value;
|
|
285
306
|
}));
|
|
286
|
-
return this.dataset.getAggregator(rowKeys, colKeys, this.internalProps.layoutMap.getIndicatorKey(col, row)).records;
|
|
307
|
+
return this.dataset.getAggregator(rowKeys, colKeys, this.internalProps.layoutMap.getIndicatorKey(col, row), !0, indicatorPosition).records;
|
|
287
308
|
}
|
|
288
309
|
}
|
|
289
310
|
getCellRawRecord(col, row) {
|