@fileverse-dev/fortune-react 1.1.3 → 1.1.5-patch.0

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.
@@ -15,7 +15,7 @@ var __spreadArray = this && this.__spreadArray || function (to, from, pack) {
15
15
  }
16
16
  return to.concat(ar || Array.prototype.slice.call(from));
17
17
  };
18
- import { defaultContext, defaultSettings, initSheetIndex, handleGlobalKeyDown, getSheetIndex, handlePaste, filterPatch, patchToOp, inverseRowColOptions, ensureSheetIndex, insertRowCol, deleteRowCol, locale, calcSelectionInfo, groupValuesRefresh, insertDuneChart, getFlowdata, api } from "@fileverse-dev/fortune-core";
18
+ import { defaultContext, defaultSettings, initSheetIndex, handleGlobalKeyDown, getSheetIndex, handlePaste, filterPatch, patchToOp, inverseRowColOptions, ensureSheetIndex, insertRowCol, deleteRowCol, locale, calcSelectionInfo, groupValuesRefresh, insertDuneChart, getFlowdata, api, handlePasteByClick } from "@fileverse-dev/fortune-core";
19
19
  import React, { useMemo, useState, useCallback, useEffect, useRef, useImperativeHandle } from "react";
20
20
  import "./index.css";
21
21
  import produce, { applyPatches, enablePatches, produceWithPatches } from "immer";
@@ -602,6 +602,13 @@ var Workbook = /*#__PURE__*/React.forwardRef(function (_a, ref) {
602
602
  column: [0, totalCol - 1]
603
603
  }]);
604
604
  }
605
+ if ((e.metaKey || e.ctrlKey) && e.shiftKey && e.code === "KeyV") {
606
+ navigator.clipboard.readText().then(function (clipboardText) {
607
+ setContextWithProduce(function (safeCtx) {
608
+ handlePasteByClick(safeCtx, clipboardText);
609
+ });
610
+ });
611
+ }
605
612
  var nativeEvent = e.nativeEvent;
606
613
  if ((e.ctrlKey || e.metaKey) && e.code === "KeyZ") {
607
614
  if (e.shiftKey) {
@@ -611,6 +611,13 @@ var Workbook = /*#__PURE__*/_react.default.forwardRef(function (_a, ref) {
611
611
  column: [0, totalCol - 1]
612
612
  }]);
613
613
  }
614
+ if ((e.metaKey || e.ctrlKey) && e.shiftKey && e.code === "KeyV") {
615
+ navigator.clipboard.readText().then(function (clipboardText) {
616
+ setContextWithProduce(function (safeCtx) {
617
+ (0, _fortuneCore.handlePasteByClick)(safeCtx, clipboardText);
618
+ });
619
+ });
620
+ }
614
621
  var nativeEvent = e.nativeEvent;
615
622
  if ((e.ctrlKey || e.metaKey) && e.code === "KeyZ") {
616
623
  if (e.shiftKey) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fileverse-dev/fortune-react",
3
- "version": "1.1.3",
3
+ "version": "1.1.5-patch.0",
4
4
  "main": "lib/index.js",
5
5
  "types": "lib/index.d.ts",
6
6
  "module": "es/index.js",
@@ -16,7 +16,7 @@
16
16
  "tsc": "tsc"
17
17
  },
18
18
  "dependencies": {
19
- "@fileverse-dev/fortune-core": "1.1.3",
19
+ "@fileverse-dev/fortune-core": "1.1.5-patch.0",
20
20
  "@fileverse/ui": "^4.1.7-patch-21",
21
21
  "@tippyjs/react": "^4.2.6",
22
22
  "@types/regenerator-runtime": "^0.13.6",