@visactor/vtable-plugins 1.18.2-alpha.1 → 1.18.2-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.
Files changed (59) hide show
  1. package/cjs/add-row-column.d.ts +0 -1
  2. package/cjs/add-row-column.js +1 -1
  3. package/cjs/add-row-column.js.map +1 -1
  4. package/cjs/carousel-animation.js.map +1 -1
  5. package/cjs/column-series.d.ts +1 -2
  6. package/cjs/column-series.js +4 -5
  7. package/cjs/column-series.js.map +1 -1
  8. package/cjs/excel-edit-cell-keyboard.d.ts +0 -1
  9. package/cjs/excel-edit-cell-keyboard.js +2 -3
  10. package/cjs/excel-edit-cell-keyboard.js.map +1 -1
  11. package/cjs/focus-highlight.d.ts +1 -2
  12. package/cjs/focus-highlight.js +3 -6
  13. package/cjs/focus-highlight.js.map +1 -1
  14. package/cjs/highlight-header-when-select-cell.d.ts +0 -2
  15. package/cjs/highlight-header-when-select-cell.js +1 -5
  16. package/cjs/highlight-header-when-select-cell.js.map +1 -1
  17. package/cjs/index.d.ts +1 -0
  18. package/cjs/index.js +1 -1
  19. package/cjs/index.js.map +1 -1
  20. package/cjs/rotate-table.d.ts +15 -0
  21. package/cjs/rotate-table.js +85 -0
  22. package/cjs/rotate-table.js.map +1 -0
  23. package/cjs/row-series.d.ts +1 -2
  24. package/cjs/row-series.js +5 -5
  25. package/cjs/row-series.js.map +1 -1
  26. package/cjs/table-carousel-animation.d.ts +0 -1
  27. package/cjs/table-carousel-animation.js +2 -3
  28. package/cjs/table-carousel-animation.js.map +1 -1
  29. package/dist/vtable-plugins.js +8257 -2508
  30. package/dist/vtable-plugins.min.js +1 -1
  31. package/es/add-row-column.d.ts +0 -1
  32. package/es/add-row-column.js +1 -1
  33. package/es/add-row-column.js.map +1 -1
  34. package/es/carousel-animation.js.map +1 -1
  35. package/es/column-series.d.ts +1 -2
  36. package/es/column-series.js +4 -5
  37. package/es/column-series.js.map +1 -1
  38. package/es/excel-edit-cell-keyboard.d.ts +0 -1
  39. package/es/excel-edit-cell-keyboard.js +2 -3
  40. package/es/excel-edit-cell-keyboard.js.map +1 -1
  41. package/es/focus-highlight.d.ts +1 -2
  42. package/es/focus-highlight.js +4 -7
  43. package/es/focus-highlight.js.map +1 -1
  44. package/es/highlight-header-when-select-cell.d.ts +0 -2
  45. package/es/highlight-header-when-select-cell.js +1 -5
  46. package/es/highlight-header-when-select-cell.js.map +1 -1
  47. package/es/index.d.ts +1 -0
  48. package/es/index.js +2 -0
  49. package/es/index.js.map +1 -1
  50. package/es/rotate-table.d.ts +15 -0
  51. package/es/rotate-table.js +53 -0
  52. package/es/rotate-table.js.map +1 -0
  53. package/es/row-series.d.ts +1 -2
  54. package/es/row-series.js +5 -5
  55. package/es/row-series.js.map +1 -1
  56. package/es/table-carousel-animation.d.ts +0 -1
  57. package/es/table-carousel-animation.js +2 -3
  58. package/es/table-carousel-animation.js.map +1 -1
  59. package/package.json +6 -6
package/es/index.d.ts CHANGED
@@ -9,3 +9,4 @@ export * from './excel-edit-cell-keyboard';
9
9
  export * from './types';
10
10
  export * from './focus-highlight';
11
11
  export * from './table-carousel-animation';
12
+ export * from './rotate-table';
package/es/index.js CHANGED
@@ -19,4 +19,6 @@ export * from "./types";
19
19
  export * from "./focus-highlight";
20
20
 
21
21
  export * from "./table-carousel-animation";
22
+
23
+ export * from "./rotate-table";
22
24
  //# sourceMappingURL=index.js.map
