@visactor/vtable-sheet 1.26.1 → 1.26.2-none

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
@@ -2,5 +2,5 @@ import VTableSheet from './components/vtable-sheet';
2
2
  import type { ISheetDefine, IVTableSheetOptions, IVTableSheetUpdateOptions } from './ts-types';
3
3
  import * as TYPES from './ts-types';
4
4
  import * as VTable from './vtable';
5
- export declare const version = "1.26.1";
5
+ export declare const version = "1.26.2-none";
6
6
  export { VTableSheet, TYPES, VTable, ISheetDefine, IVTableSheetOptions, IVTableSheetUpdateOptions };
package/cjs/index.js CHANGED
@@ -47,4 +47,4 @@ exports.VTable = VTable;
47
47
 
48
48
  const style_manager_1 = require("./styles/style-manager");
49
49
 
50
- exports.version = "1.26.1", (0, style_manager_1.importStyles)();
50
+ exports.version = "1.26.2-none", (0, style_manager_1.importStyles)();
package/cjs/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6EAAoD;AAW3C,sBAXF,sBAAW,CAWE;AATpB,kDAAoC;AASd,sBAAK;AAR3B,iDAAmC;AAQN,wBAAM;AAPnC,0DAAsD;AACzC,QAAA,OAAO,GAAG,QAAQ,CAAC;AAEhC,IAAA,4BAAY,GAAE,CAAC","file":"index.js","sourcesContent":["import VTableSheet from './components/vtable-sheet';\nimport type { ISheetDefine, IVTableSheetOptions, IVTableSheetUpdateOptions } from './ts-types';\nimport * as TYPES from './ts-types';\nimport * as VTable from './vtable';\nimport { importStyles } from './styles/style-manager';\nexport const version = \"1.26.1\";\n// 导入样式\nimportStyles();\n/**\n * @namespace VTableSheet\n */\nexport { VTableSheet, TYPES, VTable, ISheetDefine, IVTableSheetOptions, IVTableSheetUpdateOptions };\n"]}
1
+ {"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6EAAoD;AAW3C,sBAXF,sBAAW,CAWE;AATpB,kDAAoC;AASd,sBAAK;AAR3B,iDAAmC;AAQN,wBAAM;AAPnC,0DAAsD;AACzC,QAAA,OAAO,GAAG,aAAa,CAAC;AAErC,IAAA,4BAAY,GAAE,CAAC","file":"index.js","sourcesContent":["import VTableSheet from './components/vtable-sheet';\nimport type { ISheetDefine, IVTableSheetOptions, IVTableSheetUpdateOptions } from './ts-types';\nimport * as TYPES from './ts-types';\nimport * as VTable from './vtable';\nimport { importStyles } from './styles/style-manager';\nexport const version = \"1.26.2-none\";\n// 导入样式\nimportStyles();\n/**\n * @namespace VTableSheet\n */\nexport { VTableSheet, TYPES, VTable, ISheetDefine, IVTableSheetOptions, IVTableSheetUpdateOptions };\n"]}
@@ -55148,7 +55148,7 @@
55148
55148
  col: col,
55149
55149
  row: row
55150
55150
  };
55151
- enableShiftSelectMode || (currentRange.end = currentRange.start), scenegraph.deleteLastSelectedRangeComponents(), scenegraph.updateCellSelectBorder(currentRange);
55151
+ enableShiftSelectMode || (currentRange.end = currentRange.start), cellPos.col = col, cellPos.row = row, scenegraph.deleteLastSelectedRangeComponents(), scenegraph.updateCellSelectBorder(currentRange);
55152
55152
  } else {
55153
55153
  let extendSelectRange = !isValid$2(skipBodyMerge) || !skipBodyMerge;
55154
55154
  if (-1 === cellPos.col || -1 === cellPos.row || enableCtrlSelectMode || (state.select.ranges = [], scenegraph.deleteAllSelectBorder()), "cell" !== state.select.headerSelectMode && table.isColumnHeader(col, row)) {
@@ -58835,13 +58835,14 @@
58835
58835
  }
58836
58836
  cellIsHeaderCheck(eventArgsSet, update) {
58837
58837
  const {
58838
- eventArgs: eventArgs
58839
- } = eventArgsSet,
58840
- {
58841
- col: col,
58842
- row: row,
58843
- target: target
58844
- } = eventArgs;
58838
+ eventArgs: eventArgs
58839
+ } = eventArgsSet;
58840
+ if (!eventArgs) return !1;
58841
+ const {
58842
+ col: col,
58843
+ row: row,
58844
+ target: target
58845
+ } = eventArgs;
58845
58846
  if (!this.table.isHeader(col, row)) return !1;
58846
58847
  return "checkbox" === this.table.getCellType(eventArgs.col, eventArgs.row) && "checkbox" === target.name;
58847
58848
  }
