@fileverse-dev/fortune-react 1.0.2-mod-26 → 1.0.2-mod-28
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/components/ConditionFormat/index.d.ts +1 -1
- package/dist/components/ContextMenu/index.d.ts +1 -0
- package/dist/components/DataVerification/getDisplayedRangeTxt.d.ts +2 -0
- package/dist/components/Dialog/index.d.ts +1 -0
- package/dist/components/Workbook/api.d.ts +1050 -2
- package/dist/components/Workbook/index.d.ts +1048 -0
- package/dist/hooks/useDialog.d.ts +1 -1
- package/dist/index.css +119 -145
- package/dist/index.esm.css +119 -145
- package/dist/index.esm.js +710 -596
- package/dist/index.js +709 -594
- package/dist/index.umd.css +119 -145
- package/dist/index.umd.js +8794 -3174
- package/dist/index.umd.min.css +1 -1
- package/dist/index.umd.min.js +9 -9
- package/package.json +3 -2
package/dist/index.esm.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { defaultContext, defaultSettings, getSheetIndex, colLocationByIndex, fixPositionOnFrozenCells, colLocation, getFlowdata, isAllowEdit, handleColumnHeaderMouseDown, handleColSizeHandleMouseDown, handleColFreezeHandleMouseDown, handleContextMenu, selectTitlesMap, selectTitlesRange, fixColumnStyleOverflowInFreeze, rowLocationByIndex, rowLocation, handleRowHeaderMouseDown, handleRowSizeHandleMouseDown, handleRowFreezeHandleMouseDown, fixRowStyleOverflowInFreeze, locale, getStyleByCell, getCellValue, createRangeHightlight, isInlineStringCell, getInlineStringHTML, valueShowEs, escapeHTMLTag, escapeScriptTag, moveToEnd, isShowHidenCR, getrangeseleciton, cancelNormalSelected, moveHighlightCell, israngeseleciton, handleFormulaInput, onSearchDialogMoveStart, replaceAll, replace, searchAll, searchNext, normalizeSelection, scrollToHighlightCell, isLinkValid, getRangetxt, goToLink, replaceHtml, removeHyperlink, onRangeSelectionModalMoveStart, saveHyperlink, createFilterOptions, onImageMoveStart, onImageResizeStart, showComments, setEditingComment, onCommentBoxMoveStart, confirmMessage, getRangeByTxt, getDropdownList, setCellValue, setConditionRules, mergeBorder, setDropcownValue, handleCellAreaMouseDown, handleCellAreaDoubleClick, selectAll, showLinkCard, getCellRowColumn, getCellHyperlink, handleOverlayMouseMove, handleOverlayMouseUp, handleKeydownForZoom, handleOverlayTouchStart, handleOverlayTouchMove, handleOverlayTouchEnd, insertRowCol, drawArrow, onCellsMoveStart, createDropCellRange, updateContextWithSheetData, updateContextWithCanvas, initFreeze, Canvas, handleGlobalWheel,
|
|
1
|
+
import { defaultContext, defaultSettings, getSheetIndex, colLocationByIndex, fixPositionOnFrozenCells, colLocation, getFlowdata, isAllowEdit, handleColumnHeaderMouseDown, handleColSizeHandleMouseDown, handleColFreezeHandleMouseDown, handleContextMenu, selectTitlesMap, selectTitlesRange, fixColumnStyleOverflowInFreeze, rowLocationByIndex, rowLocation, handleRowHeaderMouseDown, handleRowSizeHandleMouseDown, handleRowFreezeHandleMouseDown, fixRowStyleOverflowInFreeze, locale, getStyleByCell, getCellValue, createRangeHightlight, isInlineStringCell, getInlineStringHTML, valueShowEs, escapeHTMLTag, escapeScriptTag, moveToEnd, isShowHidenCR, getrangeseleciton, cancelNormalSelected, moveHighlightCell, israngeseleciton, handleFormulaInput, onSearchDialogMoveStart, replaceAll, replace, searchAll, searchNext, normalizeSelection, scrollToHighlightCell, isLinkValid, getRangetxt, goToLink, replaceHtml, removeHyperlink, onRangeSelectionModalMoveStart, saveHyperlink, createFilterOptions, onImageMoveStart, onImageResizeStart, showComments, setEditingComment, onCommentBoxMoveStart, confirmMessage, getRangeByTxt, getDropdownList, setCellValue, setConditionRules, mergeBorder, setDropcownValue, handleCellAreaMouseDown, handleCellAreaDoubleClick, selectAll, showLinkCard, getCellRowColumn, getCellHyperlink, handleOverlayMouseMove, handleOverlayMouseUp, handleKeydownForZoom, handleOverlayTouchStart, handleOverlayTouchMove, handleOverlayTouchEnd, insertRowCol, drawArrow, onCellsMoveStart, createDropCellRange, updateContextWithSheetData, updateContextWithCanvas, initFreeze, Canvas, handleGlobalWheel, getDataArr, updateMoreCell, getRegStr, getOptionValue, getSelectRange, applyLocation, updateItem, update, normalizedCellAttr, updateFormat, handleTextSize, handleHorizontalAlign, handleVerticalAlign, handleScreenShot, showImgChooser, insertImage, editComment, deleteComment, showHideComment, showHideAllComments, newComment, handleSum, autoSelectionFormula, handleMerge, handleBorder, handleFreeze, handleSort, createFilter, clearFilter, toolbarItemSelectedFunc, toolbarItemClickHandler, handleTextColor, handleTextBackground, getInlineStringNoStyle, rangeHightlightselected, updateCell, editSheetName, cancelActiveImgItem, MAX_ZOOM_RATIO, MIN_ZOOM_RATIO, addSheet, getFreezeState, toggleFreeze, jfrefreshgrid, handleCopy, deleteRowCol, hideSelected, showSelected, api, removeActiveImage, deleteSelectedCellText, sortSelection, handleLink, handlePasteByClick, deleteSheet, opToPatch, setCaretPosition, orderbydatafiler, getFilterColumnValues, getFilterColumnColors, saveFilter, calcSelectionInfo, patchToOp, filterPatch, inverseRowColOptions, ensureSheetIndex, initSheetIndex, handleGlobalKeyDown, handlePaste, groupValuesRefresh } from '@fileverse-dev/fortune-core';
|
|
2
2
|
import React, { useContext, useRef, useState, useMemo, useCallback, useEffect, useLayoutEffect, useImperativeHandle } from 'react';
|
|
3
3
|
import produce, { applyPatches, enablePatches, produceWithPatches } from 'immer';
|
|
4
4
|
import _ from 'lodash';
|
|
5
|
-
import { LucideIcon, TextField, Button as Button$1, IconButton, Checkbox, Divider as Divider$2, Table, TableHeader, TableRow, TableHead, TableBody, TableCell } from '@fileverse/ui';
|
|
5
|
+
import { LucideIcon, TextField, Button as Button$1, cn, IconButton, Checkbox, Divider as Divider$2, Table, TableHeader, TableRow, TableHead, TableBody, TableCell, Select as Select$1, SelectTrigger, SelectValue, SelectContent, SelectItem as SelectItem$1 } from '@fileverse/ui';
|
|
6
6
|
import regeneratorRuntime from 'regenerator-runtime';
|
|
7
|
+
import Tippy from '@tippyjs/react';
|
|
7
8
|
|
|
8
9
|
function _arrayLikeToArray(r, a) {
|
|
9
10
|
(null == a || a > r.length) && (a = r.length);
|
|
@@ -806,12 +807,12 @@ var FormulaSearch = function FormulaSearch(props) {
|
|
|
806
807
|
display: "flex",
|
|
807
808
|
gap: "4px"
|
|
808
809
|
}
|
|
809
|
-
}, v.LOGO && /*#__PURE__*/React.createElement("img", {
|
|
810
|
+
}, v.LOGO && (/*#__PURE__*/React.createElement("img", {
|
|
810
811
|
src: v.LOGO,
|
|
811
812
|
alt: "Service Logo",
|
|
812
813
|
width: 32,
|
|
813
814
|
height: 32
|
|
814
|
-
}), v.API_KEY && /*#__PURE__*/React.createElement("div", {
|
|
815
|
+
})), v.API_KEY && (/*#__PURE__*/React.createElement("div", {
|
|
815
816
|
style: {
|
|
816
817
|
borderRadius: "4px",
|
|
817
818
|
width: "20px",
|
|
@@ -823,7 +824,7 @@ var FormulaSearch = function FormulaSearch(props) {
|
|
|
823
824
|
style: {
|
|
824
825
|
color: "white"
|
|
825
826
|
}
|
|
826
|
-
})))), /*#__PURE__*/React.createElement("div", {
|
|
827
|
+
}))))), /*#__PURE__*/React.createElement("div", {
|
|
827
828
|
className: "luckysheet-formula-search-detail"
|
|
828
829
|
}, v.d));
|
|
829
830
|
}));
|
|
@@ -831,7 +832,7 @@ var FormulaSearch = function FormulaSearch(props) {
|
|
|
831
832
|
|
|
832
833
|
function lightenHexColor(hex) {
|
|
833
834
|
var amount = 100;
|
|
834
|
-
if (hex.startsWith(
|
|
835
|
+
if (hex.startsWith("#")) {
|
|
835
836
|
hex = hex.slice(1);
|
|
836
837
|
}
|
|
837
838
|
var r = parseInt(hex.slice(0, 2), 16);
|
|
@@ -840,7 +841,7 @@ function lightenHexColor(hex) {
|
|
|
840
841
|
r = Math.min(255, r + amount);
|
|
841
842
|
g = Math.min(255, g + amount);
|
|
842
843
|
b = Math.min(255, b + amount);
|
|
843
|
-
var newHex =
|
|
844
|
+
var newHex = "#".concat((1 << 24 | r << 16 | g << 8 | b).toString(16).slice(1).toUpperCase());
|
|
844
845
|
return newHex;
|
|
845
846
|
}
|
|
846
847
|
var FormulaHint = function FormulaHint(props) {
|
|
@@ -848,10 +849,8 @@ var FormulaHint = function FormulaHint(props) {
|
|
|
848
849
|
context = _useContext.context;
|
|
849
850
|
var _locale = locale(context),
|
|
850
851
|
formulaMore = _locale.formulaMore;
|
|
851
|
-
if (!context.functionHint) return null;
|
|
852
852
|
var fn = context.formulaCache.functionlistMap[context.functionHint];
|
|
853
|
-
|
|
854
|
-
var _useState = useState(localStorage.getItem(fn.API_KEY)),
|
|
853
|
+
var _useState = useState(localStorage.getItem(fn === null || fn === void 0 ? void 0 : fn.API_KEY)),
|
|
855
854
|
_useState2 = _slicedToArray(_useState, 2),
|
|
856
855
|
API_KEY = _useState2[0],
|
|
857
856
|
setAPI_KEY = _useState2[1];
|
|
@@ -859,12 +858,13 @@ var FormulaHint = function FormulaHint(props) {
|
|
|
859
858
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
860
859
|
showAPInput = _useState4[0],
|
|
861
860
|
setShowAPInput = _useState4[1];
|
|
861
|
+
if (!fn) return null;
|
|
862
862
|
return /*#__PURE__*/React.createElement("div", _objectSpread2(_objectSpread2({}, props), {}, {
|
|
863
863
|
id: "luckysheet-formula-help-c",
|
|
864
864
|
className: "luckysheet-formula-help-c",
|
|
865
865
|
style: {
|
|
866
866
|
border: "1px solid ".concat(fn.BRAND_COLOR),
|
|
867
|
-
backgroundColor: "".concat(fn.BRAND_COLOR ? lightenHexColor(fn.BRAND_COLOR) :
|
|
867
|
+
backgroundColor: "".concat(fn.BRAND_COLOR ? lightenHexColor(fn.BRAND_COLOR) : "#F8F9FA")
|
|
868
868
|
}
|
|
869
869
|
}), /*#__PURE__*/React.createElement("div", {
|
|
870
870
|
className: "luckysheet-formula-help-close",
|
|
@@ -881,7 +881,7 @@ var FormulaHint = function FormulaHint(props) {
|
|
|
881
881
|
})), /*#__PURE__*/React.createElement("div", {
|
|
882
882
|
className: "luckysheet-formula-help-title formula-title",
|
|
883
883
|
style: {
|
|
884
|
-
backgroundColor: "".concat(fn.BRAND_COLOR ? lightenHexColor(fn.BRAND_COLOR) :
|
|
884
|
+
backgroundColor: "".concat(fn.BRAND_COLOR ? lightenHexColor(fn.BRAND_COLOR) : "#F8F9FA")
|
|
885
885
|
}
|
|
886
886
|
}, /*#__PURE__*/React.createElement("div", {
|
|
887
887
|
className: "luckysheet-formula-help-title-formula"
|
|
@@ -911,12 +911,12 @@ var FormulaHint = function FormulaHint(props) {
|
|
|
911
911
|
display: "flex",
|
|
912
912
|
gap: "4px"
|
|
913
913
|
}
|
|
914
|
-
}, fn.LOGO && /*#__PURE__*/React.createElement("img", {
|
|
914
|
+
}, fn.LOGO && (/*#__PURE__*/React.createElement("img", {
|
|
915
915
|
src: fn.LOGO,
|
|
916
916
|
alt: "Service Logo",
|
|
917
917
|
width: 32,
|
|
918
918
|
height: 32
|
|
919
|
-
}), fn.API_KEY && /*#__PURE__*/React.createElement("div", {
|
|
919
|
+
})), fn.API_KEY && (/*#__PURE__*/React.createElement("div", {
|
|
920
920
|
style: {
|
|
921
921
|
borderRadius: "4px",
|
|
922
922
|
width: "20px",
|
|
@@ -928,18 +928,18 @@ var FormulaHint = function FormulaHint(props) {
|
|
|
928
928
|
style: {
|
|
929
929
|
color: "white"
|
|
930
930
|
}
|
|
931
|
-
})))), /*#__PURE__*/React.createElement("div", {
|
|
931
|
+
}))))), /*#__PURE__*/React.createElement("div", {
|
|
932
932
|
className: "luckysheet-formula-help-content",
|
|
933
933
|
style: {
|
|
934
|
-
backgroundColor: "".concat(fn.BRAND_COLOR ? lightenHexColor(fn.BRAND_COLOR) :
|
|
934
|
+
backgroundColor: "".concat(fn.BRAND_COLOR ? lightenHexColor(fn.BRAND_COLOR) : "#F8F9FA")
|
|
935
935
|
}
|
|
936
|
-
}, fn.API_KEY && /*#__PURE__*/React.createElement("div", {
|
|
936
|
+
}, fn.API_KEY && (/*#__PURE__*/React.createElement("div", {
|
|
937
937
|
style: {
|
|
938
938
|
borderLeft: "4px solid ".concat(API_KEY ? "#177E23" : "#fb923c"),
|
|
939
|
-
backgroundColor:
|
|
940
|
-
padding:
|
|
941
|
-
margin:
|
|
942
|
-
borderRadius:
|
|
939
|
+
backgroundColor: "white",
|
|
940
|
+
padding: "16px",
|
|
941
|
+
margin: "4px 4px 0px 4px",
|
|
942
|
+
borderRadius: "4px"
|
|
943
943
|
}
|
|
944
944
|
}, /*#__PURE__*/React.createElement("div", {
|
|
945
945
|
style: {
|
|
@@ -952,24 +952,24 @@ var FormulaHint = function FormulaHint(props) {
|
|
|
952
952
|
}
|
|
953
953
|
}, /*#__PURE__*/React.createElement("h3", {
|
|
954
954
|
style: {
|
|
955
|
-
fontSize:
|
|
956
|
-
fontWeight:
|
|
957
|
-
color:
|
|
958
|
-
margin:
|
|
955
|
+
fontSize: "14px",
|
|
956
|
+
fontWeight: "600",
|
|
957
|
+
color: "#1f2937",
|
|
958
|
+
margin: "0 0 8px 0"
|
|
959
959
|
}
|
|
960
960
|
}, "API key is required"), /*#__PURE__*/React.createElement(LucideIcon, {
|
|
961
961
|
name: "ChevronDown",
|
|
962
962
|
width: 24,
|
|
963
963
|
height: 24
|
|
964
|
-
})), showAPInput && /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("p", {
|
|
964
|
+
})), showAPInput && (/*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("p", {
|
|
965
965
|
style: {
|
|
966
|
-
color:
|
|
967
|
-
margin:
|
|
966
|
+
color: "#6b7280",
|
|
967
|
+
margin: "0 0 16px 0"
|
|
968
968
|
}
|
|
969
|
-
}, "This function is require API key. Please paste it below and
|
|
969
|
+
}, "This function is require API key. Please paste it below and\n press 'Ok'."), /*#__PURE__*/React.createElement("div", {
|
|
970
970
|
style: {
|
|
971
|
-
display:
|
|
972
|
-
gap:
|
|
971
|
+
display: "flex",
|
|
972
|
+
gap: "12px"
|
|
973
973
|
}
|
|
974
974
|
}, /*#__PURE__*/React.createElement(TextField, {
|
|
975
975
|
value: API_KEY,
|
|
@@ -983,12 +983,12 @@ var FormulaHint = function FormulaHint(props) {
|
|
|
983
983
|
onClick: function onClick() {
|
|
984
984
|
localStorage.setItem(fn.API_KEY, API_KEY);
|
|
985
985
|
}
|
|
986
|
-
}, "Ok")))), /*#__PURE__*/React.createElement("div", {
|
|
986
|
+
}, "Ok")))))), /*#__PURE__*/React.createElement("div", {
|
|
987
987
|
style: {
|
|
988
|
-
backgroundColor:
|
|
989
|
-
padding:
|
|
990
|
-
margin:
|
|
991
|
-
borderRadius:
|
|
988
|
+
backgroundColor: "white",
|
|
989
|
+
padding: "6px",
|
|
990
|
+
margin: "4px 4px 0px 4px",
|
|
991
|
+
borderRadius: "4px"
|
|
992
992
|
}
|
|
993
993
|
}, /*#__PURE__*/React.createElement("div", {
|
|
994
994
|
className: "luckysheet-formula-help-content-example"
|
|
@@ -1013,7 +1013,7 @@ var FormulaHint = function FormulaHint(props) {
|
|
|
1013
1013
|
}, ")"))), /*#__PURE__*/React.createElement("div", {
|
|
1014
1014
|
className: "luckysheet-formula-help-content-detail",
|
|
1015
1015
|
style: {
|
|
1016
|
-
paddingBottom:
|
|
1016
|
+
paddingBottom: "6px"
|
|
1017
1017
|
}
|
|
1018
1018
|
}, /*#__PURE__*/React.createElement("div", {
|
|
1019
1019
|
className: "luckysheet-arguments-help-section"
|
|
@@ -1032,17 +1032,17 @@ var FormulaHint = function FormulaHint(props) {
|
|
|
1032
1032
|
}, param.name, param.repeat === "y" && (/*#__PURE__*/React.createElement("span", {
|
|
1033
1033
|
className: "luckysheet-arguments-help-argument-info example-value",
|
|
1034
1034
|
style: {
|
|
1035
|
-
marginTop:
|
|
1035
|
+
marginTop: "2px"
|
|
1036
1036
|
}
|
|
1037
1037
|
}, "...-", formulaMore.allowRepeatText)), param.require === "o" && (/*#__PURE__*/React.createElement("span", {
|
|
1038
1038
|
className: "luckysheet-arguments-help-argument-info example-value",
|
|
1039
1039
|
style: {
|
|
1040
|
-
marginTop:
|
|
1040
|
+
marginTop: "2px"
|
|
1041
1041
|
}
|
|
1042
1042
|
}, "-[", formulaMore.allowOptionText, "]"))), /*#__PURE__*/React.createElement("span", {
|
|
1043
1043
|
className: "luckysheet-arguments-help-parameter-content example-value",
|
|
1044
1044
|
style: {
|
|
1045
|
-
marginTop:
|
|
1045
|
+
marginTop: "2px"
|
|
1046
1046
|
}
|
|
1047
1047
|
}, param.detail));
|
|
1048
1048
|
})))), /*#__PURE__*/React.createElement("div", {
|
|
@@ -1370,7 +1370,8 @@ var Dialog = function Dialog(_ref) {
|
|
|
1370
1370
|
onCancel = _ref.onCancel,
|
|
1371
1371
|
children = _ref.children,
|
|
1372
1372
|
containerStyle = _ref.containerStyle,
|
|
1373
|
-
contentStyle = _ref.contentStyle
|
|
1373
|
+
contentStyle = _ref.contentStyle,
|
|
1374
|
+
title = _ref.title;
|
|
1374
1375
|
var _useContext = useContext(WorkbookContext),
|
|
1375
1376
|
context = _useContext.context;
|
|
1376
1377
|
var _locale = locale(context),
|
|
@@ -1379,8 +1380,12 @@ var Dialog = function Dialog(_ref) {
|
|
|
1379
1380
|
className: "fortune-dialog",
|
|
1380
1381
|
style: containerStyle
|
|
1381
1382
|
}, /*#__PURE__*/React.createElement("div", {
|
|
1382
|
-
className: "flex items-center justify-end border-b color-border-default py-3 px-6"
|
|
1383
|
-
|
|
1383
|
+
className: cn("flex items-center justify-end border-b color-border-default py-3 px-6", {
|
|
1384
|
+
"justify-between": title
|
|
1385
|
+
})
|
|
1386
|
+
}, title && /*#__PURE__*/React.createElement("div", {
|
|
1387
|
+
className: "text-heading-sm"
|
|
1388
|
+
}, title), /*#__PURE__*/React.createElement(IconButton, {
|
|
1384
1389
|
icon: "X",
|
|
1385
1390
|
variant: "ghost",
|
|
1386
1391
|
onClick: onCancel,
|
|
@@ -1497,8 +1502,7 @@ var SearchReplace = function SearchReplace(_ref) {
|
|
|
1497
1502
|
setContext = _useContext.setContext,
|
|
1498
1503
|
refs = _useContext.refs;
|
|
1499
1504
|
var _locale = locale(context),
|
|
1500
|
-
findAndReplace = _locale.findAndReplace
|
|
1501
|
-
button = _locale.button;
|
|
1505
|
+
findAndReplace = _locale.findAndReplace;
|
|
1502
1506
|
var _useState = useState(""),
|
|
1503
1507
|
_useState2 = _slicedToArray(_useState, 2),
|
|
1504
1508
|
searchText = _useState2[0],
|
|
@@ -1562,9 +1566,7 @@ var SearchReplace = function SearchReplace(_ref) {
|
|
|
1562
1566
|
onSearchDialogMoveStart(refs.globalCache, nativeEvent, getContainer());
|
|
1563
1567
|
e.stopPropagation();
|
|
1564
1568
|
}
|
|
1565
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
1566
|
-
className: ""
|
|
1567
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
1569
|
+
}, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
|
|
1568
1570
|
className: "flex items-center justify-between border-b color-border-default py-3 px-6"
|
|
1569
1571
|
}, /*#__PURE__*/React.createElement("h3", {
|
|
1570
1572
|
className: "text-heading-sm"
|
|
@@ -1600,7 +1602,10 @@ var SearchReplace = function SearchReplace(_ref) {
|
|
|
1600
1602
|
},
|
|
1601
1603
|
value: searchText,
|
|
1602
1604
|
onChange: function onChange(e) {
|
|
1603
|
-
|
|
1605
|
+
if (e.target.value.length === 0) {
|
|
1606
|
+
setSearchResult([]);
|
|
1607
|
+
}
|
|
1608
|
+
setSearchText(e.target.value);
|
|
1604
1609
|
}
|
|
1605
1610
|
})), /*#__PURE__*/React.createElement("div", {
|
|
1606
1611
|
id: "replaceInput",
|
|
@@ -1660,13 +1665,8 @@ var SearchReplace = function SearchReplace(_ref) {
|
|
|
1660
1665
|
}), /*#__PURE__*/React.createElement("span", null, findAndReplace.wholeTextbox)))), /*#__PURE__*/React.createElement(Divider$2, {
|
|
1661
1666
|
className: "w-full border-t-[1px]"
|
|
1662
1667
|
}), /*#__PURE__*/React.createElement("div", {
|
|
1663
|
-
className: "flex flex-row gap-2 justify-center items-center"
|
|
1668
|
+
className: "flex flex-row gap-2 justify-center items-center mb-4"
|
|
1664
1669
|
}, /*#__PURE__*/React.createElement(Button$1, {
|
|
1665
|
-
variant: "secondary",
|
|
1666
|
-
className: "min-w-fit",
|
|
1667
|
-
onClick: closeDialog,
|
|
1668
|
-
tabIndex: 0
|
|
1669
|
-
}, button.close), /*#__PURE__*/React.createElement(Button$1, {
|
|
1670
1670
|
id: "replaceAllBtn",
|
|
1671
1671
|
variant: "secondary",
|
|
1672
1672
|
className: "min-w-fit",
|
|
@@ -1677,7 +1677,8 @@ var SearchReplace = function SearchReplace(_ref) {
|
|
|
1677
1677
|
showAlert(alertMsg);
|
|
1678
1678
|
});
|
|
1679
1679
|
},
|
|
1680
|
-
tabIndex: 0
|
|
1680
|
+
tabIndex: 0,
|
|
1681
|
+
disabled: searchText.length === 0 || replaceText.length === 0
|
|
1681
1682
|
}, findAndReplace.allReplaceBtn), /*#__PURE__*/React.createElement(Button$1, {
|
|
1682
1683
|
id: "replaceBtn",
|
|
1683
1684
|
variant: "secondary",
|
|
@@ -1691,7 +1692,8 @@ var SearchReplace = function SearchReplace(_ref) {
|
|
|
1691
1692
|
}
|
|
1692
1693
|
});
|
|
1693
1694
|
},
|
|
1694
|
-
tabIndex: 0
|
|
1695
|
+
tabIndex: 0,
|
|
1696
|
+
disabled: searchText.length === 0 || replaceText.length === 0
|
|
1695
1697
|
}, findAndReplace.replaceBtn), /*#__PURE__*/React.createElement(Button$1, {
|
|
1696
1698
|
id: "searchAllBtn",
|
|
1697
1699
|
variant: "secondary",
|
|
@@ -1705,10 +1707,11 @@ var SearchReplace = function SearchReplace(_ref) {
|
|
|
1705
1707
|
if (_.isEmpty(res)) showAlert(findAndReplace.noFindTip);
|
|
1706
1708
|
});
|
|
1707
1709
|
},
|
|
1708
|
-
tabIndex: 0
|
|
1710
|
+
tabIndex: 0,
|
|
1711
|
+
disabled: searchText.length === 0
|
|
1709
1712
|
}, findAndReplace.allFindBtn), /*#__PURE__*/React.createElement(Button$1, {
|
|
1710
1713
|
id: "searchNextBtn",
|
|
1711
|
-
variant: "
|
|
1714
|
+
variant: "default",
|
|
1712
1715
|
className: "min-w-fit",
|
|
1713
1716
|
onClick: function onClick() {
|
|
1714
1717
|
return setContext(function (draftCtx) {
|
|
@@ -1717,10 +1720,13 @@ var SearchReplace = function SearchReplace(_ref) {
|
|
|
1717
1720
|
if (alertMsg != null) showAlert(alertMsg);
|
|
1718
1721
|
});
|
|
1719
1722
|
},
|
|
1720
|
-
tabIndex: 0
|
|
1721
|
-
|
|
1723
|
+
tabIndex: 0,
|
|
1724
|
+
disabled: searchText.length === 0
|
|
1725
|
+
}, findAndReplace.findBtn))), searchResult.length > 0 && (/*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Divider$2, {
|
|
1726
|
+
className: "w-full border-t-[1px] mb-4"
|
|
1727
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
1722
1728
|
ref: tableContainerRef,
|
|
1723
|
-
className: "
|
|
1729
|
+
className: "mb-6 table-container max-h-[300px] overflow-y-auto",
|
|
1724
1730
|
onMouseDown: function onMouseDown(e) {
|
|
1725
1731
|
var _tableContainerRef$cu;
|
|
1726
1732
|
if (e.target === tableContainerRef.current || ((_tableContainerRef$cu = tableContainerRef.current) === null || _tableContainerRef$cu === void 0 ? void 0 : _tableContainerRef$cu.contains(e.target))) {
|
|
@@ -1729,6 +1735,19 @@ var SearchReplace = function SearchReplace(_ref) {
|
|
|
1729
1735
|
(_tableContainerRef$cu2 = tableContainerRef.current) === null || _tableContainerRef$cu2 === void 0 ? void 0 : _tableContainerRef$cu2.focus();
|
|
1730
1736
|
}
|
|
1731
1737
|
},
|
|
1738
|
+
onWheel: function onWheel(e) {
|
|
1739
|
+
e.preventDefault();
|
|
1740
|
+
e.stopPropagation();
|
|
1741
|
+
if (tableContainerRef.current) {
|
|
1742
|
+
tableContainerRef.current.scrollTop += e.deltaY;
|
|
1743
|
+
}
|
|
1744
|
+
},
|
|
1745
|
+
onTouchStart: function onTouchStart(e) {
|
|
1746
|
+
e.stopPropagation();
|
|
1747
|
+
},
|
|
1748
|
+
onTouchMove: function onTouchMove(e) {
|
|
1749
|
+
e.stopPropagation();
|
|
1750
|
+
},
|
|
1732
1751
|
tabIndex: 0
|
|
1733
1752
|
}, /*#__PURE__*/React.createElement(Table, {
|
|
1734
1753
|
id: "searchAllbox"
|
|
@@ -1736,10 +1755,10 @@ var SearchReplace = function SearchReplace(_ref) {
|
|
|
1736
1755
|
className: "color-bg-secondary"
|
|
1737
1756
|
}, /*#__PURE__*/React.createElement(TableRow, null, /*#__PURE__*/React.createElement(TableHead, null, findAndReplace.searchTargetSheet), /*#__PURE__*/React.createElement(TableHead, null, findAndReplace.searchTargetCell), /*#__PURE__*/React.createElement(TableHead, null, findAndReplace.searchTargetValue))), /*#__PURE__*/React.createElement(TableBody, null, searchResult.map(function (v) {
|
|
1738
1757
|
return /*#__PURE__*/React.createElement(TableRow, {
|
|
1739
|
-
className:
|
|
1758
|
+
className: cn(_.isEqual(selectedCell, {
|
|
1740
1759
|
r: v.r,
|
|
1741
1760
|
c: v.c
|
|
1742
|
-
}) ? "
|
|
1761
|
+
}) ? "color-bg-default-selected" : ""),
|
|
1743
1762
|
key: v.cellPosition,
|
|
1744
1763
|
onClick: function onClick() {
|
|
1745
1764
|
setContext(function (draftCtx) {
|
|
@@ -1762,7 +1781,7 @@ var SearchReplace = function SearchReplace(_ref) {
|
|
|
1762
1781
|
}, v.cellPosition), /*#__PURE__*/React.createElement(TableCell, {
|
|
1763
1782
|
className: "find-replace-table-cell"
|
|
1764
1783
|
}, v.value));
|
|
1765
|
-
})))))));
|
|
1784
|
+
})))))))));
|
|
1766
1785
|
};
|
|
1767
1786
|
|
|
1768
1787
|
var LinkEditCard = function LinkEditCard(_ref) {
|
|
@@ -2491,13 +2510,14 @@ function useDialog() {
|
|
|
2491
2510
|
var _useContext = useContext(ModalContext),
|
|
2492
2511
|
showModal = _useContext.showModal,
|
|
2493
2512
|
hideModal = _useContext.hideModal;
|
|
2494
|
-
var showDialog = useCallback(function (content, type) {
|
|
2495
|
-
var onOk = arguments.length >
|
|
2496
|
-
var onCancel = arguments.length >
|
|
2513
|
+
var showDialog = useCallback(function (content, type, title) {
|
|
2514
|
+
var onOk = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : hideModal;
|
|
2515
|
+
var onCancel = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : hideModal;
|
|
2497
2516
|
showModal(/*#__PURE__*/React.createElement(Dialog, {
|
|
2498
2517
|
type: type,
|
|
2499
2518
|
onOk: onOk,
|
|
2500
|
-
onCancel: onCancel
|
|
2519
|
+
onCancel: onCancel,
|
|
2520
|
+
title: title
|
|
2501
2521
|
}, content));
|
|
2502
2522
|
}, [hideModal, showModal]);
|
|
2503
2523
|
return {
|
|
@@ -3011,6 +3031,21 @@ var DataVerification = function DataVerification() {
|
|
|
3011
3031
|
}, button.cancel));
|
|
3012
3032
|
};
|
|
3013
3033
|
|
|
3034
|
+
function getDisplayedRangeTxt(context) {
|
|
3035
|
+
var _context$rangeDialog$, _context$rangeDialog;
|
|
3036
|
+
if (context.luckysheet_select_save) {
|
|
3037
|
+
var range = context.luckysheet_select_save[context.luckysheet_select_save.length - 1];
|
|
3038
|
+
return getRangetxt(context, context.currentSheetId, range, context.currentSheetId);
|
|
3039
|
+
}
|
|
3040
|
+
return (_context$rangeDialog$ = (_context$rangeDialog = context.rangeDialog) === null || _context$rangeDialog === void 0 ? void 0 : _context$rangeDialog.rangeTxt) !== null && _context$rangeDialog$ !== void 0 ? _context$rangeDialog$ : "";
|
|
3041
|
+
}
|
|
3042
|
+
|
|
3043
|
+
var datepickerStyles = "\n .datepicker-toggle {\n display: inline-block;\n position: relative;\n width: 100%;\n }\n \n .datepicker-toggle-button {\n opacity: 0.3;\n position: absolute;\n right: 12px;\n top: 50%;\n transform: translateY(-50%);\n width: 16px;\n height: 16px;\n background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiPjxyZWN0IHg9IjMiIHk9IjQiIHdpZHRoPSIxOCIgaGVpZ2h0PSIxOCIgcng9IjIiIHJ5PSIyIj48L3JlY3Q+PGxpbmUgeDE9IjE2IiB5MT0iMiIgeDI9IjE2IiB5Mj0iNiI+PC9saW5lPjxsaW5lIHgxPSI4IiB5MT0iMiIgeDI9IjgiIHkyPSI2Ij48L2xpbmU+PGxpbmUgeDE9IjMiIHkxPSIxMCIgeDI9IjIxIiB5Mj0iMTAiPjwvbGluZT48L3N2Zz4=');\n background-repeat: no-repeat;\n background-position: center;\n pointer-events: none;\n }\n \n .datepicker-input {\n width: 100%;\n padding: 8px 12px;\n border: 1px solid #e2e8f0;\n border-radius: 6px;\n font-size: 14px;\n line-height: 1.5;\n color: #1a202c;\n background-color: #fff;\n cursor: pointer;\n }\n \n .datepicker-input::-webkit-calendar-picker-indicator {\n position: absolute;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n margin: 0;\n padding: 0;\n cursor: pointer;\n opacity: 0;\n }\n \n .datepicker-input:focus {\n outline: none;\n border-color: #4299e1;\n box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.1);\n }\n";
|
|
3044
|
+
if (typeof document !== "undefined") {
|
|
3045
|
+
var styleSheet = document.createElement("style");
|
|
3046
|
+
styleSheet.textContent = datepickerStyles;
|
|
3047
|
+
document.head.appendChild(styleSheet);
|
|
3048
|
+
}
|
|
3014
3049
|
var ConditionRules = function ConditionRules(_ref) {
|
|
3015
3050
|
var type = _ref.type;
|
|
3016
3051
|
var _useContext = useContext(WorkbookContext),
|
|
@@ -3024,12 +3059,23 @@ var ConditionRules = function ConditionRules(_ref) {
|
|
|
3024
3059
|
protection = _locale.protection,
|
|
3025
3060
|
generalDialog = _locale.generalDialog;
|
|
3026
3061
|
var _useState = useState({
|
|
3027
|
-
textColor: "#
|
|
3028
|
-
cellColor: "#
|
|
3062
|
+
textColor: "#FFFFFF",
|
|
3063
|
+
cellColor: "#D82E2A"
|
|
3029
3064
|
}),
|
|
3030
3065
|
_useState2 = _slicedToArray(_useState, 2),
|
|
3031
3066
|
colorRules = _useState2[0],
|
|
3032
3067
|
setColorRules = _useState2[1];
|
|
3068
|
+
var dataSelectRange = useCallback(function (selectType) {
|
|
3069
|
+
hideDialog();
|
|
3070
|
+
setContext(function (ctx) {
|
|
3071
|
+
ctx.conditionRules.textColor.color = colorRules.textColor;
|
|
3072
|
+
ctx.conditionRules.cellColor.color = colorRules.cellColor;
|
|
3073
|
+
ctx.rangeDialog.show = true;
|
|
3074
|
+
ctx.rangeDialog.type = selectType;
|
|
3075
|
+
ctx.rangeDialog.rangeTxt = ctx.conditionRules.rulesValue;
|
|
3076
|
+
ctx.rangeDialog.singleSelect = true;
|
|
3077
|
+
});
|
|
3078
|
+
}, [colorRules.cellColor, colorRules.textColor, hideDialog, setContext]);
|
|
3033
3079
|
var close = useCallback(function (closeType) {
|
|
3034
3080
|
if (closeType === "confirm") {
|
|
3035
3081
|
setContext(function (ctx) {
|
|
@@ -3098,17 +3144,16 @@ var ConditionRules = function ConditionRules(_ref) {
|
|
|
3098
3144
|
ctx.rangeDialog.rangeTxt = "";
|
|
3099
3145
|
});
|
|
3100
3146
|
}, []);
|
|
3147
|
+
var titleType = type === "top10_percent" ? "top10" : type === "last10_percent" ? "last10" : type;
|
|
3101
3148
|
return /*#__PURE__*/React.createElement("div", {
|
|
3102
3149
|
className: "condition-rules"
|
|
3150
|
+
}, !["aboveAverage", "belowAverage"].includes(type) && (/*#__PURE__*/React.createElement("div", {
|
|
3151
|
+
className: "flex flex-col"
|
|
3103
3152
|
}, /*#__PURE__*/React.createElement("div", {
|
|
3104
|
-
className: "condition-rules-
|
|
3105
|
-
}, conditionformat["conditionformat_".concat(
|
|
3106
|
-
className: "
|
|
3107
|
-
},
|
|
3108
|
-
className: "condition-rules-inpbox"
|
|
3109
|
-
}, /*#__PURE__*/React.createElement("input", {
|
|
3110
|
-
className: "condition-rules-input",
|
|
3111
|
-
type: "text",
|
|
3153
|
+
className: "condition-rules-value text-heading-xsm"
|
|
3154
|
+
}, conditionformat["conditionformat_".concat(titleType, "_title")]), (type === "greaterThan" || type === "lessThan" || type === "equal" || type === "textContains") && (/*#__PURE__*/React.createElement("div", {
|
|
3155
|
+
className: "w-full"
|
|
3156
|
+
}, /*#__PURE__*/React.createElement(TextField, {
|
|
3112
3157
|
value: context.conditionRules.rulesValue,
|
|
3113
3158
|
onChange: function onChange(e) {
|
|
3114
3159
|
var value = e.target.value;
|
|
@@ -3117,12 +3162,11 @@ var ConditionRules = function ConditionRules(_ref) {
|
|
|
3117
3162
|
});
|
|
3118
3163
|
}
|
|
3119
3164
|
}))), type === "between" && (/*#__PURE__*/React.createElement("div", {
|
|
3120
|
-
className: "
|
|
3165
|
+
className: "w-full flex gap-2 items-center"
|
|
3121
3166
|
}, /*#__PURE__*/React.createElement("div", {
|
|
3122
|
-
className: "
|
|
3123
|
-
}, /*#__PURE__*/React.createElement(
|
|
3124
|
-
|
|
3125
|
-
type: "text",
|
|
3167
|
+
className: "w-full"
|
|
3168
|
+
}, /*#__PURE__*/React.createElement(TextField, {
|
|
3169
|
+
placeholder: "From",
|
|
3126
3170
|
value: context.conditionRules.betweenValue.value1,
|
|
3127
3171
|
onChange: function onChange(e) {
|
|
3128
3172
|
var value = e.target.value;
|
|
@@ -3130,15 +3174,10 @@ var ConditionRules = function ConditionRules(_ref) {
|
|
|
3130
3174
|
ctx.conditionRules.betweenValue.value1 = value;
|
|
3131
3175
|
});
|
|
3132
3176
|
}
|
|
3133
|
-
})), /*#__PURE__*/React.createElement("
|
|
3134
|
-
|
|
3135
|
-
|
|
3136
|
-
|
|
3137
|
-
}, conditionformat.to), /*#__PURE__*/React.createElement("div", {
|
|
3138
|
-
className: "condition-rules-between-inpbox"
|
|
3139
|
-
}, /*#__PURE__*/React.createElement("input", {
|
|
3140
|
-
className: "condition-rules-between-input",
|
|
3141
|
-
type: "text",
|
|
3177
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
3178
|
+
className: "w-full"
|
|
3179
|
+
}, /*#__PURE__*/React.createElement(TextField, {
|
|
3180
|
+
placeholder: "To",
|
|
3142
3181
|
value: context.conditionRules.betweenValue.value2,
|
|
3143
3182
|
onChange: function onChange(e) {
|
|
3144
3183
|
var value = e.target.value;
|
|
@@ -3147,10 +3186,10 @@ var ConditionRules = function ConditionRules(_ref) {
|
|
|
3147
3186
|
});
|
|
3148
3187
|
}
|
|
3149
3188
|
})))), type === "occurrenceDate" && (/*#__PURE__*/React.createElement("div", {
|
|
3150
|
-
className: "
|
|
3189
|
+
className: "datepicker-toggle"
|
|
3151
3190
|
}, /*#__PURE__*/React.createElement("input", {
|
|
3152
3191
|
type: "date",
|
|
3153
|
-
className: "
|
|
3192
|
+
className: "datepicker-input",
|
|
3154
3193
|
value: context.conditionRules.dateValue,
|
|
3155
3194
|
onChange: function onChange(e) {
|
|
3156
3195
|
var value = e.target.value;
|
|
@@ -3158,50 +3197,101 @@ var ConditionRules = function ConditionRules(_ref) {
|
|
|
3158
3197
|
ctx.conditionRules.dateValue = value;
|
|
3159
3198
|
});
|
|
3160
3199
|
}
|
|
3161
|
-
})
|
|
3162
|
-
className: "
|
|
3163
|
-
|
|
3164
|
-
|
|
3200
|
+
}), /*#__PURE__*/React.createElement("span", {
|
|
3201
|
+
className: "datepicker-toggle-button"
|
|
3202
|
+
}))), type === "duplicateValue" && (/*#__PURE__*/React.createElement(Select$1, {
|
|
3203
|
+
value: context.conditionRules.repeatValue,
|
|
3204
|
+
onValueChange: function onValueChange(value) {
|
|
3165
3205
|
setContext(function (ctx) {
|
|
3166
3206
|
ctx.conditionRules.repeatValue = value;
|
|
3167
3207
|
});
|
|
3168
3208
|
}
|
|
3169
|
-
}, /*#__PURE__*/React.createElement(
|
|
3209
|
+
}, /*#__PURE__*/React.createElement(SelectTrigger, null, /*#__PURE__*/React.createElement(SelectValue, null)), /*#__PURE__*/React.createElement(SelectContent, {
|
|
3210
|
+
className: "condition-rules-select"
|
|
3211
|
+
}, /*#__PURE__*/React.createElement(SelectItem$1, {
|
|
3170
3212
|
value: "0"
|
|
3171
|
-
}, conditionformat.duplicateValue), /*#__PURE__*/React.createElement(
|
|
3213
|
+
}, conditionformat.duplicateValue), /*#__PURE__*/React.createElement(SelectItem$1, {
|
|
3172
3214
|
value: "1"
|
|
3173
|
-
}, conditionformat.uniqueValue))), (type === "top10" || type === "top10_percent" || type === "last10" || type === "last10_percent") && (/*#__PURE__*/React.createElement("div", {
|
|
3215
|
+
}, conditionformat.uniqueValue)))), (type === "top10" || type === "top10_percent" || type === "last10" || type === "last10_percent") && (/*#__PURE__*/React.createElement("div", {
|
|
3174
3216
|
className: "condition-rules-project-box"
|
|
3175
|
-
}, type === "top10" || type === "top10_percent" ? conditionformat.top : conditionformat.last, /*#__PURE__*/React.createElement("
|
|
3176
|
-
className: "
|
|
3217
|
+
}, type === "top10" || type === "top10_percent" ? conditionformat.top : conditionformat.last, /*#__PURE__*/React.createElement("div", {
|
|
3218
|
+
className: "flex items-center"
|
|
3219
|
+
}, /*#__PURE__*/React.createElement(IconButton, {
|
|
3220
|
+
icon: "Minus",
|
|
3221
|
+
variant: "ghost",
|
|
3222
|
+
className: "!bg-transparent",
|
|
3223
|
+
disabled: Number(context.conditionRules.projectValue) <= 1,
|
|
3224
|
+
onClick: function onClick() {
|
|
3225
|
+
setContext(function (ctx) {
|
|
3226
|
+
var current = Number(ctx.conditionRules.projectValue) || 0;
|
|
3227
|
+
ctx.conditionRules.projectValue = String(Math.max(current - 1, 1));
|
|
3228
|
+
});
|
|
3229
|
+
}
|
|
3230
|
+
}), /*#__PURE__*/React.createElement(TextField, {
|
|
3231
|
+
className: "condition-rules-project-input pr-0",
|
|
3177
3232
|
type: "number",
|
|
3233
|
+
min: 1,
|
|
3234
|
+
max: type === "top10" || type === "last10" ? 10 : 100,
|
|
3178
3235
|
value: context.conditionRules.projectValue,
|
|
3179
3236
|
onChange: function onChange(e) {
|
|
3180
3237
|
var value = e.target.value;
|
|
3181
3238
|
setContext(function (ctx) {
|
|
3182
3239
|
ctx.conditionRules.projectValue = value;
|
|
3183
3240
|
});
|
|
3241
|
+
},
|
|
3242
|
+
rightIcon: type === "top10" || type === "last10" ? (/*#__PURE__*/React.createElement("span", {
|
|
3243
|
+
className: "color-icon-secondary"
|
|
3244
|
+
}, conditionformat.oneself)) : (/*#__PURE__*/React.createElement("span", {
|
|
3245
|
+
className: "color-icon-secondary"
|
|
3246
|
+
}, "%"))
|
|
3247
|
+
}), /*#__PURE__*/React.createElement(IconButton, {
|
|
3248
|
+
icon: "Plus",
|
|
3249
|
+
variant: "ghost",
|
|
3250
|
+
className: "!bg-transparent",
|
|
3251
|
+
disabled: Number(context.conditionRules.projectValue) >= (type === "top10" || type === "last10" ? 10 : 100),
|
|
3252
|
+
onClick: function onClick() {
|
|
3253
|
+
setContext(function (ctx) {
|
|
3254
|
+
var current = Number(ctx.conditionRules.projectValue) || 0;
|
|
3255
|
+
ctx.conditionRules.projectValue = String(current + 1);
|
|
3256
|
+
});
|
|
3257
|
+
}
|
|
3258
|
+
})))))), /*#__PURE__*/React.createElement("div", {
|
|
3259
|
+
className: "flex flex-col"
|
|
3260
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
3261
|
+
className: "condition-rules-value text-heading-xsm"
|
|
3262
|
+
}, conditionformat.applyRange), /*#__PURE__*/React.createElement(TextField, {
|
|
3263
|
+
rightIcon: /*#__PURE__*/React.createElement(LucideIcon, {
|
|
3264
|
+
name: "Grid2x2",
|
|
3265
|
+
size: "sm"
|
|
3266
|
+
}),
|
|
3267
|
+
"aria-hidden": "true",
|
|
3268
|
+
readOnly: true,
|
|
3269
|
+
placeholder: conditionformat.selectRange,
|
|
3270
|
+
value: getDisplayedRangeTxt(context),
|
|
3271
|
+
onClick: function onClick() {
|
|
3272
|
+
dataSelectRange("conditionRules".concat(type));
|
|
3184
3273
|
}
|
|
3185
|
-
})
|
|
3186
|
-
className: "
|
|
3274
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
3275
|
+
className: "flex flex-col"
|
|
3276
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
3277
|
+
className: "condition-rules-set-title text-heading-xsm"
|
|
3187
3278
|
}, "".concat(conditionformat.setAs, "\uFF1A")), /*#__PURE__*/React.createElement("div", {
|
|
3188
3279
|
className: "condition-rules-setbox"
|
|
3189
3280
|
}, /*#__PURE__*/React.createElement("div", {
|
|
3190
3281
|
className: "condition-rules-set"
|
|
3191
3282
|
}, /*#__PURE__*/React.createElement("div", {
|
|
3192
3283
|
className: "condition-rules-color"
|
|
3193
|
-
}, /*#__PURE__*/React.createElement("
|
|
3194
|
-
id: "checkTextColor"
|
|
3195
|
-
|
|
3196
|
-
className: "condition-rules-check",
|
|
3284
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
3285
|
+
id: "checkTextColor"
|
|
3286
|
+
}, /*#__PURE__*/React.createElement(Checkbox, {
|
|
3197
3287
|
checked: context.conditionRules.textColor.check,
|
|
3198
|
-
|
|
3288
|
+
onCheckedChange: function onCheckedChange(e) {
|
|
3199
3289
|
var checked = e.target.checked;
|
|
3200
3290
|
setContext(function (ctx) {
|
|
3201
3291
|
ctx.conditionRules.textColor.check = checked;
|
|
3202
3292
|
});
|
|
3203
3293
|
}
|
|
3204
|
-
}), /*#__PURE__*/React.createElement("label", {
|
|
3294
|
+
})), /*#__PURE__*/React.createElement("label", {
|
|
3205
3295
|
htmlFor: "checkTextColor",
|
|
3206
3296
|
className: "condition-rules-label"
|
|
3207
3297
|
}, conditionformat.textColor), /*#__PURE__*/React.createElement("input", {
|
|
@@ -3218,18 +3308,17 @@ var ConditionRules = function ConditionRules(_ref) {
|
|
|
3218
3308
|
className: "condition-rules-set"
|
|
3219
3309
|
}, /*#__PURE__*/React.createElement("div", {
|
|
3220
3310
|
className: "condition-rules-color"
|
|
3221
|
-
}, /*#__PURE__*/React.createElement("
|
|
3222
|
-
id: "checkCellColor"
|
|
3223
|
-
|
|
3224
|
-
className: "condition-rules-check",
|
|
3311
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
3312
|
+
id: "checkCellColor"
|
|
3313
|
+
}, /*#__PURE__*/React.createElement(Checkbox, {
|
|
3225
3314
|
checked: context.conditionRules.cellColor.check,
|
|
3226
|
-
|
|
3315
|
+
onCheckedChange: function onCheckedChange(e) {
|
|
3227
3316
|
var checked = e.target.checked;
|
|
3228
3317
|
setContext(function (ctx) {
|
|
3229
3318
|
ctx.conditionRules.cellColor.check = checked;
|
|
3230
3319
|
});
|
|
3231
3320
|
}
|
|
3232
|
-
}), /*#__PURE__*/React.createElement("label", {
|
|
3321
|
+
})), /*#__PURE__*/React.createElement("label", {
|
|
3233
3322
|
htmlFor: "checkCellColor",
|
|
3234
3323
|
className: "condition-rules-label"
|
|
3235
3324
|
}, conditionformat.cellColor), /*#__PURE__*/React.createElement("input", {
|
|
@@ -3242,23 +3331,32 @@ var ConditionRules = function ConditionRules(_ref) {
|
|
|
3242
3331
|
draft.cellColor = value;
|
|
3243
3332
|
}));
|
|
3244
3333
|
}
|
|
3245
|
-
})))), /*#__PURE__*/React.createElement(
|
|
3246
|
-
className: "
|
|
3334
|
+
}))))), /*#__PURE__*/React.createElement(Divider$2, {
|
|
3335
|
+
className: "w-full border-t-[1px]"
|
|
3336
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
3337
|
+
className: "flex gap-2 justify-end"
|
|
3338
|
+
}, /*#__PURE__*/React.createElement(Button$1, {
|
|
3339
|
+
variant: "secondary",
|
|
3340
|
+
style: {
|
|
3341
|
+
minWidth: "80px"
|
|
3342
|
+
},
|
|
3247
3343
|
onClick: function onClick() {
|
|
3248
|
-
close("
|
|
3344
|
+
close("close");
|
|
3249
3345
|
},
|
|
3250
3346
|
tabIndex: 0
|
|
3251
|
-
}, button.
|
|
3252
|
-
|
|
3347
|
+
}, button.cancel), /*#__PURE__*/React.createElement(Button$1, {
|
|
3348
|
+
variant: "default",
|
|
3349
|
+
style: {
|
|
3350
|
+
minWidth: "80px"
|
|
3351
|
+
},
|
|
3253
3352
|
onClick: function onClick() {
|
|
3254
|
-
close("
|
|
3353
|
+
close("confirm");
|
|
3255
3354
|
},
|
|
3256
3355
|
tabIndex: 0
|
|
3257
|
-
}, button.
|
|
3356
|
+
}, button.apply)));
|
|
3258
3357
|
};
|
|
3259
3358
|
|
|
3260
3359
|
var RangeDialog = function RangeDialog() {
|
|
3261
|
-
var _context$rangeDialog$, _context$rangeDialog;
|
|
3262
3360
|
var _useContext = useContext(WorkbookContext),
|
|
3263
3361
|
context = _useContext.context,
|
|
3264
3362
|
setContext = _useContext.setContext;
|
|
@@ -3267,7 +3365,7 @@ var RangeDialog = function RangeDialog() {
|
|
|
3267
3365
|
var _locale = locale(context),
|
|
3268
3366
|
dataVerification = _locale.dataVerification,
|
|
3269
3367
|
button = _locale.button;
|
|
3270
|
-
var _useState = useState((
|
|
3368
|
+
var _useState = useState(getDisplayedRangeTxt(context)),
|
|
3271
3369
|
_useState2 = _slicedToArray(_useState, 2),
|
|
3272
3370
|
rangeTxt2 = _useState2[0],
|
|
3273
3371
|
setRangeTxt2 = _useState2[1];
|
|
@@ -3281,30 +3379,24 @@ var RangeDialog = function RangeDialog() {
|
|
|
3281
3379
|
if (rangeDialogType.indexOf("between") >= 0) {
|
|
3282
3380
|
showDialog(/*#__PURE__*/React.createElement(ConditionRules, {
|
|
3283
3381
|
type: "between"
|
|
3284
|
-
}));
|
|
3382
|
+
}), undefined, locale(context).conditionformat.conditionformat_between);
|
|
3285
3383
|
return;
|
|
3286
3384
|
}
|
|
3287
3385
|
if (rangeDialogType.indexOf("conditionRules") >= 0) {
|
|
3288
3386
|
var rulesType = rangeDialogType.substring("conditionRules".length, rangeDialogType.length);
|
|
3289
3387
|
showDialog(/*#__PURE__*/React.createElement(ConditionRules, {
|
|
3290
3388
|
type: rulesType
|
|
3291
|
-
}));
|
|
3389
|
+
}), undefined, locale(context).conditionformat["conditionformat_".concat(rulesType)]);
|
|
3292
3390
|
return;
|
|
3293
3391
|
}
|
|
3294
3392
|
showDialog(/*#__PURE__*/React.createElement(DataVerification, null));
|
|
3295
|
-
}, [
|
|
3393
|
+
}, [setContext, showDialog, context]);
|
|
3296
3394
|
useEffect(function () {
|
|
3297
|
-
setRangeTxt2(
|
|
3298
|
-
if (context.luckysheet_select_save) {
|
|
3299
|
-
var range = context.luckysheet_select_save[context.luckysheet_select_save.length - 1];
|
|
3300
|
-
r = getRangetxt(context, context.currentSheetId, range, context.currentSheetId);
|
|
3301
|
-
return r;
|
|
3302
|
-
}
|
|
3303
|
-
return "";
|
|
3304
|
-
});
|
|
3395
|
+
setRangeTxt2(getDisplayedRangeTxt(context));
|
|
3305
3396
|
}, [context, context.luckysheet_select_save]);
|
|
3306
3397
|
return /*#__PURE__*/React.createElement("div", {
|
|
3307
3398
|
id: "range-dialog",
|
|
3399
|
+
className: "fortune-dialog",
|
|
3308
3400
|
onClick: function onClick(e) {
|
|
3309
3401
|
return e.stopPropagation();
|
|
3310
3402
|
},
|
|
@@ -3322,15 +3414,34 @@ var RangeDialog = function RangeDialog() {
|
|
|
3322
3414
|
},
|
|
3323
3415
|
tabIndex: 0
|
|
3324
3416
|
}, /*#__PURE__*/React.createElement("div", {
|
|
3325
|
-
className: "
|
|
3326
|
-
},
|
|
3417
|
+
className: cn("flex items-center justify-between border-b color-border-default py-3 px-6")
|
|
3418
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
3419
|
+
className: "text-heading-sm"
|
|
3420
|
+
}, dataVerification.selectCellRange), /*#__PURE__*/React.createElement(IconButton, {
|
|
3421
|
+
icon: "X",
|
|
3422
|
+
variant: "ghost",
|
|
3423
|
+
onClick: close,
|
|
3424
|
+
tabIndex: 0
|
|
3425
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
3426
|
+
className: "px-6 pb-6 pt-4 text-body-sm"
|
|
3427
|
+
}, /*#__PURE__*/React.createElement(TextField, {
|
|
3428
|
+
className: "w-full",
|
|
3327
3429
|
readOnly: true,
|
|
3328
3430
|
placeholder: dataVerification.selectCellRange2,
|
|
3329
3431
|
value: rangeTxt2
|
|
3330
|
-
}), /*#__PURE__*/React.createElement("div", {
|
|
3331
|
-
className: "
|
|
3432
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
3433
|
+
className: "px-6 pb-6 flex flex-row gap-2 justify-end"
|
|
3434
|
+
}, /*#__PURE__*/React.createElement(Button$1, {
|
|
3435
|
+
variant: "secondary",
|
|
3436
|
+
style: {
|
|
3437
|
+
minWidth: "80px"
|
|
3438
|
+
},
|
|
3439
|
+
onClick: close,
|
|
3440
|
+
tabIndex: 0
|
|
3441
|
+
}, button.close), /*#__PURE__*/React.createElement(Button$1, {
|
|
3442
|
+
variant: "default",
|
|
3332
3443
|
style: {
|
|
3333
|
-
|
|
3444
|
+
minWidth: "80px"
|
|
3334
3445
|
},
|
|
3335
3446
|
onClick: function onClick() {
|
|
3336
3447
|
setContext(function (ctx) {
|
|
@@ -3339,13 +3450,7 @@ var RangeDialog = function RangeDialog() {
|
|
|
3339
3450
|
close();
|
|
3340
3451
|
},
|
|
3341
3452
|
tabIndex: 0
|
|
3342
|
-
}, button.confirm)
|
|
3343
|
-
className: "button-basic button-close",
|
|
3344
|
-
onClick: function onClick() {
|
|
3345
|
-
close();
|
|
3346
|
-
},
|
|
3347
|
-
tabIndex: 0
|
|
3348
|
-
}, button.close));
|
|
3453
|
+
}, button.confirm)));
|
|
3349
3454
|
};
|
|
3350
3455
|
|
|
3351
3456
|
function useOutsideClick(containerRef, handler, deps, optionalContainerRef) {
|
|
@@ -4264,7 +4369,6 @@ var Combo = function Combo(_ref) {
|
|
|
4264
4369
|
var openState = useRef(false);
|
|
4265
4370
|
var triggerRef = useRef(null);
|
|
4266
4371
|
useOutsideClick(popupRef, function () {
|
|
4267
|
-
console.log("Combo useOutsideClick", openState.current);
|
|
4268
4372
|
setOpen(false);
|
|
4269
4373
|
openState.current = false;
|
|
4270
4374
|
}, [], triggerRef);
|
|
@@ -4296,10 +4400,8 @@ var Combo = function Combo(_ref) {
|
|
|
4296
4400
|
ref: triggerRef,
|
|
4297
4401
|
className: "fortune-toolbar-combo-button",
|
|
4298
4402
|
onClick: function onClick(e) {
|
|
4299
|
-
console.log("Combo onClick pop ref", popupRef.current, "ll", document.getElementsByClassName("fortune-toolbar-combo-popup"));
|
|
4300
4403
|
openState.current = !openState.current;
|
|
4301
4404
|
setOpen(openState.current);
|
|
4302
|
-
console.log("Combo onClick", iconId, _onClick, open, openState.current, e, e.target);
|
|
4303
4405
|
if (_onClick) _onClick(e);else setOpen(openState.current);
|
|
4304
4406
|
},
|
|
4305
4407
|
tabIndex: 0,
|
|
@@ -4315,7 +4417,7 @@ var Combo = function Combo(_ref) {
|
|
|
4315
4417
|
className: "fortune-tooltip"
|
|
4316
4418
|
}, tooltip)), open && (/*#__PURE__*/React.createElement("div", {
|
|
4317
4419
|
ref: popupRef,
|
|
4318
|
-
className: "fortune-toolbar-combo-popup",
|
|
4420
|
+
className: "fortune-toolbar-combo-popup color-text-default",
|
|
4319
4421
|
style: popupPosition
|
|
4320
4422
|
}, children === null || children === void 0 ? void 0 : children(setOpen))));
|
|
4321
4423
|
};
|
|
@@ -4347,209 +4449,10 @@ var Option = function Option(_ref2) {
|
|
|
4347
4449
|
}, iconId && /*#__PURE__*/React.createElement(SVGIcon, {
|
|
4348
4450
|
name: iconId
|
|
4349
4451
|
}), /*#__PURE__*/React.createElement("div", {
|
|
4350
|
-
className: "fortuen-toolbar-text"
|
|
4452
|
+
className: "fortuen-toolbar-text color-text-default text-body-sm"
|
|
4351
4453
|
}, children));
|
|
4352
4454
|
};
|
|
4353
4455
|
|
|
4354
|
-
var FormulaSearch$1 = function FormulaSearch(_ref) {
|
|
4355
|
-
var _onCancel = _ref.onCancel;
|
|
4356
|
-
var _useContext = useContext(WorkbookContext),
|
|
4357
|
-
context = _useContext.context,
|
|
4358
|
-
setContext = _useContext.setContext,
|
|
4359
|
-
_useContext$refs = _useContext.refs,
|
|
4360
|
-
cellInput = _useContext$refs.cellInput,
|
|
4361
|
-
globalCache = _useContext$refs.globalCache;
|
|
4362
|
-
var _useState = useState(20),
|
|
4363
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
4364
|
-
selectedType = _useState2[0],
|
|
4365
|
-
setSelectedType = _useState2[1];
|
|
4366
|
-
var _useState3 = useState(0),
|
|
4367
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
4368
|
-
selectedFuncIndex = _useState4[0],
|
|
4369
|
-
setSelectedFuncIndex = _useState4[1];
|
|
4370
|
-
var _useState5 = useState(""),
|
|
4371
|
-
_useState6 = _slicedToArray(_useState5, 2),
|
|
4372
|
-
searchText = _useState6[0],
|
|
4373
|
-
setSearchText = _useState6[1];
|
|
4374
|
-
var _locale = locale(context),
|
|
4375
|
-
formulaMore = _locale.formulaMore,
|
|
4376
|
-
functionlist = _locale.functionlist,
|
|
4377
|
-
button = _locale.button;
|
|
4378
|
-
var typeList = useMemo(function () {
|
|
4379
|
-
return [{
|
|
4380
|
-
t: 20,
|
|
4381
|
-
n: formulaMore.Crypto
|
|
4382
|
-
}, {
|
|
4383
|
-
t: 0,
|
|
4384
|
-
n: formulaMore.Math
|
|
4385
|
-
}, {
|
|
4386
|
-
t: 1,
|
|
4387
|
-
n: formulaMore.Statistical
|
|
4388
|
-
}, {
|
|
4389
|
-
t: 2,
|
|
4390
|
-
n: formulaMore.Lookup
|
|
4391
|
-
}, {
|
|
4392
|
-
t: 3,
|
|
4393
|
-
n: formulaMore.luckysheet
|
|
4394
|
-
}, {
|
|
4395
|
-
t: 4,
|
|
4396
|
-
n: formulaMore.dataMining
|
|
4397
|
-
}, {
|
|
4398
|
-
t: 5,
|
|
4399
|
-
n: formulaMore.Database
|
|
4400
|
-
}, {
|
|
4401
|
-
t: 6,
|
|
4402
|
-
n: formulaMore.Date
|
|
4403
|
-
}, {
|
|
4404
|
-
t: 7,
|
|
4405
|
-
n: formulaMore.Filter
|
|
4406
|
-
}, {
|
|
4407
|
-
t: 8,
|
|
4408
|
-
n: formulaMore.Financial
|
|
4409
|
-
}, {
|
|
4410
|
-
t: 9,
|
|
4411
|
-
n: formulaMore.Engineering
|
|
4412
|
-
}, {
|
|
4413
|
-
t: 10,
|
|
4414
|
-
n: formulaMore.Logical
|
|
4415
|
-
}, {
|
|
4416
|
-
t: 11,
|
|
4417
|
-
n: formulaMore.Operator
|
|
4418
|
-
}, {
|
|
4419
|
-
t: 12,
|
|
4420
|
-
n: formulaMore.Text
|
|
4421
|
-
}, {
|
|
4422
|
-
t: 13,
|
|
4423
|
-
n: formulaMore.Parser
|
|
4424
|
-
}, {
|
|
4425
|
-
t: 14,
|
|
4426
|
-
n: formulaMore.Array
|
|
4427
|
-
}, {
|
|
4428
|
-
t: -1,
|
|
4429
|
-
n: formulaMore.other
|
|
4430
|
-
}];
|
|
4431
|
-
}, [formulaMore]);
|
|
4432
|
-
var filteredFunctionList = useMemo(function () {
|
|
4433
|
-
if (searchText) {
|
|
4434
|
-
var list = [];
|
|
4435
|
-
var text = _.cloneDeep(searchText.toUpperCase());
|
|
4436
|
-
for (var i = 0; i < functionlist.length; i += 1) {
|
|
4437
|
-
if (/^[a-zA-Z]+$/.test(text)) {
|
|
4438
|
-
if (functionlist[i].n.indexOf(text) !== -1) {
|
|
4439
|
-
list.push(functionlist[i]);
|
|
4440
|
-
}
|
|
4441
|
-
} else if (functionlist[i].a.indexOf(text) !== -1) {
|
|
4442
|
-
list.push(functionlist[i]);
|
|
4443
|
-
}
|
|
4444
|
-
}
|
|
4445
|
-
return list;
|
|
4446
|
-
}
|
|
4447
|
-
return _.filter(functionlist, function (v) {
|
|
4448
|
-
return v.t === selectedType;
|
|
4449
|
-
});
|
|
4450
|
-
}, [functionlist, selectedType, searchText]);
|
|
4451
|
-
var onConfirm = useCallback(function () {
|
|
4452
|
-
var _context$luckysheet_s;
|
|
4453
|
-
var last = (_context$luckysheet_s = context.luckysheet_select_save) === null || _context$luckysheet_s === void 0 ? void 0 : _context$luckysheet_s[context.luckysheet_select_save.length - 1];
|
|
4454
|
-
var row_index = last === null || last === void 0 ? void 0 : last.row_focus;
|
|
4455
|
-
var col_index = last === null || last === void 0 ? void 0 : last.column_focus;
|
|
4456
|
-
if (!last) {
|
|
4457
|
-
row_index = 0;
|
|
4458
|
-
col_index = 0;
|
|
4459
|
-
} else {
|
|
4460
|
-
if (row_index == null) {
|
|
4461
|
-
var _last$row = _slicedToArray(last.row, 1);
|
|
4462
|
-
row_index = _last$row[0];
|
|
4463
|
-
}
|
|
4464
|
-
if (col_index == null) {
|
|
4465
|
-
var _last$column = _slicedToArray(last.column, 1);
|
|
4466
|
-
col_index = _last$column[0];
|
|
4467
|
-
}
|
|
4468
|
-
}
|
|
4469
|
-
var formulaTxt = "<span dir=\"auto\" class=\"luckysheet-formula-text-color\">=</span><span dir=\"auto\" class=\"luckysheet-formula-text-color\">".concat(filteredFunctionList[selectedFuncIndex].n.toUpperCase(), "</span><span dir=\"auto\" class=\"luckysheet-formula-text-color\">(</span>");
|
|
4470
|
-
setContext(function (ctx) {
|
|
4471
|
-
if (cellInput.current != null) {
|
|
4472
|
-
ctx.luckysheetCellUpdate = [row_index, col_index];
|
|
4473
|
-
globalCache.doNotUpdateCell = true;
|
|
4474
|
-
cellInput.current.innerHTML = formulaTxt;
|
|
4475
|
-
var spans = cellInput.current.childNodes;
|
|
4476
|
-
if (!_.isEmpty(spans)) {
|
|
4477
|
-
setCaretPosition(ctx, spans[spans.length - 1], 0, 1);
|
|
4478
|
-
}
|
|
4479
|
-
ctx.functionHint = filteredFunctionList[selectedFuncIndex].n.toUpperCase();
|
|
4480
|
-
ctx.functionCandidates = [];
|
|
4481
|
-
if (_.isEmpty(ctx.formulaCache.functionlistMap)) {
|
|
4482
|
-
for (var i = 0; i < functionlist.length; i += 1) {
|
|
4483
|
-
ctx.formulaCache.functionlistMap[functionlist[i].n] = functionlist[i];
|
|
4484
|
-
}
|
|
4485
|
-
}
|
|
4486
|
-
_onCancel();
|
|
4487
|
-
}
|
|
4488
|
-
});
|
|
4489
|
-
}, [cellInput, context.luckysheet_select_save, filteredFunctionList, globalCache, selectedFuncIndex, setContext, _onCancel, functionlist]);
|
|
4490
|
-
var onCancel = useCallback(function () {
|
|
4491
|
-
setContext(function (ctx) {
|
|
4492
|
-
cancelNormalSelected(ctx);
|
|
4493
|
-
if (cellInput.current) {
|
|
4494
|
-
cellInput.current.innerHTML = "";
|
|
4495
|
-
}
|
|
4496
|
-
});
|
|
4497
|
-
_onCancel();
|
|
4498
|
-
}, [_onCancel, cellInput, setContext]);
|
|
4499
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
4500
|
-
id: "luckysheet-search-formula"
|
|
4501
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
4502
|
-
className: "inpbox"
|
|
4503
|
-
}, /*#__PURE__*/React.createElement("div", null, formulaMore.findFunctionTitle, "\uFF1A"), /*#__PURE__*/React.createElement("input", {
|
|
4504
|
-
className: "formulaInputFocus",
|
|
4505
|
-
id: "searchFormulaListInput",
|
|
4506
|
-
placeholder: formulaMore.tipInputFunctionName,
|
|
4507
|
-
spellCheck: "false",
|
|
4508
|
-
onChange: function onChange(e) {
|
|
4509
|
-
return setSearchText(e.target.value);
|
|
4510
|
-
}
|
|
4511
|
-
})), /*#__PURE__*/React.createElement("div", {
|
|
4512
|
-
className: "selbox"
|
|
4513
|
-
}, /*#__PURE__*/React.createElement("span", null, formulaMore.selectCategory, "\uFF1A"), /*#__PURE__*/React.createElement("select", {
|
|
4514
|
-
id: "formulaTypeSelect",
|
|
4515
|
-
onChange: function onChange(e) {
|
|
4516
|
-
setSelectedType(parseInt(e.target.value, 10));
|
|
4517
|
-
setSelectedFuncIndex(0);
|
|
4518
|
-
}
|
|
4519
|
-
}, typeList.map(function (v) {
|
|
4520
|
-
return /*#__PURE__*/React.createElement("option", {
|
|
4521
|
-
key: v.t,
|
|
4522
|
-
value: v.t
|
|
4523
|
-
}, v.n);
|
|
4524
|
-
}))), /*#__PURE__*/React.createElement("div", {
|
|
4525
|
-
className: "listbox",
|
|
4526
|
-
style: {
|
|
4527
|
-
height: 200
|
|
4528
|
-
}
|
|
4529
|
-
}, /*#__PURE__*/React.createElement("div", null, formulaMore.selectFunctionTitle, "\uFF1A"), /*#__PURE__*/React.createElement("div", {
|
|
4530
|
-
className: "formulaList"
|
|
4531
|
-
}, filteredFunctionList.map(function (v, index) {
|
|
4532
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
4533
|
-
className: "listBox".concat(index === selectedFuncIndex ? " on" : ""),
|
|
4534
|
-
key: v.n,
|
|
4535
|
-
onClick: function onClick() {
|
|
4536
|
-
return setSelectedFuncIndex(index);
|
|
4537
|
-
},
|
|
4538
|
-
tabIndex: 0
|
|
4539
|
-
}, /*#__PURE__*/React.createElement("div", null, v.n), /*#__PURE__*/React.createElement("div", null, v.a));
|
|
4540
|
-
}))), /*#__PURE__*/React.createElement("div", {
|
|
4541
|
-
className: "fortune-dialog-box-button-container"
|
|
4542
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
4543
|
-
className: "fortune-message-box-button button-primary",
|
|
4544
|
-
onClick: onConfirm,
|
|
4545
|
-
tabIndex: 0
|
|
4546
|
-
}, button.confirm), /*#__PURE__*/React.createElement("div", {
|
|
4547
|
-
className: "fortune-message-box-button button-default",
|
|
4548
|
-
onClick: onCancel,
|
|
4549
|
-
tabIndex: 0
|
|
4550
|
-
}, button.cancel)));
|
|
4551
|
-
};
|
|
4552
|
-
|
|
4553
4456
|
var SplitColumn = function SplitColumn() {
|
|
4554
4457
|
var _useContext = useContext(WorkbookContext),
|
|
4555
4458
|
context = _useContext.context,
|
|
@@ -4593,7 +4496,7 @@ var SplitColumn = function SplitColumn() {
|
|
|
4593
4496
|
}
|
|
4594
4497
|
}
|
|
4595
4498
|
if (dataCover) {
|
|
4596
|
-
showDialog(splitText.splitConfirmToExe, "yesno", function () {
|
|
4499
|
+
showDialog(splitText.splitConfirmToExe, "yesno", undefined, function () {
|
|
4597
4500
|
hideDialog();
|
|
4598
4501
|
setContext(function (ctx) {
|
|
4599
4502
|
updateMoreCell(r, c, dataArr, ctx);
|
|
@@ -4916,33 +4819,53 @@ var ConditionalFormat = function ConditionalFormat(_ref) {
|
|
|
4916
4819
|
showDialog = _useDialog.showDialog;
|
|
4917
4820
|
var _locale = locale(context),
|
|
4918
4821
|
conditionformat = _locale.conditionformat;
|
|
4919
|
-
var
|
|
4920
|
-
|
|
4921
|
-
var menuItem = target.className === "fortune-toolbar-menu-line" ? target.parentElement : target;
|
|
4822
|
+
var activeSubMenuRef = useRef(null);
|
|
4823
|
+
var updateSubMenuPosition = useCallback(function (subMenu, menuItem) {
|
|
4922
4824
|
var menuItemRect = menuItem.getBoundingClientRect();
|
|
4923
4825
|
var workbookContainerRect = refs.workbookContainer.current.getBoundingClientRect();
|
|
4924
|
-
var
|
|
4925
|
-
|
|
4926
|
-
|
|
4927
|
-
|
|
4928
|
-
if (workbookContainerRect.right - menuItemRect.right < parseFloat(subMenu.style.width.replace("px", ""))) {
|
|
4929
|
-
subMenu.style.display = "block";
|
|
4930
|
-
subMenu.style.right = "".concat(menuItemRect.width - menuItemPaddingRight, "px");
|
|
4826
|
+
var subMenuWidth = subMenu.offsetWidth;
|
|
4827
|
+
var availableSpace = workbookContainerRect.right - menuItemRect.right;
|
|
4828
|
+
if (availableSpace < subMenuWidth) {
|
|
4829
|
+
subMenu.style.right = "108%";
|
|
4931
4830
|
} else {
|
|
4932
|
-
subMenu.style.
|
|
4933
|
-
subMenu.style.right = "".concat(-(parseFloat(subMenu.style.width.replace("px", "")) + menuItemPaddingRight), "px");
|
|
4831
|
+
subMenu.style.right = "-100%";
|
|
4934
4832
|
}
|
|
4935
4833
|
}, [refs.workbookContainer]);
|
|
4834
|
+
var showSubMenu = useCallback(function (e) {
|
|
4835
|
+
var target = e.target;
|
|
4836
|
+
var menuItem = target.className === "fortune-toolbar-menu-line" ? target.parentElement : target;
|
|
4837
|
+
var subMenu = menuItem.querySelector(".condition-format-sub-menu");
|
|
4838
|
+
if (_.isNil(subMenu)) return;
|
|
4839
|
+
subMenu.style.display = "block";
|
|
4840
|
+
activeSubMenuRef.current = subMenu;
|
|
4841
|
+
updateSubMenuPosition(subMenu, menuItem);
|
|
4842
|
+
}, [updateSubMenuPosition]);
|
|
4936
4843
|
var hideSubMenu = useCallback(function (e) {
|
|
4937
4844
|
var target = e.target;
|
|
4938
4845
|
if (target.className === "condition-format-sub-menu") {
|
|
4939
4846
|
target.style.display = "none";
|
|
4847
|
+
activeSubMenuRef.current = null;
|
|
4940
4848
|
return;
|
|
4941
4849
|
}
|
|
4942
4850
|
var subMenu = target.className === "condition-format-item" ? target.parentElement : target.querySelector(".condition-format-sub-menu");
|
|
4943
4851
|
if (_.isNil(subMenu)) return;
|
|
4944
4852
|
subMenu.style.display = "none";
|
|
4853
|
+
activeSubMenuRef.current = null;
|
|
4945
4854
|
}, []);
|
|
4855
|
+
useEffect(function () {
|
|
4856
|
+
var handleResize = function handleResize() {
|
|
4857
|
+
if (activeSubMenuRef.current) {
|
|
4858
|
+
var menuItem = activeSubMenuRef.current.parentElement;
|
|
4859
|
+
if (menuItem) {
|
|
4860
|
+
updateSubMenuPosition(activeSubMenuRef.current, menuItem);
|
|
4861
|
+
}
|
|
4862
|
+
}
|
|
4863
|
+
};
|
|
4864
|
+
window.addEventListener("resize", handleResize);
|
|
4865
|
+
return function () {
|
|
4866
|
+
window.removeEventListener("resize", handleResize);
|
|
4867
|
+
};
|
|
4868
|
+
}, [updateSubMenuPosition]);
|
|
4946
4869
|
var getConditionFormatItem = useCallback(function (name) {
|
|
4947
4870
|
if (name === "-") {
|
|
4948
4871
|
return /*#__PURE__*/React.createElement(MenuDivider, {
|
|
@@ -4963,8 +4886,7 @@ var ConditionalFormat = function ConditionalFormat(_ref) {
|
|
|
4963
4886
|
}), /*#__PURE__*/React.createElement("div", {
|
|
4964
4887
|
className: "condition-format-sub-menu",
|
|
4965
4888
|
style: {
|
|
4966
|
-
display: "none"
|
|
4967
|
-
width: 150
|
|
4889
|
+
display: "none"
|
|
4968
4890
|
}
|
|
4969
4891
|
}, [{
|
|
4970
4892
|
text: "greaterThan",
|
|
@@ -4989,13 +4911,13 @@ var ConditionalFormat = function ConditionalFormat(_ref) {
|
|
|
4989
4911
|
value: "##"
|
|
4990
4912
|
}].map(function (v) {
|
|
4991
4913
|
return /*#__PURE__*/React.createElement("div", {
|
|
4992
|
-
className: "condition-format-item",
|
|
4914
|
+
className: "condition-format-item text-body-sm color-text-default",
|
|
4993
4915
|
key: v.text,
|
|
4994
4916
|
onClick: function onClick() {
|
|
4995
|
-
setOpen(false);
|
|
4917
|
+
setOpen === null || setOpen === void 0 ? void 0 : setOpen(false);
|
|
4996
4918
|
showDialog(/*#__PURE__*/React.createElement(ConditionRules, {
|
|
4997
4919
|
type: v.text
|
|
4998
|
-
}));
|
|
4920
|
+
}), undefined, conditionformat["conditionformat_".concat(v.text)]);
|
|
4999
4921
|
},
|
|
5000
4922
|
tabIndex: 0
|
|
5001
4923
|
}, conditionformat[v.text], /*#__PURE__*/React.createElement("span", null, v.value));
|
|
@@ -5014,8 +4936,7 @@ var ConditionalFormat = function ConditionalFormat(_ref) {
|
|
|
5014
4936
|
}), /*#__PURE__*/React.createElement("div", {
|
|
5015
4937
|
className: "condition-format-sub-menu",
|
|
5016
4938
|
style: {
|
|
5017
|
-
display: "none"
|
|
5018
|
-
width: 180
|
|
4939
|
+
display: "none"
|
|
5019
4940
|
}
|
|
5020
4941
|
}, [{
|
|
5021
4942
|
text: "top10",
|
|
@@ -5037,13 +4958,13 @@ var ConditionalFormat = function ConditionalFormat(_ref) {
|
|
|
5037
4958
|
value: conditionformat.below
|
|
5038
4959
|
}].map(function (v) {
|
|
5039
4960
|
return /*#__PURE__*/React.createElement("div", {
|
|
5040
|
-
className: "condition-format-item",
|
|
4961
|
+
className: "condition-format-item text-body-sm color-text-default",
|
|
5041
4962
|
key: v.text,
|
|
5042
4963
|
onClick: function onClick() {
|
|
5043
|
-
setOpen(false);
|
|
4964
|
+
setOpen === null || setOpen === void 0 ? void 0 : setOpen(false);
|
|
5044
4965
|
showDialog(/*#__PURE__*/React.createElement(ConditionRules, {
|
|
5045
4966
|
type: v.text
|
|
5046
|
-
}));
|
|
4967
|
+
}), undefined, conditionformat["conditionformat_".concat(v.text)]);
|
|
5047
4968
|
},
|
|
5048
4969
|
tabIndex: 0
|
|
5049
4970
|
}, conditionformat[v.text], /*#__PURE__*/React.createElement("span", null, v.value));
|
|
@@ -5092,12 +5013,11 @@ var ConditionalFormat = function ConditionalFormat(_ref) {
|
|
|
5092
5013
|
}), /*#__PURE__*/React.createElement("div", {
|
|
5093
5014
|
className: "condition-format-sub-menu",
|
|
5094
5015
|
style: {
|
|
5095
|
-
display: "none"
|
|
5096
|
-
width: 150
|
|
5016
|
+
display: "none"
|
|
5097
5017
|
}
|
|
5098
5018
|
}, ["deleteSheetRule"].map(function (v) {
|
|
5099
5019
|
return /*#__PURE__*/React.createElement("div", {
|
|
5100
|
-
className: "condition-format-item",
|
|
5020
|
+
className: "condition-format-item text-body-sm color-text-default",
|
|
5101
5021
|
key: v,
|
|
5102
5022
|
style: {
|
|
5103
5023
|
padding: "6px 10px"
|
|
@@ -6336,9 +6256,10 @@ var Toolbar = function Toolbar(_ref) {
|
|
|
6336
6256
|
}), /*#__PURE__*/React.createElement(MenuDivider, null), /*#__PURE__*/React.createElement(Option, {
|
|
6337
6257
|
key: "formula",
|
|
6338
6258
|
onClick: function onClick() {
|
|
6339
|
-
|
|
6340
|
-
|
|
6341
|
-
|
|
6259
|
+
var button = document.getElementById("function-button");
|
|
6260
|
+
if (button) {
|
|
6261
|
+
button.click();
|
|
6262
|
+
}
|
|
6342
6263
|
setOpen(false);
|
|
6343
6264
|
}
|
|
6344
6265
|
}, "".concat(formula.find, "...")));
|
|
@@ -6663,7 +6584,11 @@ var Toolbar = function Toolbar(_ref) {
|
|
|
6663
6584
|
key: name,
|
|
6664
6585
|
tooltip: toolbar.sortAndFilter
|
|
6665
6586
|
}, function (setOpen) {
|
|
6666
|
-
return /*#__PURE__*/React.createElement(Select,
|
|
6587
|
+
return /*#__PURE__*/React.createElement(Select, {
|
|
6588
|
+
style: {
|
|
6589
|
+
minWidth: "11.25rem"
|
|
6590
|
+
}
|
|
6591
|
+
}, _items8.map(function (_ref11, index) {
|
|
6667
6592
|
var text = _ref11.text,
|
|
6668
6593
|
iconId = _ref11.iconId,
|
|
6669
6594
|
value = _ref11.value,
|
|
@@ -6675,10 +6600,13 @@ var Toolbar = function Toolbar(_ref) {
|
|
|
6675
6600
|
setOpen(false);
|
|
6676
6601
|
}
|
|
6677
6602
|
}, /*#__PURE__*/React.createElement("div", {
|
|
6678
|
-
className: "fortune-toolbar-menu-line"
|
|
6679
|
-
|
|
6603
|
+
className: "fortune-toolbar-menu-line gap-1",
|
|
6604
|
+
style: {
|
|
6605
|
+
justifyContent: "start"
|
|
6606
|
+
}
|
|
6607
|
+
}, /*#__PURE__*/React.createElement(SVGIcon, {
|
|
6680
6608
|
name: iconId
|
|
6681
|
-
})))) : (/*#__PURE__*/React.createElement(MenuDivider, {
|
|
6609
|
+
}), text))) : (/*#__PURE__*/React.createElement(MenuDivider, {
|
|
6682
6610
|
key: "divider-".concat(index)
|
|
6683
6611
|
}));
|
|
6684
6612
|
}));
|
|
@@ -7436,120 +7364,6 @@ var Menu = function Menu(_ref) {
|
|
|
7436
7364
|
}, children));
|
|
7437
7365
|
};
|
|
7438
7366
|
|
|
7439
|
-
var CustomSort = function CustomSort() {
|
|
7440
|
-
var _useState = useState([]),
|
|
7441
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
7442
|
-
rangeColChar = _useState2[0],
|
|
7443
|
-
setRangeColChar = _useState2[1];
|
|
7444
|
-
var _useState3 = useState(true),
|
|
7445
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
7446
|
-
ascOrDesc = _useState4[0],
|
|
7447
|
-
setAscOrDesc = _useState4[1];
|
|
7448
|
-
var _useContext = useContext(WorkbookContext),
|
|
7449
|
-
context = _useContext.context,
|
|
7450
|
-
setContext = _useContext.setContext;
|
|
7451
|
-
var _useState5 = useState("0"),
|
|
7452
|
-
_useState6 = _slicedToArray(_useState5, 2),
|
|
7453
|
-
selectedValue = _useState6[0],
|
|
7454
|
-
setSelectedValue = _useState6[1];
|
|
7455
|
-
var _useState7 = useState(false),
|
|
7456
|
-
_useState8 = _slicedToArray(_useState7, 2),
|
|
7457
|
-
isTitleChange = _useState8[0],
|
|
7458
|
-
setIstitleChange = _useState8[1];
|
|
7459
|
-
var _locale = locale(context),
|
|
7460
|
-
sort = _locale.sort;
|
|
7461
|
-
var _useDialog = useDialog(),
|
|
7462
|
-
hideDialog = _useDialog.hideDialog;
|
|
7463
|
-
var col_start = context.luckysheet_select_save[0].column[0];
|
|
7464
|
-
var col_end = context.luckysheet_select_save[0].column[1];
|
|
7465
|
-
var row_start = context.luckysheet_select_save[0].row[0];
|
|
7466
|
-
var row_end = context.luckysheet_select_save[0].row[1];
|
|
7467
|
-
var sheetIndex = getSheetIndex(context, context.currentSheetId);
|
|
7468
|
-
var handleSelectChange = function handleSelectChange(event) {
|
|
7469
|
-
setSelectedValue(event.target.value);
|
|
7470
|
-
};
|
|
7471
|
-
var handleRadioChange = useCallback(function (e) {
|
|
7472
|
-
var sortValue = e.target.value;
|
|
7473
|
-
setAscOrDesc(sortValue === "asc");
|
|
7474
|
-
}, []);
|
|
7475
|
-
var handleTitleChange = useCallback(function (e) {
|
|
7476
|
-
var value = e.target.checked;
|
|
7477
|
-
setIstitleChange(value);
|
|
7478
|
-
}, []);
|
|
7479
|
-
useEffect(function () {
|
|
7480
|
-
var list = [];
|
|
7481
|
-
if (isTitleChange) {
|
|
7482
|
-
for (var i = col_start; i <= col_end; i += 1) {
|
|
7483
|
-
var _context$luckysheetfi, _context$luckysheetfi2;
|
|
7484
|
-
var cell = (_context$luckysheetfi = context.luckysheetfile[sheetIndex].data) === null || _context$luckysheetfi === void 0 ? void 0 : (_context$luckysheetfi2 = _context$luckysheetfi[row_start]) === null || _context$luckysheetfi2 === void 0 ? void 0 : _context$luckysheetfi2[i];
|
|
7485
|
-
var colHeaderValue = (cell === null || cell === void 0 ? void 0 : cell.m) || (cell === null || cell === void 0 ? void 0 : cell.v);
|
|
7486
|
-
if (colHeaderValue) {
|
|
7487
|
-
list.push(colHeaderValue);
|
|
7488
|
-
} else {
|
|
7489
|
-
var ColumnChar = indexToColumnChar(i);
|
|
7490
|
-
list.push("".concat(sort.columnOperation, " ").concat(ColumnChar));
|
|
7491
|
-
}
|
|
7492
|
-
}
|
|
7493
|
-
} else {
|
|
7494
|
-
for (var _i = col_start; _i <= col_end; _i += 1) {
|
|
7495
|
-
var _ColumnChar = indexToColumnChar(_i);
|
|
7496
|
-
list.push(_ColumnChar);
|
|
7497
|
-
}
|
|
7498
|
-
}
|
|
7499
|
-
setRangeColChar(list);
|
|
7500
|
-
}, [col_end, col_start, context.luckysheetfile, isTitleChange, row_start, sheetIndex, sort.columnOperation]);
|
|
7501
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
7502
|
-
className: "fortune-sort"
|
|
7503
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
7504
|
-
className: "fortune-sort-title"
|
|
7505
|
-
}, /*#__PURE__*/React.createElement("span", null, /*#__PURE__*/React.createElement("span", null, sort.sortRangeTitle), indexToColumnChar(col_start), row_start + 1, /*#__PURE__*/React.createElement("span", null, sort.sortRangeTitleTo), indexToColumnChar(col_end), row_end + 1)), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
|
|
7506
|
-
className: "fortune-sort-modal"
|
|
7507
|
-
}, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("input", {
|
|
7508
|
-
type: "checkbox",
|
|
7509
|
-
id: "fortune-sort-haveheader",
|
|
7510
|
-
onChange: handleTitleChange
|
|
7511
|
-
}), /*#__PURE__*/React.createElement("span", null, sort.hasTitle)), /*#__PURE__*/React.createElement("div", {
|
|
7512
|
-
className: "fortune-sort-tablec"
|
|
7513
|
-
}, /*#__PURE__*/React.createElement("table", {
|
|
7514
|
-
cellSpacing: "0"
|
|
7515
|
-
}, /*#__PURE__*/React.createElement("tbody", null, /*#__PURE__*/React.createElement("tr", null, /*#__PURE__*/React.createElement("td", {
|
|
7516
|
-
style: {
|
|
7517
|
-
width: "190px"
|
|
7518
|
-
}
|
|
7519
|
-
}, sort.sortBy, /*#__PURE__*/React.createElement("select", {
|
|
7520
|
-
name: "sort_0",
|
|
7521
|
-
onChange: handleSelectChange
|
|
7522
|
-
}, rangeColChar.map(function (col, index) {
|
|
7523
|
-
return /*#__PURE__*/React.createElement("option", {
|
|
7524
|
-
value: index,
|
|
7525
|
-
key: index
|
|
7526
|
-
}, col);
|
|
7527
|
-
}))), /*#__PURE__*/React.createElement("td", null, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("input", {
|
|
7528
|
-
type: "radio",
|
|
7529
|
-
value: "asc",
|
|
7530
|
-
defaultChecked: true,
|
|
7531
|
-
name: "sort_0",
|
|
7532
|
-
onChange: handleRadioChange
|
|
7533
|
-
}), /*#__PURE__*/React.createElement("span", null, sort.asc)), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("input", {
|
|
7534
|
-
type: "radio",
|
|
7535
|
-
value: "desc",
|
|
7536
|
-
name: "sort_0",
|
|
7537
|
-
onChange: handleRadioChange
|
|
7538
|
-
}), /*#__PURE__*/React.createElement("span", null, sort.desc))))))))), /*#__PURE__*/React.createElement("div", {
|
|
7539
|
-
className: "fortune-sort-button"
|
|
7540
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
7541
|
-
className: "button-basic button-primary",
|
|
7542
|
-
onClick: function onClick() {
|
|
7543
|
-
setContext(function (draftCtx) {
|
|
7544
|
-
sortSelection(draftCtx, ascOrDesc, parseInt(selectedValue, 10));
|
|
7545
|
-
draftCtx.contextMenu = {};
|
|
7546
|
-
});
|
|
7547
|
-
hideDialog();
|
|
7548
|
-
},
|
|
7549
|
-
tabIndex: 0
|
|
7550
|
-
}, sort.confirm)));
|
|
7551
|
-
};
|
|
7552
|
-
|
|
7553
7367
|
var ContextMenu = function ContextMenu() {
|
|
7554
7368
|
var _useDialog = useDialog(),
|
|
7555
7369
|
showDialog = _useDialog.showDialog;
|
|
@@ -7575,6 +7389,65 @@ var ContextMenu = function ContextMenu() {
|
|
|
7575
7389
|
key: "divider-".concat(i)
|
|
7576
7390
|
});
|
|
7577
7391
|
}
|
|
7392
|
+
if (name === "freeze-row") {
|
|
7393
|
+
var freezeState = getFreezeState(context);
|
|
7394
|
+
var isFrozen = freezeState.isRowFrozen;
|
|
7395
|
+
var isEntireRowSelected = (selection === null || selection === void 0 ? void 0 : selection.row_select) === true;
|
|
7396
|
+
if (!isEntireRowSelected) return null;
|
|
7397
|
+
return /*#__PURE__*/React.createElement(Menu, {
|
|
7398
|
+
key: "freeze-row",
|
|
7399
|
+
onClick: function onClick() {
|
|
7400
|
+
setContext(function (draftCtx) {
|
|
7401
|
+
if (isFrozen) {
|
|
7402
|
+
toggleFreeze(draftCtx, "unfreeze-row");
|
|
7403
|
+
} else {
|
|
7404
|
+
toggleFreeze(draftCtx, "row");
|
|
7405
|
+
}
|
|
7406
|
+
draftCtx.contextMenu = {};
|
|
7407
|
+
});
|
|
7408
|
+
}
|
|
7409
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
7410
|
+
className: "context-item"
|
|
7411
|
+
}, /*#__PURE__*/React.createElement(SVGIcon, {
|
|
7412
|
+
name: "freeze-flv",
|
|
7413
|
+
width: 18,
|
|
7414
|
+
height: 18,
|
|
7415
|
+
style: {
|
|
7416
|
+
marginTop: "4px",
|
|
7417
|
+
marginRight: "4px"
|
|
7418
|
+
}
|
|
7419
|
+
}), isFrozen ? "Unfreeze row" : "Freeze to current row"));
|
|
7420
|
+
}
|
|
7421
|
+
if (name === "freeze-column") {
|
|
7422
|
+
var _freezeState = getFreezeState(context);
|
|
7423
|
+
var _isFrozen = _freezeState.isColFrozen;
|
|
7424
|
+
var isEntireColumnSelected = (selection === null || selection === void 0 ? void 0 : selection.column_select) === true;
|
|
7425
|
+
if (!isEntireColumnSelected) return null;
|
|
7426
|
+
return /*#__PURE__*/React.createElement(Menu, {
|
|
7427
|
+
key: "freeze-column",
|
|
7428
|
+
onClick: function onClick() {
|
|
7429
|
+
setContext(function (draftCtx) {
|
|
7430
|
+
if (_isFrozen) {
|
|
7431
|
+
toggleFreeze(draftCtx, "unfreeze-column");
|
|
7432
|
+
} else {
|
|
7433
|
+
toggleFreeze(draftCtx, "column");
|
|
7434
|
+
jfrefreshgrid(draftCtx, null, undefined, false);
|
|
7435
|
+
}
|
|
7436
|
+
draftCtx.contextMenu = {};
|
|
7437
|
+
});
|
|
7438
|
+
}
|
|
7439
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
7440
|
+
className: "context-item"
|
|
7441
|
+
}, /*#__PURE__*/React.createElement(SVGIcon, {
|
|
7442
|
+
name: "freeze-flv",
|
|
7443
|
+
width: 18,
|
|
7444
|
+
height: 18,
|
|
7445
|
+
style: {
|
|
7446
|
+
marginTop: "4px",
|
|
7447
|
+
marginRight: "4px"
|
|
7448
|
+
}
|
|
7449
|
+
}), /*#__PURE__*/React.createElement("p", null, _isFrozen ? "Unfreeze column" : "Freeze to current column")));
|
|
7450
|
+
}
|
|
7578
7451
|
if (name === "comment") {
|
|
7579
7452
|
return /*#__PURE__*/React.createElement(Menu, {
|
|
7580
7453
|
key: name,
|
|
@@ -7693,19 +7566,14 @@ var ContextMenu = function ContextMenu() {
|
|
|
7693
7566
|
}, /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(SVGIcon, {
|
|
7694
7567
|
name: "insert-flv",
|
|
7695
7568
|
width: 18,
|
|
7696
|
-
height: 18
|
|
7697
|
-
|
|
7698
|
-
marginRight: "8px",
|
|
7699
|
-
position: "relative",
|
|
7700
|
-
top: "3px"
|
|
7701
|
-
}
|
|
7702
|
-
}), _.startsWith((_context$lang = context.lang) !== null && _context$lang !== void 0 ? _context$lang : "", "zh") && (/*#__PURE__*/React.createElement(React.Fragment, null, rightclick.to, /*#__PURE__*/React.createElement("span", {
|
|
7569
|
+
height: 18
|
|
7570
|
+
}), /*#__PURE__*/React.createElement("div", null, _.startsWith((_context$lang = context.lang) !== null && _context$lang !== void 0 ? _context$lang : "", "zh") && (/*#__PURE__*/React.createElement(React.Fragment, null, rightclick.to, /*#__PURE__*/React.createElement("span", {
|
|
7703
7571
|
className: "luckysheet-cols-rows-shift-".concat(dir)
|
|
7704
7572
|
}, rightclick[dir]))), "".concat(rightclick.insert, " "), "1", /*#__PURE__*/React.createElement("span", {
|
|
7705
7573
|
className: "luckysheet-cols-rows-shift-word luckysheet-mousedown-cancel"
|
|
7706
7574
|
}, " ".concat(rightclick.column, " ")), !_.startsWith((_context$lang2 = context.lang) !== null && _context$lang2 !== void 0 ? _context$lang2 : "", "zh") && (/*#__PURE__*/React.createElement("span", {
|
|
7707
7575
|
className: "luckysheet-cols-rows-shift-".concat(dir)
|
|
7708
|
-
}, rightclick[dir]))));
|
|
7576
|
+
}, rightclick[dir])))));
|
|
7709
7577
|
});
|
|
7710
7578
|
}
|
|
7711
7579
|
if (name === "insert-row") {
|
|
@@ -7741,19 +7609,14 @@ var ContextMenu = function ContextMenu() {
|
|
|
7741
7609
|
}, /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(SVGIcon, {
|
|
7742
7610
|
name: "insert-flv",
|
|
7743
7611
|
width: 18,
|
|
7744
|
-
height: 18
|
|
7745
|
-
|
|
7746
|
-
marginRight: "8px",
|
|
7747
|
-
position: "relative",
|
|
7748
|
-
top: "3px"
|
|
7749
|
-
}
|
|
7750
|
-
}), _.startsWith((_context$lang3 = context.lang) !== null && _context$lang3 !== void 0 ? _context$lang3 : "", "zh") && (/*#__PURE__*/React.createElement(React.Fragment, null, rightclick.to, /*#__PURE__*/React.createElement("span", {
|
|
7612
|
+
height: 18
|
|
7613
|
+
}), /*#__PURE__*/React.createElement("div", null, _.startsWith((_context$lang3 = context.lang) !== null && _context$lang3 !== void 0 ? _context$lang3 : "", "zh") && (/*#__PURE__*/React.createElement(React.Fragment, null, rightclick.to, /*#__PURE__*/React.createElement("span", {
|
|
7751
7614
|
className: "luckysheet-cols-rows-shift-".concat(dir)
|
|
7752
7615
|
}, rightclick[dir]))), "".concat(rightclick.insert, " "), "1", /*#__PURE__*/React.createElement("span", {
|
|
7753
7616
|
className: "luckysheet-cols-rows-shift-word luckysheet-mousedown-cancel"
|
|
7754
7617
|
}, " ".concat(rightclick.row, " ")), !_.startsWith((_context$lang4 = context.lang) !== null && _context$lang4 !== void 0 ? _context$lang4 : "", "zh") && (/*#__PURE__*/React.createElement("span", {
|
|
7755
7618
|
className: "luckysheet-cols-rows-shift-".concat(dir)
|
|
7756
|
-
}, rightclick[dir]))));
|
|
7619
|
+
}, rightclick[dir])))));
|
|
7757
7620
|
});
|
|
7758
7621
|
}
|
|
7759
7622
|
if (name === "delete-column") {
|
|
@@ -8015,49 +7878,152 @@ var ContextMenu = function ContextMenu() {
|
|
|
8015
7878
|
}
|
|
8016
7879
|
}), /*#__PURE__*/React.createElement("p", null, rightclick.clearContent)));
|
|
8017
7880
|
}
|
|
8018
|
-
if (name === "orderAZ") {
|
|
8019
|
-
return /*#__PURE__*/React.createElement(Menu, {
|
|
8020
|
-
key: name,
|
|
8021
|
-
onClick: function onClick() {
|
|
8022
|
-
setContext(function (draftCtx) {
|
|
8023
|
-
sortSelection(draftCtx, true);
|
|
8024
|
-
draftCtx.contextMenu = {};
|
|
8025
|
-
});
|
|
8026
|
-
}
|
|
8027
|
-
}, rightclick.orderAZ);
|
|
8028
|
-
}
|
|
8029
|
-
if (name === "orderZA") {
|
|
8030
|
-
return /*#__PURE__*/React.createElement(Menu, {
|
|
8031
|
-
key: name,
|
|
8032
|
-
onClick: function onClick() {
|
|
8033
|
-
setContext(function (draftCtx) {
|
|
8034
|
-
sortSelection(draftCtx, false);
|
|
8035
|
-
draftCtx.contextMenu = {};
|
|
8036
|
-
});
|
|
8037
|
-
}
|
|
8038
|
-
}, rightclick.orderZA);
|
|
8039
|
-
}
|
|
8040
7881
|
if (name === "sort") {
|
|
8041
|
-
|
|
7882
|
+
var _locale2 = locale(context),
|
|
7883
|
+
sort = _locale2.sort;
|
|
7884
|
+
return /*#__PURE__*/React.createElement(Tippy, {
|
|
8042
7885
|
key: name,
|
|
8043
|
-
|
|
8044
|
-
|
|
8045
|
-
|
|
8046
|
-
|
|
8047
|
-
|
|
7886
|
+
placement: "right-start",
|
|
7887
|
+
interactive: true,
|
|
7888
|
+
interactiveBorder: 50,
|
|
7889
|
+
offset: [0, 0],
|
|
7890
|
+
arrow: false,
|
|
7891
|
+
zIndex: 3000,
|
|
7892
|
+
appendTo: document.body,
|
|
7893
|
+
content: /*#__PURE__*/React.createElement("div", {
|
|
7894
|
+
className: "fortune-toolbar-select",
|
|
7895
|
+
style: {
|
|
7896
|
+
minWidth: "11.25rem"
|
|
7897
|
+
}
|
|
7898
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
7899
|
+
className: "flex flex-col color-text-default text-body-sm"
|
|
7900
|
+
}, /*#__PURE__*/React.createElement(Menu, {
|
|
7901
|
+
onClick: function onClick() {
|
|
7902
|
+
setContext(function (draftCtx) {
|
|
7903
|
+
sortSelection(draftCtx, true);
|
|
7904
|
+
draftCtx.contextMenu = {};
|
|
7905
|
+
});
|
|
7906
|
+
}
|
|
7907
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
7908
|
+
className: "context-item p-2 w-full",
|
|
7909
|
+
style: {
|
|
7910
|
+
height: "40px"
|
|
7911
|
+
}
|
|
7912
|
+
}, /*#__PURE__*/React.createElement(SVGIcon, {
|
|
7913
|
+
name: "sort-asc",
|
|
7914
|
+
width: 22,
|
|
7915
|
+
style: {
|
|
7916
|
+
marginRight: "4px"
|
|
7917
|
+
}
|
|
7918
|
+
}), /*#__PURE__*/React.createElement("p", null, sort.asc))), /*#__PURE__*/React.createElement(Menu, {
|
|
7919
|
+
onClick: function onClick() {
|
|
7920
|
+
setContext(function (draftCtx) {
|
|
7921
|
+
sortSelection(draftCtx, false);
|
|
7922
|
+
draftCtx.contextMenu = {};
|
|
7923
|
+
});
|
|
7924
|
+
}
|
|
7925
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
7926
|
+
className: "context-item p-2 w-full",
|
|
7927
|
+
style: {
|
|
7928
|
+
height: "40px"
|
|
7929
|
+
}
|
|
7930
|
+
}, /*#__PURE__*/React.createElement(SVGIcon, {
|
|
7931
|
+
name: "sort-desc",
|
|
7932
|
+
width: 22,
|
|
7933
|
+
style: {
|
|
7934
|
+
marginRight: "4px"
|
|
7935
|
+
}
|
|
7936
|
+
}), /*#__PURE__*/React.createElement("p", null, sort.desc))))),
|
|
7937
|
+
trigger: "mouseenter focus",
|
|
7938
|
+
hideOnClick: false
|
|
7939
|
+
}, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Menu, null, /*#__PURE__*/React.createElement("div", {
|
|
7940
|
+
className: "flex items-center justify-between w-full"
|
|
7941
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
7942
|
+
className: "context-item"
|
|
7943
|
+
}, /*#__PURE__*/React.createElement(SVGIcon, {
|
|
7944
|
+
name: "sort-flv",
|
|
7945
|
+
width: 18,
|
|
7946
|
+
height: 18,
|
|
7947
|
+
style: {
|
|
7948
|
+
marginRight: "8px"
|
|
8048
7949
|
}
|
|
8049
|
-
}, rightclick.sortSelection)
|
|
7950
|
+
}), /*#__PURE__*/React.createElement("p", null, rightclick.sortSelection)), /*#__PURE__*/React.createElement(SVGIcon, {
|
|
7951
|
+
name: "rightArrow",
|
|
7952
|
+
width: 18
|
|
7953
|
+
})))));
|
|
8050
7954
|
}
|
|
8051
7955
|
if (name === "filter") {
|
|
8052
|
-
|
|
7956
|
+
var _locale3 = locale(context),
|
|
7957
|
+
filter = _locale3.filter;
|
|
7958
|
+
return /*#__PURE__*/React.createElement(Tippy, {
|
|
8053
7959
|
key: name,
|
|
8054
|
-
|
|
8055
|
-
|
|
8056
|
-
|
|
8057
|
-
|
|
8058
|
-
|
|
7960
|
+
placement: "right-start",
|
|
7961
|
+
interactive: true,
|
|
7962
|
+
interactiveBorder: 50,
|
|
7963
|
+
offset: [0, 0],
|
|
7964
|
+
arrow: false,
|
|
7965
|
+
zIndex: 3000,
|
|
7966
|
+
appendTo: document.body,
|
|
7967
|
+
content: /*#__PURE__*/React.createElement("div", {
|
|
7968
|
+
className: "fortune-toolbar-select",
|
|
7969
|
+
style: {
|
|
7970
|
+
minWidth: "11.25rem"
|
|
7971
|
+
}
|
|
7972
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
7973
|
+
className: "flex flex-col color-text-default text-body-sm"
|
|
7974
|
+
}, /*#__PURE__*/React.createElement(Menu, {
|
|
7975
|
+
onClick: function onClick() {
|
|
7976
|
+
setContext(function (draftCtx) {
|
|
7977
|
+
createFilter(draftCtx);
|
|
7978
|
+
draftCtx.contextMenu = {};
|
|
7979
|
+
});
|
|
7980
|
+
}
|
|
7981
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
7982
|
+
className: "context-item p-2 w-full",
|
|
7983
|
+
style: {
|
|
7984
|
+
height: "40px"
|
|
7985
|
+
}
|
|
7986
|
+
}, /*#__PURE__*/React.createElement(SVGIcon, {
|
|
7987
|
+
name: "filter",
|
|
7988
|
+
width: 22,
|
|
7989
|
+
style: {
|
|
7990
|
+
marginRight: "4px"
|
|
7991
|
+
}
|
|
7992
|
+
}), /*#__PURE__*/React.createElement("p", null, filter.filter))), /*#__PURE__*/React.createElement(Menu, {
|
|
7993
|
+
onClick: function onClick() {
|
|
7994
|
+
setContext(function (draftCtx) {
|
|
7995
|
+
clearFilter(draftCtx);
|
|
7996
|
+
draftCtx.contextMenu = {};
|
|
7997
|
+
});
|
|
7998
|
+
}
|
|
7999
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
8000
|
+
className: "context-item p-2 w-full",
|
|
8001
|
+
style: {
|
|
8002
|
+
height: "40px"
|
|
8003
|
+
}
|
|
8004
|
+
}, /*#__PURE__*/React.createElement(SVGIcon, {
|
|
8005
|
+
name: "eraser",
|
|
8006
|
+
width: 22,
|
|
8007
|
+
style: {
|
|
8008
|
+
marginRight: "4px"
|
|
8009
|
+
}
|
|
8010
|
+
}), /*#__PURE__*/React.createElement("p", null, filter.clearFilter))))),
|
|
8011
|
+
trigger: "mouseenter focus",
|
|
8012
|
+
hideOnClick: false
|
|
8013
|
+
}, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Menu, null, /*#__PURE__*/React.createElement("div", {
|
|
8014
|
+
className: "flex items-center justify-between w-full"
|
|
8015
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
8016
|
+
className: "context-item"
|
|
8017
|
+
}, /*#__PURE__*/React.createElement(SVGIcon, {
|
|
8018
|
+
name: "filter",
|
|
8019
|
+
width: 22,
|
|
8020
|
+
style: {
|
|
8021
|
+
marginRight: "4px"
|
|
8059
8022
|
}
|
|
8060
|
-
}, rightclick.filterSelection)
|
|
8023
|
+
}), /*#__PURE__*/React.createElement("p", null, rightclick.filterSelection)), /*#__PURE__*/React.createElement(SVGIcon, {
|
|
8024
|
+
name: "rightArrow",
|
|
8025
|
+
width: 18
|
|
8026
|
+
})))));
|
|
8061
8027
|
}
|
|
8062
8028
|
if (name === "image") {
|
|
8063
8029
|
return /*#__PURE__*/React.createElement(Menu, {
|
|
@@ -8081,8 +8047,45 @@ var ContextMenu = function ContextMenu() {
|
|
|
8081
8047
|
}
|
|
8082
8048
|
}, rightclick.link);
|
|
8083
8049
|
}
|
|
8050
|
+
if (name === "conditionFormat") {
|
|
8051
|
+
var closeContextMenu = function closeContextMenu() {
|
|
8052
|
+
return setContext(function (ctx) {
|
|
8053
|
+
ctx.contextMenu = {};
|
|
8054
|
+
});
|
|
8055
|
+
};
|
|
8056
|
+
return /*#__PURE__*/React.createElement(Tippy, {
|
|
8057
|
+
key: name,
|
|
8058
|
+
placement: "right-start",
|
|
8059
|
+
interactive: true,
|
|
8060
|
+
interactiveBorder: 50,
|
|
8061
|
+
offset: [0, 0],
|
|
8062
|
+
arrow: false,
|
|
8063
|
+
zIndex: 3000,
|
|
8064
|
+
appendTo: document.body,
|
|
8065
|
+
content: /*#__PURE__*/React.createElement("div", {
|
|
8066
|
+
style: {
|
|
8067
|
+
minWidth: 220
|
|
8068
|
+
}
|
|
8069
|
+
}, /*#__PURE__*/React.createElement(ConditionalFormat, {
|
|
8070
|
+
items: ["highlightCellRules", "itemSelectionRules", "-", "deleteRule"],
|
|
8071
|
+
setOpen: closeContextMenu
|
|
8072
|
+
})),
|
|
8073
|
+
trigger: "mouseenter focus",
|
|
8074
|
+
hideOnClick: false
|
|
8075
|
+
}, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Menu, null, /*#__PURE__*/React.createElement("div", {
|
|
8076
|
+
className: "flex items-center justify-between w-full"
|
|
8077
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
8078
|
+
className: "flex items-center gap-2"
|
|
8079
|
+
}, /*#__PURE__*/React.createElement(SVGIcon, {
|
|
8080
|
+
name: "conditionFormat",
|
|
8081
|
+
width: 18
|
|
8082
|
+
}), /*#__PURE__*/React.createElement("p", null, rightclick.conditionFormat || "Conditional Format")), /*#__PURE__*/React.createElement(SVGIcon, {
|
|
8083
|
+
name: "rightArrow",
|
|
8084
|
+
width: 18
|
|
8085
|
+
})))));
|
|
8086
|
+
}
|
|
8084
8087
|
return null;
|
|
8085
|
-
}, [context
|
|
8088
|
+
}, [context, setContext, refs.globalCache, rightclick, showAlert, showDialog, drag.noMulti, info.tipRowHeightLimit, info.tipColumnWidthLimit, generalDialog.partiallyError, generalDialog.readOnlyError, generalDialog.dataNullError]);
|
|
8086
8089
|
useLayoutEffect(function () {
|
|
8087
8090
|
var _refs$workbookContain;
|
|
8088
8091
|
if (!containerRef.current) {
|
|
@@ -9350,31 +9353,41 @@ var SVGDefines = function SVGDefines(_ref) {
|
|
|
9350
9353
|
stroke: "#535A68",
|
|
9351
9354
|
strokeWidth: "1.5"
|
|
9352
9355
|
})), /*#__PURE__*/React.createElement("symbol", {
|
|
9353
|
-
|
|
9354
|
-
|
|
9355
|
-
|
|
9356
|
+
id: "sort-desc",
|
|
9357
|
+
width: "18",
|
|
9358
|
+
height: "18",
|
|
9359
|
+
viewBox: "0 0 18 18",
|
|
9360
|
+
fill: "none"
|
|
9356
9361
|
}, /*#__PURE__*/React.createElement("path", {
|
|
9357
|
-
d: "
|
|
9358
|
-
|
|
9362
|
+
d: "M6.75 12.75C7.16421 12.75 7.5 13.0858 7.5 13.5C7.5 13.9142 7.16421 14.25 6.75 14.25H5.25C4.83579 14.25 4.5 13.9142 4.5 13.5C4.5 13.0858 4.83579 12.75 5.25 12.75H6.75Z",
|
|
9363
|
+
fill: "#363B3F"
|
|
9359
9364
|
}), /*#__PURE__*/React.createElement("path", {
|
|
9360
|
-
d: "
|
|
9361
|
-
|
|
9365
|
+
d: "M9 9.75C9.41421 9.75 9.75 10.0858 9.75 10.5C9.75 10.9142 9.41421 11.25 9 11.25H5.25C4.83579 11.25 4.5 10.9142 4.5 10.5C4.5 10.0858 4.83579 9.75 5.25 9.75H9Z",
|
|
9366
|
+
fill: "#363B3F"
|
|
9362
9367
|
}), /*#__PURE__*/React.createElement("path", {
|
|
9363
|
-
d: "
|
|
9364
|
-
|
|
9365
|
-
})
|
|
9366
|
-
|
|
9367
|
-
fill: "#
|
|
9368
|
-
|
|
9368
|
+
d: "M11.25 6.75C11.6642 6.75 12 7.08579 12 7.5C12 7.91421 11.6642 8.25 11.25 8.25H5.25C4.83579 8.25 4.5 7.91421 4.5 7.5C4.5 7.08579 4.83579 6.75 5.25 6.75H11.25Z",
|
|
9369
|
+
fill: "#363B3F"
|
|
9370
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
9371
|
+
d: "M13.5 3.75C13.9142 3.75 14.25 4.08579 14.25 4.5C14.25 4.91421 13.9142 5.25 13.5 5.25H5.25C4.83579 5.25 4.5 4.91421 4.5 4.5C4.5 4.08579 4.83579 3.75 5.25 3.75H13.5Z",
|
|
9372
|
+
fill: "#363B3F"
|
|
9373
|
+
})), /*#__PURE__*/React.createElement("symbol", {
|
|
9374
|
+
id: "sort-asc",
|
|
9375
|
+
width: "18",
|
|
9376
|
+
height: "18",
|
|
9377
|
+
viewBox: "0 0 18 18",
|
|
9378
|
+
fill: "none"
|
|
9369
9379
|
}, /*#__PURE__*/React.createElement("path", {
|
|
9370
|
-
d: "
|
|
9371
|
-
|
|
9380
|
+
d: "M13.5 12.75C13.9142 12.75 14.25 13.0858 14.25 13.5C14.25 13.9142 13.9142 14.25 13.5 14.25H5.25C4.83579 14.25 4.5 13.9142 4.5 13.5C4.5 13.0858 4.83579 12.75 5.25 12.75H13.5Z",
|
|
9381
|
+
fill: "#363B3F"
|
|
9382
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
9383
|
+
d: "M11.25 9.75C11.6642 9.75 12 10.0858 12 10.5C12 10.9142 11.6642 11.25 11.25 11.25H5.25C4.83579 11.25 4.5 10.9142 4.5 10.5C4.5 10.0858 4.83579 9.75 5.25 9.75H11.25Z",
|
|
9384
|
+
fill: "#363B3F"
|
|
9372
9385
|
}), /*#__PURE__*/React.createElement("path", {
|
|
9373
|
-
d: "
|
|
9374
|
-
|
|
9386
|
+
d: "M9 6.75C9.41421 6.75 9.75 7.08579 9.75 7.5C9.75 7.91421 9.41421 8.25 9 8.25H5.25C4.83579 8.25 4.5 7.91421 4.5 7.5C4.5 7.08579 4.83579 6.75 5.25 6.75H9Z",
|
|
9387
|
+
fill: "#363B3F"
|
|
9375
9388
|
}), /*#__PURE__*/React.createElement("path", {
|
|
9376
|
-
d: "
|
|
9377
|
-
|
|
9389
|
+
d: "M6.75 3.75C7.16421 3.75 7.5 4.08579 7.5 4.5C7.5 4.91421 7.16421 5.25 6.75 5.25H5.25C4.83579 5.25 4.5 4.91421 4.5 4.5C4.5 4.08579 4.83579 3.75 5.25 3.75H6.75Z",
|
|
9390
|
+
fill: "#363B3F"
|
|
9378
9391
|
})), /*#__PURE__*/React.createElement("symbol", {
|
|
9379
9392
|
viewBox: "0 0 1024 1024",
|
|
9380
9393
|
fill: "#535A68",
|
|
@@ -9437,13 +9450,16 @@ var SVGDefines = function SVGDefines(_ref) {
|
|
|
9437
9450
|
d: "M4.66663 1.33334C4.66663 0.965149 4.36815 0.666672 3.99996 0.666672C3.63177 0.666672 3.33329 0.965149 3.33329 1.33334V3.33334H1.33329C0.965103 3.33334 0.666626 3.63182 0.666626 4C0.666626 4.36819 0.965103 4.66667 1.33329 4.66667H3.33329V10.6667C3.33329 11.1971 3.54401 11.7058 3.91908 12.0809C4.29415 12.456 4.80286 12.6667 5.33329 12.6667H11.3333V14.6667C11.3333 15.0349 11.6318 15.3333 12 15.3333C12.3681 15.3333 12.6666 15.0349 12.6666 14.6667V12.6667H14.6666C15.0348 12.6667 15.3333 12.3682 15.3333 12C15.3333 11.6318 15.0348 11.3333 14.6666 11.3333H12.6666V5.33334C12.6666 4.8029 12.4559 4.2942 12.0808 3.91912C11.7058 3.54405 11.1971 3.33334 10.6666 3.33334H4.66663V1.33334ZM4.66663 4.66667V10.6667C4.66663 10.8435 4.73686 11.0131 4.86189 11.1381C4.98691 11.2631 5.15648 11.3333 5.33329 11.3333H11.3333V5.33334C11.3333 5.15653 11.2631 4.98696 11.138 4.86193C11.013 4.73691 10.8434 4.66667 10.6666 4.66667H4.66663Z",
|
|
9438
9451
|
fill: "#363B3F"
|
|
9439
9452
|
}))), /*#__PURE__*/React.createElement("symbol", {
|
|
9440
|
-
|
|
9441
|
-
|
|
9442
|
-
|
|
9443
|
-
|
|
9453
|
+
width: "20",
|
|
9454
|
+
height: "24",
|
|
9455
|
+
viewBox: "0 0 16 16",
|
|
9456
|
+
fill: "none",
|
|
9457
|
+
id: "conditionFormat"
|
|
9444
9458
|
}, /*#__PURE__*/React.createElement("path", {
|
|
9445
|
-
|
|
9446
|
-
"
|
|
9459
|
+
"fill-rule": "evenodd",
|
|
9460
|
+
"clip-rule": "evenodd",
|
|
9461
|
+
d: "M11.4661 0.673182C11.7715 0.703436 12.0585 0.838439 12.2773 1.0573C12.5274 1.30735 12.668 1.64638 12.668 2.00001V7.51303C12.7678 7.57076 12.861 7.64098 12.944 7.72396C13.1941 7.97401 13.3346 8.31305 13.3346 8.66667V9.33334C13.3346 9.86377 13.1238 10.3723 12.7487 10.7474C12.3736 11.1225 11.8651 11.3333 11.3346 11.3333H10.0013V13.2669C10.0012 13.7973 9.79038 14.306 9.41536 14.681C9.0403 15.056 8.53167 15.2669 8.0013 15.2669C7.47093 15.2669 6.9623 15.056 6.58724 14.681C6.21223 14.306 6.00137 13.7973 6.0013 13.2669V11.3333H4.66797C4.13754 11.3333 3.62898 11.1225 3.25391 10.7474C2.92577 10.4193 2.72324 9.98901 2.67773 9.53125L2.66797 9.33334V8.66667C2.66797 8.31305 2.80855 7.97401 3.05859 7.72396C3.14158 7.64098 3.23477 7.57076 3.33464 7.51303V2.00001C3.33464 1.64638 3.47521 1.30734 3.72526 1.0573C3.97531 0.807248 4.31435 0.666672 4.66797 0.666672H11.3346L11.4661 0.673182ZM4.0013 8.66667V9.33334L4.00456 9.39909C4.01968 9.55176 4.08719 9.69526 4.19661 9.80469C4.32164 9.92972 4.49116 10 4.66797 10H6.0013C6.35492 10 6.69396 10.1406 6.94401 10.3906C7.19406 10.6407 7.33464 10.9797 7.33464 11.3333V13.2669C7.3347 13.4436 7.40498 13.6133 7.52995 13.7383C7.65496 13.8632 7.82455 13.9336 8.0013 13.9336C8.17805 13.9336 8.34764 13.8632 8.47266 13.7383C8.59762 13.6133 8.6679 13.4436 8.66797 13.2669V11.3333C8.66797 10.9797 8.80855 10.6407 9.05859 10.3906C9.30864 10.1406 9.64768 10 10.0013 10H11.3346C11.5114 10 11.681 9.92972 11.806 9.80469C11.931 9.67967 12.0013 9.51015 12.0013 9.33334V8.66667H4.0013ZM4.66797 7.33334H11.3346V2.00001H10.0013V4C10.0013 4.36819 9.70283 4.66667 9.33463 4.66667C8.96644 4.66667 8.66797 4.36819 8.66797 4V2.00001H7.33464V2.66667C7.33464 3.03486 7.03616 3.33334 6.66797 3.33334C6.29978 3.33334 6.0013 3.03486 6.0013 2.66667V2.00001H4.66797V7.33334Z",
|
|
9462
|
+
fill: "#363B3F"
|
|
9447
9463
|
})), /*#__PURE__*/React.createElement("symbol", {
|
|
9448
9464
|
viewBox: "0 0 1024 1024",
|
|
9449
9465
|
fill: "#535A68",
|
|
@@ -9549,19 +9565,29 @@ var SVGDefines = function SVGDefines(_ref) {
|
|
|
9549
9565
|
d: "M0.728617 1.71942C0.837856 1.48397 1.07381 1.33333 1.33336 1.33333H14.6667C14.9262 1.33333 15.1622 1.48397 15.2714 1.71942C15.3807 1.95486 15.3433 2.2323 15.1757 2.43048L10 8.55077V14C10 14.2311 9.88039 14.4456 9.68385 14.5671C9.48731 14.6886 9.24188 14.6996 9.03522 14.5963L6.36855 13.263C6.1427 13.15 6.00003 12.9192 6.00003 12.6667V8.55077L0.824316 2.43048C0.656718 2.2323 0.619379 1.95486 0.728617 1.71942ZM2.77023 2.66667L7.17574 7.87618C7.27752 7.99653 7.33336 8.14905 7.33336 8.30667V12.2546L8.6667 12.9213V8.30667C8.6667 8.14905 8.72254 7.99653 8.82432 7.87618L13.2298 2.66667H2.77023Z",
|
|
9550
9566
|
fill: "#363B3F"
|
|
9551
9567
|
}))), /*#__PURE__*/React.createElement("symbol", {
|
|
9552
|
-
|
|
9553
|
-
|
|
9554
|
-
|
|
9568
|
+
id: "filter1",
|
|
9569
|
+
width: "18",
|
|
9570
|
+
height: "18",
|
|
9571
|
+
viewBox: "0 0 18 18",
|
|
9572
|
+
fill: "none"
|
|
9555
9573
|
}, /*#__PURE__*/React.createElement("path", {
|
|
9556
|
-
d: "
|
|
9557
|
-
|
|
9574
|
+
d: "M10.0149 1.5C10.4291 1.5 10.7649 1.83579 10.7649 2.25C10.7649 2.66421 10.4291 3 10.0149 3H2.24975L7.66821 8.99121L7.80004 9.15161C8.09041 9.53914 8.24953 10.0121 8.24975 10.5V15.0007L9.74902 15.75L9.74975 10.5C9.75 9.9426 9.95667 9.4046 10.3306 8.99121L11.2439 7.98047L11.2988 7.92627C11.5809 7.67149 12.0156 7.66669 12.3037 7.927C12.6108 8.20473 12.6348 8.67881 12.3572 8.98608L11.4438 9.99683L11.4431 9.99756C11.3186 10.1353 11.2499 10.3143 11.2498 10.5V15.75L11.2468 15.8452C11.2327 16.0677 11.1689 16.2847 11.0601 16.4802C10.9356 16.7036 10.756 16.8914 10.5386 17.0259C10.3211 17.1604 10.0726 17.237 9.81713 17.2485C9.5937 17.2586 9.37132 17.2188 9.16601 17.1321L9.07885 17.0918L7.57885 16.3418C7.32961 16.2172 7.11961 16.0259 6.97314 15.7888C6.84501 15.5814 6.77019 15.3462 6.75341 15.104L6.74975 15V10.5C6.7496 10.3375 6.69633 10.1801 6.5996 10.051L6.55566 9.99756L1.13647 4.00562C0.94211 3.79026 0.81445 3.52231 0.768793 3.23584C0.723182 2.94943 0.760896 2.65567 0.878656 2.39062C0.996448 2.12559 1.18922 1.90053 1.43237 1.74243C1.67547 1.58442 1.95908 1.50014 2.24902 1.5H10.0149Z",
|
|
9575
|
+
fill: "#363B3F"
|
|
9576
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
9577
|
+
d: "M14.2498 1.5C14.6638 1.50014 14.9998 1.83587 14.9998 2.25V3.75H16.4998C16.9138 3.75014 17.2498 4.08587 17.2498 4.5C17.2498 4.91413 16.9138 5.24986 16.4998 5.25H14.9998V6.75C14.9998 7.16413 14.6638 7.49986 14.2498 7.5C13.8355 7.5 13.4998 7.16421 13.4998 6.75V5.25H11.9998C11.5855 5.25 11.2498 4.91421 11.2498 4.5C11.2498 4.08579 11.5855 3.75 11.9998 3.75H13.4998V2.25C13.4998 1.83579 13.8355 1.5 14.2498 1.5Z",
|
|
9578
|
+
fill: "#363B3F"
|
|
9558
9579
|
})), /*#__PURE__*/React.createElement("symbol", {
|
|
9559
|
-
|
|
9560
|
-
|
|
9561
|
-
|
|
9580
|
+
id: "eraser",
|
|
9581
|
+
width: "18",
|
|
9582
|
+
height: "18",
|
|
9583
|
+
viewBox: "0 0 18 18",
|
|
9584
|
+
fill: "none"
|
|
9562
9585
|
}, /*#__PURE__*/React.createElement("path", {
|
|
9563
|
-
d: "
|
|
9564
|
-
|
|
9586
|
+
d: "M9.39746 1.5C9.81167 1.5 10.1475 1.83579 10.1475 2.25C10.1475 2.66421 9.81167 3 9.39746 3H2.24975L7.66821 8.99121L7.80004 9.15161C8.09041 9.53914 8.24953 10.0121 8.24975 10.5V15.0007L9.74902 15.75L9.74975 10.5C9.75 9.94243 9.95719 9.40465 10.3313 8.99121L10.6506 8.63672L10.7048 8.58252C10.9867 8.32757 11.4214 8.32258 11.7097 8.58252C12.0172 8.86008 12.0415 9.33487 11.7639 9.64233L11.4438 9.99683L11.4431 9.99756C11.3186 10.1353 11.2499 10.3143 11.2498 10.5V15.75L11.2468 15.8452C11.2327 16.0677 11.1689 16.2847 11.0601 16.4802C10.9356 16.7036 10.756 16.8914 10.5386 17.0259C10.3211 17.1604 10.0726 17.237 9.81713 17.2485C9.5937 17.2586 9.37132 17.2188 9.16601 17.1321L9.07885 17.0918L7.57885 16.3418C7.32961 16.2172 7.11961 16.0259 6.97314 15.7888C6.84501 15.5814 6.77019 15.3462 6.75341 15.104L6.74975 15V10.5C6.7496 10.3375 6.69633 10.1801 6.5996 10.051L6.55566 9.99756L1.13647 4.00562C0.94211 3.79026 0.81445 3.52231 0.768793 3.23584C0.723182 2.94943 0.760896 2.65567 0.878656 2.39062C0.996448 2.12559 1.18922 1.90053 1.43237 1.74243C1.67547 1.58442 1.95908 1.50014 2.24902 1.5H9.39746Z",
|
|
9587
|
+
fill: "#363B3F"
|
|
9588
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
9589
|
+
d: "M11.8445 2.09473C12.1191 1.82027 12.5534 1.80323 12.8479 2.04346L12.905 2.09473L14.2498 3.43945L15.5945 2.09473L15.6516 2.04346C15.9462 1.80333 16.3805 1.82019 16.655 2.09473C16.9294 2.36928 16.9464 2.80361 16.7063 3.09814L16.655 3.15527L15.3103 4.5L16.655 5.84473L16.7063 5.90186C16.9464 6.19639 16.9294 6.63072 16.655 6.90527C16.3805 7.17981 15.9462 7.19667 15.6516 6.95654L15.5945 6.90527L14.2498 5.56055L12.905 6.90527C12.6122 7.19812 12.1374 7.19804 11.8445 6.90527C11.5516 6.61238 11.5516 6.13762 11.8445 5.84473L13.1892 4.5L11.8445 3.15527L11.7932 3.09814C11.5529 2.80356 11.5699 2.36931 11.8445 2.09473Z",
|
|
9590
|
+
fill: "#363B3F"
|
|
9565
9591
|
})), /*#__PURE__*/React.createElement("symbol", {
|
|
9566
9592
|
viewBox: "0 0 1057 1024",
|
|
9567
9593
|
fill: "#535A68",
|
|
@@ -9615,12 +9641,16 @@ var SVGDefines = function SVGDefines(_ref) {
|
|
|
9615
9641
|
fill: "",
|
|
9616
9642
|
"p-id": "5612"
|
|
9617
9643
|
})), /*#__PURE__*/React.createElement("symbol", {
|
|
9618
|
-
|
|
9619
|
-
|
|
9644
|
+
width: "16",
|
|
9645
|
+
height: "24",
|
|
9646
|
+
viewBox: "0 0 16 16",
|
|
9647
|
+
fill: "none",
|
|
9620
9648
|
id: "rightArrow"
|
|
9621
9649
|
}, /*#__PURE__*/React.createElement("path", {
|
|
9622
|
-
|
|
9623
|
-
"
|
|
9650
|
+
"fill-rule": "evenodd",
|
|
9651
|
+
"clip-rule": "evenodd",
|
|
9652
|
+
d: "M5.52729 3.52859C5.78764 3.26824 6.20975 3.26824 6.4701 3.52859L10.4701 7.52859C10.7305 7.78894 10.7305 8.21105 10.4701 8.4714L6.4701 12.4714C6.20975 12.7317 5.78764 12.7317 5.52729 12.4714C5.26694 12.2111 5.26694 11.7889 5.52729 11.5286L9.05589 8L5.52729 4.4714C5.26694 4.21105 5.26694 3.78894 5.52729 3.52859Z",
|
|
9653
|
+
fill: "#77818A"
|
|
9624
9654
|
})), /*#__PURE__*/React.createElement("symbol", {
|
|
9625
9655
|
viewBox: "0 0 1024 1024",
|
|
9626
9656
|
id: "downArrow"
|
|
@@ -9710,6 +9740,20 @@ var SVGDefines = function SVGDefines(_ref) {
|
|
|
9710
9740
|
"clip-rule": "evenodd",
|
|
9711
9741
|
d: "M3.75 1.5C3.15326 1.5 2.58097 1.73705 2.15901 2.15901C1.73705 2.58097 1.5 3.15326 1.5 3.75V15.75C1.5 16.0533 1.68273 16.3268 1.96299 16.4429C2.24324 16.559 2.56583 16.4948 2.78033 16.2803L5.56066 13.5H14.25C14.8467 13.5 15.419 13.2629 15.841 12.841C16.2629 12.419 16.5 11.8467 16.5 11.25V3.75C16.5 3.15326 16.2629 2.58097 15.841 2.15901C15.419 1.73705 14.8467 1.5 14.25 1.5H3.75ZM3.21967 3.21967C3.36032 3.07902 3.55109 3 3.75 3H14.25C14.4489 3 14.6397 3.07902 14.7803 3.21967C14.921 3.36032 15 3.55109 15 3.75V11.25C15 11.4489 14.921 11.6397 14.7803 11.7803C14.6397 11.921 14.4489 12 14.25 12H5.25C5.05109 12 4.86032 12.079 4.71967 12.2197L3 13.9393V3.75C3 3.55109 3.07902 3.36032 3.21967 3.21967Z",
|
|
9712
9742
|
fill: "#363B3F"
|
|
9743
|
+
}))), /*#__PURE__*/React.createElement("symbol", {
|
|
9744
|
+
id: "freeze-flv",
|
|
9745
|
+
viewBox: "0 0 24 24"
|
|
9746
|
+
}, /*#__PURE__*/React.createElement("svg", {
|
|
9747
|
+
width: "18",
|
|
9748
|
+
height: "16",
|
|
9749
|
+
viewBox: "0 0 18 16",
|
|
9750
|
+
fill: "none",
|
|
9751
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
9752
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
9753
|
+
"fill-rule": "evenodd",
|
|
9754
|
+
"clip-rule": "evenodd",
|
|
9755
|
+
d: "M13.4208 1.58557C13.6061 1.21509 13.4559 0.764586 13.0854 0.579344C12.7149 0.394102 12.2644 0.54427 12.0792 0.914754L11.4375 2.19811L11.1708 1.66475C10.9856 1.29427 10.5351 1.1441 10.1646 1.32934C9.79411 1.51459 9.64394 1.96509 9.82918 2.33557L10.599 3.87516L10.0365 5.00016H7.96353L7.40103 3.87516L8.17083 2.33557C8.35607 1.96509 8.2059 1.51459 7.83541 1.32934C7.46493 1.1441 7.01443 1.29427 6.82918 1.66475L6.5625 2.19811L5.92082 0.914754C5.73558 0.54427 5.28508 0.394102 4.91459 0.579344C4.54411 0.764586 4.39394 1.21509 4.57918 1.58557L5.22086 2.86893L4.63417 2.76226C4.22664 2.68817 3.8362 2.95847 3.7621 3.366C3.688 3.77353 3.95831 4.16397 4.36584 4.23807L6.05939 4.54598L6.66148 5.75016L5.91147 7.25016H4.49999L3.6 6.05018C3.35147 5.71881 2.88137 5.65165 2.55 5.90018C2.21863 6.14871 2.15147 6.61881 2.4 6.95018L2.62499 7.25016H1.5C1.08579 7.25016 0.75 7.58595 0.75 8.00016C0.75 8.41438 1.08579 8.75016 1.5 8.75016H2.62501L2.4 9.05018C2.15147 9.38155 2.21863 9.85165 2.55 10.1002C2.88137 10.3487 3.35147 10.2816 3.6 9.95018L4.50001 8.75016H5.91148L6.66148 10.2502L6.05938 11.4544L4.36584 11.7623C3.95831 11.8364 3.688 12.2268 3.7621 12.6344C3.8362 13.0419 4.22664 13.3122 4.63417 13.2381L5.22085 13.1314L4.57918 14.4148C4.39394 14.7852 4.54411 15.2357 4.91459 15.421C5.28508 15.6062 5.73558 15.4561 5.92082 15.0856L6.5625 13.8022L6.82918 14.3356C7.01443 14.7061 7.46493 14.8562 7.83541 14.671C8.2059 14.4858 8.35607 14.0353 8.17083 13.6648L7.40102 12.1252L7.96352 11.0002H10.0365L10.599 12.1252L9.82918 13.6648C9.64394 14.0353 9.79411 14.4858 10.1646 14.671C10.5351 14.8562 10.9856 14.7061 11.1708 14.3356L11.4375 13.8022L12.0792 15.0856C12.2644 15.4561 12.7149 15.6062 13.0854 15.421C13.4559 15.2358 13.6061 14.7853 13.4208 14.4148L12.7791 13.1314L13.3658 13.2381C13.7734 13.3122 14.1638 13.0419 14.2379 12.6344C14.312 12.2268 14.0417 11.8364 13.6342 11.7623L11.9406 11.4544L11.3385 10.2502L12.0885 8.75018H13.5L14.4 9.95018C14.6485 10.2816 15.1186 10.3487 15.45 10.1002C15.7814 9.85165 15.8485 9.38155 15.6 9.05018L15.375 8.75018H16.5C16.9142 8.75018 17.25 8.4144 17.25 8.00018C17.25 7.58597 16.9142 7.25018 16.5 7.25018H15.375L15.6 6.95018C15.8485 6.61881 15.7814 6.14871 15.45 5.90018C15.1186 5.65165 14.6485 5.71881 14.4 6.05018L13.5 7.25018H12.0885L11.3385 5.75016L11.9406 4.54599L13.6342 4.23807C14.0417 4.16397 14.312 3.77353 14.2379 3.366C14.1638 2.95847 13.7734 2.68817 13.3658 2.76226L12.7791 2.86893L13.4208 1.58557ZM7.96353 6.50016L7.21353 8.00016L7.96354 9.50018H10.0365L10.7865 8.00018L10.0365 6.50016H7.96353Z",
|
|
9756
|
+
fill: "#363B3F"
|
|
9713
9757
|
}))), /*#__PURE__*/React.createElement("symbol", {
|
|
9714
9758
|
viewBox: "0 0 1024 1024",
|
|
9715
9759
|
id: "tab"
|
|
@@ -9724,6 +9768,32 @@ var SVGDefines = function SVGDefines(_ref) {
|
|
|
9724
9768
|
d: "M844.8 896c25.6 0 51.2-19.2 51.2-51.2v-185.6h-51.2c-44.8 0-83.2-38.4-83.2-83.2s38.4-83.2 83.2-83.2h51.2V313.6c0-25.6-19.2-51.2-51.2-51.2h-134.4c0-70.4-57.6-128-128-128S448 185.6 448 256H313.6c-25.6 0-51.2 19.2-51.2 51.2V448C185.6 448 128 505.6 128 576s57.6 128 128 128v134.4c0 25.6 19.2 51.2 51.2 51.2h185.6v-51.2c0-44.8 38.4-83.2 83.2-83.2 44.8 0 83.2 38.4 83.2 83.2v57.6h185.6zM576 710.4c-70.4 0-128 57.6-128 128H307.2v-185.6H256c-44.8 0-83.2-38.4-83.2-83.2S211.2 492.8 256 492.8h51.2V307.2h185.6V256c0-44.8 38.4-83.2 83.2-83.2 44.8 0 83.2 38.4 83.2 83.2v51.2h185.6V448c-70.4 0-128 57.6-128 128s57.6 128 128 128v140.8H704c6.4-70.4-51.2-134.4-128-134.4z",
|
|
9725
9769
|
fill: "",
|
|
9726
9770
|
"p-id": "36983"
|
|
9771
|
+
})), /*#__PURE__*/React.createElement("symbol", {
|
|
9772
|
+
id: "sort-flv",
|
|
9773
|
+
width: "18",
|
|
9774
|
+
height: "18",
|
|
9775
|
+
viewBox: "0 0 18 18",
|
|
9776
|
+
fill: "none"
|
|
9777
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
9778
|
+
"fill-rule": "evenodd",
|
|
9779
|
+
"clip-rule": "evenodd",
|
|
9780
|
+
d: "M1.71967 11.4697C2.01256 11.1768 2.48744 11.1768 2.78033 11.4697L5.25 13.9393L7.71967 11.4697C8.01256 11.1768 8.48744 11.1768 8.78033 11.4697C9.07322 11.7626 9.07322 12.2374 8.78033 12.5303L5.78033 15.5303C5.48744 15.8232 5.01256 15.8232 4.71967 15.5303L1.71967 12.5303C1.42678 12.2374 1.42678 11.7626 1.71967 11.4697Z",
|
|
9781
|
+
fill: "#363B3F"
|
|
9782
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
9783
|
+
"fill-rule": "evenodd",
|
|
9784
|
+
"clip-rule": "evenodd",
|
|
9785
|
+
d: "M5.25 2.25C5.66421 2.25 6 2.58579 6 3V15C6 15.4142 5.66421 15.75 5.25 15.75C4.83579 15.75 4.5 15.4142 4.5 15V3C4.5 2.58579 4.83579 2.25 5.25 2.25Z",
|
|
9786
|
+
fill: "#363B3F"
|
|
9787
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
9788
|
+
"fill-rule": "evenodd",
|
|
9789
|
+
"clip-rule": "evenodd",
|
|
9790
|
+
d: "M12.2197 2.46967C12.5126 2.17678 12.9874 2.17678 13.2803 2.46967L16.2803 5.46967C16.5732 5.76256 16.5732 6.23744 16.2803 6.53033C15.9874 6.82322 15.5126 6.82322 15.2197 6.53033L12.75 4.06066L10.2803 6.53033C9.98744 6.82322 9.51256 6.82322 9.21967 6.53033C8.92678 6.23744 8.92678 5.76256 9.21967 5.46967L12.2197 2.46967Z",
|
|
9791
|
+
fill: "#363B3F"
|
|
9792
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
9793
|
+
"fill-rule": "evenodd",
|
|
9794
|
+
"clip-rule": "evenodd",
|
|
9795
|
+
d: "M12.75 2.25C13.1642 2.25 13.5 2.58579 13.5 3V15C13.5 15.4142 13.1642 15.75 12.75 15.75C12.3358 15.75 12 15.4142 12 15V3C12 2.58579 12.3358 2.25 12.75 2.25Z",
|
|
9796
|
+
fill: "#363B3F"
|
|
9727
9797
|
}))));
|
|
9728
9798
|
};
|
|
9729
9799
|
|
|
@@ -10018,7 +10088,7 @@ var MoreItemsContaier = function MoreItemsContaier(_ref) {
|
|
|
10018
10088
|
}, children);
|
|
10019
10089
|
};
|
|
10020
10090
|
|
|
10021
|
-
function generateAPIs(context, setContext, handleUndo, handleRedo, settings, cellInput, scrollbarX, scrollbarY) {
|
|
10091
|
+
function generateAPIs(context, setContext, handleUndo, handleRedo, settings, cellInput, scrollbarX, scrollbarY, globalCache) {
|
|
10022
10092
|
return {
|
|
10023
10093
|
applyOp: function applyOp(ops) {
|
|
10024
10094
|
setContext(function (ctx_) {
|
|
@@ -10319,6 +10389,50 @@ function generateAPIs(context, setContext, handleUndo, handleRedo, settings, cel
|
|
|
10319
10389
|
},
|
|
10320
10390
|
celldataToData: function celldataToData(celldata, rowCount, colCount) {
|
|
10321
10391
|
return api.celldataToData(celldata, rowCount, colCount);
|
|
10392
|
+
},
|
|
10393
|
+
insertFunction: function insertFunction(selectedFuncIndex, filteredFunctionList, callback) {
|
|
10394
|
+
var _context$luckysheet_s2;
|
|
10395
|
+
var last = (_context$luckysheet_s2 = context.luckysheet_select_save) === null || _context$luckysheet_s2 === void 0 ? void 0 : _context$luckysheet_s2[context.luckysheet_select_save.length - 1];
|
|
10396
|
+
var row_index = last === null || last === void 0 ? void 0 : last.row_focus;
|
|
10397
|
+
var col_index = last === null || last === void 0 ? void 0 : last.column_focus;
|
|
10398
|
+
if (!last) {
|
|
10399
|
+
row_index = 0;
|
|
10400
|
+
col_index = 0;
|
|
10401
|
+
} else {
|
|
10402
|
+
if (row_index == null) {
|
|
10403
|
+
var _last$row2 = _slicedToArray(last.row, 1);
|
|
10404
|
+
row_index = _last$row2[0];
|
|
10405
|
+
}
|
|
10406
|
+
if (col_index == null) {
|
|
10407
|
+
var _last$column2 = _slicedToArray(last.column, 1);
|
|
10408
|
+
col_index = _last$column2[0];
|
|
10409
|
+
}
|
|
10410
|
+
}
|
|
10411
|
+
var formulaTxt = "<span dir=\"auto\" class=\"luckysheet-formula-text-color\">=</span><span dir=\"auto\" class=\"luckysheet-formula-text-color\">".concat(filteredFunctionList[selectedFuncIndex].n.toUpperCase(), "</span><span dir=\"auto\" class=\"luckysheet-formula-text-color\">(</span>");
|
|
10412
|
+
var _locale2 = locale(context),
|
|
10413
|
+
functionlist = _locale2.functionlist;
|
|
10414
|
+
setContext(function (ctx) {
|
|
10415
|
+
if (cellInput != null && globalCache != null) {
|
|
10416
|
+
ctx.luckysheetCellUpdate = [row_index, col_index];
|
|
10417
|
+
globalCache.doNotUpdateCell = true;
|
|
10418
|
+
cellInput.innerHTML = formulaTxt;
|
|
10419
|
+
var spans = cellInput.childNodes;
|
|
10420
|
+
if (!_.isEmpty(spans)) {
|
|
10421
|
+
setCaretPosition(ctx, spans[spans.length - 1], 0, 1);
|
|
10422
|
+
}
|
|
10423
|
+
ctx.functionHint = filteredFunctionList[selectedFuncIndex].n.toUpperCase();
|
|
10424
|
+
ctx.functionCandidates = [];
|
|
10425
|
+
if (_.isEmpty(ctx.formulaCache.functionlistMap)) {
|
|
10426
|
+
for (var i = 0; i < functionlist.length; i += 1) {
|
|
10427
|
+
ctx.formulaCache.functionlistMap[functionlist[i].n] = functionlist[i];
|
|
10428
|
+
}
|
|
10429
|
+
}
|
|
10430
|
+
callback === null || callback === void 0 ? void 0 : callback();
|
|
10431
|
+
}
|
|
10432
|
+
});
|
|
10433
|
+
},
|
|
10434
|
+
getLocaleContext: function getLocaleContext() {
|
|
10435
|
+
return locale(context);
|
|
10322
10436
|
}
|
|
10323
10437
|
};
|
|
10324
10438
|
}
|
|
@@ -11526,8 +11640,8 @@ var Workbook = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
11526
11640
|
};
|
|
11527
11641
|
}, [onPaste]);
|
|
11528
11642
|
useImperativeHandle(ref, function () {
|
|
11529
|
-
return generateAPIs(context, setContextWithProduce, handleUndo, handleRedo, mergedSettings, cellInput.current, scrollbarX.current, scrollbarY.current);
|
|
11530
|
-
}, [context, setContextWithProduce, handleUndo, handleRedo, mergedSettings]);
|
|
11643
|
+
return generateAPIs(context, setContextWithProduce, handleUndo, handleRedo, mergedSettings, cellInput.current, scrollbarX.current, scrollbarY.current, globalCache.current);
|
|
11644
|
+
}, [context, setContextWithProduce, handleUndo, handleRedo, mergedSettings, globalCache]);
|
|
11531
11645
|
var i = getSheetIndex(context, context.currentSheetId);
|
|
11532
11646
|
if (i == null) {
|
|
11533
11647
|
return null;
|