@fileverse-dev/fortune-react 1.2.3 → 1.2.4
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/es/components/ConditionFormat/index.css +2 -0
- package/es/components/ContextMenu/Menu.d.ts +1 -0
- package/es/components/ContextMenu/Menu.js +5 -2
- package/es/components/ContextMenu/index.css +4 -1
- package/es/components/ContextMenu/index.js +35 -8
- package/es/components/DataVerification/RangeDialog.js +0 -3
- package/es/components/SheetOverlay/ColumnHeader.js +17 -15
- package/es/components/SheetOverlay/FormulaSearch/index.css +0 -1
- package/es/components/SheetOverlay/FormulaSearch/index.js +1 -1
- package/es/components/SheetOverlay/RowHeader.js +5 -5
- package/es/components/SheetOverlay/index.css +7 -24
- package/es/components/Toolbar/Combo.js +5 -2
- package/es/components/Toolbar/Select.js +1 -1
- package/es/components/Toolbar/index.css +21 -1
- package/es/components/Toolbar/index.js +2 -1
- package/lib/components/ConditionFormat/index.css +2 -0
- package/lib/components/ContextMenu/Menu.d.ts +1 -0
- package/lib/components/ContextMenu/Menu.js +5 -2
- package/lib/components/ContextMenu/index.css +4 -1
- package/lib/components/ContextMenu/index.js +34 -7
- package/lib/components/DataVerification/RangeDialog.js +0 -3
- package/lib/components/SheetOverlay/ColumnHeader.js +15 -14
- package/lib/components/SheetOverlay/FormulaSearch/index.css +0 -1
- package/lib/components/SheetOverlay/FormulaSearch/index.js +1 -1
- package/lib/components/SheetOverlay/RowHeader.js +3 -4
- package/lib/components/SheetOverlay/index.css +7 -24
- package/lib/components/Toolbar/Combo.js +4 -1
- package/lib/components/Toolbar/Select.js +1 -1
- package/lib/components/Toolbar/index.css +21 -1
- package/package.json +2 -2
|
@@ -3,6 +3,7 @@ type Props = React.PropsWithChildren<{
|
|
|
3
3
|
onClick?: (e: React.MouseEvent<HTMLDivElement, MouseEvent>, container: HTMLDivElement) => void;
|
|
4
4
|
onMouseLeave?: (e: React.MouseEvent<HTMLDivElement, MouseEvent>, container: HTMLDivElement) => void;
|
|
5
5
|
onMouseEnter?: (e: React.MouseEvent<HTMLDivElement, MouseEvent>, container: HTMLDivElement) => void;
|
|
6
|
+
isActive?: boolean;
|
|
6
7
|
}>;
|
|
7
8
|
declare const Menu: React.FC<Props>;
|
|
8
9
|
export default Menu;
|
|
@@ -1,13 +1,16 @@
|
|
|
1
|
+
import { cn } from "@fileverse/ui";
|
|
1
2
|
import React, { useRef } from "react";
|
|
2
3
|
var Menu = function Menu(_a) {
|
|
3
4
|
var _onClick = _a.onClick,
|
|
4
5
|
_onMouseLeave = _a.onMouseLeave,
|
|
5
6
|
_onMouseEnter = _a.onMouseEnter,
|
|
6
|
-
children = _a.children
|
|
7
|
+
children = _a.children,
|
|
8
|
+
_b = _a.isActive,
|
|
9
|
+
isActive = _b === void 0 ? false : _b;
|
|
7
10
|
var containerRef = useRef(null);
|
|
8
11
|
return /*#__PURE__*/React.createElement("div", {
|
|
9
12
|
ref: containerRef,
|
|
10
|
-
className: "luckysheet-cols-menuitem luckysheet-mousedown-cancel",
|
|
13
|
+
className: cn("luckysheet-cols-menuitem luckysheet-mousedown-cancel", isActive && "color-bg-default-hover"),
|
|
11
14
|
onClick: function onClick(e) {
|
|
12
15
|
return _onClick === null || _onClick === void 0 ? void 0 : _onClick(e, containerRef.current);
|
|
13
16
|
},
|
|
@@ -82,7 +82,10 @@
|
|
|
82
82
|
cursor: pointer;
|
|
83
83
|
list-style: none;
|
|
84
84
|
margin: 0;
|
|
85
|
-
padding: 8px !important;
|
|
85
|
+
padding-right: 8px !important;
|
|
86
|
+
padding-left: 8px !important;
|
|
87
|
+
padding-top: 6px !important;
|
|
88
|
+
padding-bottom: 6px !important;
|
|
86
89
|
white-space: nowrap;
|
|
87
90
|
user-select: none;
|
|
88
91
|
display: flex;
|
|
@@ -115,7 +115,7 @@ var __generator = this && this.__generator || function (thisArg, body) {
|
|
|
115
115
|
};
|
|
116
116
|
import { locale, handleCopy, handlePasteByClick, deleteRowCol, insertRowCol, removeActiveImage, deleteSelectedCellText, sortSelection, createFilter, showImgChooser, handleLink, hideSelected, showSelected, getSheetIndex, api, isAllowEdit, jfrefreshgrid, newComment, getFreezeState, toggleFreeze, clearFilter, clearSelectedCellFormat, clearColumnsCellsFormat, clearRowsCellsFormat } from "@fileverse-dev/fortune-core";
|
|
117
117
|
import _ from "lodash";
|
|
118
|
-
import React, { useContext, useRef, useCallback, useLayoutEffect } from "react";
|
|
118
|
+
import React, { useContext, useRef, useCallback, useLayoutEffect, useState } from "react";
|
|
119
119
|
import regeneratorRuntime from "regenerator-runtime";
|
|
120
120
|
import Tippy from "@tippyjs/react";
|
|
121
121
|
import { LucideIcon } from "@fileverse/ui";
|
|
@@ -149,6 +149,9 @@ var ContextMenu = function ContextMenu() {
|
|
|
149
149
|
info = _b.info,
|
|
150
150
|
toolbar = _b.toolbar,
|
|
151
151
|
splitText = _b.splitText;
|
|
152
|
+
var _c = useState(""),
|
|
153
|
+
activeMenu = _c[0],
|
|
154
|
+
setActiveMenu = _c[1];
|
|
152
155
|
var addRowColRightAvobe = function addRowColRightAvobe(type, direction) {
|
|
153
156
|
var _a, _b, _c, _d, _e, _f;
|
|
154
157
|
var positionCol = (_c = (_b = (_a = context.luckysheet_select_save) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.column) === null || _c === void 0 ? void 0 : _c[0];
|
|
@@ -829,6 +832,12 @@ var ContextMenu = function ContextMenu() {
|
|
|
829
832
|
arrow: false,
|
|
830
833
|
zIndex: 3000,
|
|
831
834
|
appendTo: document.body,
|
|
835
|
+
onShow: function onShow() {
|
|
836
|
+
setActiveMenu("sort");
|
|
837
|
+
},
|
|
838
|
+
onHide: function onHide() {
|
|
839
|
+
if (activeMenu === "sort") setActiveMenu("");
|
|
840
|
+
},
|
|
832
841
|
content: /*#__PURE__*/React.createElement("div", {
|
|
833
842
|
className: "fortune-toolbar-select",
|
|
834
843
|
style: {
|
|
@@ -867,7 +876,9 @@ var ContextMenu = function ContextMenu() {
|
|
|
867
876
|
}), /*#__PURE__*/React.createElement("p", null, sort.desc))))),
|
|
868
877
|
trigger: "mouseenter focus",
|
|
869
878
|
hideOnClick: false
|
|
870
|
-
}, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Menu,
|
|
879
|
+
}, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Menu, {
|
|
880
|
+
isActive: activeMenu === "sort"
|
|
881
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
871
882
|
className: "flex items-center justify-between w-full"
|
|
872
883
|
}, /*#__PURE__*/React.createElement("div", {
|
|
873
884
|
className: "context-item"
|
|
@@ -907,7 +918,7 @@ var ContextMenu = function ContextMenu() {
|
|
|
907
918
|
}, /*#__PURE__*/React.createElement("div", {
|
|
908
919
|
className: "context-item p-2 w-full",
|
|
909
920
|
style: {
|
|
910
|
-
height: "
|
|
921
|
+
height: "32px"
|
|
911
922
|
}
|
|
912
923
|
}, /*#__PURE__*/React.createElement(LucideIcon, {
|
|
913
924
|
name: "Filter",
|
|
@@ -922,14 +933,22 @@ var ContextMenu = function ContextMenu() {
|
|
|
922
933
|
}, /*#__PURE__*/React.createElement("div", {
|
|
923
934
|
className: "context-item p-2 w-full",
|
|
924
935
|
style: {
|
|
925
|
-
height: "
|
|
936
|
+
height: "32px"
|
|
926
937
|
}
|
|
927
938
|
}, /*#__PURE__*/React.createElement(LucideIcon, {
|
|
928
939
|
name: "Eraser"
|
|
929
940
|
}), /*#__PURE__*/React.createElement("p", null, filter.clearFilter))))),
|
|
930
941
|
trigger: "mouseenter focus",
|
|
931
|
-
hideOnClick: false
|
|
932
|
-
|
|
942
|
+
hideOnClick: false,
|
|
943
|
+
onShow: function onShow() {
|
|
944
|
+
setActiveMenu("filter");
|
|
945
|
+
},
|
|
946
|
+
onHide: function onHide() {
|
|
947
|
+
if (activeMenu === "filter") setActiveMenu("");
|
|
948
|
+
}
|
|
949
|
+
}, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Menu, {
|
|
950
|
+
isActive: activeMenu === "filter"
|
|
951
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
933
952
|
className: "flex items-center justify-between w-full"
|
|
934
953
|
}, /*#__PURE__*/React.createElement("div", {
|
|
935
954
|
className: "context-item"
|
|
@@ -983,6 +1002,12 @@ var ContextMenu = function ContextMenu() {
|
|
|
983
1002
|
arrow: false,
|
|
984
1003
|
zIndex: 3000,
|
|
985
1004
|
appendTo: document.body,
|
|
1005
|
+
onShow: function onShow() {
|
|
1006
|
+
setActiveMenu("conditionFormat");
|
|
1007
|
+
},
|
|
1008
|
+
onHide: function onHide() {
|
|
1009
|
+
if (activeMenu === "conditionFormat") setActiveMenu("");
|
|
1010
|
+
},
|
|
986
1011
|
content: /*#__PURE__*/React.createElement("div", {
|
|
987
1012
|
style: {
|
|
988
1013
|
minWidth: 220
|
|
@@ -993,7 +1018,9 @@ var ContextMenu = function ContextMenu() {
|
|
|
993
1018
|
})),
|
|
994
1019
|
trigger: "mouseenter focus",
|
|
995
1020
|
hideOnClick: false
|
|
996
|
-
}, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Menu,
|
|
1021
|
+
}, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Menu, {
|
|
1022
|
+
isActive: activeMenu === "conditionFormat"
|
|
1023
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
997
1024
|
className: "flex items-center justify-between w-full"
|
|
998
1025
|
}, /*#__PURE__*/React.createElement("div", {
|
|
999
1026
|
className: "flex items-center gap-2 context-item"
|
|
@@ -1029,7 +1056,7 @@ var ContextMenu = function ContextMenu() {
|
|
|
1029
1056
|
}), /*#__PURE__*/React.createElement("p", null, "Clear formatting")));
|
|
1030
1057
|
}
|
|
1031
1058
|
return null;
|
|
1032
|
-
}, [context, setContext, refs.globalCache, rightclick, showAlert, showDialog, drag.noMulti, info.tipRowHeightLimit, info.tipColumnWidthLimit, generalDialog.partiallyError, generalDialog.readOnlyError, generalDialog.dataNullError]);
|
|
1059
|
+
}, [context, setContext, refs.globalCache, rightclick, showAlert, showDialog, drag.noMulti, info.tipRowHeightLimit, info.tipColumnWidthLimit, generalDialog.partiallyError, generalDialog.readOnlyError, generalDialog.dataNullError, activeMenu]);
|
|
1033
1060
|
useLayoutEffect(function () {
|
|
1034
1061
|
var _a;
|
|
1035
1062
|
if (!containerRef.current) {
|
|
@@ -18,12 +18,10 @@ var RangeDialog = function RangeDialog() {
|
|
|
18
18
|
rangeTxt2 = _c[0],
|
|
19
19
|
setRangeTxt2 = _c[1];
|
|
20
20
|
var close = useCallback(function () {
|
|
21
|
-
var _a;
|
|
22
21
|
setContext(function (ctx) {
|
|
23
22
|
ctx.rangeDialog.show = false;
|
|
24
23
|
ctx.rangeDialog.singleSelect = false;
|
|
25
24
|
});
|
|
26
|
-
(_a = document.getElementById("data-verification-button")) === null || _a === void 0 ? void 0 : _a.click();
|
|
27
25
|
if (!context.rangeDialog) return;
|
|
28
26
|
var rangeDialogType = context.rangeDialog.type;
|
|
29
27
|
if (rangeDialogType.indexOf("between") >= 0) {
|
|
@@ -92,7 +90,6 @@ var RangeDialog = function RangeDialog() {
|
|
|
92
90
|
minWidth: "80px"
|
|
93
91
|
},
|
|
94
92
|
onClick: function onClick() {
|
|
95
|
-
console.log("rangeTxt2", rangeTxt2);
|
|
96
93
|
setContext(function (ctx) {
|
|
97
94
|
ctx.rangeDialog.rangeTxt = rangeTxt2;
|
|
98
95
|
});
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { colLocation, colLocationByIndex, selectTitlesMap, selectTitlesRange, handleColSizeHandleMouseDown, handleColumnHeaderMouseDown, isAllowEdit, getFlowdata, fixColumnStyleOverflowInFreeze, handleColFreezeHandleMouseDown, getSheetIndex, fixPositionOnFrozenCells, showSelected
|
|
1
|
+
import { colLocation, colLocationByIndex, selectTitlesMap, selectTitlesRange, handleColSizeHandleMouseDown, handleColumnHeaderMouseDown, isAllowEdit, getFlowdata, fixColumnStyleOverflowInFreeze, handleColFreezeHandleMouseDown, getSheetIndex, fixPositionOnFrozenCells, showSelected } from "@fileverse-dev/fortune-core";
|
|
2
|
+
import { api } from "@fileverse-dev/fortune-core";
|
|
2
3
|
import _ from "lodash";
|
|
3
4
|
import React, { useContext, useState, useRef, useCallback, useEffect, useMemo } from "react";
|
|
4
5
|
import WorkbookContext from "../../context";
|
|
@@ -195,15 +196,6 @@ var ColumnHeader = function ColumnHeader() {
|
|
|
195
196
|
useEffect(function () {
|
|
196
197
|
containerRef.current.scrollLeft = context.scrollLeft;
|
|
197
198
|
}, [context.scrollLeft]);
|
|
198
|
-
var _h = useState(0),
|
|
199
|
-
hovered = _h[0],
|
|
200
|
-
setHovered = _h[1];
|
|
201
|
-
var onMouseMoveHideRight = useCallback(function () {
|
|
202
|
-
setHovered(-21);
|
|
203
|
-
}, []);
|
|
204
|
-
var onMouseLeaveHideRight = useCallback(function () {
|
|
205
|
-
setHovered(0);
|
|
206
|
-
}, []);
|
|
207
199
|
return /*#__PURE__*/React.createElement("div", {
|
|
208
200
|
ref: containerRef,
|
|
209
201
|
className: "fortune-col-header",
|
|
@@ -225,10 +217,10 @@ var ColumnHeader = function ColumnHeader() {
|
|
|
225
217
|
}
|
|
226
218
|
}, hiddenPointers.map(function (item) {
|
|
227
219
|
return /*#__PURE__*/React.createElement("div", {
|
|
228
|
-
className: "flex gap-4 cursor-pointer hide-btn align-center
|
|
220
|
+
className: "flex gap-4 cursor-pointer hide-btn align-center",
|
|
229
221
|
style: {
|
|
230
222
|
height: context.columnHeaderHeight - 12,
|
|
231
|
-
left: "".concat(item.left -
|
|
223
|
+
left: "".concat(item.left - 12, "px")
|
|
232
224
|
},
|
|
233
225
|
onClick: function onClick(e) {
|
|
234
226
|
return showColumn(e, item);
|
|
@@ -244,7 +236,18 @@ var ColumnHeader = function ColumnHeader() {
|
|
|
244
236
|
}, /*#__PURE__*/React.createElement("path", {
|
|
245
237
|
d: "M0.164574 4.20629L3.54376 7.58548C3.7275 7.76922 4.04167 7.63909 4.04167 7.37924L4.04167 0.620865C4.04167 0.361018 3.7275 0.230885 3.54376 0.414625L0.164575 3.79381C0.0506717 3.90772 0.0506715 4.09239 0.164574 4.20629Z",
|
|
246
238
|
fill: "#363B3F"
|
|
247
|
-
})))
|
|
239
|
+
}))));
|
|
240
|
+
}), hiddenPointers.map(function (item) {
|
|
241
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
242
|
+
className: "flex gap-4 cursor-pointer hide-btn align-center",
|
|
243
|
+
style: {
|
|
244
|
+
height: context.columnHeaderHeight - 12,
|
|
245
|
+
left: "".concat(item.left + 6, "px")
|
|
246
|
+
},
|
|
247
|
+
onClick: function onClick(e) {
|
|
248
|
+
return showColumn(e, item);
|
|
249
|
+
}
|
|
250
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
248
251
|
className: ""
|
|
249
252
|
}, /*#__PURE__*/React.createElement("svg", {
|
|
250
253
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -303,13 +306,12 @@ var ColumnHeader = function ColumnHeader() {
|
|
|
303
306
|
c1 = _a.c1,
|
|
304
307
|
c2 = _a.c2;
|
|
305
308
|
return /*#__PURE__*/React.createElement("div", {
|
|
306
|
-
className: "fortune-col-header-selected",
|
|
309
|
+
className: "fortune-col-header-selected color-bg-tertiary",
|
|
307
310
|
key: i,
|
|
308
311
|
style: _.assign({
|
|
309
312
|
left: col_pre,
|
|
310
313
|
width: col - col_pre - 1,
|
|
311
314
|
display: "block",
|
|
312
|
-
backgroundColor: "#EFC703",
|
|
313
315
|
mixBlendMode: "multiply"
|
|
314
316
|
}, fixColumnStyleOverflowInFreeze(context, c1, c2, (_b = refs.globalCache.freezen) === null || _b === void 0 ? void 0 : _b[context.currentSheetId]))
|
|
315
317
|
});
|
|
@@ -53,7 +53,7 @@ var FormulaSearch = function FormulaSearch(props) {
|
|
|
53
53
|
});
|
|
54
54
|
if (_.isEmpty(context.functionCandidates) && _.isEmpty(context.defaultCandidates)) return null;
|
|
55
55
|
return /*#__PURE__*/React.createElement("div", {
|
|
56
|
-
className: "flex flex-col luckysheet-formula-search-c-p custom-scroll",
|
|
56
|
+
className: "flex color-border-default border flex-col luckysheet-formula-search-c-p custom-scroll",
|
|
57
57
|
id: "luckysheet-formula-search-c-p",
|
|
58
58
|
style: {
|
|
59
59
|
top: top
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { rowLocation, rowLocationByIndex, selectTitlesMap, selectTitlesRange, handleContextMenu, handleRowHeaderMouseDown, handleRowSizeHandleMouseDown, fixRowStyleOverflowInFreeze, handleRowFreezeHandleMouseDown, getSheetIndex, showSelected, fixPositionOnFrozenCells
|
|
1
|
+
import { rowLocation, rowLocationByIndex, selectTitlesMap, selectTitlesRange, handleContextMenu, handleRowHeaderMouseDown, handleRowSizeHandleMouseDown, fixRowStyleOverflowInFreeze, handleRowFreezeHandleMouseDown, getSheetIndex, showSelected, fixPositionOnFrozenCells } from "@fileverse-dev/fortune-core";
|
|
2
|
+
import { api } from "@fileverse-dev/fortune-core";
|
|
2
3
|
import _ from "lodash";
|
|
3
4
|
import React, { useContext, useState, useRef, useCallback, useEffect, useMemo } from "react";
|
|
4
5
|
import WorkbookContext from "../../context";
|
|
@@ -206,9 +207,9 @@ var RowHeader = function RowHeader() {
|
|
|
206
207
|
onContextMenu: onContextMenu
|
|
207
208
|
}, hiddenPointers.map(function (item) {
|
|
208
209
|
return /*#__PURE__*/React.createElement("div", {
|
|
209
|
-
className: "flex flex-col gap-4 cursor-pointer align-center hide-btn-row",
|
|
210
|
+
className: "flex flex-col gap-4 cursor-pointer align-center hide-btn-row hide-btn",
|
|
210
211
|
style: {
|
|
211
|
-
top: "".concat(item.top -
|
|
212
|
+
top: "".concat(item.top - 16, "px"),
|
|
212
213
|
zIndex: 100
|
|
213
214
|
},
|
|
214
215
|
onClick: function onClick(e) {
|
|
@@ -265,13 +266,12 @@ var RowHeader = function RowHeader() {
|
|
|
265
266
|
r1 = _a.r1,
|
|
266
267
|
r2 = _a.r2;
|
|
267
268
|
return /*#__PURE__*/React.createElement("div", {
|
|
268
|
-
className: "fortune-row-header-selected",
|
|
269
|
+
className: "fortune-row-header-selected color-bg-tertiary",
|
|
269
270
|
key: i,
|
|
270
271
|
style: _.assign({
|
|
271
272
|
top: row_pre,
|
|
272
273
|
height: row - row_pre - 1,
|
|
273
274
|
display: "block",
|
|
274
|
-
backgroundColor: "#EFC703",
|
|
275
275
|
mixBlendMode: "multiply"
|
|
276
276
|
}, fixRowStyleOverflowInFreeze(context, r1, r2, (_b = refs.globalCache.freezen) === null || _b === void 0 ? void 0 : _b[context.currentSheetId]))
|
|
277
277
|
});
|
|
@@ -45,12 +45,10 @@
|
|
|
45
45
|
.fortune-row-header-selected {
|
|
46
46
|
position: absolute;
|
|
47
47
|
z-index: 10;
|
|
48
|
-
border-right: 1px solid #0188fb;
|
|
49
48
|
right: 0;
|
|
50
49
|
width: 100%;
|
|
51
50
|
margin-top: 2px;
|
|
52
51
|
display: none;
|
|
53
|
-
background-color: rgba(76, 76, 76, 0.1);
|
|
54
52
|
}
|
|
55
53
|
|
|
56
54
|
.fortune-col-header-wrap {
|
|
@@ -94,12 +92,10 @@
|
|
|
94
92
|
cursor: default;
|
|
95
93
|
position: absolute;
|
|
96
94
|
z-index: 10;
|
|
97
|
-
border-bottom: 1px solid #0188fb;
|
|
98
95
|
bottom: 0;
|
|
99
96
|
height: 100%;
|
|
100
97
|
margin-left: 0px;
|
|
101
98
|
display: none;
|
|
102
|
-
background-color: rgba(76, 76, 76, 0.1);
|
|
103
99
|
}
|
|
104
100
|
|
|
105
101
|
.fortune-left-top {
|
|
@@ -137,7 +133,7 @@
|
|
|
137
133
|
z-index: 14;
|
|
138
134
|
/*border:1px solid #fff;*/
|
|
139
135
|
margin: 0px 0 0 0px;
|
|
140
|
-
background: rgba(0, 80, 208, 0.15);
|
|
136
|
+
/* background: rgba(0, 80, 208, 0.15); */
|
|
141
137
|
display: none;
|
|
142
138
|
}
|
|
143
139
|
|
|
@@ -199,9 +195,9 @@
|
|
|
199
195
|
z-index: 15;
|
|
200
196
|
border: 2.5px solid #efc703;
|
|
201
197
|
margin: -1px 0 0 -1px;
|
|
202
|
-
background: rgba(1, 136, 251, 0.15);
|
|
203
198
|
display: none;
|
|
204
199
|
box-sizing: content-box;
|
|
200
|
+
background: rgba(239, 199, 5, 0.02);
|
|
205
201
|
}
|
|
206
202
|
|
|
207
203
|
.luckysheet-cs-inner-border {
|
|
@@ -1013,22 +1009,16 @@
|
|
|
1013
1009
|
}
|
|
1014
1010
|
|
|
1015
1011
|
.hide-btn {
|
|
1016
|
-
padding-
|
|
1017
|
-
padding-right: 3px;
|
|
1018
|
-
padding-top: 2px;
|
|
1012
|
+
padding-top: 1px;
|
|
1019
1013
|
position: absolute;
|
|
1020
|
-
|
|
1014
|
+
right: 5;
|
|
1021
1015
|
top: 5px;
|
|
1022
1016
|
z-index: 200;
|
|
1017
|
+
width: 9px;
|
|
1023
1018
|
}
|
|
1024
1019
|
|
|
1025
1020
|
.hide-btn:hover {
|
|
1026
|
-
|
|
1027
|
-
padding-right: 2px;
|
|
1028
|
-
padding-top: 1px;
|
|
1029
|
-
background-color: rgba(255, 255, 255, 1);
|
|
1030
|
-
border-radius: var(--border-radius-sm, 4px);
|
|
1031
|
-
border: 1px solid #BDC4C8;
|
|
1021
|
+
border: 1px solid #0188fb;
|
|
1032
1022
|
}
|
|
1033
1023
|
|
|
1034
1024
|
.rotate-row-icon {
|
|
@@ -1037,13 +1027,6 @@ border: 1px solid #BDC4C8;
|
|
|
1037
1027
|
|
|
1038
1028
|
.hide-btn-row {
|
|
1039
1029
|
position: absolute;
|
|
1040
|
-
|
|
1030
|
+
left: 4px;
|
|
1041
1031
|
z-index: 200;
|
|
1042
|
-
width: 12px;
|
|
1043
|
-
}
|
|
1044
|
-
|
|
1045
|
-
.hide-btn-row:hover {
|
|
1046
|
-
background-color: white;
|
|
1047
|
-
border: 1px solid #BDC4C8;
|
|
1048
|
-
border-radius: 4px;
|
|
1049
1032
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { useMemo, useRef, useState } from "react";
|
|
2
|
-
import { IconButton, Tooltip, Popover, PopoverContent, PopoverTrigger, cn, Button } from "@fileverse/ui";
|
|
2
|
+
import { IconButton, Tooltip, Popover, PopoverContent, PopoverTrigger, cn, Button, LucideIcon } from "@fileverse/ui";
|
|
3
3
|
import SVGIcon from "../SVGIcon";
|
|
4
4
|
import { getLucideIcon } from ".";
|
|
5
5
|
var Combo = function Combo(_a) {
|
|
@@ -49,7 +49,10 @@ var Combo = function Combo(_a) {
|
|
|
49
49
|
height: 16
|
|
50
50
|
})) : (/*#__PURE__*/React.createElement("span", {
|
|
51
51
|
className: "fortune-toolbar-combo-text"
|
|
52
|
-
}, text !== undefined ? text : ""))
|
|
52
|
+
}, text !== undefined ? text : "")), /*#__PURE__*/React.createElement(LucideIcon, {
|
|
53
|
+
className: "w-[16px] h-[16px]",
|
|
54
|
+
name: "ChevronDown"
|
|
55
|
+
})))) : (/*#__PURE__*/React.createElement("span", null, iconId === "font-color" ? (/*#__PURE__*/React.createElement(Tooltip, {
|
|
53
56
|
text: tooltip,
|
|
54
57
|
placement: "bottom"
|
|
55
58
|
}, /*#__PURE__*/React.createElement(Button, {
|
|
@@ -27,7 +27,7 @@ var Option = function Option(_a) {
|
|
|
27
27
|
}, iconId && /*#__PURE__*/React.createElement(SVGIcon, {
|
|
28
28
|
name: iconId
|
|
29
29
|
}), /*#__PURE__*/React.createElement("div", {
|
|
30
|
-
className: "fortuen-toolbar-text color-text-default text-body-sm"
|
|
30
|
+
className: "fortuen-toolbar-text color-text-default text-body-sm w-full"
|
|
31
31
|
}, children));
|
|
32
32
|
};
|
|
33
33
|
export { Option };
|
|
@@ -141,14 +141,30 @@
|
|
|
141
141
|
|
|
142
142
|
.fortune-toolbar-combo-button {
|
|
143
143
|
font-size: 12px;
|
|
144
|
+
padding-top: 4px;
|
|
145
|
+
padding-bottom: 4px;
|
|
146
|
+
padding-left: 8px;
|
|
147
|
+
padding-right: 8px;
|
|
148
|
+
border-radius: 4px;
|
|
149
|
+
gap: 8px;
|
|
150
|
+
}
|
|
151
|
+
.fortune-toolbar-combo-button:hover {
|
|
152
|
+
background: hsl(var(--color-bg-default-hover));
|
|
144
153
|
}
|
|
145
154
|
|
|
146
155
|
.fortune-toolbar-select-option {
|
|
147
156
|
font-size: 12px;
|
|
148
157
|
min-width: 60px;
|
|
149
|
-
padding: 8px;
|
|
158
|
+
padding-left: 8px;
|
|
159
|
+
padding-right: 8px;
|
|
160
|
+
padding-top: 6px;
|
|
161
|
+
padding-bottom: 6px;
|
|
150
162
|
cursor: pointer;
|
|
151
163
|
user-select: none;
|
|
164
|
+
height: 32px;
|
|
165
|
+
display: flex;
|
|
166
|
+
align-items: center;
|
|
167
|
+
|
|
152
168
|
}
|
|
153
169
|
|
|
154
170
|
.fortune-toolbar-select-option:hover {
|
|
@@ -171,6 +187,10 @@
|
|
|
171
187
|
font-weight: 500;
|
|
172
188
|
font-size: 14px;
|
|
173
189
|
line-height: 20px;
|
|
190
|
+
max-width: 56px;
|
|
191
|
+
overflow: hidden;
|
|
192
|
+
text-overflow: ellipsis;
|
|
193
|
+
white-space: nowrap;
|
|
174
194
|
}
|
|
175
195
|
|
|
176
196
|
.fortune-toolbar-color-picker-item {
|
|
@@ -123,7 +123,8 @@ var __spreadArray = this && this.__spreadArray || function (to, from, pack) {
|
|
|
123
123
|
return to.concat(ar || Array.prototype.slice.call(from));
|
|
124
124
|
};
|
|
125
125
|
import React, { useContext, useCallback, useRef, useEffect, useState } from "react";
|
|
126
|
-
import { toolbarItemClickHandler, handleTextBackground, handleTextColor, handleTextSize, normalizedCellAttr, getFlowdata, newComment, editComment, deleteComment, showHideComment, showHideAllComments, autoSelectionFormula, handleSum, locale, handleMerge, handleBorder, toolbarItemSelectedFunc, handleFreeze, insertImage, showImgChooser, updateFormat, handleSort, handleHorizontalAlign, handleVerticalAlign, handleScreenShot, createFilter, clearFilter, applyLocation, insertDuneChart
|
|
126
|
+
import { toolbarItemClickHandler, handleTextBackground, handleTextColor, handleTextSize, normalizedCellAttr, getFlowdata, newComment, editComment, deleteComment, showHideComment, showHideAllComments, autoSelectionFormula, handleSum, locale, handleMerge, handleBorder, toolbarItemSelectedFunc, handleFreeze, insertImage, showImgChooser, updateFormat, handleSort, handleHorizontalAlign, handleVerticalAlign, handleScreenShot, createFilter, clearFilter, applyLocation, insertDuneChart } from "@fileverse-dev/fortune-core";
|
|
127
|
+
import { api } from "@fileverse-dev/fortune-core";
|
|
127
128
|
import _ from "lodash";
|
|
128
129
|
import { IconButton, LucideIcon, Tooltip, Command, CommandInput, CommandList, CommandEmpty, CommandGroup, CommandItem } from "@fileverse/ui";
|
|
129
130
|
import DataVerificationPortal from "./dataVerificationPortal";
|
|
@@ -3,6 +3,7 @@ type Props = React.PropsWithChildren<{
|
|
|
3
3
|
onClick?: (e: React.MouseEvent<HTMLDivElement, MouseEvent>, container: HTMLDivElement) => void;
|
|
4
4
|
onMouseLeave?: (e: React.MouseEvent<HTMLDivElement, MouseEvent>, container: HTMLDivElement) => void;
|
|
5
5
|
onMouseEnter?: (e: React.MouseEvent<HTMLDivElement, MouseEvent>, container: HTMLDivElement) => void;
|
|
6
|
+
isActive?: boolean;
|
|
6
7
|
}>;
|
|
7
8
|
declare const Menu: React.FC<Props>;
|
|
8
9
|
export default Menu;
|
|
@@ -5,17 +5,20 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.default = void 0;
|
|
8
|
+
var _ui = require("@fileverse/ui");
|
|
8
9
|
var _react = _interopRequireWildcard(require("react"));
|
|
9
10
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
10
11
|
var Menu = function Menu(_a) {
|
|
11
12
|
var _onClick = _a.onClick,
|
|
12
13
|
_onMouseLeave = _a.onMouseLeave,
|
|
13
14
|
_onMouseEnter = _a.onMouseEnter,
|
|
14
|
-
children = _a.children
|
|
15
|
+
children = _a.children,
|
|
16
|
+
_b = _a.isActive,
|
|
17
|
+
isActive = _b === void 0 ? false : _b;
|
|
15
18
|
var containerRef = (0, _react.useRef)(null);
|
|
16
19
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
17
20
|
ref: containerRef,
|
|
18
|
-
className: "luckysheet-cols-menuitem luckysheet-mousedown-cancel",
|
|
21
|
+
className: (0, _ui.cn)("luckysheet-cols-menuitem luckysheet-mousedown-cancel", isActive && "color-bg-default-hover"),
|
|
19
22
|
onClick: function onClick(e) {
|
|
20
23
|
return _onClick === null || _onClick === void 0 ? void 0 : _onClick(e, containerRef.current);
|
|
21
24
|
},
|
|
@@ -82,7 +82,10 @@
|
|
|
82
82
|
cursor: pointer;
|
|
83
83
|
list-style: none;
|
|
84
84
|
margin: 0;
|
|
85
|
-
padding: 8px !important;
|
|
85
|
+
padding-right: 8px !important;
|
|
86
|
+
padding-left: 8px !important;
|
|
87
|
+
padding-top: 6px !important;
|
|
88
|
+
padding-bottom: 6px !important;
|
|
86
89
|
white-space: nowrap;
|
|
87
90
|
user-select: none;
|
|
88
91
|
display: flex;
|
|
@@ -158,6 +158,9 @@ var ContextMenu = function ContextMenu() {
|
|
|
158
158
|
info = _b.info,
|
|
159
159
|
toolbar = _b.toolbar,
|
|
160
160
|
splitText = _b.splitText;
|
|
161
|
+
var _c = (0, _react.useState)(""),
|
|
162
|
+
activeMenu = _c[0],
|
|
163
|
+
setActiveMenu = _c[1];
|
|
161
164
|
var addRowColRightAvobe = function addRowColRightAvobe(type, direction) {
|
|
162
165
|
var _a, _b, _c, _d, _e, _f;
|
|
163
166
|
var positionCol = (_c = (_b = (_a = context.luckysheet_select_save) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.column) === null || _c === void 0 ? void 0 : _c[0];
|
|
@@ -838,6 +841,12 @@ var ContextMenu = function ContextMenu() {
|
|
|
838
841
|
arrow: false,
|
|
839
842
|
zIndex: 3000,
|
|
840
843
|
appendTo: document.body,
|
|
844
|
+
onShow: function onShow() {
|
|
845
|
+
setActiveMenu("sort");
|
|
846
|
+
},
|
|
847
|
+
onHide: function onHide() {
|
|
848
|
+
if (activeMenu === "sort") setActiveMenu("");
|
|
849
|
+
},
|
|
841
850
|
content: /*#__PURE__*/_react.default.createElement("div", {
|
|
842
851
|
className: "fortune-toolbar-select",
|
|
843
852
|
style: {
|
|
@@ -876,7 +885,9 @@ var ContextMenu = function ContextMenu() {
|
|
|
876
885
|
}), /*#__PURE__*/_react.default.createElement("p", null, sort.desc))))),
|
|
877
886
|
trigger: "mouseenter focus",
|
|
878
887
|
hideOnClick: false
|
|
879
|
-
}, /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_Menu.default,
|
|
888
|
+
}, /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_Menu.default, {
|
|
889
|
+
isActive: activeMenu === "sort"
|
|
890
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
880
891
|
className: "flex items-center justify-between w-full"
|
|
881
892
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
882
893
|
className: "context-item"
|
|
@@ -916,7 +927,7 @@ var ContextMenu = function ContextMenu() {
|
|
|
916
927
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
917
928
|
className: "context-item p-2 w-full",
|
|
918
929
|
style: {
|
|
919
|
-
height: "
|
|
930
|
+
height: "32px"
|
|
920
931
|
}
|
|
921
932
|
}, /*#__PURE__*/_react.default.createElement(_ui.LucideIcon, {
|
|
922
933
|
name: "Filter",
|
|
@@ -931,14 +942,22 @@ var ContextMenu = function ContextMenu() {
|
|
|
931
942
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
932
943
|
className: "context-item p-2 w-full",
|
|
933
944
|
style: {
|
|
934
|
-
height: "
|
|
945
|
+
height: "32px"
|
|
935
946
|
}
|
|
936
947
|
}, /*#__PURE__*/_react.default.createElement(_ui.LucideIcon, {
|
|
937
948
|
name: "Eraser"
|
|
938
949
|
}), /*#__PURE__*/_react.default.createElement("p", null, filter.clearFilter))))),
|
|
939
950
|
trigger: "mouseenter focus",
|
|
940
|
-
hideOnClick: false
|
|
941
|
-
|
|
951
|
+
hideOnClick: false,
|
|
952
|
+
onShow: function onShow() {
|
|
953
|
+
setActiveMenu("filter");
|
|
954
|
+
},
|
|
955
|
+
onHide: function onHide() {
|
|
956
|
+
if (activeMenu === "filter") setActiveMenu("");
|
|
957
|
+
}
|
|
958
|
+
}, /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_Menu.default, {
|
|
959
|
+
isActive: activeMenu === "filter"
|
|
960
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
942
961
|
className: "flex items-center justify-between w-full"
|
|
943
962
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
944
963
|
className: "context-item"
|
|
@@ -992,6 +1011,12 @@ var ContextMenu = function ContextMenu() {
|
|
|
992
1011
|
arrow: false,
|
|
993
1012
|
zIndex: 3000,
|
|
994
1013
|
appendTo: document.body,
|
|
1014
|
+
onShow: function onShow() {
|
|
1015
|
+
setActiveMenu("conditionFormat");
|
|
1016
|
+
},
|
|
1017
|
+
onHide: function onHide() {
|
|
1018
|
+
if (activeMenu === "conditionFormat") setActiveMenu("");
|
|
1019
|
+
},
|
|
995
1020
|
content: /*#__PURE__*/_react.default.createElement("div", {
|
|
996
1021
|
style: {
|
|
997
1022
|
minWidth: 220
|
|
@@ -1002,7 +1027,9 @@ var ContextMenu = function ContextMenu() {
|
|
|
1002
1027
|
})),
|
|
1003
1028
|
trigger: "mouseenter focus",
|
|
1004
1029
|
hideOnClick: false
|
|
1005
|
-
}, /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_Menu.default,
|
|
1030
|
+
}, /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_Menu.default, {
|
|
1031
|
+
isActive: activeMenu === "conditionFormat"
|
|
1032
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
1006
1033
|
className: "flex items-center justify-between w-full"
|
|
1007
1034
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
1008
1035
|
className: "flex items-center gap-2 context-item"
|
|
@@ -1038,7 +1065,7 @@ var ContextMenu = function ContextMenu() {
|
|
|
1038
1065
|
}), /*#__PURE__*/_react.default.createElement("p", null, "Clear formatting")));
|
|
1039
1066
|
}
|
|
1040
1067
|
return null;
|
|
1041
|
-
}, [context, setContext, refs.globalCache, rightclick, showAlert, showDialog, drag.noMulti, info.tipRowHeightLimit, info.tipColumnWidthLimit, generalDialog.partiallyError, generalDialog.readOnlyError, generalDialog.dataNullError]);
|
|
1068
|
+
}, [context, setContext, refs.globalCache, rightclick, showAlert, showDialog, drag.noMulti, info.tipRowHeightLimit, info.tipColumnWidthLimit, generalDialog.partiallyError, generalDialog.readOnlyError, generalDialog.dataNullError, activeMenu]);
|
|
1042
1069
|
(0, _react.useLayoutEffect)(function () {
|
|
1043
1070
|
var _a;
|
|
1044
1071
|
if (!containerRef.current) {
|
|
@@ -27,12 +27,10 @@ var RangeDialog = function RangeDialog() {
|
|
|
27
27
|
rangeTxt2 = _c[0],
|
|
28
28
|
setRangeTxt2 = _c[1];
|
|
29
29
|
var close = (0, _react.useCallback)(function () {
|
|
30
|
-
var _a;
|
|
31
30
|
setContext(function (ctx) {
|
|
32
31
|
ctx.rangeDialog.show = false;
|
|
33
32
|
ctx.rangeDialog.singleSelect = false;
|
|
34
33
|
});
|
|
35
|
-
(_a = document.getElementById("data-verification-button")) === null || _a === void 0 ? void 0 : _a.click();
|
|
36
34
|
if (!context.rangeDialog) return;
|
|
37
35
|
var rangeDialogType = context.rangeDialog.type;
|
|
38
36
|
if (rangeDialogType.indexOf("between") >= 0) {
|
|
@@ -101,7 +99,6 @@ var RangeDialog = function RangeDialog() {
|
|
|
101
99
|
minWidth: "80px"
|
|
102
100
|
},
|
|
103
101
|
onClick: function onClick() {
|
|
104
|
-
console.log("rangeTxt2", rangeTxt2);
|
|
105
102
|
setContext(function (ctx) {
|
|
106
103
|
ctx.rangeDialog.rangeTxt = rangeTxt2;
|
|
107
104
|
});
|
|
@@ -204,15 +204,6 @@ var ColumnHeader = function ColumnHeader() {
|
|
|
204
204
|
(0, _react.useEffect)(function () {
|
|
205
205
|
containerRef.current.scrollLeft = context.scrollLeft;
|
|
206
206
|
}, [context.scrollLeft]);
|
|
207
|
-
var _h = (0, _react.useState)(0),
|
|
208
|
-
hovered = _h[0],
|
|
209
|
-
setHovered = _h[1];
|
|
210
|
-
var onMouseMoveHideRight = (0, _react.useCallback)(function () {
|
|
211
|
-
setHovered(-21);
|
|
212
|
-
}, []);
|
|
213
|
-
var onMouseLeaveHideRight = (0, _react.useCallback)(function () {
|
|
214
|
-
setHovered(0);
|
|
215
|
-
}, []);
|
|
216
207
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
217
208
|
ref: containerRef,
|
|
218
209
|
className: "fortune-col-header",
|
|
@@ -234,10 +225,10 @@ var ColumnHeader = function ColumnHeader() {
|
|
|
234
225
|
}
|
|
235
226
|
}, hiddenPointers.map(function (item) {
|
|
236
227
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
237
|
-
className: "flex gap-4 cursor-pointer hide-btn align-center
|
|
228
|
+
className: "flex gap-4 cursor-pointer hide-btn align-center",
|
|
238
229
|
style: {
|
|
239
230
|
height: context.columnHeaderHeight - 12,
|
|
240
|
-
left: "".concat(item.left -
|
|
231
|
+
left: "".concat(item.left - 12, "px")
|
|
241
232
|
},
|
|
242
233
|
onClick: function onClick(e) {
|
|
243
234
|
return showColumn(e, item);
|
|
@@ -253,7 +244,18 @@ var ColumnHeader = function ColumnHeader() {
|
|
|
253
244
|
}, /*#__PURE__*/_react.default.createElement("path", {
|
|
254
245
|
d: "M0.164574 4.20629L3.54376 7.58548C3.7275 7.76922 4.04167 7.63909 4.04167 7.37924L4.04167 0.620865C4.04167 0.361018 3.7275 0.230885 3.54376 0.414625L0.164575 3.79381C0.0506717 3.90772 0.0506715 4.09239 0.164574 4.20629Z",
|
|
255
246
|
fill: "#363B3F"
|
|
256
|
-
})))
|
|
247
|
+
}))));
|
|
248
|
+
}), hiddenPointers.map(function (item) {
|
|
249
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
250
|
+
className: "flex gap-4 cursor-pointer hide-btn align-center",
|
|
251
|
+
style: {
|
|
252
|
+
height: context.columnHeaderHeight - 12,
|
|
253
|
+
left: "".concat(item.left + 6, "px")
|
|
254
|
+
},
|
|
255
|
+
onClick: function onClick(e) {
|
|
256
|
+
return showColumn(e, item);
|
|
257
|
+
}
|
|
258
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
257
259
|
className: ""
|
|
258
260
|
}, /*#__PURE__*/_react.default.createElement("svg", {
|
|
259
261
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -312,13 +314,12 @@ var ColumnHeader = function ColumnHeader() {
|
|
|
312
314
|
c1 = _a.c1,
|
|
313
315
|
c2 = _a.c2;
|
|
314
316
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
315
|
-
className: "fortune-col-header-selected",
|
|
317
|
+
className: "fortune-col-header-selected color-bg-tertiary",
|
|
316
318
|
key: i,
|
|
317
319
|
style: _lodash.default.assign({
|
|
318
320
|
left: col_pre,
|
|
319
321
|
width: col - col_pre - 1,
|
|
320
322
|
display: "block",
|
|
321
|
-
backgroundColor: "#EFC703",
|
|
322
323
|
mixBlendMode: "multiply"
|
|
323
324
|
}, (0, _fortuneCore.fixColumnStyleOverflowInFreeze)(context, c1, c2, (_b = refs.globalCache.freezen) === null || _b === void 0 ? void 0 : _b[context.currentSheetId]))
|
|
324
325
|
});
|
|
@@ -62,7 +62,7 @@ var FormulaSearch = function FormulaSearch(props) {
|
|
|
62
62
|
});
|
|
63
63
|
if (_lodash.default.isEmpty(context.functionCandidates) && _lodash.default.isEmpty(context.defaultCandidates)) return null;
|
|
64
64
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
65
|
-
className: "flex flex-col luckysheet-formula-search-c-p custom-scroll",
|
|
65
|
+
className: "flex color-border-default border flex-col luckysheet-formula-search-c-p custom-scroll",
|
|
66
66
|
id: "luckysheet-formula-search-c-p",
|
|
67
67
|
style: {
|
|
68
68
|
top: top
|
|
@@ -215,9 +215,9 @@ var RowHeader = function RowHeader() {
|
|
|
215
215
|
onContextMenu: onContextMenu
|
|
216
216
|
}, hiddenPointers.map(function (item) {
|
|
217
217
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
218
|
-
className: "flex flex-col gap-4 cursor-pointer align-center hide-btn-row",
|
|
218
|
+
className: "flex flex-col gap-4 cursor-pointer align-center hide-btn-row hide-btn",
|
|
219
219
|
style: {
|
|
220
|
-
top: "".concat(item.top -
|
|
220
|
+
top: "".concat(item.top - 16, "px"),
|
|
221
221
|
zIndex: 100
|
|
222
222
|
},
|
|
223
223
|
onClick: function onClick(e) {
|
|
@@ -274,13 +274,12 @@ var RowHeader = function RowHeader() {
|
|
|
274
274
|
r1 = _a.r1,
|
|
275
275
|
r2 = _a.r2;
|
|
276
276
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
277
|
-
className: "fortune-row-header-selected",
|
|
277
|
+
className: "fortune-row-header-selected color-bg-tertiary",
|
|
278
278
|
key: i,
|
|
279
279
|
style: _lodash.default.assign({
|
|
280
280
|
top: row_pre,
|
|
281
281
|
height: row - row_pre - 1,
|
|
282
282
|
display: "block",
|
|
283
|
-
backgroundColor: "#EFC703",
|
|
284
283
|
mixBlendMode: "multiply"
|
|
285
284
|
}, (0, _fortuneCore.fixRowStyleOverflowInFreeze)(context, r1, r2, (_b = refs.globalCache.freezen) === null || _b === void 0 ? void 0 : _b[context.currentSheetId]))
|
|
286
285
|
});
|
|
@@ -45,12 +45,10 @@
|
|
|
45
45
|
.fortune-row-header-selected {
|
|
46
46
|
position: absolute;
|
|
47
47
|
z-index: 10;
|
|
48
|
-
border-right: 1px solid #0188fb;
|
|
49
48
|
right: 0;
|
|
50
49
|
width: 100%;
|
|
51
50
|
margin-top: 2px;
|
|
52
51
|
display: none;
|
|
53
|
-
background-color: rgba(76, 76, 76, 0.1);
|
|
54
52
|
}
|
|
55
53
|
|
|
56
54
|
.fortune-col-header-wrap {
|
|
@@ -94,12 +92,10 @@
|
|
|
94
92
|
cursor: default;
|
|
95
93
|
position: absolute;
|
|
96
94
|
z-index: 10;
|
|
97
|
-
border-bottom: 1px solid #0188fb;
|
|
98
95
|
bottom: 0;
|
|
99
96
|
height: 100%;
|
|
100
97
|
margin-left: 0px;
|
|
101
98
|
display: none;
|
|
102
|
-
background-color: rgba(76, 76, 76, 0.1);
|
|
103
99
|
}
|
|
104
100
|
|
|
105
101
|
.fortune-left-top {
|
|
@@ -137,7 +133,7 @@
|
|
|
137
133
|
z-index: 14;
|
|
138
134
|
/*border:1px solid #fff;*/
|
|
139
135
|
margin: 0px 0 0 0px;
|
|
140
|
-
background: rgba(0, 80, 208, 0.15);
|
|
136
|
+
/* background: rgba(0, 80, 208, 0.15); */
|
|
141
137
|
display: none;
|
|
142
138
|
}
|
|
143
139
|
|
|
@@ -199,9 +195,9 @@
|
|
|
199
195
|
z-index: 15;
|
|
200
196
|
border: 2.5px solid #efc703;
|
|
201
197
|
margin: -1px 0 0 -1px;
|
|
202
|
-
background: rgba(1, 136, 251, 0.15);
|
|
203
198
|
display: none;
|
|
204
199
|
box-sizing: content-box;
|
|
200
|
+
background: rgba(239, 199, 5, 0.02);
|
|
205
201
|
}
|
|
206
202
|
|
|
207
203
|
.luckysheet-cs-inner-border {
|
|
@@ -1013,22 +1009,16 @@
|
|
|
1013
1009
|
}
|
|
1014
1010
|
|
|
1015
1011
|
.hide-btn {
|
|
1016
|
-
padding-
|
|
1017
|
-
padding-right: 3px;
|
|
1018
|
-
padding-top: 2px;
|
|
1012
|
+
padding-top: 1px;
|
|
1019
1013
|
position: absolute;
|
|
1020
|
-
|
|
1014
|
+
right: 5;
|
|
1021
1015
|
top: 5px;
|
|
1022
1016
|
z-index: 200;
|
|
1017
|
+
width: 9px;
|
|
1023
1018
|
}
|
|
1024
1019
|
|
|
1025
1020
|
.hide-btn:hover {
|
|
1026
|
-
|
|
1027
|
-
padding-right: 2px;
|
|
1028
|
-
padding-top: 1px;
|
|
1029
|
-
background-color: rgba(255, 255, 255, 1);
|
|
1030
|
-
border-radius: var(--border-radius-sm, 4px);
|
|
1031
|
-
border: 1px solid #BDC4C8;
|
|
1021
|
+
border: 1px solid #0188fb;
|
|
1032
1022
|
}
|
|
1033
1023
|
|
|
1034
1024
|
.rotate-row-icon {
|
|
@@ -1037,13 +1027,6 @@ border: 1px solid #BDC4C8;
|
|
|
1037
1027
|
|
|
1038
1028
|
.hide-btn-row {
|
|
1039
1029
|
position: absolute;
|
|
1040
|
-
|
|
1030
|
+
left: 4px;
|
|
1041
1031
|
z-index: 200;
|
|
1042
|
-
width: 12px;
|
|
1043
|
-
}
|
|
1044
|
-
|
|
1045
|
-
.hide-btn-row:hover {
|
|
1046
|
-
background-color: white;
|
|
1047
|
-
border: 1px solid #BDC4C8;
|
|
1048
|
-
border-radius: 4px;
|
|
1049
1032
|
}
|
|
@@ -58,7 +58,10 @@ var Combo = function Combo(_a) {
|
|
|
58
58
|
height: 16
|
|
59
59
|
})) : (/*#__PURE__*/_react.default.createElement("span", {
|
|
60
60
|
className: "fortune-toolbar-combo-text"
|
|
61
|
-
}, text !== undefined ? text : ""))
|
|
61
|
+
}, text !== undefined ? text : "")), /*#__PURE__*/_react.default.createElement(_ui.LucideIcon, {
|
|
62
|
+
className: "w-[16px] h-[16px]",
|
|
63
|
+
name: "ChevronDown"
|
|
64
|
+
})))) : (/*#__PURE__*/_react.default.createElement("span", null, iconId === "font-color" ? (/*#__PURE__*/_react.default.createElement(_ui.Tooltip, {
|
|
62
65
|
text: tooltip,
|
|
63
66
|
placement: "bottom"
|
|
64
67
|
}, /*#__PURE__*/_react.default.createElement(_ui.Button, {
|
|
@@ -34,7 +34,7 @@ var Option = exports.Option = function Option(_a) {
|
|
|
34
34
|
}, iconId && /*#__PURE__*/_react.default.createElement(_SVGIcon.default, {
|
|
35
35
|
name: iconId
|
|
36
36
|
}), /*#__PURE__*/_react.default.createElement("div", {
|
|
37
|
-
className: "fortuen-toolbar-text color-text-default text-body-sm"
|
|
37
|
+
className: "fortuen-toolbar-text color-text-default text-body-sm w-full"
|
|
38
38
|
}, children));
|
|
39
39
|
};
|
|
40
40
|
var _default = exports.default = Select;
|
|
@@ -141,14 +141,30 @@
|
|
|
141
141
|
|
|
142
142
|
.fortune-toolbar-combo-button {
|
|
143
143
|
font-size: 12px;
|
|
144
|
+
padding-top: 4px;
|
|
145
|
+
padding-bottom: 4px;
|
|
146
|
+
padding-left: 8px;
|
|
147
|
+
padding-right: 8px;
|
|
148
|
+
border-radius: 4px;
|
|
149
|
+
gap: 8px;
|
|
150
|
+
}
|
|
151
|
+
.fortune-toolbar-combo-button:hover {
|
|
152
|
+
background: hsl(var(--color-bg-default-hover));
|
|
144
153
|
}
|
|
145
154
|
|
|
146
155
|
.fortune-toolbar-select-option {
|
|
147
156
|
font-size: 12px;
|
|
148
157
|
min-width: 60px;
|
|
149
|
-
padding: 8px;
|
|
158
|
+
padding-left: 8px;
|
|
159
|
+
padding-right: 8px;
|
|
160
|
+
padding-top: 6px;
|
|
161
|
+
padding-bottom: 6px;
|
|
150
162
|
cursor: pointer;
|
|
151
163
|
user-select: none;
|
|
164
|
+
height: 32px;
|
|
165
|
+
display: flex;
|
|
166
|
+
align-items: center;
|
|
167
|
+
|
|
152
168
|
}
|
|
153
169
|
|
|
154
170
|
.fortune-toolbar-select-option:hover {
|
|
@@ -171,6 +187,10 @@
|
|
|
171
187
|
font-weight: 500;
|
|
172
188
|
font-size: 14px;
|
|
173
189
|
line-height: 20px;
|
|
190
|
+
max-width: 56px;
|
|
191
|
+
overflow: hidden;
|
|
192
|
+
text-overflow: ellipsis;
|
|
193
|
+
white-space: nowrap;
|
|
174
194
|
}
|
|
175
195
|
|
|
176
196
|
.fortune-toolbar-color-picker-item {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fileverse-dev/fortune-react",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.4",
|
|
4
4
|
"main": "lib/index.js",
|
|
5
5
|
"types": "lib/index.d.ts",
|
|
6
6
|
"module": "es/index.js",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"tsc": "tsc"
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@fileverse-dev/fortune-core": "1.2.
|
|
19
|
+
"@fileverse-dev/fortune-core": "1.2.4",
|
|
20
20
|
"@fileverse/ui": "^4.1.7-patch-21",
|
|
21
21
|
"@tippyjs/react": "^4.2.6",
|
|
22
22
|
"@types/regenerator-runtime": "^0.13.6",
|