@visactor/vtable-gantt 1.16.3-alpha.2 → 1.16.3-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/index.d.ts +1 -1
- package/cjs/index.js +1 -1
- package/cjs/index.js.map +1 -1
- package/cjs/scenegraph/dependency-link.js +1 -2
- package/cjs/scenegraph/frame-border.js +2 -1
- package/cjs/state/gantt-table-sync.js +1 -0
- package/cjs/tools/inertia.js +1 -2
- package/dist/vtable-gantt.js +18 -36
- 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 +1 -2
- package/es/scenegraph/frame-border.js +2 -1
- package/es/state/gantt-table-sync.js +2 -1
- package/es/tools/inertia.js +1 -2
- package/package.json +3 -3
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.3";
|
|
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.3\";\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,5 +468,4 @@ function updateLinkLinePoints(type, linkedFromTaskStartDate, linkedFromTaskEndDa
|
|
|
468
468
|
}
|
|
469
469
|
|
|
470
470
|
exports.DependencyLink = DependencyLink, exports.generateLinkLinePoints = generateLinkLinePoints,
|
|
471
|
-
exports.updateLinkLinePoints = updateLinkLinePoints;
|
|
472
|
-
//# sourceMappingURL=dependency-link.js.map
|
|
471
|
+
exports.updateLinkLinePoints = updateLinkLinePoints;
|
|
@@ -84,6 +84,7 @@ function _syncTableSize(gantt) {
|
|
|
84
84
|
gantt._updateSize(), (0, gantt_helper_1.updateSplitLineAndResizeLine)(gantt));
|
|
85
85
|
}
|
|
86
86
|
|
|
87
|
+
//# sourceMappingURL=gantt-table-sync.js.map
|
|
87
88
|
exports.syncScrollStateToTable = syncScrollStateToTable, exports.syncScrollStateFromTable = syncScrollStateFromTable,
|
|
88
89
|
exports.syncEditCellFromTable = syncEditCellFromTable, exports.syncTreeChangeFromTable = syncTreeChangeFromTable,
|
|
89
90
|
exports.syncSortFromTable = syncSortFromTable, exports.syncDragOrderFromTable = syncDragOrderFromTable,
|
package/cjs/tools/inertia.js
CHANGED
package/dist/vtable-gantt.js
CHANGED
|
@@ -48330,7 +48330,7 @@
|
|
|
48330
48330
|
!1 !== (null === (_a = table.eventOptions) || void 0 === _a ? void 0 : _a.preventDefaultContextMenu) && e.preventDefault();
|
|
48331
48331
|
}), table.options.canvas || handler.on(table.getContainer(), "resize", e => {
|
|
48332
48332
|
var _a;
|
|
48333
|
-
0 === e.width && 0 === e.height || ((table.autoFillWidth || table.autoFillHeight) && (null === (_a = table.editorManager) || void 0 === _a || _a.completeEdit()), isValid$3(table.options.pixelRatio) || table.setPixelRatio(getPixelRatio$1()), e.windowSizeNotChange || table.resize());
|
|
48333
|
+
table.isReleased || 0 === e.width && 0 === e.height || ((table.autoFillWidth || table.autoFillHeight) && (null === (_a = table.editorManager) || void 0 === _a || _a.completeEdit()), isValid$3(table.options.pixelRatio) || table.setPixelRatio(getPixelRatio$1()), e.windowSizeNotChange || table.resize());
|
|
48334
48334
|
});
|
|
48335
48335
|
const regex = /<tr[^>]*>([\s\S]*?)<\/tr>/g,
|
|
48336
48336
|
cellRegex = /<td[^>]*>([\s\S]*?)<\/td>/g;
|
|
@@ -50546,15 +50546,13 @@
|
|
|
50546
50546
|
})(candCol, right);
|
|
50547
50547
|
}
|
|
50548
50548
|
function getTargetRowAt(absoluteY, _this) {
|
|
50549
|
-
var _a;
|
|
50550
50549
|
if (0 === absoluteY) return {
|
|
50551
50550
|
top: 0,
|
|
50552
50551
|
row: 0,
|
|
50553
50552
|
bottom: 0,
|
|
50554
50553
|
height: 0
|
|
50555
50554
|
};
|
|
50556
|
-
const
|
|
50557
|
-
candRow = computeTargetRowByY(absoluteY, _this),
|
|
50555
|
+
const candRow = computeTargetRowByY(absoluteY, _this),
|
|
50558
50556
|
bottom = _this.getRowsHeight(0, candRow);
|
|
50559
50557
|
return absoluteY >= bottom ? ((startRow, startBottom) => {
|
|
50560
50558
|
let top = startBottom - _this.getRowHeight(startRow);
|
|
@@ -50564,7 +50562,7 @@
|
|
|
50564
50562
|
for (let row = startRow; row < rowCount; row++) {
|
|
50565
50563
|
const height = _this.getRowHeight(row),
|
|
50566
50564
|
bottom = top + height;
|
|
50567
|
-
if (
|
|
50565
|
+
if (Math.round(top) <= Math.round(absoluteY) && Math.round(absoluteY) < Math.round(bottom)) return {
|
|
50568
50566
|
top: top,
|
|
50569
50567
|
row: row,
|
|
50570
50568
|
bottom: bottom,
|
|
@@ -50578,7 +50576,7 @@
|
|
|
50578
50576
|
for (let row = startRow; row >= 0; row--) {
|
|
50579
50577
|
const height = _this.getRowHeight(row),
|
|
50580
50578
|
top = bottom - height;
|
|
50581
|
-
if (
|
|
50579
|
+
if (Math.round(top) <= Math.round(absoluteY) && Math.round(absoluteY) < Math.round(bottom)) return {
|
|
50582
50580
|
top: top,
|
|
50583
50581
|
row: row,
|
|
50584
50582
|
bottom: bottom,
|
|
@@ -50596,7 +50594,7 @@
|
|
|
50596
50594
|
right: 0,
|
|
50597
50595
|
width: 0
|
|
50598
50596
|
};
|
|
50599
|
-
if (isConsider && absoluteX > _this.tableNoFrameWidth - _this.getRightFrozenColsWidth() && absoluteX < _this.tableNoFrameWidth && absoluteX <= _this.getAllColsWidth()) for (let i = 0; i < _this.rightFrozenColCount; i++) if (absoluteX > _this.tableNoFrameWidth - _this.getColsWidth(_this.colCount - i - 1, _this.colCount - 1)) return {
|
|
50597
|
+
if (absoluteX -= _this.tableX, isConsider && absoluteX > _this.tableNoFrameWidth - _this.getRightFrozenColsWidth() && absoluteX < _this.tableNoFrameWidth && absoluteX <= _this.getAllColsWidth()) for (let i = 0; i < _this.rightFrozenColCount; i++) if (absoluteX > _this.tableNoFrameWidth - _this.getColsWidth(_this.colCount - i - 1, _this.colCount - 1)) return {
|
|
50600
50598
|
col: _this.colCount - i - 1,
|
|
50601
50599
|
left: void 0,
|
|
50602
50600
|
right: void 0,
|
|
@@ -50648,8 +50646,8 @@
|
|
|
50648
50646
|
y > _this.tableNoFrameHeight - _this.getBottomFrozenRowsHeight() && y < _this.tableNoFrameHeight && y <= _this.getAllRowsHeight() && (bottomFrozen = !0);
|
|
50649
50647
|
let rightFrozen = !1;
|
|
50650
50648
|
x > _this.tableNoFrameWidth - _this.getRightFrozenColsWidth() && x < _this.tableNoFrameWidth && x <= _this.getAllColsWidth() && (rightFrozen = !0);
|
|
50651
|
-
const colInfo = getTargetColAtConsiderRightFrozen(leftFrozen || rightFrozen ? x : x + _this.scrollLeft, rightFrozen, _this),
|
|
50652
|
-
rowInfo = getTargetRowAtConsiderBottomFrozen(topFrozen || bottomFrozen ? y : y + _this.scrollTop, bottomFrozen, _this);
|
|
50649
|
+
const colInfo = getTargetColAtConsiderRightFrozen((leftFrozen || rightFrozen ? x : x + _this.scrollLeft) + _this.tableX, rightFrozen, _this),
|
|
50650
|
+
rowInfo = getTargetRowAtConsiderBottomFrozen((topFrozen || bottomFrozen ? y : y + _this.scrollTop) + _this.tableY, bottomFrozen, _this);
|
|
50653
50651
|
if (colInfo && rowInfo) {
|
|
50654
50652
|
const {
|
|
50655
50653
|
row: row,
|
|
@@ -51431,9 +51429,6 @@
|
|
|
51431
51429
|
})), isFunction$5(style) || (layoutMap.isBottomFrozenRow(row) ? table.bodyBottomStyleCache.set(cacheKey, cacheStyle) : table.bodyStyleCache.set(cacheKey, cacheStyle)), customCellStyle ? mergeStyle(cacheStyle, customCellStyle) : cacheStyle;
|
|
51432
51430
|
}
|
|
51433
51431
|
|
|
51434
|
-
function isInteger(value) {
|
|
51435
|
-
return Math.floor(value) === value;
|
|
51436
|
-
}
|
|
51437
51432
|
class Animateaaa extends ACustomAnimate {
|
|
51438
51433
|
onUpdate(end, ratio, out) {
|
|
51439
51434
|
if (this.from.x !== this.to.x) {
|
|
@@ -51452,32 +51447,18 @@
|
|
|
51452
51447
|
this.ticker.setFPS(60), this.tempGraphic = createRect({});
|
|
51453
51448
|
}
|
|
51454
51449
|
scrollTo(position, animationOption) {
|
|
51455
|
-
var _a, _b;
|
|
51450
|
+
var _a, _b, _c, _d;
|
|
51456
51451
|
const from = {
|
|
51457
51452
|
x: this.table.scrollLeft,
|
|
51458
51453
|
y: this.table.scrollTop
|
|
51459
51454
|
},
|
|
51460
|
-
|
|
51461
|
-
|
|
51462
|
-
|
|
51463
|
-
|
|
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
|
|
51455
|
+
cellRect = this.table.getCellRect(null !== (_a = position.col) && void 0 !== _a ? _a : 0, null !== (_b = position.row) && void 0 !== _b ? _b : 0),
|
|
51456
|
+
to = {
|
|
51457
|
+
x: isNumber$4(position.col) ? cellRect.left - this.table.getFrozenColsWidth() : this.table.scrollLeft,
|
|
51458
|
+
y: isNumber$4(position.row) ? cellRect.top - this.table.getFrozenRowsHeight() : this.table.scrollTop
|
|
51478
51459
|
},
|
|
51479
|
-
duration = isBoolean$4(animationOption) ? animationOption ? 3e3 : 0 : null !== (
|
|
51480
|
-
easing = isBoolean$4(animationOption) ? animationOption ? "linear" : "" : null !== (
|
|
51460
|
+
duration = isBoolean$4(animationOption) ? animationOption ? 3e3 : 0 : null !== (_c = null == animationOption ? void 0 : animationOption.duration) && void 0 !== _c ? _c : 3e3,
|
|
51461
|
+
easing = isBoolean$4(animationOption) ? animationOption ? "linear" : "" : null !== (_d = null == animationOption ? void 0 : animationOption.easing) && void 0 !== _d ? _d : "linear";
|
|
51481
51462
|
new Animate(Generator.GenAutoIncrementId(), this.timeline).bind(this.tempGraphic).play(new Animateaaa(from, to, duration, easing, {
|
|
51482
51463
|
graphic: this.tempGraphic,
|
|
51483
51464
|
table: this.table
|
|
@@ -51508,7 +51489,7 @@
|
|
|
51508
51489
|
constructor(container) {
|
|
51509
51490
|
let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
51510
51491
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
51511
|
-
if (super(), this.showFrozenIcon = !0, this.version = "1.16.3-alpha.
|
|
51492
|
+
if (super(), this.showFrozenIcon = !0, this.version = "1.16.3-alpha.3", 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");
|
|
51512
51493
|
!1 === (null === (_a = options.customConfig) || void 0 === _a ? void 0 : _a.imageAnonymous) && (vglobal.isImageAnonymous = !1);
|
|
51513
51494
|
const {
|
|
51514
51495
|
frozenColCount = 0,
|
|
@@ -51847,7 +51828,8 @@
|
|
|
51847
51828
|
return this.internalProps.pixelRatio;
|
|
51848
51829
|
}
|
|
51849
51830
|
setPixelRatio(pixelRatio) {
|
|
51850
|
-
|
|
51831
|
+
var _a;
|
|
51832
|
+
if (pixelRatio !== (null === (_a = this.internalProps) || void 0 === _a ? void 0 : _a.pixelRatio)) {
|
|
51851
51833
|
this.internalProps.pixelRatio = pixelRatio;
|
|
51852
51834
|
const canvasWidth = this.canvasWidth;
|
|
51853
51835
|
this.internalProps.calcWidthContext = {
|
|
@@ -64044,7 +64026,7 @@
|
|
|
64044
64026
|
themes: themes$1
|
|
64045
64027
|
});
|
|
64046
64028
|
|
|
64047
|
-
const version = "1.16.3-alpha.
|
|
64029
|
+
const version = "1.16.3-alpha.3";
|
|
64048
64030
|
|
|
64049
64031
|
exports.Gantt = Gantt;
|
|
64050
64032
|
exports.TYPES = index$3;
|