@leankylin-sheet/core 5.2.63 → 5.2.64

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
@@ -57305,6 +57305,7 @@ var defaultSettings = {
57305
57305
  };
57306
57306
 
57307
57307
  function handleCopy(ctx) {
57308
+ var _ctx$hooks$onCopyChec, _ctx$hooks;
57308
57309
  if (ctx.luckysheetPaintModelOn) {
57309
57310
  cancelPaintModel(ctx);
57310
57311
  }
@@ -57312,6 +57313,9 @@ function handleCopy(ctx) {
57312
57313
  if (!selection || _.isEmpty(selection)) {
57313
57314
  return;
57314
57315
  }
57316
+ if (((_ctx$hooks$onCopyChec = (_ctx$hooks = ctx.hooks).onCopyCheck) === null || _ctx$hooks$onCopyChec === void 0 ? void 0 : _ctx$hooks$onCopyChec.call(_ctx$hooks, selection)) === false) {
57317
+ return;
57318
+ }
57315
57319
  if (ctx.config.merge != null) {
57316
57320
  var has_PartMC = false;
57317
57321
  for (var s = 0; s < selection.length; s += 1) {
package/dist/index.js CHANGED
@@ -57315,6 +57315,7 @@ var defaultSettings = {
57315
57315
  };
57316
57316
 
57317
57317
  function handleCopy(ctx) {
57318
+ var _ctx$hooks$onCopyChec, _ctx$hooks;
57318
57319
  if (ctx.luckysheetPaintModelOn) {
57319
57320
  cancelPaintModel(ctx);
57320
57321
  }
@@ -57322,6 +57323,9 @@ function handleCopy(ctx) {
57322
57323
  if (!selection || ___default['default'].isEmpty(selection)) {
57323
57324
  return;
57324
57325
  }
57326
+ if (((_ctx$hooks$onCopyChec = (_ctx$hooks = ctx.hooks).onCopyCheck) === null || _ctx$hooks$onCopyChec === void 0 ? void 0 : _ctx$hooks$onCopyChec.call(_ctx$hooks, selection)) === false) {
57327
+ return;
57328
+ }
57325
57329
  if (ctx.config.merge != null) {
57326
57330
  var has_PartMC = false;
57327
57331
  for (var s = 0; s < selection.length; s += 1) {
@@ -11,6 +11,7 @@ export type Hooks = {
11
11
  }) => void;
12
12
  onCopySheet?: (oldSheetId: string, newSheetId: string) => void;
13
13
  onCopySheetBefore?: (oldSheetId: any, sheetData: any) => any;
14
+ onCopyCheck?: (selection: Selection[]) => boolean;
14
15
  commentsPreRender?: (r: number, c: number) => any;
15
16
  showCommentsMenu?: (item: {
16
17
  text: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leankylin-sheet/core",
3
- "version": "5.2.63",
3
+ "version": "5.2.64",
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": "5.2.63",
16
+ "@leankylin-sheet/formula-parser": "5.2.64",
17
17
  "dayjs": "^1.11.0",
18
18
  "immer": "^9.0.12",
19
19
  "lodash": "^4.17.21",