@leankylin-sheet/core 4.0.33 → 4.0.35

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
@@ -45437,7 +45437,19 @@ function insertRowCol(ctx, op) {
45437
45437
  ctx.luckysheet_select_save = range;
45438
45438
  }
45439
45439
  }
45440
+ file.luckysheet_select_save = undefined;
45441
+ ctx.luckysheet_select_save = undefined;
45440
45442
  refreshLocalMergeData(merge_new, file);
45443
+ if (ctx.hooks.rowColChange) {
45444
+ ctx.hooks.rowColChange({
45445
+ action: "add",
45446
+ type: type,
45447
+ index: index,
45448
+ count: count,
45449
+ direction: direction,
45450
+ id: id
45451
+ });
45452
+ }
45441
45453
  }
45442
45454
  function deleteRowCol(ctx, op) {
45443
45455
  var type = op.type;
@@ -46169,6 +46181,15 @@ function deleteRowCol(ctx, op) {
46169
46181
  if (file.id === ctx.currentSheetId) {
46170
46182
  ctx.config = cfg;
46171
46183
  }
46184
+ if (ctx.hooks.rowColChange) {
46185
+ ctx.hooks.rowColChange({
46186
+ action: "delete",
46187
+ type: type,
46188
+ index: start,
46189
+ count: end - start + 1,
46190
+ id: id
46191
+ });
46192
+ }
46172
46193
  }
46173
46194
  function computeRowlenArr(ctx, rowHeight, cfg) {
46174
46195
  var rowlenArr = [];
package/dist/index.js CHANGED
@@ -45447,7 +45447,19 @@ function insertRowCol(ctx, op) {
45447
45447
  ctx.luckysheet_select_save = range;
45448
45448
  }
45449
45449
  }
45450
+ file.luckysheet_select_save = undefined;
45451
+ ctx.luckysheet_select_save = undefined;
45450
45452
  refreshLocalMergeData(merge_new, file);
45453
+ if (ctx.hooks.rowColChange) {
45454
+ ctx.hooks.rowColChange({
45455
+ action: "add",
45456
+ type: type,
45457
+ index: index,
45458
+ count: count,
45459
+ direction: direction,
45460
+ id: id
45461
+ });
45462
+ }
45451
45463
  }
45452
45464
  function deleteRowCol(ctx, op) {
45453
45465
  var type = op.type;
@@ -46179,6 +46191,15 @@ function deleteRowCol(ctx, op) {
46179
46191
  if (file.id === ctx.currentSheetId) {
46180
46192
  ctx.config = cfg;
46181
46193
  }
46194
+ if (ctx.hooks.rowColChange) {
46195
+ ctx.hooks.rowColChange({
46196
+ action: "delete",
46197
+ type: type,
46198
+ index: start,
46199
+ count: end - start + 1,
46200
+ id: id
46201
+ });
46202
+ }
46182
46203
  }
46183
46204
  function computeRowlenArr(ctx, rowHeight, cfg) {
46184
46205
  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.33",
3
+ "version": "4.0.35",
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.33",
16
+ "@leankylin-sheet/formula-parser": "4.0.35",
17
17
  "dayjs": "^1.11.0",
18
18
  "immer": "^9.0.12",
19
19
  "lodash": "^4.17.21",