@fileverse-dev/fortune-react 1.0.2-mod-32 → 1.0.2-mod-28-patch-1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Workbook/api.d.ts +1 -1
- package/dist/components/Workbook/index.d.ts +1 -1
- package/dist/index.css +114 -198
- package/dist/index.esm.css +114 -198
- package/dist/index.esm.js +421 -316
- package/dist/index.js +420 -315
- package/dist/index.umd.css +114 -198
- package/dist/index.umd.js +422 -317
- package/dist/index.umd.min.css +1 -1
- package/dist/index.umd.min.js +7 -7
- package/package.json +2 -2
package/dist/index.esm.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defaultContext, defaultSettings, getSheetIndex, colLocationByIndex, fixPositionOnFrozenCells, colLocation, getFlowdata, isAllowEdit, handleColumnHeaderMouseDown, handleColSizeHandleMouseDown, handleColFreezeHandleMouseDown, handleContextMenu, selectTitlesMap, selectTitlesRange, fixColumnStyleOverflowInFreeze, rowLocationByIndex, rowLocation, handleRowHeaderMouseDown, handleRowSizeHandleMouseDown, handleRowFreezeHandleMouseDown, fixRowStyleOverflowInFreeze, locale, getStyleByCell, getCellValue, createRangeHightlight, isInlineStringCell, getInlineStringHTML, valueShowEs, escapeHTMLTag, escapeScriptTag, moveToEnd, isShowHidenCR, getrangeseleciton, cancelNormalSelected, moveHighlightCell, israngeseleciton, handleFormulaInput, onSearchDialogMoveStart, replaceAll, replace, searchAll, searchNext, normalizeSelection, scrollToHighlightCell, isLinkValid, goToLink, replaceHtml, removeHyperlink, saveHyperlink, createFilterOptions, onImageMoveStart, onImageResizeStart, showComments, setEditingComment, onCommentBoxMoveStart, confirmMessage, getRangeByTxt, getDropdownList, setCellValue,
|
|
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';
|
|
@@ -801,49 +801,43 @@ var FormulaSearch = function FormulaSearch(props) {
|
|
|
801
801
|
justifyContent: "space-between"
|
|
802
802
|
}
|
|
803
803
|
}, /*#__PURE__*/React.createElement("div", {
|
|
804
|
-
className: "luckysheet-formula-search-func"
|
|
804
|
+
className: "luckysheet-formula-search-func text-body-sm"
|
|
805
805
|
}, v.n), /*#__PURE__*/React.createElement("div", {
|
|
806
806
|
style: {
|
|
807
807
|
display: "flex",
|
|
808
|
+
justifyContent: "end",
|
|
809
|
+
width: "68px",
|
|
810
|
+
height: "20px",
|
|
811
|
+
alignItems: "center",
|
|
808
812
|
gap: "4px"
|
|
809
813
|
}
|
|
810
814
|
}, v.LOGO && (/*#__PURE__*/React.createElement("img", {
|
|
811
815
|
src: v.LOGO,
|
|
812
816
|
alt: "Service Logo",
|
|
813
|
-
|
|
814
|
-
|
|
817
|
+
style: {
|
|
818
|
+
width: "20px"
|
|
819
|
+
}
|
|
815
820
|
})), v.API_KEY && (/*#__PURE__*/React.createElement("div", {
|
|
816
821
|
style: {
|
|
817
822
|
borderRadius: "4px",
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
}
|
|
823
|
+
backgroundColor: "".concat(localStorage.getItem(v.API_KEY) ? "#177E23" : "#F9A92B"),
|
|
824
|
+
width: "16px",
|
|
825
|
+
height: "16px"
|
|
826
|
+
},
|
|
827
|
+
className: "flex justify-center"
|
|
822
828
|
}, /*#__PURE__*/React.createElement(LucideIcon, {
|
|
823
829
|
name: "Key",
|
|
824
830
|
style: {
|
|
825
|
-
color: "white"
|
|
831
|
+
color: localStorage.getItem(v.API_KEY) ? "white" : "#77818A",
|
|
832
|
+
width: "12px",
|
|
833
|
+
height: "12px"
|
|
826
834
|
}
|
|
827
835
|
}))))), /*#__PURE__*/React.createElement("div", {
|
|
828
|
-
className: "luckysheet-formula-search-detail"
|
|
836
|
+
className: "luckysheet-formula-search-detail mt-1 text-helper-text-sm"
|
|
829
837
|
}, v.d));
|
|
830
838
|
}));
|
|
831
839
|
};
|
|
832
840
|
|
|
833
|
-
function lightenHexColor(hex) {
|
|
834
|
-
var amount = 100;
|
|
835
|
-
if (hex.startsWith("#")) {
|
|
836
|
-
hex = hex.slice(1);
|
|
837
|
-
}
|
|
838
|
-
var r = parseInt(hex.slice(0, 2), 16);
|
|
839
|
-
var g = parseInt(hex.slice(2, 4), 16);
|
|
840
|
-
var b = parseInt(hex.slice(4, 6), 16);
|
|
841
|
-
r = Math.min(255, r + amount);
|
|
842
|
-
g = Math.min(255, g + amount);
|
|
843
|
-
b = Math.min(255, b + amount);
|
|
844
|
-
var newHex = "#".concat((1 << 24 | r << 16 | g << 8 | b).toString(16).slice(1).toUpperCase());
|
|
845
|
-
return newHex;
|
|
846
|
-
}
|
|
847
841
|
var FormulaHint = function FormulaHint(props) {
|
|
848
842
|
var _useContext = useContext(WorkbookContext),
|
|
849
843
|
context = _useContext.context;
|
|
@@ -858,13 +852,26 @@ var FormulaHint = function FormulaHint(props) {
|
|
|
858
852
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
859
853
|
showAPInput = _useState4[0],
|
|
860
854
|
setShowAPInput = _useState4[1];
|
|
855
|
+
var _useState5 = useState(!!localStorage.getItem(fn === null || fn === void 0 ? void 0 : fn.API_KEY)),
|
|
856
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
857
|
+
isKeyAdded = _useState6[0],
|
|
858
|
+
setApiKeyAdded = _useState6[1];
|
|
859
|
+
useEffect(function () {
|
|
860
|
+
if (fn) {
|
|
861
|
+
setApiKeyAdded(!!localStorage.getItem(fn === null || fn === void 0 ? void 0 : fn.API_KEY));
|
|
862
|
+
setAPI_KEY(localStorage.getItem(fn === null || fn === void 0 ? void 0 : fn.API_KEY) || "");
|
|
863
|
+
setShowAPInput(!localStorage.getItem(fn === null || fn === void 0 ? void 0 : fn.API_KEY));
|
|
864
|
+
}
|
|
865
|
+
}, [fn]);
|
|
861
866
|
if (!fn) return null;
|
|
862
867
|
return /*#__PURE__*/React.createElement("div", _objectSpread2(_objectSpread2({}, props), {}, {
|
|
863
868
|
id: "luckysheet-formula-help-c",
|
|
864
869
|
className: "luckysheet-formula-help-c",
|
|
865
870
|
style: {
|
|
866
871
|
border: "1px solid ".concat(fn.BRAND_COLOR),
|
|
867
|
-
backgroundColor: "".concat(fn.BRAND_COLOR ?
|
|
872
|
+
backgroundColor: "".concat(fn.BRAND_COLOR ? fn.BRAND_COLOR : "#F8F9FA"),
|
|
873
|
+
width: "340px",
|
|
874
|
+
padding: "0px"
|
|
868
875
|
}
|
|
869
876
|
}), /*#__PURE__*/React.createElement("div", {
|
|
870
877
|
className: "luckysheet-formula-help-close",
|
|
@@ -879,17 +886,21 @@ var FormulaHint = function FormulaHint(props) {
|
|
|
879
886
|
className: "fa fa-angle-up",
|
|
880
887
|
"aria-hidden": "true"
|
|
881
888
|
})), /*#__PURE__*/React.createElement("div", {
|
|
882
|
-
className: "
|
|
889
|
+
className: "flex items-center justify-between",
|
|
883
890
|
style: {
|
|
884
|
-
backgroundColor: "".concat(fn.BRAND_COLOR ?
|
|
891
|
+
backgroundColor: "".concat(fn.BRAND_COLOR ? fn.BRAND_COLOR : "#F8F9FA"),
|
|
892
|
+
padding: "10px"
|
|
885
893
|
}
|
|
886
894
|
}, /*#__PURE__*/React.createElement("div", {
|
|
887
|
-
className: "luckysheet-formula-help-title-formula"
|
|
888
|
-
}, /*#__PURE__*/React.createElement("
|
|
895
|
+
className: "luckysheet-formula-help-title-formula color-text-default"
|
|
896
|
+
}, /*#__PURE__*/React.createElement("code", {
|
|
897
|
+
style: {
|
|
898
|
+
fontWeight: 500
|
|
899
|
+
},
|
|
889
900
|
className: "luckysheet-arguments-help-function-name"
|
|
890
|
-
}, fn.n), /*#__PURE__*/React.createElement("
|
|
901
|
+
}, fn.n), /*#__PURE__*/React.createElement("code", {
|
|
891
902
|
className: "luckysheet-arguments-paren"
|
|
892
|
-
}, "("), /*#__PURE__*/React.createElement("
|
|
903
|
+
}, "("), /*#__PURE__*/React.createElement("code", {
|
|
893
904
|
className: "luckysheet-arguments-parameter-holder"
|
|
894
905
|
}, fn.p.map(function (param, i) {
|
|
895
906
|
var name = param.name;
|
|
@@ -899,43 +910,51 @@ var FormulaHint = function FormulaHint(props) {
|
|
|
899
910
|
if (param.require === "o") {
|
|
900
911
|
name = "[".concat(name, "]");
|
|
901
912
|
}
|
|
902
|
-
return /*#__PURE__*/React.createElement("
|
|
913
|
+
return /*#__PURE__*/React.createElement("code", {
|
|
903
914
|
className: "luckysheet-arguments-help-parameter",
|
|
904
915
|
dir: "auto",
|
|
905
916
|
key: name
|
|
906
917
|
}, name, i !== fn.p.length - 1 && ", ");
|
|
907
|
-
})), /*#__PURE__*/React.createElement("
|
|
918
|
+
})), /*#__PURE__*/React.createElement("code", {
|
|
908
919
|
className: "luckysheet-arguments-paren"
|
|
909
920
|
}, ")")), /*#__PURE__*/React.createElement("div", {
|
|
910
921
|
style: {
|
|
911
922
|
display: "flex",
|
|
923
|
+
justifyContent: "end",
|
|
924
|
+
width: "68px",
|
|
925
|
+
height: "20px",
|
|
926
|
+
alignItems: "center",
|
|
912
927
|
gap: "4px"
|
|
913
928
|
}
|
|
914
929
|
}, fn.LOGO && (/*#__PURE__*/React.createElement("img", {
|
|
915
930
|
src: fn.LOGO,
|
|
916
931
|
alt: "Service Logo",
|
|
917
|
-
|
|
918
|
-
|
|
932
|
+
style: {
|
|
933
|
+
width: "20px"
|
|
934
|
+
}
|
|
919
935
|
})), fn.API_KEY && (/*#__PURE__*/React.createElement("div", {
|
|
920
936
|
style: {
|
|
921
937
|
borderRadius: "4px",
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
}
|
|
938
|
+
backgroundColor: "".concat(isKeyAdded ? "#177E23" : "#e8ebec"),
|
|
939
|
+
width: "16px",
|
|
940
|
+
height: "16px"
|
|
941
|
+
},
|
|
942
|
+
className: "flex justify-center"
|
|
926
943
|
}, /*#__PURE__*/React.createElement(LucideIcon, {
|
|
927
944
|
name: "Key",
|
|
928
945
|
style: {
|
|
929
|
-
color: "white"
|
|
946
|
+
color: isKeyAdded ? "white" : "#77818A",
|
|
947
|
+
width: "12px",
|
|
948
|
+
height: "12px"
|
|
930
949
|
}
|
|
931
950
|
}))))), /*#__PURE__*/React.createElement("div", {
|
|
932
951
|
className: "luckysheet-formula-help-content",
|
|
933
952
|
style: {
|
|
934
|
-
backgroundColor: "".concat(fn.BRAND_COLOR ?
|
|
953
|
+
backgroundColor: "".concat(fn.BRAND_COLOR ? fn.BRAND_COLOR : "#F8F9FA")
|
|
935
954
|
}
|
|
936
955
|
}, fn.API_KEY && (/*#__PURE__*/React.createElement("div", {
|
|
937
956
|
style: {
|
|
938
|
-
borderLeft: "4px solid ".concat(
|
|
957
|
+
borderLeft: "4px solid ".concat(isKeyAdded ? "#177E23" : "#fb923c"),
|
|
939
958
|
backgroundColor: "white",
|
|
940
959
|
padding: "16px",
|
|
941
960
|
margin: "4px 4px 0px 4px",
|
|
@@ -952,25 +971,20 @@ var FormulaHint = function FormulaHint(props) {
|
|
|
952
971
|
}
|
|
953
972
|
}, /*#__PURE__*/React.createElement("h3", {
|
|
954
973
|
style: {
|
|
955
|
-
fontSize: "14px",
|
|
956
|
-
fontWeight: "600",
|
|
957
|
-
color: "#1f2937",
|
|
958
974
|
margin: "0 0 8px 0"
|
|
959
|
-
}
|
|
960
|
-
|
|
975
|
+
},
|
|
976
|
+
className: "text-heading-xsm color-text-default"
|
|
977
|
+
}, isKeyAdded ? "API key provided" : "API key is required"), /*#__PURE__*/React.createElement(LucideIcon, {
|
|
961
978
|
name: "ChevronDown",
|
|
962
979
|
width: 24,
|
|
963
980
|
height: 24
|
|
964
981
|
})), showAPInput && (/*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("p", {
|
|
965
982
|
style: {
|
|
966
|
-
color: "#6b7280",
|
|
967
983
|
margin: "0 0 16px 0"
|
|
968
|
-
}
|
|
984
|
+
},
|
|
985
|
+
className: "text-body-sm color-text-default"
|
|
969
986
|
}, "This function is require API key. Please paste it below and\n press 'Ok'."), /*#__PURE__*/React.createElement("div", {
|
|
970
|
-
|
|
971
|
-
display: "flex",
|
|
972
|
-
gap: "12px"
|
|
973
|
-
}
|
|
987
|
+
className: "w-full"
|
|
974
988
|
}, /*#__PURE__*/React.createElement(TextField, {
|
|
975
989
|
value: API_KEY,
|
|
976
990
|
id: "function-api-key",
|
|
@@ -978,12 +992,19 @@ var FormulaHint = function FormulaHint(props) {
|
|
|
978
992
|
placeholder: "API key",
|
|
979
993
|
onChange: function onChange(e) {
|
|
980
994
|
setAPI_KEY(e.target.value);
|
|
995
|
+
setApiKeyAdded(false);
|
|
981
996
|
}
|
|
982
|
-
}), /*#__PURE__*/React.createElement(
|
|
997
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
998
|
+
className: "flex justify-end mt-2"
|
|
999
|
+
}, /*#__PURE__*/React.createElement(Button$1, {
|
|
983
1000
|
onClick: function onClick() {
|
|
984
1001
|
localStorage.setItem(fn.API_KEY, API_KEY);
|
|
985
|
-
|
|
986
|
-
|
|
1002
|
+
setApiKeyAdded(true);
|
|
1003
|
+
setShowAPInput(false);
|
|
1004
|
+
},
|
|
1005
|
+
disabled: !API_KEY,
|
|
1006
|
+
className: "min-w-[80px]"
|
|
1007
|
+
}, "Ok"))))))), /*#__PURE__*/React.createElement("div", {
|
|
987
1008
|
style: {
|
|
988
1009
|
backgroundColor: "white",
|
|
989
1010
|
padding: "6px",
|
|
@@ -991,13 +1012,20 @@ var FormulaHint = function FormulaHint(props) {
|
|
|
991
1012
|
borderRadius: "4px"
|
|
992
1013
|
}
|
|
993
1014
|
}, /*#__PURE__*/React.createElement("div", {
|
|
994
|
-
className: "
|
|
1015
|
+
className: ""
|
|
995
1016
|
}, /*#__PURE__*/React.createElement("div", {
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
1017
|
+
style: {
|
|
1018
|
+
lineHeight: "16px",
|
|
1019
|
+
fontSize: "12px"
|
|
1020
|
+
},
|
|
1021
|
+
className: "text-body-sm-bold mb-1 color-text-secondary"
|
|
1022
|
+
}, formulaMore.helpExample), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("code", {
|
|
1023
|
+
style: {
|
|
1024
|
+
overflowWrap: "break-word"
|
|
1025
|
+
},
|
|
1026
|
+
className: "example-value-code"
|
|
999
1027
|
}, /*#__PURE__*/React.createElement("span", {
|
|
1000
|
-
className: "luckysheet-arguments-help-function-name
|
|
1028
|
+
className: "luckysheet-arguments-help-function-name"
|
|
1001
1029
|
}, fn.n), /*#__PURE__*/React.createElement("span", {
|
|
1002
1030
|
className: "luckysheet-arguments-paren"
|
|
1003
1031
|
}, "("), /*#__PURE__*/React.createElement("span", {
|
|
@@ -1010,26 +1038,32 @@ var FormulaHint = function FormulaHint(props) {
|
|
|
1010
1038
|
}, param.example, i !== fn.p.length - 1 && ", ");
|
|
1011
1039
|
})), /*#__PURE__*/React.createElement("span", {
|
|
1012
1040
|
className: "luckysheet-arguments-paren"
|
|
1013
|
-
}, ")"))), /*#__PURE__*/React.createElement("div", {
|
|
1041
|
+
}, ")")))), /*#__PURE__*/React.createElement("div", {
|
|
1014
1042
|
className: "luckysheet-formula-help-content-detail",
|
|
1015
1043
|
style: {
|
|
1016
|
-
paddingBottom: "
|
|
1044
|
+
paddingBottom: "8px"
|
|
1017
1045
|
}
|
|
1018
1046
|
}, /*#__PURE__*/React.createElement("div", {
|
|
1019
|
-
className: "
|
|
1047
|
+
className: ""
|
|
1020
1048
|
}, /*#__PURE__*/React.createElement("div", {
|
|
1021
|
-
|
|
1049
|
+
style: {
|
|
1050
|
+
lineHeight: "16px",
|
|
1051
|
+
fontSize: "12px",
|
|
1052
|
+
padding: "0px"
|
|
1053
|
+
},
|
|
1054
|
+
className: "text-body-sm-bold mb-1 mt-2 color-text-secondary"
|
|
1022
1055
|
}, "About"), /*#__PURE__*/React.createElement("span", {
|
|
1023
|
-
className: "luckysheet-arguments-help-parameter-content
|
|
1056
|
+
className: "luckysheet-arguments-help-parameter-content text-helper-text-sm"
|
|
1024
1057
|
}, fn.d))), /*#__PURE__*/React.createElement("div", {
|
|
1058
|
+
style: {
|
|
1059
|
+
paddingTop: "6px"
|
|
1060
|
+
},
|
|
1025
1061
|
className: "luckysheet-formula-help-content-param"
|
|
1026
1062
|
}, fn.p.map(function (param) {
|
|
1027
1063
|
return /*#__PURE__*/React.createElement("div", {
|
|
1028
|
-
className: "
|
|
1064
|
+
className: "",
|
|
1029
1065
|
key: param.name
|
|
1030
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
1031
|
-
className: "luckysheet-arguments-help-section-title example-title"
|
|
1032
|
-
}, param.name, param.repeat === "y" && (/*#__PURE__*/React.createElement("span", {
|
|
1066
|
+
}, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("code", null, param.name, param.repeat === "y" && (/*#__PURE__*/React.createElement("span", {
|
|
1033
1067
|
className: "luckysheet-arguments-help-argument-info example-value",
|
|
1034
1068
|
style: {
|
|
1035
1069
|
marginTop: "2px"
|
|
@@ -1039,15 +1073,21 @@ var FormulaHint = function FormulaHint(props) {
|
|
|
1039
1073
|
style: {
|
|
1040
1074
|
marginTop: "2px"
|
|
1041
1075
|
}
|
|
1042
|
-
}, "-[", formulaMore.allowOptionText, "]"))), /*#__PURE__*/React.createElement("span", {
|
|
1043
|
-
className: "luckysheet-arguments-help-parameter-content
|
|
1076
|
+
}, "-[", formulaMore.allowOptionText, "]")))), /*#__PURE__*/React.createElement("span", {
|
|
1077
|
+
className: "luckysheet-arguments-help-parameter-content text-helper-text-sm",
|
|
1044
1078
|
style: {
|
|
1045
1079
|
marginTop: "2px"
|
|
1046
1080
|
}
|
|
1047
1081
|
}, param.detail));
|
|
1048
1082
|
})))), /*#__PURE__*/React.createElement("div", {
|
|
1049
|
-
|
|
1050
|
-
|
|
1083
|
+
style: {
|
|
1084
|
+
backgroundColor: "".concat(fn.BRAND_COLOR ? fn.BRAND_COLOR : "#F8F9FA"),
|
|
1085
|
+
padding: "8px"
|
|
1086
|
+
},
|
|
1087
|
+
className: "w-full"
|
|
1088
|
+
}, /*#__PURE__*/React.createElement("p", {
|
|
1089
|
+
className: "color-text-link text-helper-text-sm"
|
|
1090
|
+
}, "Learn More")));
|
|
1051
1091
|
};
|
|
1052
1092
|
|
|
1053
1093
|
function usePrevious(value) {
|
|
@@ -1792,7 +1832,8 @@ var LinkEditCard = function LinkEditCard(_ref) {
|
|
|
1792
1832
|
originType = _ref.originType,
|
|
1793
1833
|
originAddress = _ref.originAddress,
|
|
1794
1834
|
isEditing = _ref.isEditing,
|
|
1795
|
-
position = _ref.position
|
|
1835
|
+
position = _ref.position,
|
|
1836
|
+
selectingCellRange = _ref.selectingCellRange;
|
|
1796
1837
|
var _useContext = useContext(WorkbookContext),
|
|
1797
1838
|
context = _useContext.context,
|
|
1798
1839
|
setContext = _useContext.setContext,
|
|
@@ -1811,24 +1852,29 @@ var LinkEditCard = function LinkEditCard(_ref) {
|
|
|
1811
1852
|
setLinkType = _useState6[1];
|
|
1812
1853
|
var _locale = locale(context),
|
|
1813
1854
|
insertLink = _locale.insertLink,
|
|
1814
|
-
linkTypeList = _locale.linkTypeList
|
|
1855
|
+
linkTypeList = _locale.linkTypeList,
|
|
1856
|
+
button = _locale.button;
|
|
1857
|
+
var lastCell = useRef(normalizeSelection(context, [{
|
|
1858
|
+
row: [r, r],
|
|
1859
|
+
column: [c, c]
|
|
1860
|
+
}]));
|
|
1861
|
+
var skipCellRangeSet = useRef(true);
|
|
1815
1862
|
var isLinkAddressValid = isLinkValid(context, linkType, linkAddress);
|
|
1816
|
-
var
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
return !linkAddress.trim() || !isLinkAddressValid.isValid;
|
|
1820
|
-
}
|
|
1821
|
-
if (linkType === "sheet") {
|
|
1822
|
-
return !linkAddress.trim();
|
|
1823
|
-
}
|
|
1824
|
-
return false;
|
|
1825
|
-
}, [linkText, linkAddress, linkType, isLinkAddressValid.isValid]);
|
|
1863
|
+
var tooltip = /*#__PURE__*/React.createElement("div", {
|
|
1864
|
+
className: "validation-input-tip"
|
|
1865
|
+
}, isLinkAddressValid.tooltip);
|
|
1826
1866
|
var hideLinkCard = useCallback(function () {
|
|
1827
1867
|
_.set(refs.globalCache, "linkCard.mouseEnter", false);
|
|
1828
1868
|
setContext(function (draftCtx) {
|
|
1829
1869
|
draftCtx.linkCard = undefined;
|
|
1830
1870
|
});
|
|
1831
1871
|
}, [refs.globalCache, setContext]);
|
|
1872
|
+
var setRangeModalVisible = useCallback(function (visible) {
|
|
1873
|
+
return setContext(function (draftCtx) {
|
|
1874
|
+
draftCtx.luckysheet_select_save = lastCell.current;
|
|
1875
|
+
if (draftCtx.linkCard != null) draftCtx.linkCard.selectingCellRange = visible;
|
|
1876
|
+
});
|
|
1877
|
+
}, [setContext]);
|
|
1832
1878
|
var containerEvent = useMemo(function () {
|
|
1833
1879
|
return {
|
|
1834
1880
|
onMouseEnter: function onMouseEnter() {
|
|
@@ -1854,6 +1900,19 @@ var LinkEditCard = function LinkEditCard(_ref) {
|
|
|
1854
1900
|
}
|
|
1855
1901
|
};
|
|
1856
1902
|
}, [refs.globalCache]);
|
|
1903
|
+
var renderBottomButton = useCallback(function (onOk, onCancel) {
|
|
1904
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
1905
|
+
className: "button-group"
|
|
1906
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
1907
|
+
className: "button-basic button-default",
|
|
1908
|
+
onClick: onCancel,
|
|
1909
|
+
tabIndex: 0
|
|
1910
|
+
}, button.cancel), /*#__PURE__*/React.createElement("div", {
|
|
1911
|
+
className: "button-basic button-primary",
|
|
1912
|
+
onClick: onOk,
|
|
1913
|
+
tabIndex: 0
|
|
1914
|
+
}, button.confirm));
|
|
1915
|
+
}, [button]);
|
|
1857
1916
|
var renderToolbarButton = useCallback(function (iconId, onClick) {
|
|
1858
1917
|
return /*#__PURE__*/React.createElement("div", {
|
|
1859
1918
|
className: "fortune-toolbar-button",
|
|
@@ -1872,6 +1931,23 @@ var LinkEditCard = function LinkEditCard(_ref) {
|
|
|
1872
1931
|
setLinkText(originText);
|
|
1873
1932
|
setLinkType(originType);
|
|
1874
1933
|
}, [rc, originAddress, originText, originType]);
|
|
1934
|
+
useLayoutEffect(function () {
|
|
1935
|
+
if (selectingCellRange) {
|
|
1936
|
+
skipCellRangeSet.current = true;
|
|
1937
|
+
}
|
|
1938
|
+
}, [selectingCellRange]);
|
|
1939
|
+
useLayoutEffect(function () {
|
|
1940
|
+
if (skipCellRangeSet.current) {
|
|
1941
|
+
skipCellRangeSet.current = false;
|
|
1942
|
+
return;
|
|
1943
|
+
}
|
|
1944
|
+
if (selectingCellRange) {
|
|
1945
|
+
var len = _.size(context.luckysheet_select_save);
|
|
1946
|
+
if (len > 0) {
|
|
1947
|
+
setLinkAddress(getRangetxt(context, context.currentSheetId, context.luckysheet_select_save[len - 1], ""));
|
|
1948
|
+
}
|
|
1949
|
+
}
|
|
1950
|
+
}, [context, selectingCellRange]);
|
|
1875
1951
|
if (!isEditing) {
|
|
1876
1952
|
return /*#__PURE__*/React.createElement("div", _objectSpread2(_objectSpread2({}, containerEvent), {}, {
|
|
1877
1953
|
onKeyDown: function onKeyDown(e) {
|
|
@@ -1912,16 +1988,69 @@ var LinkEditCard = function LinkEditCard(_ref) {
|
|
|
1912
1988
|
});
|
|
1913
1989
|
}));
|
|
1914
1990
|
}
|
|
1915
|
-
return /*#__PURE__*/React.createElement("div", _objectSpread2({
|
|
1916
|
-
className: "fortune-link-
|
|
1991
|
+
return selectingCellRange ? (/*#__PURE__*/React.createElement("div", _objectSpread2(_objectSpread2({
|
|
1992
|
+
className: "fortune-link-modify-modal range-selection-modal",
|
|
1993
|
+
style: {
|
|
1994
|
+
left: position.cellLeft,
|
|
1995
|
+
top: position.cellBottom + 5
|
|
1996
|
+
}
|
|
1997
|
+
}, _.omit(containerEvent, ["onMouseDown", "onMouseMove", "onMouseUp"])), {}, {
|
|
1998
|
+
onMouseDown: function onMouseDown(e) {
|
|
1999
|
+
var nativeEvent = e.nativeEvent;
|
|
2000
|
+
onRangeSelectionModalMoveStart(context, refs.globalCache, nativeEvent);
|
|
2001
|
+
e.stopPropagation();
|
|
2002
|
+
}
|
|
2003
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
2004
|
+
className: "modal-icon-close",
|
|
2005
|
+
onClick: function onClick() {
|
|
2006
|
+
return setRangeModalVisible(false);
|
|
2007
|
+
},
|
|
2008
|
+
tabIndex: 0
|
|
2009
|
+
}, /*#__PURE__*/React.createElement(SVGIcon, {
|
|
2010
|
+
name: "close"
|
|
2011
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
2012
|
+
className: "modal-title"
|
|
2013
|
+
}, insertLink.selectCellRange), /*#__PURE__*/React.createElement("input", _objectSpread2(_objectSpread2({}, containerEvent), {}, {
|
|
2014
|
+
className: "range-selection-input ".concat(!linkAddress || isLinkAddressValid.isValid ? "" : "error-input"),
|
|
2015
|
+
placeholder: insertLink.cellRangePlaceholder,
|
|
2016
|
+
onChange: function onChange(e) {
|
|
2017
|
+
return setLinkAddress(e.target.value);
|
|
2018
|
+
},
|
|
2019
|
+
value: linkAddress
|
|
2020
|
+
})), tooltip, /*#__PURE__*/React.createElement("div", {
|
|
2021
|
+
className: "modal-footer"
|
|
2022
|
+
}, renderBottomButton(function () {
|
|
2023
|
+
if (isLinkAddressValid.isValid) setRangeModalVisible(false);
|
|
2024
|
+
}, function () {
|
|
2025
|
+
setLinkAddress(originAddress);
|
|
2026
|
+
setRangeModalVisible(false);
|
|
2027
|
+
})))) : (/*#__PURE__*/React.createElement("div", _objectSpread2({
|
|
2028
|
+
className: "fortune-link-modify-modal",
|
|
1917
2029
|
style: {
|
|
1918
2030
|
left: position.cellLeft + 20,
|
|
1919
2031
|
top: position.cellBottom
|
|
1920
2032
|
}
|
|
1921
|
-
}, containerEvent), /*#__PURE__*/React.createElement(
|
|
2033
|
+
}, containerEvent), /*#__PURE__*/React.createElement("div", {
|
|
2034
|
+
className: "fortune-link-modify-line"
|
|
2035
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
2036
|
+
className: "fortune-link-modify-title"
|
|
2037
|
+
}, insertLink.linkText), /*#__PURE__*/React.createElement("input", {
|
|
2038
|
+
className: "fortune-link-modify-input",
|
|
2039
|
+
spellCheck: "false",
|
|
2040
|
+
autoFocus: true,
|
|
2041
|
+
value: linkText,
|
|
2042
|
+
onChange: function onChange(e) {
|
|
2043
|
+
return setLinkText(e.target.value);
|
|
2044
|
+
}
|
|
2045
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
2046
|
+
className: "fortune-link-modify-line"
|
|
2047
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
2048
|
+
className: "fortune-link-modify-title"
|
|
2049
|
+
}, insertLink.linkType), /*#__PURE__*/React.createElement("select", {
|
|
2050
|
+
className: "fortune-link-modify-select",
|
|
1922
2051
|
value: linkType,
|
|
1923
|
-
|
|
1924
|
-
if (value === "sheet") {
|
|
2052
|
+
onChange: function onChange(e) {
|
|
2053
|
+
if (e.target.value === "sheet") {
|
|
1925
2054
|
if (!linkText) {
|
|
1926
2055
|
setLinkText(context.luckysheetfile[0].name);
|
|
1927
2056
|
}
|
|
@@ -1929,79 +2058,65 @@ var LinkEditCard = function LinkEditCard(_ref) {
|
|
|
1929
2058
|
} else {
|
|
1930
2059
|
setLinkAddress("");
|
|
1931
2060
|
}
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
className: "fortune-link-type-dropdown"
|
|
1938
|
-
}, linkTypeList.filter(function (type) {
|
|
1939
|
-
return type.value !== "cellrange";
|
|
1940
|
-
}).map(function (type) {
|
|
1941
|
-
return /*#__PURE__*/React.createElement(SelectItem$1, {
|
|
2061
|
+
if (e.target.value === "cellrange") setRangeModalVisible(true);
|
|
2062
|
+
setLinkType(e.target.value);
|
|
2063
|
+
}
|
|
2064
|
+
}, linkTypeList.map(function (type) {
|
|
2065
|
+
return /*#__PURE__*/React.createElement("option", {
|
|
1942
2066
|
key: type.value,
|
|
1943
2067
|
value: type.value
|
|
1944
2068
|
}, type.text);
|
|
1945
2069
|
}))), /*#__PURE__*/React.createElement("div", {
|
|
1946
|
-
className: "fortune-
|
|
1947
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
1948
|
-
className: "
|
|
1949
|
-
}, /*#__PURE__*/React.createElement(
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
value: linkText,
|
|
2070
|
+
className: "fortune-link-modify-line"
|
|
2071
|
+
}, linkType === "webpage" && (/*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
2072
|
+
className: "fortune-link-modify-title"
|
|
2073
|
+
}, insertLink.linkAddress), /*#__PURE__*/React.createElement("input", {
|
|
2074
|
+
className: "fortune-link-modify-input ".concat(!linkAddress || isLinkAddressValid.isValid ? "" : "error-input"),
|
|
2075
|
+
spellCheck: "false",
|
|
2076
|
+
value: linkAddress,
|
|
1954
2077
|
onChange: function onChange(e) {
|
|
1955
|
-
return
|
|
1956
|
-
}
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
}, /*#__PURE__*/React.createElement(SVGIcon, {
|
|
1963
|
-
name: "link"
|
|
1964
|
-
})), /*#__PURE__*/React.createElement(TextField, {
|
|
1965
|
-
placeholder: "Paste URL",
|
|
2078
|
+
return setLinkAddress(e.target.value);
|
|
2079
|
+
}
|
|
2080
|
+
}), tooltip)), linkType === "cellrange" && (/*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
2081
|
+
className: "fortune-link-modify-title"
|
|
2082
|
+
}, insertLink.linkCell), /*#__PURE__*/React.createElement("input", {
|
|
2083
|
+
className: "fortune-link-modify-input ".concat(!linkAddress || isLinkAddressValid.isValid ? "" : "error-input"),
|
|
2084
|
+
spellCheck: "false",
|
|
1966
2085
|
value: linkAddress,
|
|
1967
2086
|
onChange: function onChange(e) {
|
|
1968
2087
|
return setLinkAddress(e.target.value);
|
|
2088
|
+
}
|
|
2089
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
2090
|
+
className: "fortune-link-modify-cell-selector",
|
|
2091
|
+
onClick: function onClick() {
|
|
2092
|
+
return setRangeModalVisible(true);
|
|
1969
2093
|
},
|
|
1970
|
-
|
|
1971
|
-
}))), linkType === "sheet" && (/*#__PURE__*/React.createElement("div", {
|
|
1972
|
-
className: "fortune-input-with-icon"
|
|
1973
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
1974
|
-
className: "input-icon"
|
|
2094
|
+
tabIndex: 0
|
|
1975
2095
|
}, /*#__PURE__*/React.createElement(SVGIcon, {
|
|
1976
|
-
name: "
|
|
1977
|
-
})), /*#__PURE__*/React.createElement(
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
|
|
2096
|
+
name: "border-all"
|
|
2097
|
+
})), tooltip)), linkType === "sheet" && (/*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
2098
|
+
className: "fortune-link-modify-title"
|
|
2099
|
+
}, insertLink.linkSheet), /*#__PURE__*/React.createElement("select", {
|
|
2100
|
+
className: "fortune-link-modify-select",
|
|
2101
|
+
onChange: function onChange(e) {
|
|
2102
|
+
if (!linkText) setLinkText(e.target.value);
|
|
2103
|
+
setLinkAddress(e.target.value);
|
|
1981
2104
|
},
|
|
1982
2105
|
value: linkAddress
|
|
1983
|
-
}, /*#__PURE__*/React.createElement(SelectTrigger, {
|
|
1984
|
-
className: "fortune-sheet-select"
|
|
1985
|
-
}, /*#__PURE__*/React.createElement(SelectValue, {
|
|
1986
|
-
placeholder: "[Sheet name]"
|
|
1987
|
-
})), /*#__PURE__*/React.createElement(SelectContent, {
|
|
1988
|
-
className: "fortune-sheet-dropdown"
|
|
1989
2106
|
}, context.luckysheetfile.map(function (sheet) {
|
|
1990
|
-
return /*#__PURE__*/React.createElement(
|
|
2107
|
+
return /*#__PURE__*/React.createElement("option", {
|
|
1991
2108
|
key: sheet.id,
|
|
1992
2109
|
value: sheet.name
|
|
1993
2110
|
}, sheet.name);
|
|
1994
|
-
}))))), /*#__PURE__*/React.createElement(
|
|
1995
|
-
className: "
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
|
|
2002
|
-
|
|
2003
|
-
}
|
|
2004
|
-
}, "Insert link"));
|
|
2111
|
+
})), tooltip))), /*#__PURE__*/React.createElement("div", {
|
|
2112
|
+
className: "modal-footer"
|
|
2113
|
+
}, renderBottomButton(function () {
|
|
2114
|
+
if (!isLinkAddressValid.isValid) return;
|
|
2115
|
+
_.set(refs.globalCache, "linkCard.mouseEnter", false);
|
|
2116
|
+
setContext(function (draftCtx) {
|
|
2117
|
+
return saveHyperlink(draftCtx, r, c, linkText, linkType, linkAddress);
|
|
2118
|
+
});
|
|
2119
|
+
}, hideLinkCard))));
|
|
2005
2120
|
};
|
|
2006
2121
|
|
|
2007
2122
|
var FilterOptions = function FilterOptions(_ref) {
|
|
@@ -2103,11 +2218,15 @@ var FilterOptions = function FilterOptions(_ref) {
|
|
|
2103
2218
|
width: undefined
|
|
2104
2219
|
}),
|
|
2105
2220
|
className: "luckysheet-filter-options ".concat(filterParam == null ? "" : "luckysheet-filter-options-active")
|
|
2106
|
-
}, /*#__PURE__*/React.createElement(
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
|
|
2221
|
+
}, filterParam == null ? (/*#__PURE__*/React.createElement("div", {
|
|
2222
|
+
className: "caret down"
|
|
2223
|
+
})) : (/*#__PURE__*/React.createElement(SVGIcon, {
|
|
2224
|
+
name: "filter-fill-white",
|
|
2225
|
+
style: {
|
|
2226
|
+
width: 15,
|
|
2227
|
+
height: 15
|
|
2228
|
+
}
|
|
2229
|
+
})));
|
|
2111
2230
|
})));
|
|
2112
2231
|
};
|
|
2113
2232
|
|
|
@@ -3205,7 +3324,6 @@ var ConditionRules = function ConditionRules(_ref) {
|
|
|
3205
3324
|
}, /*#__PURE__*/React.createElement("span", {
|
|
3206
3325
|
id: "checkTextColor"
|
|
3207
3326
|
}, /*#__PURE__*/React.createElement(Checkbox, {
|
|
3208
|
-
className: "border-2",
|
|
3209
3327
|
checked: context.conditionRules.textColor.check,
|
|
3210
3328
|
onCheckedChange: function onCheckedChange(e) {
|
|
3211
3329
|
var checked = e.target.checked;
|
|
@@ -3233,7 +3351,6 @@ var ConditionRules = function ConditionRules(_ref) {
|
|
|
3233
3351
|
}, /*#__PURE__*/React.createElement("span", {
|
|
3234
3352
|
id: "checkCellColor"
|
|
3235
3353
|
}, /*#__PURE__*/React.createElement(Checkbox, {
|
|
3236
|
-
className: "border-2",
|
|
3237
3354
|
checked: context.conditionRules.cellColor.check,
|
|
3238
3355
|
onCheckedChange: function onCheckedChange(e) {
|
|
3239
3356
|
var checked = e.target.checked;
|
|
@@ -6528,9 +6645,7 @@ var Toolbar = function Toolbar(_ref) {
|
|
|
6528
6645
|
justifyContent: "start"
|
|
6529
6646
|
}
|
|
6530
6647
|
}, /*#__PURE__*/React.createElement(SVGIcon, {
|
|
6531
|
-
name: iconId
|
|
6532
|
-
width: 24,
|
|
6533
|
-
height: 18
|
|
6648
|
+
name: iconId
|
|
6534
6649
|
}), text))) : (/*#__PURE__*/React.createElement(MenuDivider, {
|
|
6535
6650
|
key: "divider-".concat(index)
|
|
6536
6651
|
}));
|
|
@@ -6555,7 +6670,7 @@ var Toolbar = function Toolbar(_ref) {
|
|
|
6555
6670
|
className: "fortune-toolbar",
|
|
6556
6671
|
"aria-label": toolbar.toolbar
|
|
6557
6672
|
}, settings.customToolbarItems.filter(function (n) {
|
|
6558
|
-
return n.key
|
|
6673
|
+
return n.key !== "templates";
|
|
6559
6674
|
}).map(function (n) {
|
|
6560
6675
|
return /*#__PURE__*/React.createElement(CustomButton, {
|
|
6561
6676
|
tooltip: n.tooltip,
|
|
@@ -6592,18 +6707,6 @@ var Toolbar = function Toolbar(_ref) {
|
|
|
6592
6707
|
icon: n.icon,
|
|
6593
6708
|
iconName: n.iconName
|
|
6594
6709
|
}, n.children);
|
|
6595
|
-
}), /*#__PURE__*/React.createElement(Divider, {
|
|
6596
|
-
key: "customDivider"
|
|
6597
|
-
}), settings.customToolbarItems.filter(function (n) {
|
|
6598
|
-
return n.key !== "templates" && n.key !== "import-export";
|
|
6599
|
-
}).map(function (n) {
|
|
6600
|
-
return /*#__PURE__*/React.createElement(CustomButton, {
|
|
6601
|
-
tooltip: n.tooltip,
|
|
6602
|
-
onClick: n.onClick,
|
|
6603
|
-
key: n.key,
|
|
6604
|
-
icon: n.icon,
|
|
6605
|
-
iconName: n.iconName
|
|
6606
|
-
}, n.children);
|
|
6607
6710
|
}));
|
|
6608
6711
|
};
|
|
6609
6712
|
|
|
@@ -7848,8 +7951,7 @@ var ContextMenu = function ContextMenu() {
|
|
|
7848
7951
|
}
|
|
7849
7952
|
}, /*#__PURE__*/React.createElement(SVGIcon, {
|
|
7850
7953
|
name: "sort-asc",
|
|
7851
|
-
width:
|
|
7852
|
-
height: 18,
|
|
7954
|
+
width: 22,
|
|
7853
7955
|
style: {
|
|
7854
7956
|
marginRight: "4px"
|
|
7855
7957
|
}
|
|
@@ -7867,8 +7969,7 @@ var ContextMenu = function ContextMenu() {
|
|
|
7867
7969
|
}
|
|
7868
7970
|
}, /*#__PURE__*/React.createElement(SVGIcon, {
|
|
7869
7971
|
name: "sort-desc",
|
|
7870
|
-
width:
|
|
7871
|
-
height: 18,
|
|
7972
|
+
width: 22,
|
|
7872
7973
|
style: {
|
|
7873
7974
|
marginRight: "4px"
|
|
7874
7975
|
}
|
|
@@ -7924,7 +8025,7 @@ var ContextMenu = function ContextMenu() {
|
|
|
7924
8025
|
}
|
|
7925
8026
|
}, /*#__PURE__*/React.createElement(SVGIcon, {
|
|
7926
8027
|
name: "filter",
|
|
7927
|
-
width:
|
|
8028
|
+
width: 22,
|
|
7928
8029
|
style: {
|
|
7929
8030
|
marginRight: "4px"
|
|
7930
8031
|
}
|
|
@@ -7942,11 +8043,9 @@ var ContextMenu = function ContextMenu() {
|
|
|
7942
8043
|
}
|
|
7943
8044
|
}, /*#__PURE__*/React.createElement(SVGIcon, {
|
|
7944
8045
|
name: "eraser",
|
|
7945
|
-
width:
|
|
7946
|
-
height: 22,
|
|
8046
|
+
width: 22,
|
|
7947
8047
|
style: {
|
|
7948
|
-
marginRight: "4px"
|
|
7949
|
-
marginLeft: "2px"
|
|
8048
|
+
marginRight: "4px"
|
|
7950
8049
|
}
|
|
7951
8050
|
}), /*#__PURE__*/React.createElement("p", null, filter.clearFilter))))),
|
|
7952
8051
|
trigger: "mouseenter focus",
|
|
@@ -7957,7 +8056,7 @@ var ContextMenu = function ContextMenu() {
|
|
|
7957
8056
|
className: "context-item"
|
|
7958
8057
|
}, /*#__PURE__*/React.createElement(SVGIcon, {
|
|
7959
8058
|
name: "filter",
|
|
7960
|
-
width:
|
|
8059
|
+
width: 22,
|
|
7961
8060
|
style: {
|
|
7962
8061
|
marginRight: "4px"
|
|
7963
8062
|
}
|
|
@@ -10381,24 +10480,23 @@ function generateAPIs(context, setContext, handleUndo, handleRedo, settings, cel
|
|
|
10381
10480
|
var SelectItem = function SelectItem(_ref) {
|
|
10382
10481
|
var item = _ref.item,
|
|
10383
10482
|
isChecked = _ref.isChecked,
|
|
10384
|
-
|
|
10483
|
+
_onChange = _ref.onChange,
|
|
10385
10484
|
isItemVisible = _ref.isItemVisible;
|
|
10386
10485
|
var checked = useMemo(function () {
|
|
10387
10486
|
return isChecked(item.key);
|
|
10388
10487
|
}, [isChecked, item.key]);
|
|
10389
10488
|
return isItemVisible(item) ? (/*#__PURE__*/React.createElement("div", {
|
|
10390
10489
|
className: "select-item"
|
|
10391
|
-
}, /*#__PURE__*/React.createElement("
|
|
10392
|
-
className: "
|
|
10393
|
-
|
|
10394
|
-
className: "border-2",
|
|
10490
|
+
}, /*#__PURE__*/React.createElement("input", {
|
|
10491
|
+
className: "filter-checkbox",
|
|
10492
|
+
type: "checkbox",
|
|
10395
10493
|
checked: checked,
|
|
10396
|
-
|
|
10397
|
-
|
|
10494
|
+
onChange: function onChange() {
|
|
10495
|
+
_onChange(item, !checked);
|
|
10398
10496
|
}
|
|
10399
|
-
}), /*#__PURE__*/React.createElement("
|
|
10497
|
+
}), /*#__PURE__*/React.createElement("div", null, item.text), /*#__PURE__*/React.createElement("span", {
|
|
10400
10498
|
className: "count"
|
|
10401
|
-
}, "".concat(item.rows.length)))) : null;
|
|
10499
|
+
}, "( ".concat(item.rows.length, " )")))) : null;
|
|
10402
10500
|
};
|
|
10403
10501
|
var _DateSelectTreeItem = function DateSelectTreeItem(_ref2) {
|
|
10404
10502
|
var item = _ref2.item,
|
|
@@ -10407,7 +10505,7 @@ var _DateSelectTreeItem = function DateSelectTreeItem(_ref2) {
|
|
|
10407
10505
|
initialExpand = _ref2.initialExpand,
|
|
10408
10506
|
onExpand = _ref2.onExpand,
|
|
10409
10507
|
isChecked = _ref2.isChecked,
|
|
10410
|
-
|
|
10508
|
+
_onChange2 = _ref2.onChange,
|
|
10411
10509
|
isItemVisible = _ref2.isItemVisible;
|
|
10412
10510
|
var _useState = useState(initialExpand(item.key)),
|
|
10413
10511
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -10416,43 +10514,39 @@ var _DateSelectTreeItem = function DateSelectTreeItem(_ref2) {
|
|
|
10416
10514
|
var checked = useMemo(function () {
|
|
10417
10515
|
return isChecked(item.key);
|
|
10418
10516
|
}, [isChecked, item.key]);
|
|
10419
|
-
return isItemVisible(item) ? (/*#__PURE__*/React.createElement("div", {
|
|
10420
|
-
className: "flex flex-col gap-2"
|
|
10421
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
10517
|
+
return isItemVisible(item) ? (/*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
|
|
10422
10518
|
className: "select-item",
|
|
10423
10519
|
style: {
|
|
10424
10520
|
marginLeft: -2 + depth * 20
|
|
10425
10521
|
},
|
|
10426
|
-
|
|
10427
|
-
|
|
10428
|
-
|
|
10429
|
-
style: {
|
|
10430
|
-
flex: 1
|
|
10522
|
+
onClick: function onClick() {
|
|
10523
|
+
onExpand === null || onExpand === void 0 ? void 0 : onExpand(item.key, !expand);
|
|
10524
|
+
setExpand(!expand);
|
|
10431
10525
|
},
|
|
10432
|
-
|
|
10433
|
-
return e.stopPropagation();
|
|
10434
|
-
}
|
|
10526
|
+
tabIndex: 0
|
|
10435
10527
|
}, _.isEmpty(item.children) ? (/*#__PURE__*/React.createElement("div", {
|
|
10436
10528
|
style: {
|
|
10437
10529
|
width: 10
|
|
10438
10530
|
}
|
|
10439
|
-
})) : (/*#__PURE__*/React.createElement(
|
|
10440
|
-
|
|
10441
|
-
|
|
10442
|
-
|
|
10443
|
-
onClick: function onClick() {
|
|
10444
|
-
onExpand === null || onExpand === void 0 ? void 0 : onExpand(item.key, !expand);
|
|
10445
|
-
setExpand(!expand);
|
|
10531
|
+
})) : (/*#__PURE__*/React.createElement("div", {
|
|
10532
|
+
className: "filter-caret ".concat(expand ? "down" : "right"),
|
|
10533
|
+
style: {
|
|
10534
|
+
cursor: "pointer"
|
|
10446
10535
|
}
|
|
10447
|
-
})), /*#__PURE__*/React.createElement(
|
|
10448
|
-
className: "
|
|
10536
|
+
})), /*#__PURE__*/React.createElement("input", {
|
|
10537
|
+
className: "filter-checkbox",
|
|
10538
|
+
type: "checkbox",
|
|
10449
10539
|
checked: checked,
|
|
10450
|
-
|
|
10451
|
-
|
|
10452
|
-
}
|
|
10453
|
-
|
|
10540
|
+
onChange: function onChange() {
|
|
10541
|
+
_onChange2(item, !checked);
|
|
10542
|
+
},
|
|
10543
|
+
onClick: function onClick(e) {
|
|
10544
|
+
return e.stopPropagation();
|
|
10545
|
+
},
|
|
10546
|
+
tabIndex: 0
|
|
10547
|
+
}), /*#__PURE__*/React.createElement("div", null, item.text), /*#__PURE__*/React.createElement("span", {
|
|
10454
10548
|
className: "count"
|
|
10455
|
-
}, "".concat(item.rows.length))), expand && item.children.map(function (v) {
|
|
10549
|
+
}, "( ".concat(item.rows.length, " )"))), expand && item.children.map(function (v) {
|
|
10456
10550
|
return /*#__PURE__*/React.createElement(_DateSelectTreeItem, _objectSpread2({
|
|
10457
10551
|
key: v.key,
|
|
10458
10552
|
item: v,
|
|
@@ -10461,7 +10555,7 @@ var _DateSelectTreeItem = function DateSelectTreeItem(_ref2) {
|
|
|
10461
10555
|
initialExpand: initialExpand,
|
|
10462
10556
|
onExpand: onExpand,
|
|
10463
10557
|
isChecked: isChecked,
|
|
10464
|
-
onChange:
|
|
10558
|
+
onChange: _onChange2,
|
|
10465
10559
|
isItemVisible: isItemVisible
|
|
10466
10560
|
}));
|
|
10467
10561
|
}))) : null;
|
|
@@ -10510,7 +10604,8 @@ var FilterMenu = function FilterMenu() {
|
|
|
10510
10604
|
startCol = _ref4.startCol,
|
|
10511
10605
|
endRow = _ref4.endRow,
|
|
10512
10606
|
endCol = _ref4.endCol,
|
|
10513
|
-
col = _ref4.col
|
|
10607
|
+
col = _ref4.col,
|
|
10608
|
+
listBoxMaxHeight = _ref4.listBoxMaxHeight;
|
|
10514
10609
|
var _locale = locale(context),
|
|
10515
10610
|
filter = _locale.filter;
|
|
10516
10611
|
var _useState3 = useState({
|
|
@@ -10585,6 +10680,25 @@ var FilterMenu = function FilterMenu() {
|
|
|
10585
10680
|
}));
|
|
10586
10681
|
}, 300);
|
|
10587
10682
|
}, [data.flattenValues]);
|
|
10683
|
+
var selectAll = useCallback(function () {
|
|
10684
|
+
setDatesUncheck([]);
|
|
10685
|
+
setValuesUncheck([]);
|
|
10686
|
+
hiddenRows.current = [];
|
|
10687
|
+
}, []);
|
|
10688
|
+
var clearAll = useCallback(function () {
|
|
10689
|
+
setDatesUncheck(_.keys(data.dateRowMap));
|
|
10690
|
+
setValuesUncheck(_.keys(data.valueRowMap));
|
|
10691
|
+
hiddenRows.current = data.visibleRows;
|
|
10692
|
+
}, [data.dateRowMap, data.valueRowMap, data.visibleRows]);
|
|
10693
|
+
var inverseSelect = useCallback(function () {
|
|
10694
|
+
setDatesUncheck(produce(function (draft) {
|
|
10695
|
+
return _.xor(draft, _.keys(data.dateRowMap));
|
|
10696
|
+
}));
|
|
10697
|
+
setValuesUncheck(produce(function (draft) {
|
|
10698
|
+
return _.xor(draft, _.keys(data.valueRowMap));
|
|
10699
|
+
}));
|
|
10700
|
+
hiddenRows.current = _.xor(hiddenRows.current, data.visibleRows);
|
|
10701
|
+
}, [data.dateRowMap, data.valueRowMap, data.visibleRows]);
|
|
10588
10702
|
var onColorSelectChange = useCallback(function (key, color, checked) {
|
|
10589
10703
|
setFilterColors(produce(function (draft) {
|
|
10590
10704
|
var colorData = _.find(_.get(draft, key), function (v) {
|
|
@@ -10714,12 +10828,11 @@ var FilterMenu = function FilterMenu() {
|
|
|
10714
10828
|
ref: containerRef,
|
|
10715
10829
|
style: {
|
|
10716
10830
|
left: filterContextMenu.x,
|
|
10717
|
-
top: filterContextMenu.y
|
|
10718
|
-
minWidth: "280px !important"
|
|
10831
|
+
top: filterContextMenu.y
|
|
10719
10832
|
}
|
|
10720
10833
|
}, (_settings$filterConte = settings.filterContextMenu) === null || _settings$filterConte === void 0 ? void 0 : _settings$filterConte.map(function (name, i) {
|
|
10721
10834
|
if (name === "|") {
|
|
10722
|
-
return /*#__PURE__*/React.createElement(Divider$
|
|
10835
|
+
return /*#__PURE__*/React.createElement(Divider$1, {
|
|
10723
10836
|
key: "divider-".concat(i)
|
|
10724
10837
|
});
|
|
10725
10838
|
}
|
|
@@ -10729,16 +10842,7 @@ var FilterMenu = function FilterMenu() {
|
|
|
10729
10842
|
onClick: function onClick() {
|
|
10730
10843
|
return sortData(true);
|
|
10731
10844
|
}
|
|
10732
|
-
},
|
|
10733
|
-
className: "context-item w-full"
|
|
10734
|
-
}, /*#__PURE__*/React.createElement(SVGIcon, {
|
|
10735
|
-
name: "sort-asc",
|
|
10736
|
-
width: 24,
|
|
10737
|
-
height: 18,
|
|
10738
|
-
style: {
|
|
10739
|
-
marginRight: "4px"
|
|
10740
|
-
}
|
|
10741
|
-
}), /*#__PURE__*/React.createElement("p", null, filter.sortByAsc)));
|
|
10845
|
+
}, filter.sortByAsc);
|
|
10742
10846
|
}
|
|
10743
10847
|
if (name === "sort-by-desc") {
|
|
10744
10848
|
return /*#__PURE__*/React.createElement(Menu, {
|
|
@@ -10746,16 +10850,7 @@ var FilterMenu = function FilterMenu() {
|
|
|
10746
10850
|
onClick: function onClick() {
|
|
10747
10851
|
return sortData(false);
|
|
10748
10852
|
}
|
|
10749
|
-
},
|
|
10750
|
-
className: "context-item w-full"
|
|
10751
|
-
}, /*#__PURE__*/React.createElement(SVGIcon, {
|
|
10752
|
-
name: "sort-desc",
|
|
10753
|
-
width: 24,
|
|
10754
|
-
height: 18,
|
|
10755
|
-
style: {
|
|
10756
|
-
marginRight: "4px"
|
|
10757
|
-
}
|
|
10758
|
-
}), /*#__PURE__*/React.createElement("p", null, filter.sortByDesc)));
|
|
10853
|
+
}, filter.sortByDesc);
|
|
10759
10854
|
}
|
|
10760
10855
|
if (name === "filter-by-color") {
|
|
10761
10856
|
return /*#__PURE__*/React.createElement("div", {
|
|
@@ -10783,22 +10878,72 @@ var FilterMenu = function FilterMenu() {
|
|
|
10783
10878
|
className: "filter-caret right"
|
|
10784
10879
|
}))));
|
|
10785
10880
|
}
|
|
10881
|
+
if (name === "filter-by-condition") {
|
|
10882
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
10883
|
+
key: "name"
|
|
10884
|
+
}, /*#__PURE__*/React.createElement(Menu, {
|
|
10885
|
+
onClick: function onClick() {}
|
|
10886
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
10887
|
+
className: "filter-caret right"
|
|
10888
|
+
}), filter.filterByCondition), /*#__PURE__*/React.createElement("div", {
|
|
10889
|
+
className: "luckysheet-\\${menuid}-bycondition",
|
|
10890
|
+
style: {
|
|
10891
|
+
display: "none"
|
|
10892
|
+
}
|
|
10893
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
10894
|
+
className: "luckysheet-flat-menu-button luckysheet-mousedown-cancel",
|
|
10895
|
+
id: "luckysheet-\\${menuid}-selected"
|
|
10896
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
10897
|
+
className: "luckysheet-mousedown-cancel",
|
|
10898
|
+
"data-value": "null",
|
|
10899
|
+
"data-type": "0"
|
|
10900
|
+
}, filter.filiterInputNone), /*#__PURE__*/React.createElement("div", {
|
|
10901
|
+
className: "luckysheet-mousedown-cancel"
|
|
10902
|
+
}, /*#__PURE__*/React.createElement("i", {
|
|
10903
|
+
className: "fa fa-sort",
|
|
10904
|
+
"aria-hidden": "true"
|
|
10905
|
+
})))));
|
|
10906
|
+
}
|
|
10786
10907
|
if (name === "filter-by-value") {
|
|
10787
10908
|
return /*#__PURE__*/React.createElement("div", {
|
|
10788
10909
|
key: name
|
|
10910
|
+
}, /*#__PURE__*/React.createElement(Menu, {
|
|
10911
|
+
onClick: function onClick() {}
|
|
10789
10912
|
}, /*#__PURE__*/React.createElement("div", {
|
|
10790
|
-
className: "
|
|
10913
|
+
className: "filter-caret right"
|
|
10914
|
+
}), filter.filterByValues), /*#__PURE__*/React.createElement("div", {
|
|
10915
|
+
className: "luckysheet-filter-byvalue"
|
|
10791
10916
|
}, /*#__PURE__*/React.createElement("div", {
|
|
10917
|
+
className: "fortune-menuitem-row byvalue-btn-row"
|
|
10918
|
+
}, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("span", {
|
|
10919
|
+
className: "fortune-byvalue-btn",
|
|
10920
|
+
onClick: selectAll,
|
|
10921
|
+
tabIndex: 0
|
|
10922
|
+
}, filter.filterValueByAllBtn), " - ", /*#__PURE__*/React.createElement("span", {
|
|
10923
|
+
className: "fortune-byvalue-btn",
|
|
10924
|
+
onClick: clearAll,
|
|
10925
|
+
tabIndex: 0
|
|
10926
|
+
}, filter.filterValueByClearBtn), " - ", /*#__PURE__*/React.createElement("span", {
|
|
10927
|
+
className: "fortune-byvalue-btn",
|
|
10928
|
+
onClick: inverseSelect,
|
|
10929
|
+
tabIndex: 0
|
|
10930
|
+
}, filter.filterValueByInverseBtn)), /*#__PURE__*/React.createElement("div", {
|
|
10931
|
+
className: "byvalue-filter-icon"
|
|
10932
|
+
}, /*#__PURE__*/React.createElement(SVGIcon, {
|
|
10933
|
+
name: "filter-fill",
|
|
10934
|
+
style: {
|
|
10935
|
+
width: 20,
|
|
10936
|
+
height: 20
|
|
10937
|
+
}
|
|
10938
|
+
}))), /*#__PURE__*/React.createElement("div", {
|
|
10792
10939
|
className: "filtermenu-input-container"
|
|
10793
|
-
}, /*#__PURE__*/React.createElement(
|
|
10794
|
-
|
|
10795
|
-
name: "Search",
|
|
10796
|
-
size: "sm"
|
|
10797
|
-
}),
|
|
10940
|
+
}, /*#__PURE__*/React.createElement("input", {
|
|
10941
|
+
type: "text",
|
|
10798
10942
|
onKeyDown: function onKeyDown(e) {
|
|
10799
10943
|
return e.stopPropagation();
|
|
10800
10944
|
},
|
|
10801
10945
|
placeholder: filter.filterValueByTip,
|
|
10946
|
+
className: "luckysheet-mousedown-cancel",
|
|
10802
10947
|
id: "luckysheet-\\${menuid}-byvalue-input",
|
|
10803
10948
|
value: searchText,
|
|
10804
10949
|
onChange: function onChange(e) {
|
|
@@ -10806,7 +10951,10 @@ var FilterMenu = function FilterMenu() {
|
|
|
10806
10951
|
searchValues(e.target.value);
|
|
10807
10952
|
}
|
|
10808
10953
|
})), /*#__PURE__*/React.createElement("div", {
|
|
10809
|
-
id: "luckysheet-filter-byvalue-select"
|
|
10954
|
+
id: "luckysheet-filter-byvalue-select",
|
|
10955
|
+
style: {
|
|
10956
|
+
maxHeight: listBoxMaxHeight
|
|
10957
|
+
}
|
|
10810
10958
|
}, /*#__PURE__*/React.createElement(DateSelectTree, {
|
|
10811
10959
|
dates: data.dates,
|
|
10812
10960
|
onExpand: onExpand,
|
|
@@ -10828,37 +10976,6 @@ var FilterMenu = function FilterMenu() {
|
|
|
10828
10976
|
return v.match(item.key) != null;
|
|
10829
10977
|
}) > -1;
|
|
10830
10978
|
}
|
|
10831
|
-
}), /*#__PURE__*/React.createElement(SelectItem, {
|
|
10832
|
-
item: {
|
|
10833
|
-
key: "all",
|
|
10834
|
-
text: filter.filterValueByAllBtn,
|
|
10835
|
-
value: "",
|
|
10836
|
-
mask: "",
|
|
10837
|
-
rows: data.values.filter(function (v) {
|
|
10838
|
-
return showValues.includes(v.text);
|
|
10839
|
-
}).flatMap(function (v) {
|
|
10840
|
-
return v.rows;
|
|
10841
|
-
})
|
|
10842
|
-
},
|
|
10843
|
-
isChecked: function isChecked() {
|
|
10844
|
-
var allDatesChecked = datesUncheck.length === 0;
|
|
10845
|
-
var allValuesChecked = valuesUncheck.length === 0;
|
|
10846
|
-
return allDatesChecked && allValuesChecked;
|
|
10847
|
-
},
|
|
10848
|
-
onChange: function onChange(item, checked) {
|
|
10849
|
-
if (checked) {
|
|
10850
|
-
setDatesUncheck([]);
|
|
10851
|
-
setValuesUncheck([]);
|
|
10852
|
-
hiddenRows.current = [];
|
|
10853
|
-
} else {
|
|
10854
|
-
setDatesUncheck(_.keys(data.dateRowMap));
|
|
10855
|
-
setValuesUncheck(_.keys(data.valueRowMap));
|
|
10856
|
-
hiddenRows.current = data.visibleRows;
|
|
10857
|
-
}
|
|
10858
|
-
},
|
|
10859
|
-
isItemVisible: function isItemVisible() {
|
|
10860
|
-
return true;
|
|
10861
|
-
}
|
|
10862
10979
|
}), data.values.map(function (v) {
|
|
10863
10980
|
return /*#__PURE__*/React.createElement(SelectItem, {
|
|
10864
10981
|
key: v.key,
|
|
@@ -10868,17 +10985,14 @@ var FilterMenu = function FilterMenu() {
|
|
|
10868
10985
|
},
|
|
10869
10986
|
onChange: function onChange(item, checked) {
|
|
10870
10987
|
var rows = hiddenRows.current;
|
|
10871
|
-
|
|
10872
|
-
|
|
10873
|
-
|
|
10988
|
+
hiddenRows.current = checked ? _.without.apply(_, [rows].concat(_toConsumableArray(item.rows))) : _.concat(rows, item.rows);
|
|
10989
|
+
setValuesUncheck(produce(function (draft) {
|
|
10990
|
+
if (checked) {
|
|
10874
10991
|
_.pull(draft, item.key);
|
|
10875
|
-
}
|
|
10876
|
-
} else {
|
|
10877
|
-
hiddenRows.current = _.concat(rows, item.rows);
|
|
10878
|
-
setValuesUncheck(produce(function (draft) {
|
|
10992
|
+
} else {
|
|
10879
10993
|
draft.push(item.key);
|
|
10880
|
-
}
|
|
10881
|
-
}
|
|
10994
|
+
}
|
|
10995
|
+
}));
|
|
10882
10996
|
},
|
|
10883
10997
|
isItemVisible: function isItemVisible(item) {
|
|
10884
10998
|
return showValues.length === data.flattenValues.length ? true : _.includes(showValues, item.text);
|
|
@@ -10887,49 +11001,40 @@ var FilterMenu = function FilterMenu() {
|
|
|
10887
11001
|
}))));
|
|
10888
11002
|
}
|
|
10889
11003
|
return null;
|
|
10890
|
-
}), /*#__PURE__*/React.createElement("div", {
|
|
10891
|
-
className: "fortune-menuitem-row
|
|
10892
|
-
}, /*#__PURE__*/React.createElement(
|
|
10893
|
-
|
|
10894
|
-
style: {
|
|
10895
|
-
minWidth: "80px"
|
|
10896
|
-
},
|
|
11004
|
+
}), /*#__PURE__*/React.createElement(Divider$1, null), /*#__PURE__*/React.createElement("div", {
|
|
11005
|
+
className: "fortune-menuitem-row"
|
|
11006
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
11007
|
+
className: "button-basic button-primary",
|
|
10897
11008
|
onClick: function onClick() {
|
|
11009
|
+
if (col == null) return;
|
|
10898
11010
|
setContext(function (draftCtx) {
|
|
10899
|
-
|
|
11011
|
+
var rowHidden = _.reduce(hiddenRows.current, function (pre, curr) {
|
|
11012
|
+
pre[curr] = 0;
|
|
11013
|
+
return pre;
|
|
11014
|
+
}, {});
|
|
11015
|
+
saveFilter(draftCtx, hiddenRows.current.length > 0, rowHidden, {}, startRow, endRow, col, startCol, endCol);
|
|
11016
|
+
hiddenRows.current = [];
|
|
11017
|
+
draftCtx.filterContextMenu = undefined;
|
|
10900
11018
|
});
|
|
10901
11019
|
},
|
|
10902
11020
|
tabIndex: 0
|
|
10903
|
-
}, filter.
|
|
10904
|
-
|
|
10905
|
-
style: {
|
|
10906
|
-
minWidth: "80px"
|
|
10907
|
-
},
|
|
11021
|
+
}, filter.filterConform), /*#__PURE__*/React.createElement("div", {
|
|
11022
|
+
className: "button-basic button-default",
|
|
10908
11023
|
onClick: function onClick() {
|
|
10909
11024
|
setContext(function (draftCtx) {
|
|
10910
11025
|
draftCtx.filterContextMenu = undefined;
|
|
10911
11026
|
});
|
|
10912
11027
|
},
|
|
10913
11028
|
tabIndex: 0
|
|
10914
|
-
}, filter.filterCancel), /*#__PURE__*/React.createElement(
|
|
10915
|
-
|
|
10916
|
-
style: {
|
|
10917
|
-
minWidth: "80px"
|
|
10918
|
-
},
|
|
11029
|
+
}, filter.filterCancel), /*#__PURE__*/React.createElement("div", {
|
|
11030
|
+
className: "button-basic button-danger",
|
|
10919
11031
|
onClick: function onClick() {
|
|
10920
|
-
if (col == null) return;
|
|
10921
11032
|
setContext(function (draftCtx) {
|
|
10922
|
-
|
|
10923
|
-
pre[curr] = 0;
|
|
10924
|
-
return pre;
|
|
10925
|
-
}, {});
|
|
10926
|
-
saveFilter(draftCtx, hiddenRows.current.length > 0, rowHidden, {}, startRow, endRow, col, startCol, endCol);
|
|
10927
|
-
hiddenRows.current = [];
|
|
10928
|
-
draftCtx.filterContextMenu = undefined;
|
|
11033
|
+
clearFilter(draftCtx);
|
|
10929
11034
|
});
|
|
10930
11035
|
},
|
|
10931
11036
|
tabIndex: 0
|
|
10932
|
-
}, filter.
|
|
11037
|
+
}, filter.clearFilter))), showSubMenu && (/*#__PURE__*/React.createElement("div", {
|
|
10933
11038
|
ref: subMenuRef,
|
|
10934
11039
|
className: "luckysheet-filter-bycolor-submenu",
|
|
10935
11040
|
style: subMenuPos,
|
|
@@ -10969,7 +11074,7 @@ var FilterMenu = function FilterMenu() {
|
|
|
10969
11074
|
});
|
|
10970
11075
|
},
|
|
10971
11076
|
tabIndex: 0
|
|
10972
|
-
}, filter.
|
|
11077
|
+
}, filter.filterConform))))));
|
|
10973
11078
|
};
|
|
10974
11079
|
|
|
10975
11080
|
var SheetHiddenButton = function SheetHiddenButton(_ref) {
|