@visactor/vtable-gantt 1.11.6-alpha.1 → 1.11.6-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 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.11.6-alpha.1";
8
+ export declare const version = "1.11.6-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
@@ -52,5 +52,5 @@ exports.VRender = VRender;
52
52
 
53
53
  const VTable = __importStar(require("./vtable"));
54
54
 
55
- exports.VTable = VTable, exports.version = "1.11.6-alpha.1";
55
+ exports.VTable = VTable, exports.version = "1.11.6-alpha.2";
56
56
  //# sourceMappingURL=index.js.map
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.11.6-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};\n"]}
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.11.6-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"]}
@@ -29677,8 +29677,6 @@
29677
29677
  HierarchyState.expand = "expand", HierarchyState.collapse = "collapse", HierarchyState.none = "none", HierarchyState.loading = "loading";
29678
29678
  }(HierarchyState || (HierarchyState = {}));
29679
29679
 
29680
- const cellStyleKeys = ["bgColor", "color", "strokeColor", "borderColor", "linkColor"];
29681
-
29682
29680
  var AggregationType;
29683
29681
  !function (AggregationType) {
29684
29682
  AggregationType.RECORD = "RECORD", AggregationType.NONE = "NONE", AggregationType.SUM = "SUM", AggregationType.MIN = "MIN", AggregationType.MAX = "MAX", AggregationType.AVG = "AVG", AggregationType.COUNT = "COUNT", AggregationType.CUSTOM = "CUSTOM", AggregationType.RECALCULATE = "RECALCULATE";
@@ -35753,7 +35751,7 @@
35753
35751
  }
35754
35752
  return cellGroup.onBeforeAttributeUpdate = onBeforeAttributeUpdateForInvertHighlight, cellGroup;
35755
35753
  }
