@leankylin-sheet/core 4.0.32 → 4.0.34

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/dist/index.esm.js CHANGED
@@ -45438,6 +45438,16 @@ function insertRowCol(ctx, op) {
45438
45438
  }
45439
45439
  }
45440
45440
  refreshLocalMergeData(merge_new, file);
45441
+ if (ctx.hooks.rowColChange) {
45442
+ ctx.hooks.rowColChange({
45443
+ action: "add",
45444
+ type: type,
45445
+ index: index,
45446
+ count: count,
45447
+ direction: direction,
45448
+ id: id
45449
+ });
45450
+ }
45441
45451
  }
45442
45452
  function deleteRowCol(ctx, op) {
45443
45453
  var type = op.type;
@@ -46169,6 +46179,15 @@ function deleteRowCol(ctx, op) {
46169
46179
  if (file.id === ctx.currentSheetId) {
46170
46180
  ctx.config = cfg;
46171
46181
  }
46182
+ if (ctx.hooks.rowColChange) {
46183
+ ctx.hooks.rowColChange({
46184
+ action: "delete",
46185
+ type: type,
46186
+ index: start,
46187
+ count: end - start + 1,
46188
+ id: id
46189
+ });
46190
+ }
46172
46191
  }
46173
46192
  function computeRowlenArr(ctx, rowHeight, cfg) {
46174
46193
  var rowlenArr = [];
package/dist/index.js CHANGED
@@ -45448,6 +45448,16 @@ function insertRowCol(ctx, op) {
45448
45448
  }
45449
45449
  }
45450
45450
  refreshLocalMergeData(merge_new, file);
45451
+ if (ctx.hooks.rowColChange) {
45452
+ ctx.hooks.rowColChange({
45453
+ action: "add",
45454
+ type: type,
45455
+ index: index,
45456
+ count: count,
45457
+ direction: direction,
45458
+ id: id
45459
+ });
45460
+ }
45451
45461
  }
45452
45462
  function deleteRowCol(ctx, op) {
45453
45463
  var type = op.type;
@@ -46179,6 +46189,15 @@ function deleteRowCol(ctx, op) {
46179
46189
  if (file.id === ctx.currentSheetId) {
46180
46190
  ctx.config = cfg;
46181
46191
  }
46192
+ if (ctx.hooks.rowColChange) {
46193
+ ctx.hooks.rowColChange({
46194
+ action: "delete",
46195
+ type: type,
46196
+ index: start,
46197
+ count: end - start + 1,
46198
+ id: id
46199
+ });
46200
+ }
46182
46201
  }
46183
46202
  function computeRowlenArr(ctx, rowHeight, cfg) {
46184
46203
  var rowlenArr = [];
@@ -1,6 +1,14 @@
1
1
  import React from "react";
2
2
  import { Sheet, Selection, CellMatrix, Cell } from "./types";
3
3
  export type Hooks = {
4
+ rowColChange?: (conf: {
5
+ action: "add" | "delete";
6
+ type: "row" | "column";
7
+ index: number;
8
+ count: number;
9
+ direction?: "lefttop" | "rightbottom";
10
+ id: string;
11
+ }) => void;
4
12
  onCopySheet?: (oldSheetId: string, newSheetId: string) => void;
5
13
  commentsPreRender?: (r: number, c: number) => any;
6
14
  showCommentsMenu?: (item: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leankylin-sheet/core",
3
- "version": "4.0.32",
3
+ "version": "4.0.34",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/index.esm.js",
6
6
  "typings": "dist/index.d.ts",
@@ -13,7 +13,7 @@
13
13
  "build": "father-build"
14
14
  },
15
15
  "dependencies": {
16
- "@leankylin-sheet/formula-parser": "4.0.32",
16
+ "@leankylin-sheet/formula-parser": "4.0.34",
17
17
  "dayjs": "^1.11.0",
18
18
  "immer": "^9.0.12",
19
19
  "lodash": "^4.17.21",