@leankylin-sheet/react 1.2.11 → 1.2.13
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 +14 -10
- package/dist/index.js +13 -9
- package/dist/index.umd.js +17 -13
- package/dist/index.umd.min.js +2 -2
- package/package.json +2 -2
package/dist/index.esm.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defaultContext, defaultSettings, getSheetIndex, colLocationByIndex, fixPositionOnFrozenCells, colLocation, getFlowdata, isAllowEdit, handleColumnHeaderMouseDown, handleColSizeHandleMouseDown, handleColFreezeHandleMouseDown, handleContextMenu, selectTitlesMap, selectTitlesRange, fixColumnStyleOverflowInFreeze, rowLocationByIndex, rowLocation, handleRowHeaderMouseDown, handleRowSizeHandleMouseDown, handleRowFreezeHandleMouseDown, fixRowStyleOverflowInFreeze, locale, getStyleByCell, getCellValue, createRangeHightlight, isInlineStringCell, getInlineStringHTML, valueShowEs, escapeHTMLTag, escapeScriptTag, moveToEnd, isShowHidenCR, cancelNormalSelected, moveHighlightCell, updateCell, israngeseleciton, handleFormulaInput, onSearchDialogMoveStart, replaceAll, replace, searchAll, searchNext, normalizeSelection, scrollToHighlightCell, isLinkValid, getRangetxt, goToLink, replaceHtml, removeHyperlink, onRangeSelectionModalMoveStart, saveHyperlink, createFilterOptions, onImageMoveStart, onImageResizeStart, showComments, setEditingComment, onCommentBoxMoveStart, onCommentBoxResizeStart, confirmMessage, getRangeByTxt, getDropdownList, setCellValue, setConditionRules, mergeBorder, setDropcownValue, handleCellAreaMouseDown, handleCellAreaDoubleClick, selectAll, showLinkCard, getCellRowColumn, getCellHyperlink, handleOverlayMouseMove, handleOverlayMouseUp, handleKeydownForZoom, handleOverlayTouchStart, handleOverlayTouchMove, handleOverlayTouchEnd, drawArrow, onCellsMoveStart, createDropCellRange, updateContextWithSheetData, updateContextWithCanvas, initFreeze, Canvas, handleGlobalWheel, setCaretPosition, getDataArr, updateMoreCell, getRegStr, getOptionValue, getSelectRange, applyLocation, updateItem, update, normalizedCellAttr, updateFormat, handleTextSize, handleHorizontalAlign, handleVerticalAlign, handleScreenShot, showImgChooser, insertImage, editComment, deleteComment, showHideComment, showHideAllComments, newComment, handleSum, autoSelectionFormula, handleMerge, handleBorder, handleFreeze, handleSort, createFilter, clearFilter, toolbarItemSelectedFunc, toolbarItemClickHandler, handleTextColor, handleTextBackground, getInlineStringNoStyle, rangeHightlightselected, editSheetName, cancelActiveImgItem, MAX_ZOOM_RATIO, MIN_ZOOM_RATIO, addSheet, indexToColumnChar, sortSelection, handleCopy,
|
|
1
|
+
import { defaultContext, defaultSettings, getSheetIndex, colLocationByIndex, fixPositionOnFrozenCells, colLocation, getFlowdata, isAllowEdit, handleColumnHeaderMouseDown, handleColSizeHandleMouseDown, handleColFreezeHandleMouseDown, handleContextMenu, selectTitlesMap, selectTitlesRange, fixColumnStyleOverflowInFreeze, rowLocationByIndex, rowLocation, handleRowHeaderMouseDown, handleRowSizeHandleMouseDown, handleRowFreezeHandleMouseDown, fixRowStyleOverflowInFreeze, locale, getStyleByCell, getCellValue, createRangeHightlight, isInlineStringCell, getInlineStringHTML, valueShowEs, escapeHTMLTag, escapeScriptTag, moveToEnd, isShowHidenCR, cancelNormalSelected, moveHighlightCell, updateCell, israngeseleciton, handleFormulaInput, onSearchDialogMoveStart, replaceAll, replace, searchAll, searchNext, normalizeSelection, scrollToHighlightCell, isLinkValid, getRangetxt, goToLink, replaceHtml, removeHyperlink, onRangeSelectionModalMoveStart, saveHyperlink, createFilterOptions, onImageMoveStart, onImageResizeStart, showComments, setEditingComment, onCommentBoxMoveStart, onCommentBoxResizeStart, confirmMessage, getRangeByTxt, getDropdownList, setCellValue, setConditionRules, mergeBorder, setDropcownValue, handleCellAreaMouseDown, handleCellAreaDoubleClick, selectAll, showLinkCard, getCellRowColumn, getCellHyperlink, handleOverlayMouseMove, handleOverlayMouseUp, handleKeydownForZoom, handleOverlayTouchStart, handleOverlayTouchMove, handleOverlayTouchEnd, drawArrow, onCellsMoveStart, createDropCellRange, updateContextWithSheetData, updateContextWithCanvas, initFreeze, Canvas, handleGlobalWheel, setCaretPosition, getDataArr, updateMoreCell, getRegStr, getOptionValue, getSelectRange, applyLocation, updateItem, update, normalizedCellAttr, updateFormat, handleTextSize, handleHorizontalAlign, handleVerticalAlign, handleScreenShot, showImgChooser, insertImage, editComment, deleteComment, showHideComment, showHideAllComments, newComment, handleSum, autoSelectionFormula, handleMerge, handleBorder, handleFreeze, handleSort, createFilter, clearFilter, toolbarItemSelectedFunc, toolbarItemClickHandler, handleTextColor, handleTextBackground, getInlineStringNoStyle, rangeHightlightselected, editSheetName, cancelActiveImgItem, MAX_ZOOM_RATIO, MIN_ZOOM_RATIO, addSheet, indexToColumnChar, sortSelection, handleCopy, getClipboardContent, handlePasteByLeanklin, insertRowCol, deleteRowCol, hideSelected, showSelected, api, removeActiveImage, deleteSelectedCellText, jfrefreshgrid, handleLink, deleteSheet, opToPatch, orderbydatafiler, getFilterColumnValues, getFilterColumnColors, saveFilter, calcSelectionInfo, patchToOp, filterPatch, inverseRowColOptions, ensureSheetIndex, initSheetIndex, handleGlobalKeyDown, groupValuesRefresh } from '@leankylin-sheet/core';
|
|
2
2
|
import React, { useContext, useRef, useState, useMemo, useCallback, useEffect, useLayoutEffect, useImperativeHandle } from 'react';
|
|
3
3
|
import produce, { applyPatches, enablePatches, produceWithPatches } from 'immer';
|
|
4
4
|
import _ from 'lodash';
|
|
@@ -7128,9 +7128,11 @@ var ContextMenu = function ContextMenu() {
|
|
|
7128
7128
|
return /*#__PURE__*/React.createElement(Menu, {
|
|
7129
7129
|
key: name,
|
|
7130
7130
|
onClick: function onClick() {
|
|
7131
|
-
|
|
7132
|
-
|
|
7133
|
-
|
|
7131
|
+
getClipboardContent().then(function (clipboard) {
|
|
7132
|
+
setContext(function (draftCtx) {
|
|
7133
|
+
handlePasteByLeanklin(draftCtx, clipboard);
|
|
7134
|
+
draftCtx.contextMenu = {};
|
|
7135
|
+
});
|
|
7134
7136
|
});
|
|
7135
7137
|
}
|
|
7136
7138
|
}, rightclick.paste);
|
|
@@ -10715,12 +10717,14 @@ var Workbook = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
10715
10717
|
var txtdata = clipboardData.getData("text/html") || clipboardData.getData("text/plain");
|
|
10716
10718
|
var ele = document.createElement("div");
|
|
10717
10719
|
ele.innerHTML = txtdata;
|
|
10718
|
-
|
|
10719
|
-
|
|
10720
|
-
|
|
10721
|
-
|
|
10722
|
-
|
|
10723
|
-
|
|
10720
|
+
getClipboardContent().then(function (clipboard) {
|
|
10721
|
+
setContextWithProduce(function (draftCtx) {
|
|
10722
|
+
try {
|
|
10723
|
+
handlePasteByLeanklin(draftCtx, clipboard);
|
|
10724
|
+
} catch (err) {
|
|
10725
|
+
console.error(err);
|
|
10726
|
+
}
|
|
10727
|
+
});
|
|
10724
10728
|
});
|
|
10725
10729
|
}
|
|
10726
10730
|
}, [context, setContextWithProduce]);
|
package/dist/index.js
CHANGED
|
@@ -7138,9 +7138,11 @@ var ContextMenu = function ContextMenu() {
|
|
|
7138
7138
|
return /*#__PURE__*/React__default['default'].createElement(Menu, {
|
|
7139
7139
|
key: name,
|
|
7140
7140
|
onClick: function onClick() {
|
|
7141
|
-
|
|
7142
|
-
|
|
7143
|
-
|
|
7141
|
+
core.getClipboardContent().then(function (clipboard) {
|
|
7142
|
+
setContext(function (draftCtx) {
|
|
7143
|
+
core.handlePasteByLeanklin(draftCtx, clipboard);
|
|
7144
|
+
draftCtx.contextMenu = {};
|
|
7145
|
+
});
|
|
7144
7146
|
});
|
|
7145
7147
|
}
|
|
7146
7148
|
}, rightclick.paste);
|
|
@@ -10725,12 +10727,14 @@ var Workbook = /*#__PURE__*/React__default['default'].forwardRef(function (_ref,
|
|
|
10725
10727
|
var txtdata = clipboardData.getData("text/html") || clipboardData.getData("text/plain");
|
|
10726
10728
|
var ele = document.createElement("div");
|
|
10727
10729
|
ele.innerHTML = txtdata;
|
|
10728
|
-
|
|
10729
|
-
|
|
10730
|
-
|
|
10731
|
-
|
|
10732
|
-
|
|
10733
|
-
|
|
10730
|
+
core.getClipboardContent().then(function (clipboard) {
|
|
10731
|
+
setContextWithProduce(function (draftCtx) {
|
|
10732
|
+
try {
|
|
10733
|
+
core.handlePasteByLeanklin(draftCtx, clipboard);
|
|
10734
|
+
} catch (err) {
|
|
10735
|
+
console.error(err);
|
|
10736
|
+
}
|
|
10737
|
+
});
|
|
10734
10738
|
});
|
|
10735
10739
|
}
|
|
10736
10740
|
}, [context, setContextWithProduce]);
|