package/es/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,qCAAqC,CAAC;AACpD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,SAAS,CAAC;AACxB,cAAc,mBAAmB,CAAC;AAClC,cAAc,4BAA4B,CAAC","file":"index.js","sourcesContent":["export * from './carousel-animation';\nexport * from './invert-highlight';\nexport * from './header-highlight';\nexport * from './add-row-column';\nexport * from './column-series';\nexport * from './row-series';\nexport * from './highlight-header-when-select-cell';\nexport * from './excel-edit-cell-keyboard';\nexport * from './types';\nexport * from './focus-highlight';\nexport * from './table-carousel-animation';\n"]}
1
+ {"version":3,"sources":["index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,qCAAqC,CAAC;AACpD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,SAAS,CAAC;AACxB,cAAc,mBAAmB,CAAC;AAClC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,gBAAgB,CAAC","file":"index.js","sourcesContent":["export * from './carousel-animation';\nexport * from './invert-highlight';\nexport * from './header-highlight';\nexport * from './add-row-column';\nexport * from './column-series';\nexport * from './row-series';\nexport * from './highlight-header-when-select-cell';\nexport * from './excel-edit-cell-keyboard';\nexport * from './types';\nexport * from './focus-highlight';\nexport * from './table-carousel-animation';\nexport * from './rotate-table';\n"]}
@@ -0,0 +1,15 @@
1
+ import type { BaseTable } from '@visactor/vtable/src/core/BaseTable';
2
+ import * as VTable from '@visactor/vtable';
3
+ import type { TableEvents } from '@visactor/vtable/src/core/TABLE_EVENT_TYPE';
4
+ import type { EventArg } from './types';
5
+ export declare class RotateTablePlugin implements VTable.plugins.IVTablePlugin {
6
+ id: string;
7
+ runTime: "initialized"[];
8
+ table: VTable.ListTable;
9
+ vglobal_mapToCanvasPoint: any;
10
+ constructor();
11
+ run(...args: [EventArg, TableEvents[keyof TableEvents] | TableEvents[keyof TableEvents][], VTable.BaseTableAPI]): void;
12
+ release(): void;
13
+ }
14
+ export declare function rotate90WithTransform(this: BaseTable, rotateDom: HTMLElement): void;
15
+ export declare function cancelTransform(this: BaseTable, rotateDom: HTMLElement): void;
@@ -0,0 +1,53 @@
1
+ import { matrixAllocate, transformPointForCanvas, mapToCanvasPointForCanvas, registerGlobalEventTransformer, registerWindowEventTransformer, vglobal } from "@visactor/vtable/es/vrender";
2
+
3
+ import * as VTable from "@visactor/vtable";
4
+
5
+ export class RotateTablePlugin {
6
+ constructor() {
7
+ this.id = "rotate-table", this.runTime = [ VTable.TABLE_EVENT_TYPE.INITIALIZED ];
8
+ }
9
+ run(...args) {
10
+ const table = args[2];
11
+ this.table = table, this.table.rotate90WithTransform = rotate90WithTransform.bind(this.table),
12
+ this.table.cancelTransform = cancelTransform.bind(this.table);
13
+ }
14
+ release() {}
15
+ }
16
+
17
+ export function rotate90WithTransform(rotateDom) {
18
+ this.rotateDegree = 90;
19
+ const rotateCenter = Math.min(rotateDom.clientWidth, rotateDom.clientHeight) / 2, domRect = this.getElement().getBoundingClientRect(), x1 = domRect.left, y1 = domRect.top, x2 = domRect.right, y2 = domRect.bottom;
20
+ rotateDom.style.transform = "rotate(90deg)", rotateDom.style.transformOrigin = `${rotateCenter}px ${rotateCenter}px`;
21
+ const getRect = () => ({
22
+ x1: x1,
23
+ y1: y1,
24
+ x2: x2,
25
+ y2: y2
26
+ }), getMatrix = () => {
27
+ const containerRect = rotateDom.getBoundingClientRect(), domRect = this.getElement().getBoundingClientRect(), x1 = domRect.top, y1 = containerRect.width - domRect.right, matrix = matrixAllocate.allocate(1, 0, 0, 1, 0, 0);
28
+ matrix.translate(x1, y1);
29
+ const centerX = rotateCenter - x1, centerY = rotateCenter - y1;
30
+ return matrix.translate(centerX, centerY), matrix.rotate(Math.PI / 2), matrix.translate(-centerX, -centerY),
31
+ matrix;
32
+ };
33
+ registerGlobalEventTransformer(vglobal, this.getElement(), getMatrix, getRect, transformPointForCanvas),
34
+ registerWindowEventTransformer(this.scenegraph.stage.window, this.getElement(), getMatrix, getRect, transformPointForCanvas),
35
+ this.vglobal_mapToCanvasPoint = vglobal.mapToCanvasPoint, vglobal.mapToCanvasPoint = mapToCanvasPointForCanvas;
36
+ }
37
+
38
+ export function cancelTransform(rotateDom) {
39
+ this.rotateDegree = 0, rotateDom.style.transform = "none", rotateDom.style.transformOrigin = "none";
40
+ const domRect = this.getElement().getBoundingClientRect(), x1 = domRect.left, y1 = domRect.top, x2 = domRect.right, y2 = domRect.bottom, getRect = () => ({
41
+ x1: x1,
42
+ y1: y1,
43
+ x2: x2,
44
+ y2: y2
45
+ }), getMatrix = () => {
46
+ const matrix = matrixAllocate.allocate(1, 0, 0, 1, 0, 0);
47
+ return matrix.translate(x1, y1), matrix;
48
+ };
49
+ registerGlobalEventTransformer(vglobal, this.getElement(), getMatrix, getRect, transformPointForCanvas),
50
+ registerWindowEventTransformer(this.scenegraph.stage.window, this.getElement(), getMatrix, getRect, transformPointForCanvas),
51
+ vglobal.mapToCanvasPoint = this.vglobal_mapToCanvasPoint;
52
+ }
53
+ //# sourceMappingURL=rotate-table.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["rotate-table.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,uBAAuB,EACvB,yBAAyB,EACzB,8BAA8B,EAC9B,8BAA8B,EAC9B,OAAO,EACR,MAAM,6BAA6B,CAAC;AAErC,OAAO,KAAK,MAAM,MAAM,kBAAkB,CAAC;AAa3C,MAAM,OAAO,iBAAiB;IAM5B;QALA,OAAE,GAAG,cAAc,CAAC;QACpB,YAAO,GAAG,CAAC,MAAM,CAAC,gBAAgB,CAAC,WAAW,CAAC,CAAC;IAMhD,CAAC;IACD,GAAG,CAAC,GAAG,IAAwG;QAC7G,MAAM,KAAK,GAAwB,IAAI,CAAC,CAAC,CAAC,CAAC;QAC3C,IAAI,CAAC,KAAK,GAAG,KAAyB,CAAC;QAEvC,IAAI,CAAC,KAAK,CAAC,qBAAqB,GAAG,qBAAqB,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAC1E,IAA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AG,OAAO,CAAC,MAAM,CAAC;IAE1B,MAAM,OAAO,GAAG,GAAG,EAAE;QACnB,OAAO;YACL,EAAE;YACF,EAAE;YACF,EAAE;YACF,EAAE;SACH,CAAC;IACJ,CAAC,CAAC;IACF,MAAM,SAAS,GAAG,GAAG,EAAE;QACrB,MAAM,MAAM,GAAG,cAAc,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;QACzD,MAAM,CAAC,SAAS,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;QACzB,OAAO,MAAM,CAAC;IAChB,CAAC,CAAC;IACF,8BAA8B,CAAC,OAAO,EAAE,IAAI,CAAC,UAAU,EAAE,EAAE,SAAS,EAAE,OAAO,EAAE,uBAAuB,CAAC,CAAC;IACxG,8BAA8B,CAC5B,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,MAAM,EAC5B,IAAI,CAAC,UAAU,EAAE,EACjB,SAAS,EACT,OAAO,EACP,uBAAuB,CACxB,CAAC;IACF,OAAO,CAAC,gBAAgB,GAAG,IAAI,CAAC,wBAAwB,CAAC;AAC3D,CAAC","file":"rotate-table.js","sourcesContent":["import {\n matrixAllocate,\n transformPointForCanvas,\n mapToCanvasPointForCanvas,\n registerGlobalEventTransformer,\n registerWindowEventTransformer,\n vglobal\n} from '@visactor/vtable/es/vrender';\nimport type { BaseTable } from '@visactor/vtable/src/core/BaseTable';\nimport * as VTable from '@visactor/vtable';\nimport type { TableEvents } from '@visactor/vtable/src/core/TABLE_EVENT_TYPE';\nimport type { EventArg } from './types';\n// export type IRotateTablePluginOptions = {\n// // 旋转角度\n// rotate?: number;\n// };\n/**\n * 旋转表格插件。\n * 业务层旋转功能没有使用收系统接口的话,用的transform:'rotate(90deg)'的设置来达到旋转的目的。vtable及vrender都没有进行坐标处理,这样就会导致交互错乱。\n * 所以需要进行坐标转换,将旋转后的坐标转换后作为VRender及VTable逻辑中用到的坐标。\n * 这里使用transform:'rotate(90deg)'的设置来达到旋转的目的。 其他角度应该也是可以实现的,请自行扩展这个插件并兼容\n */\nexport class RotateTablePlugin implements VTable.plugins.IVTablePlugin {\n id = 'rotate-table';\n runTime = [VTable.TABLE_EVENT_TYPE.INITIALIZED];\n table: VTable.ListTable;\n vglobal_mapToCanvasPoint: any; // 保存vrender中vglobal的mapToCanvasPoint原方法\n // pluginOptions: IRotateTablePluginOptions;\n constructor() {\n // this.pluginOptions = pluginOptions;\n }\n run(...args: [EventArg, TableEvents[keyof TableEvents] | TableEvents[keyof TableEvents][], VTable.BaseTableAPI]) {\n const table: VTable.BaseTableAPI = args[2];\n this.table = table as VTable.ListTable;\n //将函数rotate90WithTransform绑定到table实例上\n this.table.rotate90WithTransform = rotate90WithTransform.bind(this.table);\n this.table.cancelTransform = cancelTransform.bind(this.table);\n }\n\n release() {\n // 移除绑定的事件\n }\n}\n\n/**\n * 业务层旋转功能没有使用收系统接口的话,用的transform:'rotate(90deg)'的设置来达到旋转的目的。vtable及vrender都没有进行坐标处理,这样就会导致交互错乱。\n * 所以需要进行坐标转换,将旋转后的坐标转换后作为VRender及VTable逻辑中用到的坐标。\n */\nexport function rotate90WithTransform(this: BaseTable, rotateDom: HTMLElement) {\n this.rotateDegree = 90;\n const rotateCenter = Math.min(rotateDom.clientWidth, rotateDom.clientHeight) / 2;\n const domRect = this.getElement().getBoundingClientRect();\n const x1 = domRect.left;\n const y1 = domRect.top;\n const x2 = domRect.right;\n const y2 = domRect.bottom;\n\n rotateDom.style.transform = 'rotate(90deg)';\n rotateDom.style.transformOrigin = `${rotateCenter}px ${rotateCenter}px`;\n const getRect = () => {\n return {\n x1,\n y1,\n x2,\n y2\n };\n };\n const getMatrix = () => {\n const containerRect = rotateDom.getBoundingClientRect(); //TODO 这个地方应该获取窗口的宽高 最好能从vglobal上直接获取\n const domRect = this.getElement().getBoundingClientRect();\n const x1 = domRect.top;\n const y1 = containerRect.width - domRect.right;\n\n const matrix = matrixAllocate.allocate(1, 0, 0, 1, 0, 0);\n matrix.translate(x1, y1);\n const centerX = rotateCenter - x1;\n const centerY = rotateCenter - y1;\n matrix.translate(centerX, centerY);\n matrix.rotate(Math.PI / 2);\n matrix.translate(-centerX, -centerY);\n return matrix;\n };\n registerGlobalEventTransformer(vglobal, this.getElement(), getMatrix, getRect, transformPointForCanvas);\n registerWindowEventTransformer(\n this.scenegraph.stage.window,\n this.getElement(),\n getMatrix,\n getRect,\n transformPointForCanvas\n );\n this.vglobal_mapToCanvasPoint = vglobal.mapToCanvasPoint;\n vglobal.mapToCanvasPoint = mapToCanvasPointForCanvas;\n //transformPointForCanvas和mapToCanvasPointForCanvas时相对应的\n //具体逻辑在 VRender/packages/vrender-core/src/common/event-transformer.ts中\n // 可以自定义这两个函数 来修改事件属性,transformPointForCanvas中将坐标转换后存放了_canvasX _canvasY,mapToCanvasPointForCanvas中加以利用\n // 在VTable的touch文件中,利用到了_canvasX _canvasY 所以如果自定义上面两个函数也需提供_canvasX _canvasY\n}\nexport function cancelTransform(this: BaseTable, rotateDom: HTMLElement) {\n this.rotateDegree = 0;\n rotateDom.style.transform = 'none';\n rotateDom.style.transformOrigin = 'none';\n const domRect = this.getElement().getBoundingClientRect();\n const x1 = domRect.left;\n const y1 = domRect.top;\n const x2 = domRect.right;\n const y2 = domRect.bottom;\n\n const getRect = () => {\n return {\n x1,\n y1,\n x2,\n y2\n };\n };\n const getMatrix = () => {\n const matrix = matrixAllocate.allocate(1, 0, 0, 1, 0, 0);\n matrix.translate(x1, y1);\n return matrix;\n };\n registerGlobalEventTransformer(vglobal, this.getElement(), getMatrix, getRect, transformPointForCanvas);\n registerWindowEventTransformer(\n this.scenegraph.stage.window,\n this.getElement(),\n getMatrix,\n getRect,\n transformPointForCanvas\n );\n vglobal.mapToCanvasPoint = this.vglobal_mapToCanvasPoint;\n}\n"]}
@@ -3,11 +3,10 @@ export interface RowSeriesOptions {
3
3
  rowCount: number;
4
4
  fillRowRecord?: (index: number) => any;
5
5
  rowSeriesNumber?: TYPES.IRowSeriesNumber;
6
- autoExtendRowTriggerKeys?: ('ArrowDown' | 'Enter')[];
6
+ autoExtendRow?: boolean;
7
7
  }
8
8
  export declare class RowSeriesPlugin implements plugins.IVTablePlugin {
9
9
  id: string;
10
- name: string;
11
10
  runTime: ("before_keydown" | "before_init")[];
12
11
  pluginOptions: RowSeriesOptions;
13
12
  table: ListTable;
package/es/row-series.js CHANGED
@@ -2,13 +2,14 @@ import { TABLE_EVENT_TYPE } from "@visactor/vtable";
2
2
 
3
3
  export class RowSeriesPlugin {
4
4
  constructor(pluginOptions) {
5
- this.id = `row-series-${Date.now()}`, this.name = "Row Series", this.runTime = [ TABLE_EVENT_TYPE.BEFORE_INIT, TABLE_EVENT_TYPE.BEFORE_KEYDOWN ],
5
+ this.id = "row-series", this.runTime = [ TABLE_EVENT_TYPE.BEFORE_INIT, TABLE_EVENT_TYPE.BEFORE_KEYDOWN ],
6
6
  this.pluginOptions = Object.assign({
7
- rowCount: 100
7
+ rowCount: 100,
8
+ autoExtendRow: !0
8
9
  }, pluginOptions);
9
10
  }
10
11
  run(...args) {
11
- var _a, _b;
12
+ var _a;
12
13
  if (args[1] === TABLE_EVENT_TYPE.BEFORE_INIT) {
13
14
  const eventArgs = args[0], table = args[2];
14
15
  this.table = table;
@@ -19,8 +20,7 @@ export class RowSeriesPlugin {
19
20
  width: "auto"
20
21
  });
21
22
  } else if (args[1] === TABLE_EVENT_TYPE.BEFORE_KEYDOWN) {
22
- const e = args[0].event;
23
- (null === (_b = this.pluginOptions.autoExtendRowTriggerKeys) || void 0 === _b ? void 0 : _b.includes(e.key)) && this.table.stateManager.select.cellPos.row === this.table.rowCount - 1 && this.table.addRecord(this.pluginOptions.fillRowRecord ? this.pluginOptions.fillRowRecord(this.table.rowCount - this.table.columnHeaderLevelCount) : {});
23
+ "ArrowDown" === args[0].event.key && this.pluginOptions.autoExtendRow && this.table.stateManager.select.cellPos.row === this.table.rowCount - 1 && this.table.addRecord(this.pluginOptions.fillRowRecord ? this.pluginOptions.fillRowRecord(this.table.rowCount - this.table.columnHeaderLevelCount) : {});
24
24
  }
25
25
  }
26
26
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["row-series.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAkBpD,MAAM,OAAO,eAAe;IAO1B,YAAY,aAA+B;QAN3C,OAAE,GAAG,cAAc,IAAI,CAAC,GAAG,EAAE,EAAE,CAAC;QAChC,SAAI,GAAG,YAAY,CAAC;QACpB,YAAO,GAAG,CAAC,gBAAgB,CAAC,WAAW,EAAE,gBAAgB,CAAC,cAAc,CAAC,CAAC;QAKxE,IAAI,CAAC,aAAa,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,QAAQ,EAAE,GAAG,EAAE,EAAE,aAAa,CAAC,CAAC;IACvE,CAAC;IACD,GAAG,CAAC,GAAG,IAAW;;QAChB,IAAI,IAAI,CAAC,CAAC,CAAC,KAAK,gBAAgB,CAAC,WAAW,EAAE;YAC5C,MAAM,SAAS,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;YAC1B,MAAM,KAAK,GAAiB,IAAI,CAAC,CAAC,CAAC,CAAC;YACpC,IAAI,CAAC,KAAK,GAAG,KAAkB,CAAC;YAChC,MAAM,OAAO,GAAgC,SAAS,CAAC,OAAO,CAAC;YAC/D,MAAM,OAAO,GAAG,MAAA,OAAO,CAAC,OAAO,mCAAI,EAAE,CAAC;YAEtC,KAAK,IAAI,CAAC,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,GAAG,IAAI,CAAC,aAAa,CAAC,QAAQ,EAAE,CAAC,EAAE,EAAE;gBACjE,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,aAAa,CAAC,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;aAC3F;YACD,OAAO,CAAC,OAAO,GAAG,OAAO,CAAC;YAC1B,IAAI,IAAI,CAAC,aAAa,CAAC,eAAe,EAAE;gBACtC,OAAO,CAAC,eAAe,GAAG,IAAI,CAAC,aAAa,CAAC,eAAe,CAAC;gBAC7D,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,eAAe,CAAC,KAAK,EAAE;oBAC7C,OAAO,CAAC,eAAe,CAAC,KAAK,GAAG,MAAM,CAAC;iBACxC;aACF;iBAAM,IAAI,CAAC,OAAO,CAAC,eAAe,EAAE;gBACnC,OAAO,CAAC,eAAe,GAAG;oBACxB,KAAK,EAAE,MAAM;iBACd,CAAC;aACH;SACF;aAAM,IAAI,IAAI,CAAC,CAAC,CAAC,KAAK,gBAAgB,CAAC,cAAc,EAAE;YACtD,MAAM,SAAS,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;YAE1B,MAAM,CAAC,GAAG,SAAS,CAAC,KAAK,CAAC;YAE1B,IACE,CAAA,MAAA,IAAI,CAAC,aAAa,CAAC,wBAAwB,0CAAE,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC;gBAC5D,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,KAAK,IAAI,CAAC,KAAK,CAAC,QAAQ,GAAG,CAAC,EACtE;gBACC,IAAI,CAAC,KAAmB,CAAC,SAAS,CACjC,IAAI,CAAC,aAAa,CAAC,aAAa;oBAC9B,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,aAAa,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,sBAAsB,CAAC;oBAC3F,CAAC,CAAC,EAAE,CACP,CAAC;aACH;SACF;IACH,CAAC;CACF","file":"row-series.js","sourcesContent":["import { TABLE_EVENT_TYPE } from '@visactor/vtable';\nimport type { TYPES, BaseTableAPI, ListTable, ListTableConstructorOptions, plugins } from '@visactor/vtable';\n/**\n * 添加行和列的插件的配置选项\n */\nexport interface RowSeriesOptions {\n rowCount: number;\n fillRowRecord?: (index: number) => any;\n rowSeriesNumber?: TYPES.IRowSeriesNumber;\n /**\n * 是否自动扩展行\n * @default true\n */\n autoExtendRowTriggerKeys?: ('ArrowDown' | 'Enter')[];\n}\n/**\n * 生成行序号标题的插件\n */\nexport class RowSeriesPlugin implements plugins.IVTablePlugin {\n id = `row-series-${Date.now()}`;\n name = 'Row Series';\n runTime = [TABLE_EVENT_TYPE.BEFORE_INIT, TABLE_EVENT_TYPE.BEFORE_KEYDOWN];\n pluginOptions: RowSeriesOptions;\n table: ListTable;\n\n constructor(pluginOptions: RowSeriesOptions) {\n this.pluginOptions = Object.assign({ rowCount: 100 }, pluginOptions);\n }\n run(...args: any[]) {\n if (args[1] === TABLE_EVENT_TYPE.BEFORE_INIT) {\n const eventArgs = args[0];\n const table: BaseTableAPI = args[2];\n this.table = table as ListTable;\n const options: ListTableConstructorOptions = eventArgs.options;\n const records = options.records ?? [];\n //用空数据将records填充到pluginOptions.rowCount\n for (let i = records.length; i < this.pluginOptions.rowCount; i++) {\n records.push(this.pluginOptions.fillRowRecord ? this.pluginOptions.fillRowRecord(i) : {});\n }\n options.records = records;\n if (this.pluginOptions.rowSeriesNumber) {\n options.rowSeriesNumber = this.pluginOptions.rowSeriesNumber;\n if (!this.pluginOptions.rowSeriesNumber.width) {\n options.rowSeriesNumber.width = 'auto';\n }\n } else if (!options.rowSeriesNumber) {\n options.rowSeriesNumber = {\n width: 'auto'\n };\n }\n } else if (args[1] === TABLE_EVENT_TYPE.BEFORE_KEYDOWN) {\n const eventArgs = args[0];\n\n const e = eventArgs.event;\n\n if (\n this.pluginOptions.autoExtendRowTriggerKeys?.includes(e.key) &&\n this.table.stateManager.select.cellPos.row === this.table.rowCount - 1\n ) {\n (this.table as ListTable).addRecord(\n this.pluginOptions.fillRowRecord\n ? this.pluginOptions.fillRowRecord(this.table.rowCount - this.table.columnHeaderLevelCount)\n : {}\n );\n }\n }\n }\n}\n"]}
1
+ {"version":3,"sources":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AI,CAAC,aAAa,CAAC,eAAe,CAAC,KAAK,EAAE;oBAC7C,OAAO,CAAC,eAAe,CAAC,KAAK,GAAG,MAAM,CAAC;iBACxC;aACF;iBAAM,IAAI,CAAC,OAAO,CAAC,eAAe,EAAE;gBACnC,OAAO,CAAC,eAAe,GAAG;oBACxB,KAAK,EAAE,MAAM;iBACd,CAAC;aACH;SACF;aAAM,IAAI,IAAI,CAAC,CAAC,CAAC,KAAK,gBAAgB,CAAC,cAAc,EAAE;YACtD,MAAM,SAAS,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;YAE1B,MAAM,CAAC,GAAG,SAAS,CAAC,KAAK,CAAC;YAC1B,IAAI,CAAC,CAAC,GAAG,KAAK,WAAW,EAAE;gBACzB,IACE,IAAI,CAAC,aAAa,CAAC,aAAa;oBAChC,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,KAAK,IAAI,CAAC,KAAK,CAAC,QAAQ,GAAG,CAAC,EACtE;oBACC,IAAI,CAAC,KAAmB,CAAC,SAAS,CACjC,IAAI,CAAC,aAAa,CAAC,aAAa;wBAC9B,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,aAAa,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,sBAAsB,CAAC;wBAC3F,CAAC,CAAC,EAAE,CACP,CAAC;iBACH;aACF;SACF;IACH,CAAC;CACF","file":"row-series.js","sourcesContent":["import { TABLE_EVENT_TYPE } from '@visactor/vtable';\nimport type { TYPES, BaseTableAPI, ListTable, ListTableConstructorOptions, plugins } from '@visactor/vtable';\n/**\n * 添加行和列的插件的配置选项\n */\nexport interface RowSeriesOptions {\n rowCount: number;\n fillRowRecord?: (index: number) => any;\n rowSeriesNumber?: TYPES.IRowSeriesNumber;\n /**\n * 是否自动扩展行\n * @default true\n */\n autoExtendRow?: boolean;\n}\n/**\n * 生成行序号标题的插件\n */\nexport class RowSeriesPlugin implements plugins.IVTablePlugin {\n id = 'row-series';\n runTime = [TABLE_EVENT_TYPE.BEFORE_INIT, TABLE_EVENT_TYPE.BEFORE_KEYDOWN];\n pluginOptions: RowSeriesOptions;\n table: ListTable;\n\n constructor(pluginOptions: RowSeriesOptions) {\n this.pluginOptions = Object.assign({ rowCount: 100, autoExtendRow: true }, pluginOptions);\n }\n run(...args: any[]) {\n if (args[1] === TABLE_EVENT_TYPE.BEFORE_INIT) {\n const eventArgs = args[0];\n const table: BaseTableAPI = args[2];\n this.table = table as ListTable;\n const options: ListTableConstructorOptions = eventArgs.options;\n const records = options.records ?? [];\n //用空数据将records填充到pluginOptions.rowCount\n for (let i = records.length; i < this.pluginOptions.rowCount; i++) {\n records.push(this.pluginOptions.fillRowRecord ? this.pluginOptions.fillRowRecord(i) : {});\n }\n options.records = records;\n if (this.pluginOptions.rowSeriesNumber) {\n options.rowSeriesNumber = this.pluginOptions.rowSeriesNumber;\n if (!this.pluginOptions.rowSeriesNumber.width) {\n options.rowSeriesNumber.width = 'auto';\n }\n } else if (!options.rowSeriesNumber) {\n options.rowSeriesNumber = {\n width: 'auto'\n };\n }\n } else if (args[1] === TABLE_EVENT_TYPE.BEFORE_KEYDOWN) {\n const eventArgs = args[0];\n\n const e = eventArgs.event;\n if (e.key === 'ArrowDown') {\n if (\n this.pluginOptions.autoExtendRow &&\n this.table.stateManager.select.cellPos.row === this.table.rowCount - 1\n ) {\n (this.table as ListTable).addRecord(\n this.pluginOptions.fillRowRecord\n ? this.pluginOptions.fillRowRecord(this.table.rowCount - this.table.columnHeaderLevelCount)\n : {}\n );\n }\n }\n }\n }\n}\n"]}
@@ -20,7 +20,6 @@ export interface ITableCarouselAnimationPluginOptions {
20
20
  }
21
21
  export declare class TableCarouselAnimationPlugin implements VTable.plugins.IVTablePlugin {
22
22
  id: string;
23
- name: string;
24
23
  runTime: "initialized"[];
25
24
  table: BaseTableAPI;
26
25
  rowCount: number;
@@ -7,9 +7,8 @@ function isInteger(value) {
7
7
  export class TableCarouselAnimationPlugin {
8
8
  constructor(options = {}) {
9
9
  var _a, _b, _c, _d, _e, _f, _g;
10
- this.id = `table-carousel-animation-${Date.now()}`, this.name = "Table Carousel Animation",
11
- this.runTime = [ TABLE_EVENT_TYPE.INITIALIZED ], this.willUpdateRow = !1, this.willUpdateCol = !1,
12
- this.rowCount = null !== (_a = null == options ? void 0 : options.rowCount) && void 0 !== _a ? _a : void 0,
10
+ this.id = "table-carousel-animation", this.runTime = [ TABLE_EVENT_TYPE.INITIALIZED ],
11
+ this.willUpdateRow = !1, this.willUpdateCol = !1, this.rowCount = null !== (_a = null == options ? void 0 : options.rowCount) && void 0 !== _a ? _a : void 0,
13
12
  this.colCount = null !== (_b = null == options ? void 0 : options.colCount) && void 0 !== _b ? _b : void 0,
14
13
  this.animationDuration = null !== (_c = null == options ? void 0 : options.animationDuration) && void 0 !== _c ? _c : 500,
15
14
  this.animationDelay = null !== (_d = null == options ? void 0 : options.animationDelay) && void 0 !== _d ? _d : 1e3,
@@ -1 +1 @@
1
- {"version":3,"sources":["table-carousel-animation.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAEpD,SAAS,SAAS,CAAC,KAAa;IAC9B,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,KAAK,CAAC;AACrC,CAAC;AAeD,MAAM,OAAO,4BAA4B;IAsBvC,YAAY,UAAgD,EAAE;;QArB9D,OAAE,GAAG,4BAA4B,IAAI,CAAC,GAAG,EAAE,EAAE,CAAC;QAC9C,SAAI,GAAG,0BAA0B,CAAC;QAClC,YAAO,GAAG,CAAC,gBAAgB,CAAC,WAAW,CAAC,CAAC;QAYzC,kBAAa,GAAY,KAAK,CAAC;QAC/B,kBAAa,GAAY,KAAK,CAAC;QAO7B,IAAI,CAAC,QAAQ,GAAG,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,QAAQ,mCAAI,SAAS,CAAC;QAC/C,I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I,CAAC,GAAG,EAAE;YACxF,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC;YACrC,SAAS,GAAG,KAAK,CAAC;SACnB;aAAM,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,KAAK,CAAC,aAAa,KAAK,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE;YACrG,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC;YACrC,SAAS,GAAG,KAAK,CAAC;SACnB;aAAM;YACL,IAAI,CAAC,GAAG,IAAI,IAAI,CAAC,QAAQ,CAAC;SAC3B;QAED,IAAI,CAAC,KAAK,CAAC,WAAW,CACpB,IAAI,CAAC,GAAG,EACR,SAAS,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,IAAI,CAAC,iBAAiB,EAAE,MAAM,EAAE,IAAI,CAAC,eAAe,EAAE,CAAC,CAAC,CAAC,SAAS,CAC3F,CAAC;QAEF,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC;QAC1B,UAAU,CACR,GAAG,EAAE;YACH,IAAI,CAAC,aAAa,GAAG,KAAK,CAAC;YAC3B,IAAI,CAAC,SAAS,EAAE,CAAC;QACnB,CAAC,EAED,IAAI,CAAC,iBAAiB,GAAG,IAAI,CAAC,cAAc,CAC7C,CAAC;IACJ,CAAC;IACD,OAAO;IAEP,CAAC;CACF","file":"table-carousel-animation.js","sourcesContent":["import type { EasingType } from '@visactor/vtable/es/vrender';\nimport type { BaseTableAPI } from '@visactor/vtable/es/ts-types/base-table';\nimport { TABLE_EVENT_TYPE } from '@visactor/vtable';\nimport type * as VTable from '@visactor/vtable';\nfunction isInteger(value: number) {\n return Math.floor(value) === value;\n}\n\nexport interface ITableCarouselAnimationPluginOptions {\n rowCount?: number;\n colCount?: number;\n animationDuration?: number;\n animationDelay?: number;\n animationEasing?: EasingType;\n autoPlay?: boolean;\n autoPlayDelay?: number;\n\n customDistRowFunction?: (row: number, table: BaseTableAPI) => { distRow: number; animation?: boolean } | undefined;\n customDistColFunction?: (col: number, table: BaseTableAPI) => { distCol: number; animation?: boolean } | undefined;\n}\n\nexport class TableCarouselAnimationPlugin implements VTable.plugins.IVTablePlugin {\n id = `table-carousel-animation-${Date.now()}`;\n name = 'Table Carousel Animation';\n runTime = [TABLE_EVENT_TYPE.INITIALIZED];\n table: BaseTableAPI;\n\n rowCount: number;\n colCount: number;\n animationDuration: number;\n animationDelay: number;\n animationEasing: EasingType;\n\n playing: boolean;\n row: number;\n col: number;\n willUpdateRow: boolean = false;\n willUpdateCol: boolean = false;\n autoPlay: boolean;\n autoPlayDelay: number;\n\n customDistRowFunction?: (row: number, table: BaseTableAPI) => { distRow: number; animation?: boolean } | undefined;\n customDistColFunction?: (col: number, table: BaseTableAPI) => { distCol: number; animation?: boolean } | undefined;\n constructor(options: ITableCarouselAnimationPluginOptions = {}) {\n this.rowCount = options?.rowCount ?? undefined;\n this.colCount = options?.colCount ?? undefined;\n this.animationDuration = options?.animationDuration ?? 500;\n this.animationDelay = options?.animationDelay ?? 1000;\n this.animationEasing = options?.animationEasing ?? 'linear';\n this.autoPlay = options?.autoPlay ?? false;\n this.autoPlayDelay = options?.autoPlayDelay ?? 0;\n this.customDistColFunction = options.customDistColFunction;\n this.customDistRowFunction = options.customDistRowFunction;\n }\n run(...args: any[]) {\n if (!this.table) {\n this.table = args[2] as BaseTableAPI;\n }\n this.reset();\n\n if (this.autoPlay) {\n setTimeout(() => {\n this.play();\n }, this.autoPlayDelay);\n }\n }\n\n reset() {\n this.playing = false;\n this.row = this.table.frozenRowCount;\n this.col = this.table.frozenColCount;\n }\n\n play() {\n if (!this.table) {\n throw new Error('table is not initialized');\n }\n this.playing = true;\n\n if (this.rowCount && !this.willUpdateRow) {\n this.updateRow();\n } else if (this.colCount && !this.willUpdateCol) {\n this.updateCol();\n }\n }\n\n pause() {\n this.playing = false;\n }\n\n updateRow() {\n if (!this.playing || this.table.isReleased) {\n return;\n }\n\n let animation = true;\n const customRow = this.customDistRowFunction && this.customDistRowFunction(this.row, this.table);\n if (customRow) {\n this.row = customRow.distRow;\n animation = customRow.animation ?? true;\n } else if (isInteger(this.row) && this.table.scenegraph.proxy.screenTopRow !== this.row) {\n this.row = this.table.frozenRowCount;\n animation = false;\n } else if (!isInteger(this.row) && this.table.scenegraph.proxy.screenTopRow !== Math.floor(this.row)) {\n this.row = this.table.frozenRowCount;\n animation = false;\n } else {\n this.row += this.rowCount;\n }\n this.table.scrollToRow(\n this.row,\n animation ? { duration: this.animationDuration, easing: this.animationEasing } : undefined\n );\n this.willUpdateRow = true;\n setTimeout(\n () => {\n this.willUpdateRow = false;\n this.updateRow();\n },\n // animation ? this.animationDuration + this.animationDelay : 0\n this.animationDuration + this.animationDelay\n );\n }\n\n updateCol() {\n if (!this.playing || this.table.isReleased) {\n return;\n }\n\n let animation = true;\n const customCol = this.customDistColFunction && this.customDistColFunction(this.col, this.table);\n if (customCol) {\n this.col = customCol.distCol;\n animation = customCol.animation ?? true;\n } else if (isInteger(this.col) && this.table.scenegraph.proxy.screenLeftCol !== this.col) {\n this.col = this.table.frozenColCount;\n animation = false;\n } else if (!isInteger(this.col) && this.table.scenegraph.proxy.screenLeftCol !== Math.floor(this.col)) {\n this.col = this.table.frozenColCount;\n animation = false;\n } else {\n this.col += this.colCount;\n }\n\n this.table.scrollToCol(\n this.col,\n animation ? { duration: this.animationDuration, easing: this.animationEasing } : undefined\n );\n\n this.willUpdateCol = true;\n setTimeout(\n () => {\n this.willUpdateCol = false;\n this.updateCol();\n },\n // animation ? this.animationDuration + this.animationDelay : 0\n this.animationDuration + this.animationDelay\n );\n }\n release() {\n // do nothing\n }\n}\n"]}
1
+ {"version":3,"sources":["table-carousel-animation.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAEpD,SAAS,SAAS,C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AC;QACnB,CAAC,EAED,IAAI,CAAC,iBAAiB,GAAG,IAAI,CAAC,cAAc,CAC7C,CAAC;IACJ,CAAC;IACD,OAAO;IAEP,CAAC;CACF","file":"table-carousel-animation.js","sourcesContent":["import type { EasingType } from '@visactor/vtable/es/vrender';\nimport type { BaseTableAPI } from '@visactor/vtable/es/ts-types/base-table';\nimport { TABLE_EVENT_TYPE } from '@visactor/vtable';\nimport type * as VTable from '@visactor/vtable';\nfunction isInteger(value: number) {\n return Math.floor(value) === value;\n}\n\nexport interface ITableCarouselAnimationPluginOptions {\n rowCount?: number;\n colCount?: number;\n animationDuration?: number;\n animationDelay?: number;\n animationEasing?: EasingType;\n autoPlay?: boolean;\n autoPlayDelay?: number;\n\n customDistRowFunction?: (row: number, table: BaseTableAPI) => { distRow: number; animation?: boolean } | undefined;\n customDistColFunction?: (col: number, table: BaseTableAPI) => { distCol: number; animation?: boolean } | undefined;\n}\n\nexport class TableCarouselAnimationPlugin implements VTable.plugins.IVTablePlugin {\n id = 'table-carousel-animation';\n runTime = [TABLE_EVENT_TYPE.INITIALIZED];\n table: BaseTableAPI;\n\n rowCount: number;\n colCount: number;\n animationDuration: number;\n animationDelay: number;\n animationEasing: EasingType;\n\n playing: boolean;\n row: number;\n col: number;\n willUpdateRow: boolean = false;\n willUpdateCol: boolean = false;\n autoPlay: boolean;\n autoPlayDelay: number;\n\n customDistRowFunction?: (row: number, table: BaseTableAPI) => { distRow: number; animation?: boolean } | undefined;\n customDistColFunction?: (col: number, table: BaseTableAPI) => { distCol: number; animation?: boolean } | undefined;\n constructor(options: ITableCarouselAnimationPluginOptions = {}) {\n this.rowCount = options?.rowCount ?? undefined;\n this.colCount = options?.colCount ?? undefined;\n this.animationDuration = options?.animationDuration ?? 500;\n this.animationDelay = options?.animationDelay ?? 1000;\n this.animationEasing = options?.animationEasing ?? 'linear';\n this.autoPlay = options?.autoPlay ?? false;\n this.autoPlayDelay = options?.autoPlayDelay ?? 0;\n this.customDistColFunction = options.customDistColFunction;\n this.customDistRowFunction = options.customDistRowFunction;\n }\n run(...args: any[]) {\n if (!this.table) {\n this.table = args[2] as BaseTableAPI;\n }\n this.reset();\n\n if (this.autoPlay) {\n setTimeout(() => {\n this.play();\n }, this.autoPlayDelay);\n }\n }\n\n reset() {\n this.playing = false;\n this.row = this.table.frozenRowCount;\n this.col = this.table.frozenColCount;\n }\n\n play() {\n if (!this.table) {\n throw new Error('table is not initialized');\n }\n this.playing = true;\n\n if (this.rowCount && !this.willUpdateRow) {\n this.updateRow();\n } else if (this.colCount && !this.willUpdateCol) {\n this.updateCol();\n }\n }\n\n pause() {\n this.playing = false;\n }\n\n updateRow() {\n if (!this.playing || this.table.isReleased) {\n return;\n }\n\n let animation = true;\n const customRow = this.customDistRowFunction && this.customDistRowFunction(this.row, this.table);\n if (customRow) {\n this.row = customRow.distRow;\n animation = customRow.animation ?? true;\n } else if (isInteger(this.row) && this.table.scenegraph.proxy.screenTopRow !== this.row) {\n this.row = this.table.frozenRowCount;\n animation = false;\n } else if (!isInteger(this.row) && this.table.scenegraph.proxy.screenTopRow !== Math.floor(this.row)) {\n this.row = this.table.frozenRowCount;\n animation = false;\n } else {\n this.row += this.rowCount;\n }\n this.table.scrollToRow(\n this.row,\n animation ? { duration: this.animationDuration, easing: this.animationEasing } : undefined\n );\n this.willUpdateRow = true;\n setTimeout(\n () => {\n this.willUpdateRow = false;\n this.updateRow();\n },\n // animation ? this.animationDuration + this.animationDelay : 0\n this.animationDuration + this.animationDelay\n );\n }\n\n updateCol() {\n if (!this.playing || this.table.isReleased) {\n return;\n }\n\n let animation = true;\n const customCol = this.customDistColFunction && this.customDistColFunction(this.col, this.table);\n if (customCol) {\n this.col = customCol.distCol;\n animation = customCol.animation ?? true;\n } else if (isInteger(this.col) && this.table.scenegraph.proxy.screenLeftCol !== this.col) {\n this.col = this.table.frozenColCount;\n animation = false;\n } else if (!isInteger(this.col) && this.table.scenegraph.proxy.screenLeftCol !== Math.floor(this.col)) {\n this.col = this.table.frozenColCount;\n animation = false;\n } else {\n this.col += this.colCount;\n }\n\n this.table.scrollToCol(\n this.col,\n animation ? { duration: this.animationDuration, easing: this.animationEasing } : undefined\n );\n\n this.willUpdateCol = true;\n setTimeout(\n () => {\n this.willUpdateCol = false;\n this.updateCol();\n },\n // animation ? this.animationDuration + this.animationDelay : 0\n this.animationDuration + this.animationDelay\n );\n }\n release() {\n // do nothing\n }\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@visactor/vtable-plugins",
3
- "version": "1.18.2-alpha.1",
3
+ "version": "1.18.2-alpha.3",
4
4
  "description": "The search util of VTable",
5
5
  "author": {
6
6
  "name": "VisActor",
@@ -33,11 +33,11 @@
33
33
  "@visactor/vutils": "~0.19.1"
34
34
  },
35
35
  "peerDependencies": {
36
- "@visactor/vtable": "1.18.2-alpha.1"
36
+ "@visactor/vtable": "1.18.2-alpha.3"
37
37
  },
38
38
  "devDependencies": {
39
- "@visactor/vtable": "1.18.2-alpha.1",
40
- "@visactor/vtable-editors": "1.18.2-alpha.1",
39
+ "@visactor/vtable": "1.18.2-alpha.3",
40
+ "@visactor/vtable-editors": "1.18.2-alpha.3",
41
41
  "@visactor/vchart": "1.13.3-alpha.2",
42
42
  "@rushstack/eslint-patch": "~1.1.4",
43
43
  "react": "^18.0.0",
@@ -80,8 +80,8 @@
80
80
  "@types/react-is": "^17.0.3",
81
81
  "rollup-plugin-node-resolve": "5.2.0",
82
82
  "@internal/bundler": "0.0.1",
83
- "@internal/eslint-config": "0.0.1",
84
- "@internal/ts-config": "0.0.1"
83
+ "@internal/ts-config": "0.0.1",
84
+ "@internal/eslint-config": "0.0.1"
85
85
  },
86
86
  "scripts": {
87
87
  "demo": "vite ./demo",