@visactor/vtable-gantt 1.14.3 → 1.14.4-alpha.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/index.d.ts +1 -1
- package/cjs/index.js +1 -1
- package/cjs/index.js.map +1 -1
- package/dist/vtable-gantt.js +18 -16
- package/dist/vtable-gantt.min.js +1 -1
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/index.js.map +1 -1
- package/package.json +4 -4
package/cjs/index.d.ts
CHANGED
|
@@ -5,5 +5,5 @@ import { Gantt } from './Gantt';
|
|
|
5
5
|
import * as tools from './tools';
|
|
6
6
|
import * as VRender from './vrender';
|
|
7
7
|
import * as VTable from './vtable';
|
|
8
|
-
export declare const version = "1.14.
|
|
8
|
+
export declare const version = "1.14.4-alpha.0";
|
|
9
9
|
export { TYPES, GanttConstructorOptions, Gantt, ColumnsDefine, ColumnDefine, LinkColumnDefine, ChartColumnDefine, ImageColumnDefine, SparklineColumnDefine, ProgressbarColumnDefine, TextColumnDefine, GroupColumnDefine, TextAlignType, TextBaselineType, tools, VRender, VTable };
|
package/cjs/index.js
CHANGED
package/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AACA,kDAAoC;AAuBlC,sBAAK;AATP,mCAAgC;AAW9B,sFAXO,aAAK,OAWP;AAVP,+CAAiC;AAsB/B,sBAAK;AArBP,mDAAqC;AAsBnC,0BAAO;AArBT,iDAAmC;AAsBjC,wBAAM;AArBK,QAAA,OAAO,GAAG,
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AACA,kDAAoC;AAuBlC,sBAAK;AATP,mCAAgC;AAW9B,sFAXO,aAAK,OAWP;AAVP,+CAAiC;AAsB/B,sBAAK;AArBP,mDAAqC;AAsBnC,0BAAO;AArBT,iDAAmC;AAsBjC,wBAAM;AArBK,QAAA,OAAO,GAAG,gBAAgB,CAAC","file":"index.js","sourcesContent":["import type { GanttConstructorOptions } from './ts-types';\nimport * as TYPES from './ts-types';\nimport type {\n ColumnDefine,\n ColumnsDefine,\n LinkColumnDefine,\n ChartColumnDefine,\n ImageColumnDefine,\n SparklineColumnDefine,\n ProgressbarColumnDefine,\n TextColumnDefine,\n GroupColumnDefine,\n TextAlignType,\n TextBaselineType\n} from '@visactor/vtable';\nimport { Gantt } from './Gantt';\nimport * as tools from './tools';\nimport * as VRender from './vrender';\nimport * as VTable from './vtable';\nexport const version = \"1.14.4-alpha.0\";\n/**\n * @namespace VTable\n */\nexport {\n TYPES,\n GanttConstructorOptions,\n Gantt,\n ColumnsDefine,\n ColumnDefine,\n LinkColumnDefine,\n ChartColumnDefine,\n ImageColumnDefine,\n SparklineColumnDefine,\n ProgressbarColumnDefine,\n TextColumnDefine,\n GroupColumnDefine,\n TextAlignType,\n TextBaselineType,\n tools,\n VRender,\n VTable\n};\n"]}
|
package/dist/vtable-gantt.js
CHANGED
|
@@ -40376,7 +40376,7 @@
|
|
|
40376
40376
|
return isHandlingChartQueue;
|
|
40377
40377
|
}
|
|
40378
40378
|
function renderChart(chart) {
|
|
40379
|
-
var _a, _b, _c, _d, _e, _f;
|
|
40379
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
40380
40380
|
const {
|
|
40381
40381
|
axes: axes,
|
|
40382
40382
|
dataId: dataId,
|
|
@@ -40423,10 +40423,10 @@
|
|
|
40423
40423
|
} = chart.getRootNode();
|
|
40424
40424
|
let updateSpec = !1;
|
|
40425
40425
|
if (table.options.specFormat) {
|
|
40426
|
-
const formatResult = table.options.specFormat(chart.attribute.spec);
|
|
40426
|
+
const formatResult = table.options.specFormat(chart.attribute.spec, chartInstance, chart);
|
|
40427
40427
|
if (formatResult.needFormatSpec && formatResult.spec) {
|
|
40428
40428
|
const spec = formatResult.spec;
|
|
40429
|
-
chartInstance.updateSpecSync(spec), updateSpec =
|
|
40429
|
+
chartInstance.updateSpecSync(spec), updateSpec = null === (_a = formatResult.updateSpec) || void 0 === _a || _a;
|
|
40430
40430
|
}
|
|
40431
40431
|
}
|
|
40432
40432
|
if (!updateSpec) if (null == axes || axes.forEach((axis, index) => {
|
|
@@ -40446,7 +40446,7 @@
|
|
|
40446
40446
|
tickMode: null === (_e = axis.tick) || void 0 === _e ? void 0 : _e.tickMode
|
|
40447
40447
|
}
|
|
40448
40448
|
}, !0);
|
|
40449
|
-
}), null === (
|
|
40449
|
+
}), null === (_c = null === (_b = table.internalProps.layoutMap) || void 0 === _b ? void 0 : _b.updateDataStateToActiveChartInstance) || void 0 === _c || _c.call(_b, chartInstance), "string" == typeof dataId) chartInstance.updateDataSync(dataId, null != data ? data : []);else {
|
|
40450
40450
|
const dataBatch = [];
|
|
40451
40451
|
for (const dataIdStr in dataId) {
|
|
40452
40452
|
const dataIdAndField = dataId[dataIdStr],
|
|
@@ -40456,11 +40456,11 @@
|
|
|
40456
40456
|
});
|
|
40457
40457
|
dataBatch.push({
|
|
40458
40458
|
id: dataIdStr,
|
|
40459
|
-
values: dataIdAndField ? null !== (
|
|
40460
|
-
fields: null === (
|
|
40461
|
-
}), chartInstance.updateFullDataSync || chartInstance.updateDataSync(dataIdStr, dataIdAndField ? null !== (
|
|
40459
|
+
values: dataIdAndField ? null !== (_d = null == data ? void 0 : data.filter(item => item.hasOwnProperty(dataIdAndField))) && void 0 !== _d ? _d : [] : null != data ? data : [],
|
|
40460
|
+
fields: null === (_e = null == series ? void 0 : series.data) || void 0 === _e ? void 0 : _e.fields
|
|
40461
|
+
}), chartInstance.updateFullDataSync || chartInstance.updateDataSync(dataIdStr, dataIdAndField ? null !== (_f = null == data ? void 0 : data.filter(item => item.hasOwnProperty(dataIdAndField))) && void 0 !== _f ? _f : [] : null != data ? data : []);
|
|
40462
40462
|
}
|
|
40463
|
-
null === (
|
|
40463
|
+
null === (_g = chartInstance.updateFullDataSync) || void 0 === _g || _g.call(chartInstance, dataBatch);
|
|
40464
40464
|
}
|
|
40465
40465
|
cacheStageCanvas(chartInstance.getStage(), chart);
|
|
40466
40466
|
}
|
|
@@ -40582,10 +40582,10 @@
|
|
|
40582
40582
|
context.drawImage(canvas, x, y, width, height);
|
|
40583
40583
|
}) : context.drawImage(cacheCanvas, x, y, width, height);else if (activeChartInstance) {
|
|
40584
40584
|
if (table.options.specFormat) {
|
|
40585
|
-
const formatResult = table.options.specFormat(chart.attribute.spec);
|
|
40585
|
+
const formatResult = table.options.specFormat(chart.attribute.spec, activeChartInstance, chart);
|
|
40586
40586
|
if (formatResult.needFormatSpec && formatResult.spec) {
|
|
40587
40587
|
const spec = formatResult.spec;
|
|
40588
|
-
|
|
40588
|
+
activeChartInstance.updateSpecSync(spec);
|
|
40589
40589
|
}
|
|
40590
40590
|
}
|
|
40591
40591
|
const viewBox = chart.getViewBox();
|
|
@@ -50998,7 +50998,7 @@
|
|
|
50998
50998
|
constructor(container) {
|
|
50999
50999
|
let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
51000
51000
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
51001
|
-
if (super(), this.showFrozenIcon = !0, this.version = "1.14.
|
|
51001
|
+
if (super(), this.showFrozenIcon = !0, this.version = "1.14.4-alpha.0", this.id = `VTable${Date.now()}`, this.isReleased = !1, this._chartEventMap = {}, this.throttleInvalidate = throttle2(this.render.bind(this), 200), !container && "node" !== options.mode && !options.canvas) throw new Error("vtable's container is undefined");
|
|
51002
51002
|
const {
|
|
51003
51003
|
frozenColCount = 0,
|
|
51004
51004
|
frozenRowCount: frozenRowCount,
|
|
@@ -54131,7 +54131,7 @@
|
|
|
54131
54131
|
sourceIds.unshift(targetIndex - this.leftRowSeriesNumberColumnCount, 0), Array.prototype.splice.apply(this._headerCellIds[row], sourceIds);
|
|
54132
54132
|
}
|
|
54133
54133
|
const sourceColumns = this._columns.splice(sourceCellRange.start.col - this.leftRowSeriesNumberColumnCount, sourceSize);
|
|
54134
|
-
return sourceColumns.unshift(targetIndex - this.leftRowSeriesNumberColumnCount, 0), Array.prototype.splice.apply(this._columns, sourceColumns), this.columnTree.movePosition(sourceCellRange.start.row, sourceCellRange.start.col - this.leftRowSeriesNumberColumnCount, targetIndex - this.leftRowSeriesNumberColumnCount), this.columnTree.reset(this.columnTree.tree.children
|
|
54134
|
+
return sourceColumns.unshift(targetIndex - this.leftRowSeriesNumberColumnCount, 0), Array.prototype.splice.apply(this._columns, sourceColumns), this.columnTree.movePosition(sourceCellRange.start.row, sourceCellRange.start.col - this.leftRowSeriesNumberColumnCount, targetIndex - this.leftRowSeriesNumberColumnCount), this.columnTree.reset(this.columnTree.tree.children), this._cellRangeMap = new Map(), {
|
|
54135
54135
|
sourceIndex: sourceCellRange.start.col,
|
|
54136
54136
|
targetIndex: targetIndex,
|
|
54137
54137
|
sourceSize: sourceSize,
|
|
@@ -54150,7 +54150,7 @@
|
|
|
54150
54150
|
sourceIds.unshift(targetIndex, 0), Array.prototype.splice.apply(this._headerCellIds[row], sourceIds);
|
|
54151
54151
|
}
|
|
54152
54152
|
const sourceColumns = this._columns.splice(sourceCellRange.start.row, sourceSize);
|
|
54153
|
-
return sourceColumns.unshift(targetIndex, 0), Array.prototype.splice.apply(this._columns, sourceColumns), this.columnTree.movePosition(sourceCellRange.start.col - this.leftRowSeriesNumberColumnCount, sourceCellRange.start.row, targetIndex + (target.row > source.row ? sourceCellRange.end.row - sourceCellRange.start.row : 0)), this.columnTree.reset(this.columnTree.tree.children
|
|
54153
|
+
return sourceColumns.unshift(targetIndex, 0), Array.prototype.splice.apply(this._columns, sourceColumns), this.columnTree.movePosition(sourceCellRange.start.col - this.leftRowSeriesNumberColumnCount, sourceCellRange.start.row, targetIndex + (target.row > source.row ? sourceCellRange.end.row - sourceCellRange.start.row : 0)), this.columnTree.reset(this.columnTree.tree.children), this._cellRangeMap = new Map(), {
|
|
54154
54154
|
sourceIndex: sourceCellRange.start.row,
|
|
54155
54155
|
targetIndex: targetIndex,
|
|
54156
54156
|
sourceSize: sourceSize,
|
|
@@ -58506,7 +58506,7 @@
|
|
|
58506
58506
|
canvas: null !== (_0 = table.canvas) && void 0 !== _0 ? _0 : table.scenegraph.stage.window.getContext().canvas,
|
|
58507
58507
|
mode: table.options.mode,
|
|
58508
58508
|
modeParams: table.options.modeParams,
|
|
58509
|
-
spec: chartSpec,
|
|
58509
|
+
spec: table.options.specTransformInCell ? table.options.specTransformInCell(chartSpec, col, row) : chartSpec,
|
|
58510
58510
|
ClassType: ClassType,
|
|
58511
58511
|
width: width - padding[3] - padding[1],
|
|
58512
58512
|
height: height - padding[2] - padding[0],
|
|
@@ -58516,7 +58516,9 @@
|
|
|
58516
58516
|
cellPadding: padding,
|
|
58517
58517
|
dpr: table.internalProps.pixelRatio,
|
|
58518
58518
|
axes: table.isPivotChart() ? table.internalProps.layoutMap.getChartAxes(col, row) : [],
|
|
58519
|
-
tableChartOption: table.options.chartOption
|
|
58519
|
+
tableChartOption: table.options.chartOption,
|
|
58520
|
+
col: col,
|
|
58521
|
+
row: row
|
|
58520
58522
|
});
|
|
58521
58523
|
cellGroup.appendChild(chartGroup), table.internalProps.layoutMap.setChartInstance(col, row, chartGroup.chartInstance);
|
|
58522
58524
|
}
|
|
@@ -62461,7 +62463,7 @@
|
|
|
62461
62463
|
themes: themes$1
|
|
62462
62464
|
});
|
|
62463
62465
|
|
|
62464
|
-
const version = "1.14.
|
|
62466
|
+
const version = "1.14.4-alpha.0";
|
|
62465
62467
|
|
|
62466
62468
|
exports.Gantt = Gantt;
|
|
62467
62469
|
exports.TYPES = index$3;
|