@leankylin-sheet/react 7.0.1 → 7.0.2
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 +9 -5
- package/dist/index.js +8 -4
- package/dist/index.umd.js +8 -4
- package/dist/index.umd.min.js +1 -1
- package/package.json +3 -3
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, getCellValue, createRangeHightlight, isInlineStringCell, getInlineStringHTML, valueShowEs, escapeHTMLTag, escapeScriptTag, isShowHidenCR, cancelNormalSelected, moveHighlightCell, updateCell, israngeseleciton, handleFormulaInput, onSearchDialogMoveStart, replaceAll, replace, searchAll, searchNext, changeSheet, normalizeSelection, scrollToHighlightCell, chatatABC, getCellHyperlink, 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, handleOverlayMouseMove, handleOverlayMouseUp, handleKeydownForZoom, handleOverlayTouchStart, handleOverlayTouchMove, handleOverlayTouchEnd, onCellsMoveStart, createDropCellRange, handleDropCellDoubleClick, 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, setNextSheet, 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, cancelActiveImgItem, patchToOp, filterPatch, inverseRowColOptions, ensureSheetIndex, initSheetIndex, handleGlobalKeyDown, handlePasteByLeanklin, groupValuesRefresh } from '@leankylin-sheet/core';
|
|
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, getCellValue, createRangeHightlight, isInlineStringCell, getInlineStringHTML, valueShowEs, escapeHTMLTag, escapeScriptTag, isShowHidenCR, cancelNormalSelected, moveHighlightCell, updateCell, israngeseleciton, handleFormulaInput, onSearchDialogMoveStart, replaceAll, replace, searchAll, searchNext, changeSheet, normalizeSelection, scrollToHighlightCell, chatatABC, getCellHyperlink, 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, handleOverlayMouseMove, handleOverlayMouseUp, handleKeydownForZoom, handleOverlayTouchStart, handleOverlayTouchMove, handleOverlayTouchEnd, PAINT_MODEL_CURSOR, onCellsMoveStart, createDropCellRange, handleDropCellDoubleClick, 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, setNextSheet, 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, cancelActiveImgItem, patchToOp, filterPatch, inverseRowColOptions, ensureSheetIndex, initSheetIndex, handleGlobalKeyDown, handlePasteByLeanklin, groupValuesRefresh } from '@leankylin-sheet/core';
|
|
2
2
|
import { useInViewport, useMemoizedFn, useThrottleFn } from 'ahooks';
|
|
3
3
|
import React, { useContext, useRef, useState, useMemo, useCallback, useEffect, useLayoutEffect, useImperativeHandle } from 'react';
|
|
4
4
|
import produce, { applyPatches, enablePatches, produceWithPatches } from 'immer';
|
|
@@ -4719,7 +4719,7 @@ var SheetOverlay = function SheetOverlay() {
|
|
|
4719
4719
|
style: {
|
|
4720
4720
|
width: context.cellmainWidth,
|
|
4721
4721
|
height: context.cellmainHeight,
|
|
4722
|
-
cursor: context.luckysheet_cell_selected_extend ? "crosshair" : "auto"
|
|
4722
|
+
cursor: context.luckysheetPaintModelOn ? PAINT_MODEL_CURSOR : context.luckysheet_cell_selected_extend ? "crosshair" : "auto"
|
|
4723
4723
|
}
|
|
4724
4724
|
}, /*#__PURE__*/React.createElement("div", {
|
|
4725
4725
|
id: "leankylin-formula-functionrange"
|
|
@@ -6729,7 +6729,7 @@ var Toolbar = function Toolbar(_ref) {
|
|
|
6729
6729
|
}
|
|
6730
6730
|
}, [itemLocations, setMoreItems, settings.toolbarItems.length, sheetWidth]);
|
|
6731
6731
|
var getToolbarItem = useCallback(function (name, i) {
|
|
6732
|
-
var _toolbarItemSelectedF;
|
|
6732
|
+
var _toolbarItemSelectedF, _toolbarItemSelectedF2;
|
|
6733
6733
|
var tooltip = toolbar[name];
|
|
6734
6734
|
if (name === "|") {
|
|
6735
6735
|
return /*#__PURE__*/React.createElement(Divider, {
|
|
@@ -7697,11 +7697,15 @@ var Toolbar = function Toolbar(_ref) {
|
|
|
7697
7697
|
}));
|
|
7698
7698
|
});
|
|
7699
7699
|
}
|
|
7700
|
+
var selected = (_toolbarItemSelectedF = toolbarItemSelectedFunc(name)) === null || _toolbarItemSelectedF === void 0 ? void 0 : _toolbarItemSelectedF(cell);
|
|
7701
|
+
if (name === "format-painter") {
|
|
7702
|
+
selected = context.luckysheetPaintModelOn;
|
|
7703
|
+
}
|
|
7700
7704
|
return /*#__PURE__*/React.createElement(Button, {
|
|
7701
7705
|
iconId: name,
|
|
7702
7706
|
tooltip: tooltip,
|
|
7703
7707
|
key: name,
|
|
7704
|
-
selected: (
|
|
7708
|
+
selected: (_toolbarItemSelectedF2 = toolbarItemSelectedFunc(name)) === null || _toolbarItemSelectedF2 === void 0 ? void 0 : _toolbarItemSelectedF2(cell),
|
|
7705
7709
|
onClick: function onClick() {
|
|
7706
7710
|
return setContext(function (draftCtx) {
|
|
7707
7711
|
var _toolbarItemClickHand;
|
|
@@ -7709,7 +7713,7 @@ var Toolbar = function Toolbar(_ref) {
|
|
|
7709
7713
|
});
|
|
7710
7714
|
}
|
|
7711
7715
|
});
|
|
7712
|
-
}, [toolbar, cell, setContext, refs.cellInput, refs.fxInput, refs.globalCache, defaultFmt, align, handleUndo, handleRedo, flowdata, formula, showDialog, hideDialog, merge, border, freezen, screenshot, sort, textWrap, rotation, filter, splitText, findAndReplace, context.luckysheet_select_save, context.defaultFontSize, context.allowEdit, comment, fontarray, hideSubMenu, showSubMenu, refs.canvas, customColor, customStyle, toolbarFormat.moreCurrency]);
|
|
7716
|
+
}, [toolbar, cell, setContext, refs.cellInput, refs.fxInput, refs.globalCache, defaultFmt, align, handleUndo, handleRedo, flowdata, formula, showDialog, hideDialog, merge, border, freezen, screenshot, sort, textWrap, rotation, filter, splitText, findAndReplace, context.luckysheet_select_save, context.defaultFontSize, context.allowEdit, context.luckysheetPaintModelOn, comment, fontarray, hideSubMenu, showSubMenu, refs.canvas, customColor, customStyle, toolbarFormat.moreCurrency]);
|
|
7713
7717
|
return /*#__PURE__*/React.createElement("div", {
|
|
7714
7718
|
ref: containerRef,
|
|
7715
7719
|
className: "leankylin-toolbar"
|
package/dist/index.js
CHANGED
|
@@ -4729,7 +4729,7 @@ var SheetOverlay = function SheetOverlay() {
|
|
|
4729
4729
|
style: {
|
|
4730
4730
|
width: context.cellmainWidth,
|
|
4731
4731
|
height: context.cellmainHeight,
|
|
4732
|
-
cursor: context.luckysheet_cell_selected_extend ? "crosshair" : "auto"
|
|
4732
|
+
cursor: context.luckysheetPaintModelOn ? core.PAINT_MODEL_CURSOR : context.luckysheet_cell_selected_extend ? "crosshair" : "auto"
|
|
4733
4733
|
}
|
|
4734
4734
|
}, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
4735
4735
|
id: "leankylin-formula-functionrange"
|
|
@@ -6739,7 +6739,7 @@ var Toolbar = function Toolbar(_ref) {
|
|
|
6739
6739
|
}
|
|
6740
6740
|
}, [itemLocations, setMoreItems, settings.toolbarItems.length, sheetWidth]);
|
|
6741
6741
|
var getToolbarItem = React.useCallback(function (name, i) {
|
|
6742
|
-
var _toolbarItemSelectedF;
|
|
6742
|
+
var _toolbarItemSelectedF, _toolbarItemSelectedF2;
|
|
6743
6743
|
var tooltip = toolbar[name];
|
|
6744
6744
|
if (name === "|") {
|
|
6745
6745
|
return /*#__PURE__*/React__default['default'].createElement(Divider, {
|
|
@@ -7707,11 +7707,15 @@ var Toolbar = function Toolbar(_ref) {
|
|
|
7707
7707
|
}));
|
|
7708
7708
|
});
|
|
7709
7709
|
}
|
|
7710
|
+
var selected = (_toolbarItemSelectedF = core.toolbarItemSelectedFunc(name)) === null || _toolbarItemSelectedF === void 0 ? void 0 : _toolbarItemSelectedF(cell);
|
|
7711
|
+
if (name === "format-painter") {
|
|
7712
|
+
selected = context.luckysheetPaintModelOn;
|
|
7713
|
+
}
|
|
7710
7714
|
return /*#__PURE__*/React__default['default'].createElement(Button, {
|
|
7711
7715
|
iconId: name,
|
|
7712
7716
|
tooltip: tooltip,
|
|
7713
7717
|
key: name,
|
|
7714
|
-
selected: (
|
|
7718
|
+
selected: (_toolbarItemSelectedF2 = core.toolbarItemSelectedFunc(name)) === null || _toolbarItemSelectedF2 === void 0 ? void 0 : _toolbarItemSelectedF2(cell),
|
|
7715
7719
|
onClick: function onClick() {
|
|
7716
7720
|
return setContext(function (draftCtx) {
|
|
7717
7721
|
var _toolbarItemClickHand;
|
|
@@ -7719,7 +7723,7 @@ var Toolbar = function Toolbar(_ref) {
|
|
|
7719
7723
|
});
|
|
7720
7724
|
}
|
|
7721
7725
|
});
|
|
7722
|
-
}, [toolbar, cell, setContext, refs.cellInput, refs.fxInput, refs.globalCache, defaultFmt, align, handleUndo, handleRedo, flowdata, formula, showDialog, hideDialog, merge, border, freezen, screenshot, sort, textWrap, rotation, filter, splitText, findAndReplace, context.luckysheet_select_save, context.defaultFontSize, context.allowEdit, comment, fontarray, hideSubMenu, showSubMenu, refs.canvas, customColor, customStyle, toolbarFormat.moreCurrency]);
|
|
7726
|
+
}, [toolbar, cell, setContext, refs.cellInput, refs.fxInput, refs.globalCache, defaultFmt, align, handleUndo, handleRedo, flowdata, formula, showDialog, hideDialog, merge, border, freezen, screenshot, sort, textWrap, rotation, filter, splitText, findAndReplace, context.luckysheet_select_save, context.defaultFontSize, context.allowEdit, context.luckysheetPaintModelOn, comment, fontarray, hideSubMenu, showSubMenu, refs.canvas, customColor, customStyle, toolbarFormat.moreCurrency]);
|
|
7723
7727
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
7724
7728
|
ref: containerRef,
|
|
7725
7729
|
className: "leankylin-toolbar"
|
package/dist/index.umd.js
CHANGED
|
@@ -23803,7 +23803,7 @@
|
|
|
23803
23803
|
style: {
|
|
23804
23804
|
width: context.cellmainWidth,
|
|
23805
23805
|
height: context.cellmainHeight,
|
|
23806
|
-
cursor: context.luckysheet_cell_selected_extend ? "crosshair" : "auto"
|
|
23806
|
+
cursor: context.luckysheetPaintModelOn ? core.PAINT_MODEL_CURSOR : context.luckysheet_cell_selected_extend ? "crosshair" : "auto"
|
|
23807
23807
|
}
|
|
23808
23808
|
}, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
23809
23809
|
id: "leankylin-formula-functionrange"
|
|
@@ -25813,7 +25813,7 @@
|
|
|
25813
25813
|
}
|
|
25814
25814
|
}, [itemLocations, setMoreItems, settings.toolbarItems.length, sheetWidth]);
|
|
25815
25815
|
var getToolbarItem = React.useCallback(function (name, i) {
|
|
25816
|
-
var _toolbarItemSelectedF;
|
|
25816
|
+
var _toolbarItemSelectedF, _toolbarItemSelectedF2;
|
|
25817
25817
|
var tooltip = toolbar[name];
|
|
25818
25818
|
if (name === "|") {
|
|
25819
25819
|
return /*#__PURE__*/React__default['default'].createElement(Divider, {
|
|
@@ -26781,11 +26781,15 @@
|
|
|
26781
26781
|
}));
|
|
26782
26782
|
});
|
|
26783
26783
|
}
|
|
26784
|
+
var selected = (_toolbarItemSelectedF = core.toolbarItemSelectedFunc(name)) === null || _toolbarItemSelectedF === void 0 ? void 0 : _toolbarItemSelectedF(cell);
|
|
26785
|
+
if (name === "format-painter") {
|
|
26786
|
+
selected = context.luckysheetPaintModelOn;
|
|
26787
|
+
}
|
|
26784
26788
|
return /*#__PURE__*/React__default['default'].createElement(Button, {
|
|
26785
26789
|
iconId: name,
|
|
26786
26790
|
tooltip: tooltip,
|
|
26787
26791
|
key: name,
|
|
26788
|
-
selected: (
|
|
26792
|
+
selected: (_toolbarItemSelectedF2 = core.toolbarItemSelectedFunc(name)) === null || _toolbarItemSelectedF2 === void 0 ? void 0 : _toolbarItemSelectedF2(cell),
|
|
26789
26793
|
onClick: function onClick() {
|
|
26790
26794
|
return setContext(function (draftCtx) {
|
|
26791
26795
|
var _toolbarItemClickHand;
|
|
@@ -26793,7 +26797,7 @@
|
|
|
26793
26797
|
});
|
|
26794
26798
|
}
|
|
26795
26799
|
});
|
|
26796
|
-
}, [toolbar, cell, setContext, refs.cellInput, refs.fxInput, refs.globalCache, defaultFmt, align, handleUndo, handleRedo, flowdata, formula, showDialog, hideDialog, merge, border, freezen, screenshot, sort, textWrap, rotation, filter, splitText, findAndReplace, context.luckysheet_select_save, context.defaultFontSize, context.allowEdit, comment, fontarray, hideSubMenu, showSubMenu, refs.canvas, customColor, customStyle, toolbarFormat.moreCurrency]);
|
|
26800
|
+
}, [toolbar, cell, setContext, refs.cellInput, refs.fxInput, refs.globalCache, defaultFmt, align, handleUndo, handleRedo, flowdata, formula, showDialog, hideDialog, merge, border, freezen, screenshot, sort, textWrap, rotation, filter, splitText, findAndReplace, context.luckysheet_select_save, context.defaultFontSize, context.allowEdit, context.luckysheetPaintModelOn, comment, fontarray, hideSubMenu, showSubMenu, refs.canvas, customColor, customStyle, toolbarFormat.moreCurrency]);
|
|
26797
26801
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
26798
26802
|
ref: containerRef,
|
|
26799
26803
|
className: "leankylin-toolbar"
|