@fileverse-dev/fortune-react 1.0.2-mod-89-patch-005 → 1.0.2-mod-92

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.
@@ -88,6 +88,7 @@ export declare function generateAPIs(context: Context, setContext: (recipe: (ctx
88
88
  luckysheet_conditionformat_save?: any[] | undefined;
89
89
  luckysheet_alternateformat_save?: any[] | undefined;
90
90
  dataVerification?: any;
91
+ conditionRules?: import("@fileverse-dev/fortune-core").ConditionRulesProps | undefined;
91
92
  hyperlink?: Record<string, {
92
93
  linkType: string;
93
94
  linkAddress: string;
@@ -95,6 +95,7 @@ declare const Workbook: React.ForwardRefExoticComponent<Settings & AdditionalPro
95
95
  luckysheet_conditionformat_save?: any[] | undefined;
96
96
  luckysheet_alternateformat_save?: any[] | undefined;
97
97
  dataVerification?: any;
98
+ conditionRules?: import("@fileverse-dev/fortune-core").ConditionRulesProps | undefined;
98
99
  hyperlink?: Record<string, {
99
100
  linkType: string;
100
101
  linkAddress: string;
package/dist/index.esm.js CHANGED
@@ -1,4 +1,4 @@
1
- import { defaultContext, defaultSettings, getSheetIndex, colLocationByIndex, fixPositionOnFrozenCells, colLocation, getFlowdata, isAllowEdit, handleColumnHeaderMouseDown, handleColSizeHandleMouseDown, handleColFreezeHandleMouseDown, selectTitlesMap, selectTitlesRange, fixColumnStyleOverflowInFreeze, rowLocationByIndex, rowLocation, handleRowHeaderMouseDown, handleRowSizeHandleMouseDown, handleRowFreezeHandleMouseDown, handleContextMenu, fixRowStyleOverflowInFreeze, locale, getStyleByCell, getCellValue, createRangeHightlight, isInlineStringCell, getInlineStringHTML, valueShowEs, escapeHTMLTag, escapeScriptTag, moveToEnd, isShowHidenCR, getrangeseleciton, cancelNormalSelected, moveHighlightCell, israngeseleciton, handleFormulaInput, onSearchDialogMoveStart, replaceAll, replace, searchAll, searchNext, normalizeSelection, scrollToHighlightCell, isLinkValid, goToLink, replaceHtml, removeHyperlink, saveHyperlink, createFilterOptions, onImageMoveStart, onImageResizeStart, showComments, setEditingComment, onCommentBoxMoveStart, confirmMessage, getRangeByTxt, getDropdownList, setCellValue, getRangetxt, setConditionRules, mergeBorder, setDropdownValue, onIframeMoveStart, onIframeResizeStart, saveIframe, onIframeMove, onIframeMoveEnd, onIframeResize, onIframeResizeEnd, handleCellAreaMouseDown, handleCellAreaDoubleClick, selectAll, showLinkCard, getCellRowColumn, getCellHyperlink, handleOverlayMouseMove, handleOverlayMouseUp, handleKeydownForZoom, handleOverlayTouchStart, handleOverlayTouchMove, handleOverlayTouchEnd, insertRowCol, drawArrow, onCellsMoveStart, createDropCellRange, updateContextWithSheetData, updateContextWithCanvas, initFreeze, Canvas, handleGlobalWheel, getDataArr, updateMoreCell, getRegStr, getOptionValue, getSelectRange, applyLocation, updateItem, update, sanitizeDuneUrl, normalizedCellAttr, updateFormat, handleTextSize, handleHorizontalAlign, handleVerticalAlign, handleScreenShot, showImgChooser, insertImage, editComment, deleteComment, showHideComment, showHideAllComments, newComment, handleSum, autoSelectionFormula, handleMerge, handleBorder, handleFreeze, handleSort, createFilter, clearFilter, toolbarItemSelectedFunc, toolbarItemClickHandler, insertDuneChart, handleTextColor, handleTextBackground, getInlineStringNoStyle, rangeHightlightselected, updateCell, editSheetName, cancelActiveImgItem, MAX_ZOOM_RATIO, MIN_ZOOM_RATIO, addSheet, api, getFreezeState, toggleFreeze, jfrefreshgrid, handleCopy, removeActiveImage, deleteSelectedCellText, deleteRowCol, hideSelected, showSelected, sortSelection, handleLink, handlePasteByClick, deleteSheet, opToPatch, setCaretPosition, orderbydatafiler, getFilterColumnValues, getFilterColumnColors, saveFilter, calcSelectionInfo, patchToOp, filterPatch, inverseRowColOptions, ensureSheetIndex, initSheetIndex, handleGlobalKeyDown, handlePaste, groupValuesRefresh } from '@fileverse-dev/fortune-core';
1
+ import { defaultContext, defaultSettings, getSheetIndex, colLocationByIndex, fixPositionOnFrozenCells, colLocation, getFlowdata, isAllowEdit, handleColumnHeaderMouseDown, handleColSizeHandleMouseDown, handleColFreezeHandleMouseDown, selectTitlesMap, selectTitlesRange, fixColumnStyleOverflowInFreeze, rowLocationByIndex, rowLocation, handleRowHeaderMouseDown, handleRowSizeHandleMouseDown, handleRowFreezeHandleMouseDown, handleContextMenu, fixRowStyleOverflowInFreeze, locale, getStyleByCell, getCellValue, createRangeHightlight, isInlineStringCell, getInlineStringHTML, valueShowEs, escapeHTMLTag, escapeScriptTag, moveToEnd, isShowHidenCR, getrangeseleciton, cancelNormalSelected, moveHighlightCell, israngeseleciton, handleFormulaInput, onSearchDialogMoveStart, replaceAll, replace, searchAll, searchNext, normalizeSelection, scrollToHighlightCell, isLinkValid, goToLink, replaceHtml, removeHyperlink, saveHyperlink, createFilterOptions, onImageMoveStart, onImageResizeStart, showComments, setEditingComment, onCommentBoxMoveStart, confirmMessage, getRangeByTxt, getDropdownList, setCellValue, getRangetxt, setConditionRules, mergeBorder, setDropdownValue, onIframeMoveStart, onIframeResizeStart, onIframeMove, onIframeMoveEnd, onIframeResize, onIframeResizeEnd, handleCellAreaMouseDown, handleCellAreaDoubleClick, selectAll, showLinkCard, getCellRowColumn, getCellHyperlink, handleOverlayMouseMove, handleOverlayMouseUp, handleKeydownForZoom, handleOverlayTouchStart, handleOverlayTouchMove, handleOverlayTouchEnd, insertRowCol, drawArrow, onCellsMoveStart, createDropCellRange, updateContextWithSheetData, updateContextWithCanvas, initFreeze, Canvas, handleGlobalWheel, getDataArr, updateMoreCell, getRegStr, getOptionValue, getSelectRange, applyLocation, updateItem, update, sanitizeDuneUrl, normalizedCellAttr, updateFormat, handleTextSize, handleHorizontalAlign, handleVerticalAlign, handleScreenShot, showImgChooser, insertImage, editComment, deleteComment, showHideComment, showHideAllComments, newComment, handleSum, autoSelectionFormula, handleMerge, handleBorder, handleFreeze, handleSort, createFilter, clearFilter, toolbarItemSelectedFunc, toolbarItemClickHandler, insertDuneChart, handleTextColor, handleTextBackground, getInlineStringNoStyle, rangeHightlightselected, updateCell, editSheetName, cancelActiveImgItem, MAX_ZOOM_RATIO, MIN_ZOOM_RATIO, addSheet, api, getFreezeState, toggleFreeze, jfrefreshgrid, handleCopy, removeActiveImage, deleteSelectedCellText, deleteRowCol, hideSelected, showSelected, sortSelection, handleLink, handlePasteByClick, deleteSheet, opToPatch, setCaretPosition, orderbydatafiler, getFilterColumnValues, getFilterColumnColors, saveFilter, calcSelectionInfo, patchToOp, filterPatch, inverseRowColOptions, ensureSheetIndex, initSheetIndex, handleGlobalKeyDown, handlePaste, groupValuesRefresh } from '@fileverse-dev/fortune-core';
2
2
  export { PROMOTED_CRYPTO_FUNCTIONS } from '@fileverse-dev/fortune-core';
3
3
  import { SERVICE_API_KEY } from '@fileverse-dev/formulajs/crypto-constants';
4
4
  export * from '@fileverse-dev/formulajs/crypto-constants';
@@ -813,8 +813,8 @@ var FormulaSearch = function FormulaSearch(props) {
813
813
  top = _useState2[0],
814
814
  setTop = _useState2[1];
815
815
  var calcuatePopUpPlacement = function calcuatePopUpPlacement() {
816
- var _hintRef$current;
817
- if (!(firstSelection === null || firstSelection === void 0 ? void 0 : firstSelection.top) || !firstSelection.height_move || !hintRef.current) return;
816
+ var _firstSelection$top, _firstSelection$heigh, _hintRef$current;
817
+ if (!(firstSelection === null || firstSelection === void 0 ? void 0 : (_firstSelection$top = firstSelection.top) === null || _firstSelection$top === void 0 ? void 0 : _firstSelection$top.toString()) || !((_firstSelection$heigh = firstSelection.height_move) === null || _firstSelection$heigh === void 0 ? void 0 : _firstSelection$heigh.toString()) || !hintRef.current) return;
818
818
  var hintHeight = 360;
819
819
  var inputBottom = firstSelection.top + firstSelection.height_move;
820
820
  var availableBelow = window.innerHeight - inputBottom;
@@ -1046,8 +1046,8 @@ var FormulaHint = function FormulaHint(props) {
1046
1046
  top = _useState0[0],
1047
1047
  setTop = _useState0[1];
1048
1048
  var calcuatePopUpPlacement = function calcuatePopUpPlacement() {
1049
- var _hintRef$current;
1050
- if (!(firstSelection === null || firstSelection === void 0 ? void 0 : firstSelection.top) || !firstSelection.height_move || !hintRef.current) return;
1049
+ var _firstSelection$top, _firstSelection$heigh, _hintRef$current;
1050
+ if (!(firstSelection === null || firstSelection === void 0 ? void 0 : (_firstSelection$top = firstSelection.top) === null || _firstSelection$top === void 0 ? void 0 : _firstSelection$top.toString()) || !((_firstSelection$heigh = firstSelection.height_move) === null || _firstSelection$heigh === void 0 ? void 0 : _firstSelection$heigh.toString()) || !hintRef.current) return;
1051
1051
  var hintHeight = 360;
1052
1052
  var inputBottom = firstSelection.top + firstSelection.height_move;
1053
1053
  var availableBelow = window.innerHeight - inputBottom;
@@ -1436,32 +1436,44 @@ var InputBox = function InputBox() {
1436
1436
  return document.querySelector(".luckysheet-formula-search-item-active");
1437
1437
  }, []);
1438
1438
  var insertSelectedFormula = useCallback(function (formulaName) {
1439
- var _getrangeseleciton;
1439
+ var _selection, _getrangeseleciton;
1440
1440
  var textEditor = document.getElementById("luckysheet-rich-text-editor");
1441
1441
  if (!textEditor) return;
1442
- var searchTxt = ((_getrangeseleciton = getrangeseleciton()) === null || _getrangeseleciton === void 0 ? void 0 : _getrangeseleciton.textContent) || "";
1443
- var deleteCount = searchTxt === "=" ? 0 : searchTxt.length;
1444
1442
  textEditor.focus();
1445
1443
  var selection = window.getSelection();
1446
- if (!selection || selection.rangeCount === 0) return;
1447
- var range = selection.getRangeAt(0);
1448
- if (deleteCount !== 0 && range) {
1444
+ var range = ((_selection = selection) === null || _selection === void 0 ? void 0 : _selection.rangeCount) ? selection.getRangeAt(0) : null;
1445
+ if (!selection || !range || !textEditor.contains(range.startContainer)) {
1446
+ var _selection2, _selection3;
1447
+ range = document.createRange();
1448
+ range.selectNodeContents(textEditor);
1449
+ range.collapse(false);
1450
+ selection = window.getSelection();
1451
+ (_selection2 = selection) === null || _selection2 === void 0 ? void 0 : _selection2.removeAllRanges();
1452
+ (_selection3 = selection) === null || _selection3 === void 0 ? void 0 : _selection3.addRange(range);
1453
+ }
1454
+ var searchTxt = ((_getrangeseleciton = getrangeseleciton()) === null || _getrangeseleciton === void 0 ? void 0 : _getrangeseleciton.textContent) || "";
1455
+ var deleteCount = searchTxt === "=" ? 0 : searchTxt.length;
1456
+ if (deleteCount > 0 && range.startContainer.nodeType === Node.TEXT_NODE && textEditor.contains(range.startContainer)) {
1449
1457
  var startOffset = Math.max(range.startOffset - deleteCount, 0);
1450
1458
  var endOffset = range.startOffset;
1451
1459
  range.setStart(range.startContainer, startOffset);
1452
1460
  range.setEnd(range.startContainer, endOffset);
1453
1461
  range.deleteContents();
1454
1462
  }
1463
+ textEditor.querySelectorAll(".luckysheet-formula-text-func, .luckysheet-formula-text-lpar").forEach(function (el) {
1464
+ return el.remove();
1465
+ });
1455
1466
  var funcNode = new DOMParser().parseFromString("<span dir=\"auto\" class=\"luckysheet-formula-text-func\">".concat(formulaName, "</span>"), "text/html").body.firstChild;
1456
1467
  var parNode = new DOMParser().parseFromString("<span dir=\"auto\" class=\"luckysheet-formula-text-lpar\">(</span>", "text/html").body.firstChild;
1457
- if (range === null || range === void 0 ? void 0 : range.startContainer.parentNode) {
1458
- range.setStart(range.startContainer.parentNode, 1);
1459
- }
1460
- if (parNode) range.insertNode(parNode);
1461
- if (funcNode) range.insertNode(funcNode);
1462
- range.collapse();
1463
- selection.removeAllRanges();
1464
- selection.addRange(range);
1468
+ if (range && parNode && funcNode) {
1469
+ var _selection4, _selection5;
1470
+ range.insertNode(funcNode);
1471
+ range.collapse(false);
1472
+ range.insertNode(parNode);
1473
+ range.collapse(false);
1474
+ (_selection4 = selection) === null || _selection4 === void 0 ? void 0 : _selection4.removeAllRanges();
1475
+ (_selection5 = selection) === null || _selection5 === void 0 ? void 0 : _selection5.addRange(range);
1476
+ }
1465
1477
  setContext(function (draftCtx) {
1466
1478
  draftCtx.functionCandidates = [];
1467
1479
  draftCtx.defaultCandidates = [];
@@ -1543,11 +1555,16 @@ var InputBox = function InputBox() {
1543
1555
  e.preventDefault();
1544
1556
  }
1545
1557
  }, [clearSearchItemActiveClass, context.luckysheetCellUpdate.length, selectActiveFormula, setContext, firstSelection]);
1558
+ var _useState3 = useState(false),
1559
+ _useState4 = _slicedToArray(_useState3, 2),
1560
+ showCrypoModal = _useState4[0],
1561
+ setShowCryptoModal = _useState4[1];
1546
1562
  var onChange = useCallback(function (__, isBlur) {
1547
1563
  var e = lastKeyDownEventRef.current;
1548
1564
  if (!e) return;
1549
1565
  var kcode = e.keyCode;
1550
1566
  if (!kcode) return;
1567
+ setShowCryptoModal(!document.getElementById("luckysheet-formula-search-c"));
1551
1568
  if (!(kcode >= 112 && kcode <= 123 || kcode <= 46 || kcode === 144 || kcode === 108 || e.ctrlKey || e.altKey || e.shiftKey && (kcode === 37 || kcode === 38 || kcode === 39 || kcode === 40)) || kcode === 8 || kcode === 32 || kcode === 46 || e.ctrlKey && kcode === 86) {
1552
1569
  setContext(function (draftCtx) {
1553
1570
  if ((draftCtx.formulaCache.rangestart || draftCtx.formulaCache.rangedrag_column_start || draftCtx.formulaCache.rangedrag_row_start || israngeseleciton(draftCtx)) && isBlur) return;
@@ -1609,7 +1626,7 @@ var InputBox = function InputBox() {
1609
1626
  onKeyDown: onKeyDown,
1610
1627
  onPaste: onPaste,
1611
1628
  allowEdit: edit ? !isHidenRC : edit
1612
- })), (context.functionCandidates.length > 0 || context.functionHint || context.defaultCandidates.length > 0) && (/*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(FormulaSearch, {
1629
+ })), (context.functionCandidates.length > 0 || context.functionHint || context.defaultCandidates.length > 0) && showCrypoModal && (/*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(FormulaSearch, {
1613
1630
  onMouseOver: function onMouseOver(e) {
1614
1631
  if (document.getElementById("luckysheet-formula-search-c")) {
1615
1632
  var hoveredItem = e.target.closest(".luckysheet-formula-search-item");
@@ -3846,7 +3863,6 @@ var IframeBoxs = function IframeBoxs() {
3846
3863
  });
3847
3864
  }
3848
3865
  ctx.activeIframe = undefined;
3849
- saveIframe(ctx);
3850
3866
  });
3851
3867
  },
3852
3868
  variant: "ghost",
package/dist/index.js CHANGED
@@ -823,8 +823,8 @@ var FormulaSearch = function FormulaSearch(props) {
823
823
  top = _useState2[0],
824
824
  setTop = _useState2[1];
825
825
  var calcuatePopUpPlacement = function calcuatePopUpPlacement() {
826
- var _hintRef$current;
827
- if (!(firstSelection === null || firstSelection === void 0 ? void 0 : firstSelection.top) || !firstSelection.height_move || !hintRef.current) return;
826
+ var _firstSelection$top, _firstSelection$heigh, _hintRef$current;
827
+ if (!(firstSelection === null || firstSelection === void 0 ? void 0 : (_firstSelection$top = firstSelection.top) === null || _firstSelection$top === void 0 ? void 0 : _firstSelection$top.toString()) || !((_firstSelection$heigh = firstSelection.height_move) === null || _firstSelection$heigh === void 0 ? void 0 : _firstSelection$heigh.toString()) || !hintRef.current) return;
828
828
  var hintHeight = 360;
829
829
  var inputBottom = firstSelection.top + firstSelection.height_move;
830
830
  var availableBelow = window.innerHeight - inputBottom;
@@ -1056,8 +1056,8 @@ var FormulaHint = function FormulaHint(props) {
1056
1056
  top = _useState0[0],
1057
1057
  setTop = _useState0[1];
1058
1058
  var calcuatePopUpPlacement = function calcuatePopUpPlacement() {
1059
- var _hintRef$current;
1060
- if (!(firstSelection === null || firstSelection === void 0 ? void 0 : firstSelection.top) || !firstSelection.height_move || !hintRef.current) return;
1059
+ var _firstSelection$top, _firstSelection$heigh, _hintRef$current;
1060
+ if (!(firstSelection === null || firstSelection === void 0 ? void 0 : (_firstSelection$top = firstSelection.top) === null || _firstSelection$top === void 0 ? void 0 : _firstSelection$top.toString()) || !((_firstSelection$heigh = firstSelection.height_move) === null || _firstSelection$heigh === void 0 ? void 0 : _firstSelection$heigh.toString()) || !hintRef.current) return;
1061
1061
  var hintHeight = 360;
1062
1062
  var inputBottom = firstSelection.top + firstSelection.height_move;
1063
1063
  var availableBelow = window.innerHeight - inputBottom;
@@ -1446,32 +1446,44 @@ var InputBox = function InputBox() {
1446
1446
  return document.querySelector(".luckysheet-formula-search-item-active");
1447
1447
  }, []);
1448
1448
  var insertSelectedFormula = React.useCallback(function (formulaName) {
1449
- var _getrangeseleciton;
1449
+ var _selection, _getrangeseleciton;
1450
1450
  var textEditor = document.getElementById("luckysheet-rich-text-editor");
1451
1451
  if (!textEditor) return;
1452
- var searchTxt = ((_getrangeseleciton = fortuneCore.getrangeseleciton()) === null || _getrangeseleciton === void 0 ? void 0 : _getrangeseleciton.textContent) || "";
1453
- var deleteCount = searchTxt === "=" ? 0 : searchTxt.length;
1454
1452
  textEditor.focus();
1455
1453
  var selection = window.getSelection();
1456
- if (!selection || selection.rangeCount === 0) return;
1457
- var range = selection.getRangeAt(0);
1458
- if (deleteCount !== 0 && range) {
1454
+ var range = ((_selection = selection) === null || _selection === void 0 ? void 0 : _selection.rangeCount) ? selection.getRangeAt(0) : null;
1455
+ if (!selection || !range || !textEditor.contains(range.startContainer)) {
1456
+ var _selection2, _selection3;
1457
+ range = document.createRange();
1458
+ range.selectNodeContents(textEditor);
1459
+ range.collapse(false);
1460
+ selection = window.getSelection();
1461
+ (_selection2 = selection) === null || _selection2 === void 0 ? void 0 : _selection2.removeAllRanges();
1462
+ (_selection3 = selection) === null || _selection3 === void 0 ? void 0 : _selection3.addRange(range);
1463
+ }
1464
+ var searchTxt = ((_getrangeseleciton = fortuneCore.getrangeseleciton()) === null || _getrangeseleciton === void 0 ? void 0 : _getrangeseleciton.textContent) || "";
1465
+ var deleteCount = searchTxt === "=" ? 0 : searchTxt.length;
1466
+ if (deleteCount > 0 && range.startContainer.nodeType === Node.TEXT_NODE && textEditor.contains(range.startContainer)) {
1459
1467
  var startOffset = Math.max(range.startOffset - deleteCount, 0);
1460
1468
  var endOffset = range.startOffset;
1461
1469
  range.setStart(range.startContainer, startOffset);
1462
1470
  range.setEnd(range.startContainer, endOffset);
1463
1471
  range.deleteContents();
1464
1472
  }
1473
+ textEditor.querySelectorAll(".luckysheet-formula-text-func, .luckysheet-formula-text-lpar").forEach(function (el) {
1474
+ return el.remove();
1475
+ });
1465
1476
  var funcNode = new DOMParser().parseFromString("<span dir=\"auto\" class=\"luckysheet-formula-text-func\">".concat(formulaName, "</span>"), "text/html").body.firstChild;
1466
1477
  var parNode = new DOMParser().parseFromString("<span dir=\"auto\" class=\"luckysheet-formula-text-lpar\">(</span>", "text/html").body.firstChild;
1467
- if (range === null || range === void 0 ? void 0 : range.startContainer.parentNode) {
1468
- range.setStart(range.startContainer.parentNode, 1);
1469
- }
1470
- if (parNode) range.insertNode(parNode);
1471
- if (funcNode) range.insertNode(funcNode);
1472
- range.collapse();
1473
- selection.removeAllRanges();
1474
- selection.addRange(range);
1478
+ if (range && parNode && funcNode) {
1479
+ var _selection4, _selection5;
1480
+ range.insertNode(funcNode);
1481
+ range.collapse(false);
1482
+ range.insertNode(parNode);
1483
+ range.collapse(false);
1484
+ (_selection4 = selection) === null || _selection4 === void 0 ? void 0 : _selection4.removeAllRanges();
1485
+ (_selection5 = selection) === null || _selection5 === void 0 ? void 0 : _selection5.addRange(range);
1486
+ }
1475
1487
  setContext(function (draftCtx) {
1476
1488
  draftCtx.functionCandidates = [];
1477
1489
  draftCtx.defaultCandidates = [];
@@ -1553,11 +1565,16 @@ var InputBox = function InputBox() {
1553
1565
  e.preventDefault();
1554
1566
  }
1555
1567
  }, [clearSearchItemActiveClass, context.luckysheetCellUpdate.length, selectActiveFormula, setContext, firstSelection]);
1568
+ var _useState3 = React.useState(false),
1569
+ _useState4 = _slicedToArray(_useState3, 2),
1570
+ showCrypoModal = _useState4[0],
1571
+ setShowCryptoModal = _useState4[1];
1556
1572
  var onChange = React.useCallback(function (__, isBlur) {
1557
1573
  var e = lastKeyDownEventRef.current;
1558
1574
  if (!e) return;
1559
1575
  var kcode = e.keyCode;
1560
1576
  if (!kcode) return;
1577
+ setShowCryptoModal(!document.getElementById("luckysheet-formula-search-c"));
1561
1578
  if (!(kcode >= 112 && kcode <= 123 || kcode <= 46 || kcode === 144 || kcode === 108 || e.ctrlKey || e.altKey || e.shiftKey && (kcode === 37 || kcode === 38 || kcode === 39 || kcode === 40)) || kcode === 8 || kcode === 32 || kcode === 46 || e.ctrlKey && kcode === 86) {
1562
1579
  setContext(function (draftCtx) {
1563
1580
  if ((draftCtx.formulaCache.rangestart || draftCtx.formulaCache.rangedrag_column_start || draftCtx.formulaCache.rangedrag_row_start || fortuneCore.israngeseleciton(draftCtx)) && isBlur) return;
@@ -1619,7 +1636,7 @@ var InputBox = function InputBox() {
1619
1636
  onKeyDown: onKeyDown,
1620
1637
  onPaste: onPaste,
1621
1638
  allowEdit: edit ? !isHidenRC : edit
1622
- })), (context.functionCandidates.length > 0 || context.functionHint || context.defaultCandidates.length > 0) && (/*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(FormulaSearch, {
1639
+ })), (context.functionCandidates.length > 0 || context.functionHint || context.defaultCandidates.length > 0) && showCrypoModal && (/*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(FormulaSearch, {
1623
1640
  onMouseOver: function onMouseOver(e) {
1624
1641
  if (document.getElementById("luckysheet-formula-search-c")) {
1625
1642
  var hoveredItem = e.target.closest(".luckysheet-formula-search-item");
@@ -3856,7 +3873,6 @@ var IframeBoxs = function IframeBoxs() {
3856
3873
  });
3857
3874
  }
3858
3875
  ctx.activeIframe = undefined;
3859
- fortuneCore.saveIframe(ctx);
3860
3876
  });
3861
3877
  },
3862
3878
  variant: "ghost",