@fileverse-dev/fortune-react 1.0.2-mod-0 → 1.0.2-mod-1

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.js CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var coreMod = require('@fileverse-dev/core-mod');
5
+ var fortuneCore = require('@fileverse-dev/fortune-core');
6
6
  var React = require('react');
7
7
  var produce = require('immer');
8
8
  var _ = require('lodash');
@@ -457,9 +457,9 @@ var defaultRefs = {
457
457
  workbookContainer: /*#__PURE__*/React__default['default'].createRef()
458
458
  };
459
459
  var WorkbookContext = /*#__PURE__*/React__default['default'].createContext({
460
- context: coreMod.defaultContext(defaultRefs),
460
+ context: fortuneCore.defaultContext(defaultRefs),
461
461
  setContext: function setContext() {},
462
- settings: coreMod.defaultSettings,
462
+ settings: fortuneCore.defaultSettings,
463
463
  handleUndo: function handleUndo() {},
464
464
  handleRedo: function handleRedo() {},
465
465
  refs: {
@@ -520,13 +520,13 @@ var ColumnHeader = function ColumnHeader() {
520
520
  selectedLocation = _useState6[0],
521
521
  setSelectedLocation = _useState6[1];
522
522
  var allowEditRef = React.useRef(true);
523
- var sheetIndex = coreMod.getSheetIndex(context, context.currentSheetId);
523
+ var sheetIndex = fortuneCore.getSheetIndex(context, context.currentSheetId);
524
524
  var sheet = sheetIndex == null ? null : context.luckysheetfile[sheetIndex];
525
525
  var freezeHandleLeft = React.useMemo(function () {
526
526
  var _sheet$frozen, _sheet$frozen2, _sheet$frozen3, _sheet$frozen4;
527
527
  if ((sheet === null || sheet === void 0 ? void 0 : (_sheet$frozen = sheet.frozen) === null || _sheet$frozen === void 0 ? void 0 : _sheet$frozen.type) === "column" || (sheet === null || sheet === void 0 ? void 0 : (_sheet$frozen2 = sheet.frozen) === null || _sheet$frozen2 === void 0 ? void 0 : _sheet$frozen2.type) === "rangeColumn" || (sheet === null || sheet === void 0 ? void 0 : (_sheet$frozen3 = sheet.frozen) === null || _sheet$frozen3 === void 0 ? void 0 : _sheet$frozen3.type) === "rangeBoth" || (sheet === null || sheet === void 0 ? void 0 : (_sheet$frozen4 = sheet.frozen) === null || _sheet$frozen4 === void 0 ? void 0 : _sheet$frozen4.type) === "both") {
528
528
  var _sheet$frozen5, _sheet$frozen5$range;
529
- return coreMod.colLocationByIndex((sheet === null || sheet === void 0 ? void 0 : (_sheet$frozen5 = sheet.frozen) === null || _sheet$frozen5 === void 0 ? void 0 : (_sheet$frozen5$range = _sheet$frozen5.range) === null || _sheet$frozen5$range === void 0 ? void 0 : _sheet$frozen5$range.column_focus) || 0, context.visibledatacolumn)[1] - 2 + context.scrollLeft;
529
+ return fortuneCore.colLocationByIndex((sheet === null || sheet === void 0 ? void 0 : (_sheet$frozen5 = sheet.frozen) === null || _sheet$frozen5 === void 0 ? void 0 : (_sheet$frozen5$range = _sheet$frozen5.range) === null || _sheet$frozen5$range === void 0 ? void 0 : _sheet$frozen5$range.column_focus) || 0, context.visibledatacolumn)[1] - 2 + context.scrollLeft;
530
530
  }
531
531
  return context.scrollLeft;
532
532
  }, [context.visibledatacolumn, sheet === null || sheet === void 0 ? void 0 : sheet.frozen, context.scrollLeft]);
@@ -538,10 +538,10 @@ var ColumnHeader = function ColumnHeader() {
538
538
  var mouseX = e.pageX - containerRef.current.getBoundingClientRect().left - window.scrollX;
539
539
  var _x = mouseX + containerRef.current.scrollLeft;
540
540
  var freeze = (_refs$globalCache$fre = refs.globalCache.freezen) === null || _refs$globalCache$fre === void 0 ? void 0 : _refs$globalCache$fre[context.currentSheetId];
541
- var _fixPositionOnFrozenC = coreMod.fixPositionOnFrozenCells(freeze, _x, 0, mouseX, 0),
541
+ var _fixPositionOnFrozenC = fortuneCore.fixPositionOnFrozenCells(freeze, _x, 0, mouseX, 0),
542
542
  x = _fixPositionOnFrozenC.x,
543
543
  inVerticalFreeze = _fixPositionOnFrozenC.inVerticalFreeze;
544
- var col_location = coreMod.colLocation(x, context.visibledatacolumn);
544
+ var col_location = fortuneCore.colLocation(x, context.visibledatacolumn);
545
545
  var _col_location = _slicedToArray(col_location, 3),
546
546
  col_pre = _col_location[0],
547
547
  col = _col_location[1],
@@ -554,8 +554,8 @@ var ColumnHeader = function ColumnHeader() {
554
554
  });
555
555
  setHoverInFreeze(inVerticalFreeze);
556
556
  }
557
- var flowdata = coreMod.getFlowdata(context);
558
- if (!___default['default'].isNil(flowdata)) allowEditRef.current = coreMod.isAllowEdit(context) && coreMod.isAllowEdit(context, [{
557
+ var flowdata = fortuneCore.getFlowdata(context);
558
+ if (!___default['default'].isNil(flowdata)) allowEditRef.current = fortuneCore.isAllowEdit(context) && fortuneCore.isAllowEdit(context, [{
559
559
  row: [0, flowdata.length - 1],
560
560
  column: col_location
561
561
  }]);
@@ -563,7 +563,7 @@ var ColumnHeader = function ColumnHeader() {
563
563
  var onMouseDown = React.useCallback(function (e) {
564
564
  var nativeEvent = e.nativeEvent;
565
565
  setContext(function (draftCtx) {
566
- coreMod.handleColumnHeaderMouseDown(draftCtx, refs.globalCache, nativeEvent, containerRef.current, refs.cellInput.current, refs.fxInput.current);
566
+ fortuneCore.handleColumnHeaderMouseDown(draftCtx, refs.globalCache, nativeEvent, containerRef.current, refs.cellInput.current, refs.fxInput.current);
567
567
  });
568
568
  }, [refs.globalCache, refs.cellInput, refs.fxInput, setContext]);
569
569
  var onMouseLeave = React.useCallback(function () {
@@ -579,21 +579,21 @@ var ColumnHeader = function ColumnHeader() {
579
579
  var onColSizeHandleMouseDown = React.useCallback(function (e) {
580
580
  var nativeEvent = e.nativeEvent;
581
581
  setContext(function (draftCtx) {
582
- coreMod.handleColSizeHandleMouseDown(draftCtx, refs.globalCache, nativeEvent, containerRef.current, refs.workbookContainer.current, refs.cellArea.current);
582
+ fortuneCore.handleColSizeHandleMouseDown(draftCtx, refs.globalCache, nativeEvent, containerRef.current, refs.workbookContainer.current, refs.cellArea.current);
583
583
  });
584
584
  e.stopPropagation();
585
585
  }, [refs.cellArea, refs.globalCache, refs.workbookContainer, setContext]);
586
586
  var onColFreezeHandleMouseDown = React.useCallback(function (e) {
587
587
  var nativeEvent = e.nativeEvent;
588
588
  setContext(function (draftCtx) {
589
- coreMod.handleColFreezeHandleMouseDown(draftCtx, refs.globalCache, nativeEvent, containerRef.current, refs.workbookContainer.current, refs.cellArea.current);
589
+ fortuneCore.handleColFreezeHandleMouseDown(draftCtx, refs.globalCache, nativeEvent, containerRef.current, refs.workbookContainer.current, refs.cellArea.current);
590
590
  });
591
591
  e.stopPropagation();
592
592
  }, [refs.cellArea, refs.globalCache, refs.workbookContainer, setContext]);
593
593
  var onContextMenu = React.useCallback(function (e) {
594
594
  var nativeEvent = e.nativeEvent;
595
595
  setContext(function (draftCtx) {
596
- coreMod.handleContextMenu(draftCtx, settings, nativeEvent, refs.workbookContainer.current, refs.cellArea.current, "columnHeader");
596
+ fortuneCore.handleContextMenu(draftCtx, settings, nativeEvent, refs.workbookContainer.current, refs.cellArea.current, "columnHeader");
597
597
  });
598
598
  }, [refs.workbookContainer, setContext, settings, refs.cellArea]);
599
599
  React.useEffect(function () {
@@ -603,15 +603,15 @@ var ColumnHeader = function ColumnHeader() {
603
603
  for (var i = 0; i < s.length; i += 1) {
604
604
  var c1 = s[i].column[0];
605
605
  var c2 = s[i].column[1];
606
- columnTitleMap = coreMod.selectTitlesMap(columnTitleMap, c1, c2);
606
+ columnTitleMap = fortuneCore.selectTitlesMap(columnTitleMap, c1, c2);
607
607
  }
608
- var columnTitleRange = coreMod.selectTitlesRange(columnTitleMap);
608
+ var columnTitleRange = fortuneCore.selectTitlesRange(columnTitleMap);
609
609
  var selects = [];
610
610
  for (var j = 0; j < columnTitleRange.length; j += 1) {
611
611
  var _c = columnTitleRange[j][0];
612
612
  var _c2 = columnTitleRange[j][columnTitleRange[j].length - 1];
613
- var col = coreMod.colLocationByIndex(_c2, context.visibledatacolumn)[1];
614
- var col_pre = coreMod.colLocationByIndex(_c, context.visibledatacolumn)[0];
613
+ var col = fortuneCore.colLocationByIndex(_c2, context.visibledatacolumn)[1];
614
+ var col_pre = fortuneCore.colLocationByIndex(_c, context.visibledatacolumn)[0];
615
615
  if (___default['default'].isNumber(col) && ___default['default'].isNumber(col_pre)) {
616
616
  selects.push({
617
617
  col: col,
@@ -657,7 +657,7 @@ var ColumnHeader = function ColumnHeader() {
657
657
  left: hoverLocation.col_pre,
658
658
  width: hoverLocation.col - hoverLocation.col_pre - 1,
659
659
  display: "block"
660
- }, coreMod.fixColumnStyleOverflowInFreeze(context, hoverLocation.col_index, hoverLocation.col_index, (_refs$globalCache$fre2 = refs.globalCache.freezen) === null || _refs$globalCache$fre2 === void 0 ? void 0 : _refs$globalCache$fre2[context.currentSheetId]))
660
+ }, fortuneCore.fixColumnStyleOverflowInFreeze(context, hoverLocation.col_index, hoverLocation.col_index, (_refs$globalCache$fre2 = refs.globalCache.freezen) === null || _refs$globalCache$fre2 === void 0 ? void 0 : _refs$globalCache$fre2[context.currentSheetId]))
661
661
  }, allowEditRef.current && (/*#__PURE__*/React__default['default'].createElement("span", {
662
662
  className: "header-arrow",
663
663
  onClick: function onClick(e) {
@@ -687,7 +687,7 @@ var ColumnHeader = function ColumnHeader() {
687
687
  width: col - col_pre - 1,
688
688
  display: "block",
689
689
  backgroundColor: "rgba(76, 76, 76, 0.1)"
690
- }, coreMod.fixColumnStyleOverflowInFreeze(context, c1, c2, (_refs$globalCache$fre3 = refs.globalCache.freezen) === null || _refs$globalCache$fre3 === void 0 ? void 0 : _refs$globalCache$fre3[context.currentSheetId]))
690
+ }, fortuneCore.fixColumnStyleOverflowInFreeze(context, c1, c2, (_refs$globalCache$fre3 = refs.globalCache.freezen) === null || _refs$globalCache$fre3 === void 0 ? void 0 : _refs$globalCache$fre3[context.currentSheetId]))
691
691
  });
692
692
  }), /*#__PURE__*/React__default['default'].createElement("div", {
693
693
  className: "luckysheet-cols-h-cells luckysheetsheetchange",
@@ -728,13 +728,13 @@ var RowHeader = function RowHeader() {
728
728
  _useState6 = _slicedToArray(_useState5, 2),
729
729
  selectedLocation = _useState6[0],
730
730
  setSelectedLocation = _useState6[1];
731
- var sheetIndex = coreMod.getSheetIndex(context, context.currentSheetId);
731
+ var sheetIndex = fortuneCore.getSheetIndex(context, context.currentSheetId);
732
732
  var sheet = sheetIndex == null ? null : context.luckysheetfile[sheetIndex];
733
733
  var freezeHandleTop = React.useMemo(function () {
734
734
  var _sheet$frozen, _sheet$frozen2, _sheet$frozen3, _sheet$frozen4;
735
735
  if ((sheet === null || sheet === void 0 ? void 0 : (_sheet$frozen = sheet.frozen) === null || _sheet$frozen === void 0 ? void 0 : _sheet$frozen.type) === "row" || (sheet === null || sheet === void 0 ? void 0 : (_sheet$frozen2 = sheet.frozen) === null || _sheet$frozen2 === void 0 ? void 0 : _sheet$frozen2.type) === "rangeRow" || (sheet === null || sheet === void 0 ? void 0 : (_sheet$frozen3 = sheet.frozen) === null || _sheet$frozen3 === void 0 ? void 0 : _sheet$frozen3.type) === "rangeBoth" || (sheet === null || sheet === void 0 ? void 0 : (_sheet$frozen4 = sheet.frozen) === null || _sheet$frozen4 === void 0 ? void 0 : _sheet$frozen4.type) === "both") {
736
736
  var _sheet$frozen5, _sheet$frozen5$range;
737
- return coreMod.rowLocationByIndex((sheet === null || sheet === void 0 ? void 0 : (_sheet$frozen5 = sheet.frozen) === null || _sheet$frozen5 === void 0 ? void 0 : (_sheet$frozen5$range = _sheet$frozen5.range) === null || _sheet$frozen5$range === void 0 ? void 0 : _sheet$frozen5$range.row_focus) || 0, context.visibledatarow)[1] + context.scrollTop;
737
+ return fortuneCore.rowLocationByIndex((sheet === null || sheet === void 0 ? void 0 : (_sheet$frozen5 = sheet.frozen) === null || _sheet$frozen5 === void 0 ? void 0 : (_sheet$frozen5$range = _sheet$frozen5.range) === null || _sheet$frozen5$range === void 0 ? void 0 : _sheet$frozen5$range.row_focus) || 0, context.visibledatarow)[1] + context.scrollTop;
738
738
  }
739
739
  return context.scrollTop;
740
740
  }, [context.visibledatarow, sheet === null || sheet === void 0 ? void 0 : sheet.frozen, context.scrollTop]);
@@ -746,10 +746,10 @@ var RowHeader = function RowHeader() {
746
746
  var mouseY = e.pageY - containerRef.current.getBoundingClientRect().top - window.scrollY;
747
747
  var _y = mouseY + containerRef.current.scrollTop;
748
748
  var freeze = (_refs$globalCache$fre = refs.globalCache.freezen) === null || _refs$globalCache$fre === void 0 ? void 0 : _refs$globalCache$fre[context.currentSheetId];
749
- var _fixPositionOnFrozenC = coreMod.fixPositionOnFrozenCells(freeze, 0, _y, 0, mouseY),
749
+ var _fixPositionOnFrozenC = fortuneCore.fixPositionOnFrozenCells(freeze, 0, _y, 0, mouseY),
750
750
  y = _fixPositionOnFrozenC.y,
751
751
  inHorizontalFreeze = _fixPositionOnFrozenC.inHorizontalFreeze;
752
- var row_location = coreMod.rowLocation(y, context.visibledatarow);
752
+ var row_location = fortuneCore.rowLocation(y, context.visibledatarow);
753
753
  var _row_location = _slicedToArray(row_location, 3),
754
754
  row_pre = _row_location[0],
755
755
  row = _row_location[1],
@@ -766,7 +766,7 @@ var RowHeader = function RowHeader() {
766
766
  var onMouseDown = React.useCallback(function (e) {
767
767
  var nativeEvent = e.nativeEvent;
768
768
  setContext(function (draftCtx) {
769
- coreMod.handleRowHeaderMouseDown(draftCtx, refs.globalCache, nativeEvent, containerRef.current, refs.cellInput.current, refs.fxInput.current);
769
+ fortuneCore.handleRowHeaderMouseDown(draftCtx, refs.globalCache, nativeEvent, containerRef.current, refs.cellInput.current, refs.fxInput.current);
770
770
  });
771
771
  }, [refs.globalCache, refs.cellInput, refs.fxInput, setContext]);
772
772
  var onMouseLeave = React.useCallback(function () {
@@ -782,21 +782,21 @@ var RowHeader = function RowHeader() {
782
782
  var onRowSizeHandleMouseDown = React.useCallback(function (e) {
783
783
  var nativeEvent = e.nativeEvent;
784
784
  setContext(function (draftCtx) {
785
- coreMod.handleRowSizeHandleMouseDown(draftCtx, refs.globalCache, nativeEvent, containerRef.current, refs.workbookContainer.current, refs.cellArea.current);
785
+ fortuneCore.handleRowSizeHandleMouseDown(draftCtx, refs.globalCache, nativeEvent, containerRef.current, refs.workbookContainer.current, refs.cellArea.current);
786
786
  });
787
787
  e.stopPropagation();
788
788
  }, [refs.cellArea, refs.globalCache, refs.workbookContainer, setContext]);
789
789
  var onRowFreezeHandleMouseDown = React.useCallback(function (e) {
790
790
  var nativeEvent = e.nativeEvent;
791
791
  setContext(function (draftCtx) {
792
- coreMod.handleRowFreezeHandleMouseDown(draftCtx, refs.globalCache, nativeEvent, containerRef.current, refs.workbookContainer.current, refs.cellArea.current);
792
+ fortuneCore.handleRowFreezeHandleMouseDown(draftCtx, refs.globalCache, nativeEvent, containerRef.current, refs.workbookContainer.current, refs.cellArea.current);
793
793
  });
794
794
  e.stopPropagation();
795
795
  }, [refs.cellArea, refs.globalCache, refs.workbookContainer, setContext]);
796
796
  var onContextMenu = React.useCallback(function (e) {
797
797
  var nativeEvent = e.nativeEvent;
798
798
  setContext(function (draftCtx) {
799
- coreMod.handleContextMenu(draftCtx, settings, nativeEvent, refs.workbookContainer.current, refs.cellArea.current, "rowHeader");
799
+ fortuneCore.handleContextMenu(draftCtx, settings, nativeEvent, refs.workbookContainer.current, refs.cellArea.current, "rowHeader");
800
800
  });
801
801
  }, [refs.workbookContainer, setContext, settings, refs.cellArea]);
802
802
  React.useEffect(function () {
@@ -805,15 +805,15 @@ var RowHeader = function RowHeader() {
805
805
  for (var i = 0; i < s.length; i += 1) {
806
806
  var r1 = s[i].row[0];
807
807
  var r2 = s[i].row[1];
808
- rowTitleMap = coreMod.selectTitlesMap(rowTitleMap, r1, r2);
808
+ rowTitleMap = fortuneCore.selectTitlesMap(rowTitleMap, r1, r2);
809
809
  }
810
- var rowTitleRange = coreMod.selectTitlesRange(rowTitleMap);
810
+ var rowTitleRange = fortuneCore.selectTitlesRange(rowTitleMap);
811
811
  var selects = [];
812
812
  for (var _i = 0; _i < rowTitleRange.length; _i += 1) {
813
813
  var _r = rowTitleRange[_i][0];
814
814
  var _r2 = rowTitleRange[_i][rowTitleRange[_i].length - 1];
815
- var row = coreMod.rowLocationByIndex(_r2, context.visibledatarow)[1];
816
- var row_pre = coreMod.rowLocationByIndex(_r, context.visibledatarow)[0];
815
+ var row = fortuneCore.rowLocationByIndex(_r2, context.visibledatarow)[1];
816
+ var row_pre = fortuneCore.rowLocationByIndex(_r, context.visibledatarow)[0];
817
817
  if (___default['default'].isNumber(row_pre) && ___default['default'].isNumber(row)) {
818
818
  selects.push({
819
819
  row: row,
@@ -859,7 +859,7 @@ var RowHeader = function RowHeader() {
859
859
  top: hoverLocation.row_pre,
860
860
  height: hoverLocation.row - hoverLocation.row_pre - 1,
861
861
  display: "block"
862
- }, coreMod.fixRowStyleOverflowInFreeze(context, hoverLocation.row_index, hoverLocation.row_index, (_refs$globalCache$fre2 = refs.globalCache.freezen) === null || _refs$globalCache$fre2 === void 0 ? void 0 : _refs$globalCache$fre2[context.currentSheetId]))
862
+ }, fortuneCore.fixRowStyleOverflowInFreeze(context, hoverLocation.row_index, hoverLocation.row_index, (_refs$globalCache$fre2 = refs.globalCache.freezen) === null || _refs$globalCache$fre2 === void 0 ? void 0 : _refs$globalCache$fre2[context.currentSheetId]))
863
863
  })) : null, selectedLocation.map(function (_ref, i) {
864
864
  var _refs$globalCache$fre3;
865
865
  var row = _ref.row,
@@ -874,7 +874,7 @@ var RowHeader = function RowHeader() {
874
874
  height: row - row_pre - 1,
875
875
  display: "block",
876
876
  backgroundColor: "rgba(76, 76, 76, 0.1)"
877
- }, coreMod.fixRowStyleOverflowInFreeze(context, r1, r2, (_refs$globalCache$fre3 = refs.globalCache.freezen) === null || _refs$globalCache$fre3 === void 0 ? void 0 : _refs$globalCache$fre3[context.currentSheetId]))
877
+ }, fortuneCore.fixRowStyleOverflowInFreeze(context, r1, r2, (_refs$globalCache$fre3 = refs.globalCache.freezen) === null || _refs$globalCache$fre3 === void 0 ? void 0 : _refs$globalCache$fre3[context.currentSheetId]))
878
878
  });
879
879
  }), /*#__PURE__*/React__default['default'].createElement("div", {
880
880
  style: {
@@ -963,7 +963,7 @@ var FormulaSearch = function FormulaSearch(props) {
963
963
  var FormulaHint = function FormulaHint(props) {
964
964
  var _useContext = React.useContext(WorkbookContext),
965
965
  context = _useContext.context;
966
- var _locale = coreMod.locale(context),
966
+ var _locale = fortuneCore.locale(context),
967
967
  formulaMore = _locale.formulaMore;
968
968
  if (!context.functionHint) return null;
969
969
  var fn = context.formulaCache.functionlistMap[context.functionHint];
@@ -1086,19 +1086,19 @@ var InputBox = function InputBox() {
1086
1086
  var preText = React.useRef("");
1087
1087
  var inputBoxStyle = React.useMemo(function () {
1088
1088
  if (firstSelection && context.luckysheetCellUpdate.length > 0) {
1089
- var flowdata = coreMod.getFlowdata(context);
1089
+ var flowdata = fortuneCore.getFlowdata(context);
1090
1090
  if (!flowdata) return {};
1091
- return coreMod.getStyleByCell(context, flowdata, firstSelection.row_focus, firstSelection.column_focus);
1091
+ return fortuneCore.getStyleByCell(context, flowdata, firstSelection.row_focus, firstSelection.column_focus);
1092
1092
  }
1093
1093
  return {};
1094
1094
  }, [context.luckysheetfile, context.currentSheetId, context.luckysheetCellUpdate, firstSelection]);
1095
1095
  React.useLayoutEffect(function () {
1096
1096
  if (!context.allowEdit) {
1097
1097
  setContext(function (ctx) {
1098
- var flowdata = coreMod.getFlowdata(ctx);
1098
+ var flowdata = fortuneCore.getFlowdata(ctx);
1099
1099
  if (!___default['default'].isNil(flowdata) && ctx.forceFormulaRef) {
1100
- var value = coreMod.getCellValue(row_index, col_index, flowdata, "f");
1101
- coreMod.createRangeHightlight(ctx, value);
1100
+ var value = fortuneCore.getCellValue(row_index, col_index, flowdata, "f");
1101
+ fortuneCore.createRangeHightlight(ctx, value);
1102
1102
  }
1103
1103
  });
1104
1104
  }
@@ -1111,30 +1111,30 @@ var InputBox = function InputBox() {
1111
1111
  if (___default['default'].isEqual(prevCellUpdate, context.luckysheetCellUpdate) && prevSheetId === context.currentSheetId) {
1112
1112
  return;
1113
1113
  }
1114
- var flowdata = coreMod.getFlowdata(context);
1114
+ var flowdata = fortuneCore.getFlowdata(context);
1115
1115
  var cell = flowdata === null || flowdata === void 0 ? void 0 : (_flowdata$row_index = flowdata[row_index]) === null || _flowdata$row_index === void 0 ? void 0 : _flowdata$row_index[col_index];
1116
1116
  var value = "";
1117
1117
  if (cell && !refs.globalCache.overwriteCell) {
1118
- if (coreMod.isInlineStringCell(cell)) {
1119
- value = coreMod.getInlineStringHTML(row_index, col_index, flowdata);
1118
+ if (fortuneCore.isInlineStringCell(cell)) {
1119
+ value = fortuneCore.getInlineStringHTML(row_index, col_index, flowdata);
1120
1120
  } else if (cell.f) {
1121
- value = coreMod.getCellValue(row_index, col_index, flowdata, "f");
1121
+ value = fortuneCore.getCellValue(row_index, col_index, flowdata, "f");
1122
1122
  setContext(function (ctx) {
1123
- coreMod.createRangeHightlight(ctx, value);
1123
+ fortuneCore.createRangeHightlight(ctx, value);
1124
1124
  });
1125
1125
  } else {
1126
- value = coreMod.valueShowEs(row_index, col_index, flowdata);
1126
+ value = fortuneCore.valueShowEs(row_index, col_index, flowdata);
1127
1127
  if (Number(cell.qp) === 1) {
1128
1128
  value = value ? "".concat(value) : value;
1129
1129
  }
1130
1130
  }
1131
1131
  }
1132
1132
  refs.globalCache.overwriteCell = false;
1133
- if (!refs.globalCache.ignoreWriteCell) inputRef.current.innerHTML = coreMod.escapeHTMLTag(coreMod.escapeScriptTag(value));
1133
+ if (!refs.globalCache.ignoreWriteCell) inputRef.current.innerHTML = fortuneCore.escapeHTMLTag(fortuneCore.escapeScriptTag(value));
1134
1134
  refs.globalCache.ignoreWriteCell = false;
1135
1135
  if (!refs.globalCache.doNotFocus) {
1136
1136
  setTimeout(function () {
1137
- coreMod.moveToEnd(inputRef.current);
1137
+ fortuneCore.moveToEnd(inputRef.current);
1138
1138
  });
1139
1139
  }
1140
1140
  delete refs.globalCache.doNotFocus;
@@ -1148,7 +1148,7 @@ var InputBox = function InputBox() {
1148
1148
  }
1149
1149
  }, [context.luckysheetCellUpdate]);
1150
1150
  React.useEffect(function () {
1151
- setIsHidenRC(coreMod.isShowHidenCR(context));
1151
+ setIsHidenRC(fortuneCore.isShowHidenCR(context));
1152
1152
  }, [context.luckysheet_select_save]);
1153
1153
  var getActiveFormula = React.useCallback(function () {
1154
1154
  return document.querySelector(".luckysheet-formula-search-item-active");
@@ -1167,7 +1167,7 @@ var InputBox = function InputBox() {
1167
1167
  var textEditor = document.getElementById("luckysheet-rich-text-editor");
1168
1168
  if (textEditor) {
1169
1169
  var _getrangeseleciton;
1170
- var searchTxt = ((_getrangeseleciton = coreMod.getrangeseleciton()) === null || _getrangeseleciton === void 0 ? void 0 : _getrangeseleciton.textContent) || "";
1170
+ var searchTxt = ((_getrangeseleciton = fortuneCore.getrangeseleciton()) === null || _getrangeseleciton === void 0 ? void 0 : _getrangeseleciton.textContent) || "";
1171
1171
  var deleteCount = searchTxt.length;
1172
1172
  textEditor.focus();
1173
1173
  var selection = window.getSelection();
@@ -1206,8 +1206,8 @@ var InputBox = function InputBox() {
1206
1206
  preText.current = inputRef.current.innerText;
1207
1207
  if (e.key === "Escape" && context.luckysheetCellUpdate.length > 0) {
1208
1208
  setContext(function (draftCtx) {
1209
- coreMod.cancelNormalSelected(draftCtx);
1210
- coreMod.moveHighlightCell(draftCtx, "down", 0, "rangeOfSelect");
1209
+ fortuneCore.cancelNormalSelected(draftCtx);
1210
+ fortuneCore.moveHighlightCell(draftCtx, "down", 0, "rangeOfSelect");
1211
1211
  });
1212
1212
  e.preventDefault();
1213
1213
  } else if (e.key === "Enter" && context.luckysheetCellUpdate.length > 0) {
@@ -1258,11 +1258,11 @@ var InputBox = function InputBox() {
1258
1258
  if (!kcode) return;
1259
1259
  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) {
1260
1260
  setContext(function (draftCtx) {
1261
- if ((draftCtx.formulaCache.rangestart || draftCtx.formulaCache.rangedrag_column_start || draftCtx.formulaCache.rangedrag_row_start || coreMod.israngeseleciton(draftCtx)) && isBlur) return;
1262
- if (!coreMod.isAllowEdit(draftCtx, draftCtx.luckysheet_select_save)) {
1261
+ if ((draftCtx.formulaCache.rangestart || draftCtx.formulaCache.rangedrag_column_start || draftCtx.formulaCache.rangedrag_row_start || fortuneCore.israngeseleciton(draftCtx)) && isBlur) return;
1262
+ if (!fortuneCore.isAllowEdit(draftCtx, draftCtx.luckysheet_select_save)) {
1263
1263
  return;
1264
1264
  }
1265
- coreMod.handleFormulaInput(draftCtx, refs.fxInput.current, refs.cellInput.current, kcode, preText.current);
1265
+ fortuneCore.handleFormulaInput(draftCtx, refs.fxInput.current, refs.cellInput.current, kcode, preText.current);
1266
1266
  });
1267
1267
  }
1268
1268
  }, [refs.cellInput, refs.fxInput, setContext]);
@@ -1381,7 +1381,7 @@ var Dialog = function Dialog(_ref) {
1381
1381
  contentStyle = _ref.contentStyle;
1382
1382
  var _useContext = React.useContext(WorkbookContext),
1383
1383
  context = _useContext.context;
1384
- var _locale = coreMod.locale(context),
1384
+ var _locale = fortuneCore.locale(context),
1385
1385
  button = _locale.button;
1386
1386
  return /*#__PURE__*/React__default['default'].createElement("div", {
1387
1387
  className: "fortune-dialog",
@@ -1508,7 +1508,7 @@ var SearchReplace = function SearchReplace(_ref) {
1508
1508
  context = _useContext.context,
1509
1509
  setContext = _useContext.setContext,
1510
1510
  refs = _useContext.refs;
1511
- var _locale = coreMod.locale(context),
1511
+ var _locale = fortuneCore.locale(context),
1512
1512
  findAndReplace = _locale.findAndReplace,
1513
1513
  button = _locale.button;
1514
1514
  var _useState = React.useState(""),
@@ -1572,7 +1572,7 @@ var SearchReplace = function SearchReplace(_ref) {
1572
1572
  },
1573
1573
  onMouseDown: function onMouseDown(e) {
1574
1574
  var nativeEvent = e.nativeEvent;
1575
- coreMod.onSearchDialogMoveStart(refs.globalCache, nativeEvent, getContainer());
1575
+ fortuneCore.onSearchDialogMoveStart(refs.globalCache, nativeEvent, getContainer());
1576
1576
  e.stopPropagation();
1577
1577
  }
1578
1578
  }, /*#__PURE__*/React__default['default'].createElement("div", {
@@ -1670,7 +1670,7 @@ var SearchReplace = function SearchReplace(_ref) {
1670
1670
  onClick: function onClick() {
1671
1671
  setContext(function (draftCtx) {
1672
1672
  setSelectedCell(undefined);
1673
- var alertMsg = coreMod.replaceAll(draftCtx, searchText, replaceText, checkMode);
1673
+ var alertMsg = fortuneCore.replaceAll(draftCtx, searchText, replaceText, checkMode);
1674
1674
  showAlert(alertMsg);
1675
1675
  });
1676
1676
  },
@@ -1681,7 +1681,7 @@ var SearchReplace = function SearchReplace(_ref) {
1681
1681
  onClick: function onClick() {
1682
1682
  return setContext(function (draftCtx) {
1683
1683
  setSelectedCell(undefined);
1684
- var alertMsg = coreMod.replace(draftCtx, searchText, replaceText, checkMode);
1684
+ var alertMsg = fortuneCore.replace(draftCtx, searchText, replaceText, checkMode);
1685
1685
  if (alertMsg != null) {
1686
1686
  showAlert(alertMsg);
1687
1687
  }
@@ -1695,7 +1695,7 @@ var SearchReplace = function SearchReplace(_ref) {
1695
1695
  return setContext(function (draftCtx) {
1696
1696
  setSelectedCell(undefined);
1697
1697
  if (!searchText) return;
1698
- var res = coreMod.searchAll(draftCtx, searchText, checkMode);
1698
+ var res = fortuneCore.searchAll(draftCtx, searchText, checkMode);
1699
1699
  setSearchResult(res);
1700
1700
  if (___default['default'].isEmpty(res)) showAlert(findAndReplace.noFindTip);
1701
1701
  });
@@ -1707,7 +1707,7 @@ var SearchReplace = function SearchReplace(_ref) {
1707
1707
  onClick: function onClick() {
1708
1708
  return setContext(function (draftCtx) {
1709
1709
  setSearchResult([]);
1710
- var alertMsg = coreMod.searchNext(draftCtx, searchText, checkMode);
1710
+ var alertMsg = fortuneCore.searchNext(draftCtx, searchText, checkMode);
1711
1711
  if (alertMsg != null) showAlert(alertMsg);
1712
1712
  });
1713
1713
  },
@@ -1731,11 +1731,11 @@ var SearchReplace = function SearchReplace(_ref) {
1731
1731
  key: v.cellPosition,
1732
1732
  onClick: function onClick() {
1733
1733
  setContext(function (draftCtx) {
1734
- draftCtx.luckysheet_select_save = coreMod.normalizeSelection(draftCtx, [{
1734
+ draftCtx.luckysheet_select_save = fortuneCore.normalizeSelection(draftCtx, [{
1735
1735
  row: [v.r, v.r],
1736
1736
  column: [v.c, v.c]
1737
1737
  }]);
1738
- coreMod.scrollToHighlightCell(draftCtx, v.r, v.c);
1738
+ fortuneCore.scrollToHighlightCell(draftCtx, v.r, v.c);
1739
1739
  });
1740
1740
  setSelectedCell({
1741
1741
  r: v.r,
@@ -1773,16 +1773,16 @@ var LinkEditCard = function LinkEditCard(_ref) {
1773
1773
  _useState6 = _slicedToArray(_useState5, 2),
1774
1774
  linkType = _useState6[0],
1775
1775
  setLinkType = _useState6[1];
1776
- var _locale = coreMod.locale(context),
1776
+ var _locale = fortuneCore.locale(context),
1777
1777
  insertLink = _locale.insertLink,
1778
1778
  linkTypeList = _locale.linkTypeList,
1779
1779
  button = _locale.button;
1780
- var lastCell = React.useRef(coreMod.normalizeSelection(context, [{
1780
+ var lastCell = React.useRef(fortuneCore.normalizeSelection(context, [{
1781
1781
  row: [r, r],
1782
1782
  column: [c, c]
1783
1783
  }]));
1784
1784
  var skipCellRangeSet = React.useRef(true);
1785
- var isLinkAddressValid = coreMod.isLinkValid(context, linkType, linkAddress);
1785
+ var isLinkAddressValid = fortuneCore.isLinkValid(context, linkType, linkAddress);
1786
1786
  var tooltip = /*#__PURE__*/React__default['default'].createElement("div", {
1787
1787
  className: "validation-input-tip"
1788
1788
  }, isLinkAddressValid.tooltip);
@@ -1867,7 +1867,7 @@ var LinkEditCard = function LinkEditCard(_ref) {
1867
1867
  if (selectingCellRange) {
1868
1868
  var len = ___default['default'].size(context.luckysheet_select_save);
1869
1869
  if (len > 0) {
1870
- setLinkAddress(coreMod.getRangetxt(context, context.currentSheetId, context.luckysheet_select_save[len - 1], ""));
1870
+ setLinkAddress(fortuneCore.getRangetxt(context, context.currentSheetId, context.luckysheet_select_save[len - 1], ""));
1871
1871
  }
1872
1872
  }
1873
1873
  }, [context, selectingCellRange]);
@@ -1885,11 +1885,11 @@ var LinkEditCard = function LinkEditCard(_ref) {
1885
1885
  className: "link-content",
1886
1886
  onClick: function onClick() {
1887
1887
  setContext(function (draftCtx) {
1888
- return coreMod.goToLink(draftCtx, r, c, linkType, linkAddress, refs.scrollbarX.current, refs.scrollbarY.current);
1888
+ return fortuneCore.goToLink(draftCtx, r, c, linkType, linkAddress, refs.scrollbarX.current, refs.scrollbarY.current);
1889
1889
  });
1890
1890
  },
1891
1891
  tabIndex: 0
1892
- }, linkType === "webpage" ? insertLink.openLink : coreMod.replaceHtml(insertLink.goTo, {
1892
+ }, linkType === "webpage" ? insertLink.openLink : fortuneCore.replaceHtml(insertLink.goTo, {
1893
1893
  linkAddress: linkAddress
1894
1894
  })), context.allowEdit === true && /*#__PURE__*/React__default['default'].createElement("div", {
1895
1895
  className: "divider"
@@ -1907,7 +1907,7 @@ var LinkEditCard = function LinkEditCard(_ref) {
1907
1907
  }), context.allowEdit === true && renderToolbarButton("unlink", function () {
1908
1908
  return setContext(function (draftCtx) {
1909
1909
  ___default['default'].set(refs.globalCache, "linkCard.mouseEnter", false);
1910
- coreMod.removeHyperlink(draftCtx, r, c);
1910
+ fortuneCore.removeHyperlink(draftCtx, r, c);
1911
1911
  });
1912
1912
  }));
1913
1913
  }
@@ -1920,7 +1920,7 @@ var LinkEditCard = function LinkEditCard(_ref) {
1920
1920
  }, ___default['default'].omit(containerEvent, ["onMouseDown", "onMouseMove", "onMouseUp"])), {}, {
1921
1921
  onMouseDown: function onMouseDown(e) {
1922
1922
  var nativeEvent = e.nativeEvent;
1923
- coreMod.onRangeSelectionModalMoveStart(context, refs.globalCache, nativeEvent);
1923
+ fortuneCore.onRangeSelectionModalMoveStart(context, refs.globalCache, nativeEvent);
1924
1924
  e.stopPropagation();
1925
1925
  }
1926
1926
  }), /*#__PURE__*/React__default['default'].createElement("div", {
@@ -2037,7 +2037,7 @@ var LinkEditCard = function LinkEditCard(_ref) {
2037
2037
  if (!isLinkAddressValid.isValid) return;
2038
2038
  ___default['default'].set(refs.globalCache, "linkCard.mouseEnter", false);
2039
2039
  setContext(function (draftCtx) {
2040
- return coreMod.saveHyperlink(draftCtx, r, c, linkText, linkType, linkAddress);
2040
+ return fortuneCore.saveHyperlink(draftCtx, r, c, linkText, linkType, linkAddress);
2041
2041
  });
2042
2042
  }, hideLinkCard))));
2043
2043
  };
@@ -2054,17 +2054,17 @@ var FilterOptions = function FilterOptions(_ref) {
2054
2054
  filter = context.filter,
2055
2055
  visibledatarow = context.visibledatarow,
2056
2056
  visibledatacolumn = context.visibledatacolumn;
2057
- var sheetIndex = coreMod.getSheetIndex(context, context.currentSheetId);
2057
+ var sheetIndex = fortuneCore.getSheetIndex(context, context.currentSheetId);
2058
2058
  var _context$luckysheetfi = context.luckysheetfile[sheetIndex],
2059
2059
  filter_select = _context$luckysheetfi.filter_select,
2060
2060
  frozen = _context$luckysheetfi.frozen;
2061
2061
  React.useEffect(function () {
2062
2062
  setContext(function (draftCtx) {
2063
- var sheetIdx = coreMod.getSheetIndex(draftCtx, draftCtx.currentSheetId);
2063
+ var sheetIdx = fortuneCore.getSheetIndex(draftCtx, draftCtx.currentSheetId);
2064
2064
  if (sheetIdx == null) return;
2065
2065
  draftCtx.luckysheet_filter_save = draftCtx.luckysheetfile[sheetIdx].filter_select;
2066
2066
  draftCtx.filter = draftCtx.luckysheetfile[sheetIdx].filter || {};
2067
- coreMod.createFilterOptions(draftCtx, draftCtx.luckysheet_filter_save, undefined);
2067
+ fortuneCore.createFilterOptions(draftCtx, draftCtx.luckysheet_filter_save, undefined);
2068
2068
  });
2069
2069
  }, [visibledatarow, visibledatacolumn, setContext, currentSheetId, filter_select]);
2070
2070
  var showFilterContextMenu = React.useCallback(function (v, i) {
@@ -2107,12 +2107,12 @@ var FilterOptions = function FilterOptions(_ref) {
2107
2107
  top: filterOptions.top,
2108
2108
  height: filterOptions.height,
2109
2109
  display: "block"
2110
- }, coreMod.fixRowStyleOverflowInFreeze(context, filterOptions.startRow, filterOptions.endRow, (_refs$globalCache$fre = refs.globalCache.freezen) === null || _refs$globalCache$fre === void 0 ? void 0 : _refs$globalCache$fre[context.currentSheetId]), coreMod.fixColumnStyleOverflowInFreeze(context, filterOptions.startCol, filterOptions.endCol, (_refs$globalCache$fre2 = refs.globalCache.freezen) === null || _refs$globalCache$fre2 === void 0 ? void 0 : _refs$globalCache$fre2[context.currentSheetId]))
2110
+ }, fortuneCore.fixRowStyleOverflowInFreeze(context, filterOptions.startRow, filterOptions.endRow, (_refs$globalCache$fre = refs.globalCache.freezen) === null || _refs$globalCache$fre === void 0 ? void 0 : _refs$globalCache$fre[context.currentSheetId]), fortuneCore.fixColumnStyleOverflowInFreeze(context, filterOptions.startCol, filterOptions.endCol, (_refs$globalCache$fre2 = refs.globalCache.freezen) === null || _refs$globalCache$fre2 === void 0 ? void 0 : _refs$globalCache$fre2[context.currentSheetId]))
2111
2111
  }), filterOptions.items.map(function (v, i) {
2112
2112
  var _refs$globalCache$fre3, _refs$globalCache$fre4;
2113
2113
  var filterParam = filter[i];
2114
- var columnOverflowFreezeStyle = coreMod.fixColumnStyleOverflowInFreeze(context, i + filterOptions.startCol, i + filterOptions.startCol, (_refs$globalCache$fre3 = refs.globalCache.freezen) === null || _refs$globalCache$fre3 === void 0 ? void 0 : _refs$globalCache$fre3[context.currentSheetId]);
2115
- var rowOverflowFreezeStyle = coreMod.fixRowStyleOverflowInFreeze(context, filterOptions.startRow, filterOptions.startRow, (_refs$globalCache$fre4 = refs.globalCache.freezen) === null || _refs$globalCache$fre4 === void 0 ? void 0 : _refs$globalCache$fre4[context.currentSheetId]);
2114
+ var columnOverflowFreezeStyle = fortuneCore.fixColumnStyleOverflowInFreeze(context, i + filterOptions.startCol, i + filterOptions.startCol, (_refs$globalCache$fre3 = refs.globalCache.freezen) === null || _refs$globalCache$fre3 === void 0 ? void 0 : _refs$globalCache$fre3[context.currentSheetId]);
2115
+ var rowOverflowFreezeStyle = fortuneCore.fixRowStyleOverflowInFreeze(context, filterOptions.startRow, filterOptions.startRow, (_refs$globalCache$fre4 = refs.globalCache.freezen) === null || _refs$globalCache$fre4 === void 0 ? void 0 : _refs$globalCache$fre4[context.currentSheetId]);
2116
2116
  var col = visibledatacolumn[v.col];
2117
2117
  var col_pre = v.col > 0 ? visibledatacolumn[v.col - 1] : 0;
2118
2118
  var left = v.col <= frozenColumns && columnOverflowFreezeStyle.left ? columnOverflowFreezeStyle.left + col - col_pre - 20 : v.left;
@@ -2194,7 +2194,7 @@ var ImgBoxs = function ImgBoxs() {
2194
2194
  },
2195
2195
  onMouseDown: function onMouseDown(e) {
2196
2196
  var nativeEvent = e.nativeEvent;
2197
- coreMod.onImageMoveStart(context, refs.globalCache, nativeEvent);
2197
+ fortuneCore.onImageMoveStart(context, refs.globalCache, nativeEvent);
2198
2198
  e.stopPropagation();
2199
2199
  }
2200
2200
  }), /*#__PURE__*/React__default['default'].createElement("div", {
@@ -2206,7 +2206,7 @@ var ImgBoxs = function ImgBoxs() {
2206
2206
  "data-type": v,
2207
2207
  onMouseDown: function onMouseDown(e) {
2208
2208
  var nativeEvent = e.nativeEvent;
2209
- coreMod.onImageResizeStart(refs.globalCache, nativeEvent, v);
2209
+ fortuneCore.onImageResizeStart(refs.globalCache, nativeEvent, v);
2210
2210
  e.stopPropagation();
2211
2211
  }
2212
2212
  });
@@ -2374,7 +2374,7 @@ var NotationBoxes = function NotationBoxes() {
2374
2374
  context = _useContext.context,
2375
2375
  setContext = _useContext.setContext,
2376
2376
  refs = _useContext.refs;
2377
- var flowdata = coreMod.getFlowdata(context);
2377
+ var flowdata = fortuneCore.getFlowdata(context);
2378
2378
  React.useEffect(function () {
2379
2379
  if (flowdata) {
2380
2380
  var psShownCells = [];
@@ -2392,7 +2392,7 @@ var NotationBoxes = function NotationBoxes() {
2392
2392
  }
2393
2393
  }
2394
2394
  setContext(function (ctx) {
2395
- return coreMod.showComments(ctx, psShownCells);
2395
+ return fortuneCore.showComments(ctx, psShownCells);
2396
2396
  });
2397
2397
  }
2398
2398
  }, [flowdata, setContext]);
@@ -2450,10 +2450,10 @@ var NotationBoxes = function NotationBoxes() {
2450
2450
  var nativeEvent = e.nativeEvent;
2451
2451
  setContext(function (draftContext) {
2452
2452
  if (flowdata) {
2453
- coreMod.setEditingComment(draftContext, flowdata, r, c);
2453
+ fortuneCore.setEditingComment(draftContext, flowdata, r, c);
2454
2454
  }
2455
2455
  });
2456
- coreMod.onCommentBoxMoveStart(context, refs.globalCache, nativeEvent, {
2456
+ fortuneCore.onCommentBoxMoveStart(context, refs.globalCache, nativeEvent, {
2457
2457
  r: r,
2458
2458
  c: c,
2459
2459
  rc: rc
@@ -2477,7 +2477,7 @@ var NotationBoxes = function NotationBoxes() {
2477
2477
  "data-type": v,
2478
2478
  onMouseDown: function onMouseDown(e) {
2479
2479
  var nativeEvent = e.nativeEvent;
2480
- coreMod.onCommentBoxResizeStart(context, refs.globalCache, nativeEvent, {
2480
+ fortuneCore.onCommentBoxResizeStart(context, refs.globalCache, nativeEvent, {
2481
2481
  r: r,
2482
2482
  c: c,
2483
2483
  rc: rc
@@ -2517,7 +2517,7 @@ var NotationBoxes = function NotationBoxes() {
2517
2517
  onMouseDown: function onMouseDown(e) {
2518
2518
  setContext(function (draftContext) {
2519
2519
  if (flowdata) {
2520
- coreMod.setEditingComment(draftContext, flowdata, r, c);
2520
+ fortuneCore.setEditingComment(draftContext, flowdata, r, c);
2521
2521
  }
2522
2522
  });
2523
2523
  e.stopPropagation();
@@ -2557,7 +2557,7 @@ var DataVerification = function DataVerification() {
2557
2557
  var _useDialog = useDialog(),
2558
2558
  showDialog = _useDialog.showDialog,
2559
2559
  hideDialog = _useDialog.hideDialog;
2560
- var _locale = coreMod.locale(context),
2560
+ var _locale = fortuneCore.locale(context),
2561
2561
  dataVerification = _locale.dataVerification,
2562
2562
  toolbar = _locale.toolbar,
2563
2563
  button = _locale.button,
@@ -2579,10 +2579,10 @@ var DataVerification = function DataVerification() {
2579
2579
  var btn = React.useCallback(function (type) {
2580
2580
  if (type === "confirm") {
2581
2581
  setContext(function (ctx) {
2582
- var isPass = coreMod.confirmMessage(ctx, generalDialog, dataVerification);
2582
+ var isPass = fortuneCore.confirmMessage(ctx, generalDialog, dataVerification);
2583
2583
  if (isPass) {
2584
2584
  var _ctx$dataVerification, _ctx$dataVerification2, _ctx$luckysheetfile$g;
2585
- var range = coreMod.getRangeByTxt(ctx, (_ctx$dataVerification = ctx.dataVerification) === null || _ctx$dataVerification === void 0 ? void 0 : (_ctx$dataVerification2 = _ctx$dataVerification.dataRegulation) === null || _ctx$dataVerification2 === void 0 ? void 0 : _ctx$dataVerification2.rangeTxt);
2585
+ var range = fortuneCore.getRangeByTxt(ctx, (_ctx$dataVerification = ctx.dataVerification) === null || _ctx$dataVerification === void 0 ? void 0 : (_ctx$dataVerification2 = _ctx$dataVerification.dataRegulation) === null || _ctx$dataVerification2 === void 0 ? void 0 : _ctx$dataVerification2.rangeTxt);
2586
2586
  if (range.length === 0) {
2587
2587
  return;
2588
2588
  }
@@ -2593,37 +2593,37 @@ var DataVerification = function DataVerification() {
2593
2593
  checked: false
2594
2594
  });
2595
2595
  if (verifacationT === "dropdown") {
2596
- var list = coreMod.getDropdownList(ctx, value1);
2596
+ var list = fortuneCore.getDropdownList(ctx, value1);
2597
2597
  item.value1 = list.join(",");
2598
2598
  }
2599
- var currentDataVerification = (_ctx$luckysheetfile$g = ctx.luckysheetfile[coreMod.getSheetIndex(ctx, ctx.currentSheetId)].dataVerification) !== null && _ctx$luckysheetfile$g !== void 0 ? _ctx$luckysheetfile$g : {};
2599
+ var currentDataVerification = (_ctx$luckysheetfile$g = ctx.luckysheetfile[fortuneCore.getSheetIndex(ctx, ctx.currentSheetId)].dataVerification) !== null && _ctx$luckysheetfile$g !== void 0 ? _ctx$luckysheetfile$g : {};
2600
2600
  var str = range[range.length - 1].row[0];
2601
2601
  var edr = range[range.length - 1].row[1];
2602
2602
  var stc = range[range.length - 1].column[0];
2603
2603
  var edc = range[range.length - 1].column[1];
2604
- var d = coreMod.getFlowdata(ctx);
2604
+ var d = fortuneCore.getFlowdata(ctx);
2605
2605
  if (!d) return;
2606
2606
  for (var r = str; r <= edr; r += 1) {
2607
2607
  for (var c = stc; c <= edc; c += 1) {
2608
2608
  var key = "".concat(r, "_").concat(c);
2609
2609
  currentDataVerification[key] = item;
2610
2610
  if (regulation.type === "checkbox") {
2611
- coreMod.setCellValue(ctx, r, c, d, item.value2);
2611
+ fortuneCore.setCellValue(ctx, r, c, d, item.value2);
2612
2612
  }
2613
2613
  }
2614
2614
  }
2615
- ctx.luckysheetfile[coreMod.getSheetIndex(ctx, ctx.currentSheetId)].dataVerification = currentDataVerification;
2615
+ ctx.luckysheetfile[fortuneCore.getSheetIndex(ctx, ctx.currentSheetId)].dataVerification = currentDataVerification;
2616
2616
  }
2617
2617
  });
2618
2618
  } else if (type === "delete") {
2619
2619
  setContext(function (ctx) {
2620
2620
  var _ctx$dataVerification3, _ctx$dataVerification4, _ctx$luckysheetfile$g2;
2621
- var range = coreMod.getRangeByTxt(ctx, (_ctx$dataVerification3 = ctx.dataVerification) === null || _ctx$dataVerification3 === void 0 ? void 0 : (_ctx$dataVerification4 = _ctx$dataVerification3.dataRegulation) === null || _ctx$dataVerification4 === void 0 ? void 0 : _ctx$dataVerification4.rangeTxt);
2621
+ var range = fortuneCore.getRangeByTxt(ctx, (_ctx$dataVerification3 = ctx.dataVerification) === null || _ctx$dataVerification3 === void 0 ? void 0 : (_ctx$dataVerification4 = _ctx$dataVerification3.dataRegulation) === null || _ctx$dataVerification4 === void 0 ? void 0 : _ctx$dataVerification4.rangeTxt);
2622
2622
  if (range.length === 0) {
2623
2623
  showDialog(generalDialog.noSeletionError, "ok");
2624
2624
  return;
2625
2625
  }
2626
- var currentDataVerification = (_ctx$luckysheetfile$g2 = ctx.luckysheetfile[coreMod.getSheetIndex(ctx, ctx.currentSheetId)].dataVerification) !== null && _ctx$luckysheetfile$g2 !== void 0 ? _ctx$luckysheetfile$g2 : {};
2626
+ var currentDataVerification = (_ctx$luckysheetfile$g2 = ctx.luckysheetfile[fortuneCore.getSheetIndex(ctx, ctx.currentSheetId)].dataVerification) !== null && _ctx$luckysheetfile$g2 !== void 0 ? _ctx$luckysheetfile$g2 : {};
2627
2627
  var str = range[range.length - 1].row[0];
2628
2628
  var edr = range[range.length - 1].row[1];
2629
2629
  var stc = range[range.length - 1].column[0];
@@ -2642,9 +2642,9 @@ var DataVerification = function DataVerification() {
2642
2642
  var rangeT = "";
2643
2643
  if (ctx.luckysheet_select_save) {
2644
2644
  var range = ctx.luckysheet_select_save[ctx.luckysheet_select_save.length - 1];
2645
- rangeT = coreMod.getRangetxt(context, context.currentSheetId, range, context.currentSheetId);
2645
+ rangeT = fortuneCore.getRangetxt(context, context.currentSheetId, range, context.currentSheetId);
2646
2646
  }
2647
- var index = coreMod.getSheetIndex(ctx, ctx.currentSheetId);
2647
+ var index = fortuneCore.getSheetIndex(ctx, ctx.currentSheetId);
2648
2648
  var ctxDataVerification = ctx.luckysheetfile[index].dataVerification;
2649
2649
  if (ctxDataVerification) {
2650
2650
  var _defaultItem$value, _ctx$rangeDialog, _ctx$rangeDialog2;
@@ -3061,7 +3061,7 @@ var ConditionRules = function ConditionRules(_ref) {
3061
3061
  setContext = _useContext.setContext;
3062
3062
  var _useDialog = useDialog(),
3063
3063
  hideDialog = _useDialog.hideDialog;
3064
- var _locale = coreMod.locale(context),
3064
+ var _locale = fortuneCore.locale(context),
3065
3065
  conditionformat = _locale.conditionformat,
3066
3066
  button = _locale.button,
3067
3067
  protection = _locale.protection,
@@ -3078,7 +3078,7 @@ var ConditionRules = function ConditionRules(_ref) {
3078
3078
  setContext(function (ctx) {
3079
3079
  ctx.conditionRules.textColor.color = colorRules.textColor;
3080
3080
  ctx.conditionRules.cellColor.color = colorRules.cellColor;
3081
- coreMod.setConditionRules(ctx, protection, generalDialog, conditionformat, ctx.conditionRules);
3081
+ fortuneCore.setConditionRules(ctx, protection, generalDialog, conditionformat, ctx.conditionRules);
3082
3082
  });
3083
3083
  }
3084
3084
  setContext(function (ctx) {
@@ -3307,7 +3307,7 @@ var RangeDialog = function RangeDialog() {
3307
3307
  setContext = _useContext.setContext;
3308
3308
  var _useDialog = useDialog(),
3309
3309
  showDialog = _useDialog.showDialog;
3310
- var _locale = coreMod.locale(context),
3310
+ var _locale = fortuneCore.locale(context),
3311
3311
  dataVerification = _locale.dataVerification,
3312
3312
  button = _locale.button;
3313
3313
  var _useState = React.useState((_context$rangeDialog$ = (_context$rangeDialog = context.rangeDialog) === null || _context$rangeDialog === void 0 ? void 0 : _context$rangeDialog.rangeTxt) !== null && _context$rangeDialog$ !== void 0 ? _context$rangeDialog$ : ""),
@@ -3340,7 +3340,7 @@ var RangeDialog = function RangeDialog() {
3340
3340
  setRangeTxt2(function (r) {
3341
3341
  if (context.luckysheet_select_save) {
3342
3342
  var range = context.luckysheet_select_save[context.luckysheet_select_save.length - 1];
3343
- r = coreMod.getRangetxt(context, context.currentSheetId, range, context.currentSheetId);
3343
+ r = fortuneCore.getRangetxt(context, context.currentSheetId, range, context.currentSheetId);
3344
3344
  return r;
3345
3345
  }
3346
3346
  return "";
@@ -3441,20 +3441,20 @@ var DropDownList = function DropDownList() {
3441
3441
  if (rowIndex == null || colIndex == null) return;
3442
3442
  var row = context.visibledatarow[rowIndex];
3443
3443
  var col_pre = colIndex === 0 ? 0 : context.visibledatacolumn[colIndex - 1];
3444
- var d = coreMod.getFlowdata(context);
3444
+ var d = fortuneCore.getFlowdata(context);
3445
3445
  if (!d) return;
3446
- var margeSet = coreMod.mergeBorder(context, d, rowIndex, colIndex);
3446
+ var margeSet = fortuneCore.mergeBorder(context, d, rowIndex, colIndex);
3447
3447
  if (margeSet) {
3448
3448
  var _margeSet$row = _slicedToArray(margeSet.row, 2);
3449
3449
  row = _margeSet$row[1];
3450
3450
  var _margeSet$column = _slicedToArray(margeSet.column, 2);
3451
3451
  col_pre = _margeSet$column[0];
3452
3452
  }
3453
- var index = coreMod.getSheetIndex(context, context.currentSheetId);
3453
+ var index = fortuneCore.getSheetIndex(context, context.currentSheetId);
3454
3454
  var dataVerification = context.luckysheetfile[index].dataVerification;
3455
3455
  var item = dataVerification["".concat(rowIndex, "_").concat(colIndex)];
3456
- var dropdownList = coreMod.getDropdownList(context, item.value1);
3457
- var cellValue = coreMod.getCellValue(rowIndex, colIndex, d);
3456
+ var dropdownList = fortuneCore.getDropdownList(context, item.value1);
3457
+ var cellValue = fortuneCore.getCellValue(rowIndex, colIndex, d);
3458
3458
  if (cellValue) {
3459
3459
  setSelected(cellValue.toString().split(","));
3460
3460
  }
@@ -3471,13 +3471,13 @@ var DropDownList = function DropDownList() {
3471
3471
  var rowIndex = last.row_focus;
3472
3472
  var colIndex = last.column_focus;
3473
3473
  if (rowIndex == null || colIndex == null) return;
3474
- var index = coreMod.getSheetIndex(context, context.currentSheetId);
3474
+ var index = fortuneCore.getSheetIndex(context, context.currentSheetId);
3475
3475
  var dataVerification = context.luckysheetfile[index].dataVerification;
3476
3476
  var item = dataVerification["".concat(rowIndex, "_").concat(colIndex)];
3477
3477
  if (item.type2 !== "true") return;
3478
- var d = coreMod.getFlowdata(context);
3478
+ var d = fortuneCore.getFlowdata(context);
3479
3479
  if (!d) return;
3480
- var cellValue = coreMod.getCellValue(rowIndex, colIndex, d);
3480
+ var cellValue = fortuneCore.getCellValue(rowIndex, colIndex, d);
3481
3481
  if (cellValue) {
3482
3482
  setSelected(cellValue.toString().split(","));
3483
3483
  }
@@ -3516,7 +3516,7 @@ var DropDownList = function DropDownList() {
3516
3516
  arr.splice(index, 1);
3517
3517
  }
3518
3518
  setSelected(arr);
3519
- coreMod.setDropcownValue(ctx, v, arr);
3519
+ fortuneCore.setDropcownValue(ctx, v, arr);
3520
3520
  });
3521
3521
  },
3522
3522
  tabIndex: 0
@@ -3538,7 +3538,7 @@ var SheetOverlay = function SheetOverlay() {
3538
3538
  setContext = _useContext.setContext,
3539
3539
  settings = _useContext.settings,
3540
3540
  refs = _useContext.refs;
3541
- var _locale = coreMod.locale(context),
3541
+ var _locale = fortuneCore.locale(context),
3542
3542
  info = _locale.info,
3543
3543
  rightclick = _locale.rightclick;
3544
3544
  var _useDialog = useDialog(),
@@ -3553,7 +3553,7 @@ var SheetOverlay = function SheetOverlay() {
3553
3553
  if (e.button !== 2) {
3554
3554
  setContext(function (draftCtx) {
3555
3555
  var _draftCtx$luckysheet_;
3556
- coreMod.handleCellAreaMouseDown(draftCtx, refs.globalCache, nativeEvent, refs.cellInput.current, refs.cellArea.current, refs.fxInput.current, refs.canvas.current.getContext("2d"));
3556
+ fortuneCore.handleCellAreaMouseDown(draftCtx, refs.globalCache, nativeEvent, refs.cellInput.current, refs.cellArea.current, refs.fxInput.current, refs.canvas.current.getContext("2d"));
3557
3557
  if (!___default['default'].isEmpty((_draftCtx$luckysheet_ = draftCtx.luckysheet_select_save) === null || _draftCtx$luckysheet_ === void 0 ? void 0 : _draftCtx$luckysheet_[0]) && refs.cellInput.current) {
3558
3558
  setTimeout(function () {
3559
3559
  var _refs$cellInput$curre;
@@ -3566,18 +3566,18 @@ var SheetOverlay = function SheetOverlay() {
3566
3566
  var cellAreaContextMenu = React.useCallback(function (e) {
3567
3567
  var nativeEvent = e.nativeEvent;
3568
3568
  setContext(function (draftCtx) {
3569
- coreMod.handleContextMenu(draftCtx, settings, nativeEvent, refs.workbookContainer.current, refs.cellArea.current, "cell");
3569
+ fortuneCore.handleContextMenu(draftCtx, settings, nativeEvent, refs.workbookContainer.current, refs.cellArea.current, "cell");
3570
3570
  });
3571
3571
  }, [refs.workbookContainer, setContext, settings, refs.cellArea]);
3572
3572
  var cellAreaDoubleClick = React.useCallback(function (e) {
3573
3573
  var nativeEvent = e.nativeEvent;
3574
3574
  setContext(function (draftCtx) {
3575
- coreMod.handleCellAreaDoubleClick(draftCtx, refs.globalCache, settings, nativeEvent, refs.cellArea.current);
3575
+ fortuneCore.handleCellAreaDoubleClick(draftCtx, refs.globalCache, settings, nativeEvent, refs.cellArea.current);
3576
3576
  });
3577
3577
  }, [refs.cellArea, refs.globalCache, setContext, settings]);
3578
3578
  var onLeftTopClick = React.useCallback(function () {
3579
3579
  setContext(function (draftCtx) {
3580
- coreMod.selectAll(draftCtx);
3580
+ fortuneCore.selectAll(draftCtx);
3581
3581
  });
3582
3582
  }, [setContext]);
3583
3583
  var debouncedShowLinkCard = React.useMemo(function () {
@@ -3586,60 +3586,60 @@ var SheetOverlay = function SheetOverlay() {
3586
3586
  var skip = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
3587
3587
  if (skip || ((_globalCache$linkCard = globalCache.linkCard) === null || _globalCache$linkCard === void 0 ? void 0 : _globalCache$linkCard.mouseEnter)) return;
3588
3588
  setContext(function (draftCtx) {
3589
- coreMod.showLinkCard(draftCtx, r, c, isEditing);
3589
+ fortuneCore.showLinkCard(draftCtx, r, c, isEditing);
3590
3590
  });
3591
3591
  }, 800);
3592
3592
  }, [setContext]);
3593
3593
  var overShowLinkCard = React.useCallback(function (ctx, globalCache, e, container, scrollX, scrollY) {
3594
- var rc = coreMod.getCellRowColumn(ctx, e, container, scrollX, scrollY);
3594
+ var rc = fortuneCore.getCellRowColumn(ctx, e, container, scrollX, scrollY);
3595
3595
  if (rc == null) return;
3596
- var link = coreMod.getCellHyperlink(ctx, rc.r, rc.c);
3596
+ var link = fortuneCore.getCellHyperlink(ctx, rc.r, rc.c);
3597
3597
  if (link == null) {
3598
3598
  debouncedShowLinkCard(globalCache, rc.r, rc.c, false);
3599
3599
  } else {
3600
- coreMod.showLinkCard(ctx, rc.r, rc.c, false);
3600
+ fortuneCore.showLinkCard(ctx, rc.r, rc.c, false);
3601
3601
  debouncedShowLinkCard(globalCache, rc.r, rc.c, false, true);
3602
3602
  }
3603
3603
  }, [debouncedShowLinkCard]);
3604
3604
  var onMouseMove = React.useCallback(function (nativeEvent) {
3605
3605
  setContext(function (draftCtx) {
3606
3606
  overShowLinkCard(draftCtx, refs.globalCache, nativeEvent, containerRef.current, refs.scrollbarX.current, refs.scrollbarY.current);
3607
- coreMod.handleOverlayMouseMove(draftCtx, refs.globalCache, nativeEvent, refs.cellInput.current, refs.scrollbarX.current, refs.scrollbarY.current, containerRef.current, refs.fxInput.current);
3607
+ fortuneCore.handleOverlayMouseMove(draftCtx, refs.globalCache, nativeEvent, refs.cellInput.current, refs.scrollbarX.current, refs.scrollbarY.current, containerRef.current, refs.fxInput.current);
3608
3608
  });
3609
3609
  }, [overShowLinkCard, refs.cellInput, refs.fxInput, refs.globalCache, refs.scrollbarX, refs.scrollbarY, setContext]);
3610
3610
  var onMouseUp = React.useCallback(function (nativeEvent) {
3611
3611
  setContext(function (draftCtx) {
3612
3612
  try {
3613
- coreMod.handleOverlayMouseUp(draftCtx, refs.globalCache, settings, nativeEvent, refs.scrollbarX.current, refs.scrollbarY.current, containerRef.current, refs.cellInput.current, refs.fxInput.current);
3613
+ fortuneCore.handleOverlayMouseUp(draftCtx, refs.globalCache, settings, nativeEvent, refs.scrollbarX.current, refs.scrollbarY.current, containerRef.current, refs.cellInput.current, refs.fxInput.current);
3614
3614
  } catch (e) {
3615
3615
  showAlert(e.message);
3616
3616
  }
3617
3617
  });
3618
3618
  }, [refs.cellInput, refs.fxInput, refs.globalCache, refs.scrollbarX, refs.scrollbarY, setContext, settings, showAlert]);
3619
3619
  var onKeyDownForZoom = React.useCallback(function (ev) {
3620
- var newZoom = coreMod.handleKeydownForZoom(ev, context.zoomRatio);
3620
+ var newZoom = fortuneCore.handleKeydownForZoom(ev, context.zoomRatio);
3621
3621
  if (newZoom !== context.zoomRatio) {
3622
3622
  setContext(function (ctx) {
3623
3623
  ctx.zoomRatio = newZoom;
3624
- ctx.luckysheetfile[coreMod.getSheetIndex(ctx, ctx.currentSheetId)].zoomRatio = newZoom;
3624
+ ctx.luckysheetfile[fortuneCore.getSheetIndex(ctx, ctx.currentSheetId)].zoomRatio = newZoom;
3625
3625
  });
3626
3626
  }
3627
3627
  }, [context.zoomRatio, setContext]);
3628
3628
  var onTouchStart = React.useCallback(function (e) {
3629
3629
  var nativeEvent = e.nativeEvent;
3630
3630
  setContext(function (draftContext) {
3631
- coreMod.handleOverlayTouchStart(draftContext, nativeEvent, refs.globalCache);
3631
+ fortuneCore.handleOverlayTouchStart(draftContext, nativeEvent, refs.globalCache);
3632
3632
  });
3633
3633
  e.stopPropagation();
3634
3634
  }, [refs.globalCache, setContext]);
3635
3635
  var onTouchMove = React.useCallback(function (e) {
3636
3636
  var nativeEvent = e.nativeEvent;
3637
3637
  setContext(function (draftCtx) {
3638
- coreMod.handleOverlayTouchMove(draftCtx, nativeEvent, refs.globalCache, refs.scrollbarX.current, refs.scrollbarY.current);
3638
+ fortuneCore.handleOverlayTouchMove(draftCtx, nativeEvent, refs.globalCache, refs.scrollbarX.current, refs.scrollbarY.current);
3639
3639
  });
3640
3640
  }, [refs.globalCache, refs.scrollbarX, refs.scrollbarY, setContext]);
3641
3641
  var onTouchEnd = React.useCallback(function () {
3642
- coreMod.handleOverlayTouchEnd(refs.globalCache);
3642
+ fortuneCore.handleOverlayTouchEnd(refs.globalCache);
3643
3643
  }, [refs.globalCache]);
3644
3644
  var handleBottomAddRow = React.useCallback(function () {
3645
3645
  var _bottomAddRowInputRef;
@@ -3653,14 +3653,14 @@ var SheetOverlay = function SheetOverlay() {
3653
3653
  }
3654
3654
  var insertRowColOp = {
3655
3655
  type: "row",
3656
- index: context.luckysheetfile[coreMod.getSheetIndex(context, context.currentSheetId)].data.length - 1,
3656
+ index: context.luckysheetfile[fortuneCore.getSheetIndex(context, context.currentSheetId)].data.length - 1,
3657
3657
  count: value,
3658
3658
  direction: "rightbottom",
3659
3659
  id: context.currentSheetId
3660
3660
  };
3661
3661
  setContext(function (draftCtx) {
3662
3662
  try {
3663
- coreMod.insertRowCol(draftCtx, insertRowColOp, false);
3663
+ fortuneCore.insertRowCol(draftCtx, insertRowColOp, false);
3664
3664
  } catch (err) {
3665
3665
  if (err.message === "maxExceeded") showAlert(rightclick.rowOverLimit);
3666
3666
  }
@@ -3687,7 +3687,7 @@ var SheetOverlay = function SheetOverlay() {
3687
3687
  return v.rc !== ((_context$editingComme = context.editingCommentBox) === null || _context$editingComme === void 0 ? void 0 : _context$editingComme.rc);
3688
3688
  }), [context.hoveredCommentBox, context.editingCommentBox]).forEach(function (box) {
3689
3689
  if (box) {
3690
- coreMod.drawArrow(box.rc, box.size);
3690
+ fortuneCore.drawArrow(box.rc, box.size);
3691
3691
  }
3692
3692
  });
3693
3693
  }
@@ -3821,7 +3821,7 @@ var SheetOverlay = function SheetOverlay() {
3821
3821
  width: selection.width,
3822
3822
  height: selection.height,
3823
3823
  display: "block"
3824
- }, coreMod.fixRowStyleOverflowInFreeze(context, selection.row_focus || 0, selection.row_focus || 0, (_refs$globalCache$fre = refs.globalCache.freezen) === null || _refs$globalCache$fre === void 0 ? void 0 : _refs$globalCache$fre[context.currentSheetId]), coreMod.fixColumnStyleOverflowInFreeze(context, selection.column_focus || 0, selection.column_focus || 0, (_refs$globalCache$fre2 = refs.globalCache.freezen) === null || _refs$globalCache$fre2 === void 0 ? void 0 : _refs$globalCache$fre2[context.currentSheetId]));
3824
+ }, fortuneCore.fixRowStyleOverflowInFreeze(context, selection.row_focus || 0, selection.row_focus || 0, (_refs$globalCache$fre = refs.globalCache.freezen) === null || _refs$globalCache$fre === void 0 ? void 0 : _refs$globalCache$fre[context.currentSheetId]), fortuneCore.fixColumnStyleOverflowInFreeze(context, selection.column_focus || 0, selection.column_focus || 0, (_refs$globalCache$fre2 = refs.globalCache.freezen) === null || _refs$globalCache$fre2 === void 0 ? void 0 : _refs$globalCache$fre2[context.currentSheetId]));
3825
3825
  }() : {},
3826
3826
  onMouseDown: function onMouseDown(e) {
3827
3827
  return e.preventDefault();
@@ -3881,12 +3881,12 @@ var SheetOverlay = function SheetOverlay() {
3881
3881
  width: selection.width_move,
3882
3882
  height: selection.height_move,
3883
3883
  display: "block"
3884
- }, coreMod.fixRowStyleOverflowInFreeze(context, selection.row[0], selection.row[1], (_refs$globalCache$fre3 = refs.globalCache.freezen) === null || _refs$globalCache$fre3 === void 0 ? void 0 : _refs$globalCache$fre3[context.currentSheetId]), coreMod.fixColumnStyleOverflowInFreeze(context, selection.column[0], selection.column[1], (_refs$globalCache$fre4 = refs.globalCache.freezen) === null || _refs$globalCache$fre4 === void 0 ? void 0 : _refs$globalCache$fre4[context.currentSheetId])),
3884
+ }, fortuneCore.fixRowStyleOverflowInFreeze(context, selection.row[0], selection.row[1], (_refs$globalCache$fre3 = refs.globalCache.freezen) === null || _refs$globalCache$fre3 === void 0 ? void 0 : _refs$globalCache$fre3[context.currentSheetId]), fortuneCore.fixColumnStyleOverflowInFreeze(context, selection.column[0], selection.column[1], (_refs$globalCache$fre4 = refs.globalCache.freezen) === null || _refs$globalCache$fre4 === void 0 ? void 0 : _refs$globalCache$fre4[context.currentSheetId])),
3885
3885
  onMouseDown: function onMouseDown(e) {
3886
3886
  e.stopPropagation();
3887
3887
  var nativeEvent = e.nativeEvent;
3888
3888
  setContext(function (draftCtx) {
3889
- coreMod.onCellsMoveStart(draftCtx, refs.globalCache, nativeEvent, refs.scrollbarX.current, refs.scrollbarY.current, containerRef.current);
3889
+ fortuneCore.onCellsMoveStart(draftCtx, refs.globalCache, nativeEvent, refs.scrollbarX.current, refs.scrollbarY.current, containerRef.current);
3890
3890
  });
3891
3891
  }
3892
3892
  }, /*#__PURE__*/React__default['default'].createElement("div", {
@@ -3896,7 +3896,7 @@ var SheetOverlay = function SheetOverlay() {
3896
3896
  onMouseDown: function onMouseDown(e) {
3897
3897
  var nativeEvent = e.nativeEvent;
3898
3898
  setContext(function (draftContext) {
3899
- coreMod.createDropCellRange(draftContext, nativeEvent, containerRef.current);
3899
+ fortuneCore.createDropCellRange(draftContext, nativeEvent, containerRef.current);
3900
3900
  });
3901
3901
  e.stopPropagation();
3902
3902
  }
@@ -4093,8 +4093,8 @@ var Sheet = function Sheet(_ref) {
4093
4093
  if (settings.devicePixelRatio === 0) {
4094
4094
  draftCtx.devicePixelRatio = (globalThis || window).devicePixelRatio;
4095
4095
  }
4096
- coreMod.updateContextWithSheetData(draftCtx, data);
4097
- coreMod.updateContextWithCanvas(draftCtx, refs.canvas.current, placeholderRef.current);
4096
+ fortuneCore.updateContextWithSheetData(draftCtx, data);
4097
+ fortuneCore.updateContextWithCanvas(draftCtx, refs.canvas.current, placeholderRef.current);
4098
4098
  });
4099
4099
  }
4100
4100
  window.addEventListener("resize", resize);
@@ -4105,23 +4105,23 @@ var Sheet = function Sheet(_ref) {
4105
4105
  React.useEffect(function () {
4106
4106
  if (!data) return;
4107
4107
  setContext(function (draftCtx) {
4108
- return coreMod.updateContextWithSheetData(draftCtx, data);
4108
+ return fortuneCore.updateContextWithSheetData(draftCtx, data);
4109
4109
  });
4110
4110
  }, [(_context$config = context.config) === null || _context$config === void 0 ? void 0 : _context$config.rowlen, (_context$config2 = context.config) === null || _context$config2 === void 0 ? void 0 : _context$config2.columnlen, (_context$config3 = context.config) === null || _context$config3 === void 0 ? void 0 : _context$config3.rowhidden, context.config.colhidden, data, context.zoomRatio, setContext]);
4111
4111
  React.useEffect(function () {
4112
4112
  setContext(function (draftCtx) {
4113
- return coreMod.updateContextWithCanvas(draftCtx, refs.canvas.current, placeholderRef.current);
4113
+ return fortuneCore.updateContextWithCanvas(draftCtx, refs.canvas.current, placeholderRef.current);
4114
4114
  });
4115
4115
  }, [refs.canvas, setContext, context.rowHeaderWidth, context.columnHeaderHeight, context.devicePixelRatio]);
4116
4116
  React.useEffect(function () {
4117
- coreMod.initFreeze(context, refs.globalCache, context.currentSheetId);
4117
+ fortuneCore.initFreeze(context, refs.globalCache, context.currentSheetId);
4118
4118
  }, [refs.globalCache, sheet.frozen, context.currentSheetId, context.visibledatacolumn, context.visibledatarow]);
4119
4119
  React.useEffect(function () {
4120
4120
  var _refs$globalCache$fre, _freeze$horizontal, _freeze$vertical;
4121
4121
  if (context.groupValuesRefreshData.length > 0) {
4122
4122
  return;
4123
4123
  }
4124
- var tableCanvas = new coreMod.Canvas(refs.canvas.current, context);
4124
+ var tableCanvas = new fortuneCore.Canvas(refs.canvas.current, context);
4125
4125
  if (tableCanvas == null) return;
4126
4126
  var freeze = (_refs$globalCache$fre = refs.globalCache.freezen) === null || _refs$globalCache$fre === void 0 ? void 0 : _refs$globalCache$fre[sheet.id];
4127
4127
  if ((freeze === null || freeze === void 0 ? void 0 : (_freeze$horizontal = freeze.horizontal) === null || _freeze$horizontal === void 0 ? void 0 : _freeze$horizontal.freezenhorizontaldata) || (freeze === null || freeze === void 0 ? void 0 : (_freeze$vertical = freeze.vertical) === null || _freeze$vertical === void 0 ? void 0 : _freeze$vertical.freezenverticaldata)) {
@@ -4222,7 +4222,7 @@ var Sheet = function Sheet(_ref) {
4222
4222
  }, [context, refs.canvas, refs.globalCache.freezen, setContext, sheet.id]);
4223
4223
  var onWheel = React.useCallback(function (e) {
4224
4224
  setContext(function (draftCtx) {
4225
- coreMod.handleGlobalWheel(draftCtx, e, refs.globalCache, refs.scrollbarX.current, refs.scrollbarY.current);
4225
+ fortuneCore.handleGlobalWheel(draftCtx, e, refs.globalCache, refs.scrollbarX.current, refs.scrollbarY.current);
4226
4226
  });
4227
4227
  e.preventDefault();
4228
4228
  }, [refs.globalCache, refs.scrollbarX, refs.scrollbarY, setContext]);
@@ -4414,7 +4414,7 @@ var FormulaSearch$1 = function FormulaSearch(_ref) {
4414
4414
  _useState6 = _slicedToArray(_useState5, 2),
4415
4415
  searchText = _useState6[0],
4416
4416
  setSearchText = _useState6[1];
4417
- var _locale = coreMod.locale(context),
4417
+ var _locale = fortuneCore.locale(context),
4418
4418
  formulaMore = _locale.formulaMore,
4419
4419
  functionlist = _locale.functionlist,
4420
4420
  button = _locale.button;
@@ -4514,7 +4514,7 @@ var FormulaSearch$1 = function FormulaSearch(_ref) {
4514
4514
  cellInput.current.innerHTML = formulaTxt;
4515
4515
  var spans = cellInput.current.childNodes;
4516
4516
  if (!___default['default'].isEmpty(spans)) {
4517
- coreMod.setCaretPosition(ctx, spans[spans.length - 1], 0, 1);
4517
+ fortuneCore.setCaretPosition(ctx, spans[spans.length - 1], 0, 1);
4518
4518
  }
4519
4519
  ctx.functionHint = filteredFunctionList[selectedFuncIndex].n.toUpperCase();
4520
4520
  ctx.functionCandidates = [];
@@ -4529,7 +4529,7 @@ var FormulaSearch$1 = function FormulaSearch(_ref) {
4529
4529
  }, [cellInput, context.luckysheet_select_save, filteredFunctionList, globalCache, selectedFuncIndex, setContext, _onCancel, functionlist]);
4530
4530
  var onCancel = React.useCallback(function () {
4531
4531
  setContext(function (ctx) {
4532
- coreMod.cancelNormalSelected(ctx);
4532
+ fortuneCore.cancelNormalSelected(ctx);
4533
4533
  if (cellInput.current) {
4534
4534
  cellInput.current.innerHTML = "";
4535
4535
  }
@@ -4594,7 +4594,7 @@ var SplitColumn = function SplitColumn() {
4594
4594
  var _useContext = React.useContext(WorkbookContext),
4595
4595
  context = _useContext.context,
4596
4596
  setContext = _useContext.setContext;
4597
- var _locale = coreMod.locale(context),
4597
+ var _locale = fortuneCore.locale(context),
4598
4598
  splitText = _locale.splitText,
4599
4599
  button = _locale.button;
4600
4600
  var _useState = React.useState(""),
@@ -4615,14 +4615,14 @@ var SplitColumn = function SplitColumn() {
4615
4615
  hideDialog = _useDialog.hideDialog;
4616
4616
  var certainBtn = React.useCallback(function () {
4617
4617
  hideDialog();
4618
- var dataArr = coreMod.getDataArr(splitOperate, context);
4618
+ var dataArr = fortuneCore.getDataArr(splitOperate, context);
4619
4619
  var r = context.luckysheet_select_save[0].row[0];
4620
4620
  var c = context.luckysheet_select_save[0].column[0];
4621
4621
  if (dataArr[0].length === 1) {
4622
4622
  return;
4623
4623
  }
4624
4624
  var dataCover = false;
4625
- var data = coreMod.getFlowdata(context);
4625
+ var data = fortuneCore.getFlowdata(context);
4626
4626
  for (var i = 0; i < dataArr.length; i += 1) {
4627
4627
  for (var j = 1; j < dataArr[0].length; j += 1) {
4628
4628
  var cell = data[r + i][c + j];
@@ -4636,18 +4636,18 @@ var SplitColumn = function SplitColumn() {
4636
4636
  showDialog(splitText.splitConfirmToExe, "yesno", function () {
4637
4637
  hideDialog();
4638
4638
  setContext(function (ctx) {
4639
- coreMod.updateMoreCell(r, c, dataArr, ctx);
4639
+ fortuneCore.updateMoreCell(r, c, dataArr, ctx);
4640
4640
  });
4641
4641
  });
4642
4642
  } else {
4643
4643
  setContext(function (ctx) {
4644
- coreMod.updateMoreCell(r, c, dataArr, ctx);
4644
+ fortuneCore.updateMoreCell(r, c, dataArr, ctx);
4645
4645
  });
4646
4646
  }
4647
4647
  }, [context, hideDialog, setContext, showDialog, splitOperate, splitText.splitConfirmToExe]);
4648
4648
  React.useEffect(function () {
4649
4649
  setTableData(function (table) {
4650
- table = coreMod.getDataArr(splitOperate, context);
4650
+ table = fortuneCore.getDataArr(splitOperate, context);
4651
4651
  return table;
4652
4652
  });
4653
4653
  }, [context, splitOperate]);
@@ -4671,7 +4671,7 @@ var SplitColumn = function SplitColumn() {
4671
4671
  onClick: function onClick() {
4672
4672
  return setSplitOperate(function (regStr) {
4673
4673
  var _splitSymbols$current;
4674
- return coreMod.getRegStr(regStr, (_splitSymbols$current = splitSymbols.current) === null || _splitSymbols$current === void 0 ? void 0 : _splitSymbols$current.childNodes);
4674
+ return fortuneCore.getRegStr(regStr, (_splitSymbols$current = splitSymbols.current) === null || _splitSymbols$current === void 0 ? void 0 : _splitSymbols$current.childNodes);
4675
4675
  });
4676
4676
  },
4677
4677
  tabIndex: 0
@@ -4688,7 +4688,7 @@ var SplitColumn = function SplitColumn() {
4688
4688
  setOtherFlag(!otherFlag);
4689
4689
  setSplitOperate(function (regStr) {
4690
4690
  var _splitSymbols$current2;
4691
- return coreMod.getRegStr(regStr, (_splitSymbols$current2 = splitSymbols.current) === null || _splitSymbols$current2 === void 0 ? void 0 : _splitSymbols$current2.childNodes);
4691
+ return fortuneCore.getRegStr(regStr, (_splitSymbols$current2 = splitSymbols.current) === null || _splitSymbols$current2 === void 0 ? void 0 : _splitSymbols$current2.childNodes);
4692
4692
  });
4693
4693
  },
4694
4694
  tabIndex: 0
@@ -4702,7 +4702,7 @@ var SplitColumn = function SplitColumn() {
4702
4702
  if (otherFlag) {
4703
4703
  setSplitOperate(function (regStr) {
4704
4704
  var _splitSymbols$current3;
4705
- return coreMod.getRegStr(regStr, (_splitSymbols$current3 = splitSymbols.current) === null || _splitSymbols$current3 === void 0 ? void 0 : _splitSymbols$current3.childNodes);
4705
+ return fortuneCore.getRegStr(regStr, (_splitSymbols$current3 = splitSymbols.current) === null || _splitSymbols$current3 === void 0 ? void 0 : _splitSymbols$current3.childNodes);
4706
4706
  });
4707
4707
  }
4708
4708
  }
@@ -4715,7 +4715,7 @@ var SplitColumn = function SplitColumn() {
4715
4715
  onClick: function onClick() {
4716
4716
  setSplitOperate(function (regStr) {
4717
4717
  var _splitSymbols$current4;
4718
- return coreMod.getRegStr(regStr, (_splitSymbols$current4 = splitSymbols.current) === null || _splitSymbols$current4 === void 0 ? void 0 : _splitSymbols$current4.childNodes);
4718
+ return fortuneCore.getRegStr(regStr, (_splitSymbols$current4 = splitSymbols.current) === null || _splitSymbols$current4 === void 0 ? void 0 : _splitSymbols$current4.childNodes);
4719
4719
  });
4720
4720
  },
4721
4721
  tabIndex: 0
@@ -4758,7 +4758,7 @@ var LocationCondition = function LocationCondition() {
4758
4758
  var _useDialog = useDialog(),
4759
4759
  showDialog = _useDialog.showDialog,
4760
4760
  hideDialog = _useDialog.hideDialog;
4761
- var _locale = coreMod.locale(context),
4761
+ var _locale = fortuneCore.locale(context),
4762
4762
  findAndReplace = _locale.findAndReplace,
4763
4763
  button = _locale.button;
4764
4764
  var _useState = React.useState("locationConstant"),
@@ -4787,17 +4787,17 @@ var LocationCondition = function LocationCondition() {
4787
4787
  setFormulas = _useState6[1];
4788
4788
  var onConfirm = React.useCallback(function () {
4789
4789
  if (conditionType === "locationConstant") {
4790
- var value = coreMod.getOptionValue(constants);
4791
- var selectRange = coreMod.getSelectRange(context);
4790
+ var value = fortuneCore.getOptionValue(constants);
4791
+ var selectRange = fortuneCore.getSelectRange(context);
4792
4792
  setContext(function (ctx) {
4793
- var rangeArr = coreMod.applyLocation(selectRange, conditionType, value, ctx);
4793
+ var rangeArr = fortuneCore.applyLocation(selectRange, conditionType, value, ctx);
4794
4794
  if (rangeArr.length === 0) showDialog(findAndReplace.locationTipNotFindCell, "ok");
4795
4795
  });
4796
4796
  } else if (conditionType === "locationFormula") {
4797
- var _value = coreMod.getOptionValue(formulas);
4798
- var _selectRange = coreMod.getSelectRange(context);
4797
+ var _value = fortuneCore.getOptionValue(formulas);
4798
+ var _selectRange = fortuneCore.getSelectRange(context);
4799
4799
  setContext(function (ctx) {
4800
- var rangeArr = coreMod.applyLocation(_selectRange, conditionType, _value, ctx);
4800
+ var rangeArr = fortuneCore.applyLocation(_selectRange, conditionType, _value, ctx);
4801
4801
  if (rangeArr.length === 0) showDialog(findAndReplace.locationTipNotFindCell, "ok");
4802
4802
  });
4803
4803
  } else if (conditionType === "locationRowSpan") {
@@ -4808,7 +4808,7 @@ var LocationCondition = function LocationCondition() {
4808
4808
  }
4809
4809
  var _selectRange2 = ___default['default'].assignIn([], context.luckysheet_select_save);
4810
4810
  setContext(function (ctx) {
4811
- var rangeArr = coreMod.applyLocation(_selectRange2, conditionType, undefined, ctx);
4811
+ var rangeArr = fortuneCore.applyLocation(_selectRange2, conditionType, undefined, ctx);
4812
4812
  if (rangeArr.length === 0) showDialog(findAndReplace.locationTipNotFindCell, "ok");
4813
4813
  });
4814
4814
  } else if (conditionType === "locationColumnSpan") {
@@ -4819,14 +4819,14 @@ var LocationCondition = function LocationCondition() {
4819
4819
  }
4820
4820
  var _selectRange3 = ___default['default'].assignIn([], context.luckysheet_select_save);
4821
4821
  setContext(function (ctx) {
4822
- var rangeArr = coreMod.applyLocation(_selectRange3, conditionType, undefined, ctx);
4822
+ var rangeArr = fortuneCore.applyLocation(_selectRange3, conditionType, undefined, ctx);
4823
4823
  if (rangeArr.length === 0) showDialog(findAndReplace.locationTipNotFindCell, "ok");
4824
4824
  });
4825
4825
  } else {
4826
4826
  var _context$luckysheet_s5, _context$luckysheet_s6;
4827
4827
  var _selectRange4;
4828
4828
  if (((_context$luckysheet_s5 = context.luckysheet_select_save) === null || _context$luckysheet_s5 === void 0 ? void 0 : _context$luckysheet_s5.length) === 0 || ((_context$luckysheet_s6 = context.luckysheet_select_save) === null || _context$luckysheet_s6 === void 0 ? void 0 : _context$luckysheet_s6.length) === 1 && context.luckysheet_select_save[0].row[0] === context.luckysheet_select_save[0].row[1] && context.luckysheet_select_save[0].column[0] === context.luckysheet_select_save[0].column[1]) {
4829
- var flowdata = coreMod.getFlowdata(context, context.currentSheetId);
4829
+ var flowdata = fortuneCore.getFlowdata(context, context.currentSheetId);
4830
4830
  _selectRange4 = [{
4831
4831
  row: [0, flowdata.length - 1],
4832
4832
  column: [0, flowdata[0].length - 1]
@@ -4835,7 +4835,7 @@ var LocationCondition = function LocationCondition() {
4835
4835
  _selectRange4 = ___default['default'].assignIn([], context.luckysheet_select_save);
4836
4836
  }
4837
4837
  setContext(function (ctx) {
4838
- var rangeArr = coreMod.applyLocation(_selectRange4, conditionType, undefined, ctx);
4838
+ var rangeArr = fortuneCore.applyLocation(_selectRange4, conditionType, undefined, ctx);
4839
4839
  if (rangeArr.length === 0) showDialog(findAndReplace.locationTipNotFindCell, "ok");
4840
4840
  });
4841
4841
  }
@@ -4954,7 +4954,7 @@ var ConditionalFormat = function ConditionalFormat(_ref) {
4954
4954
  refs = _useContext.refs;
4955
4955
  var _useDialog = useDialog(),
4956
4956
  showDialog = _useDialog.showDialog;
4957
- var _locale = coreMod.locale(context),
4957
+ var _locale = fortuneCore.locale(context),
4958
4958
  conditionformat = _locale.conditionformat;
4959
4959
  var showSubMenu = React.useCallback(function (e) {
4960
4960
  var target = e.target;
@@ -5144,7 +5144,7 @@ var ConditionalFormat = function ConditionalFormat(_ref) {
5144
5144
  },
5145
5145
  onClick: function onClick() {
5146
5146
  setContext(function (ctx) {
5147
- coreMod.updateItem(ctx, "delSheet");
5147
+ fortuneCore.updateItem(ctx, "delSheet");
5148
5148
  });
5149
5149
  },
5150
5150
  tabIndex: 0
@@ -5263,7 +5263,7 @@ var CustomColor = function CustomColor(_ref) {
5263
5263
  onColorPick = _ref.onColorPick;
5264
5264
  var _useContext = React.useContext(WorkbookContext),
5265
5265
  context = _useContext.context;
5266
- var _locale = coreMod.locale(context),
5266
+ var _locale = fortuneCore.locale(context),
5267
5267
  toolbar = _locale.toolbar,
5268
5268
  sheetconfig = _locale.sheetconfig,
5269
5269
  button = _locale.button;
@@ -5361,7 +5361,7 @@ var CustomBorder = function CustomBorder(_ref) {
5361
5361
  var _useContext = React.useContext(WorkbookContext),
5362
5362
  context = _useContext.context,
5363
5363
  refs = _useContext.refs;
5364
- var _locale = coreMod.locale(context),
5364
+ var _locale = fortuneCore.locale(context),
5365
5365
  border = _locale.border;
5366
5366
  var _useState = React.useState("#000000"),
5367
5367
  _useState2 = _slicedToArray(_useState, 2),
@@ -5524,7 +5524,7 @@ var FormatSearch = function FormatSearch(_ref) {
5524
5524
  _useState4 = _slicedToArray(_useState3, 2),
5525
5525
  selectedFormatIndex = _useState4[0],
5526
5526
  setSelectedFormatIndex = _useState4[1];
5527
- var _locale = coreMod.locale(context),
5527
+ var _locale = fortuneCore.locale(context),
5528
5528
  button = _locale.button,
5529
5529
  format = _locale.format,
5530
5530
  currencyDetail = _locale.currencyDetail,
@@ -5549,7 +5549,7 @@ var FormatSearch = function FormatSearch(_ref) {
5549
5549
  return;
5550
5550
  }
5551
5551
  setContext(function (ctx) {
5552
- var index = coreMod.getSheetIndex(ctx, ctx.currentSheetId);
5552
+ var index = fortuneCore.getSheetIndex(ctx, ctx.currentSheetId);
5553
5553
  if (___default['default'].isNil(index)) return;
5554
5554
  var selectedFormat = toolbarFormat[selectedFormatIndex].value;
5555
5555
  ___default['default'].forEach(ctx.luckysheet_select_save, function (selection) {
@@ -5559,7 +5559,7 @@ var FormatSearch = function FormatSearch(_ref) {
5559
5559
  if (((_ctx$luckysheetfile$i = ctx.luckysheetfile[index].data) === null || _ctx$luckysheetfile$i === void 0 ? void 0 : _ctx$luckysheetfile$i[r][c]) && ((_ctx$luckysheetfile$i2 = ctx.luckysheetfile[index].data) === null || _ctx$luckysheetfile$i2 === void 0 ? void 0 : (_ctx$luckysheetfile$i3 = _ctx$luckysheetfile$i2[r][c]) === null || _ctx$luckysheetfile$i3 === void 0 ? void 0 : (_ctx$luckysheetfile$i4 = _ctx$luckysheetfile$i3.ct) === null || _ctx$luckysheetfile$i4 === void 0 ? void 0 : _ctx$luckysheetfile$i4.t) === "n") {
5560
5560
  var zero = 0;
5561
5561
  ctx.luckysheetfile[index].data[r][c].ct.fa = "".concat(selectedFormat).concat(zero.toFixed(decimalPlace));
5562
- ctx.luckysheetfile[index].data[r][c].m = coreMod.update("".concat(selectedFormat).concat(zero.toFixed(decimalPlace)), ctx.luckysheetfile[index].data[r][c].v);
5562
+ ctx.luckysheetfile[index].data[r][c].m = fortuneCore.update("".concat(selectedFormat).concat(zero.toFixed(decimalPlace)), ctx.luckysheetfile[index].data[r][c].v);
5563
5563
  }
5564
5564
  }
5565
5565
  }
@@ -5569,7 +5569,7 @@ var FormatSearch = function FormatSearch(_ref) {
5569
5569
  }, [_onCancel, decimalPlace, format.tipDecimalPlaces, selectedFormatIndex, setContext, showDialog, toolbarFormat]);
5570
5570
  var onCancel = React.useCallback(function () {
5571
5571
  setContext(function (ctx) {
5572
- coreMod.cancelNormalSelected(ctx);
5572
+ fortuneCore.cancelNormalSelected(ctx);
5573
5573
  if (cellInput.current) {
5574
5574
  cellInput.current.innerHTML = "";
5575
5575
  }
@@ -5658,12 +5658,12 @@ var Toolbar = function Toolbar(_ref) {
5658
5658
  showDialog = _useDialog.showDialog,
5659
5659
  hideDialog = _useDialog.hideDialog;
5660
5660
  var firstSelection = (_context$luckysheet_s = context.luckysheet_select_save) === null || _context$luckysheet_s === void 0 ? void 0 : _context$luckysheet_s[0];
5661
- var flowdata = coreMod.getFlowdata(context);
5661
+ var flowdata = fortuneCore.getFlowdata(context);
5662
5662
  contextRef.current = context;
5663
5663
  var row = firstSelection === null || firstSelection === void 0 ? void 0 : firstSelection.row_focus;
5664
5664
  var col = firstSelection === null || firstSelection === void 0 ? void 0 : firstSelection.column_focus;
5665
5665
  var cell = flowdata && row != null && col != null ? flowdata === null || flowdata === void 0 ? void 0 : (_flowdata$row = flowdata[row]) === null || _flowdata$row === void 0 ? void 0 : _flowdata$row[col] : undefined;
5666
- var _locale = coreMod.locale(context),
5666
+ var _locale = fortuneCore.locale(context),
5667
5667
  toolbar = _locale.toolbar,
5668
5668
  merge = _locale.merge,
5669
5669
  border = _locale.border,
@@ -5680,7 +5680,7 @@ var Toolbar = function Toolbar(_ref) {
5680
5680
  findAndReplace = _locale.findAndReplace,
5681
5681
  comment = _locale.comment,
5682
5682
  fontarray = _locale.fontarray;
5683
- var toolbarFormat = coreMod.locale(context).format;
5683
+ var toolbarFormat = fortuneCore.locale(context).format;
5684
5684
  var sheetWidth = context.luckysheetTableContentHW[0];
5685
5685
  var currency = settings.currency;
5686
5686
  var defaultFormat = defaultFmt(currency);
@@ -5765,7 +5765,7 @@ var Toolbar = function Toolbar(_ref) {
5765
5765
  if (["font-color", "background"].includes(name)) {
5766
5766
  var pick = function pick(color) {
5767
5767
  setContext(function (draftCtx) {
5768
- return (name === "font-color" ? coreMod.handleTextColor : coreMod.handleTextBackground)(draftCtx, refs.cellInput.current, color);
5768
+ return (name === "font-color" ? fortuneCore.handleTextColor : fortuneCore.handleTextBackground)(draftCtx, refs.cellInput.current, color);
5769
5769
  });
5770
5770
  if (name === "font-color") {
5771
5771
  refs.globalCache.recentTextColor = color;
@@ -5808,7 +5808,7 @@ var Toolbar = function Toolbar(_ref) {
5808
5808
  if (name === "format") {
5809
5809
  var currentFmt = defaultFormat[0].text;
5810
5810
  if (cell) {
5811
- var curr = coreMod.normalizedCellAttr(cell, "ct");
5811
+ var curr = fortuneCore.normalizedCellAttr(cell, "ct");
5812
5812
  var format = ___default['default'].find(defaultFormat, function (v) {
5813
5813
  return v.value === (curr === null || curr === void 0 ? void 0 : curr.fa);
5814
5814
  });
@@ -5882,9 +5882,9 @@ var Toolbar = function Toolbar(_ref) {
5882
5882
  onClick: function onClick() {
5883
5883
  setOpen(false);
5884
5884
  setContext(function (ctx) {
5885
- var d = coreMod.getFlowdata(ctx);
5885
+ var d = fortuneCore.getFlowdata(ctx);
5886
5886
  if (d == null) return;
5887
- coreMod.updateFormat(ctx, refs.cellInput.current, d, "ct", value);
5887
+ fortuneCore.updateFormat(ctx, refs.cellInput.current, d, "ct", value);
5888
5888
  });
5889
5889
  }
5890
5890
  }, /*#__PURE__*/React__default['default'].createElement("div", {
@@ -5915,9 +5915,9 @@ var Toolbar = function Toolbar(_ref) {
5915
5915
  onClick: function onClick() {
5916
5916
  setContext(function (ctx) {
5917
5917
  current = o;
5918
- var d = coreMod.getFlowdata(ctx);
5918
+ var d = fortuneCore.getFlowdata(ctx);
5919
5919
  if (!d) return;
5920
- coreMod.updateFormat(ctx, refs.cellInput.current, d, "ff", o);
5920
+ fortuneCore.updateFormat(ctx, refs.cellInput.current, d, "ff", o);
5921
5921
  });
5922
5922
  setOpen(false);
5923
5923
  }
@@ -5927,7 +5927,7 @@ var Toolbar = function Toolbar(_ref) {
5927
5927
  }
5928
5928
  if (name === "font-size") {
5929
5929
  return /*#__PURE__*/React__default['default'].createElement(Combo, {
5930
- text: cell ? coreMod.normalizedCellAttr(cell, "fs", context.defaultFontSize) : context.defaultFontSize.toString(),
5930
+ text: cell ? fortuneCore.normalizedCellAttr(cell, "fs", context.defaultFontSize) : context.defaultFontSize.toString(),
5931
5931
  key: name,
5932
5932
  tooltip: tooltip
5933
5933
  }, function (setOpen) {
@@ -5936,7 +5936,7 @@ var Toolbar = function Toolbar(_ref) {
5936
5936
  key: num,
5937
5937
  onClick: function onClick() {
5938
5938
  setContext(function (draftContext) {
5939
- return coreMod.handleTextSize(draftContext, refs.cellInput.current, num, refs.canvas.current.getContext("2d"));
5939
+ return fortuneCore.handleTextSize(draftContext, refs.cellInput.current, num, refs.canvas.current.getContext("2d"));
5940
5940
  });
5941
5941
  setOpen(false);
5942
5942
  }
@@ -5973,7 +5973,7 @@ var Toolbar = function Toolbar(_ref) {
5973
5973
  key: title,
5974
5974
  onClick: function onClick() {
5975
5975
  setContext(function (ctx) {
5976
- coreMod.handleHorizontalAlign(ctx, refs.cellInput.current, title.replace("align-", ""));
5976
+ fortuneCore.handleHorizontalAlign(ctx, refs.cellInput.current, title.replace("align-", ""));
5977
5977
  });
5978
5978
  setOpen(false);
5979
5979
  }
@@ -6014,7 +6014,7 @@ var Toolbar = function Toolbar(_ref) {
6014
6014
  key: title,
6015
6015
  onClick: function onClick() {
6016
6016
  setContext(function (ctx) {
6017
- coreMod.handleVerticalAlign(ctx, refs.cellInput.current, title.replace("align-", ""));
6017
+ fortuneCore.handleVerticalAlign(ctx, refs.cellInput.current, title.replace("align-", ""));
6018
6018
  });
6019
6019
  setOpen(false);
6020
6020
  }
@@ -6054,7 +6054,7 @@ var Toolbar = function Toolbar(_ref) {
6054
6054
  tooltip: tooltip,
6055
6055
  key: name,
6056
6056
  onClick: function onClick() {
6057
- var imgsrc = coreMod.handleScreenShot(contextRef.current);
6057
+ var imgsrc = fortuneCore.handleScreenShot(contextRef.current);
6058
6058
  if (imgsrc) {
6059
6059
  showDialog(/*#__PURE__*/React__default['default'].createElement("div", null, /*#__PURE__*/React__default['default'].createElement("div", null, screenshot.screenshotTipSuccess), /*#__PURE__*/React__default['default'].createElement("img", {
6060
6060
  src: imgsrc,
@@ -6158,27 +6158,27 @@ var Toolbar = function Toolbar(_ref) {
6158
6158
  showDialog(/*#__PURE__*/React__default['default'].createElement(LocationCondition, null));
6159
6159
  } else if (value === "locationFormula") {
6160
6160
  setContext(function (ctx) {
6161
- rangeArr = coreMod.applyLocation(range, "locationFormula", "all", ctx);
6161
+ rangeArr = fortuneCore.applyLocation(range, "locationFormula", "all", ctx);
6162
6162
  });
6163
6163
  } else if (value === "locationDate") {
6164
6164
  setContext(function (ctx) {
6165
- rangeArr = coreMod.applyLocation(range, "locationConstant", "d", ctx);
6165
+ rangeArr = fortuneCore.applyLocation(range, "locationConstant", "d", ctx);
6166
6166
  });
6167
6167
  } else if (value === "locationDigital") {
6168
6168
  setContext(function (ctx) {
6169
- rangeArr = coreMod.applyLocation(range, "locationConstant", "n", ctx);
6169
+ rangeArr = fortuneCore.applyLocation(range, "locationConstant", "n", ctx);
6170
6170
  });
6171
6171
  } else if (value === "locationString") {
6172
6172
  setContext(function (ctx) {
6173
- rangeArr = coreMod.applyLocation(range, "locationConstant", "s,g", ctx);
6173
+ rangeArr = fortuneCore.applyLocation(range, "locationConstant", "s,g", ctx);
6174
6174
  });
6175
6175
  } else if (value === "locationError") {
6176
6176
  setContext(function (ctx) {
6177
- rangeArr = coreMod.applyLocation(range, "locationConstant", "e", ctx);
6177
+ rangeArr = fortuneCore.applyLocation(range, "locationConstant", "e", ctx);
6178
6178
  });
6179
6179
  } else if (value === "locationCondition") {
6180
6180
  setContext(function (ctx) {
6181
- rangeArr = coreMod.applyLocation(range, "locationCF", undefined, ctx);
6181
+ rangeArr = fortuneCore.applyLocation(range, "locationCF", undefined, ctx);
6182
6182
  });
6183
6183
  } else if (value === "locationRowSpan") {
6184
6184
  var _context$luckysheet_s4, _context$luckysheet_s5;
@@ -6188,7 +6188,7 @@ var Toolbar = function Toolbar(_ref) {
6188
6188
  }
6189
6189
  range = ___default['default'].assignIn([], context.luckysheet_select_save);
6190
6190
  setContext(function (ctx) {
6191
- rangeArr = coreMod.applyLocation(range, "locationRowSpan", undefined, ctx);
6191
+ rangeArr = fortuneCore.applyLocation(range, "locationRowSpan", undefined, ctx);
6192
6192
  });
6193
6193
  } else if (value === "locationColumnSpan") {
6194
6194
  var _context$luckysheet_s6, _context$luckysheet_s7;
@@ -6198,7 +6198,7 @@ var Toolbar = function Toolbar(_ref) {
6198
6198
  }
6199
6199
  range = ___default['default'].assignIn([], context.luckysheet_select_save);
6200
6200
  setContext(function (ctx) {
6201
- rangeArr = coreMod.applyLocation(range, "locationColumnSpan", undefined, ctx);
6201
+ rangeArr = fortuneCore.applyLocation(range, "locationColumnSpan", undefined, ctx);
6202
6202
  });
6203
6203
  }
6204
6204
  if (rangeArr.length === 0 && value !== "location") showDialog(findAndReplace.locationTipNotFindCell, "ok");
@@ -6230,7 +6230,7 @@ var Toolbar = function Toolbar(_ref) {
6230
6230
  key: name,
6231
6231
  onClick: function onClick() {
6232
6232
  if (context.allowEdit === false) return;
6233
- coreMod.showImgChooser();
6233
+ fortuneCore.showImgChooser();
6234
6234
  }
6235
6235
  }, /*#__PURE__*/React__default['default'].createElement("input", {
6236
6236
  id: "fortune-img-upload",
@@ -6252,7 +6252,7 @@ var Toolbar = function Toolbar(_ref) {
6252
6252
  var image = new Image();
6253
6253
  image.onload = function () {
6254
6254
  setContext(function (draftCtx) {
6255
- coreMod.insertImage(draftCtx, image);
6255
+ fortuneCore.insertImage(draftCtx, image);
6256
6256
  });
6257
6257
  };
6258
6258
  image.src = src;
@@ -6284,29 +6284,29 @@ var Toolbar = function Toolbar(_ref) {
6284
6284
  itemData = [{
6285
6285
  key: "edit",
6286
6286
  text: comment.edit,
6287
- onClick: coreMod.editComment
6287
+ onClick: fortuneCore.editComment
6288
6288
  }, {
6289
6289
  key: "delete",
6290
6290
  text: comment.delete,
6291
- onClick: coreMod.deleteComment
6291
+ onClick: fortuneCore.deleteComment
6292
6292
  }, {
6293
6293
  key: "showOrHide",
6294
6294
  text: comment.showOne,
6295
- onClick: coreMod.showHideComment
6295
+ onClick: fortuneCore.showHideComment
6296
6296
  }, {
6297
6297
  key: "showOrHideAll",
6298
6298
  text: comment.showAll,
6299
- onClick: coreMod.showHideAllComments
6299
+ onClick: fortuneCore.showHideAllComments
6300
6300
  }];
6301
6301
  } else {
6302
6302
  itemData = [{
6303
6303
  key: "new",
6304
6304
  text: comment.insert,
6305
- onClick: coreMod.newComment
6305
+ onClick: fortuneCore.newComment
6306
6306
  }, {
6307
6307
  key: "showOrHideAll",
6308
6308
  text: comment.showAll,
6309
- onClick: coreMod.showHideAllComments
6309
+ onClick: fortuneCore.showHideAllComments
6310
6310
  }];
6311
6311
  }
6312
6312
  return /*#__PURE__*/React__default['default'].createElement(Combo, {
@@ -6353,7 +6353,7 @@ var Toolbar = function Toolbar(_ref) {
6353
6353
  tooltip: toolbar.autoSum,
6354
6354
  onClick: function onClick() {
6355
6355
  return setContext(function (ctx) {
6356
- coreMod.handleSum(ctx, refs.cellInput.current, refs.fxInput.current, refs.globalCache);
6356
+ fortuneCore.handleSum(ctx, refs.cellInput.current, refs.fxInput.current, refs.globalCache);
6357
6357
  });
6358
6358
  }
6359
6359
  }, function (setOpen) {
@@ -6364,7 +6364,7 @@ var Toolbar = function Toolbar(_ref) {
6364
6364
  key: value,
6365
6365
  onClick: function onClick() {
6366
6366
  setContext(function (ctx) {
6367
- coreMod.autoSelectionFormula(ctx, refs.cellInput.current, refs.fxInput.current, value, refs.globalCache);
6367
+ fortuneCore.autoSelectionFormula(ctx, refs.cellInput.current, refs.fxInput.current, value, refs.globalCache);
6368
6368
  });
6369
6369
  setOpen(false);
6370
6370
  }
@@ -6405,7 +6405,7 @@ var Toolbar = function Toolbar(_ref) {
6405
6405
  text: "\u5408\u5E76\u5355\u5143\u683C",
6406
6406
  onClick: function onClick() {
6407
6407
  return setContext(function (ctx) {
6408
- coreMod.handleMerge(ctx, "merge-all");
6408
+ fortuneCore.handleMerge(ctx, "merge-all");
6409
6409
  });
6410
6410
  }
6411
6411
  }, function (setOpen) {
@@ -6416,7 +6416,7 @@ var Toolbar = function Toolbar(_ref) {
6416
6416
  key: value,
6417
6417
  onClick: function onClick() {
6418
6418
  setContext(function (ctx) {
6419
- coreMod.handleMerge(ctx, value);
6419
+ fortuneCore.handleMerge(ctx, value);
6420
6420
  });
6421
6421
  setOpen(false);
6422
6422
  }
@@ -6482,7 +6482,7 @@ var Toolbar = function Toolbar(_ref) {
6482
6482
  text: "\u8FB9\u6846\u8BBE\u7F6E",
6483
6483
  onClick: function onClick() {
6484
6484
  return setContext(function (ctx) {
6485
- coreMod.handleBorder(ctx, "border-all", customColor, customStyle);
6485
+ fortuneCore.handleBorder(ctx, "border-all", customColor, customStyle);
6486
6486
  });
6487
6487
  }
6488
6488
  }, function (setOpen) {
@@ -6493,7 +6493,7 @@ var Toolbar = function Toolbar(_ref) {
6493
6493
  key: value,
6494
6494
  onClick: function onClick() {
6495
6495
  setContext(function (ctx) {
6496
- coreMod.handleBorder(ctx, value, customColor, customStyle);
6496
+ fortuneCore.handleBorder(ctx, value, customColor, customStyle);
6497
6497
  });
6498
6498
  setOpen(false);
6499
6499
  }
@@ -6532,7 +6532,7 @@ var Toolbar = function Toolbar(_ref) {
6532
6532
  tooltip: tooltip,
6533
6533
  onClick: function onClick() {
6534
6534
  return setContext(function (ctx) {
6535
- coreMod.handleFreeze(ctx, "freeze-row-col");
6535
+ fortuneCore.handleFreeze(ctx, "freeze-row-col");
6536
6536
  });
6537
6537
  }
6538
6538
  }, function (setOpen) {
@@ -6543,7 +6543,7 @@ var Toolbar = function Toolbar(_ref) {
6543
6543
  key: value,
6544
6544
  onClick: function onClick() {
6545
6545
  setContext(function (ctx) {
6546
- coreMod.handleFreeze(ctx, value);
6546
+ fortuneCore.handleFreeze(ctx, value);
6547
6547
  });
6548
6548
  setOpen(false);
6549
6549
  }
@@ -6586,9 +6586,9 @@ var Toolbar = function Toolbar(_ref) {
6586
6586
  key: value,
6587
6587
  onClick: function onClick() {
6588
6588
  setContext(function (ctx) {
6589
- var d = coreMod.getFlowdata(ctx);
6589
+ var d = fortuneCore.getFlowdata(ctx);
6590
6590
  if (d == null) return;
6591
- coreMod.updateFormat(ctx, refs.cellInput.current, d, "tb", value);
6591
+ fortuneCore.updateFormat(ctx, refs.cellInput.current, d, "tb", value);
6592
6592
  });
6593
6593
  setOpen(false);
6594
6594
  }
@@ -6643,9 +6643,9 @@ var Toolbar = function Toolbar(_ref) {
6643
6643
  key: value,
6644
6644
  onClick: function onClick() {
6645
6645
  setContext(function (ctx) {
6646
- var d = coreMod.getFlowdata(ctx);
6646
+ var d = fortuneCore.getFlowdata(ctx);
6647
6647
  if (d == null) return;
6648
- coreMod.updateFormat(ctx, refs.cellInput.current, d, "tr", value);
6648
+ fortuneCore.updateFormat(ctx, refs.cellInput.current, d, "tr", value);
6649
6649
  });
6650
6650
  setOpen(false);
6651
6651
  }
@@ -6664,7 +6664,7 @@ var Toolbar = function Toolbar(_ref) {
6664
6664
  text: sort.asc,
6665
6665
  onClick: function onClick() {
6666
6666
  setContext(function (ctx) {
6667
- coreMod.handleSort(ctx, true);
6667
+ fortuneCore.handleSort(ctx, true);
6668
6668
  });
6669
6669
  }
6670
6670
  }, {
@@ -6673,7 +6673,7 @@ var Toolbar = function Toolbar(_ref) {
6673
6673
  text: sort.desc,
6674
6674
  onClick: function onClick() {
6675
6675
  setContext(function (ctx) {
6676
- coreMod.handleSort(ctx, false);
6676
+ fortuneCore.handleSort(ctx, false);
6677
6677
  });
6678
6678
  }
6679
6679
  }, {
@@ -6685,7 +6685,7 @@ var Toolbar = function Toolbar(_ref) {
6685
6685
  text: filter.filter,
6686
6686
  onClick: function onClick() {
6687
6687
  return setContext(function (draftCtx) {
6688
- coreMod.createFilter(draftCtx);
6688
+ fortuneCore.createFilter(draftCtx);
6689
6689
  });
6690
6690
  }
6691
6691
  }, {
@@ -6694,7 +6694,7 @@ var Toolbar = function Toolbar(_ref) {
6694
6694
  text: filter.clearFilter,
6695
6695
  onClick: function onClick() {
6696
6696
  return setContext(function (draftCtx) {
6697
- coreMod.clearFilter(draftCtx);
6697
+ fortuneCore.clearFilter(draftCtx);
6698
6698
  });
6699
6699
  }
6700
6700
  }];
@@ -6728,11 +6728,11 @@ var Toolbar = function Toolbar(_ref) {
6728
6728
  iconId: name,
6729
6729
  tooltip: tooltip,
6730
6730
  key: name,
6731
- selected: (_toolbarItemSelectedF = coreMod.toolbarItemSelectedFunc(name)) === null || _toolbarItemSelectedF === void 0 ? void 0 : _toolbarItemSelectedF(cell),
6731
+ selected: (_toolbarItemSelectedF = fortuneCore.toolbarItemSelectedFunc(name)) === null || _toolbarItemSelectedF === void 0 ? void 0 : _toolbarItemSelectedF(cell),
6732
6732
  onClick: function onClick() {
6733
6733
  return setContext(function (draftCtx) {
6734
6734
  var _toolbarItemClickHand;
6735
- (_toolbarItemClickHand = coreMod.toolbarItemClickHandler(name)) === null || _toolbarItemClickHand === void 0 ? void 0 : _toolbarItemClickHand(draftCtx, refs.cellInput.current, refs.globalCache);
6735
+ (_toolbarItemClickHand = fortuneCore.toolbarItemClickHandler(name)) === null || _toolbarItemClickHand === void 0 ? void 0 : _toolbarItemClickHand(draftCtx, refs.cellInput.current, refs.globalCache);
6736
6736
  });
6737
6737
  }
6738
6738
  });
@@ -6791,12 +6791,12 @@ var LocationBox = function LocationBox() {
6791
6791
  var rf = lastSelection.row_focus;
6792
6792
  var cf = lastSelection.column_focus;
6793
6793
  if (context.config.merge != null && "".concat(rf, "_").concat(cf) in context.config.merge) {
6794
- return coreMod.getRangetxt(context, context.currentSheetId, {
6794
+ return fortuneCore.getRangetxt(context, context.currentSheetId, {
6795
6795
  column: [cf, cf],
6796
6796
  row: [rf, rf]
6797
6797
  });
6798
6798
  }
6799
- return coreMod.getRangetxt(context, context.currentSheetId, lastSelection);
6799
+ return fortuneCore.getRangetxt(context, context.currentSheetId, lastSelection);
6800
6800
  }, [context.currentSheetId, context.luckysheet_select_save]);
6801
6801
  return /*#__PURE__*/React__default['default'].createElement("div", {
6802
6802
  className: "fortune-name-box-container"
@@ -6829,11 +6829,11 @@ var FxEditor = function FxEditor() {
6829
6829
  var prevSheetId = usePrevious(context.currentSheetId);
6830
6830
  var recentText = React.useRef("");
6831
6831
  React.useEffect(function () {
6832
- setIsHidenRC(coreMod.isShowHidenCR(context));
6832
+ setIsHidenRC(fortuneCore.isShowHidenCR(context));
6833
6833
  if (___default['default'].isEqual(prevFirstSelection, firstSelection) && context.currentSheetId === prevSheetId) {
6834
6834
  return;
6835
6835
  }
6836
- var d = coreMod.getFlowdata(context);
6836
+ var d = fortuneCore.getFlowdata(context);
6837
6837
  var value = "";
6838
6838
  if (firstSelection) {
6839
6839
  var _d$r;
@@ -6842,15 +6842,15 @@ var FxEditor = function FxEditor() {
6842
6842
  if (___default['default'].isNil(r) || ___default['default'].isNil(c)) return;
6843
6843
  var cell = d === null || d === void 0 ? void 0 : (_d$r = d[r]) === null || _d$r === void 0 ? void 0 : _d$r[c];
6844
6844
  if (cell) {
6845
- if (coreMod.isInlineStringCell(cell)) {
6846
- value = coreMod.getInlineStringNoStyle(r, c, d);
6845
+ if (fortuneCore.isInlineStringCell(cell)) {
6846
+ value = fortuneCore.getInlineStringNoStyle(r, c, d);
6847
6847
  } else if (cell.f) {
6848
- value = coreMod.getCellValue(r, c, d, "f");
6848
+ value = fortuneCore.getCellValue(r, c, d, "f");
6849
6849
  } else {
6850
- value = coreMod.valueShowEs(r, c, d);
6850
+ value = fortuneCore.valueShowEs(r, c, d);
6851
6851
  }
6852
6852
  }
6853
- refs.fxInput.current.innerHTML = coreMod.escapeHTMLTag(coreMod.escapeScriptTag(value));
6853
+ refs.fxInput.current.innerHTML = fortuneCore.escapeHTMLTag(fortuneCore.escapeScriptTag(value));
6854
6854
  } else {
6855
6855
  refs.fxInput.current.innerHTML = "";
6856
6856
  }
@@ -6860,7 +6860,7 @@ var FxEditor = function FxEditor() {
6860
6860
  if (context.allowEdit === false) {
6861
6861
  return;
6862
6862
  }
6863
- if (((_context$luckysheet_s2 = (_context$luckysheet_s3 = context.luckysheet_select_save) === null || _context$luckysheet_s3 === void 0 ? void 0 : _context$luckysheet_s3.length) !== null && _context$luckysheet_s2 !== void 0 ? _context$luckysheet_s2 : 0) > 0 && !context.luckysheet_cell_selected_move && coreMod.isAllowEdit(context, context.luckysheet_select_save)) {
6863
+ if (((_context$luckysheet_s2 = (_context$luckysheet_s3 = context.luckysheet_select_save) === null || _context$luckysheet_s3 === void 0 ? void 0 : _context$luckysheet_s3.length) !== null && _context$luckysheet_s2 !== void 0 ? _context$luckysheet_s2 : 0) > 0 && !context.luckysheet_cell_selected_move && fortuneCore.isAllowEdit(context, context.luckysheet_select_save)) {
6864
6864
  setFocused(true);
6865
6865
  setContext(function (draftCtx) {
6866
6866
  var last = draftCtx.luckysheet_select_save[draftCtx.luckysheet_select_save.length - 1];
@@ -6887,34 +6887,34 @@ var FxEditor = function FxEditor() {
6887
6887
  case "Enter":
6888
6888
  {
6889
6889
  var lastCellUpdate = ___default['default'].clone(draftCtx.luckysheetCellUpdate);
6890
- coreMod.updateCell(draftCtx, draftCtx.luckysheetCellUpdate[0], draftCtx.luckysheetCellUpdate[1], refs.fxInput.current);
6890
+ fortuneCore.updateCell(draftCtx, draftCtx.luckysheetCellUpdate[0], draftCtx.luckysheetCellUpdate[1], refs.fxInput.current);
6891
6891
  draftCtx.luckysheet_select_save = [{
6892
6892
  row: [lastCellUpdate[0], lastCellUpdate[0]],
6893
6893
  column: [lastCellUpdate[1], lastCellUpdate[1]],
6894
6894
  row_focus: lastCellUpdate[0],
6895
6895
  column_focus: lastCellUpdate[1]
6896
6896
  }];
6897
- coreMod.moveHighlightCell(draftCtx, "down", 1, "rangeOfSelect");
6897
+ fortuneCore.moveHighlightCell(draftCtx, "down", 1, "rangeOfSelect");
6898
6898
  e.preventDefault();
6899
6899
  e.stopPropagation();
6900
6900
  break;
6901
6901
  }
6902
6902
  case "Escape":
6903
6903
  {
6904
- coreMod.cancelNormalSelected(draftCtx);
6905
- coreMod.moveHighlightCell(draftCtx, "down", 0, "rangeOfSelect");
6904
+ fortuneCore.cancelNormalSelected(draftCtx);
6905
+ fortuneCore.moveHighlightCell(draftCtx, "down", 0, "rangeOfSelect");
6906
6906
  e.preventDefault();
6907
6907
  e.stopPropagation();
6908
6908
  break;
6909
6909
  }
6910
6910
  case "ArrowLeft":
6911
6911
  {
6912
- coreMod.rangeHightlightselected(draftCtx, refs.fxInput.current);
6912
+ fortuneCore.rangeHightlightselected(draftCtx, refs.fxInput.current);
6913
6913
  break;
6914
6914
  }
6915
6915
  case "ArrowRight":
6916
6916
  {
6917
- coreMod.rangeHightlightselected(draftCtx, refs.fxInput.current);
6917
+ fortuneCore.rangeHightlightselected(draftCtx, refs.fxInput.current);
6918
6918
  break;
6919
6919
  }
6920
6920
  }
@@ -6928,7 +6928,7 @@ var FxEditor = function FxEditor() {
6928
6928
  if (!kcode) return;
6929
6929
  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) {
6930
6930
  setContext(function (draftCtx) {
6931
- coreMod.handleFormulaInput(draftCtx, refs.cellInput.current, refs.fxInput.current, kcode, recentText.current);
6931
+ fortuneCore.handleFormulaInput(draftCtx, refs.cellInput.current, refs.fxInput.current, kcode, recentText.current);
6932
6932
  });
6933
6933
  }
6934
6934
  }, [refs.cellInput, refs.fxInput, setContext]);
@@ -6939,7 +6939,7 @@ var FxEditor = function FxEditor() {
6939
6939
  if (isHidenRC) {
6940
6940
  return false;
6941
6941
  }
6942
- if (!coreMod.isAllowEdit(context, context.luckysheet_select_save)) {
6942
+ if (!fortuneCore.isAllowEdit(context, context.luckysheet_select_save)) {
6943
6943
  return false;
6944
6944
  }
6945
6945
  return true;
@@ -7044,7 +7044,7 @@ var SheetItem = function SheetItem(_ref) {
7044
7044
  var onBlur = React.useCallback(function () {
7045
7045
  setContext(function (draftCtx) {
7046
7046
  try {
7047
- coreMod.editSheetName(draftCtx, editable.current);
7047
+ fortuneCore.editSheetName(draftCtx, editable.current);
7048
7048
  } catch (e) {
7049
7049
  showAlert(e.message);
7050
7050
  }
@@ -7125,8 +7125,8 @@ var SheetItem = function SheetItem(_ref) {
7125
7125
  draftCtx.dataVerificationDropDownList = false;
7126
7126
  draftCtx.currentSheetId = sheet.id;
7127
7127
  draftCtx.zoomRatio = sheet.zoomRatio || 1;
7128
- coreMod.cancelActiveImgItem(draftCtx, refs.globalCache);
7129
- coreMod.cancelNormalSelected(draftCtx);
7128
+ fortuneCore.cancelActiveImgItem(draftCtx, refs.globalCache);
7129
+ fortuneCore.cancelNormalSelected(draftCtx);
7130
7130
  });
7131
7131
  },
7132
7132
  tabIndex: 0,
@@ -7249,11 +7249,11 @@ var ZoomControl = function ZoomControl() {
7249
7249
  }, []);
7250
7250
  var zoomTo = React.useCallback(function (val) {
7251
7251
  val = parseFloat(val.toFixed(1));
7252
- if (val > coreMod.MAX_ZOOM_RATIO || val < coreMod.MIN_ZOOM_RATIO) {
7252
+ if (val > fortuneCore.MAX_ZOOM_RATIO || val < fortuneCore.MIN_ZOOM_RATIO) {
7253
7253
  return;
7254
7254
  }
7255
7255
  setContext(function (ctx) {
7256
- var index = coreMod.getSheetIndex(ctx, ctx.currentSheetId);
7256
+ var index = fortuneCore.getSheetIndex(ctx, ctx.currentSheetId);
7257
7257
  if (index == null) {
7258
7258
  return;
7259
7259
  }
@@ -7352,9 +7352,9 @@ var SheetTab = function SheetTab() {
7352
7352
  return setTimeout(function () {
7353
7353
  setContext(function (draftCtx) {
7354
7354
  if (draftCtx.luckysheetCellUpdate.length > 0) {
7355
- coreMod.updateCell(draftCtx, draftCtx.luckysheetCellUpdate[0], draftCtx.luckysheetCellUpdate[1], refs.cellInput.current);
7355
+ fortuneCore.updateCell(draftCtx, draftCtx.luckysheetCellUpdate[0], draftCtx.luckysheetCellUpdate[1], refs.cellInput.current);
7356
7356
  }
7357
- coreMod.addSheet(draftCtx, settings);
7357
+ fortuneCore.addSheet(draftCtx, settings);
7358
7358
  }, {
7359
7359
  addSheetOp: true
7360
7360
  });
@@ -7496,7 +7496,7 @@ var CustomSort = function CustomSort() {
7496
7496
  _useState8 = _slicedToArray(_useState7, 2),
7497
7497
  isTitleChange = _useState8[0],
7498
7498
  setIstitleChange = _useState8[1];
7499
- var _locale = coreMod.locale(context),
7499
+ var _locale = fortuneCore.locale(context),
7500
7500
  sort = _locale.sort;
7501
7501
  var _useDialog = useDialog(),
7502
7502
  hideDialog = _useDialog.hideDialog;
@@ -7504,7 +7504,7 @@ var CustomSort = function CustomSort() {
7504
7504
  var col_end = context.luckysheet_select_save[0].column[1];
7505
7505
  var row_start = context.luckysheet_select_save[0].row[0];
7506
7506
  var row_end = context.luckysheet_select_save[0].row[1];
7507
- var sheetIndex = coreMod.getSheetIndex(context, context.currentSheetId);
7507
+ var sheetIndex = fortuneCore.getSheetIndex(context, context.currentSheetId);
7508
7508
  var handleSelectChange = function handleSelectChange(event) {
7509
7509
  setSelectedValue(event.target.value);
7510
7510
  };
@@ -7526,13 +7526,13 @@ var CustomSort = function CustomSort() {
7526
7526
  if (colHeaderValue) {
7527
7527
  list.push(colHeaderValue);
7528
7528
  } else {
7529
- var ColumnChar = coreMod.indexToColumnChar(i);
7529
+ var ColumnChar = fortuneCore.indexToColumnChar(i);
7530
7530
  list.push("".concat(sort.columnOperation, " ").concat(ColumnChar));
7531
7531
  }
7532
7532
  }
7533
7533
  } else {
7534
7534
  for (var _i = col_start; _i <= col_end; _i += 1) {
7535
- var _ColumnChar = coreMod.indexToColumnChar(_i);
7535
+ var _ColumnChar = fortuneCore.indexToColumnChar(_i);
7536
7536
  list.push(_ColumnChar);
7537
7537
  }
7538
7538
  }
@@ -7542,7 +7542,7 @@ var CustomSort = function CustomSort() {
7542
7542
  className: "fortune-sort"
7543
7543
  }, /*#__PURE__*/React__default['default'].createElement("div", {
7544
7544
  className: "fortune-sort-title"
7545
- }, /*#__PURE__*/React__default['default'].createElement("span", null, /*#__PURE__*/React__default['default'].createElement("span", null, sort.sortRangeTitle), coreMod.indexToColumnChar(col_start), row_start + 1, /*#__PURE__*/React__default['default'].createElement("span", null, sort.sortRangeTitleTo), coreMod.indexToColumnChar(col_end), row_end + 1)), /*#__PURE__*/React__default['default'].createElement("div", null, /*#__PURE__*/React__default['default'].createElement("div", {
7545
+ }, /*#__PURE__*/React__default['default'].createElement("span", null, /*#__PURE__*/React__default['default'].createElement("span", null, sort.sortRangeTitle), fortuneCore.indexToColumnChar(col_start), row_start + 1, /*#__PURE__*/React__default['default'].createElement("span", null, sort.sortRangeTitleTo), fortuneCore.indexToColumnChar(col_end), row_end + 1)), /*#__PURE__*/React__default['default'].createElement("div", null, /*#__PURE__*/React__default['default'].createElement("div", {
7546
7546
  className: "fortune-sort-modal"
7547
7547
  }, /*#__PURE__*/React__default['default'].createElement("div", null, /*#__PURE__*/React__default['default'].createElement("input", {
7548
7548
  type: "checkbox",
@@ -7581,7 +7581,7 @@ var CustomSort = function CustomSort() {
7581
7581
  className: "button-basic button-primary",
7582
7582
  onClick: function onClick() {
7583
7583
  setContext(function (draftCtx) {
7584
- coreMod.sortSelection(draftCtx, ascOrDesc, parseInt(selectedValue, 10));
7584
+ fortuneCore.sortSelection(draftCtx, ascOrDesc, parseInt(selectedValue, 10));
7585
7585
  draftCtx.contextMenu = {};
7586
7586
  });
7587
7587
  hideDialog();
@@ -7602,7 +7602,7 @@ var ContextMenu = function ContextMenu() {
7602
7602
  var contextMenu = context.contextMenu;
7603
7603
  var _useAlert = useAlert(),
7604
7604
  showAlert = _useAlert.showAlert;
7605
- var _locale = coreMod.locale(context),
7605
+ var _locale = fortuneCore.locale(context),
7606
7606
  rightclick = _locale.rightclick,
7607
7607
  drag = _locale.drag,
7608
7608
  generalDialog = _locale.generalDialog,
@@ -7626,7 +7626,7 @@ var ContextMenu = function ContextMenu() {
7626
7626
  draftCtx.contextMenu = {};
7627
7627
  return;
7628
7628
  }
7629
- coreMod.handleCopy(draftCtx);
7629
+ fortuneCore.handleCopy(draftCtx);
7630
7630
  draftCtx.contextMenu = {};
7631
7631
  });
7632
7632
  }
@@ -7646,7 +7646,7 @@ var ContextMenu = function ContextMenu() {
7646
7646
  case 2:
7647
7647
  clipboardText = _context.sent;
7648
7648
  setContext(function (draftCtx) {
7649
- coreMod.handlePasteByClick(draftCtx, clipboardText);
7649
+ fortuneCore.handlePasteByClick(draftCtx, clipboardText);
7650
7650
  draftCtx.contextMenu = {};
7651
7651
  });
7652
7652
  case 4:
@@ -7685,7 +7685,7 @@ var ContextMenu = function ContextMenu() {
7685
7685
  };
7686
7686
  setContext(function (draftCtx) {
7687
7687
  try {
7688
- coreMod.insertRowCol(draftCtx, insertRowColOp);
7688
+ fortuneCore.insertRowCol(draftCtx, insertRowColOp);
7689
7689
  draftCtx.contextMenu = {};
7690
7690
  } catch (err) {
7691
7691
  if (err.message === "maxExceeded") showAlert(rightclick.columnOverLimit, "ok");else if (err.message === "readOnly") showAlert(rightclick.cannotInsertOnColumnReadOnly, "ok");
@@ -7739,7 +7739,7 @@ var ContextMenu = function ContextMenu() {
7739
7739
  };
7740
7740
  setContext(function (draftCtx) {
7741
7741
  try {
7742
- coreMod.insertRowCol(draftCtx, insertRowColOp);
7742
+ fortuneCore.insertRowCol(draftCtx, insertRowColOp);
7743
7743
  draftCtx.contextMenu = {};
7744
7744
  } catch (err) {
7745
7745
  if (err.message === "maxExceeded") showAlert(rightclick.rowOverLimit, "ok");else if (err.message === "readOnly") showAlert(rightclick.cannotInsertOnRowReadOnly, "ok");
@@ -7793,14 +7793,14 @@ var ContextMenu = function ContextMenu() {
7793
7793
  return;
7794
7794
  }
7795
7795
  var slen = ed_index - st_index + 1;
7796
- var index = coreMod.getSheetIndex(draftCtx, context.currentSheetId);
7796
+ var index = fortuneCore.getSheetIndex(draftCtx, context.currentSheetId);
7797
7797
  if (((_draftCtx$luckysheetf = draftCtx.luckysheetfile[index].data) === null || _draftCtx$luckysheetf === void 0 ? void 0 : (_draftCtx$luckysheetf2 = _draftCtx$luckysheetf[0]) === null || _draftCtx$luckysheetf2 === void 0 ? void 0 : _draftCtx$luckysheetf2.length) <= slen) {
7798
7798
  showAlert(rightclick.cannotDeleteAllColumn, "ok");
7799
7799
  draftCtx.contextMenu = {};
7800
7800
  return;
7801
7801
  }
7802
7802
  try {
7803
- coreMod.deleteRowCol(draftCtx, deleteRowColOp);
7803
+ fortuneCore.deleteRowCol(draftCtx, deleteRowColOp);
7804
7804
  } catch (e) {
7805
7805
  if (e.message === "readOnly") {
7806
7806
  showAlert(rightclick.cannotDeleteColumnReadOnly, "ok");
@@ -7835,14 +7835,14 @@ var ContextMenu = function ContextMenu() {
7835
7835
  return;
7836
7836
  }
7837
7837
  var slen = ed_index - st_index + 1;
7838
- var index = coreMod.getSheetIndex(draftCtx, context.currentSheetId);
7838
+ var index = fortuneCore.getSheetIndex(draftCtx, context.currentSheetId);
7839
7839
  if (((_draftCtx$luckysheetf3 = draftCtx.luckysheetfile[index].data) === null || _draftCtx$luckysheetf3 === void 0 ? void 0 : _draftCtx$luckysheetf3.length) <= slen) {
7840
7840
  showAlert(rightclick.cannotDeleteAllRow, "ok");
7841
7841
  draftCtx.contextMenu = {};
7842
7842
  return;
7843
7843
  }
7844
7844
  try {
7845
- coreMod.deleteRowCol(draftCtx, deleteRowColOp);
7845
+ fortuneCore.deleteRowCol(draftCtx, deleteRowColOp);
7846
7846
  } catch (e) {
7847
7847
  if (e.message === "readOnly") {
7848
7848
  showAlert(rightclick.cannotDeleteRowReadOnly, "ok");
@@ -7863,9 +7863,9 @@ var ContextMenu = function ContextMenu() {
7863
7863
  setContext(function (draftCtx) {
7864
7864
  var msg = "";
7865
7865
  if (item === "hideSelected") {
7866
- msg = coreMod.hideSelected(draftCtx, "row");
7866
+ msg = fortuneCore.hideSelected(draftCtx, "row");
7867
7867
  } else if (item === "showHide") {
7868
- coreMod.showSelected(draftCtx, "row");
7868
+ fortuneCore.showSelected(draftCtx, "row");
7869
7869
  }
7870
7870
  if (msg === "noMulti") {
7871
7871
  showDialog(drag.noMulti);
@@ -7884,9 +7884,9 @@ var ContextMenu = function ContextMenu() {
7884
7884
  setContext(function (draftCtx) {
7885
7885
  var msg = "";
7886
7886
  if (item === "hideSelected") {
7887
- msg = coreMod.hideSelected(draftCtx, "column");
7887
+ msg = fortuneCore.hideSelected(draftCtx, "column");
7888
7888
  } else if (item === "showHide") {
7889
- coreMod.showSelected(draftCtx, "column");
7889
+ fortuneCore.showSelected(draftCtx, "column");
7890
7890
  }
7891
7891
  if (msg === "noMulti") {
7892
7892
  showDialog(drag.noMulti);
@@ -7923,7 +7923,7 @@ var ContextMenu = function ContextMenu() {
7923
7923
  rowHeightList[rowNum] = numRowHeight;
7924
7924
  }
7925
7925
  });
7926
- coreMod.api.setRowHeight(draftCtx, rowHeightList, {}, true);
7926
+ fortuneCore.api.setRowHeight(draftCtx, rowHeightList, {}, true);
7927
7927
  draftCtx.contextMenu = {};
7928
7928
  });
7929
7929
  }
@@ -7972,7 +7972,7 @@ var ContextMenu = function ContextMenu() {
7972
7972
  colWidthList[colNum] = numColWidth;
7973
7973
  }
7974
7974
  });
7975
- coreMod.api.setColumnWidth(draftCtx, colWidthList, {}, true);
7975
+ fortuneCore.api.setColumnWidth(draftCtx, colWidthList, {}, true);
7976
7976
  draftCtx.contextMenu = {};
7977
7977
  });
7978
7978
  }
@@ -8000,12 +8000,12 @@ var ContextMenu = function ContextMenu() {
8000
8000
  key: name,
8001
8001
  onClick: function onClick() {
8002
8002
  setContext(function (draftCtx) {
8003
- var allowEdit = coreMod.isAllowEdit(draftCtx);
8003
+ var allowEdit = fortuneCore.isAllowEdit(draftCtx);
8004
8004
  if (!allowEdit) return;
8005
8005
  if (draftCtx.activeImg != null) {
8006
- coreMod.removeActiveImage(draftCtx);
8006
+ fortuneCore.removeActiveImage(draftCtx);
8007
8007
  } else {
8008
- var msg = coreMod.deleteSelectedCellText(draftCtx);
8008
+ var msg = fortuneCore.deleteSelectedCellText(draftCtx);
8009
8009
  if (msg === "partMC") {
8010
8010
  showDialog(generalDialog.partiallyError, "ok");
8011
8011
  } else if (msg === "allowEdit") {
@@ -8015,7 +8015,7 @@ var ContextMenu = function ContextMenu() {
8015
8015
  }
8016
8016
  }
8017
8017
  draftCtx.contextMenu = {};
8018
- coreMod.jfrefreshgrid(draftCtx, null, undefined);
8018
+ fortuneCore.jfrefreshgrid(draftCtx, null, undefined);
8019
8019
  });
8020
8020
  }
8021
8021
  }, rightclick.clearContent);
@@ -8025,7 +8025,7 @@ var ContextMenu = function ContextMenu() {
8025
8025
  key: name,
8026
8026
  onClick: function onClick() {
8027
8027
  setContext(function (draftCtx) {
8028
- coreMod.sortSelection(draftCtx, true);
8028
+ fortuneCore.sortSelection(draftCtx, true);
8029
8029
  draftCtx.contextMenu = {};
8030
8030
  });
8031
8031
  }
@@ -8036,7 +8036,7 @@ var ContextMenu = function ContextMenu() {
8036
8036
  key: name,
8037
8037
  onClick: function onClick() {
8038
8038
  setContext(function (draftCtx) {
8039
- coreMod.sortSelection(draftCtx, false);
8039
+ fortuneCore.sortSelection(draftCtx, false);
8040
8040
  draftCtx.contextMenu = {};
8041
8041
  });
8042
8042
  }
@@ -8058,7 +8058,7 @@ var ContextMenu = function ContextMenu() {
8058
8058
  key: name,
8059
8059
  onClick: function onClick() {
8060
8060
  setContext(function (draftCtx) {
8061
- coreMod.createFilter(draftCtx);
8061
+ fortuneCore.createFilter(draftCtx);
8062
8062
  draftCtx.contextMenu = {};
8063
8063
  });
8064
8064
  }
@@ -8069,7 +8069,7 @@ var ContextMenu = function ContextMenu() {
8069
8069
  key: name,
8070
8070
  onClick: function onClick() {
8071
8071
  setContext(function (draftCtx) {
8072
- coreMod.showImgChooser();
8072
+ fortuneCore.showImgChooser();
8073
8073
  draftCtx.contextMenu = {};
8074
8074
  });
8075
8075
  }
@@ -8080,7 +8080,7 @@ var ContextMenu = function ContextMenu() {
8080
8080
  key: name,
8081
8081
  onClick: function onClick() {
8082
8082
  setContext(function (draftCtx) {
8083
- coreMod.handleLink(draftCtx);
8083
+ fortuneCore.handleLink(draftCtx);
8084
8084
  draftCtx.contextMenu = {};
8085
8085
  });
8086
8086
  }
@@ -9555,7 +9555,7 @@ var ChangeColor = function ChangeColor(_ref) {
9555
9555
  var _useContext = React.useContext(WorkbookContext),
9556
9556
  context = _useContext.context,
9557
9557
  setContext = _useContext.setContext;
9558
- var _locale = coreMod.locale(context),
9558
+ var _locale = fortuneCore.locale(context),
9559
9559
  toolbar = _locale.toolbar,
9560
9560
  sheetconfig = _locale.sheetconfig,
9561
9561
  button = _locale.button;
@@ -9563,7 +9563,7 @@ var ChangeColor = function ChangeColor(_ref) {
9563
9563
  _useState2 = _slicedToArray(_useState, 2),
9564
9564
  inputColor = _useState2[0],
9565
9565
  setInputColor = _useState2[1];
9566
- var _useState3 = React.useState(context.luckysheetfile[coreMod.getSheetIndex(context, context.currentSheetId)].color),
9566
+ var _useState3 = React.useState(context.luckysheetfile[fortuneCore.getSheetIndex(context, context.currentSheetId)].color),
9567
9567
  _useState4 = _slicedToArray(_useState3, 2),
9568
9568
  selectColor = _useState4[0],
9569
9569
  setSelectColor = _useState4[1];
@@ -9573,7 +9573,7 @@ var ChangeColor = function ChangeColor(_ref) {
9573
9573
  React.useEffect(function () {
9574
9574
  setContext(function (ctx) {
9575
9575
  if (ctx.allowEdit === false) return;
9576
- var index = coreMod.getSheetIndex(ctx, ctx.currentSheetId);
9576
+ var index = fortuneCore.getSheetIndex(ctx, ctx.currentSheetId);
9577
9577
  ctx.luckysheetfile[index].color = selectColor;
9578
9578
  });
9579
9579
  }, [selectColor, setContext]);
@@ -9624,7 +9624,7 @@ var SheetTabContextMenu = function SheetTabContextMenu() {
9624
9624
  y = _context$sheetTabCont.y,
9625
9625
  sheet = _context$sheetTabCont.sheet,
9626
9626
  onRename = _context$sheetTabCont.onRename;
9627
- var _locale = coreMod.locale(context),
9627
+ var _locale = fortuneCore.locale(context),
9628
9628
  sheetconfig = _locale.sheetconfig;
9629
9629
  var _useState = React.useState({
9630
9630
  x: -1,
@@ -9672,7 +9672,7 @@ var SheetTabContextMenu = function SheetTabContextMenu() {
9672
9672
  currentOrder = i;
9673
9673
  }
9674
9674
  });
9675
- coreMod.api.setSheetOrder(ctx, _defineProperty({}, sheet.id, currentOrder + delta));
9675
+ fortuneCore.api.setSheetOrder(ctx, _defineProperty({}, sheet.id, currentOrder + delta));
9676
9676
  });
9677
9677
  }, [context.allowEdit, setContext, sheet]);
9678
9678
  var hideSheet = React.useCallback(function () {
@@ -9683,7 +9683,7 @@ var SheetTabContextMenu = function SheetTabContextMenu() {
9683
9683
  return ___default['default'].isUndefined(oneSheet.hide) || (oneSheet === null || oneSheet === void 0 ? void 0 : oneSheet.hide) !== 1;
9684
9684
  });
9685
9685
  if (shownSheets.length > 1) {
9686
- coreMod.api.hideSheet(ctx, sheet.id);
9686
+ fortuneCore.api.hideSheet(ctx, sheet.id);
9687
9687
  } else {
9688
9688
  showAlert(sheetconfig.noMoreSheet, "ok");
9689
9689
  }
@@ -9693,7 +9693,7 @@ var SheetTabContextMenu = function SheetTabContextMenu() {
9693
9693
  if (context.allowEdit === false) return;
9694
9694
  if (!(sheet === null || sheet === void 0 ? void 0 : sheet.id)) return;
9695
9695
  setContext(function (ctx) {
9696
- coreMod.api.copySheet(ctx, sheet.id);
9696
+ fortuneCore.api.copySheet(ctx, sheet.id);
9697
9697
  }, {
9698
9698
  addSheetOp: true
9699
9699
  });
@@ -9733,7 +9733,7 @@ var SheetTabContextMenu = function SheetTabContextMenu() {
9733
9733
  if (context.luckysheetfile.length > 1 && shownSheets.length > 1) {
9734
9734
  showAlert(sheetconfig.confirmDelete, "yesno", function () {
9735
9735
  setContext(function (ctx) {
9736
- coreMod.deleteSheet(ctx, sheet.id);
9736
+ fortuneCore.deleteSheet(ctx, sheet.id);
9737
9737
  }, {
9738
9738
  deleteSheetOp: {
9739
9739
  id: sheet.id
@@ -9846,7 +9846,7 @@ function generateAPIs(context, setContext, handleUndo, handleRedo, settings, cel
9846
9846
  applyOp: function applyOp(ops) {
9847
9847
  setContext(function (ctx_) {
9848
9848
  var _ops$, _ops$$path, _ops$2, _ops$2$path, _ops$3;
9849
- var _opToPatch = coreMod.opToPatch(ctx_, ops),
9849
+ var _opToPatch = fortuneCore.opToPatch(ctx_, ops),
9850
9850
  _opToPatch2 = _slicedToArray(_opToPatch, 2),
9851
9851
  patches = _opToPatch2[0],
9852
9852
  specialOps = _opToPatch2[1];
@@ -9855,24 +9855,24 @@ function generateAPIs(context, setContext, handleUndo, handleRedo, settings, cel
9855
9855
  specialOp = _specialOps[0];
9856
9856
  if (specialOp.op === "insertRowCol") {
9857
9857
  try {
9858
- coreMod.insertRowCol(ctx_, specialOp.value, false);
9858
+ fortuneCore.insertRowCol(ctx_, specialOp.value, false);
9859
9859
  } catch (e) {
9860
9860
  console.error(e);
9861
9861
  }
9862
9862
  } else if (specialOp.op === "deleteRowCol") {
9863
- coreMod.deleteRowCol(ctx_, specialOp.value);
9863
+ fortuneCore.deleteRowCol(ctx_, specialOp.value);
9864
9864
  } else if (specialOp.op === "addSheet") {
9865
9865
  var _patches$filter, _patches$filter$, _specialOp$value;
9866
9866
  var name = (_patches$filter = patches.filter(function (path) {
9867
9867
  return path.path[0] === "name";
9868
9868
  })) === null || _patches$filter === void 0 ? void 0 : (_patches$filter$ = _patches$filter[0]) === null || _patches$filter$ === void 0 ? void 0 : _patches$filter$.value;
9869
9869
  if ((_specialOp$value = specialOp.value) === null || _specialOp$value === void 0 ? void 0 : _specialOp$value.id) {
9870
- coreMod.addSheet(ctx_, settings, specialOp.value.id, false, name, specialOp.value);
9870
+ fortuneCore.addSheet(ctx_, settings, specialOp.value.id, false, name, specialOp.value);
9871
9871
  }
9872
- var fileIndex = coreMod.getSheetIndex(ctx_, specialOp.value.id);
9873
- coreMod.api.initSheetData(ctx_, fileIndex, specialOp.value);
9872
+ var fileIndex = fortuneCore.getSheetIndex(ctx_, specialOp.value.id);
9873
+ fortuneCore.api.initSheetData(ctx_, fileIndex, specialOp.value);
9874
9874
  } else if (specialOp.op === "deleteSheet") {
9875
- coreMod.deleteSheet(ctx_, specialOp.value.id);
9875
+ fortuneCore.deleteSheet(ctx_, specialOp.value.id);
9876
9876
  patches.length = 0;
9877
9877
  }
9878
9878
  }
@@ -9886,7 +9886,7 @@ function generateAPIs(context, setContext, handleUndo, handleRedo, settings, cel
9886
9886
  })[0].id;
9887
9887
  }
9888
9888
  }
9889
- coreMod.createFilterOptions(ctx_, ctx_.luckysheet_filter_save, (_ops$3 = ops[0]) === null || _ops$3 === void 0 ? void 0 : _ops$3.id);
9889
+ fortuneCore.createFilterOptions(ctx_, ctx_.luckysheet_filter_save, (_ops$3 = ops[0]) === null || _ops$3 === void 0 ? void 0 : _ops$3.id);
9890
9890
  if (patches.length === 0) return;
9891
9891
  try {
9892
9892
  produce.applyPatches(ctx_, patches);
@@ -9899,174 +9899,174 @@ function generateAPIs(context, setContext, handleUndo, handleRedo, settings, cel
9899
9899
  },
9900
9900
  getCellValue: function getCellValue(row, column) {
9901
9901
  var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
9902
- return coreMod.api.getCellValue(context, row, column, options);
9902
+ return fortuneCore.api.getCellValue(context, row, column, options);
9903
9903
  },
9904
9904
  setCellValue: function setCellValue(row, column, value) {
9905
9905
  var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
9906
9906
  return setContext(function (draftCtx) {
9907
- return coreMod.api.setCellValue(draftCtx, row, column, value, cellInput, options);
9907
+ return fortuneCore.api.setCellValue(draftCtx, row, column, value, cellInput, options);
9908
9908
  });
9909
9909
  },
9910
9910
  clearCell: function clearCell(row, column) {
9911
9911
  var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
9912
9912
  return setContext(function (draftCtx) {
9913
- return coreMod.api.clearCell(draftCtx, row, column, options);
9913
+ return fortuneCore.api.clearCell(draftCtx, row, column, options);
9914
9914
  });
9915
9915
  },
9916
9916
  setCellFormat: function setCellFormat(row, column, attr, value) {
9917
9917
  var options = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {};
9918
9918
  return setContext(function (draftCtx) {
9919
- return coreMod.api.setCellFormat(draftCtx, row, column, attr, value, options);
9919
+ return fortuneCore.api.setCellFormat(draftCtx, row, column, attr, value, options);
9920
9920
  });
9921
9921
  },
9922
9922
  autoFillCell: function autoFillCell(copyRange, applyRange, direction) {
9923
9923
  return setContext(function (draftCtx) {
9924
- return coreMod.api.autoFillCell(draftCtx, copyRange, applyRange, direction);
9924
+ return fortuneCore.api.autoFillCell(draftCtx, copyRange, applyRange, direction);
9925
9925
  });
9926
9926
  },
9927
9927
  freeze: function freeze(type, range) {
9928
9928
  var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
9929
9929
  return setContext(function (draftCtx) {
9930
- return coreMod.api.freeze(draftCtx, type, range, options);
9930
+ return fortuneCore.api.freeze(draftCtx, type, range, options);
9931
9931
  });
9932
9932
  },
9933
9933
  insertRowOrColumn: function insertRowOrColumn(type, index, count) {
9934
9934
  var direction = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : "rightbottom";
9935
9935
  var options = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {};
9936
9936
  return setContext(function (draftCtx) {
9937
- return coreMod.api.insertRowOrColumn(draftCtx, type, index, count, direction, options);
9937
+ return fortuneCore.api.insertRowOrColumn(draftCtx, type, index, count, direction, options);
9938
9938
  });
9939
9939
  },
9940
9940
  deleteRowOrColumn: function deleteRowOrColumn(type, start, end) {
9941
9941
  var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
9942
9942
  return setContext(function (draftCtx) {
9943
- return coreMod.api.deleteRowOrColumn(draftCtx, type, start, end, options);
9943
+ return fortuneCore.api.deleteRowOrColumn(draftCtx, type, start, end, options);
9944
9944
  });
9945
9945
  },
9946
9946
  hideRowOrColumn: function hideRowOrColumn(rowOrColInfo, type) {
9947
9947
  return setContext(function (draftCtx) {
9948
- return coreMod.api.hideRowOrColumn(draftCtx, rowOrColInfo, type);
9948
+ return fortuneCore.api.hideRowOrColumn(draftCtx, rowOrColInfo, type);
9949
9949
  });
9950
9950
  },
9951
9951
  showRowOrColumn: function showRowOrColumn(rowOrColInfo, type) {
9952
9952
  return setContext(function (draftCtx) {
9953
- return coreMod.api.showRowOrColumn(draftCtx, rowOrColInfo, type);
9953
+ return fortuneCore.api.showRowOrColumn(draftCtx, rowOrColInfo, type);
9954
9954
  });
9955
9955
  },
9956
9956
  setRowHeight: function setRowHeight(rowInfo) {
9957
9957
  var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
9958
9958
  var custom = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
9959
9959
  return setContext(function (draftCtx) {
9960
- return coreMod.api.setRowHeight(draftCtx, rowInfo, options, custom);
9960
+ return fortuneCore.api.setRowHeight(draftCtx, rowInfo, options, custom);
9961
9961
  });
9962
9962
  },
9963
9963
  setColumnWidth: function setColumnWidth(columnInfo) {
9964
9964
  var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
9965
9965
  var custom = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
9966
9966
  return setContext(function (draftCtx) {
9967
- return coreMod.api.setColumnWidth(draftCtx, columnInfo, options, custom);
9967
+ return fortuneCore.api.setColumnWidth(draftCtx, columnInfo, options, custom);
9968
9968
  });
9969
9969
  },
9970
9970
  getRowHeight: function getRowHeight(rows) {
9971
9971
  var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
9972
- return coreMod.api.getRowHeight(context, rows, options);
9972
+ return fortuneCore.api.getRowHeight(context, rows, options);
9973
9973
  },
9974
9974
  getColumnWidth: function getColumnWidth(columns) {
9975
9975
  var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
9976
- return coreMod.api.getColumnWidth(context, columns, options);
9976
+ return fortuneCore.api.getColumnWidth(context, columns, options);
9977
9977
  },
9978
9978
  getSelection: function getSelection() {
9979
- return coreMod.api.getSelection(context);
9979
+ return fortuneCore.api.getSelection(context);
9980
9980
  },
9981
9981
  getFlattenRange: function getFlattenRange(range) {
9982
- return coreMod.api.getFlattenRange(context, range);
9982
+ return fortuneCore.api.getFlattenRange(context, range);
9983
9983
  },
9984
9984
  getCellsByFlattenRange: function getCellsByFlattenRange(range) {
9985
- return coreMod.api.getCellsByFlattenRange(context, range);
9985
+ return fortuneCore.api.getCellsByFlattenRange(context, range);
9986
9986
  },
9987
9987
  getSelectionCoordinates: function getSelectionCoordinates() {
9988
- return coreMod.api.getSelectionCoordinates(context);
9988
+ return fortuneCore.api.getSelectionCoordinates(context);
9989
9989
  },
9990
9990
  getCellsByRange: function getCellsByRange(range) {
9991
9991
  var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
9992
- return coreMod.api.getCellsByRange(context, range, options);
9992
+ return fortuneCore.api.getCellsByRange(context, range, options);
9993
9993
  },
9994
9994
  getHtmlByRange: function getHtmlByRange(range) {
9995
9995
  var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
9996
- return coreMod.api.getHtmlByRange(context, range, options);
9996
+ return fortuneCore.api.getHtmlByRange(context, range, options);
9997
9997
  },
9998
9998
  setSelection: function setSelection(range) {
9999
9999
  var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
10000
10000
  return setContext(function (draftCtx) {
10001
- return coreMod.api.setSelection(draftCtx, range, options);
10001
+ return fortuneCore.api.setSelection(draftCtx, range, options);
10002
10002
  });
10003
10003
  },
10004
10004
  setCellValuesByRange: function setCellValuesByRange(data, range) {
10005
10005
  var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
10006
10006
  return setContext(function (draftCtx) {
10007
- return coreMod.api.setCellValuesByRange(draftCtx, data, range, cellInput, options);
10007
+ return fortuneCore.api.setCellValuesByRange(draftCtx, data, range, cellInput, options);
10008
10008
  });
10009
10009
  },
10010
10010
  setCellFormatByRange: function setCellFormatByRange(attr, value, range) {
10011
10011
  var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
10012
10012
  return setContext(function (draftCtx) {
10013
- return coreMod.api.setCellFormatByRange(draftCtx, attr, value, range, options);
10013
+ return fortuneCore.api.setCellFormatByRange(draftCtx, attr, value, range, options);
10014
10014
  });
10015
10015
  },
10016
10016
  mergeCells: function mergeCells(ranges, type) {
10017
10017
  var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
10018
10018
  return setContext(function (draftCtx) {
10019
- return coreMod.api.mergeCells(draftCtx, ranges, type, options);
10019
+ return fortuneCore.api.mergeCells(draftCtx, ranges, type, options);
10020
10020
  });
10021
10021
  },
10022
10022
  cancelMerge: function cancelMerge(ranges) {
10023
10023
  var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
10024
10024
  return setContext(function (draftCtx) {
10025
- return coreMod.api.cancelMerge(draftCtx, ranges, options);
10025
+ return fortuneCore.api.cancelMerge(draftCtx, ranges, options);
10026
10026
  });
10027
10027
  },
10028
10028
  getAllSheets: function getAllSheets() {
10029
- return coreMod.api.getAllSheets(context);
10029
+ return fortuneCore.api.getAllSheets(context);
10030
10030
  },
10031
10031
  getSheet: function getSheet() {
10032
10032
  var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
10033
- return coreMod.api.getSheetWithLatestCelldata(context, options);
10033
+ return fortuneCore.api.getSheetWithLatestCelldata(context, options);
10034
10034
  },
10035
10035
  addSheet: function addSheet() {
10036
10036
  return setContext(function (draftCtx) {
10037
- return coreMod.api.addSheet(draftCtx, settings);
10037
+ return fortuneCore.api.addSheet(draftCtx, settings);
10038
10038
  });
10039
10039
  },
10040
10040
  deleteSheet: function deleteSheet() {
10041
10041
  var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
10042
10042
  return setContext(function (draftCtx) {
10043
- return coreMod.api.deleteSheet(draftCtx, options);
10043
+ return fortuneCore.api.deleteSheet(draftCtx, options);
10044
10044
  });
10045
10045
  },
10046
10046
  updateSheet: function updateSheet(data) {
10047
10047
  return setContext(function (draftCtx) {
10048
- return coreMod.api.updateSheet(draftCtx, data);
10048
+ return fortuneCore.api.updateSheet(draftCtx, data);
10049
10049
  });
10050
10050
  },
10051
10051
  activateSheet: function activateSheet() {
10052
10052
  var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
10053
10053
  return setContext(function (draftCtx) {
10054
- return coreMod.api.activateSheet(draftCtx, options);
10054
+ return fortuneCore.api.activateSheet(draftCtx, options);
10055
10055
  });
10056
10056
  },
10057
10057
  setSheetName: function setSheetName(name) {
10058
10058
  var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
10059
10059
  return setContext(function (draftCtx) {
10060
- return coreMod.api.setSheetName(draftCtx, name, options);
10060
+ return fortuneCore.api.setSheetName(draftCtx, name, options);
10061
10061
  });
10062
10062
  },
10063
10063
  setSheetOrder: function setSheetOrder(orderList) {
10064
10064
  return setContext(function (draftCtx) {
10065
- return coreMod.api.setSheetOrder(draftCtx, orderList);
10065
+ return fortuneCore.api.setSheetOrder(draftCtx, orderList);
10066
10066
  });
10067
10067
  },
10068
10068
  scroll: function scroll(options) {
10069
- return coreMod.api.scroll(context, scrollbarX, scrollbarY, options);
10069
+ return fortuneCore.api.scroll(context, scrollbarX, scrollbarY, options);
10070
10070
  },
10071
10071
  addPresences: function addPresences(newPresences) {
10072
10072
  setContext(function (draftCtx) {
@@ -10089,15 +10089,15 @@ function generateAPIs(context, setContext, handleUndo, handleRedo, settings, cel
10089
10089
  calculateFormula: function calculateFormula() {
10090
10090
  setContext(function (draftCtx) {
10091
10091
  ___default['default'].forEach(draftCtx.luckysheetfile, function (sheet_obj) {
10092
- coreMod.api.calculateSheetFromula(draftCtx, sheet_obj.id);
10092
+ fortuneCore.api.calculateSheetFromula(draftCtx, sheet_obj.id);
10093
10093
  });
10094
10094
  });
10095
10095
  },
10096
10096
  dataToCelldata: function dataToCelldata(data) {
10097
- return coreMod.api.dataToCelldata(data);
10097
+ return fortuneCore.api.dataToCelldata(data);
10098
10098
  },
10099
10099
  celldataToData: function celldataToData(celldata, rowCount, colCount) {
10100
- return coreMod.api.celldataToData(celldata, rowCount, colCount);
10100
+ return fortuneCore.api.celldataToData(celldata, rowCount, colCount);
10101
10101
  }
10102
10102
  };
10103
10103
  }
@@ -10231,7 +10231,7 @@ var FilterMenu = function FilterMenu() {
10231
10231
  endCol = _ref4.endCol,
10232
10232
  col = _ref4.col,
10233
10233
  listBoxMaxHeight = _ref4.listBoxMaxHeight;
10234
- var _locale = coreMod.locale(context),
10234
+ var _locale = fortuneCore.locale(context),
10235
10235
  filter = _locale.filter;
10236
10236
  var _useState3 = React.useState({
10237
10237
  dates: [],
@@ -10341,7 +10341,7 @@ var FilterMenu = function FilterMenu() {
10341
10341
  var sortData = React.useCallback(function (asc) {
10342
10342
  if (col == null) return;
10343
10343
  setContext(function (draftCtx) {
10344
- var errMsg = coreMod.orderbydatafiler(draftCtx, startRow, startCol, endRow, endCol, col, asc);
10344
+ var errMsg = fortuneCore.orderbydatafiler(draftCtx, startRow, startCol, endRow, endCol, col, asc);
10345
10345
  if (errMsg != null) showAlert(errMsg);
10346
10346
  });
10347
10347
  }, [col, setContext, startRow, startCol, endRow, endCol, showAlert]);
@@ -10436,7 +10436,7 @@ var FilterMenu = function FilterMenu() {
10436
10436
  setShowSubMenu(false);
10437
10437
  dateTreeExpandState.current = {};
10438
10438
  hiddenRows.current = (filterContextMenu === null || filterContextMenu === void 0 ? void 0 : filterContextMenu.hiddenRows) || [];
10439
- var res = coreMod.getFilterColumnValues(contextRef.current, col, startRow, endRow, startCol);
10439
+ var res = fortuneCore.getFilterColumnValues(contextRef.current, col, startRow, endRow, startCol);
10440
10440
  setData(___default['default'].omit(res, ["datesUncheck", "valuesUncheck"]));
10441
10441
  setDatesUncheck(res.datesUncheck);
10442
10442
  setValuesUncheck(res.valuesUncheck);
@@ -10444,7 +10444,7 @@ var FilterMenu = function FilterMenu() {
10444
10444
  }, [col, endRow, startRow, startCol, hiddenRows, filterContextMenu === null || filterContextMenu === void 0 ? void 0 : filterContextMenu.hiddenRows]);
10445
10445
  React.useEffect(function () {
10446
10446
  if (col == null) return;
10447
- setFilterColors(coreMod.getFilterColumnColors(contextRef.current, col, startRow, endRow));
10447
+ setFilterColors(fortuneCore.getFilterColumnColors(contextRef.current, col, startRow, endRow));
10448
10448
  }, [col, endRow, startRow]);
10449
10449
  if (filterContextMenu == null) return null;
10450
10450
  return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement("div", {
@@ -10637,7 +10637,7 @@ var FilterMenu = function FilterMenu() {
10637
10637
  pre[curr] = 0;
10638
10638
  return pre;
10639
10639
  }, {});
10640
- coreMod.saveFilter(draftCtx, hiddenRows.current.length > 0, rowHidden, {}, startRow, endRow, col, startCol, endCol);
10640
+ fortuneCore.saveFilter(draftCtx, hiddenRows.current.length > 0, rowHidden, {}, startRow, endRow, col, startCol, endCol);
10641
10641
  hiddenRows.current = [];
10642
10642
  draftCtx.filterContextMenu = undefined;
10643
10643
  });
@@ -10655,7 +10655,7 @@ var FilterMenu = function FilterMenu() {
10655
10655
  className: "button-basic button-danger",
10656
10656
  onClick: function onClick() {
10657
10657
  setContext(function (draftCtx) {
10658
- coreMod.clearFilter(draftCtx);
10658
+ fortuneCore.clearFilter(draftCtx);
10659
10659
  });
10660
10660
  },
10661
10661
  tabIndex: 0
@@ -10693,7 +10693,7 @@ var FilterMenu = function FilterMenu() {
10693
10693
  pre[curr] = 0;
10694
10694
  return pre;
10695
10695
  }, {});
10696
- coreMod.saveFilter(draftCtx, !___default['default'].isEmpty(rowHidden), rowHidden, {}, startRow, endRow, col, startCol, endCol);
10696
+ fortuneCore.saveFilter(draftCtx, !___default['default'].isEmpty(rowHidden), rowHidden, {}, startRow, endRow, col, startCol, endCol);
10697
10697
  hiddenRows.current = [];
10698
10698
  draftCtx.filterContextMenu = undefined;
10699
10699
  });
@@ -10712,7 +10712,7 @@ var SheetHiddenButton = function SheetHiddenButton(_ref) {
10712
10712
  if (context.allowEdit === false) return;
10713
10713
  if (!sheet) return;
10714
10714
  setContext(function (ctx) {
10715
- coreMod.api.showSheet(ctx, sheet.id);
10715
+ fortuneCore.api.showSheet(ctx, sheet.id);
10716
10716
  });
10717
10717
  }, [context.allowEdit, setContext, sheet]);
10718
10718
  return /*#__PURE__*/React__default['default'].createElement("div", {
@@ -10775,8 +10775,8 @@ var SheetListItem = function SheetListItem(_ref) {
10775
10775
  };
10776
10776
  draftCtx.currentSheetId = sheet.id;
10777
10777
  draftCtx.zoomRatio = sheet.zoomRatio || 1;
10778
- coreMod.cancelActiveImgItem(draftCtx, refs.globalCache);
10779
- coreMod.cancelNormalSelected(draftCtx);
10778
+ fortuneCore.cancelActiveImgItem(draftCtx, refs.globalCache);
10779
+ fortuneCore.cancelNormalSelected(draftCtx);
10780
10780
  });
10781
10781
  },
10782
10782
  tabIndex: 0
@@ -10831,7 +10831,7 @@ var _excluded = ["onChange", "onOp", "data"];
10831
10831
  produce.enablePatches();
10832
10832
  var triggerGroupValuesRefresh = function triggerGroupValuesRefresh(ctx) {
10833
10833
  if (ctx.groupValuesRefreshData.length > 0) {
10834
- coreMod.groupValuesRefresh(ctx);
10834
+ fortuneCore.groupValuesRefresh(ctx);
10835
10835
  }
10836
10836
  };
10837
10837
  var concatProducer = function concatProducer() {
@@ -10873,11 +10873,11 @@ var Workbook = /*#__PURE__*/React__default['default'].forwardRef(function (_ref,
10873
10873
  workbookContainer: workbookContainer
10874
10874
  };
10875
10875
  }, []);
10876
- var _useState = React.useState(coreMod.defaultContext(refs)),
10876
+ var _useState = React.useState(fortuneCore.defaultContext(refs)),
10877
10877
  _useState2 = _slicedToArray(_useState, 2),
10878
10878
  context = _useState2[0],
10879
10879
  setContext = _useState2[1];
10880
- var _locale = coreMod.locale(context),
10880
+ var _locale = fortuneCore.locale(context),
10881
10881
  formula = _locale.formula;
10882
10882
  var _useState3 = React.useState(null),
10883
10883
  _useState4 = _slicedToArray(_useState3, 2),
@@ -10895,13 +10895,13 @@ var Workbook = /*#__PURE__*/React__default['default'].forwardRef(function (_ref,
10895
10895
  calInfo = _useState6[0],
10896
10896
  setCalInfo = _useState6[1];
10897
10897
  var mergedSettings = React.useMemo(function () {
10898
- return ___default['default'].assign(___default['default'].cloneDeep(coreMod.defaultSettings), props);
10898
+ return ___default['default'].assign(___default['default'].cloneDeep(fortuneCore.defaultSettings), props);
10899
10899
  }, _toConsumableArray(___default['default'].values(props)));
10900
10900
  React.useEffect(function () {
10901
10901
  var selection = context.luckysheet_select_save;
10902
10902
  var lang = props.lang;
10903
10903
  if (selection) {
10904
- var re = coreMod.calcSelectionInfo(context, lang);
10904
+ var re = fortuneCore.calcSelectionInfo(context, lang);
10905
10905
  setCalInfo(re);
10906
10906
  }
10907
10907
  }, [context.luckysheet_select_save]);
@@ -10942,7 +10942,7 @@ var Workbook = /*#__PURE__*/React__default['default'].forwardRef(function (_ref,
10942
10942
  var emitOp = React.useCallback(function (ctx, patches, options) {
10943
10943
  var undo = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
10944
10944
  if (onOp) {
10945
- onOp(coreMod.patchToOp(ctx, patches, options, undo));
10945
+ onOp(fortuneCore.patchToOp(ctx, patches, options, undo));
10946
10946
  }
10947
10947
  }, [onOp]);
10948
10948
  function reduceUndoList(ctx, ctxBefore) {
@@ -10966,7 +10966,7 @@ var Workbook = /*#__PURE__*/React__default['default'].forwardRef(function (_ref,
10966
10966
  return item.id;
10967
10967
  }), oneSheet.id) === -1;
10968
10968
  }).map(function (item) {
10969
- return coreMod.getSheetIndex(ctxBefore, item.id);
10969
+ return fortuneCore.getSheetIndex(ctxBefore, item.id);
10970
10970
  });
10971
10971
  var deletedIndex = sheetDeleted[0];
10972
10972
  globalCache.current.undoList = globalCache.current.undoList.map(function (oneStep) {
@@ -11014,8 +11014,8 @@ var Workbook = /*#__PURE__*/React__default['default'].forwardRef(function (_ref,
11014
11014
  if (options.logPatch) {
11015
11015
  console.info("patch", patches);
11016
11016
  }
11017
- var filteredPatches = coreMod.filterPatch(patches);
11018
- var filteredInversePatches = coreMod.filterPatch(inversePatches);
11017
+ var filteredPatches = fortuneCore.filterPatch(patches);
11018
+ var filteredInversePatches = fortuneCore.filterPatch(inversePatches);
11019
11019
  if (filteredInversePatches.length > 0) {
11020
11020
  options.id = ctx_.currentSheetId;
11021
11021
  if (options.deleteSheetOp) {
@@ -11024,7 +11024,7 @@ var Workbook = /*#__PURE__*/React__default['default'].forwardRef(function (_ref,
11024
11024
  return sheet.id === ((_options$deleteSheetO = options.deleteSheetOp) === null || _options$deleteSheetO === void 0 ? void 0 : _options$deleteSheetO.id);
11025
11025
  });
11026
11026
  if (target) {
11027
- var index = coreMod.getSheetIndex(ctx_, options.deleteSheetOp.id);
11027
+ var index = fortuneCore.getSheetIndex(ctx_, options.deleteSheetOp.id);
11028
11028
  options.deletedSheet = {
11029
11029
  id: options.deleteSheetOp.id,
11030
11030
  index: index,
@@ -11076,20 +11076,20 @@ var Workbook = /*#__PURE__*/React__default['default'].forwardRef(function (_ref,
11076
11076
  ___default['default'].forEach(sheetsRight, function (sheet) {
11077
11077
  history.inversePatches.push({
11078
11078
  op: "replace",
11079
- path: ["luckysheetfile", coreMod.getSheetIndex(ctx_, sheet.id), "order"],
11079
+ path: ["luckysheetfile", fortuneCore.getSheetIndex(ctx_, sheet.id), "order"],
11080
11080
  value: (sheet === null || sheet === void 0 ? void 0 : sheet.order) + 1
11081
11081
  });
11082
11082
  });
11083
11083
  }
11084
11084
  var newContext = produce.applyPatches(ctx_, history.inversePatches);
11085
11085
  globalCache.current.redoList.push(history);
11086
- var inversedOptions = coreMod.inverseRowColOptions(history.options);
11086
+ var inversedOptions = fortuneCore.inverseRowColOptions(history.options);
11087
11087
  if (inversedOptions === null || inversedOptions === void 0 ? void 0 : inversedOptions.insertRowColOp) {
11088
11088
  inversedOptions.restoreDeletedCells = true;
11089
11089
  }
11090
11090
  if ((_history$options3 = history.options) === null || _history$options3 === void 0 ? void 0 : _history$options3.addSheetOp) {
11091
11091
  var _inversedOptions$addS;
11092
- var index = coreMod.getSheetIndex(ctx_, history.options.addSheet.id);
11092
+ var index = fortuneCore.getSheetIndex(ctx_, history.options.addSheet.id);
11093
11093
  inversedOptions.addSheet = {
11094
11094
  id: history.options.addSheet.id,
11095
11095
  index: index,
@@ -11143,12 +11143,12 @@ var Workbook = /*#__PURE__*/React__default['default'].forwardRef(function (_ref,
11143
11143
  draftCtx.defaultFontSize = mergedSettings.defaultFontSize;
11144
11144
  if (___default['default'].isEmpty(draftCtx.luckysheetfile)) {
11145
11145
  var newData = produce__default['default'](originalData, function (draftData) {
11146
- coreMod.ensureSheetIndex(draftData, mergedSettings.generateSheetId);
11146
+ fortuneCore.ensureSheetIndex(draftData, mergedSettings.generateSheetId);
11147
11147
  });
11148
11148
  draftCtx.luckysheetfile = newData;
11149
11149
  newData.forEach(function (newDatum) {
11150
11150
  var _draftCtx$luckysheetf;
11151
- var index = coreMod.getSheetIndex(draftCtx, newDatum.id);
11151
+ var index = fortuneCore.getSheetIndex(draftCtx, newDatum.id);
11152
11152
  var sheet = (_draftCtx$luckysheetf = draftCtx.luckysheetfile) === null || _draftCtx$luckysheetf === void 0 ? void 0 : _draftCtx$luckysheetf[index];
11153
11153
  initSheetData(draftCtx, sheet, index);
11154
11154
  });
@@ -11160,9 +11160,9 @@ var Workbook = /*#__PURE__*/React__default['default'].forwardRef(function (_ref,
11160
11160
  draftCtx.allowEdit = mergedSettings.allowEdit;
11161
11161
  draftCtx.hooks = mergedSettings.hooks;
11162
11162
  if (___default['default'].isEmpty(draftCtx.currentSheetId)) {
11163
- coreMod.initSheetIndex(draftCtx);
11163
+ fortuneCore.initSheetIndex(draftCtx);
11164
11164
  }
11165
- var sheetIdx = coreMod.getSheetIndex(draftCtx, draftCtx.currentSheetId);
11165
+ var sheetIdx = fortuneCore.getSheetIndex(draftCtx, draftCtx.currentSheetId);
11166
11166
  if (sheetIdx == null) {
11167
11167
  var _draftCtx$luckysheetf2, _draftCtx$luckysheetf3;
11168
11168
  if (((_draftCtx$luckysheetf2 = (_draftCtx$luckysheetf3 = draftCtx.luckysheetfile) === null || _draftCtx$luckysheetf3 === void 0 ? void 0 : _draftCtx$luckysheetf3.length) !== null && _draftCtx$luckysheetf2 !== void 0 ? _draftCtx$luckysheetf2 : 0) > 0) {
@@ -11254,7 +11254,7 @@ var Workbook = /*#__PURE__*/React__default['default'].forwardRef(function (_ref,
11254
11254
  return;
11255
11255
  }
11256
11256
  setContextWithProduce(function (draftCtx) {
11257
- coreMod.handleGlobalKeyDown(draftCtx, cellInput.current, fxInput.current, nativeEvent, globalCache.current, handleUndo, handleRedo, canvas.current.getContext("2d"));
11257
+ fortuneCore.handleGlobalKeyDown(draftCtx, cellInput.current, fxInput.current, nativeEvent, globalCache.current, handleUndo, handleRedo, canvas.current.getContext("2d"));
11258
11258
  });
11259
11259
  }, [handleRedo, handleUndo, setContextWithProduce]);
11260
11260
  var onPaste = React.useCallback(function (e) {
@@ -11269,18 +11269,18 @@ var Workbook = /*#__PURE__*/React__default['default'].forwardRef(function (_ref,
11269
11269
  ele.innerHTML = txtdata;
11270
11270
  var trList = ele.querySelectorAll("table tr");
11271
11271
  var maxRow = trList.length + context.luckysheet_select_save[0].row[0];
11272
- var rowToBeAdded = maxRow - context.luckysheetfile[coreMod.getSheetIndex(context, context.currentSheetId)].data.length;
11272
+ var rowToBeAdded = maxRow - context.luckysheetfile[fortuneCore.getSheetIndex(context, context.currentSheetId)].data.length;
11273
11273
  var range = context.luckysheet_select_save;
11274
11274
  if (rowToBeAdded > 0) {
11275
11275
  var insertRowColOp = {
11276
11276
  type: "row",
11277
- index: context.luckysheetfile[coreMod.getSheetIndex(context, context.currentSheetId)].data.length - 1,
11277
+ index: context.luckysheetfile[fortuneCore.getSheetIndex(context, context.currentSheetId)].data.length - 1,
11278
11278
  count: rowToBeAdded,
11279
11279
  direction: "rightbottom",
11280
11280
  id: context.currentSheetId
11281
11281
  };
11282
11282
  setContextWithProduce(function (draftCtx) {
11283
- coreMod.insertRowCol(draftCtx, insertRowColOp);
11283
+ fortuneCore.insertRowCol(draftCtx, insertRowColOp);
11284
11284
  draftCtx.luckysheet_select_save = range;
11285
11285
  }, {
11286
11286
  insertRowColOp: insertRowColOp
@@ -11288,7 +11288,7 @@ var Workbook = /*#__PURE__*/React__default['default'].forwardRef(function (_ref,
11288
11288
  }
11289
11289
  setContextWithProduce(function (draftCtx) {
11290
11290
  try {
11291
- coreMod.handlePaste(draftCtx, e);
11291
+ fortuneCore.handlePaste(draftCtx, e);
11292
11292
  } catch (err) {
11293
11293
  console.error(err);
11294
11294
  }
@@ -11307,7 +11307,7 @@ var Workbook = /*#__PURE__*/React__default['default'].forwardRef(function (_ref,
11307
11307
  React.useImperativeHandle(ref, function () {
11308
11308
  return generateAPIs(context, setContextWithProduce, handleUndo, handleRedo, mergedSettings, cellInput.current, scrollbarX.current, scrollbarY.current);
11309
11309
  }, [context, setContextWithProduce, handleUndo, handleRedo, mergedSettings]);
11310
- var i = coreMod.getSheetIndex(context, context.currentSheetId);
11310
+ var i = fortuneCore.getSheetIndex(context, context.currentSheetId);
11311
11311
  if (i == null) {
11312
11312
  return null;
11313
11313
  }