@visactor/vtable-gantt 1.18.4-alpha.0 → 1.18.4-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/index.d.ts +1 -1
- package/cjs/index.js +1 -1
- package/cjs/index.js.map +1 -1
- package/cjs/scenegraph/timeline-header.js +1 -2
- package/cjs/state/gantt-table-sync.js +1 -0
- package/dist/vtable-gantt.js +17 -17
- package/dist/vtable-gantt.min.js +2 -2
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/index.js.map +1 -1
- package/es/scenegraph/timeline-header.js +1 -2
- package/es/state/gantt-table-sync.js +2 -1
- package/package.json +5 -5
package/cjs/index.d.ts
CHANGED
|
@@ -6,5 +6,5 @@ import * as tools from './tools';
|
|
|
6
6
|
import * as VRender from './vrender';
|
|
7
7
|
import * as VTable from './vtable';
|
|
8
8
|
import * as plugins from './plugins';
|
|
9
|
-
export declare const version = "1.18.4-alpha.
|
|
9
|
+
export declare const version = "1.18.4-alpha.1";
|
|
10
10
|
export { TYPES, GanttConstructorOptions, Gantt, ColumnsDefine, ColumnDefine, LinkColumnDefine, ChartColumnDefine, ImageColumnDefine, SparklineColumnDefine, ProgressbarColumnDefine, TextColumnDefine, GroupColumnDefine, TextAlignType, TextBaselineType, tools, VRender, VTable, plugins };
|
package/cjs/index.js
CHANGED
package/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AACA,kDAAoC;AAwBlC,sBAAK;AAVP,mCAAgC;AAY9B,sFAZO,aAAK,OAYP;AAXP,+CAAiC;AAuB/B,sBAAK;AAtBP,mDAAqC;AAuBnC,0BAAO;AAtBT,iDAAmC;AAuBjC,wBAAM;AAtBR,mDAAqC;AAuBnC,0BAAO;AAtBI,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';\nimport * as plugins from './plugins';\nexport const version = \"1.18.4-alpha.
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AACA,kDAAoC;AAwBlC,sBAAK;AAVP,mCAAgC;AAY9B,sFAZO,aAAK,OAYP;AAXP,+CAAiC;AAuB/B,sBAAK;AAtBP,mDAAqC;AAuBnC,0BAAO;AAtBT,iDAAmC;AAuBjC,wBAAM;AAtBR,mDAAqC;AAuBnC,0BAAO;AAtBI,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';\nimport * as plugins from './plugins';\nexport const version = \"1.18.4-alpha.1\";\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 plugins\n};\n"]}
|
|
@@ -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/dist/vtable-gantt.js
CHANGED
|
@@ -48577,7 +48577,7 @@
|
|
|
48577
48577
|
handler.on(table.getElement(), "blur", e => {
|
|
48578
48578
|
eventManager.dealTableHover();
|
|
48579
48579
|
}), handler.on(table.getElement(), "keydown", e => {
|
|
48580
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w;
|
|
48580
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3;
|
|
48581
48581
|
const beforeKeydownEvent = {
|
|
48582
48582
|
keyCode: null !== (_a = e.keyCode) && void 0 !== _a ? _a : e.which,
|
|
48583
48583
|
code: e.code,
|
|
@@ -48587,10 +48587,10 @@
|
|
|
48587
48587
|
if ((null === (_d = null === (_c = table.options.keyboardOptions) || void 0 === _c ? void 0 : _c.moveEditCellOnArrowKeys) || void 0 === _d || !_d) && (null === (_e = table.editorManager) || void 0 === _e ? void 0 : _e.editingEditor) || !1 === (null === (_f = table.options.keyboardOptions) || void 0 === _f ? void 0 : _f.moveSelectedCellOnArrowKeys)) return;
|
|
48588
48588
|
let targetCol, targetRow;
|
|
48589
48589
|
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;
|
|
48590
|
-
table.selectCell(targetCol, targetRow, e.shiftKey), null !== (_h = null === (_g = table.options.keyboardOptions) || void 0 === _g ? void 0 : _g.moveEditCellOnArrowKeys) && void 0 !== _h && _h && (null === (_j = table.editorManager) || void 0 === _j ? void 0 : _j.editingEditor) && (table.editorManager.completeEdit(), table.getElement().focus(), table.getEditor(targetCol, targetRow) && table.editorManager.startEditCell(targetCol, targetRow));
|
|
48591
|
-
} else if ("Escape" === e.key) null === (
|
|
48592
|
-
if (null === (
|
|
48593
|
-
if (handleKeydownListener(e), table.editorManager.completeEdit(), table.getElement().focus(), !0 === (null === (
|
|
48590
|
+
table.selectCell(targetCol, targetRow, e.shiftKey), null !== (_h = null === (_g = table.options.keyboardOptions) || void 0 === _g ? void 0 : _g.moveEditCellOnArrowKeys) && void 0 !== _h && _h && (null === (_j = table.editorManager) || void 0 === _j ? void 0 : _j.editingEditor) && (null === (_k = table.editorManager) || void 0 === _k || _k.completeEdit(), table.getElement().focus(), table.getEditor(targetCol, targetRow) && (null === (_l = table.editorManager) || void 0 === _l || _l.startEditCell(targetCol, targetRow)));
|
|
48591
|
+
} else if ("Escape" === e.key) null === (_m = table.editorManager) || void 0 === _m || _m.cancelEdit(), table.getElement().focus();else if ("Enter" === e.key) {
|
|
48592
|
+
if (null === (_o = table.editorManager) || void 0 === _o ? void 0 : _o.editingEditor) {
|
|
48593
|
+
if (handleKeydownListener(e), null === (_p = table.editorManager) || void 0 === _p || _p.completeEdit(), table.getElement().focus(), !0 === (null === (_q = table.options.keyboardOptions) || void 0 === _q ? void 0 : _q.moveFocusCellOnEnter)) {
|
|
48594
48594
|
const targetCol = stateManager.select.cellPos.col,
|
|
48595
48595
|
targetRow = Math.min(table.rowCount - 1, Math.max(0, stateManager.select.cellPos.row + 1));
|
|
48596
48596
|
if (isCellDisableSelect(table, targetCol, targetRow)) return;
|
|
@@ -48598,30 +48598,30 @@
|
|
|
48598
48598
|
}
|
|
48599
48599
|
return;
|
|
48600
48600
|
}
|
|
48601
|
-
if (!0 === (null === (
|
|
48601
|
+
if (!0 === (null === (_r = table.options.keyboardOptions) || void 0 === _r ? void 0 : _r.moveFocusCellOnEnter)) {
|
|
48602
48602
|
const targetCol = stateManager.select.cellPos.col,
|
|
48603
48603
|
targetRow = Math.min(table.rowCount - 1, Math.max(0, stateManager.select.cellPos.row + 1));
|
|
48604
48604
|
if (isCellDisableSelect(table, targetCol, targetRow)) return;
|
|
48605
48605
|
table.selectCell(targetCol, targetRow, e.shiftKey);
|
|
48606
|
-
} else if ((null === (
|
|
48606
|
+
} else if ((null === (_t = null === (_s = table.options.keyboardOptions) || void 0 === _s ? void 0 : _s.editCellOnEnter) || void 0 === _t || _t) && 1 === (null !== (_v = null === (_u = table.stateManager.select.ranges) || void 0 === _u ? void 0 : _u.length) && void 0 !== _v ? _v : 0)) {
|
|
48607
48607
|
const startCol = table.stateManager.select.ranges[0].start.col,
|
|
48608
48608
|
startRow = table.stateManager.select.ranges[0].start.row,
|
|
48609
48609
|
endCol = table.stateManager.select.ranges[0].end.col,
|
|
48610
48610
|
endRow = table.stateManager.select.ranges[0].end.row;
|
|
48611
|
-
startCol === endCol && startRow === endRow && table.getEditor(startCol, startRow) && table.editorManager.startEditCell(startCol, startRow);
|
|
48611
|
+
startCol === endCol && startRow === endRow && table.getEditor(startCol, startRow) && (null === (_w = table.editorManager) || void 0 === _w || _w.startEditCell(startCol, startRow));
|
|
48612
48612
|
}
|
|
48613
48613
|
} else if ("Tab" === e.key) {
|
|
48614
|
-
if ((null === (
|
|
48614
|
+
if ((null === (_y = null === (_x = table.options.keyboardOptions) || void 0 === _x ? void 0 : _x.moveFocusCellOnTab) || void 0 === _y || _y) && stateManager.select.cellPos.col >= 0 && stateManager.select.cellPos.row >= 0) {
|
|
48615
48615
|
if (stateManager.select.cellPos.col === table.colCount - 1 && stateManager.select.cellPos.row === table.rowCount - 1) return;
|
|
48616
48616
|
let targetCol, targetRow;
|
|
48617
48617
|
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;
|
|
48618
|
-
table.selectCell(targetCol, targetRow), (null === (
|
|
48618
|
+
table.selectCell(targetCol, targetRow), (null === (_z = table.editorManager) || void 0 === _z ? void 0 : _z.editingEditor) && (null === (_0 = table.editorManager) || void 0 === _0 || _0.completeEdit(), table.getElement().focus(), table.getEditor(targetCol, targetRow) && (null === (_1 = table.editorManager) || void 0 === _1 || _1.startEditCell(targetCol, targetRow)));
|
|
48619
48619
|
}
|
|
48620
48620
|
} else if (!e.ctrlKey && !e.metaKey) {
|
|
48621
48621
|
const editCellTrigger = table.options.editCellTrigger;
|
|
48622
|
-
if (("keydown" === editCellTrigger || Array.isArray(editCellTrigger) && editCellTrigger.includes("keydown")) && !(null === (
|
|
48622
|
+
if (("keydown" === editCellTrigger || Array.isArray(editCellTrigger) && editCellTrigger.includes("keydown")) && !(null === (_2 = table.editorManager) || void 0 === _2 ? void 0 : _2.editingEditor)) {
|
|
48623
48623
|
const allowedKeys = /^[a-zA-Z0-9+\-*\/%=.,\s]$/;
|
|
48624
|
-
e.key.match(allowedKeys) && (table.editorManager.beginTriggerEditCellMode = "keydown", table.editorManager.startEditCell(stateManager.select.cellPos.col, stateManager.select.cellPos.row, ""));
|
|
48624
|
+
e.key.match(allowedKeys) && (table.editorManager && (table.editorManager.beginTriggerEditCellMode = "keydown"), null === (_3 = table.editorManager) || void 0 === _3 || _3.startEditCell(stateManager.select.cellPos.col, stateManager.select.cellPos.row, ""));
|
|
48625
48625
|
}
|
|
48626
48626
|
}
|
|
48627
48627
|
handleKeydownListener(e);
|
|
@@ -48812,7 +48812,7 @@
|
|
|
48812
48812
|
callback: globalPointerdownCallback
|
|
48813
48813
|
}), vglobal.addEventListener("pointerdown", globalPointerdownCallback);
|
|
48814
48814
|
const globalPointerupCallback = e => {
|
|
48815
|
-
var _a;
|
|
48815
|
+
var _a, _b;
|
|
48816
48816
|
if (table.isReleased) return;
|
|
48817
48817
|
const target = e.target;
|
|
48818
48818
|
if (target !== table.canvas && (e => {
|
|
@@ -48840,8 +48840,8 @@
|
|
|
48840
48840
|
})(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()) {
|
|
48841
48841
|
const endMoveColSuccess = table.stateManager.endMoveCol();
|
|
48842
48842
|
fireMoveColEventListeners(table, endMoveColSuccess, e);
|
|
48843
|
-
} else if (table.editorManager.editingEditor && !table.getElement().contains(target)) {
|
|
48844
|
-
const isCompleteEdit = null === (
|
|
48843
|
+
} else if ((null === (_a = table.editorManager) || void 0 === _a ? void 0 : _a.editingEditor) && !table.getElement().contains(target)) {
|
|
48844
|
+
const isCompleteEdit = null === (_b = table.editorManager) || void 0 === _b ? void 0 : _b.completeEdit(e);
|
|
48845
48845
|
getPromiseValue(isCompleteEdit, isCompleteEdit => {
|
|
48846
48846
|
!1 !== isCompleteEdit && (stateManager.updateInteractionState(InteractionState.default), eventManager.dealTableHover());
|
|
48847
48847
|
});
|
|
@@ -52120,7 +52120,7 @@
|
|
|
52120
52120
|
constructor(container) {
|
|
52121
52121
|
let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
52122
52122
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
|
|
52123
|
-
if (super(), this.showFrozenIcon = !0, this.version = "1.18.4-alpha.
|
|
52123
|
+
if (super(), this.showFrozenIcon = !0, this.version = "1.18.4-alpha.1", this.id = `VTable${Date.now()}`, this.isReleased = !1, this._chartEventMap = {}, this.throttleInvalidate = throttle2(this.render.bind(this), 200), "node" === Env.mode ? (options = container, container = null) : container instanceof HTMLElement || (options = container, container = container.container ? container.container : null), !container && "node" !== options.mode && !options.canvas) throw new Error("vtable's container is undefined");
|
|
52124
52124
|
this.pluginManager = new PluginManager$1(this, options), this.fireListeners(TABLE_EVENT_TYPE.BEFORE_INIT, {
|
|
52125
52125
|
options: options,
|
|
52126
52126
|
container: container
|
|
@@ -67798,7 +67798,7 @@
|
|
|
67798
67798
|
PluginManager: PluginManager
|
|
67799
67799
|
});
|
|
67800
67800
|
|
|
67801
|
-
const version = "1.18.4-alpha.
|
|
67801
|
+
const version = "1.18.4-alpha.1";
|
|
67802
67802
|
|
|
67803
67803
|
exports.Gantt = Gantt;
|
|
67804
67804
|
exports.TYPES = index$4;
|