@@ -61434,7 +61435,7 @@
61434
61435
  }
61435
61436
  constructor(container, options = {}) {
61436
61437
  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;
61437
- if (super(), this.showFrozenIcon = !0, this._scrollToRowCorrectTimer = null, this._tableBorderWidth_left = 0, this._tableBorderWidth_right = 0, this._tableBorderWidth_top = 0, this._tableBorderWidth_bottom = 0, this.version = "1.26.1", this.id = `VTable${Date.now()}`, this.isReleased = !1, this._chartEventMap = {}, this.throttleInvalidate = throttle2(this.render.bind(this), 200), "undefined" != typeof window) {
61438
+ if (super(), this.showFrozenIcon = !0, this._scrollToRowCorrectTimer = null, this._tableBorderWidth_left = 0, this._tableBorderWidth_right = 0, this._tableBorderWidth_top = 0, this._tableBorderWidth_bottom = 0, this.version = "1.26.2-none", this.id = `VTable${Date.now()}`, this.isReleased = !1, this._chartEventMap = {}, this.throttleInvalidate = throttle2(this.render.bind(this), 200), "undefined" != typeof window) {
61438
61439
  const g = window;
61439
61440
  g[this.id] = this;
61440
61441
  const registry = g.__vtable__ || (g.__vtable__ = {
@@ -62284,22 +62285,20 @@
62284
62285
  return count;
62285
62286
  }
62286
62287
  getBodyVisibleCellRange() {
62288
+ var _a, _b, _c, _d;
62287
62289
  const {
62288
62290
  scrollTop: scrollTop,
62289
62291
  scrollLeft: scrollLeft
62290
62292
  } = this,
62291
- frozenRowsHeight = this.getFrozenRowsHeight(),
62292
62293
  frozenColsContentWidth = this.getFrozenColsContentWidth(),
62293
62294
  frozenColsOffset = this.getFrozenColsOffset(),
62294
62295
  bottomFrozenRowsHeight = this.getBottomFrozenRowsHeight(),
62295
62296
  rightFrozenColsWidth = this.getRightFrozenColsWidth(),
62296
- {
62297
- row: rowStart
62298
- } = this.getRowAt(scrollTop + frozenRowsHeight + 1),
62297
+ rowStart = Math.max(null !== (_b = null === (_a = this.getTargetRowAt(scrollTop + 1)) || void 0 === _a ? void 0 : _a.row) && void 0 !== _b ? _b : -1, this.frozenRowCount),
62299
62298
  {
62300
62299
  col: colStart
62301
62300
  } = this.getColAt(scrollLeft + frozenColsContentWidth + 1),
62302
- rowEnd = this.getAllRowsHeight() > this.tableNoFrameHeight ? this.getRowAt(scrollTop + this.tableNoFrameHeight - 1 - bottomFrozenRowsHeight).row : this.rowCount - 1,
62301
+ rowEnd = this.getAllRowsHeight() > this.tableNoFrameHeight ? Math.max(null !== (_d = null === (_c = this.getTargetRowAt(scrollTop + this.tableNoFrameHeight - 1 - bottomFrozenRowsHeight)) || void 0 === _c ? void 0 : _c.row) && void 0 !== _d ? _d : -1, rowStart) : this.rowCount - 1,
62303
62302
  colEnd = this.getAllColsWidth() > this.tableNoFrameWidth ? this.getColAt(scrollLeft + frozenColsOffset + this.tableNoFrameWidth - 1 - rightFrozenColsWidth).col : this.colCount - 1;
62304
62303
  return colEnd < 0 || rowEnd < 0 ? null : {
62305
62304
  rowStart: rowStart,
@@ -62309,15 +62308,13 @@
62309
62308
  };
62310
62309
  }
62311
62310
  getBodyVisibleRowRange(start_deltaY = 0, end_deltaY = 0) {
62311
+ var _a, _b, _c, _d;
62312
62312
  const {
62313
62313
  scrollTop: scrollTop
62314
62314
  } = this,
62315
- frozenRowsHeight = this.getFrozenRowsHeight(),
62316
62315
  bottomFrozenRowsHeight = this.getBottomFrozenRowsHeight(),
62317
- {
62318
- row: rowStart
62319
- } = this.getRowAt(scrollTop + frozenRowsHeight + 1 + start_deltaY),
62320
- rowEnd = this.getAllRowsHeight() > this.tableNoFrameHeight ? this.getRowAt(scrollTop + this.tableNoFrameHeight - 1 - bottomFrozenRowsHeight + end_deltaY).row : this.rowCount - 1;
62316
+ rowStart = Math.max(null !== (_b = null === (_a = this.getTargetRowAt(scrollTop + 1 + start_deltaY)) || void 0 === _a ? void 0 : _a.row) && void 0 !== _b ? _b : -1, this.frozenRowCount),
62317
+ rowEnd = this.getAllRowsHeight() > this.tableNoFrameHeight ? Math.max(null !== (_d = null === (_c = this.getTargetRowAt(scrollTop + this.tableNoFrameHeight - 1 - bottomFrozenRowsHeight + end_deltaY)) || void 0 === _c ? void 0 : _c.row) && void 0 !== _d ? _d : -1, rowStart) : this.rowCount - 1;
62321
62318
  return rowEnd < 0 ? null : {
62322
62319
  rowStart: rowStart,
62323
62320
  rowEnd: rowEnd
@@ -65034,7 +65031,7 @@
65034
65031
  return !1;
65035
65032
  }
65036
65033
  moveHeaderPosition(source, target) {
65037
- var _a, _b, _c, _d, _e, _f, _g;
65034
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u;
65038
65035
  if ((!(null === (_a = this._table.options.dragOrder) || void 0 === _a ? void 0 : _a.validateDragOrderOnEnd) || (null === (_b = this._table.options.dragOrder) || void 0 === _b ? void 0 : _b.validateDragOrderOnEnd(source, target))) && this.canMoveHeaderPosition(source, target)) {
65039
65036
  let sourceCellRange = this.getCellRange(source.col, source.row);
65040
65037
  if (this.isColumnHeader(source.col, source.row) || "column" === this._table.stateManager.columnMove.movingColumnOrRow && 0 === source.row) {
@@ -65054,9 +65051,13 @@
65054
65051
  sourceData.unshift(targetIndex - this.leftRowSeriesNumberColumnCount, 0), Array.prototype.splice.apply(rowRecords, sourceData);
65055
65052
  }
65056
65053
  }
65057
- const sourceColumns = this._columns.splice(sourceCellRange.start.col - this.leftRowSeriesNumberColumnCount, sourceSize);
65058
- if (sourceColumns.unshift(targetIndex - this.leftRowSeriesNumberColumnCount, 0), Array.prototype.splice.apply(this._columns, sourceColumns), null === (_f = this._table.options.dragOrder) || void 0 === _f ? void 0 : _f.maintainArrayDataOrder) for (let i = 0; i < this._columns.length; i++) this._columns[i].field = i;
65059
- if (this.columnTree.movePosition(sourceCellRange.start.row, sourceCellRange.start.col - this.leftRowSeriesNumberColumnCount, targetIndex - this.leftRowSeriesNumberColumnCount), null === (_g = this._table.options.dragOrder) || void 0 === _g ? void 0 : _g.maintainArrayDataOrder) for (let i = 0; i < this.columnTree.tree.children.length; i++) this.columnTree.tree.children[i].field = i;
65054
+ const sourceColIndex = sourceCellRange.start.col - this.leftRowSeriesNumberColumnCount,
65055
+ targetColIndex = target.col >= source.col ? targetCellRange.end.col - this.leftRowSeriesNumberColumnCount : targetCellRange.start.col - this.leftRowSeriesNumberColumnCount,
65056
+ sourceTotalIndex = null !== (_h = null === (_g = null === (_f = this._columns[sourceColIndex]) || void 0 === _f ? void 0 : _f.define) || void 0 === _g ? void 0 : _g.startInTotal) && void 0 !== _h ? _h : sourceColIndex,
65057
+ targetTotalIndex = null !== (_l = null === (_k = null === (_j = this._columns[targetColIndex]) || void 0 === _j ? void 0 : _j.define) || void 0 === _k ? void 0 : _k.startInTotal) && void 0 !== _l ? _l : targetColIndex,
65058
+ sourceColumns = this._columns.splice(sourceColIndex, sourceSize);
65059
+ if (sourceColumns.unshift(targetIndex - this.leftRowSeriesNumberColumnCount, 0), Array.prototype.splice.apply(this._columns, sourceColumns), null === (_m = this._table.options.dragOrder) || void 0 === _m ? void 0 : _m.maintainArrayDataOrder) for (let i = 0; i < this._columns.length; i++) this._columns[i].field = i;
65060
+ if (this.columnTree.movePosition(sourceCellRange.start.row, sourceTotalIndex, targetTotalIndex), null === (_o = this._table.options.dragOrder) || void 0 === _o ? void 0 : _o.maintainArrayDataOrder) for (let i = 0; i < this.columnTree.tree.children.length; i++) this.columnTree.tree.children[i].field = i;
65060
65061
  return this.columnTree.reset(this.columnTree.tree.children), this._cellRangeMap = new Map(), {
65061
65062
  sourceIndex: sourceCellRange.start.col,
65062
65063
  targetIndex: targetIndex,
@@ -65075,8 +65076,12 @@
65075
65076
  const sourceIds = this._headerCellIds[row].splice(sourceCellRange.start.row, sourceSize);
65076
65077
  sourceIds.unshift(targetIndex, 0), Array.prototype.splice.apply(this._headerCellIds[row], sourceIds);
65077
65078
  }
65078
- const sourceColumns = this._columns.splice(sourceCellRange.start.row, sourceSize);
65079
- return sourceColumns.unshift(targetIndex, 0), Array.prototype.splice.apply(this._columns, sourceColumns), this.columnTree.movePosition(sourceCellRange.start.col - this.leftRowSeriesNumberColumnCount, sourceCellRange.start.row, targetIndex + (target.row > source.row ? sourceCellRange.end.row - sourceCellRange.start.row : 0)), this.columnTree.reset(this.columnTree.tree.children), this._cellRangeMap = new Map(), {
65079
+ const sourceRowIndex = sourceCellRange.start.row,
65080
+ targetRowIndex = target.row >= source.row ? targetCellRange.end.row : targetCellRange.start.row,
65081
+ sourceTotalIndex = null !== (_r = null === (_q = null === (_p = this._columns[sourceRowIndex]) || void 0 === _p ? void 0 : _p.define) || void 0 === _q ? void 0 : _q.startInTotal) && void 0 !== _r ? _r : sourceRowIndex,
65082
+ targetTotalIndex = null !== (_u = null === (_t = null === (_s = this._columns[targetRowIndex]) || void 0 === _s ? void 0 : _s.define) || void 0 === _t ? void 0 : _t.startInTotal) && void 0 !== _u ? _u : targetRowIndex,
65083
+ sourceColumns = this._columns.splice(sourceRowIndex, sourceSize);
65084
+ return sourceColumns.unshift(targetIndex, 0), Array.prototype.splice.apply(this._columns, sourceColumns), this.columnTree.movePosition(sourceCellRange.start.col - this.leftRowSeriesNumberColumnCount, sourceTotalIndex, targetTotalIndex), this.columnTree.reset(this.columnTree.tree.children), this._cellRangeMap = new Map(), {
65080
65085
  sourceIndex: sourceCellRange.start.row,
65081
65086
  targetIndex: targetIndex,
65082
65087
  sourceSize: sourceSize,
@@ -66609,7 +66614,16 @@
66609
66614
  const sourceCellRange = this.getCellRange(source.col, source.row),
66610
66615
  targetCellRange = this.getCellRange(target.col, target.row),
66611
66616
  moveContext = this.internalProps.layoutMap.moveHeaderPosition(source, target);
66612
- return moveContext ? ("column" === moveContext.moveType ? (this.colWidthsMap.exchangeOrder(sourceCellRange.start.col, sourceCellRange.end.col - sourceCellRange.start.col + 1, targetCellRange.start.col, targetCellRange.end.col - targetCellRange.start.col + 1, moveContext.targetIndex), adjustWidthResizedColMap(moveContext, this), this.transpose || (this.colWidthsLimit = {}, this.setMinMaxLimitWidth())) : (moveContext.targetIndex > moveContext.sourceIndex ? this.rowHeightsMap.exchangeOrder(moveContext.sourceIndex, moveContext.sourceSize, moveContext.targetIndex + moveContext.sourceSize - moveContext.targetSize, moveContext.targetSize, moveContext.targetIndex) : this.rowHeightsMap.exchangeOrder(moveContext.sourceIndex, moveContext.sourceSize, moveContext.targetIndex, moveContext.targetSize, moveContext.targetIndex), adjustHeightResizedRowMap(moveContext, this)), moveContext) : null;
66617
+ return moveContext ? ("column" === moveContext.moveType ? (this.colWidthsMap.exchangeOrder(sourceCellRange.start.col, sourceCellRange.end.col - sourceCellRange.start.col + 1, targetCellRange.start.col, targetCellRange.end.col - targetCellRange.start.col + 1, moveContext.targetIndex), adjustWidthResizedColMap(moveContext, this), this.transpose || (this.colWidthsLimit = {}, this.setMinMaxLimitWidth())) : (moveContext.targetIndex > moveContext.sourceIndex ? this.rowHeightsMap.exchangeOrder(moveContext.sourceIndex, moveContext.sourceSize, moveContext.targetIndex + moveContext.sourceSize - moveContext.targetSize, moveContext.targetSize, moveContext.targetIndex) : this.rowHeightsMap.exchangeOrder(moveContext.sourceIndex, moveContext.sourceSize, moveContext.targetIndex, moveContext.targetSize, moveContext.targetIndex), adjustHeightResizedRowMap(moveContext, this)), this.syncColumnsStateFromLayoutMap(), moveContext) : null;
66618
+ }
66619
+ syncColumnsStateFromLayoutMap() {
66620
+ const nextColumns = cloneDeepSpec(this.internalProps.columns, ["children"]),
66621
+ cleanColumns = columns => {
66622
+ columns.forEach(col => {
66623
+ delete col.level, delete col.size, delete col.startInTotal, delete col.startIndex, delete col.id, delete col.hierarchyState, col.columns && cleanColumns(col.columns);
66624
+ });
66625
+ };
66626
+ cleanColumns(nextColumns), this.options.columns = nextColumns, this.options.header && (this.options.header = nextColumns);
66613
66627
  }
66614
66628
  changeRecordOrder(sourceIndex, targetIndex) {
66615
66629
  this.transpose ? (sourceIndex = this.getRecordShowIndexByCell(sourceIndex, 0), targetIndex = this.getRecordShowIndexByCell(targetIndex, 0)) : (sourceIndex = this.getRecordShowIndexByCell(0, sourceIndex), targetIndex = this.getRecordShowIndexByCell(0, targetIndex)), this.dataSource.changeOrder(sourceIndex, targetIndex);
@@ -69378,15 +69392,22 @@
69378
69392
  cursor: "pointer"
69379
69393
  });
69380
69394
  colHeaderGroup.add(hackBorder), colHeaderGroup.border = hackBorder, hackBorder.attachShadow(hackBorder.shadowRoot), hackBorder.name = "border-rect", hackBorder.addEventListener("click", e => {
69395
+ var _a, _b;
69381
69396
  const titleRows = table.listTreeStickCellPlugin.titleRows,
69382
69397
  {
69383
69398
  shadowTarget: shadowTarget
69384
69399
  } = e.pickParams,
69385
- cellGroup = getTargetCell(shadowTarget),
69386
- {
69387
- col: col,
69388
- row: row
69389
- } = cellGroup;
69400
+ cellGroup = getTargetCell(shadowTarget);
69401
+ if (!cellGroup) return;
69402
+ const iconInfo = getIconAndPositionFromTarget(shadowTarget),
69403
+ funcType = null === (_b = null === (_a = null == iconInfo ? void 0 : iconInfo.icon) || void 0 === _a ? void 0 : _a.attribute) || void 0 === _b ? void 0 : _b.funcType;
69404
+ if (funcType === IconFuncTypeEnum.collapse || funcType === IconFuncTypeEnum.expand) {
69405
+ const stickCellTop = getStickCellTop(cellGroup, table);
69406
+ return table.toggleHierarchyState(cellGroup.col, cellGroup.row), void keepRowAtVisiblePosition(cellGroup.col, cellGroup.row, stickCellTop, table);
69407
+ }
69408
+ const {
69409
+ row: row
69410
+ } = cellGroup;
69390
69411
  scrollToRow(row - titleRows.indexOf(row), table);
69391
69412
  });
69392
69413
  }
@@ -69399,15 +69420,22 @@
69399
69420
  cursor: "pointer"
69400
69421
  });
69401
69422
  cornerHeaderGroup.add(hackBorder), cornerHeaderGroup.border = hackBorder, hackBorder.attachShadow(hackBorder.shadowRoot), hackBorder.name = "border-rect", hackBorder.addEventListener("click", e => {
69423
+ var _a, _b;
69402
69424
  const titleRows = table.listTreeStickCellPlugin.titleRows,
69403
69425
  {
69404
69426
  shadowTarget: shadowTarget
69405
69427
  } = e.pickParams,
69406
- cellGroup = getTargetCell(shadowTarget),
69407
- {
69408
- col: col,
69409
- row: row
69410
- } = cellGroup;
69428
+ cellGroup = getTargetCell(shadowTarget);
69429
+ if (!cellGroup) return;
69430
+ const iconInfo = getIconAndPositionFromTarget(shadowTarget),
69431
+ funcType = null === (_b = null === (_a = null == iconInfo ? void 0 : iconInfo.icon) || void 0 === _a ? void 0 : _a.attribute) || void 0 === _b ? void 0 : _b.funcType;
69432
+ if (funcType === IconFuncTypeEnum.collapse || funcType === IconFuncTypeEnum.expand) {
69433
+ const stickCellTop = getStickCellTop(cellGroup, table);
69434
+ return table.toggleHierarchyState(cellGroup.col, cellGroup.row), void keepRowAtVisiblePosition(cellGroup.col, cellGroup.row, stickCellTop, table);
69435
+ }
69436
+ const {
69437
+ row: row
69438
+ } = cellGroup;
69411
69439
  scrollToRow(row - titleRows.indexOf(row), table);
69412
69440
  });
69413
69441
  }
@@ -69427,6 +69455,15 @@
69427
69455
  }
69428
69456
  table.scenegraph.updateNextFrame();
69429
69457
  }
