@visactor/vtable-gantt 1.16.3-alpha.1 → 1.16.3-alpha.2
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/cjs/scenegraph/dependency-link.js +2 -1
- package/cjs/scenegraph/frame-border.js +1 -2
- package/cjs/state/gantt-table-sync.js +0 -1
- package/cjs/tools/inertia.js +2 -1
- package/dist/vtable-gantt.js +37 -18
- 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/es/scenegraph/dependency-link.js +2 -1
- package/es/scenegraph/frame-border.js +1 -2
- package/es/state/gantt-table-sync.js +1 -2
- package/es/tools/inertia.js +2 -1
- package/package.json +5 -5
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.16.3-alpha.
|
|
8
|
+
export declare const version = "1.16.3-alpha.2";
|
|
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,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.16.3-alpha.
|
|
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.16.3-alpha.2\";\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"]}
|
|
@@ -468,4 +468,5 @@ function updateLinkLinePoints(type, linkedFromTaskStartDate, linkedFromTaskEndDa
|
|
|
468
468
|
}
|
|
469
469
|
|
|
470
470
|
exports.DependencyLink = DependencyLink, exports.generateLinkLinePoints = generateLinkLinePoints,
|
|
471
|
-
exports.updateLinkLinePoints = updateLinkLinePoints;
|
|
471
|
+
exports.updateLinkLinePoints = updateLinkLinePoints;
|
|
472
|
+
//# sourceMappingURL=dependency-link.js.map
|
|
@@ -84,7 +84,6 @@ function _syncTableSize(gantt) {
|
|
|
84
84
|
gantt._updateSize(), (0, gantt_helper_1.updateSplitLineAndResizeLine)(gantt));
|
|
85
85
|
}
|
|
86
86
|
|
|
87
|
-
//# sourceMappingURL=gantt-table-sync.js.map
|
|
88
87
|
exports.syncScrollStateToTable = syncScrollStateToTable, exports.syncScrollStateFromTable = syncScrollStateFromTable,
|
|
89
88
|
exports.syncEditCellFromTable = syncEditCellFromTable, exports.syncTreeChangeFromTable = syncTreeChangeFromTable,
|
|
90
89
|
exports.syncSortFromTable = syncSortFromTable, exports.syncDragOrderFromTable = syncDragOrderFromTable,
|
package/cjs/tools/inertia.js
CHANGED
package/dist/vtable-gantt.js
CHANGED
|
@@ -40631,7 +40631,7 @@
|
|
|
40631
40631
|
}
|
|
40632
40632
|
}
|
|
40633
40633
|
activate(table) {
|
|
40634
|
-
var _a, _b, _c, _d
|
|
40634
|
+
var _a, _b, _c, _d;
|
|
40635
40635
|
this.active = !0;
|
|
40636
40636
|
const {
|
|
40637
40637
|
col: col,
|
|
@@ -40649,7 +40649,7 @@
|
|
|
40649
40649
|
y1: y1 - table.scrollTop,
|
|
40650
40650
|
y2: y2 - table.scrollTop
|
|
40651
40651
|
});
|
|
40652
|
-
|
|
40652
|
+
this.activeChartInstance = new this.attribute.ClassType(this.attribute.spec, merge$1({}, this.attribute.tableChartOption, {
|
|
40653
40653
|
renderCanvas: this.attribute.canvas,
|
|
40654
40654
|
mode: "desktop-browser",
|
|
40655
40655
|
canvasControled: !1,
|
|
@@ -40677,7 +40677,7 @@
|
|
|
40677
40677
|
const chartStage = this.activeChartInstance.getStage(),
|
|
40678
40678
|
matrix = this.globalTransMatrix.clone(),
|
|
40679
40679
|
stageMatrix = this.stage.window.getViewBoxTransform();
|
|
40680
|
-
matrix.multiply(stageMatrix.a, stageMatrix.b, stageMatrix.c, stageMatrix.d, stageMatrix.e, stageMatrix.f), chartStage.window.setViewBoxTransform && chartStage.window.setViewBoxTransform(matrix.a, matrix.b, matrix.c, matrix.d, matrix.e, matrix.f), this.activeChartInstance.renderSync(), null === (
|
|
40680
|
+
matrix.multiply(stageMatrix.a, stageMatrix.b, stageMatrix.c, stageMatrix.d, stageMatrix.e, stageMatrix.f), chartStage.window.setViewBoxTransform && chartStage.window.setViewBoxTransform(matrix.a, matrix.b, matrix.c, matrix.d, matrix.e, matrix.f), this.activeChartInstance.renderSync(), null === (_b = null === (_a = table.internalProps.layoutMap) || void 0 === _a ? void 0 : _a.updateDataStateToActiveChartInstance) || void 0 === _b || _b.call(_a, this.activeChartInstance), this.activeChartInstance.on("click", params => {
|
|
40681
40681
|
var _a;
|
|
40682
40682
|
!1 === (null === (_a = this.attribute.spec.select) || void 0 === _a ? void 0 : _a.enable) ? table.scenegraph.updateChartState(null) : Chart.temp && table.scenegraph.updateChartState(null == params ? void 0 : params.datum);
|
|
40683
40683
|
}), this.activeChartInstance.on("brushEnd", params => {
|
|
@@ -40685,7 +40685,7 @@
|
|
|
40685
40685
|
table.scenegraph.updateChartState(null === (_a = null == params ? void 0 : params.value) || void 0 === _a ? void 0 : _a.inBrushData), Chart.temp = 0, setTimeout(() => {
|
|
40686
40686
|
Chart.temp = 1;
|
|
40687
40687
|
}, 0);
|
|
40688
|
-
}), null === (
|
|
40688
|
+
}), null === (_d = (_c = table)._bindChartEvent) || void 0 === _d || _d.call(_c, this.activeChartInstance);
|
|
40689
40689
|
}
|
|
40690
40690
|
deactivate() {
|
|
40691
40691
|
var _a, _b;
|
|
@@ -45088,10 +45088,10 @@
|
|
|
45088
45088
|
null === (_b = null === (_a = null == cellGroup ? void 0 : cellGroup.firstChild) || void 0 === _a ? void 0 : _a.deactivate) || void 0 === _b || _b.call(_a);
|
|
45089
45089
|
}
|
|
45090
45090
|
activateChart(col, row) {
|
|
45091
|
-
var _a, _b
|
|
45091
|
+
var _a, _b;
|
|
45092
45092
|
if (-1 === col || -1 === row) return;
|
|
45093
45093
|
const cellGroup = this.getCell(col, row);
|
|
45094
|
-
|
|
45094
|
+
null === (_b = null === (_a = null == cellGroup ? void 0 : cellGroup.firstChild) || void 0 === _a ? void 0 : _a.activate) || void 0 === _b || _b.call(_a, this.table);
|
|
45095
45095
|
}
|
|
45096
45096
|
removeInteractionBorder(col, row) {
|
|
45097
45097
|
const cellGroup = this.getCell(col, row);
|
|
@@ -50546,13 +50546,15 @@
|
|
|
50546
50546
|
})(candCol, right);
|
|
50547
50547
|
}
|
|
50548
50548
|
function getTargetRowAt(absoluteY, _this) {
|
|
50549
|
+
var _a;
|
|
50549
50550
|
if (0 === absoluteY) return {
|
|
50550
50551
|
top: 0,
|
|
50551
50552
|
row: 0,
|
|
50552
50553
|
bottom: 0,
|
|
50553
50554
|
height: 0
|
|
50554
50555
|
};
|
|
50555
|
-
const
|
|
50556
|
+
const floorOrRound = !0 === (null === (_a = _this.options.customConfig) || void 0 === _a ? void 0 : _a._disableColumnAndRowSizeRound) ? Math.floor : Math.round,
|
|
50557
|
+
candRow = computeTargetRowByY(absoluteY, _this),
|
|
50556
50558
|
bottom = _this.getRowsHeight(0, candRow);
|
|
50557
50559
|
return absoluteY >= bottom ? ((startRow, startBottom) => {
|
|
50558
50560
|
let top = startBottom - _this.getRowHeight(startRow);
|
|
@@ -50562,7 +50564,7 @@
|
|
|
50562
50564
|
for (let row = startRow; row < rowCount; row++) {
|
|
50563
50565
|
const height = _this.getRowHeight(row),
|
|
50564
50566
|
bottom = top + height;
|
|
50565
|
-
if (
|
|
50567
|
+
if (floorOrRound(top) <= floorOrRound(absoluteY) && floorOrRound(absoluteY) < floorOrRound(bottom)) return {
|
|
50566
50568
|
top: top,
|
|
50567
50569
|
row: row,
|
|
50568
50570
|
bottom: bottom,
|
|
@@ -50576,7 +50578,7 @@
|
|
|
50576
50578
|
for (let row = startRow; row >= 0; row--) {
|
|
50577
50579
|
const height = _this.getRowHeight(row),
|
|
50578
50580
|
top = bottom - height;
|
|
50579
|
-
if (
|
|
50581
|
+
if (floorOrRound(top) <= floorOrRound(absoluteY) && floorOrRound(absoluteY) < floorOrRound(bottom)) return {
|
|
50580
50582
|
top: top,
|
|
50581
50583
|
row: row,
|
|
50582
50584
|
bottom: bottom,
|
|
@@ -51429,6 +51431,9 @@
|
|
|
51429
51431
|
})), isFunction$5(style) || (layoutMap.isBottomFrozenRow(row) ? table.bodyBottomStyleCache.set(cacheKey, cacheStyle) : table.bodyStyleCache.set(cacheKey, cacheStyle)), customCellStyle ? mergeStyle(cacheStyle, customCellStyle) : cacheStyle;
|
|
51430
51432
|
}
|
|
51431
51433
|
|
|
51434
|
+
function isInteger(value) {
|
|
51435
|
+
return Math.floor(value) === value;
|
|
51436
|
+
}
|
|
51432
51437
|
class Animateaaa extends ACustomAnimate {
|
|
51433
51438
|
onUpdate(end, ratio, out) {
|
|
51434
51439
|
if (this.from.x !== this.to.x) {
|
|
@@ -51447,18 +51452,32 @@
|
|
|
51447
51452
|
this.ticker.setFPS(60), this.tempGraphic = createRect({});
|
|
51448
51453
|
}
|
|
51449
51454
|
scrollTo(position, animationOption) {
|
|
51450
|
-
var _a, _b
|
|
51455
|
+
var _a, _b;
|
|
51451
51456
|
const from = {
|
|
51452
51457
|
x: this.table.scrollLeft,
|
|
51453
51458
|
y: this.table.scrollTop
|
|
51454
51459
|
},
|
|
51455
|
-
|
|
51456
|
-
|
|
51457
|
-
|
|
51458
|
-
|
|
51460
|
+
{
|
|
51461
|
+
col: col,
|
|
51462
|
+
row: row
|
|
51463
|
+
} = position;
|
|
51464
|
+
let colDecimal,
|
|
51465
|
+
rowDecimal,
|
|
51466
|
+
colInt = col,
|
|
51467
|
+
rowInt = row;
|
|
51468
|
+
isNumber$4(col) && !isInteger(col) && (colInt = Math.floor(col), colDecimal = col - colInt), isNumber$4(row) && !isInteger(row) && (rowInt = Math.floor(row), rowDecimal = row - rowInt);
|
|
51469
|
+
const cellRect = this.table.getCellRect(null != colInt ? colInt : 0, null != rowInt ? rowInt : 0);
|
|
51470
|
+
let {
|
|
51471
|
+
left: left,
|
|
51472
|
+
top: top
|
|
51473
|
+
} = cellRect;
|
|
51474
|
+
colDecimal && (left += colDecimal * cellRect.width), rowDecimal && (top += rowDecimal * cellRect.height);
|
|
51475
|
+
const to = {
|
|
51476
|
+
x: isNumber$4(col) ? left - this.table.getFrozenColsWidth() : this.table.scrollLeft,
|
|
51477
|
+
y: isNumber$4(row) ? top - this.table.getFrozenRowsHeight() : this.table.scrollTop
|
|
51459
51478
|
},
|
|
51460
|
-
duration = isBoolean$4(animationOption) ? animationOption ? 3e3 : 0 : null !== (
|
|
51461
|
-
easing = isBoolean$4(animationOption) ? animationOption ? "linear" : "" : null !== (
|
|
51479
|
+
duration = isBoolean$4(animationOption) ? animationOption ? 3e3 : 0 : null !== (_a = null == animationOption ? void 0 : animationOption.duration) && void 0 !== _a ? _a : 3e3,
|
|
51480
|
+
easing = isBoolean$4(animationOption) ? animationOption ? "linear" : "" : null !== (_b = null == animationOption ? void 0 : animationOption.easing) && void 0 !== _b ? _b : "linear";
|
|
51462
51481
|
new Animate(Generator.GenAutoIncrementId(), this.timeline).bind(this.tempGraphic).play(new Animateaaa(from, to, duration, easing, {
|
|
51463
51482
|
graphic: this.tempGraphic,
|
|
51464
51483
|
table: this.table
|
|
@@ -51489,7 +51508,7 @@
|
|
|
51489
51508
|
constructor(container) {
|
|
51490
51509
|
let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
51491
51510
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
51492
|
-
if (super(), this.showFrozenIcon = !0, this.version = "1.16.3-alpha.
|
|
51511
|
+
if (super(), this.showFrozenIcon = !0, this.version = "1.16.3-alpha.2", 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");
|
|
51493
51512
|
!1 === (null === (_a = options.customConfig) || void 0 === _a ? void 0 : _a.imageAnonymous) && (vglobal.isImageAnonymous = !1);
|
|
51494
51513
|
const {
|
|
51495
51514
|
frozenColCount = 0,
|
|
@@ -64025,7 +64044,7 @@
|
|
|
64025
64044
|
themes: themes$1
|
|
64026
64045
|
});
|
|
64027
64046
|
|
|
64028
|
-
const version = "1.16.3-alpha.
|
|
64047
|
+
const version = "1.16.3-alpha.2";
|
|
64029
64048
|
|
|
64030
64049
|
exports.Gantt = Gantt;
|
|
64031
64050
|
exports.TYPES = index$3;
|