@leankylin-sheet/react 5.1.8 → 5.1.10

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.
@@ -124,4 +124,5 @@ export declare function generateAPIs(context: Context, setContext: (recipe: (ctx
124
124
  dataToCelldata: (data: CellMatrix | undefined) => CellWithRowAndCol[];
125
125
  celldataToData: (celldata: CellWithRowAndCol[], rowCount?: number, colCount?: number) => CellMatrix | null;
126
126
  setCtx: (cb: (ctx: Context) => void) => void;
127
+ onCopy: () => void;
127
128
  };
@@ -132,5 +132,6 @@ declare const Workbook: React.ForwardRefExoticComponent<Settings & AdditionalPro
132
132
  dataToCelldata: (data: CellMatrix | undefined) => CellWithRowAndCol[];
133
133
  celldataToData: (celldata: CellWithRowAndCol[], rowCount?: number | undefined, colCount?: number | undefined) => CellMatrix | null;
134
134
  setCtx: (cb: (ctx: Context) => void) => void;
135
+ onCopy: () => void;
135
136
  }>>;
136
137
  export default Workbook;
package/dist/index.esm.js CHANGED
@@ -10345,6 +10345,17 @@ function generateAPIs(context, setContext, handleUndo, handleRedo, settings, cel
10345
10345
  setContext(function (draftCtx) {
10346
10346
  return cb(draftCtx);
10347
10347
  });
10348
+ },
10349
+ onCopy: function onCopy() {
10350
+ setContext(function (draftCtx) {
10351
+ var _draftCtx$luckysheet_;
10352
+ if (((_draftCtx$luckysheet_ = draftCtx.luckysheet_select_save) === null || _draftCtx$luckysheet_ === void 0 ? void 0 : _draftCtx$luckysheet_.length) > 1) {
10353
+ draftCtx.contextMenu = {};
10354
+ return;
10355
+ }
10356
+ handleCopy(draftCtx);
10357
+ draftCtx.contextMenu = {};
10358
+ });
10348
10359
  }
10349
10360
  };
10350
10361
  }
package/dist/index.js CHANGED
@@ -10355,6 +10355,17 @@ function generateAPIs(context, setContext, handleUndo, handleRedo, settings, cel
10355
10355
  setContext(function (draftCtx) {
10356
10356
  return cb(draftCtx);
10357
10357
  });
10358
+ },
10359
+ onCopy: function onCopy() {
10360
+ setContext(function (draftCtx) {
10361
+ var _draftCtx$luckysheet_;
10362
+ if (((_draftCtx$luckysheet_ = draftCtx.luckysheet_select_save) === null || _draftCtx$luckysheet_ === void 0 ? void 0 : _draftCtx$luckysheet_.length) > 1) {
10363
+ draftCtx.contextMenu = {};
10364
+ return;
10365
+ }
10366
+ core.handleCopy(draftCtx);
10367
+ draftCtx.contextMenu = {};
10368
+ });
10358
10369
  }
10359
10370
  };
10360
10371
  }
package/dist/index.umd.js CHANGED
@@ -115093,6 +115093,17 @@
115093
115093
  setContext(function (draftCtx) {
115094
115094
  return cb(draftCtx);
115095
115095
  });
115096
+ },
115097
+ onCopy: function onCopy() {
115098
+ setContext(function (draftCtx) {
115099
+ var _draftCtx$luckysheet_;
115100
+ if (((_draftCtx$luckysheet_ = draftCtx.luckysheet_select_save) === null || _draftCtx$luckysheet_ === void 0 ? void 0 : _draftCtx$luckysheet_.length) > 1) {
115101
+ draftCtx.contextMenu = {};
115102
+ return;
115103
+ }
115104
+ handleCopy(draftCtx);
115105
+ draftCtx.contextMenu = {};
115106
+ });
115096
115107
  }
115097
115108
  };
115098
115109
  }