69458
+ function getStickCellTop(cellGroup, table) {
69459
+ var _a, _b;
69460
+ return table.getFrozenRowsHeight() + (null !== (_b = null === (_a = cellGroup.attribute) || void 0 === _a ? void 0 : _a.y) && void 0 !== _b ? _b : 0);
69461
+ }
69462
+ function keepRowAtVisiblePosition(col, row, visibleTop, table) {
69463
+ const drawRange = table.getDrawRange(),
69464
+ targetScrollTop = Math.max(0, Math.min(table.getCellRect(col, row).top - visibleTop, table.getAllRowsHeight() - drawRange.height));
69465
+ table.scrollTop = targetScrollTop, table.scenegraph.updateNextFrame();
69466
+ }
69430
69467
  const registerListTreeStickCellPlugin = () => {
69431
69468
  Factory.registerComponent("listTreeStickCellPlugin", ListTreeStickCellPlugin);
69432
69469
  };
@@ -71407,7 +71444,8 @@
71407
71444
  }, delay);
71408
71445
  }
71409
71446
  release() {
71410
- this.leftDotForAddColumn.remove(), this.rightDotForAddColumn.remove(), this.addIconForAddColumn.remove(), this.addLineForAddColumn.remove(), this.topDotForAddRow.remove(), this.bottomDotForAddRow.remove(), this.addIconForAddRow.remove(), this.addLineForAddRow.remove();
71447
+ var _a, _b, _c, _d, _e, _f, _g, _h;
71448
+ null === (_a = this.leftDotForAddColumn) || void 0 === _a || _a.remove(), null === (_b = this.rightDotForAddColumn) || void 0 === _b || _b.remove(), null === (_c = this.addIconForAddColumn) || void 0 === _c || _c.remove(), null === (_d = this.addLineForAddColumn) || void 0 === _d || _d.remove(), null === (_e = this.topDotForAddRow) || void 0 === _e || _e.remove(), null === (_f = this.bottomDotForAddRow) || void 0 === _f || _f.remove(), null === (_g = this.addIconForAddRow) || void 0 === _g || _g.remove(), null === (_h = this.addLineForAddRow) || void 0 === _h || _h.remove();
71411
71449
  }
