@fileverse-dev/fortune-react 1.1.81 → 1.1.82
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/ContextMenu/index.js +32 -17
- package/es/components/FxEditor/index.css +0 -1
- package/es/components/SheetList/SheetListItem.js +5 -1
- package/es/components/SheetList/index.css +4 -3
- package/es/components/SheetOverlay/Icon.d.ts +5 -1
- package/es/components/SheetOverlay/Icon.js +64 -6
- package/es/components/SheetOverlay/LucideIcon.d.ts +5 -1
- package/es/components/SheetTab/SheetItem.js +13 -3
- package/es/components/SheetTab/index.css +18 -10
- package/es/components/SheetTab/index.js +27 -15
- package/es/components/ZoomControl/index.css +2 -0
- package/es/components/ZoomControl/index.js +14 -7
- package/lib/components/ContextMenu/index.js +32 -17
- package/lib/components/FxEditor/index.css +0 -1
- package/lib/components/SheetList/SheetListItem.js +5 -1
- package/lib/components/SheetList/index.css +4 -3
- package/lib/components/SheetOverlay/Icon.d.ts +5 -1
- package/lib/components/SheetOverlay/Icon.js +64 -6
- package/lib/components/SheetOverlay/LucideIcon.d.ts +5 -1
- package/lib/components/SheetTab/SheetItem.js +13 -3
- package/lib/components/SheetTab/index.css +18 -10
- package/lib/components/SheetTab/index.js +27 -15
- package/lib/components/ZoomControl/index.css +2 -0
- package/lib/components/ZoomControl/index.js +14 -7
- package/package.json +2 -2
|
@@ -131,6 +131,7 @@ import Menu from "./Menu";
|
|
|
131
131
|
import "tippy.js/dist/tippy.css";
|
|
132
132
|
import ConditionalFormat from "../ConditionFormat";
|
|
133
133
|
import SVGIcon from "../SVGIcon";
|
|
134
|
+
import { LucideIcon as LocalLucidIcon } from "../../components/SheetOverlay/LucideIcon";
|
|
134
135
|
var ContextMenu = function ContextMenu() {
|
|
135
136
|
var showDialog = useDialog().showDialog;
|
|
136
137
|
var containerRef = useRef(null);
|
|
@@ -398,53 +399,67 @@ var ContextMenu = function ContextMenu() {
|
|
|
398
399
|
}
|
|
399
400
|
}, /*#__PURE__*/React.createElement("div", {
|
|
400
401
|
className: "context-item"
|
|
401
|
-
}, /*#__PURE__*/React.createElement(
|
|
402
|
-
name: "
|
|
402
|
+
}, /*#__PURE__*/React.createElement(LocalLucidIcon, {
|
|
403
|
+
name: "AddColLeft"
|
|
403
404
|
}), /*#__PURE__*/React.createElement("div", null, "Insert column to the left")));
|
|
404
405
|
});
|
|
405
406
|
}
|
|
406
407
|
if (name === "insert-column-right") {
|
|
407
408
|
return (selection === null || selection === void 0 ? void 0 : selection.row_select) ? null : ["left"].map(function (dir) {
|
|
408
409
|
return /*#__PURE__*/React.createElement(Menu, {
|
|
409
|
-
key: "add-col-".concat(dir),
|
|
410
|
+
key: "add-col-right-".concat(dir),
|
|
410
411
|
onClick: function onClick() {
|
|
411
412
|
addRowColRightAvobe("column", "rightbottom");
|
|
412
413
|
}
|
|
413
414
|
}, /*#__PURE__*/React.createElement("div", {
|
|
414
415
|
className: "context-item"
|
|
415
|
-
}, /*#__PURE__*/React.createElement(
|
|
416
|
-
name: "
|
|
417
|
-
}), /*#__PURE__*/React.createElement("div", null, "Insert column to the
|
|
416
|
+
}, /*#__PURE__*/React.createElement(LocalLucidIcon, {
|
|
417
|
+
name: "AddColRight"
|
|
418
|
+
}), /*#__PURE__*/React.createElement("div", null, "Insert column to the left")));
|
|
418
419
|
});
|
|
419
420
|
}
|
|
420
|
-
if (name === "insert-
|
|
421
|
-
return (selection === null || selection === void 0 ? void 0 : selection.
|
|
421
|
+
if (name === "insert-column-right") {
|
|
422
|
+
return (selection === null || selection === void 0 ? void 0 : selection.row_select) ? null : ["left"].map(function (dir) {
|
|
422
423
|
return /*#__PURE__*/React.createElement(Menu, {
|
|
423
|
-
key: "add-
|
|
424
|
+
key: "add-col-right-".concat(dir),
|
|
424
425
|
onClick: function onClick() {
|
|
425
|
-
addRowColRightAvobe("
|
|
426
|
+
addRowColRightAvobe("column", "rightbottom");
|
|
426
427
|
}
|
|
427
428
|
}, /*#__PURE__*/React.createElement("div", {
|
|
428
429
|
className: "context-item"
|
|
429
|
-
}, /*#__PURE__*/React.createElement(
|
|
430
|
-
name: "
|
|
431
|
-
}), /*#__PURE__*/React.createElement("div", null, "Insert
|
|
430
|
+
}, /*#__PURE__*/React.createElement(LocalLucidIcon, {
|
|
431
|
+
name: "AddColRight"
|
|
432
|
+
}), /*#__PURE__*/React.createElement("div", null, "Insert column to the left")));
|
|
432
433
|
});
|
|
433
434
|
}
|
|
434
435
|
if (name === "insert-row-above") {
|
|
435
|
-
return (selection === null || selection === void 0 ? void 0 : selection.
|
|
436
|
+
return (selection === null || selection === void 0 ? void 0 : selection.row_select) ? null : ["left"].map(function (dir) {
|
|
436
437
|
return /*#__PURE__*/React.createElement(Menu, {
|
|
437
|
-
key: "add-row-".concat(dir),
|
|
438
|
+
key: "add-row-above-".concat(dir),
|
|
438
439
|
onClick: function onClick() {
|
|
439
440
|
addRowColRightAvobe("row", "lefttop");
|
|
440
441
|
}
|
|
441
442
|
}, /*#__PURE__*/React.createElement("div", {
|
|
442
443
|
className: "context-item"
|
|
443
|
-
}, /*#__PURE__*/React.createElement(
|
|
444
|
-
name: "
|
|
444
|
+
}, /*#__PURE__*/React.createElement(LocalLucidIcon, {
|
|
445
|
+
name: "AddRowAboveLocal"
|
|
445
446
|
}), /*#__PURE__*/React.createElement("div", null, "Insert row above")));
|
|
446
447
|
});
|
|
447
448
|
}
|
|
449
|
+
if (name === "insert-row") {
|
|
450
|
+
return (selection === null || selection === void 0 ? void 0 : selection.row_select) ? null : ["left"].map(function (dir) {
|
|
451
|
+
return /*#__PURE__*/React.createElement(Menu, {
|
|
452
|
+
key: "add-row-below-".concat(dir),
|
|
453
|
+
onClick: function onClick() {
|
|
454
|
+
addRowColRightAvobe("row", "rightbottom");
|
|
455
|
+
}
|
|
456
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
457
|
+
className: "context-item"
|
|
458
|
+
}, /*#__PURE__*/React.createElement(LocalLucidIcon, {
|
|
459
|
+
name: "AddRowBelowLocal"
|
|
460
|
+
}), /*#__PURE__*/React.createElement("div", null, "Insert row below")));
|
|
461
|
+
});
|
|
462
|
+
}
|
|
448
463
|
if (name === "delete-column") {
|
|
449
464
|
return (selection === null || selection === void 0 ? void 0 : selection.column_select) && (/*#__PURE__*/React.createElement(Menu, {
|
|
450
465
|
key: "delete-col",
|
|
@@ -65,7 +65,11 @@ var SheetListItem = function SheetListItem(_a) {
|
|
|
65
65
|
style: {
|
|
66
66
|
background: sheet.color
|
|
67
67
|
}
|
|
68
|
-
})),
|
|
68
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
69
|
+
style: {
|
|
70
|
+
marginLeft: "8px"
|
|
71
|
+
}
|
|
72
|
+
}, sheet.name)), sheet.hide && /*#__PURE__*/React.createElement(SheetHiddenButton, {
|
|
69
73
|
sheet: sheet
|
|
70
74
|
}));
|
|
71
75
|
};
|
|
@@ -23,11 +23,12 @@
|
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
.fortune-sheet-list-item-name .luckysheet-sheets-list-item-color {
|
|
26
|
-
width:
|
|
27
|
-
height:
|
|
26
|
+
width: 28%;
|
|
27
|
+
height: 30%;
|
|
28
28
|
position: absolute;
|
|
29
|
-
bottom:
|
|
29
|
+
bottom: 11px;
|
|
30
30
|
left: -6px;
|
|
31
|
+
border-radius: 20px;
|
|
31
32
|
}
|
|
32
33
|
|
|
33
34
|
.fortune-sheet-list :hover {
|
|
@@ -11,7 +11,11 @@ export declare const LucideIcons: {
|
|
|
11
11
|
Farcaster: ({ width, height, ...props }: LucideIconProps) => React.JSX.Element;
|
|
12
12
|
Warpcast: ({ width, height, ...props }: LucideIconProps) => React.JSX.Element;
|
|
13
13
|
DSheetTextDisabled: ({ width, height, ...props }: LucideIconProps) => React.JSX.Element;
|
|
14
|
-
|
|
14
|
+
AddColLeft: () => React.JSX.Element;
|
|
15
|
+
AddColRight: () => React.JSX.Element;
|
|
16
|
+
AddRowBelowLocal: () => React.JSX.Element;
|
|
17
|
+
AddRowAboveLocal: () => React.JSX.Element;
|
|
18
|
+
DSheetOnlyText: () => React.JSX.Element;
|
|
15
19
|
Orb: ({ width, height, ...props }: LucideIconProps) => React.JSX.Element;
|
|
16
20
|
Lens: ({ width, height, ...props }: LucideIconProps) => React.JSX.Element;
|
|
17
21
|
Hey: ({ width, height, ...props }: LucideIconProps) => React.JSX.Element;
|
|
@@ -304,12 +304,70 @@ export var LucideIcons = {
|
|
|
304
304
|
stroke: "transparent"
|
|
305
305
|
}));
|
|
306
306
|
},
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
width
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
307
|
+
AddColLeft: function AddColLeft() {
|
|
308
|
+
return /*#__PURE__*/React.createElement("svg", {
|
|
309
|
+
width: "18",
|
|
310
|
+
height: "18",
|
|
311
|
+
viewBox: "0 0 18 18",
|
|
312
|
+
fill: "none",
|
|
313
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
314
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
315
|
+
fillRule: "evenodd",
|
|
316
|
+
clipRule: "evenodd",
|
|
317
|
+
d: "M14.25 0.75C15.4926 0.75 16.5 1.75736 16.5 3V15C16.5 16.2426 15.4926 17.25 14.25 17.25H11.25C10.0074 17.25 9 16.2426 9 15V3C9 1.75736 10.0074 0.75 11.25 0.75H14.25ZM11.25 2.25C10.8358 2.25 10.5 2.58579 10.5 3V15L10.5037 15.0769C10.5422 15.455 10.8617 15.75 11.25 15.75H14.25L14.3269 15.7463C14.6797 15.7104 14.9604 15.4297 14.9963 15.0769L15 15V3C15 2.61174 14.705 2.29216 14.3269 2.25366L14.25 2.25H11.25Z",
|
|
318
|
+
fill: "#363B3F"
|
|
319
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
320
|
+
d: "M4.5 6C4.91421 6 5.25 6.33579 5.25 6.75V8.25H6.75C7.16421 8.25 7.5 8.58579 7.5 9C7.5 9.41421 7.16421 9.75 6.75 9.75H5.25V11.25C5.25 11.6642 4.91421 12 4.5 12C4.08579 12 3.75 11.6642 3.75 11.25V9.75H2.25C1.83579 9.75 1.5 9.41421 1.5 9C1.5 8.58579 1.83579 8.25 2.25 8.25H3.75V6.75C3.75 6.33579 4.08579 6 4.5 6Z",
|
|
321
|
+
fill: "#363B3F"
|
|
322
|
+
}));
|
|
323
|
+
},
|
|
324
|
+
AddColRight: function AddColRight() {
|
|
325
|
+
return /*#__PURE__*/React.createElement("svg", {
|
|
326
|
+
width: "18",
|
|
327
|
+
height: "18",
|
|
328
|
+
viewBox: "0 0 18 18",
|
|
329
|
+
fill: "none",
|
|
330
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
331
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
332
|
+
fillRule: "evenodd",
|
|
333
|
+
clipRule: "evenodd",
|
|
334
|
+
d: "M5.75 0.75C6.99264 0.75 8 1.75736 8 3V15C8 16.2426 6.99264 17.25 5.75 17.25H2.75C1.50736 17.25 0.5 16.2426 0.5 15V3C0.5 1.75736 1.50736 0.75 2.75 0.75H5.75ZM2.75 2.25C2.33579 2.25 2 2.58579 2 3V15L2.00366 15.0769C2.04216 15.455 2.36174 15.75 2.75 15.75H5.75L5.8269 15.7463C6.17972 15.7104 6.46041 15.4297 6.49634 15.0769L6.5 15V3C6.5 2.61174 6.205 2.29216 5.8269 2.25366L5.75 2.25H2.75Z",
|
|
335
|
+
fill: "#363B3F"
|
|
336
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
337
|
+
d: "M12.5 6C12.9142 6 13.25 6.33579 13.25 6.75V8.25H14.75C15.1642 8.25 15.5 8.58579 15.5 9C15.5 9.41421 15.1642 9.75 14.75 9.75H13.25V11.25C13.25 11.6642 12.9142 12 12.5 12C12.0858 12 11.75 11.6642 11.75 11.25V9.75H10.25C9.83579 9.75 9.5 9.41421 9.5 9C9.5 8.58579 9.83579 8.25 10.25 8.25H11.75V6.75C11.75 6.33579 12.0858 6 12.5 6Z",
|
|
338
|
+
fill: "#363B3F"
|
|
339
|
+
}));
|
|
340
|
+
},
|
|
341
|
+
AddRowBelowLocal: function AddRowBelowLocal() {
|
|
342
|
+
return /*#__PURE__*/React.createElement("svg", {
|
|
343
|
+
width: "18",
|
|
344
|
+
height: "18",
|
|
345
|
+
viewBox: "0 0 18 18",
|
|
346
|
+
fill: "none",
|
|
347
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
348
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
349
|
+
d: "M9 10.5C9.41421 10.5 9.75 10.8358 9.75 11.25V12.75H11.25C11.6642 12.75 12 13.0858 12 13.5C12 13.9142 11.6642 14.25 11.25 14.25H9.75V15.75C9.75 16.1642 9.41421 16.5 9 16.5C8.58579 16.5 8.25 16.1642 8.25 15.75V14.25H6.75C6.33579 14.25 6 13.9142 6 13.5C6 13.0858 6.33579 12.75 6.75 12.75H8.25V11.25C8.25 10.8358 8.58579 10.5 9 10.5ZM15 3.75C15 3.33579 14.6642 3 14.25 3H3.75C3.33579 3 3 3.33579 3 3.75V6.75C3 7.16421 3.33579 7.5 3.75 7.5H14.25C14.6642 7.5 15 7.16421 15 6.75V3.75ZM16.5 6.75C16.5 7.99264 15.4926 9 14.25 9H3.75C2.50736 9 1.5 7.99264 1.5 6.75V3.75C1.5 2.50736 2.50736 1.5 3.75 1.5H14.25C15.4926 1.5 16.5 2.50736 16.5 3.75V6.75Z",
|
|
350
|
+
fill: "#363B3F"
|
|
351
|
+
}));
|
|
352
|
+
},
|
|
353
|
+
AddRowAboveLocal: function AddRowAboveLocal() {
|
|
354
|
+
return /*#__PURE__*/React.createElement("svg", {
|
|
355
|
+
width: "24",
|
|
356
|
+
height: "24",
|
|
357
|
+
viewBox: "0 0 24 24",
|
|
358
|
+
fill: "none",
|
|
359
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
360
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
361
|
+
d: "M12 2C12.5523 2 13 2.44772 13 3V5H15C15.5523 5 16 5.44772 16 6C16 6.55228 15.5523 7 15 7H13V9C13 9.55228 12.5523 10 12 10C11.4477 10 11 9.55228 11 9V7H9C8.44772 7 8 6.55228 8 6C8 5.44772 8.44772 5 9 5H11V3C11 2.44772 11.4477 2 12 2Z",
|
|
362
|
+
fill: "#363B3F"
|
|
363
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
364
|
+
fillRule: "evenodd",
|
|
365
|
+
clipRule: "evenodd",
|
|
366
|
+
d: "M22 19C22 20.6569 20.6569 22 19 22H5C3.34315 22 2 20.6569 2 19V15C2 13.3431 3.34315 12 5 12H19C20.6569 12 22 13.3431 22 15V19ZM20 15C20 14.4477 19.5523 14 19 14H5C4.44772 14 4 14.4477 4 15V19C4 19.5523 4.44772 20 5 20H19C19.5523 20 20 19.5523 20 19V15Z",
|
|
367
|
+
fill: "#363B3F"
|
|
368
|
+
}));
|
|
369
|
+
},
|
|
370
|
+
DSheetOnlyText: function DSheetOnlyText() {
|
|
313
371
|
return /*#__PURE__*/React.createElement("svg", {
|
|
314
372
|
width: "20",
|
|
315
373
|
height: "20",
|
|
@@ -10,7 +10,11 @@ export declare const UltimateIcons: {
|
|
|
10
10
|
Farcaster: ({ width, height, ...props }: LucideIconProps) => React.JSX.Element;
|
|
11
11
|
Warpcast: ({ width, height, ...props }: LucideIconProps) => React.JSX.Element;
|
|
12
12
|
DSheetTextDisabled: ({ width, height, ...props }: LucideIconProps) => React.JSX.Element;
|
|
13
|
-
|
|
13
|
+
AddColLeft: () => React.JSX.Element;
|
|
14
|
+
AddColRight: () => React.JSX.Element;
|
|
15
|
+
AddRowBelowLocal: () => React.JSX.Element;
|
|
16
|
+
AddRowAboveLocal: () => React.JSX.Element;
|
|
17
|
+
DSheetOnlyText: () => React.JSX.Element;
|
|
14
18
|
Orb: ({ width, height, ...props }: LucideIconProps) => React.JSX.Element;
|
|
15
19
|
Lens: ({ width, height, ...props }: LucideIconProps) => React.JSX.Element;
|
|
16
20
|
Hey: ({ width, height, ...props }: LucideIconProps) => React.JSX.Element;
|
|
@@ -170,7 +170,13 @@ var SheetItem = function SheetItem(_a) {
|
|
|
170
170
|
borderLeft: dragOver ? "2px solid #0188fb" : "",
|
|
171
171
|
display: sheet.hide === 1 ? "none" : ""
|
|
172
172
|
}
|
|
173
|
-
}, /*#__PURE__*/React.createElement("
|
|
173
|
+
}, editing === false && (/*#__PURE__*/React.createElement("p", {
|
|
174
|
+
className: "luckysheet-sheets-item-name",
|
|
175
|
+
onDoubleClick: function onDoubleClick() {
|
|
176
|
+
if (context.isFlvReadOnly) return;
|
|
177
|
+
setEditing(true);
|
|
178
|
+
}
|
|
179
|
+
}, sheet.name)), editing && (/*#__PURE__*/React.createElement("span", {
|
|
174
180
|
className: "luckysheet-sheets-item-name",
|
|
175
181
|
spellCheck: "false",
|
|
176
182
|
suppressContentEditableWarning: true,
|
|
@@ -185,8 +191,12 @@ var SheetItem = function SheetItem(_a) {
|
|
|
185
191
|
style: dragOver ? {
|
|
186
192
|
pointerEvents: "none"
|
|
187
193
|
} : {}
|
|
188
|
-
}, sheet.name), /*#__PURE__*/React.createElement("span", {
|
|
194
|
+
}, sheet.name)), /*#__PURE__*/React.createElement("span", {
|
|
189
195
|
className: "luckysheet-sheets-item-function",
|
|
196
|
+
style: {
|
|
197
|
+
marginRight: "4px",
|
|
198
|
+
marginLeft: "4px"
|
|
199
|
+
},
|
|
190
200
|
onClick: function onClick(e) {
|
|
191
201
|
if (isDropPlaceholder || context.allowEdit === false) return;
|
|
192
202
|
var rect = refs.workbookContainer.current.getBoundingClientRect();
|
|
@@ -209,7 +219,7 @@ var SheetItem = function SheetItem(_a) {
|
|
|
209
219
|
name: "downArrow",
|
|
210
220
|
width: 12,
|
|
211
221
|
style: {
|
|
212
|
-
fill: "
|
|
222
|
+
fill: "#363B3F"
|
|
213
223
|
}
|
|
214
224
|
})), !!sheet.color && (/*#__PURE__*/React.createElement("div", {
|
|
215
225
|
className: "luckysheet-sheets-item-color",
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
box-sizing: border-box;
|
|
4
4
|
color: #444;
|
|
5
5
|
height: 36px;
|
|
6
|
-
padding: 0 30px 0
|
|
6
|
+
padding: 0 30px 0 8px;
|
|
7
7
|
margin: 0;
|
|
8
8
|
-webkit-touch-callout: none;
|
|
9
9
|
transition: 0.3s ease all;
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
padding: 0px 0px;
|
|
44
44
|
margin-left: 0px;
|
|
45
45
|
position: relative;
|
|
46
|
-
max-width:
|
|
46
|
+
max-width: 75%;
|
|
47
47
|
vertical-align: bottom;
|
|
48
48
|
display: inline-block;
|
|
49
49
|
}
|
|
@@ -74,7 +74,8 @@
|
|
|
74
74
|
.fortune-sheettab-container .fortune-sheettab-container-c {
|
|
75
75
|
padding: 0px 0px;
|
|
76
76
|
margin-left: 0px;
|
|
77
|
-
overflow:
|
|
77
|
+
overflow: scroll;
|
|
78
|
+
scrollbar-width: none;
|
|
78
79
|
white-space: nowrap;
|
|
79
80
|
position: relative;
|
|
80
81
|
max-width: 100%;
|
|
@@ -141,6 +142,14 @@
|
|
|
141
142
|
padding: 0px 3px;
|
|
142
143
|
}
|
|
143
144
|
|
|
145
|
+
.luckysheet-sheets-item-name {
|
|
146
|
+
display: inline-block;
|
|
147
|
+
max-width: 340px;
|
|
148
|
+
overflow: hidden;
|
|
149
|
+
white-space: nowrap;
|
|
150
|
+
font-weight: 500;
|
|
151
|
+
}
|
|
152
|
+
|
|
144
153
|
.luckysheet-sheets-item-color {
|
|
145
154
|
width: 100%;
|
|
146
155
|
height: 10%;
|
|
@@ -192,8 +201,8 @@
|
|
|
192
201
|
display: flex;
|
|
193
202
|
align-items: center;
|
|
194
203
|
justify-content: center;
|
|
195
|
-
height:
|
|
196
|
-
width:
|
|
204
|
+
height: 30px;
|
|
205
|
+
width: 30px;
|
|
197
206
|
background-color: hsl(var(--color-bg-secondary)) !important;
|
|
198
207
|
}
|
|
199
208
|
|
|
@@ -201,8 +210,8 @@
|
|
|
201
210
|
display: flex;
|
|
202
211
|
align-items: center;
|
|
203
212
|
justify-content: center;
|
|
204
|
-
height:
|
|
205
|
-
width:
|
|
213
|
+
height: 30px;
|
|
214
|
+
width: 30px;
|
|
206
215
|
background-color: hsl(var(--color-button-secondary-hover)) !important;
|
|
207
216
|
}
|
|
208
217
|
|
|
@@ -217,15 +226,14 @@
|
|
|
217
226
|
.fortune-sheettab-scroll {
|
|
218
227
|
display: flex;
|
|
219
228
|
align-items: center;
|
|
220
|
-
|
|
221
|
-
height: 29px;
|
|
229
|
+
height: 30px;
|
|
222
230
|
cursor: pointer;
|
|
223
231
|
}
|
|
224
232
|
|
|
225
233
|
.fortune-sheettab-placeholder {
|
|
226
234
|
display: inline-block;
|
|
227
235
|
width: 30px;
|
|
228
|
-
height:
|
|
236
|
+
height: 30px;
|
|
229
237
|
line-height: 29px;
|
|
230
238
|
vertical-align: middle;
|
|
231
239
|
}
|
|
@@ -170,7 +170,7 @@ var SheetTab = function SheetTab() {
|
|
|
170
170
|
onClick: onAddSheetClick,
|
|
171
171
|
elevation: 1,
|
|
172
172
|
icon: "Plus",
|
|
173
|
-
size: "
|
|
173
|
+
size: "sm",
|
|
174
174
|
variant: "secondary"
|
|
175
175
|
})), context.allowEdit && (/*#__PURE__*/React.createElement("div", {
|
|
176
176
|
className: "sheet-list-container"
|
|
@@ -189,14 +189,9 @@ var SheetTab = function SheetTab() {
|
|
|
189
189
|
className: "fortune-sheettab-button border-none shadow-none",
|
|
190
190
|
elevation: 1,
|
|
191
191
|
icon: "Menu",
|
|
192
|
-
size: "
|
|
192
|
+
size: "sm",
|
|
193
193
|
variant: "secondary"
|
|
194
194
|
})))), /*#__PURE__*/React.createElement("div", {
|
|
195
|
-
id: "luckysheet-sheets-m",
|
|
196
|
-
className: "luckysheet-sheets-m lucky-button-custom"
|
|
197
|
-
}, /*#__PURE__*/React.createElement("i", {
|
|
198
|
-
className: "iconfont luckysheet-iconfont-caidan2"
|
|
199
|
-
})), /*#__PURE__*/React.createElement("div", {
|
|
200
195
|
className: "fortune-sheettab-container",
|
|
201
196
|
id: "fortune-sheettab-container"
|
|
202
197
|
}, !isShowBoundary && /*#__PURE__*/React.createElement("div", {
|
|
@@ -212,8 +207,6 @@ var SheetTab = function SheetTab() {
|
|
|
212
207
|
key: sheet.id,
|
|
213
208
|
sheet: sheet
|
|
214
209
|
});
|
|
215
|
-
})), isShowBoundary && isShowScrollBtn && (/*#__PURE__*/React.createElement("div", {
|
|
216
|
-
className: "boundary boundary-right"
|
|
217
210
|
}))), isShowScrollBtn && (/*#__PURE__*/React.createElement("div", {
|
|
218
211
|
id: "fortune-sheettab-leftscroll",
|
|
219
212
|
className: "fortune-sheettab-scroll",
|
|
@@ -230,7 +223,7 @@ var SheetTab = function SheetTab() {
|
|
|
230
223
|
},
|
|
231
224
|
elevation: 1,
|
|
232
225
|
icon: "ChevronLeft",
|
|
233
|
-
size: "
|
|
226
|
+
size: "sm",
|
|
234
227
|
variant: "secondary"
|
|
235
228
|
}))), isShowScrollBtn && (/*#__PURE__*/React.createElement("div", {
|
|
236
229
|
id: "fortune-sheettab-rightscroll",
|
|
@@ -248,11 +241,11 @@ var SheetTab = function SheetTab() {
|
|
|
248
241
|
},
|
|
249
242
|
elevation: 1,
|
|
250
243
|
icon: "ChevronRight",
|
|
251
|
-
size: "
|
|
244
|
+
size: "sm",
|
|
252
245
|
variant: "secondary"
|
|
253
246
|
})))), /*#__PURE__*/React.createElement("div", {
|
|
254
247
|
className: "fortune-sheet-area-right"
|
|
255
|
-
}, statsFilter.length === 6 && (/*#__PURE__*/React.createElement(Popover, null, /*#__PURE__*/React.createElement(PopoverTrigger, {
|
|
248
|
+
}, statsFilter.length === 6 && calInfo.count > 1 && (/*#__PURE__*/React.createElement(Popover, null, /*#__PURE__*/React.createElement(PopoverTrigger, {
|
|
256
249
|
className: "p-0 m-0 mr-2"
|
|
257
250
|
}, /*#__PURE__*/React.createElement(Button, {
|
|
258
251
|
variant: "ghost",
|
|
@@ -260,9 +253,28 @@ var SheetTab = function SheetTab() {
|
|
|
260
253
|
style: {
|
|
261
254
|
height: "24px !important"
|
|
262
255
|
}
|
|
263
|
-
},
|
|
264
|
-
className: "
|
|
265
|
-
},
|
|
256
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
257
|
+
className: "flex items-center"
|
|
258
|
+
}, /*#__PURE__*/React.createElement("p", {
|
|
259
|
+
className: "text-body-sm",
|
|
260
|
+
style: {
|
|
261
|
+
fontWeight: "500",
|
|
262
|
+
marginRight: "8px"
|
|
263
|
+
}
|
|
264
|
+
}, STATS_LABELS[selectedStat], ":", " ", calInfo[selectedStat]), /*#__PURE__*/React.createElement("svg", {
|
|
265
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
266
|
+
width: "18",
|
|
267
|
+
height: "18",
|
|
268
|
+
viewBox: "0 0 24 24",
|
|
269
|
+
fill: "none",
|
|
270
|
+
stroke: "currentColor",
|
|
271
|
+
strokeWidth: "2",
|
|
272
|
+
strokeLinecap: "round",
|
|
273
|
+
strokeLinejoin: "round",
|
|
274
|
+
className: "lucide lucide-chevron-down-icon lucide-chevron-down"
|
|
275
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
276
|
+
d: "m6 9 6 6 6-6"
|
|
277
|
+
}))))), /*#__PURE__*/React.createElement(PopoverContent, {
|
|
266
278
|
align: "end",
|
|
267
279
|
alignOffset: 0,
|
|
268
280
|
className: "stats-content color-border-default shadow-elevation-3",
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React, { useCallback, useContext, useRef, useState, useEffect } from "react";
|
|
2
2
|
import { MAX_ZOOM_RATIO, MIN_ZOOM_RATIO, getSheetIndex } from "@fileverse-dev/fortune-core";
|
|
3
|
+
import { useMediaQuery } from "usehooks-ts";
|
|
3
4
|
import { IconButton } from "@fileverse/ui";
|
|
4
5
|
import WorkbookContext from "../../context";
|
|
5
6
|
import { useOutsideClick } from "../../hooks/useOutsideClick";
|
|
@@ -40,6 +41,9 @@ var ZoomControl = function ZoomControl() {
|
|
|
40
41
|
var _b = useState(false),
|
|
41
42
|
radioMenuOpen = _b[0],
|
|
42
43
|
setRadioMenuOpen = _b[1];
|
|
44
|
+
var isMobile = useMediaQuery("(max-width: 780px)", {
|
|
45
|
+
defaultValue: true
|
|
46
|
+
});
|
|
43
47
|
useOutsideClick(menuRef, function () {
|
|
44
48
|
setRadioMenuOpen(false);
|
|
45
49
|
}, []);
|
|
@@ -76,7 +80,7 @@ var ZoomControl = function ZoomControl() {
|
|
|
76
80
|
}, [context.zoomRatio]);
|
|
77
81
|
return /*#__PURE__*/React.createElement("div", {
|
|
78
82
|
className: "fortune-zoom-container"
|
|
79
|
-
}, /*#__PURE__*/React.createElement(IconButton, {
|
|
83
|
+
}, !isMobile && (/*#__PURE__*/React.createElement(IconButton, {
|
|
80
84
|
className: "fortune-sheettab-button border-none shadow-none",
|
|
81
85
|
onClick: function onClick(e) {
|
|
82
86
|
zoomTo(context.zoomRatio - 0.1);
|
|
@@ -84,16 +88,19 @@ var ZoomControl = function ZoomControl() {
|
|
|
84
88
|
},
|
|
85
89
|
elevation: 1,
|
|
86
90
|
icon: "Minus",
|
|
87
|
-
size: "
|
|
91
|
+
size: "sm",
|
|
88
92
|
variant: "secondary"
|
|
89
|
-
}), /*#__PURE__*/React.createElement("div", {
|
|
93
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
90
94
|
className: "fortune-zoom-ratio"
|
|
91
95
|
}, /*#__PURE__*/React.createElement("div", {
|
|
92
96
|
className: "fortune-zoom-ratio-current fortune-zoom-button",
|
|
93
97
|
onClick: function onClick() {
|
|
94
98
|
return setRadioMenuOpen(true);
|
|
95
99
|
},
|
|
96
|
-
tabIndex: 0
|
|
100
|
+
tabIndex: 0,
|
|
101
|
+
style: {
|
|
102
|
+
fontWeight: "500"
|
|
103
|
+
}
|
|
97
104
|
}, (context.zoomRatio * 100).toFixed(0), "%"), radioMenuOpen && (/*#__PURE__*/React.createElement("div", {
|
|
98
105
|
className: "fortune-zoom-ratio-menu",
|
|
99
106
|
ref: menuRef
|
|
@@ -109,7 +116,7 @@ var ZoomControl = function ZoomControl() {
|
|
|
109
116
|
}, /*#__PURE__*/React.createElement("div", {
|
|
110
117
|
className: "fortune-zoom-ratio-text"
|
|
111
118
|
}, v.text));
|
|
112
|
-
})))), /*#__PURE__*/React.createElement(IconButton, {
|
|
119
|
+
})))), !isMobile && (/*#__PURE__*/React.createElement(IconButton, {
|
|
113
120
|
className: "fortune-sheettab-button border-none shadow-none",
|
|
114
121
|
onClick: function onClick(e) {
|
|
115
122
|
zoomTo(context.zoomRatio + 0.1);
|
|
@@ -117,8 +124,8 @@ var ZoomControl = function ZoomControl() {
|
|
|
117
124
|
},
|
|
118
125
|
elevation: 1,
|
|
119
126
|
icon: "Plus",
|
|
120
|
-
size: "
|
|
127
|
+
size: "sm",
|
|
121
128
|
variant: "secondary"
|
|
122
|
-
}));
|
|
129
|
+
})));
|
|
123
130
|
};
|
|
124
131
|
export default ZoomControl;
|
|
@@ -23,6 +23,7 @@ var _Menu = _interopRequireDefault(require("./Menu"));
|
|
|
23
23
|
require("tippy.js/dist/tippy.css");
|
|
24
24
|
var _ConditionFormat = _interopRequireDefault(require("../ConditionFormat"));
|
|
25
25
|
var _SVGIcon = _interopRequireDefault(require("../SVGIcon"));
|
|
26
|
+
var _LucideIcon = require("../../components/SheetOverlay/LucideIcon");
|
|
26
27
|
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); }
|
|
27
28
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
28
29
|
var __awaiter = void 0 && (void 0).__awaiter || function (thisArg, _arguments, P, generator) {
|
|
@@ -407,53 +408,67 @@ var ContextMenu = function ContextMenu() {
|
|
|
407
408
|
}
|
|
408
409
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
409
410
|
className: "context-item"
|
|
410
|
-
}, /*#__PURE__*/_react.default.createElement(
|
|
411
|
-
name: "
|
|
411
|
+
}, /*#__PURE__*/_react.default.createElement(_LucideIcon.LucideIcon, {
|
|
412
|
+
name: "AddColLeft"
|
|
412
413
|
}), /*#__PURE__*/_react.default.createElement("div", null, "Insert column to the left")));
|
|
413
414
|
});
|
|
414
415
|
}
|
|
415
416
|
if (name === "insert-column-right") {
|
|
416
417
|
return (selection === null || selection === void 0 ? void 0 : selection.row_select) ? null : ["left"].map(function (dir) {
|
|
417
418
|
return /*#__PURE__*/_react.default.createElement(_Menu.default, {
|
|
418
|
-
key: "add-col-".concat(dir),
|
|
419
|
+
key: "add-col-right-".concat(dir),
|
|
419
420
|
onClick: function onClick() {
|
|
420
421
|
addRowColRightAvobe("column", "rightbottom");
|
|
421
422
|
}
|
|
422
423
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
423
424
|
className: "context-item"
|
|
424
|
-
}, /*#__PURE__*/_react.default.createElement(
|
|
425
|
-
name: "
|
|
426
|
-
}), /*#__PURE__*/_react.default.createElement("div", null, "Insert column to the
|
|
425
|
+
}, /*#__PURE__*/_react.default.createElement(_LucideIcon.LucideIcon, {
|
|
426
|
+
name: "AddColRight"
|
|
427
|
+
}), /*#__PURE__*/_react.default.createElement("div", null, "Insert column to the left")));
|
|
427
428
|
});
|
|
428
429
|
}
|
|
429
|
-
if (name === "insert-
|
|
430
|
-
return (selection === null || selection === void 0 ? void 0 : selection.
|
|
430
|
+
if (name === "insert-column-right") {
|
|
431
|
+
return (selection === null || selection === void 0 ? void 0 : selection.row_select) ? null : ["left"].map(function (dir) {
|
|
431
432
|
return /*#__PURE__*/_react.default.createElement(_Menu.default, {
|
|
432
|
-
key: "add-
|
|
433
|
+
key: "add-col-right-".concat(dir),
|
|
433
434
|
onClick: function onClick() {
|
|
434
|
-
addRowColRightAvobe("
|
|
435
|
+
addRowColRightAvobe("column", "rightbottom");
|
|
435
436
|
}
|
|
436
437
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
437
438
|
className: "context-item"
|
|
438
|
-
}, /*#__PURE__*/_react.default.createElement(
|
|
439
|
-
name: "
|
|
440
|
-
}), /*#__PURE__*/_react.default.createElement("div", null, "Insert
|
|
439
|
+
}, /*#__PURE__*/_react.default.createElement(_LucideIcon.LucideIcon, {
|
|
440
|
+
name: "AddColRight"
|
|
441
|
+
}), /*#__PURE__*/_react.default.createElement("div", null, "Insert column to the left")));
|
|
441
442
|
});
|
|
442
443
|
}
|
|
443
444
|
if (name === "insert-row-above") {
|
|
444
|
-
return (selection === null || selection === void 0 ? void 0 : selection.
|
|
445
|
+
return (selection === null || selection === void 0 ? void 0 : selection.row_select) ? null : ["left"].map(function (dir) {
|
|
445
446
|
return /*#__PURE__*/_react.default.createElement(_Menu.default, {
|
|
446
|
-
key: "add-row-".concat(dir),
|
|
447
|
+
key: "add-row-above-".concat(dir),
|
|
447
448
|
onClick: function onClick() {
|
|
448
449
|
addRowColRightAvobe("row", "lefttop");
|
|
449
450
|
}
|
|
450
451
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
451
452
|
className: "context-item"
|
|
452
|
-
}, /*#__PURE__*/_react.default.createElement(
|
|
453
|
-
name: "
|
|
453
|
+
}, /*#__PURE__*/_react.default.createElement(_LucideIcon.LucideIcon, {
|
|
454
|
+
name: "AddRowAboveLocal"
|
|
454
455
|
}), /*#__PURE__*/_react.default.createElement("div", null, "Insert row above")));
|
|
455
456
|
});
|
|
456
457
|
}
|
|
458
|
+
if (name === "insert-row") {
|
|
459
|
+
return (selection === null || selection === void 0 ? void 0 : selection.row_select) ? null : ["left"].map(function (dir) {
|
|
460
|
+
return /*#__PURE__*/_react.default.createElement(_Menu.default, {
|
|
461
|
+
key: "add-row-below-".concat(dir),
|
|
462
|
+
onClick: function onClick() {
|
|
463
|
+
addRowColRightAvobe("row", "rightbottom");
|
|
464
|
+
}
|
|
465
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
466
|
+
className: "context-item"
|
|
467
|
+
}, /*#__PURE__*/_react.default.createElement(_LucideIcon.LucideIcon, {
|
|
468
|
+
name: "AddRowBelowLocal"
|
|
469
|
+
}), /*#__PURE__*/_react.default.createElement("div", null, "Insert row below")));
|
|
470
|
+
});
|
|
471
|
+
}
|
|
457
472
|
if (name === "delete-column") {
|
|
458
473
|
return (selection === null || selection === void 0 ? void 0 : selection.column_select) && (/*#__PURE__*/_react.default.createElement(_Menu.default, {
|
|
459
474
|
key: "delete-col",
|
|
@@ -74,7 +74,11 @@ var SheetListItem = function SheetListItem(_a) {
|
|
|
74
74
|
style: {
|
|
75
75
|
background: sheet.color
|
|
76
76
|
}
|
|
77
|
-
})),
|
|
77
|
+
})), /*#__PURE__*/_react.default.createElement("div", {
|
|
78
|
+
style: {
|
|
79
|
+
marginLeft: "8px"
|
|
80
|
+
}
|
|
81
|
+
}, sheet.name)), sheet.hide && /*#__PURE__*/_react.default.createElement(_SheetHiddenButton.default, {
|
|
78
82
|
sheet: sheet
|
|
79
83
|
}));
|
|
80
84
|
};
|
|
@@ -23,11 +23,12 @@
|
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
.fortune-sheet-list-item-name .luckysheet-sheets-list-item-color {
|
|
26
|
-
width:
|
|
27
|
-
height:
|
|
26
|
+
width: 28%;
|
|
27
|
+
height: 30%;
|
|
28
28
|
position: absolute;
|
|
29
|
-
bottom:
|
|
29
|
+
bottom: 11px;
|
|
30
30
|
left: -6px;
|
|
31
|
+
border-radius: 20px;
|
|
31
32
|
}
|
|
32
33
|
|
|
33
34
|
.fortune-sheet-list :hover {
|
|
@@ -11,7 +11,11 @@ export declare const LucideIcons: {
|
|
|
11
11
|
Farcaster: ({ width, height, ...props }: LucideIconProps) => React.JSX.Element;
|
|
12
12
|
Warpcast: ({ width, height, ...props }: LucideIconProps) => React.JSX.Element;
|
|
13
13
|
DSheetTextDisabled: ({ width, height, ...props }: LucideIconProps) => React.JSX.Element;
|
|
14
|
-
|
|
14
|
+
AddColLeft: () => React.JSX.Element;
|
|
15
|
+
AddColRight: () => React.JSX.Element;
|
|
16
|
+
AddRowBelowLocal: () => React.JSX.Element;
|
|
17
|
+
AddRowAboveLocal: () => React.JSX.Element;
|
|
18
|
+
DSheetOnlyText: () => React.JSX.Element;
|
|
15
19
|
Orb: ({ width, height, ...props }: LucideIconProps) => React.JSX.Element;
|
|
16
20
|
Lens: ({ width, height, ...props }: LucideIconProps) => React.JSX.Element;
|
|
17
21
|
Hey: ({ width, height, ...props }: LucideIconProps) => React.JSX.Element;
|
|
@@ -311,12 +311,70 @@ var LucideIcons = exports.LucideIcons = {
|
|
|
311
311
|
stroke: "transparent"
|
|
312
312
|
}));
|
|
313
313
|
},
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
width
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
314
|
+
AddColLeft: function AddColLeft() {
|
|
315
|
+
return /*#__PURE__*/_react.default.createElement("svg", {
|
|
316
|
+
width: "18",
|
|
317
|
+
height: "18",
|
|
318
|
+
viewBox: "0 0 18 18",
|
|
319
|
+
fill: "none",
|
|
320
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
321
|
+
}, /*#__PURE__*/_react.default.createElement("path", {
|
|
322
|
+
fillRule: "evenodd",
|
|
323
|
+
clipRule: "evenodd",
|
|
324
|
+
d: "M14.25 0.75C15.4926 0.75 16.5 1.75736 16.5 3V15C16.5 16.2426 15.4926 17.25 14.25 17.25H11.25C10.0074 17.25 9 16.2426 9 15V3C9 1.75736 10.0074 0.75 11.25 0.75H14.25ZM11.25 2.25C10.8358 2.25 10.5 2.58579 10.5 3V15L10.5037 15.0769C10.5422 15.455 10.8617 15.75 11.25 15.75H14.25L14.3269 15.7463C14.6797 15.7104 14.9604 15.4297 14.9963 15.0769L15 15V3C15 2.61174 14.705 2.29216 14.3269 2.25366L14.25 2.25H11.25Z",
|
|
325
|
+
fill: "#363B3F"
|
|
326
|
+
}), /*#__PURE__*/_react.default.createElement("path", {
|
|
327
|
+
d: "M4.5 6C4.91421 6 5.25 6.33579 5.25 6.75V8.25H6.75C7.16421 8.25 7.5 8.58579 7.5 9C7.5 9.41421 7.16421 9.75 6.75 9.75H5.25V11.25C5.25 11.6642 4.91421 12 4.5 12C4.08579 12 3.75 11.6642 3.75 11.25V9.75H2.25C1.83579 9.75 1.5 9.41421 1.5 9C1.5 8.58579 1.83579 8.25 2.25 8.25H3.75V6.75C3.75 6.33579 4.08579 6 4.5 6Z",
|
|
328
|
+
fill: "#363B3F"
|
|
329
|
+
}));
|
|
330
|
+
},
|
|
331
|
+
AddColRight: function AddColRight() {
|
|
332
|
+
return /*#__PURE__*/_react.default.createElement("svg", {
|
|
333
|
+
width: "18",
|
|
334
|
+
height: "18",
|
|
335
|
+
viewBox: "0 0 18 18",
|
|
336
|
+
fill: "none",
|
|
337
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
338
|
+
}, /*#__PURE__*/_react.default.createElement("path", {
|
|
339
|
+
fillRule: "evenodd",
|
|
340
|
+
clipRule: "evenodd",
|
|
341
|
+
d: "M5.75 0.75C6.99264 0.75 8 1.75736 8 3V15C8 16.2426 6.99264 17.25 5.75 17.25H2.75C1.50736 17.25 0.5 16.2426 0.5 15V3C0.5 1.75736 1.50736 0.75 2.75 0.75H5.75ZM2.75 2.25C2.33579 2.25 2 2.58579 2 3V15L2.00366 15.0769C2.04216 15.455 2.36174 15.75 2.75 15.75H5.75L5.8269 15.7463C6.17972 15.7104 6.46041 15.4297 6.49634 15.0769L6.5 15V3C6.5 2.61174 6.205 2.29216 5.8269 2.25366L5.75 2.25H2.75Z",
|
|
342
|
+
fill: "#363B3F"
|
|
343
|
+
}), /*#__PURE__*/_react.default.createElement("path", {
|
|
344
|
+
d: "M12.5 6C12.9142 6 13.25 6.33579 13.25 6.75V8.25H14.75C15.1642 8.25 15.5 8.58579 15.5 9C15.5 9.41421 15.1642 9.75 14.75 9.75H13.25V11.25C13.25 11.6642 12.9142 12 12.5 12C12.0858 12 11.75 11.6642 11.75 11.25V9.75H10.25C9.83579 9.75 9.5 9.41421 9.5 9C9.5 8.58579 9.83579 8.25 10.25 8.25H11.75V6.75C11.75 6.33579 12.0858 6 12.5 6Z",
|
|
345
|
+
fill: "#363B3F"
|
|
346
|
+
}));
|
|
347
|
+
},
|
|
348
|
+
AddRowBelowLocal: function AddRowBelowLocal() {
|
|
349
|
+
return /*#__PURE__*/_react.default.createElement("svg", {
|
|
350
|
+
width: "18",
|
|
351
|
+
height: "18",
|
|
352
|
+
viewBox: "0 0 18 18",
|
|
353
|
+
fill: "none",
|
|
354
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
355
|
+
}, /*#__PURE__*/_react.default.createElement("path", {
|
|
356
|
+
d: "M9 10.5C9.41421 10.5 9.75 10.8358 9.75 11.25V12.75H11.25C11.6642 12.75 12 13.0858 12 13.5C12 13.9142 11.6642 14.25 11.25 14.25H9.75V15.75C9.75 16.1642 9.41421 16.5 9 16.5C8.58579 16.5 8.25 16.1642 8.25 15.75V14.25H6.75C6.33579 14.25 6 13.9142 6 13.5C6 13.0858 6.33579 12.75 6.75 12.75H8.25V11.25C8.25 10.8358 8.58579 10.5 9 10.5ZM15 3.75C15 3.33579 14.6642 3 14.25 3H3.75C3.33579 3 3 3.33579 3 3.75V6.75C3 7.16421 3.33579 7.5 3.75 7.5H14.25C14.6642 7.5 15 7.16421 15 6.75V3.75ZM16.5 6.75C16.5 7.99264 15.4926 9 14.25 9H3.75C2.50736 9 1.5 7.99264 1.5 6.75V3.75C1.5 2.50736 2.50736 1.5 3.75 1.5H14.25C15.4926 1.5 16.5 2.50736 16.5 3.75V6.75Z",
|
|
357
|
+
fill: "#363B3F"
|
|
358
|
+
}));
|
|
359
|
+
},
|
|
360
|
+
AddRowAboveLocal: function AddRowAboveLocal() {
|
|
361
|
+
return /*#__PURE__*/_react.default.createElement("svg", {
|
|
362
|
+
width: "24",
|
|
363
|
+
height: "24",
|
|
364
|
+
viewBox: "0 0 24 24",
|
|
365
|
+
fill: "none",
|
|
366
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
367
|
+
}, /*#__PURE__*/_react.default.createElement("path", {
|
|
368
|
+
d: "M12 2C12.5523 2 13 2.44772 13 3V5H15C15.5523 5 16 5.44772 16 6C16 6.55228 15.5523 7 15 7H13V9C13 9.55228 12.5523 10 12 10C11.4477 10 11 9.55228 11 9V7H9C8.44772 7 8 6.55228 8 6C8 5.44772 8.44772 5 9 5H11V3C11 2.44772 11.4477 2 12 2Z",
|
|
369
|
+
fill: "#363B3F"
|
|
370
|
+
}), /*#__PURE__*/_react.default.createElement("path", {
|
|
371
|
+
fillRule: "evenodd",
|
|
372
|
+
clipRule: "evenodd",
|
|
373
|
+
d: "M22 19C22 20.6569 20.6569 22 19 22H5C3.34315 22 2 20.6569 2 19V15C2 13.3431 3.34315 12 5 12H19C20.6569 12 22 13.3431 22 15V19ZM20 15C20 14.4477 19.5523 14 19 14H5C4.44772 14 4 14.4477 4 15V19C4 19.5523 4.44772 20 5 20H19C19.5523 20 20 19.5523 20 19V15Z",
|
|
374
|
+
fill: "#363B3F"
|
|
375
|
+
}));
|
|
376
|
+
},
|
|
377
|
+
DSheetOnlyText: function DSheetOnlyText() {
|
|
320
378
|
return /*#__PURE__*/_react.default.createElement("svg", {
|
|
321
379
|
width: "20",
|
|
322
380
|
height: "20",
|
|
@@ -10,7 +10,11 @@ export declare const UltimateIcons: {
|
|
|
10
10
|
Farcaster: ({ width, height, ...props }: LucideIconProps) => React.JSX.Element;
|
|
11
11
|
Warpcast: ({ width, height, ...props }: LucideIconProps) => React.JSX.Element;
|
|
12
12
|
DSheetTextDisabled: ({ width, height, ...props }: LucideIconProps) => React.JSX.Element;
|
|
13
|
-
|
|
13
|
+
AddColLeft: () => React.JSX.Element;
|
|
14
|
+
AddColRight: () => React.JSX.Element;
|
|
15
|
+
AddRowBelowLocal: () => React.JSX.Element;
|
|
16
|
+
AddRowAboveLocal: () => React.JSX.Element;
|
|
17
|
+
DSheetOnlyText: () => React.JSX.Element;
|
|
14
18
|
Orb: ({ width, height, ...props }: LucideIconProps) => React.JSX.Element;
|
|
15
19
|
Lens: ({ width, height, ...props }: LucideIconProps) => React.JSX.Element;
|
|
16
20
|
Hey: ({ width, height, ...props }: LucideIconProps) => React.JSX.Element;
|
|
@@ -179,7 +179,13 @@ var SheetItem = function SheetItem(_a) {
|
|
|
179
179
|
borderLeft: dragOver ? "2px solid #0188fb" : "",
|
|
180
180
|
display: sheet.hide === 1 ? "none" : ""
|
|
181
181
|
}
|
|
182
|
-
}, /*#__PURE__*/_react.default.createElement("
|
|
182
|
+
}, editing === false && (/*#__PURE__*/_react.default.createElement("p", {
|
|
183
|
+
className: "luckysheet-sheets-item-name",
|
|
184
|
+
onDoubleClick: function onDoubleClick() {
|
|
185
|
+
if (context.isFlvReadOnly) return;
|
|
186
|
+
setEditing(true);
|
|
187
|
+
}
|
|
188
|
+
}, sheet.name)), editing && (/*#__PURE__*/_react.default.createElement("span", {
|
|
183
189
|
className: "luckysheet-sheets-item-name",
|
|
184
190
|
spellCheck: "false",
|
|
185
191
|
suppressContentEditableWarning: true,
|
|
@@ -194,8 +200,12 @@ var SheetItem = function SheetItem(_a) {
|
|
|
194
200
|
style: dragOver ? {
|
|
195
201
|
pointerEvents: "none"
|
|
196
202
|
} : {}
|
|
197
|
-
}, sheet.name), /*#__PURE__*/_react.default.createElement("span", {
|
|
203
|
+
}, sheet.name)), /*#__PURE__*/_react.default.createElement("span", {
|
|
198
204
|
className: "luckysheet-sheets-item-function",
|
|
205
|
+
style: {
|
|
206
|
+
marginRight: "4px",
|
|
207
|
+
marginLeft: "4px"
|
|
208
|
+
},
|
|
199
209
|
onClick: function onClick(e) {
|
|
200
210
|
if (isDropPlaceholder || context.allowEdit === false) return;
|
|
201
211
|
var rect = refs.workbookContainer.current.getBoundingClientRect();
|
|
@@ -218,7 +228,7 @@ var SheetItem = function SheetItem(_a) {
|
|
|
218
228
|
name: "downArrow",
|
|
219
229
|
width: 12,
|
|
220
230
|
style: {
|
|
221
|
-
fill: "
|
|
231
|
+
fill: "#363B3F"
|
|
222
232
|
}
|
|
223
233
|
})), !!sheet.color && (/*#__PURE__*/_react.default.createElement("div", {
|
|
224
234
|
className: "luckysheet-sheets-item-color",
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
box-sizing: border-box;
|
|
4
4
|
color: #444;
|
|
5
5
|
height: 36px;
|
|
6
|
-
padding: 0 30px 0
|
|
6
|
+
padding: 0 30px 0 8px;
|
|
7
7
|
margin: 0;
|
|
8
8
|
-webkit-touch-callout: none;
|
|
9
9
|
transition: 0.3s ease all;
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
padding: 0px 0px;
|
|
44
44
|
margin-left: 0px;
|
|
45
45
|
position: relative;
|
|
46
|
-
max-width:
|
|
46
|
+
max-width: 75%;
|
|
47
47
|
vertical-align: bottom;
|
|
48
48
|
display: inline-block;
|
|
49
49
|
}
|
|
@@ -74,7 +74,8 @@
|
|
|
74
74
|
.fortune-sheettab-container .fortune-sheettab-container-c {
|
|
75
75
|
padding: 0px 0px;
|
|
76
76
|
margin-left: 0px;
|
|
77
|
-
overflow:
|
|
77
|
+
overflow: scroll;
|
|
78
|
+
scrollbar-width: none;
|
|
78
79
|
white-space: nowrap;
|
|
79
80
|
position: relative;
|
|
80
81
|
max-width: 100%;
|
|
@@ -141,6 +142,14 @@
|
|
|
141
142
|
padding: 0px 3px;
|
|
142
143
|
}
|
|
143
144
|
|
|
145
|
+
.luckysheet-sheets-item-name {
|
|
146
|
+
display: inline-block;
|
|
147
|
+
max-width: 340px;
|
|
148
|
+
overflow: hidden;
|
|
149
|
+
white-space: nowrap;
|
|
150
|
+
font-weight: 500;
|
|
151
|
+
}
|
|
152
|
+
|
|
144
153
|
.luckysheet-sheets-item-color {
|
|
145
154
|
width: 100%;
|
|
146
155
|
height: 10%;
|
|
@@ -192,8 +201,8 @@
|
|
|
192
201
|
display: flex;
|
|
193
202
|
align-items: center;
|
|
194
203
|
justify-content: center;
|
|
195
|
-
height:
|
|
196
|
-
width:
|
|
204
|
+
height: 30px;
|
|
205
|
+
width: 30px;
|
|
197
206
|
background-color: hsl(var(--color-bg-secondary)) !important;
|
|
198
207
|
}
|
|
199
208
|
|
|
@@ -201,8 +210,8 @@
|
|
|
201
210
|
display: flex;
|
|
202
211
|
align-items: center;
|
|
203
212
|
justify-content: center;
|
|
204
|
-
height:
|
|
205
|
-
width:
|
|
213
|
+
height: 30px;
|
|
214
|
+
width: 30px;
|
|
206
215
|
background-color: hsl(var(--color-button-secondary-hover)) !important;
|
|
207
216
|
}
|
|
208
217
|
|
|
@@ -217,15 +226,14 @@
|
|
|
217
226
|
.fortune-sheettab-scroll {
|
|
218
227
|
display: flex;
|
|
219
228
|
align-items: center;
|
|
220
|
-
|
|
221
|
-
height: 29px;
|
|
229
|
+
height: 30px;
|
|
222
230
|
cursor: pointer;
|
|
223
231
|
}
|
|
224
232
|
|
|
225
233
|
.fortune-sheettab-placeholder {
|
|
226
234
|
display: inline-block;
|
|
227
235
|
width: 30px;
|
|
228
|
-
height:
|
|
236
|
+
height: 30px;
|
|
229
237
|
line-height: 29px;
|
|
230
238
|
vertical-align: middle;
|
|
231
239
|
}
|
|
@@ -179,7 +179,7 @@ var SheetTab = function SheetTab() {
|
|
|
179
179
|
onClick: onAddSheetClick,
|
|
180
180
|
elevation: 1,
|
|
181
181
|
icon: "Plus",
|
|
182
|
-
size: "
|
|
182
|
+
size: "sm",
|
|
183
183
|
variant: "secondary"
|
|
184
184
|
})), context.allowEdit && (/*#__PURE__*/_react.default.createElement("div", {
|
|
185
185
|
className: "sheet-list-container"
|
|
@@ -198,14 +198,9 @@ var SheetTab = function SheetTab() {
|
|
|
198
198
|
className: "fortune-sheettab-button border-none shadow-none",
|
|
199
199
|
elevation: 1,
|
|
200
200
|
icon: "Menu",
|
|
201
|
-
size: "
|
|
201
|
+
size: "sm",
|
|
202
202
|
variant: "secondary"
|
|
203
203
|
})))), /*#__PURE__*/_react.default.createElement("div", {
|
|
204
|
-
id: "luckysheet-sheets-m",
|
|
205
|
-
className: "luckysheet-sheets-m lucky-button-custom"
|
|
206
|
-
}, /*#__PURE__*/_react.default.createElement("i", {
|
|
207
|
-
className: "iconfont luckysheet-iconfont-caidan2"
|
|
208
|
-
})), /*#__PURE__*/_react.default.createElement("div", {
|
|
209
204
|
className: "fortune-sheettab-container",
|
|
210
205
|
id: "fortune-sheettab-container"
|
|
211
206
|
}, !isShowBoundary && /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -221,8 +216,6 @@ var SheetTab = function SheetTab() {
|
|
|
221
216
|
key: sheet.id,
|
|
222
217
|
sheet: sheet
|
|
223
218
|
});
|
|
224
|
-
})), isShowBoundary && isShowScrollBtn && (/*#__PURE__*/_react.default.createElement("div", {
|
|
225
|
-
className: "boundary boundary-right"
|
|
226
219
|
}))), isShowScrollBtn && (/*#__PURE__*/_react.default.createElement("div", {
|
|
227
220
|
id: "fortune-sheettab-leftscroll",
|
|
228
221
|
className: "fortune-sheettab-scroll",
|
|
@@ -239,7 +232,7 @@ var SheetTab = function SheetTab() {
|
|
|
239
232
|
},
|
|
240
233
|
elevation: 1,
|
|
241
234
|
icon: "ChevronLeft",
|
|
242
|
-
size: "
|
|
235
|
+
size: "sm",
|
|
243
236
|
variant: "secondary"
|
|
244
237
|
}))), isShowScrollBtn && (/*#__PURE__*/_react.default.createElement("div", {
|
|
245
238
|
id: "fortune-sheettab-rightscroll",
|
|
@@ -257,11 +250,11 @@ var SheetTab = function SheetTab() {
|
|
|
257
250
|
},
|
|
258
251
|
elevation: 1,
|
|
259
252
|
icon: "ChevronRight",
|
|
260
|
-
size: "
|
|
253
|
+
size: "sm",
|
|
261
254
|
variant: "secondary"
|
|
262
255
|
})))), /*#__PURE__*/_react.default.createElement("div", {
|
|
263
256
|
className: "fortune-sheet-area-right"
|
|
264
|
-
}, statsFilter.length === 6 && (/*#__PURE__*/_react.default.createElement(_ui.Popover, null, /*#__PURE__*/_react.default.createElement(_ui.PopoverTrigger, {
|
|
257
|
+
}, statsFilter.length === 6 && calInfo.count > 1 && (/*#__PURE__*/_react.default.createElement(_ui.Popover, null, /*#__PURE__*/_react.default.createElement(_ui.PopoverTrigger, {
|
|
265
258
|
className: "p-0 m-0 mr-2"
|
|
266
259
|
}, /*#__PURE__*/_react.default.createElement(_ui.Button, {
|
|
267
260
|
variant: "ghost",
|
|
@@ -269,9 +262,28 @@ var SheetTab = function SheetTab() {
|
|
|
269
262
|
style: {
|
|
270
263
|
height: "24px !important"
|
|
271
264
|
}
|
|
272
|
-
},
|
|
273
|
-
className: "
|
|
274
|
-
},
|
|
265
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
266
|
+
className: "flex items-center"
|
|
267
|
+
}, /*#__PURE__*/_react.default.createElement("p", {
|
|
268
|
+
className: "text-body-sm",
|
|
269
|
+
style: {
|
|
270
|
+
fontWeight: "500",
|
|
271
|
+
marginRight: "8px"
|
|
272
|
+
}
|
|
273
|
+
}, STATS_LABELS[selectedStat], ":", " ", calInfo[selectedStat]), /*#__PURE__*/_react.default.createElement("svg", {
|
|
274
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
275
|
+
width: "18",
|
|
276
|
+
height: "18",
|
|
277
|
+
viewBox: "0 0 24 24",
|
|
278
|
+
fill: "none",
|
|
279
|
+
stroke: "currentColor",
|
|
280
|
+
strokeWidth: "2",
|
|
281
|
+
strokeLinecap: "round",
|
|
282
|
+
strokeLinejoin: "round",
|
|
283
|
+
className: "lucide lucide-chevron-down-icon lucide-chevron-down"
|
|
284
|
+
}, /*#__PURE__*/_react.default.createElement("path", {
|
|
285
|
+
d: "m6 9 6 6 6-6"
|
|
286
|
+
}))))), /*#__PURE__*/_react.default.createElement(_ui.PopoverContent, {
|
|
275
287
|
align: "end",
|
|
276
288
|
alignOffset: 0,
|
|
277
289
|
className: "stats-content color-border-default shadow-elevation-3",
|
|
@@ -7,6 +7,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.default = void 0;
|
|
8
8
|
var _react = _interopRequireWildcard(require("react"));
|
|
9
9
|
var _fortuneCore = require("@fileverse-dev/fortune-core");
|
|
10
|
+
var _usehooksTs = require("usehooks-ts");
|
|
10
11
|
var _ui = require("@fileverse/ui");
|
|
11
12
|
var _context = _interopRequireDefault(require("../../context"));
|
|
12
13
|
var _useOutsideClick = require("../../hooks/useOutsideClick");
|
|
@@ -49,6 +50,9 @@ var ZoomControl = function ZoomControl() {
|
|
|
49
50
|
var _b = (0, _react.useState)(false),
|
|
50
51
|
radioMenuOpen = _b[0],
|
|
51
52
|
setRadioMenuOpen = _b[1];
|
|
53
|
+
var isMobile = (0, _usehooksTs.useMediaQuery)("(max-width: 780px)", {
|
|
54
|
+
defaultValue: true
|
|
55
|
+
});
|
|
52
56
|
(0, _useOutsideClick.useOutsideClick)(menuRef, function () {
|
|
53
57
|
setRadioMenuOpen(false);
|
|
54
58
|
}, []);
|
|
@@ -85,7 +89,7 @@ var ZoomControl = function ZoomControl() {
|
|
|
85
89
|
}, [context.zoomRatio]);
|
|
86
90
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
87
91
|
className: "fortune-zoom-container"
|
|
88
|
-
}, /*#__PURE__*/_react.default.createElement(_ui.IconButton, {
|
|
92
|
+
}, !isMobile && (/*#__PURE__*/_react.default.createElement(_ui.IconButton, {
|
|
89
93
|
className: "fortune-sheettab-button border-none shadow-none",
|
|
90
94
|
onClick: function onClick(e) {
|
|
91
95
|
zoomTo(context.zoomRatio - 0.1);
|
|
@@ -93,16 +97,19 @@ var ZoomControl = function ZoomControl() {
|
|
|
93
97
|
},
|
|
94
98
|
elevation: 1,
|
|
95
99
|
icon: "Minus",
|
|
96
|
-
size: "
|
|
100
|
+
size: "sm",
|
|
97
101
|
variant: "secondary"
|
|
98
|
-
}), /*#__PURE__*/_react.default.createElement("div", {
|
|
102
|
+
})), /*#__PURE__*/_react.default.createElement("div", {
|
|
99
103
|
className: "fortune-zoom-ratio"
|
|
100
104
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
101
105
|
className: "fortune-zoom-ratio-current fortune-zoom-button",
|
|
102
106
|
onClick: function onClick() {
|
|
103
107
|
return setRadioMenuOpen(true);
|
|
104
108
|
},
|
|
105
|
-
tabIndex: 0
|
|
109
|
+
tabIndex: 0,
|
|
110
|
+
style: {
|
|
111
|
+
fontWeight: "500"
|
|
112
|
+
}
|
|
106
113
|
}, (context.zoomRatio * 100).toFixed(0), "%"), radioMenuOpen && (/*#__PURE__*/_react.default.createElement("div", {
|
|
107
114
|
className: "fortune-zoom-ratio-menu",
|
|
108
115
|
ref: menuRef
|
|
@@ -118,7 +125,7 @@ var ZoomControl = function ZoomControl() {
|
|
|
118
125
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
119
126
|
className: "fortune-zoom-ratio-text"
|
|
120
127
|
}, v.text));
|
|
121
|
-
})))), /*#__PURE__*/_react.default.createElement(_ui.IconButton, {
|
|
128
|
+
})))), !isMobile && (/*#__PURE__*/_react.default.createElement(_ui.IconButton, {
|
|
122
129
|
className: "fortune-sheettab-button border-none shadow-none",
|
|
123
130
|
onClick: function onClick(e) {
|
|
124
131
|
zoomTo(context.zoomRatio + 0.1);
|
|
@@ -126,8 +133,8 @@ var ZoomControl = function ZoomControl() {
|
|
|
126
133
|
},
|
|
127
134
|
elevation: 1,
|
|
128
135
|
icon: "Plus",
|
|
129
|
-
size: "
|
|
136
|
+
size: "sm",
|
|
130
137
|
variant: "secondary"
|
|
131
|
-
}));
|
|
138
|
+
})));
|
|
132
139
|
};
|
|
133
140
|
var _default = exports.default = ZoomControl;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fileverse-dev/fortune-react",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.82",
|
|
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.1.
|
|
19
|
+
"@fileverse-dev/fortune-core": "1.1.82",
|
|
20
20
|
"@fileverse/ui": "^4.1.7-patch-21",
|
|
21
21
|
"@tippyjs/react": "^4.2.6",
|
|
22
22
|
"@types/regenerator-runtime": "^0.13.6",
|