@visactor/vtable 1.19.0 → 1.19.1-alpha.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/core/BaseTable.js +1 -1
- 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/layout/pivot-header-layout.js +11 -7
- package/cjs/layout/pivot-header-layout.js.map +1 -1
- package/cjs/vrender.js.map +1 -1
- package/dist/vtable.js +8 -2
- package/dist/vtable.min.js +1 -1
- package/es/core/BaseTable.js +1 -1
- 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/layout/pivot-header-layout.js +11 -7
- package/es/layout/pivot-header-layout.js.map +1 -1
- package/es/vrender.js.map +1 -1
- package/package.json +3 -3
package/cjs/index.d.ts
CHANGED
|
@@ -22,7 +22,7 @@ export { getDataCellPath } from './tools/get-data-path';
|
|
|
22
22
|
export * from './render/jsx';
|
|
23
23
|
export { getTargetCell } from './event/util';
|
|
24
24
|
export { Icon } from './scenegraph/graphic/icon';
|
|
25
|
-
export declare const version = "1.19.
|
|
25
|
+
export declare const version = "1.19.1-alpha.1";
|
|
26
26
|
export { TYPES, core, ListTable, ListTableSimple, BaseTableAPI, ListTableConstructorOptions, PivotTable, PivotTableSimple, PivotTableConstructorOptions, PivotChartConstructorOptions, PivotChart, IHeaderTreeDefine, IDimension, IIndicator, ITitleDefine, ICornerDefine, ColumnsDefine, ColumnDefine, LinkColumnDefine, ChartColumnDefine, ImageColumnDefine, SparklineColumnDefine, ProgressbarColumnDefine, TextColumnDefine, GroupColumnDefine, TextAlignType, TextBaselineType, textMeasure, themes, data, MousePointerCellEvent, getIcons, clearGlobal, register, DataStatistics, CustomLayout, updateCell, renderChart, graphicUtil, setCustomAlphabetCharSet, restoreMeasureText, plugins };
|
|
27
27
|
declare function getIcons(): {
|
|
28
28
|
[key: string]: TYPES.ColumnIconOption;
|
package/cjs/index.js
CHANGED
|
@@ -187,7 +187,7 @@ Object.defineProperty(exports, "Icon", {
|
|
|
187
187
|
get: function() {
|
|
188
188
|
return icon_1.Icon;
|
|
189
189
|
}
|
|
190
|
-
}), exports.version = "1.19.
|
|
190
|
+
}), exports.version = "1.19.1-alpha.1", exports.getIcons = getIcons, exports.clearGlobal = clearGlobal,
|
|
191
191
|
TYPES.AggregationType, __exportStar(require("./components"), exports), __exportStar(require("./scenegraph/group-creater/cell-type"), exports);
|
|
192
192
|
|
|
193
193
|
var TABLE_EVENT_TYPE_1 = require("./core/TABLE_EVENT_TYPE");
|
package/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,uCAA4D;AA6G1D,4FA7GO,qBAAW,OA6GP;AA5Gb,IAAA,4BAAkB,GAAE,CAAC;AAErB,kDAAoC;AAgElC,sBAAK;AA/DP,6CAA+B;AAgE7B,oBAAI;AA/DN,6CAA+B;AA2F7B,oBAAI;AA1FN,+CAAiC;AACjC,qDAAuC;AA8FrC,4BAAQ;AA7FV,iDAAmC;AAuFjC,wBAAM;AAtFR,yEAA2D;AAgGzD,wCAAc;AA/FhB,mDAAqC;AAsGnC,0BAAO;AAhFT,mDAA4D;AAqC1D,0FArCuB,4BAAS,OAqCvB;AApCX,yDAAqD;AAqCnD,gGArCO,kCAAe,OAqCP;AAnCjB,qDAA+D;AAsC7D,2FAtCwB,8BAAU,OAsCxB;AArCZ,2DAAuD;AAsCrD,iGAtCO,oCAAgB,OAsCP;AArClB,6CAA0C;AAwCxC,2FAxCO,uBAAU,OAwCP;AAtCZ,8DAAgD;AAmE9C,oCAAY;AAjEd,wEAAoE;AAkElE,2FAlEO,wBAAU,OAkEP;AAjEZ,gGAAqF;AAkEnF,4FAlEO,iCAAW,OAkEP;AAjEb,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AAa,OAAA;AAEtB,kDAAiD;AAAxC,4FAAA,IAAI,OAAA;AAKA,QAAA,OAAO,GAAG,gBAAgB,CAAC;AA2DxC,SAAS,QAAQ;IAGf,OAAO,KAAK,CAAC,GAAG,EAAE,CAAC;AACrB,CAAC;AAvBC,4BAAQ;AAyBV,SAAS,WAAW;IAClB,QAAQ,CAAC,QAAQ,EAAE,CAAC;AAGtB,CAAC;AA5BC,kCAAW;AA6Bb,KAAK,CAAC,eAAe,CAAC;AAEtB,+CAA6B;AAC7B,uEAAqD;AAErD,4DAA2D;AAAlD,oHAAA,gBAAgB,OAAA;AACzB,wFAA+G;AAAtG,gIAAA,sBAAsB,OAAA;AAAE,gIAAA,sBAAsB,OAAA;AAEvD,mDAAkD;AAAzC,0GAAA,WAAW,OAAA","file":"index.js","sourcesContent":["/* eslint-disable sort-imports */\nimport { graphicUtil, registerForVrender } from './vrender';\nregisterForVrender();\n\nimport * as TYPES from './ts-types';\nimport * as core from './core';\nimport * as data from './data';\nimport * as icons from './icons';\nimport * as register from './register';\nimport * as themes from './themes';\nimport * as DataStatistics from './dataset/DataStatistics';\nimport * as plugins from './plugins';\nimport type {\n ColumnDefine,\n ColumnsDefine,\n LinkColumnDefine,\n ChartColumnDefine,\n ImageColumnDefine,\n SparklineColumnDefine,\n ProgressbarColumnDefine,\n TextColumnDefine,\n GroupColumnDefine,\n ListTableConstructorOptions,\n PivotTableConstructorOptions,\n PivotChartConstructorOptions,\n IHeaderTreeDefine,\n IDimension,\n IIndicator,\n ITitleDefine,\n ICornerDefine,\n TextAlignType,\n TextBaselineType\n} from './ts-types';\nimport { ListTableAll as ListTable } from './ListTable-all';\nimport { ListTableSimple } from './ListTable-simple';\n// import { PivotTable } from './PivotTable';\nimport { PivotTableAll as PivotTable } from './PivotTable-all';\nimport { PivotTableSimple } from './PivotTable-simple';\nimport { PivotChart } from './PivotChart';\nimport type { MousePointerCellEvent } from './ts-types/events';\nimport * as CustomLayout from './render/layout';\n\nimport { updateCell } from './scenegraph/group-creater/cell-helper';\nimport { renderChart } from './scenegraph/graphic/contributions/chart-render-helper';\nimport { restoreMeasureText, setCustomAlphabetCharSet, textMeasure } from './scenegraph/utils/text-measure';\nimport type { BaseTableAPI } from './ts-types/base-table';\n\n// import { container, loadCanvasPicker } from '@src/vrender';\n// loadCanvasPicker(container);\n\nexport { getDataCellPath } from './tools/get-data-path';\nexport * from './render/jsx';\nexport { getTargetCell } from './event/util';\n\nexport { Icon } from './scenegraph/graphic/icon';\n\n// export * as VRender from './vrender';\n// import * as VRender from './vrender';\n\nexport const version = \"1.19.1-alpha.1\";\n/**\n * @namespace VTable\n */\nexport {\n /**\n * Types\n * @namespace VTable.TYPES\n */\n TYPES,\n core,\n ListTable,\n ListTableSimple,\n BaseTableAPI,\n ListTableConstructorOptions,\n PivotTable,\n PivotTableSimple,\n PivotTableConstructorOptions,\n PivotChartConstructorOptions,\n PivotChart,\n IHeaderTreeDefine,\n IDimension,\n IIndicator,\n ITitleDefine,\n ICornerDefine,\n ColumnsDefine,\n ColumnDefine,\n LinkColumnDefine,\n ChartColumnDefine,\n ImageColumnDefine,\n SparklineColumnDefine,\n ProgressbarColumnDefine,\n TextColumnDefine,\n GroupColumnDefine,\n TextAlignType,\n TextBaselineType,\n textMeasure,\n themes,\n data,\n MousePointerCellEvent,\n getIcons,\n clearGlobal,\n //plugin registers\n register,\n /**\n * 暂不推荐使用\n */\n DataStatistics,\n CustomLayout,\n updateCell,\n renderChart,\n graphicUtil,\n setCustomAlphabetCharSet,\n restoreMeasureText,\n plugins\n // VRender // should use import {xxx} from '@visactor/vtable/es/vrender'\n};\n\n/** @private */\nfunction getIcons(): {\n [key: string]: TYPES.ColumnIconOption;\n} {\n return icons.get();\n}\n/** 清理内部的全局变量 如注册的icon theme等 以及共享的header column类实例 */\nfunction clearGlobal() {\n register.clearAll();\n // headers.type.clearGlobal();\n // columns.type.clearGlobal();\n}\nTYPES.AggregationType;\n\nexport * from './components';\nexport * from './scenegraph/group-creater/cell-type';\n\nexport { TABLE_EVENT_TYPE } from './core/TABLE_EVENT_TYPE';\nexport { PIVOT_CHART_EVENT_TYPE, PIVOT_TABLE_EVENT_TYPE } from './ts-types/pivot-table/PIVOT_TABLE_EVENT_TYPE';\n\nexport { EventTarget } from './event/EventTarget';\n"]}
|
|
@@ -1027,7 +1027,7 @@ class PivotHeaderLayoutMap {
|
|
|
1027
1027
|
return this.isColumnIndicatorHeader(col, row) || this.isRowIndicatorHeader(col, row);
|
|
1028
1028
|
}
|
|
1029
1029
|
toggleHierarchyState(col, row) {
|
|
1030
|
-
var _a, _b, _c, _d, _e, _f;
|
|
1030
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
1031
1031
|
this.colIndex = 0;
|
|
1032
1032
|
const lastLevelIndex = (this.indicatorsAsCol ? this.rowHeaderLevelCount - 1 : this.rowHeaderLevelCount - 2) - this.leftRowSeriesNumberColumnCount, oldRowHeaderCellIds = this._rowHeaderCellFullPathIds_FULL.slice(0), oldRowHeaderCellPositons = oldRowHeaderCellIds.map(((id, row) => ({
|
|
1033
1033
|
col: col,
|
|
@@ -1037,7 +1037,11 @@ class PivotHeaderLayoutMap {
|
|
|
1037
1037
|
this.rowDimensionTree.reset(this.rowDimensionTree.tree.children), this.resetRowHeaderLevelCount(),
|
|
1038
1038
|
this._rowHeaderCellFullPathIds_FULL = [], this.rowDimensionKeys = this.rowDimensionTree.dimensionKeysIncludeVirtual.valueArr(),
|
|
1039
1039
|
this.fullRowDimensionKeys = [], this.fullRowDimensionKeys = this.fullRowDimensionKeys.concat(this.rowDimensionKeys),
|
|
1040
|
-
"tree" === this.rowHierarchyType)
|
|
1040
|
+
"tree" === this.rowHierarchyType) (null === (_a = this.extensionRows) || void 0 === _a ? void 0 : _a.length) > 0 && this.extensionRows.forEach((extensionRow => {
|
|
1041
|
+
var _a;
|
|
1042
|
+
const extensionRowDimensionKeys = (null === (_a = extensionRow.rows) || void 0 === _a ? void 0 : _a.map((row => "string" == typeof row ? row : row.dimensionKey))) || [];
|
|
1043
|
+
this.fullRowDimensionKeys = this.fullRowDimensionKeys.concat(extensionRowDimensionKeys);
|
|
1044
|
+
})), this._addHeadersForTreeMode(this._rowHeaderCellFullPathIds_FULL, 0, this.rowDimensionTree.tree.children, [], this.rowDimensionTree.totalLevel, !0, this.rowsDefine, this.rowHeaderObjs); else if ("grid-tree" === this.rowHierarchyType) {
|
|
1041
1045
|
const startRow = 0;
|
|
1042
1046
|
this._addHeadersForGridTreeMode(this._rowHeaderCellFullPathIds_FULL, startRow, this.rowDimensionTree.tree.children, [], this.rowDimensionTree.totalLevel, this._getRowHeaderTreeExpandedMaxLevelCount(), !0, this.rowsDefine, this.rowHeaderObjs, !0),
|
|
1043
1047
|
this.cornerHeaderObjs = this._addCornerHeaders(this.colDimensionKeys, this.rowDimensionKeys, this.columnsDefine.concat(...this.rowsDefine));
|
|
@@ -1049,21 +1053,21 @@ class PivotHeaderLayoutMap {
|
|
|
1049
1053
|
id: id,
|
|
1050
1054
|
title: "string" == typeof this.rowHeaderTitle.title ? this.rowHeaderTitle.title : this.rowsDefine.reduce(((title, value) => "string" == typeof value ? title : title + (title ? `/${value.title}` : `${value.title}`)), ""),
|
|
1051
1055
|
field: void 0,
|
|
1052
|
-
headerType: null !== (
|
|
1053
|
-
style: null === (
|
|
1056
|
+
headerType: null !== (_c = null === (_b = this.rowHeaderTitle) || void 0 === _b ? void 0 : _b.headerType) && void 0 !== _c ? _c : "text",
|
|
1057
|
+
style: null === (_d = this.rowHeaderTitle) || void 0 === _d ? void 0 : _d.headerStyle,
|
|
1054
1058
|
define: {
|
|
1055
1059
|
field: "",
|
|
1056
1060
|
headerType: "text",
|
|
1057
1061
|
cellType: "text",
|
|
1058
|
-
disableHeaderHover: !!(null === (
|
|
1059
|
-
disableHeaderSelect: !!(null === (
|
|
1062
|
+
disableHeaderHover: !!(null === (_e = this.rowHeaderTitle) || void 0 === _e ? void 0 : _e.disableHeaderHover),
|
|
1063
|
+
disableHeaderSelect: !!(null === (_f = this.rowHeaderTitle) || void 0 === _f ? void 0 : _f.disableHeaderSelect)
|
|
1060
1064
|
}
|
|
1061
1065
|
};
|
|
1062
1066
|
this.rowHeaderObjs.push(cell), this._headerObjects[id] = cell;
|
|
1063
1067
|
}
|
|
1064
1068
|
let diffCell;
|
|
1065
1069
|
if (this._rowHeaderCellFullPathIds_FULL = (0, util_1.transpose)(this._rowHeaderCellFullPathIds_FULL),
|
|
1066
|
-
"tree" === this.rowHierarchyType && (null === (
|
|
1070
|
+
"tree" === this.rowHierarchyType && (null === (_g = this.extensionRows) || void 0 === _g ? void 0 : _g.length) >= 1 && this.generateExtensionRowTree(),
|
|
1067
1071
|
this.colIndex = 0, this._headerObjectMap = this._headerObjects.reduce(((o, e) => (o[e.id] = e,
|
|
1068
1072
|
o)), {}), this._CellHeaderPathMap = new Map, this._largeCellRangeCache.length = 0,
|
|
1069
1073
|
"tree" === this.rowHierarchyType) diffCell = (0, diff_cell_1.diffCellAddress)(col, row, oldRowHeaderCellIds.map((oldCellId => oldCellId[col - this.leftRowSeriesNumberColumnCount])), this._rowHeaderCellFullPathIds_FULL.map((newCellId => newCellId[col - this.leftRowSeriesNumberColumnCount])), oldRowHeaderCellPositons, this); else {
|