35756
- function updateCell$1(col, row, table, addNew, isShadow, forceFastUpdate) {
35754
+ function updateCell$1(col, row, table, addNew, isShadow) {
35757
35755
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v;
35758
35756
  const oldCellGroup = table.scenegraph.highPerformanceGetCell(col, row, !0),
35759
35757
  cellLocation = table.getCellLocation(col, row);
@@ -35794,7 +35792,7 @@
35794
35792
  const cellStyle = customStyle || table._getCellStyle(range ? range.start.col : col, range ? range.start.row : row),
35795
35793
  autoWrapText = null !== (_a = cellStyle.autoWrapText) && void 0 !== _a ? _a : table.internalProps.autoWrapText,
35796
35794
  cellTheme = getStyleTheme(cellStyle, table, isMerge ? range.start.col : col, isMerge ? range.start.row : row, getProp).theme;
35797
- if (cellTheme.group.cornerRadius = getCellCornerRadius(col, row, table), !addNew && !isMerge && !((null == define ? void 0 : define.customLayout) || (null == define ? void 0 : define.customRender) || (null == define ? void 0 : define.headerCustomLayout) || (null == define ? void 0 : define.headerCustomRender)) && (forceFastUpdate || canUseFastUpdate(col, row, oldCellGroup, autoWrapText, mayHaveIcon, table))) {
35795
+ if (cellTheme.group.cornerRadius = getCellCornerRadius(col, row, table), !addNew && !isMerge && !((null == define ? void 0 : define.customLayout) || (null == define ? void 0 : define.customRender) || (null == define ? void 0 : define.headerCustomLayout) || (null == define ? void 0 : define.headerCustomRender)) && canUseFastUpdate(col, row, oldCellGroup, autoWrapText, mayHaveIcon, table)) {
35798
35796
  const cellWidth = table.getColWidth(col),
35799
35797
  cellHeight = table.getRowHeight(row);
35800
35798
  oldCellGroup.setAttributes({
@@ -42884,8 +42882,7 @@
42884
42882
  this.component.drillIcon.update(visible, x, y, drillDown, drillUp, this);
42885
42883
  }
42886
42884
  updateCellContent(col, row) {
42887
- let forceFastUpdate = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : !1;
42888
- if (!this.clear) return updateCell$1(col, row, this.table, void 0, void 0, forceFastUpdate);
42885
+ if (!this.clear) return updateCell$1(col, row, this.table);
42889
42886
  }
42890
42887
  setPixelRatio(pixelRatio) {
42891
42888
  this.stage.disableDirtyBounds(), this.stage.window.setDpr(pixelRatio), this.stage.render(), this.stage.enableDirtyBounds();
@@ -48417,34 +48414,25 @@
48417
48414
  }), this.table.scenegraph.updateNextFrame();
48418
48415
  }
48419
48416
  arrangeCustomCellStyle(cellPos, customStyleId) {
48420
- var _a;
48421
48417
  const index = this.customCellStyleArrangement.findIndex(style => style.cellPosition.range && cellPos.range ? style.cellPosition.range.start.col === cellPos.range.start.col && style.cellPosition.range.start.row === cellPos.range.start.row && style.cellPosition.range.end.col === cellPos.range.end.col && style.cellPosition.range.end.row === cellPos.range.end.row : style.cellPosition.col === cellPos.col && style.cellPosition.row === cellPos.row);
48422
- if (-1 === index && !customStyleId) return;
48423
- if (-1 === index && customStyleId) this.customCellStyleArrangement.push({
48424
- cellPosition: {
48425
- col: cellPos.col,
48426
- row: cellPos.row,
48427
- range: cellPos.range
48428
- },
48429
- customStyleId: customStyleId
48430
- });else {
48431
- if (this.customCellStyleArrangement[index].customStyleId === customStyleId) return;
48432
- customStyleId ? this.customCellStyleArrangement[index].customStyleId = customStyleId : this.customCellStyleArrangement.splice(index, 1);
48433
- }
48434
- const style = null === (_a = this.getCustomCellStyleOption(customStyleId)) || void 0 === _a ? void 0 : _a.style;
48435
- let forceFastUpdate;
48436
- if (style) {
48437
- forceFastUpdate = !0;
48438
- for (const key in style) if (-1 === cellStyleKeys.indexOf(key)) {
48439
- forceFastUpdate = !1;
48440
- break;
48418
+ if (-1 !== index || customStyleId) {
48419
+ if (-1 === index && customStyleId) this.customCellStyleArrangement.push({
48420
+ cellPosition: {
48421
+ col: cellPos.col,
48422
+ row: cellPos.row,
48423
+ range: cellPos.range
48424
+ },
48425
+ customStyleId: customStyleId
48426
+ });else {
48427
+ if (this.customCellStyleArrangement[index].customStyleId === customStyleId) return;
48428
+ customStyleId ? this.customCellStyleArrangement[index].customStyleId = customStyleId : this.customCellStyleArrangement.splice(index, 1);
48441
48429
  }
48430
+ if (cellPos.range) for (let col = Math.max(0, cellPos.range.start.col); col <= Math.min(this.table.colCount - 1, cellPos.range.end.col); col++) for (let row = Math.max(0, cellPos.range.start.row); row <= Math.min(this.table.rowCount - 1, cellPos.range.end.row); row++) {
48431
+ const range = this.table.getCellRange(col, row);
48432
+ for (let c = range.start.col; c <= range.end.col; c++) for (let r = range.start.row; r <= range.end.row; r++) this.table.scenegraph.updateCellContent(c, r);
48433
+ } else this.table.scenegraph.updateCellContent(cellPos.col, cellPos.row);
48434
+ this.table.scenegraph.updateNextFrame();
48442
48435
  }
48443
- if (cellPos.range) for (let col = Math.max(0, cellPos.range.start.col); col <= Math.min(this.table.colCount - 1, cellPos.range.end.col); col++) for (let row = Math.max(0, cellPos.range.start.row); row <= Math.min(this.table.rowCount - 1, cellPos.range.end.row); row++) {
48444
- const range = this.table.getCellRange(col, row);
48445
- for (let c = range.start.col; c <= range.end.col; c++) for (let r = range.start.row; r <= range.end.row; r++) this.table.scenegraph.updateCellContent(c, r, forceFastUpdate);
48446
- } else this.table.scenegraph.updateCellContent(cellPos.col, cellPos.row, forceFastUpdate);
48447
- this.table.scenegraph.updateNextFrame();
48448
48436
  }
48449
48437
  updateCustomCell(customCellStyle, customCellStyleArrangement) {
48450
48438
  this.customCellStyle.length = 0, this.customCellStyleArrangement.length = 0, customCellStyle.forEach(cellStyle => {
@@ -48604,7 +48592,7 @@
48604
48592
  constructor(container) {
48605
48593
  let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
48606
48594
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
48607
- if (super(), this.showFrozenIcon = !0, this.version = "1.11.6-alpha.1", 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");
48595
+ if (super(), this.showFrozenIcon = !0, this.version = "1.11.6-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");
48608
48596
  const {
48609
48597
  frozenColCount = 0,
48610
48598
  frozenRowCount: frozenRowCount,
@@ -51871,7 +51859,7 @@
51871
51859
  height: rect.height
51872
51860
  }
51873
51861
  };
51874
- col === this.table.colCount - 1 && (referencePosition.rect.width = rect.width - 1), row === this.table.rowCount - 1 && (referencePosition.rect.height = rect.height - 1), editor.beginEditing, null === (_c = editor.beginEditing) || void 0 === _c || _c.call(editor, this.table.getElement(), referencePosition, dataValue), editor.bindSuccessCallback, null === (_d = editor.bindSuccessCallback) || void 0 === _d || _d.call(editor, () => {
51862
+ editor.beginEditing, null === (_c = editor.beginEditing) || void 0 === _c || _c.call(editor, this.table.getElement(), referencePosition, dataValue), editor.bindSuccessCallback, null === (_d = editor.bindSuccessCallback) || void 0 === _d || _d.call(editor, () => {
51875
51863
  this.completeEdit();
51876
51864
  }), null === (_e = editor.onStart) || void 0 === _e || _e.call(editor, {
51877
51865
  value: dataValue,
@@ -52729,7 +52717,7 @@
52729
52717
  }
52730
52718
  _refreshHierarchyState(col, row) {
52731
52719
  let recalculateColWidths = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : !0;
52732
- var _a;
52720
+ var _a, _b, _c;
52733
52721
  let notFillWidth = !1,
52734
52722
  notFillHeight = !1;
52735
52723
  const checkHasChart = this.internalProps.layoutMap.checkHasChart();
@@ -52754,7 +52742,7 @@
52754
52742
  });
52755
52743
  diffPositions.removeCellPositions = [], this.scenegraph.proxy.refreshRowCount();
52756
52744
  }
52757
- this.scenegraph.updateRow(diffPositions.removeCellPositions, diffPositions.addCellPositions, updateCells, recalculateColWidths), checkHasChart && (this.autoFillWidth && !notFillWidth && (notFillWidth = this.getAllColsWidth() <= this.tableNoFrameWidth), this.autoFillHeight && !notFillHeight && (notFillHeight = this.getAllRowsHeight() <= this.tableNoFrameHeight), ("adaptive" === this.widthMode || notFillWidth || "adaptive" === this.heightMode || notFillHeight) && this.scenegraph.updateChartSizeForResizeColWidth(-1));
52745
+ null === (_b = this.reactCustomLayout) || void 0 === _b || _b.clearCache(), this.scenegraph.updateRow(diffPositions.removeCellPositions, diffPositions.addCellPositions, updateCells, recalculateColWidths), null === (_c = this.reactCustomLayout) || void 0 === _c || _c.updateAllCustomCell(), checkHasChart && (this.autoFillWidth && !notFillWidth && (notFillWidth = this.getAllColsWidth() <= this.tableNoFrameWidth), this.autoFillHeight && !notFillHeight && (notFillHeight = this.getAllRowsHeight() <= this.tableNoFrameHeight), ("adaptive" === this.widthMode || notFillWidth || "adaptive" === this.heightMode || notFillHeight) && this.scenegraph.updateChartSizeForResizeColWidth(-1));
52758
52746
  }
52759
52747
  _hasHierarchyTreeHeader() {
52760
52748
  var _a, _b;
@@ -58551,7 +58539,7 @@
58551
58539
  themes: themes$1
58552
58540
  });
58553
58541
 
58554
- const version = "1.11.6-alpha.1";
58542
+ const version = "1.11.6-alpha.2";
58555
58543
 
58556
58544
  exports.Gantt = Gantt;
58557
58545
  exports.TYPES = index$2;