@visactor/vtable-gantt 1.17.3-alpha.15 → 1.17.3-alpha.16
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 -25
- 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 +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.17.3-alpha.
|
|
8
|
+
export declare const version = "1.17.3-alpha.16";
|
|
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,iBAAiB,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.17.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,iBAAiB,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.17.3-alpha.16\";\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
|
@@ -41347,9 +41347,9 @@
|
|
|
41347
41347
|
y2: viewBox.y2 - viewBox.y1
|
|
41348
41348
|
}, !1, !1);
|
|
41349
41349
|
const chartStage = chartInstance.getStage(),
|
|
41350
|
-
matrix = chart.globalTransMatrix
|
|
41351
|
-
stageMatrix = chart.stage.window.getViewBoxTransform();
|
|
41352
|
-
|
|
41350
|
+
matrix = chart.globalTransMatrix,
|
|
41351
|
+
stageMatrix = chart.stage.window.getViewBoxTransform().clone();
|
|
41352
|
+
stageMatrix.multiply(matrix.a, matrix.b, matrix.c, matrix.d, matrix.e, matrix.f), chartStage.window.setViewBoxTransform && chartStage.window.setViewBoxTransform(stageMatrix.a, stageMatrix.b, stageMatrix.c, stageMatrix.d, stageMatrix.e, stageMatrix.f);
|
|
41353
41353
|
const {
|
|
41354
41354
|
table: table
|
|
41355
41355
|
} = chart.getRootNode();
|
|
@@ -48970,15 +48970,15 @@
|
|
|
48970
48970
|
handler.on(table.getElement(), "blur", e => {
|
|
48971
48971
|
eventManager.dealTableHover();
|
|
48972
48972
|
}), handler.on(table.getElement(), "keydown", e => {
|
|
48973
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v
|
|
48973
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v;
|
|
48974
48974
|
if ("a" === e.key && (e.ctrlKey || e.metaKey)) (null === (_a = table.keyboardOptions) || void 0 === _a ? void 0 : _a.selectAllOnCtrlA) && (e.preventDefault(), eventManager.deelTableSelectAll());else if (stateManager.select.cellPos.col >= 0 && stateManager.select.cellPos.row >= 0 && ("ArrowUp" === e.key || "ArrowDown" === e.key || "ArrowLeft" === e.key || "ArrowRight" === e.key)) {
|
|
48975
48975
|
if ((null === (_c = null === (_b = table.options.keyboardOptions) || void 0 === _b ? void 0 : _b.moveEditCellOnArrowKeys) || void 0 === _c || !_c) && (null === (_d = table.editorManager) || void 0 === _d ? void 0 : _d.editingEditor) || !1 === (null === (_e = table.options.keyboardOptions) || void 0 === _e ? void 0 : _e.moveSelectedCellOnArrowKeys)) return;
|
|
48976
48976
|
let targetCol, targetRow;
|
|
48977
48977
|
if (e.preventDefault(), e.stopPropagation(), "ArrowUp" === e.key ? e.ctrlKey || e.metaKey ? (targetCol = stateManager.select.cellPos.col, targetRow = 0) : (e.shiftKey, targetCol = stateManager.select.cellPos.col, targetRow = Math.min(table.rowCount - 1, Math.max(0, stateManager.select.cellPos.row - 1))) : "ArrowDown" === e.key ? e.ctrlKey || e.metaKey ? (targetCol = stateManager.select.cellPos.col, targetRow = table.rowCount - 1) : (e.shiftKey, targetCol = stateManager.select.cellPos.col, targetRow = Math.min(table.rowCount - 1, Math.max(0, stateManager.select.cellPos.row + 1))) : "ArrowLeft" === e.key ? e.ctrlKey || e.metaKey ? (targetCol = 0, targetRow = stateManager.select.cellPos.row) : (e.shiftKey, targetRow = stateManager.select.cellPos.row, targetCol = Math.min(table.colCount - 1, Math.max(0, stateManager.select.cellPos.col - 1))) : "ArrowRight" === e.key && (e.ctrlKey || e.metaKey ? (targetCol = table.colCount - 1, targetRow = stateManager.select.cellPos.row) : (e.shiftKey, targetRow = stateManager.select.cellPos.row, targetCol = Math.min(table.colCount - 1, Math.max(0, stateManager.select.cellPos.col + 1)))), isCellDisableSelect(table, targetCol, targetRow)) return;
|
|
48978
|
-
table.selectCell(targetCol, targetRow, e.shiftKey), null !== (_g = null === (_f = table.options.keyboardOptions) || void 0 === _f ? void 0 : _f.moveEditCellOnArrowKeys) && void 0 !== _g && _g && (null === (_h = table.editorManager) || void 0 === _h ? void 0 : _h.editingEditor) && (
|
|
48979
|
-
} else if ("Escape" === e.key) null === (
|
|
48980
|
-
if (null === (
|
|
48981
|
-
if (handleKeydownListener(e),
|
|
48978
|
+
table.selectCell(targetCol, targetRow, e.shiftKey), null !== (_g = null === (_f = table.options.keyboardOptions) || void 0 === _f ? void 0 : _f.moveEditCellOnArrowKeys) && void 0 !== _g && _g && (null === (_h = table.editorManager) || void 0 === _h ? void 0 : _h.editingEditor) && (table.editorManager.completeEdit(), table.getElement().focus(), table.getEditor(targetCol, targetRow) && table.editorManager.startEditCell(targetCol, targetRow));
|
|
48979
|
+
} else if ("Escape" === e.key) null === (_j = table.editorManager) || void 0 === _j || _j.cancelEdit(), table.getElement().focus();else if ("Enter" === e.key) {
|
|
48980
|
+
if (null === (_k = table.editorManager) || void 0 === _k ? void 0 : _k.editingEditor) {
|
|
48981
|
+
if (handleKeydownListener(e), table.editorManager.completeEdit(), table.getElement().focus(), !0 === (null === (_l = table.options.keyboardOptions) || void 0 === _l ? void 0 : _l.moveFocusCellOnEnter)) {
|
|
48982
48982
|
const targetCol = stateManager.select.cellPos.col,
|
|
48983
48983
|
targetRow = Math.min(table.rowCount - 1, Math.max(0, stateManager.select.cellPos.row + 1));
|
|
48984
48984
|
if (isCellDisableSelect(table, targetCol, targetRow)) return;
|
|
@@ -48986,30 +48986,30 @@
|
|
|
48986
48986
|
}
|
|
48987
48987
|
return;
|
|
48988
48988
|
}
|
|
48989
|
-
if (!0 === (null === (
|
|
48989
|
+
if (!0 === (null === (_m = table.options.keyboardOptions) || void 0 === _m ? void 0 : _m.moveFocusCellOnEnter)) {
|
|
48990
48990
|
const targetCol = stateManager.select.cellPos.col,
|
|
48991
48991
|
targetRow = Math.min(table.rowCount - 1, Math.max(0, stateManager.select.cellPos.row + 1));
|
|
48992
48992
|
if (isCellDisableSelect(table, targetCol, targetRow)) return;
|
|
48993
48993
|
table.selectCell(targetCol, targetRow, e.shiftKey);
|
|
48994
|
-
} else if ((null === (
|
|
48994
|
+
} else if ((null === (_p = null === (_o = table.options.keyboardOptions) || void 0 === _o ? void 0 : _o.editCellOnEnter) || void 0 === _p || _p) && 1 === (null !== (_r = null === (_q = table.stateManager.select.ranges) || void 0 === _q ? void 0 : _q.length) && void 0 !== _r ? _r : 0)) {
|
|
48995
48995
|
const startCol = table.stateManager.select.ranges[0].start.col,
|
|
48996
48996
|
startRow = table.stateManager.select.ranges[0].start.row,
|
|
48997
48997
|
endCol = table.stateManager.select.ranges[0].end.col,
|
|
48998
48998
|
endRow = table.stateManager.select.ranges[0].end.row;
|
|
48999
|
-
startCol === endCol && startRow === endRow && table.getEditor(startCol, startRow) &&
|
|
48999
|
+
startCol === endCol && startRow === endRow && table.getEditor(startCol, startRow) && table.editorManager.startEditCell(startCol, startRow);
|
|
49000
49000
|
}
|
|
49001
49001
|
} else if ("Tab" === e.key) {
|
|
49002
|
-
if ((null === (
|
|
49002
|
+
if ((null === (_t = null === (_s = table.options.keyboardOptions) || void 0 === _s ? void 0 : _s.moveFocusCellOnTab) || void 0 === _t || _t) && stateManager.select.cellPos.col >= 0 && stateManager.select.cellPos.row >= 0) {
|
|
49003
49003
|
if (stateManager.select.cellPos.col === table.colCount - 1 && stateManager.select.cellPos.row === table.rowCount - 1) return;
|
|
49004
49004
|
let targetCol, targetRow;
|
|
49005
49005
|
if (e.preventDefault(), stateManager.select.cellPos.col === table.colCount - 1 ? (targetRow = Math.min(table.rowCount - 1, stateManager.select.cellPos.row + 1), targetCol = table.rowHeaderLevelCount) : (targetRow = stateManager.select.cellPos.row, targetCol = stateManager.select.cellPos.col + 1), isCellDisableSelect(table, targetCol, targetRow)) return;
|
|
49006
|
-
table.selectCell(targetCol, targetRow), (null === (
|
|
49006
|
+
table.selectCell(targetCol, targetRow), (null === (_u = table.editorManager) || void 0 === _u ? void 0 : _u.editingEditor) && (table.editorManager.completeEdit(), table.getElement().focus(), table.getEditor(targetCol, targetRow) && table.editorManager.startEditCell(targetCol, targetRow));
|
|
49007
49007
|
}
|
|
49008
49008
|
} else if (!(e.ctrlKey || e.metaKey || e.shiftKey)) {
|
|
49009
49009
|
const editCellTrigger = table.options.editCellTrigger;
|
|
49010
|
-
if (("keydown" === editCellTrigger || Array.isArray(editCellTrigger) && editCellTrigger.includes("keydown")) && !(null === (
|
|
49010
|
+
if (("keydown" === editCellTrigger || Array.isArray(editCellTrigger) && editCellTrigger.includes("keydown")) && !(null === (_v = table.editorManager) || void 0 === _v ? void 0 : _v.editingEditor)) {
|
|
49011
49011
|
const allowedKeys = /^[a-zA-Z0-9+\-*\/%=.,\s]$/;
|
|
49012
|
-
e.key.match(allowedKeys) &&
|
|
49012
|
+
e.key.match(allowedKeys) && table.editorManager.startEditCell(stateManager.select.cellPos.col, stateManager.select.cellPos.row, "");
|
|
49013
49013
|
}
|
|
49014
49014
|
}
|
|
49015
49015
|
handleKeydownListener(e);
|
|
@@ -49187,9 +49187,7 @@
|
|
|
49187
49187
|
callback: globalPointerdownCallback
|
|
49188
49188
|
}), document.body.addEventListener("pointerdown", globalPointerdownCallback);
|
|
49189
49189
|
const globalPointerupCallback = e => {
|
|
49190
|
-
|
|
49191
|
-
const target = e.target;
|
|
49192
|
-
if (target !== table.canvas && (e => {
|
|
49190
|
+
if (e.target !== table.canvas && (e => {
|
|
49193
49191
|
var _a, _b;
|
|
49194
49192
|
if (stateManager.menu.isShow && setTimeout(() => {
|
|
49195
49193
|
table.internalProps.menuHandler.pointInMenuElement(e.clientX, e.clientY) || stateManager.menu.isShow && stateManager.hideMenu();
|
|
@@ -49214,11 +49212,6 @@
|
|
|
49214
49212
|
})(e), table.eventManager.LastBodyPointerXY = null, table.eventManager.isDown = !1, table.eventManager.isDraging = !1, table.eventManager.inertiaScroll.endInertia(), "grabing" === stateManager.interactionState && stateManager.isResizeCol()) endResizeCol(table);else if ("grabing" === stateManager.interactionState && stateManager.isResizeRow()) endResizeRow(table);else if (stateManager.isMoveCol()) {
|
|
49215
49213
|
const endMoveColSuccess = table.stateManager.endMoveCol();
|
|
49216
49214
|
fireMoveColEventListeners(table, endMoveColSuccess, e);
|
|
49217
|
-
} else if ((null === (_a = table.editorManager) || void 0 === _a ? void 0 : _a.editingEditor) && !table.getElement().contains(target)) {
|
|
49218
|
-
const isCompleteEdit = null === (_b = table.editorManager) || void 0 === _b ? void 0 : _b.completeEdit(e);
|
|
49219
|
-
getPromiseValue(isCompleteEdit, isCompleteEdit => {
|
|
49220
|
-
!1 !== isCompleteEdit && (stateManager.updateInteractionState(InteractionState.default), eventManager.dealTableHover());
|
|
49221
|
-
});
|
|
49222
49215
|
}
|
|
49223
49216
|
};
|
|
49224
49217
|
eventManager.globalEventListeners.push({
|
|
@@ -52357,7 +52350,7 @@
|
|
|
52357
52350
|
constructor(container) {
|
|
52358
52351
|
let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
52359
52352
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
|
|
52360
|
-
if (super(), this.showFrozenIcon = !0, this.version = "1.17.3-alpha.
|
|
52353
|
+
if (super(), this.showFrozenIcon = !0, this.version = "1.17.3-alpha.16", 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");
|
|
52361
52354
|
!1 === (null === (_a = options.customConfig) || void 0 === _a ? void 0 : _a.imageAnonymous) && (vglobal.isImageAnonymous = !1);
|
|
52362
52355
|
const {
|
|
52363
52356
|
frozenColCount = 0,
|
|
@@ -65389,7 +65382,7 @@
|
|
|
65389
65382
|
themes: themes$1
|
|
65390
65383
|
});
|
|
65391
65384
|
|
|
65392
|
-
const version = "1.17.3-alpha.
|
|
65385
|
+
const version = "1.17.3-alpha.16";
|
|
65393
65386
|
|
|
65394
65387
|
exports.Gantt = Gantt;
|
|
65395
65388
|
exports.TYPES = index$3;
|