@leankylin-sheet/react 3.1.12 → 3.1.14
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 +32 -27
- package/dist/index.js +31 -26
- package/dist/index.umd.js +31 -80
- package/dist/index.umd.min.js +1 -1
- 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, functionHTMLGenerate, 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, handleCellAreaMouseMove, handleCellAreaDragOver, handleCellDrop, handleCellAreaDoubleClick, selectAll, showLinkCard, getCellRowColumn, getCellHyperlink, handleOverlayMouseMove, handleOverlayMouseUp, handleKeydownForZoom, handleOverlayTouchStart, handleOverlayTouchMove, handleOverlayTouchEnd,
|
|
1
|
+
import { defaultContext, defaultSettings, getSheetIndex, colLocationByIndex, fixPositionOnFrozenCells, colLocation, getFlowdata, isAllowEdit, handleColumnHeaderMouseDown, handleColSizeHandleMouseDown, handleColFreezeHandleMouseDown, handleContextMenu, selectTitlesMap, selectTitlesRange, fixColumnStyleOverflowInFreeze, rowLocationByIndex, rowLocation, handleRowHeaderMouseDown, handleRowSizeHandleMouseDown, handleRowFreezeHandleMouseDown, fixRowStyleOverflowInFreeze, functionHTMLGenerate, 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, handleCellAreaMouseMove, handleCellAreaDragOver, handleCellDrop, handleCellAreaDoubleClick, selectAll, showLinkCard, getCellRowColumn, getCellHyperlink, handleOverlayMouseMove, handleOverlayMouseUp, handleKeydownForZoom, handleOverlayTouchStart, handleOverlayTouchMove, handleOverlayTouchEnd, 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, getDataBySelectionNoCopy, getInlineStringNoStyle, rangeHightlightselected, editSheetName, cancelActiveImgItem, MAX_ZOOM_RATIO, MIN_ZOOM_RATIO, addSheet, indexToColumnChar, sortSelection, handleCopy, insertRowCol, deleteRowCol, hideSelected, showSelected, api, removeActiveImage, deleteSelectedCellText, jfrefreshgrid, handleLink, deleteSheet, opToPatch, orderbydatafiler, getFilterColumnValues, getFilterColumnColors, saveFilter, patchToOp, filterPatch, inverseRowColOptions, ensureSheetIndex, initSheetIndex, handleGlobalKeyDown, handlePasteByLeanklin, 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';
|
|
@@ -2105,19 +2105,36 @@ var NotationBoxes = function NotationBoxes() {
|
|
|
2105
2105
|
var commentId = "comment-box-".concat(rc);
|
|
2106
2106
|
return /*#__PURE__*/React.createElement("div", {
|
|
2107
2107
|
key: rc
|
|
2108
|
-
}, /*#__PURE__*/React.createElement("
|
|
2109
|
-
|
|
2110
|
-
className: "arrowCanvas",
|
|
2111
|
-
width: size.width,
|
|
2112
|
-
height: size.height,
|
|
2108
|
+
}, /*#__PURE__*/React.createElement("svg", {
|
|
2109
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2113
2110
|
style: {
|
|
2114
2111
|
position: "absolute",
|
|
2115
2112
|
left: size.left,
|
|
2116
2113
|
top: size.top,
|
|
2114
|
+
width: size.width,
|
|
2115
|
+
height: size.height,
|
|
2117
2116
|
zIndex: 100,
|
|
2118
2117
|
pointerEvents: "none"
|
|
2119
2118
|
}
|
|
2120
|
-
}
|
|
2119
|
+
}, /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("marker", {
|
|
2120
|
+
id: "arrowhead",
|
|
2121
|
+
markerWidth: "10",
|
|
2122
|
+
markerHeight: "7",
|
|
2123
|
+
refX: "9",
|
|
2124
|
+
refY: "3.5",
|
|
2125
|
+
orient: "auto"
|
|
2126
|
+
}, /*#__PURE__*/React.createElement("polygon", {
|
|
2127
|
+
points: "0 0, 10 3.5, 0 7",
|
|
2128
|
+
fill: "#333"
|
|
2129
|
+
}))), /*#__PURE__*/React.createElement("line", {
|
|
2130
|
+
x1: size.fromX,
|
|
2131
|
+
y1: size.fromY,
|
|
2132
|
+
x2: size.toX,
|
|
2133
|
+
y2: size.toY,
|
|
2134
|
+
stroke: "#333",
|
|
2135
|
+
strokeWidth: "1",
|
|
2136
|
+
markerEnd: "url(#arrowhead)"
|
|
2137
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
2121
2138
|
id: commentId,
|
|
2122
2139
|
className: "luckysheet-postil-show-main",
|
|
2123
2140
|
style: {
|
|
@@ -3399,19 +3416,6 @@ var SheetOverlay = function SheetOverlay() {
|
|
|
3399
3416
|
refs.cellArea.current.scrollLeft = context.scrollLeft;
|
|
3400
3417
|
refs.cellArea.current.scrollTop = context.scrollTop;
|
|
3401
3418
|
}, [context.scrollLeft, context.scrollTop, refs.cellArea, (_refs$cellArea$curren = refs.cellArea.current) === null || _refs$cellArea$curren === void 0 ? void 0 : _refs$cellArea$curren.scrollLeft, (_refs$cellArea$curren2 = refs.cellArea.current) === null || _refs$cellArea$curren2 === void 0 ? void 0 : _refs$cellArea$curren2.scrollTop]);
|
|
3402
|
-
useLayoutEffect(function () {
|
|
3403
|
-
if (context.commentBoxes || context.hoveredCommentBox || context.editingCommentBox) {
|
|
3404
|
-
var _context$commentBoxes;
|
|
3405
|
-
_.concat((_context$commentBoxes = context.commentBoxes) === null || _context$commentBoxes === void 0 ? void 0 : _context$commentBoxes.filter(function (v) {
|
|
3406
|
-
var _context$editingComme;
|
|
3407
|
-
return v.rc !== ((_context$editingComme = context.editingCommentBox) === null || _context$editingComme === void 0 ? void 0 : _context$editingComme.rc);
|
|
3408
|
-
}), [context.hoveredCommentBox, context.editingCommentBox]).forEach(function (box) {
|
|
3409
|
-
if (box) {
|
|
3410
|
-
drawArrow(box.rc, box.size);
|
|
3411
|
-
}
|
|
3412
|
-
});
|
|
3413
|
-
}
|
|
3414
|
-
}, [context.commentBoxes, context.hoveredCommentBox, context.editingCommentBox]);
|
|
3415
3419
|
useEffect(function () {
|
|
3416
3420
|
document.addEventListener("mousemove", onMouseMove);
|
|
3417
3421
|
return function () {
|
|
@@ -7390,8 +7394,11 @@ var ContextMenu = function ContextMenu() {
|
|
|
7390
7394
|
generalDialog = _locale.generalDialog,
|
|
7391
7395
|
info = _locale.info;
|
|
7392
7396
|
var getMenuElement = useCallback(function (name, i) {
|
|
7393
|
-
var _context$luckysheet_s;
|
|
7397
|
+
var _context$luckysheet_s, _context$hooks, _context$hooks$showMe;
|
|
7394
7398
|
var selection = (_context$luckysheet_s = context.luckysheet_select_save) === null || _context$luckysheet_s === void 0 ? void 0 : _context$luckysheet_s[0];
|
|
7399
|
+
if (((_context$hooks = context.hooks) === null || _context$hooks === void 0 ? void 0 : (_context$hooks$showMe = _context$hooks.showMenuBefore) === null || _context$hooks$showMe === void 0 ? void 0 : _context$hooks$showMe.call(_context$hooks, name, selection)) === false) {
|
|
7400
|
+
return null;
|
|
7401
|
+
}
|
|
7395
7402
|
if (name === "|") {
|
|
7396
7403
|
return /*#__PURE__*/React.createElement(Divider$1, {
|
|
7397
7404
|
key: "divider-".concat(i)
|
|
@@ -7420,12 +7427,10 @@ var ContextMenu = function ContextMenu() {
|
|
|
7420
7427
|
return /*#__PURE__*/React.createElement(Menu, {
|
|
7421
7428
|
key: item.text,
|
|
7422
7429
|
onClick: function onClick() {
|
|
7423
|
-
|
|
7424
|
-
|
|
7425
|
-
|
|
7426
|
-
|
|
7427
|
-
});
|
|
7428
|
-
}
|
|
7430
|
+
setContext(function (draftCtx) {
|
|
7431
|
+
item.onClick(draftCtx, refs.globalCache, row_index, col_index);
|
|
7432
|
+
draftCtx.contextMenu = {};
|
|
7433
|
+
});
|
|
7429
7434
|
}
|
|
7430
7435
|
}, item.text);
|
|
7431
7436
|
});
|
package/dist/index.js
CHANGED
|
@@ -2115,19 +2115,36 @@ var NotationBoxes = function NotationBoxes() {
|
|
|
2115
2115
|
var commentId = "comment-box-".concat(rc);
|
|
2116
2116
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
2117
2117
|
key: rc
|
|
2118
|
-
}, /*#__PURE__*/React__default['default'].createElement("
|
|
2119
|
-
|
|
2120
|
-
className: "arrowCanvas",
|
|
2121
|
-
width: size.width,
|
|
2122
|
-
height: size.height,
|
|
2118
|
+
}, /*#__PURE__*/React__default['default'].createElement("svg", {
|
|
2119
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2123
2120
|
style: {
|
|
2124
2121
|
position: "absolute",
|
|
2125
2122
|
left: size.left,
|
|
2126
2123
|
top: size.top,
|
|
2124
|
+
width: size.width,
|
|
2125
|
+
height: size.height,
|
|
2127
2126
|
zIndex: 100,
|
|
2128
2127
|
pointerEvents: "none"
|
|
2129
2128
|
}
|
|
2130
|
-
}
|
|
2129
|
+
}, /*#__PURE__*/React__default['default'].createElement("defs", null, /*#__PURE__*/React__default['default'].createElement("marker", {
|
|
2130
|
+
id: "arrowhead",
|
|
2131
|
+
markerWidth: "10",
|
|
2132
|
+
markerHeight: "7",
|
|
2133
|
+
refX: "9",
|
|
2134
|
+
refY: "3.5",
|
|
2135
|
+
orient: "auto"
|
|
2136
|
+
}, /*#__PURE__*/React__default['default'].createElement("polygon", {
|
|
2137
|
+
points: "0 0, 10 3.5, 0 7",
|
|
2138
|
+
fill: "#333"
|
|
2139
|
+
}))), /*#__PURE__*/React__default['default'].createElement("line", {
|
|
2140
|
+
x1: size.fromX,
|
|
2141
|
+
y1: size.fromY,
|
|
2142
|
+
x2: size.toX,
|
|
2143
|
+
y2: size.toY,
|
|
2144
|
+
stroke: "#333",
|
|
2145
|
+
strokeWidth: "1",
|
|
2146
|
+
markerEnd: "url(#arrowhead)"
|
|
2147
|
+
})), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
2131
2148
|
id: commentId,
|
|
2132
2149
|
className: "luckysheet-postil-show-main",
|
|
2133
2150
|
style: {
|
|
@@ -3409,19 +3426,6 @@ var SheetOverlay = function SheetOverlay() {
|
|
|
3409
3426
|
refs.cellArea.current.scrollLeft = context.scrollLeft;
|
|
3410
3427
|
refs.cellArea.current.scrollTop = context.scrollTop;
|
|
3411
3428
|
}, [context.scrollLeft, context.scrollTop, refs.cellArea, (_refs$cellArea$curren = refs.cellArea.current) === null || _refs$cellArea$curren === void 0 ? void 0 : _refs$cellArea$curren.scrollLeft, (_refs$cellArea$curren2 = refs.cellArea.current) === null || _refs$cellArea$curren2 === void 0 ? void 0 : _refs$cellArea$curren2.scrollTop]);
|
|
3412
|
-
React.useLayoutEffect(function () {
|
|
3413
|
-
if (context.commentBoxes || context.hoveredCommentBox || context.editingCommentBox) {
|
|
3414
|
-
var _context$commentBoxes;
|
|
3415
|
-
___default['default'].concat((_context$commentBoxes = context.commentBoxes) === null || _context$commentBoxes === void 0 ? void 0 : _context$commentBoxes.filter(function (v) {
|
|
3416
|
-
var _context$editingComme;
|
|
3417
|
-
return v.rc !== ((_context$editingComme = context.editingCommentBox) === null || _context$editingComme === void 0 ? void 0 : _context$editingComme.rc);
|
|
3418
|
-
}), [context.hoveredCommentBox, context.editingCommentBox]).forEach(function (box) {
|
|
3419
|
-
if (box) {
|
|
3420
|
-
core.drawArrow(box.rc, box.size);
|
|
3421
|
-
}
|
|
3422
|
-
});
|
|
3423
|
-
}
|
|
3424
|
-
}, [context.commentBoxes, context.hoveredCommentBox, context.editingCommentBox]);
|
|
3425
3429
|
React.useEffect(function () {
|
|
3426
3430
|
document.addEventListener("mousemove", onMouseMove);
|
|
3427
3431
|
return function () {
|
|
@@ -7400,8 +7404,11 @@ var ContextMenu = function ContextMenu() {
|
|
|
7400
7404
|
generalDialog = _locale.generalDialog,
|
|
7401
7405
|
info = _locale.info;
|
|
7402
7406
|
var getMenuElement = React.useCallback(function (name, i) {
|
|
7403
|
-
var _context$luckysheet_s;
|
|
7407
|
+
var _context$luckysheet_s, _context$hooks, _context$hooks$showMe;
|
|
7404
7408
|
var selection = (_context$luckysheet_s = context.luckysheet_select_save) === null || _context$luckysheet_s === void 0 ? void 0 : _context$luckysheet_s[0];
|
|
7409
|
+
if (((_context$hooks = context.hooks) === null || _context$hooks === void 0 ? void 0 : (_context$hooks$showMe = _context$hooks.showMenuBefore) === null || _context$hooks$showMe === void 0 ? void 0 : _context$hooks$showMe.call(_context$hooks, name, selection)) === false) {
|
|
7410
|
+
return null;
|
|
7411
|
+
}
|
|
7405
7412
|
if (name === "|") {
|
|
7406
7413
|
return /*#__PURE__*/React__default['default'].createElement(Divider$1, {
|
|
7407
7414
|
key: "divider-".concat(i)
|
|
@@ -7430,12 +7437,10 @@ var ContextMenu = function ContextMenu() {
|
|
|
7430
7437
|
return /*#__PURE__*/React__default['default'].createElement(Menu, {
|
|
7431
7438
|
key: item.text,
|
|
7432
7439
|
onClick: function onClick() {
|
|
7433
|
-
|
|
7434
|
-
|
|
7435
|
-
|
|
7436
|
-
|
|
7437
|
-
});
|
|
7438
|
-
}
|
|
7440
|
+
setContext(function (draftCtx) {
|
|
7441
|
+
item.onClick(draftCtx, refs.globalCache, row_index, col_index);
|
|
7442
|
+
draftCtx.contextMenu = {};
|
|
7443
|
+
});
|
|
7439
7444
|
}
|
|
7440
7445
|
}, item.text);
|
|
7441
7446
|
});
|
package/dist/index.umd.js
CHANGED
|
@@ -92908,60 +92908,6 @@
|
|
|
92908
92908
|
toY: y2
|
|
92909
92909
|
};
|
|
92910
92910
|
}
|
|
92911
|
-
function drawArrow(rc, _ref, color, theta, headlen) {
|
|
92912
|
-
var left = _ref.left,
|
|
92913
|
-
top = _ref.top,
|
|
92914
|
-
width = _ref.width,
|
|
92915
|
-
height = _ref.height,
|
|
92916
|
-
fromX = _ref.fromX,
|
|
92917
|
-
fromY = _ref.fromY,
|
|
92918
|
-
toX = _ref.toX,
|
|
92919
|
-
toY = _ref.toY;
|
|
92920
|
-
var canvas = document.getElementById("arrowCanvas-".concat(rc));
|
|
92921
|
-
var ctx = canvas.getContext("2d");
|
|
92922
|
-
if (!canvas || !ctx) return;
|
|
92923
|
-
canvas.style.width = "".concat(width, "px");
|
|
92924
|
-
canvas.style.height = "".concat(height, "px");
|
|
92925
|
-
canvas.width = width;
|
|
92926
|
-
canvas.height = height;
|
|
92927
|
-
canvas.style.left = "".concat(left, "px");
|
|
92928
|
-
canvas.style.top = "".concat(top, "px");
|
|
92929
|
-
var _canvas$getBoundingCl = canvas.getBoundingClientRect(),
|
|
92930
|
-
canvasWidth = _canvas$getBoundingCl.width,
|
|
92931
|
-
canvasHeight = _canvas$getBoundingCl.height;
|
|
92932
|
-
ctx.clearRect(0, 0, canvasWidth, canvasHeight);
|
|
92933
|
-
theta = theta || 30;
|
|
92934
|
-
headlen = headlen || 6;
|
|
92935
|
-
var arrowWidth = 1;
|
|
92936
|
-
color = color || "#000";
|
|
92937
|
-
var angle = Math.atan2(fromY - toY, fromX - toX) * 180 / Math.PI;
|
|
92938
|
-
var angle1 = (angle + theta) * Math.PI / 180;
|
|
92939
|
-
var angle2 = (angle - theta) * Math.PI / 180;
|
|
92940
|
-
var topX = headlen * Math.cos(angle1);
|
|
92941
|
-
var topY = headlen * Math.sin(angle1);
|
|
92942
|
-
var botX = headlen * Math.cos(angle2);
|
|
92943
|
-
var botY = headlen * Math.sin(angle2);
|
|
92944
|
-
ctx.save();
|
|
92945
|
-
ctx.beginPath();
|
|
92946
|
-
var arrowX = fromX - topX;
|
|
92947
|
-
var arrowY = fromY - topY;
|
|
92948
|
-
ctx.moveTo(arrowX, arrowY);
|
|
92949
|
-
ctx.moveTo(fromX, fromY);
|
|
92950
|
-
ctx.lineTo(toX, toY);
|
|
92951
|
-
ctx.lineWidth = arrowWidth;
|
|
92952
|
-
ctx.strokeStyle = color;
|
|
92953
|
-
ctx.stroke();
|
|
92954
|
-
arrowX = toX + topX;
|
|
92955
|
-
arrowY = toY + topY;
|
|
92956
|
-
ctx.moveTo(arrowX, arrowY);
|
|
92957
|
-
ctx.lineTo(toX, toY);
|
|
92958
|
-
arrowX = toX + botX;
|
|
92959
|
-
arrowY = toY + botY;
|
|
92960
|
-
ctx.lineTo(arrowX, arrowY);
|
|
92961
|
-
ctx.fillStyle = color;
|
|
92962
|
-
ctx.fill();
|
|
92963
|
-
ctx.restore();
|
|
92964
|
-
}
|
|
92965
92911
|
var commentBoxProps = {
|
|
92966
92912
|
defaultWidth: 144,
|
|
92967
92913
|
defaultHeight: 84,
|
|
@@ -105205,19 +105151,36 @@
|
|
|
105205
105151
|
var commentId = "comment-box-".concat(rc);
|
|
105206
105152
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
105207
105153
|
key: rc
|
|
105208
|
-
}, /*#__PURE__*/React__default['default'].createElement("
|
|
105209
|
-
|
|
105210
|
-
className: "arrowCanvas",
|
|
105211
|
-
width: size.width,
|
|
105212
|
-
height: size.height,
|
|
105154
|
+
}, /*#__PURE__*/React__default['default'].createElement("svg", {
|
|
105155
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
105213
105156
|
style: {
|
|
105214
105157
|
position: "absolute",
|
|
105215
105158
|
left: size.left,
|
|
105216
105159
|
top: size.top,
|
|
105160
|
+
width: size.width,
|
|
105161
|
+
height: size.height,
|
|
105217
105162
|
zIndex: 100,
|
|
105218
105163
|
pointerEvents: "none"
|
|
105219
105164
|
}
|
|
105220
|
-
}
|
|
105165
|
+
}, /*#__PURE__*/React__default['default'].createElement("defs", null, /*#__PURE__*/React__default['default'].createElement("marker", {
|
|
105166
|
+
id: "arrowhead",
|
|
105167
|
+
markerWidth: "10",
|
|
105168
|
+
markerHeight: "7",
|
|
105169
|
+
refX: "9",
|
|
105170
|
+
refY: "3.5",
|
|
105171
|
+
orient: "auto"
|
|
105172
|
+
}, /*#__PURE__*/React__default['default'].createElement("polygon", {
|
|
105173
|
+
points: "0 0, 10 3.5, 0 7",
|
|
105174
|
+
fill: "#333"
|
|
105175
|
+
}))), /*#__PURE__*/React__default['default'].createElement("line", {
|
|
105176
|
+
x1: size.fromX,
|
|
105177
|
+
y1: size.fromY,
|
|
105178
|
+
x2: size.toX,
|
|
105179
|
+
y2: size.toY,
|
|
105180
|
+
stroke: "#333",
|
|
105181
|
+
strokeWidth: "1",
|
|
105182
|
+
markerEnd: "url(#arrowhead)"
|
|
105183
|
+
})), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
105221
105184
|
id: commentId,
|
|
105222
105185
|
className: "luckysheet-postil-show-main",
|
|
105223
105186
|
style: {
|
|
@@ -106499,19 +106462,6 @@
|
|
|
106499
106462
|
refs.cellArea.current.scrollLeft = context.scrollLeft;
|
|
106500
106463
|
refs.cellArea.current.scrollTop = context.scrollTop;
|
|
106501
106464
|
}, [context.scrollLeft, context.scrollTop, refs.cellArea, (_refs$cellArea$curren = refs.cellArea.current) === null || _refs$cellArea$curren === void 0 ? void 0 : _refs$cellArea$curren.scrollLeft, (_refs$cellArea$curren2 = refs.cellArea.current) === null || _refs$cellArea$curren2 === void 0 ? void 0 : _refs$cellArea$curren2.scrollTop]);
|
|
106502
|
-
React.useLayoutEffect(function () {
|
|
106503
|
-
if (context.commentBoxes || context.hoveredCommentBox || context.editingCommentBox) {
|
|
106504
|
-
var _context$commentBoxes;
|
|
106505
|
-
lodash.concat((_context$commentBoxes = context.commentBoxes) === null || _context$commentBoxes === void 0 ? void 0 : _context$commentBoxes.filter(function (v) {
|
|
106506
|
-
var _context$editingComme;
|
|
106507
|
-
return v.rc !== ((_context$editingComme = context.editingCommentBox) === null || _context$editingComme === void 0 ? void 0 : _context$editingComme.rc);
|
|
106508
|
-
}), [context.hoveredCommentBox, context.editingCommentBox]).forEach(function (box) {
|
|
106509
|
-
if (box) {
|
|
106510
|
-
drawArrow(box.rc, box.size);
|
|
106511
|
-
}
|
|
106512
|
-
});
|
|
106513
|
-
}
|
|
106514
|
-
}, [context.commentBoxes, context.hoveredCommentBox, context.editingCommentBox]);
|
|
106515
106465
|
React.useEffect(function () {
|
|
106516
106466
|
document.addEventListener("mousemove", onMouseMove);
|
|
106517
106467
|
return function () {
|
|
@@ -110490,8 +110440,11 @@
|
|
|
110490
110440
|
generalDialog = _locale.generalDialog,
|
|
110491
110441
|
info = _locale.info;
|
|
110492
110442
|
var getMenuElement = React.useCallback(function (name, i) {
|
|
110493
|
-
var _context$luckysheet_s;
|
|
110443
|
+
var _context$luckysheet_s, _context$hooks, _context$hooks$showMe;
|
|
110494
110444
|
var selection = (_context$luckysheet_s = context.luckysheet_select_save) === null || _context$luckysheet_s === void 0 ? void 0 : _context$luckysheet_s[0];
|
|
110445
|
+
if (((_context$hooks = context.hooks) === null || _context$hooks === void 0 ? void 0 : (_context$hooks$showMe = _context$hooks.showMenuBefore) === null || _context$hooks$showMe === void 0 ? void 0 : _context$hooks$showMe.call(_context$hooks, name, selection)) === false) {
|
|
110446
|
+
return null;
|
|
110447
|
+
}
|
|
110495
110448
|
if (name === "|") {
|
|
110496
110449
|
return /*#__PURE__*/React__default['default'].createElement(Divider$1, {
|
|
110497
110450
|
key: "divider-".concat(i)
|
|
@@ -110520,12 +110473,10 @@
|
|
|
110520
110473
|
return /*#__PURE__*/React__default['default'].createElement(Menu, {
|
|
110521
110474
|
key: item.text,
|
|
110522
110475
|
onClick: function onClick() {
|
|
110523
|
-
|
|
110524
|
-
|
|
110525
|
-
|
|
110526
|
-
|
|
110527
|
-
});
|
|
110528
|
-
}
|
|
110476
|
+
setContext(function (draftCtx) {
|
|
110477
|
+
item.onClick(draftCtx, refs.globalCache, row_index, col_index);
|
|
110478
|
+
draftCtx.contextMenu = {};
|
|
110479
|
+
});
|
|
110529
110480
|
}
|
|
110530
110481
|
}, item.text);
|
|
110531
110482
|
});
|