71412
71450
  }
71413
71451
 
@@ -83826,10 +83864,12 @@
83826
83864
  }, this.pluginOptions.filterModes && this.pluginOptions.filterModes.length || (this.pluginOptions.filterModes = ["byValue", "byCondition"]), this.pluginOptions.styles = lodashExports.merge(filterStyles, null !== (_d = this.pluginOptions.styles) && void 0 !== _d ? _d : {}), this.pluginOptions.conditionCategories = null !== (_e = pluginOptions.conditionCategories) && void 0 !== _e ? _e : categories;
83827
83865
  }
83828
83866
  initFilterPlugin(eventArgs) {
83829
- this.filterEngine = new FilterEngine(this.pluginOptions), this.filterStateManager = new FilterStateManager(this.table, this.filterEngine), this.filterToolbar = new FilterToolbar(this.table, this.filterStateManager, this.pluginOptions), this.columns = eventArgs.options.columns, this.filterToolbar.render(document.body), this.updateFilterIcons(this.columns), this.filterStateManager.subscribe((_, action) => {
83830
- (null == action ? void 0 : action.type) !== FilterActionType.ADD_FILTER && (this.updateFilterIcons(this.columns), this.table.updateColumns(this.columns, {
83867
+ this.filterEngine = new FilterEngine(this.pluginOptions), this.filterStateManager = new FilterStateManager(this.table, this.filterEngine), this.filterToolbar = new FilterToolbar(this.table, this.filterStateManager, this.pluginOptions), this.columns = eventArgs.options.columns, this.filterToolbar.render(document.body), this.updateFilterIcons(this.getCurrentColumns()), this.filterStateManager.subscribe((_, action) => {
83868
+ if ((null == action ? void 0 : action.type) === FilterActionType.ADD_FILTER) return;
83869
+ const currentColumns = this.getCurrentColumns();
83870
+ this.columns = currentColumns, this.updateFilterIcons(currentColumns), this.table.updateColumns(currentColumns, {
83831
83871
  clearRowHeightCache: !1
83832
- }));
83872
+ });
83833
83873
  });
83834
83874
  }
83835
83875
  run(...args) {
@@ -83864,7 +83904,9 @@
83864
83904
  }
83865
83905
  }
83866
83906
  updatePluginOptions(pluginOptions) {
83867
- this.pluginOptions = lodashExports.merge(this.pluginOptions, pluginOptions), this.filterToolbar.updateStyles(this.pluginOptions.styles), this.table.updateColumns(this.columns, {
83907
+ this.pluginOptions = lodashExports.merge(this.pluginOptions, pluginOptions), this.filterToolbar.updateStyles(this.pluginOptions.styles);
83908
+ const currentColumns = this.getCurrentColumns();
83909
+ this.columns = currentColumns, this.table.updateColumns(currentColumns, {
83868
83910
  clearRowHeightCache: !1
83869
83911
  });
83870
83912
  }
@@ -83896,6 +83938,17 @@
83896
83938
  const currentActiveFields = this.filterStateManager ? this.filterStateManager.getActiveFilterFields() : [];
83897
83939
  this.filterStateManager && currentActiveFields.length > 0 && this.validateFilterStatesAfterUpdate(options, currentActiveFields), this.updateFilterIcons(options.columns);
83898
83940
  }
83941
+ getCurrentColumns() {
83942
+ var _a, _b, _c, _d;
83943
+ if (null === (_b = null === (_a = this.table) || void 0 === _a ? void 0 : _a.isListTable) || void 0 === _b ? void 0 : _b.call(_a)) {
83944
+ const optionColumns = null === (_c = this.table.options) || void 0 === _c ? void 0 : _c.columns;
83945
+ if (null == optionColumns ? void 0 : optionColumns.length) return optionColumns;
83946
+ try {
83947
+ return this.table.columns;
83948
+ } catch (error) {}
83949
+ }
83950
+ return null !== (_d = this.columns) && void 0 !== _d ? _d : [];
83951
+ }
83899
83952
  reapplyActiveFilters() {
83900
83953
  this.filterStateManager.reapplyCurrentFilters();
83901
83954
  }
@@ -96143,7 +96196,7 @@
96143
96196
  importStyle();
96144
96197
  }
96145
96198
 
96146
- const version = "1.26.1";
96199
+ const version = "1.26.2-none";
96147
96200
  importStyles();
96148
96201
 
96149
96202
  exports.TYPES = index;