@fileverse-dev/fortune-react 1.2.64-patch-12 → 1.2.65
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/ConditionRules.d.ts +1 -3
- package/es/components/ConditionFormat/ConditionRules.js +79 -408
- package/es/components/ConditionFormat/index.css +5 -62
- package/es/components/ConditionFormat/index.js +4 -2
- package/es/components/ContextMenu/index.js +41 -10
- package/es/components/SheetOverlay/helper.d.ts +0 -1
- package/es/components/SheetOverlay/helper.js +1 -1
- package/es/components/Toolbar/index.d.ts +1 -1
- package/es/components/Toolbar/index.js +25 -49
- package/es/components/Workbook/api.d.ts +0 -4
- package/es/components/Workbook/api.js +0 -4
- package/es/components/Workbook/index.d.ts +0 -4
- package/es/components/Workbook/index.js +0 -3
- package/lib/components/ConditionFormat/ConditionRules.d.ts +1 -3
- package/lib/components/ConditionFormat/ConditionRules.js +77 -405
- package/lib/components/ConditionFormat/index.css +5 -62
- package/lib/components/ConditionFormat/index.js +3 -1
- package/lib/components/ContextMenu/index.js +41 -10
- package/lib/components/SheetOverlay/helper.d.ts +0 -1
- package/lib/components/SheetOverlay/helper.js +0 -1
- package/lib/components/Toolbar/index.d.ts +1 -1
- package/lib/components/Toolbar/index.js +25 -49
- package/lib/components/Workbook/api.d.ts +0 -4
- package/lib/components/Workbook/api.js +0 -4
- package/lib/components/Workbook/index.d.ts +0 -4
- package/lib/components/Workbook/index.js +0 -3
- package/package.json +2 -2
- package/es/components/ConditionFormat/formating.css +0 -103
- package/es/components/Toolbar/conditionalFormatPortal.d.ts +0 -6
- package/es/components/Toolbar/conditionalFormatPortal.js +0 -13
- package/lib/components/ConditionFormat/formating.css +0 -103
- package/lib/components/Toolbar/conditionalFormatPortal.d.ts +0 -6
- package/lib/components/Toolbar/conditionalFormatPortal.js +0 -20
|
@@ -236,7 +236,9 @@ var ConditionalFormat = function ConditionalFormat(_a) {
|
|
|
236
236
|
padding: "6px 10px"
|
|
237
237
|
},
|
|
238
238
|
onClick: function onClick() {
|
|
239
|
-
setContext(function (ctx) {
|
|
239
|
+
setContext(function (ctx) {
|
|
240
|
+
(0, _fortuneCore.updateItem)(ctx, "delSheet");
|
|
241
|
+
});
|
|
240
242
|
},
|
|
241
243
|
tabIndex: 0
|
|
242
244
|
}, conditionformat[v]);
|
|
@@ -20,6 +20,7 @@ var _Divider = _interopRequireDefault(require("./Divider"));
|
|
|
20
20
|
require("./index.css");
|
|
21
21
|
var _Menu = _interopRequireDefault(require("./Menu"));
|
|
22
22
|
require("tippy.js/dist/tippy.css");
|
|
23
|
+
var _ConditionFormat = _interopRequireDefault(require("../ConditionFormat"));
|
|
23
24
|
var _SVGIcon = _interopRequireDefault(require("../SVGIcon"));
|
|
24
25
|
var _LucideIcon = require("../../components/SheetOverlay/LucideIcon");
|
|
25
26
|
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); }
|
|
@@ -994,20 +995,50 @@ var ContextMenu = function ContextMenu() {
|
|
|
994
995
|
}), /*#__PURE__*/_react.default.createElement("p", null, rightclick.link)));
|
|
995
996
|
}
|
|
996
997
|
if (name === "conditionFormat") {
|
|
997
|
-
|
|
998
|
+
var closeContextMenu = function closeContextMenu() {
|
|
999
|
+
return setContext(function (ctx) {
|
|
1000
|
+
ctx.contextMenu = {};
|
|
1001
|
+
});
|
|
1002
|
+
};
|
|
1003
|
+
return /*#__PURE__*/_react.default.createElement(_react2.default, {
|
|
998
1004
|
key: name,
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1005
|
+
placement: "right-start",
|
|
1006
|
+
interactive: true,
|
|
1007
|
+
interactiveBorder: 50,
|
|
1008
|
+
offset: [0, 0],
|
|
1009
|
+
arrow: false,
|
|
1010
|
+
zIndex: 3000,
|
|
1011
|
+
appendTo: document.body,
|
|
1012
|
+
onShow: function onShow() {
|
|
1013
|
+
setActiveMenu("conditionFormat");
|
|
1014
|
+
},
|
|
1015
|
+
onHide: function onHide() {
|
|
1016
|
+
if (activeMenu === "conditionFormat") setActiveMenu("");
|
|
1017
|
+
},
|
|
1018
|
+
content: /*#__PURE__*/_react.default.createElement("div", {
|
|
1019
|
+
style: {
|
|
1020
|
+
minWidth: 220
|
|
1021
|
+
}
|
|
1022
|
+
}, /*#__PURE__*/_react.default.createElement(_ConditionFormat.default, {
|
|
1023
|
+
items: ["highlightCellRules", "itemSelectionRules", "-", "deleteRule"],
|
|
1024
|
+
setOpen: closeContextMenu
|
|
1025
|
+
})),
|
|
1026
|
+
trigger: "mouseenter focus",
|
|
1027
|
+
hideOnClick: false
|
|
1028
|
+
}, /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_Menu.default, {
|
|
1029
|
+
isActive: activeMenu === "conditionFormat"
|
|
1006
1030
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
1007
|
-
className: "
|
|
1031
|
+
className: "flex items-center justify-between w-full"
|
|
1032
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
1033
|
+
className: "flex items-center gap-2 context-item"
|
|
1008
1034
|
}, /*#__PURE__*/_react.default.createElement(_ui.LucideIcon, {
|
|
1009
1035
|
name: "PaintbrushVertical"
|
|
1010
|
-
}), /*#__PURE__*/_react.default.createElement("p", null, "Conditional
|
|
1036
|
+
}), /*#__PURE__*/_react.default.createElement("p", null, rightclick.conditionFormat || "Conditional Format")), /*#__PURE__*/_react.default.createElement(_ui.LucideIcon, {
|
|
1037
|
+
name: "ChevronRight",
|
|
1038
|
+
width: 16,
|
|
1039
|
+
height: 16,
|
|
1040
|
+
className: "color-text-secondary w-4 h-4"
|
|
1041
|
+
})))));
|
|
1011
1042
|
}
|
|
1012
1043
|
if (name === "clear-format") {
|
|
1013
1044
|
return /*#__PURE__*/_react.default.createElement(_Menu.default, {
|
|
@@ -2,7 +2,6 @@ export declare function moveCursorToEnd(editableDiv: HTMLDivElement): void;
|
|
|
2
2
|
export declare function getCursorPosition(editableDiv: HTMLDivElement): number;
|
|
3
3
|
export declare function isLetterNumberPattern(str: string): boolean;
|
|
4
4
|
export declare function removeLastSpan(htmlString: string): string;
|
|
5
|
-
export declare function numberToColumn(colNumber: number): string;
|
|
6
5
|
export declare function incrementColumn(cell: string): string;
|
|
7
6
|
export declare function decrementColumn(cell: string): string;
|
|
8
7
|
export declare function incrementRow(cell: string): string;
|
|
@@ -11,7 +11,6 @@ exports.incrementColumn = incrementColumn;
|
|
|
11
11
|
exports.incrementRow = incrementRow;
|
|
12
12
|
exports.isLetterNumberPattern = isLetterNumberPattern;
|
|
13
13
|
exports.moveCursorToEnd = moveCursorToEnd;
|
|
14
|
-
exports.numberToColumn = numberToColumn;
|
|
15
14
|
exports.removeLastSpan = removeLastSpan;
|
|
16
15
|
function moveCursorToEnd(editableDiv) {
|
|
17
16
|
editableDiv.focus();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { Cell } from "@fileverse-dev/fortune-core";
|
|
3
3
|
import "./index.css";
|
|
4
|
-
export declare const getLucideIcon: (title: string) => "Ethereum" | "DollarSign" | "" | "ChevronDown" | "
|
|
4
|
+
export declare const getLucideIcon: (title: string) => "Ethereum" | "DollarSign" | "" | "ChevronDown" | "Undo" | "Redo" | "PaintRoller" | "Bold" | "Italic" | "Strikethrough" | "Underline" | "AlignLeft" | "AlignCenter" | "AlignRight" | "ArrowUpFromLine" | "AlignVerticalMiddle" | "ArrowDownToLine" | "TextOverflow" | "WrapText" | "TextClip" | "Baseline" | "PaintBucket" | "Border" | "MergeHorizontal" | "Percent" | "DecimalsArrowLeft" | "DecimalsArrowRight" | "PaintbrushVertical" | "Filter" | "Link" | "MessageSquarePlus" | "Image" | "Sigma" | "ShieldCheck" | "Search" | "DuneChart" | "Ellipsis";
|
|
5
5
|
export declare const CurrencySelector: ({ cell, defaultTextFormat, toolTipText, }: {
|
|
6
6
|
cell: Cell | null | undefined;
|
|
7
7
|
defaultTextFormat: string;
|
|
@@ -10,7 +10,6 @@ var _fortuneCore = require("@fileverse-dev/fortune-core");
|
|
|
10
10
|
var _lodash = _interopRequireDefault(require("lodash"));
|
|
11
11
|
var _ui = require("@fileverse/ui");
|
|
12
12
|
var _dataVerificationPortal = _interopRequireDefault(require("./dataVerificationPortal"));
|
|
13
|
-
var _conditionalFormatPortal = _interopRequireDefault(require("./conditionalFormatPortal"));
|
|
14
13
|
var _context = _interopRequireDefault(require("../../context"));
|
|
15
14
|
require("./index.css");
|
|
16
15
|
var _Button = _interopRequireDefault(require("./Button"));
|
|
@@ -21,6 +20,7 @@ var _SVGIcon = _interopRequireDefault(require("../SVGIcon"));
|
|
|
21
20
|
var _useDialog = require("../../hooks/useDialog");
|
|
22
21
|
var _SplitColumn = require("../SplitColumn");
|
|
23
22
|
var _LocationCondition = require("../LocationCondition");
|
|
23
|
+
var _ConditionFormat = _interopRequireDefault(require("../ConditionFormat"));
|
|
24
24
|
var _CustomButton = _interopRequireDefault(require("./CustomButton"));
|
|
25
25
|
var _CustomColor = require("./CustomColor");
|
|
26
26
|
var _FormatSearch = require("../FormatSearch");
|
|
@@ -605,9 +605,6 @@ var Toolbar = function Toolbar(_a) {
|
|
|
605
605
|
var _o = (0, _react.useState)(false),
|
|
606
606
|
showDataValidation = _o[0],
|
|
607
607
|
setShowDataValidation = _o[1];
|
|
608
|
-
var _p = (0, _react.useState)(false),
|
|
609
|
-
showConditionalFormat = _p[0],
|
|
610
|
-
setShowConditionalFormat = _p[1];
|
|
611
608
|
var dataVerificationClick = function dataVerificationClick(selectedCells) {
|
|
612
609
|
var _a;
|
|
613
610
|
var selection = _fortuneCore.api.getSelection(context);
|
|
@@ -628,26 +625,7 @@ var Toolbar = function Toolbar(_a) {
|
|
|
628
625
|
};
|
|
629
626
|
(0, _react.useEffect)(function () {
|
|
630
627
|
window.dataVerificationClick = dataVerificationClick;
|
|
631
|
-
window.conditionalFormatClick = conditionalFormatClick;
|
|
632
628
|
}, []);
|
|
633
|
-
var conditionalFormatClick = function conditionalFormatClick(selectedCells) {
|
|
634
|
-
var _a;
|
|
635
|
-
var selection = _fortuneCore.api.getSelection(context);
|
|
636
|
-
if (!selection && !selectedCells) {
|
|
637
|
-
setContext(function (ctx) {
|
|
638
|
-
_fortuneCore.api.setSelection(ctx, [{
|
|
639
|
-
row: [0, 0],
|
|
640
|
-
column: [0, 0]
|
|
641
|
-
}], {
|
|
642
|
-
id: context.currentSheetId
|
|
643
|
-
});
|
|
644
|
-
});
|
|
645
|
-
}
|
|
646
|
-
(_a = document.getElementById("conditional-format-button")) === null || _a === void 0 ? void 0 : _a.click();
|
|
647
|
-
setTimeout(function () {
|
|
648
|
-
setShowConditionalFormat(true);
|
|
649
|
-
}, 100);
|
|
650
|
-
};
|
|
651
629
|
var getToolbarItem = (0, _react.useCallback)(function (name, i) {
|
|
652
630
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
653
631
|
var tooltip = toolbar[name];
|
|
@@ -1143,13 +1121,17 @@ var Toolbar = function Toolbar(_a) {
|
|
|
1143
1121
|
});
|
|
1144
1122
|
}
|
|
1145
1123
|
if (name === "conditionFormat") {
|
|
1146
|
-
var
|
|
1147
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
1148
|
-
|
|
1149
|
-
iconId: name,
|
|
1150
|
-
tooltip: tooltip,
|
|
1124
|
+
var items_4 = ["highlightCellRules", "itemSelectionRules", "-", "deleteRule"];
|
|
1125
|
+
return /*#__PURE__*/_react.default.createElement(_Combo.default, {
|
|
1126
|
+
iconId: "conditionFormat",
|
|
1151
1127
|
key: name,
|
|
1152
|
-
|
|
1128
|
+
tooltip: toolbar.conditionalFormat,
|
|
1129
|
+
showArrow: false
|
|
1130
|
+
}, function (setOpen) {
|
|
1131
|
+
return /*#__PURE__*/_react.default.createElement(_ConditionFormat.default, {
|
|
1132
|
+
items: items_4,
|
|
1133
|
+
setOpen: setOpen
|
|
1134
|
+
});
|
|
1153
1135
|
});
|
|
1154
1136
|
}
|
|
1155
1137
|
if (name === "image") {
|
|
@@ -1342,7 +1324,7 @@ var Toolbar = function Toolbar(_a) {
|
|
|
1342
1324
|
});
|
|
1343
1325
|
}
|
|
1344
1326
|
if (name === "border") {
|
|
1345
|
-
var
|
|
1327
|
+
var items_5 = [{
|
|
1346
1328
|
text: border.borderTop,
|
|
1347
1329
|
value: "border-top",
|
|
1348
1330
|
icon: "BorderTop"
|
|
@@ -1397,7 +1379,7 @@ var Toolbar = function Toolbar(_a) {
|
|
|
1397
1379
|
}, function (setOpen) {
|
|
1398
1380
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
1399
1381
|
className: "fortune-toolbar-select fortune-border-grid"
|
|
1400
|
-
},
|
|
1382
|
+
}, items_5.map(function (_a) {
|
|
1401
1383
|
var value = _a.value,
|
|
1402
1384
|
icon = _a.icon;
|
|
1403
1385
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -1418,7 +1400,7 @@ var Toolbar = function Toolbar(_a) {
|
|
|
1418
1400
|
});
|
|
1419
1401
|
}
|
|
1420
1402
|
if (name === "freeze") {
|
|
1421
|
-
var
|
|
1403
|
+
var items_6 = [{
|
|
1422
1404
|
text: freezen.freezenRowRange,
|
|
1423
1405
|
value: "freeze-row"
|
|
1424
1406
|
}, {
|
|
@@ -1442,7 +1424,7 @@ var Toolbar = function Toolbar(_a) {
|
|
|
1442
1424
|
});
|
|
1443
1425
|
}
|
|
1444
1426
|
}, function (setOpen) {
|
|
1445
|
-
return /*#__PURE__*/_react.default.createElement(_Select.default, null,
|
|
1427
|
+
return /*#__PURE__*/_react.default.createElement(_Select.default, null, items_6.map(function (_a) {
|
|
1446
1428
|
var text = _a.text,
|
|
1447
1429
|
value = _a.value;
|
|
1448
1430
|
return /*#__PURE__*/_react.default.createElement(_Select.Option, {
|
|
@@ -1464,7 +1446,7 @@ var Toolbar = function Toolbar(_a) {
|
|
|
1464
1446
|
});
|
|
1465
1447
|
}
|
|
1466
1448
|
if (name === "text-wrap") {
|
|
1467
|
-
var
|
|
1449
|
+
var items_7 = [{
|
|
1468
1450
|
text: textWrap.clip,
|
|
1469
1451
|
iconId: "text-clip",
|
|
1470
1452
|
value: "clip"
|
|
@@ -1477,9 +1459,9 @@ var Toolbar = function Toolbar(_a) {
|
|
|
1477
1459
|
iconId: "text-wrap",
|
|
1478
1460
|
value: "wrap"
|
|
1479
1461
|
}];
|
|
1480
|
-
var curr_3 =
|
|
1462
|
+
var curr_3 = items_7[0];
|
|
1481
1463
|
if ((cell === null || cell === void 0 ? void 0 : cell.tb) != null) {
|
|
1482
|
-
curr_3 = _lodash.default.get(
|
|
1464
|
+
curr_3 = _lodash.default.get(items_7, cell.tb);
|
|
1483
1465
|
}
|
|
1484
1466
|
return /*#__PURE__*/_react.default.createElement(_Combo.default, {
|
|
1485
1467
|
iconId: curr_3.iconId,
|
|
@@ -1496,7 +1478,7 @@ var Toolbar = function Toolbar(_a) {
|
|
|
1496
1478
|
justifyContent: "center",
|
|
1497
1479
|
gap: 4
|
|
1498
1480
|
}
|
|
1499
|
-
},
|
|
1481
|
+
}, items_7.map(function (_a) {
|
|
1500
1482
|
var iconId = _a.iconId,
|
|
1501
1483
|
value = _a.value;
|
|
1502
1484
|
return /*#__PURE__*/_react.default.createElement(_ui.IconButton, {
|
|
@@ -1527,7 +1509,7 @@ var Toolbar = function Toolbar(_a) {
|
|
|
1527
1509
|
});
|
|
1528
1510
|
}
|
|
1529
1511
|
if (name === "text-rotation") {
|
|
1530
|
-
var
|
|
1512
|
+
var items_8 = [{
|
|
1531
1513
|
text: rotation.none,
|
|
1532
1514
|
iconId: "text-rotation-none",
|
|
1533
1515
|
value: "none"
|
|
@@ -1552,9 +1534,9 @@ var Toolbar = function Toolbar(_a) {
|
|
|
1552
1534
|
iconId: "text-rotation-down",
|
|
1553
1535
|
value: "rotation-down"
|
|
1554
1536
|
}];
|
|
1555
|
-
var curr =
|
|
1537
|
+
var curr = items_8[0];
|
|
1556
1538
|
if ((cell === null || cell === void 0 ? void 0 : cell.tr) != null) {
|
|
1557
|
-
curr = _lodash.default.get(
|
|
1539
|
+
curr = _lodash.default.get(items_8, cell.tr);
|
|
1558
1540
|
}
|
|
1559
1541
|
return /*#__PURE__*/_react.default.createElement(_Combo.default, {
|
|
1560
1542
|
iconId: curr.iconId,
|
|
@@ -1562,7 +1544,7 @@ var Toolbar = function Toolbar(_a) {
|
|
|
1562
1544
|
tooltip: toolbar.textRotate,
|
|
1563
1545
|
showArrow: false
|
|
1564
1546
|
}, function (setOpen) {
|
|
1565
|
-
return /*#__PURE__*/_react.default.createElement(_Select.default, null,
|
|
1547
|
+
return /*#__PURE__*/_react.default.createElement(_Select.default, null, items_8.map(function (_a) {
|
|
1566
1548
|
var text = _a.text,
|
|
1567
1549
|
iconId = _a.iconId,
|
|
1568
1550
|
value = _a.value;
|
|
@@ -1587,7 +1569,7 @@ var Toolbar = function Toolbar(_a) {
|
|
|
1587
1569
|
});
|
|
1588
1570
|
}
|
|
1589
1571
|
if (name === "filter") {
|
|
1590
|
-
var
|
|
1572
|
+
var items_9 = [{
|
|
1591
1573
|
iconId: "sort-asc",
|
|
1592
1574
|
value: "sort-asc",
|
|
1593
1575
|
text: sort.asc,
|
|
@@ -1637,7 +1619,7 @@ var Toolbar = function Toolbar(_a) {
|
|
|
1637
1619
|
style: {
|
|
1638
1620
|
minWidth: "11.25rem"
|
|
1639
1621
|
}
|
|
1640
|
-
},
|
|
1622
|
+
}, items_9.map(function (_a, index) {
|
|
1641
1623
|
var text = _a.text,
|
|
1642
1624
|
iconId = _a.iconId,
|
|
1643
1625
|
value = _a.value,
|
|
@@ -1686,18 +1668,12 @@ var Toolbar = function Toolbar(_a) {
|
|
|
1686
1668
|
}
|
|
1687
1669
|
}));
|
|
1688
1670
|
}, [toolbar, cell, setContext, refs.cellInput, refs.fxInput, refs.globalCache, defaultFormat, align, handleUndo, handleRedo, flowdata, formula, showDuneModal, merge, border, freezen, screenshot, sort, textWrap, rotation, filter, splitText, findAndReplace, context.luckysheet_select_save, context.defaultFontSize, context.allowEdit, comment, fontarray, hideSubMenu, showSubMenu, refs.canvas, customColor, customStyle, toolbarFormat.moreCurrency, (_d = context.dataVerification) === null || _d === void 0 ? void 0 : _d.dataRegulation]);
|
|
1689
|
-
(0, _react.useEffect)(function () {
|
|
1690
|
-
console.log("context", context);
|
|
1691
|
-
}, [context]);
|
|
1692
1671
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
1693
1672
|
ref: containerRef,
|
|
1694
1673
|
className: "fortune-toolbar",
|
|
1695
1674
|
"aria-label": toolbar.toolbar
|
|
1696
1675
|
}, /*#__PURE__*/_react.default.createElement(_dataVerificationPortal.default, {
|
|
1697
1676
|
visible: showDataValidation
|
|
1698
|
-
}), /*#__PURE__*/_react.default.createElement(_conditionalFormatPortal.default, {
|
|
1699
|
-
visible: showConditionalFormat,
|
|
1700
|
-
context: context
|
|
1701
1677
|
}), /*#__PURE__*/_react.default.createElement("input", {
|
|
1702
1678
|
id: "fortune-img-upload",
|
|
1703
1679
|
className: "test-fortune-img-upload",
|
|
@@ -1196,8 +1196,4 @@ export declare function generateAPIs(context: Context, setContext: (recipe: (ctx
|
|
|
1196
1196
|
getRefs: () => any;
|
|
1197
1197
|
getShowDialog: () => typeof useDialog;
|
|
1198
1198
|
getSplitColComponent: () => import("react").FC<{}>;
|
|
1199
|
-
getConditionalFormatComponent: () => import("react").FC<{
|
|
1200
|
-
type?: string | undefined;
|
|
1201
|
-
context?: any;
|
|
1202
|
-
}>;
|
|
1203
1199
|
};
|
|
@@ -10,7 +10,6 @@ var _lodash = _interopRequireDefault(require("lodash"));
|
|
|
10
10
|
var _cryptoApi = require("../../utils/cryptoApi");
|
|
11
11
|
var _useDialog = require("../../hooks/useDialog");
|
|
12
12
|
var _SplitColumn = require("../../components/SplitColumn");
|
|
13
|
-
var _ConditionRules = _interopRequireDefault(require("../ConditionFormat/ConditionRules"));
|
|
14
13
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
15
14
|
var __assign = void 0 && (void 0).__assign || function () {
|
|
16
15
|
__assign = Object.assign || function (t) {
|
|
@@ -460,9 +459,6 @@ function generateAPIs(context, setContext, handleUndo, handleRedo, settings, cel
|
|
|
460
459
|
},
|
|
461
460
|
getSplitColComponent: function getSplitColComponent() {
|
|
462
461
|
return _SplitColumn.SplitColumn;
|
|
463
|
-
},
|
|
464
|
-
getConditionalFormatComponent: function getConditionalFormatComponent() {
|
|
465
|
-
return _ConditionRules.default;
|
|
466
462
|
}
|
|
467
463
|
};
|
|
468
464
|
}
|
|
@@ -1203,9 +1203,5 @@ declare const Workbook: React.ForwardRefExoticComponent<Settings & AdditionalPro
|
|
|
1203
1203
|
getRefs: () => any;
|
|
1204
1204
|
getShowDialog: () => typeof import("../../hooks/useDialog").useDialog;
|
|
1205
1205
|
getSplitColComponent: () => React.FC<{}>;
|
|
1206
|
-
getConditionalFormatComponent: () => React.FC<{
|
|
1207
|
-
type?: string | undefined;
|
|
1208
|
-
context?: any;
|
|
1209
|
-
}>;
|
|
1210
1206
|
}>>;
|
|
1211
1207
|
export default Workbook;
|
|
@@ -362,9 +362,6 @@ var Workbook = /*#__PURE__*/_react.default.forwardRef(function (_a, ref) {
|
|
|
362
362
|
refs: refs
|
|
363
363
|
};
|
|
364
364
|
}, [context, handleRedo, handleUndo, mergedSettings, refs, setContextWithProduce]);
|
|
365
|
-
var _e = (0, _react.useState)(false),
|
|
366
|
-
show = _e[0],
|
|
367
|
-
setShow = _e[1];
|
|
368
365
|
(0, _react.useEffect)(function () {
|
|
369
366
|
if (!_lodash.default.isEmpty(context.luckysheetfile)) {
|
|
370
367
|
onChange === null || onChange === void 0 ? void 0 : onChange(context.luckysheetfile);
|
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.65",
|
|
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.65",
|
|
20
20
|
"@fileverse/ui": "^4.1.7-patch-40",
|
|
21
21
|
"@tippyjs/react": "^4.2.6",
|
|
22
22
|
"@types/regenerator-runtime": "^0.13.6",
|
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
.toolbar-container {
|
|
2
|
-
width: 100%;
|
|
3
|
-
max-width: 896px;
|
|
4
|
-
background-color: white;
|
|
5
|
-
border-radius: 4px;
|
|
6
|
-
border: 1px solid hsl(var(--color-border-default, #E8EBEC));
|
|
7
|
-
overflow: hidden;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
.toolbar-header {
|
|
11
|
-
background-color: #dcfce7;
|
|
12
|
-
padding: 4px 16px;
|
|
13
|
-
border-radius: var(--border-radius-sm, 4px) var(--border-radius-sm, 4px) var(--border-radius-none, 0) var(--border-radius-none, 0);
|
|
14
|
-
border-bottom: 1px solid hsl(var(--color-border-default, #E8EBEC));
|
|
15
|
-
background: hsl(var(--color-bg-success-light, #DDFBDF));
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
.toolbar-title {
|
|
19
|
-
color: hsl(var(--color-text-success, #177E23));
|
|
20
|
-
font-family: "Helvetica Neue";
|
|
21
|
-
font-size: 14px;
|
|
22
|
-
font-style: normal;
|
|
23
|
-
font-weight: 400;
|
|
24
|
-
line-height: 20px;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
.toolbar-content {
|
|
28
|
-
padding: 4px;
|
|
29
|
-
display: flex;
|
|
30
|
-
gap: 16px;
|
|
31
|
-
align-items: center;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
.toolbar-button {
|
|
35
|
-
width: 48px;
|
|
36
|
-
height: 48px;
|
|
37
|
-
display: flex;
|
|
38
|
-
align-items: center;
|
|
39
|
-
justify-content: center;
|
|
40
|
-
background-color: white;
|
|
41
|
-
border: 1px solid #e5e7eb;
|
|
42
|
-
border-radius: 6px;
|
|
43
|
-
cursor: pointer;
|
|
44
|
-
transition: all 0.2s ease;
|
|
45
|
-
padding: 0;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
.toolbar-button:hover {
|
|
49
|
-
background-color: #f9fafb;
|
|
50
|
-
border-color: #d1d5db;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
.toolbar-button:active {
|
|
54
|
-
transform: scale(0.95);
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
.button-text {
|
|
58
|
-
font-size: 24px;
|
|
59
|
-
color: #1f2937;
|
|
60
|
-
font-weight: 500;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
.button-text.bold {
|
|
64
|
-
font-weight: 700;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
.button-text.italic {
|
|
68
|
-
font-style: italic;
|
|
69
|
-
font-family: Georgia, serif;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
.button-text.underline {
|
|
73
|
-
text-decoration: underline;
|
|
74
|
-
text-decoration-thickness: 2px;
|
|
75
|
-
text-underline-offset: 2px;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
.button-text.strikethrough {
|
|
79
|
-
text-decoration: line-through;
|
|
80
|
-
text-decoration-thickness: 2px;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
.button-text.color-button {
|
|
84
|
-
position: relative;
|
|
85
|
-
color: #16a34a;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
.button-text.color-button::after {
|
|
89
|
-
content: "";
|
|
90
|
-
position: absolute;
|
|
91
|
-
bottom: -4px;
|
|
92
|
-
left: 0;
|
|
93
|
-
right: 0;
|
|
94
|
-
height: 3px;
|
|
95
|
-
background-color: #16a34a;
|
|
96
|
-
border-radius: 2px;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
.button-icon {
|
|
100
|
-
width: 24px;
|
|
101
|
-
height: 24px;
|
|
102
|
-
color: #1f2937;
|
|
103
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { createPortal } from "react-dom";
|
|
3
|
-
import ConditionRules from "../ConditionFormat/ConditionRules";
|
|
4
|
-
var ConditionalFormatPortal = function ConditionalFormatPortal(_a) {
|
|
5
|
-
var visible = _a.visible,
|
|
6
|
-
context = _a.context;
|
|
7
|
-
var container = document.getElementById("placeholder-conditional-format");
|
|
8
|
-
if (!visible || !container) return null;
|
|
9
|
-
return /*#__PURE__*/createPortal(/*#__PURE__*/React.createElement(ConditionRules, {
|
|
10
|
-
context: context
|
|
11
|
-
}), container);
|
|
12
|
-
};
|
|
13
|
-
export default ConditionalFormatPortal;
|
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
.toolbar-container {
|
|
2
|
-
width: 100%;
|
|
3
|
-
max-width: 896px;
|
|
4
|
-
background-color: white;
|
|
5
|
-
border-radius: 4px;
|
|
6
|
-
border: 1px solid hsl(var(--color-border-default, #E8EBEC));
|
|
7
|
-
overflow: hidden;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
.toolbar-header {
|
|
11
|
-
background-color: #dcfce7;
|
|
12
|
-
padding: 4px 16px;
|
|
13
|
-
border-radius: var(--border-radius-sm, 4px) var(--border-radius-sm, 4px) var(--border-radius-none, 0) var(--border-radius-none, 0);
|
|
14
|
-
border-bottom: 1px solid hsl(var(--color-border-default, #E8EBEC));
|
|
15
|
-
background: hsl(var(--color-bg-success-light, #DDFBDF));
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
.toolbar-title {
|
|
19
|
-
color: hsl(var(--color-text-success, #177E23));
|
|
20
|
-
font-family: "Helvetica Neue";
|
|
21
|
-
font-size: 14px;
|
|
22
|
-
font-style: normal;
|
|
23
|
-
font-weight: 400;
|
|
24
|
-
line-height: 20px;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
.toolbar-content {
|
|
28
|
-
padding: 4px;
|
|
29
|
-
display: flex;
|
|
30
|
-
gap: 16px;
|
|
31
|
-
align-items: center;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
.toolbar-button {
|
|
35
|
-
width: 48px;
|
|
36
|
-
height: 48px;
|
|
37
|
-
display: flex;
|
|
38
|
-
align-items: center;
|
|
39
|
-
justify-content: center;
|
|
40
|
-
background-color: white;
|
|
41
|
-
border: 1px solid #e5e7eb;
|
|
42
|
-
border-radius: 6px;
|
|
43
|
-
cursor: pointer;
|
|
44
|
-
transition: all 0.2s ease;
|
|
45
|
-
padding: 0;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
.toolbar-button:hover {
|
|
49
|
-
background-color: #f9fafb;
|
|
50
|
-
border-color: #d1d5db;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
.toolbar-button:active {
|
|
54
|
-
transform: scale(0.95);
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
.button-text {
|
|
58
|
-
font-size: 24px;
|
|
59
|
-
color: #1f2937;
|
|
60
|
-
font-weight: 500;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
.button-text.bold {
|
|
64
|
-
font-weight: 700;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
.button-text.italic {
|
|
68
|
-
font-style: italic;
|
|
69
|
-
font-family: Georgia, serif;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
.button-text.underline {
|
|
73
|
-
text-decoration: underline;
|
|
74
|
-
text-decoration-thickness: 2px;
|
|
75
|
-
text-underline-offset: 2px;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
.button-text.strikethrough {
|
|
79
|
-
text-decoration: line-through;
|
|
80
|
-
text-decoration-thickness: 2px;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
.button-text.color-button {
|
|
84
|
-
position: relative;
|
|
85
|
-
color: #16a34a;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
.button-text.color-button::after {
|
|
89
|
-
content: "";
|
|
90
|
-
position: absolute;
|
|
91
|
-
bottom: -4px;
|
|
92
|
-
left: 0;
|
|
93
|
-
right: 0;
|
|
94
|
-
height: 3px;
|
|
95
|
-
background-color: #16a34a;
|
|
96
|
-
border-radius: 2px;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
.button-icon {
|
|
100
|
-
width: 24px;
|
|
101
|
-
height: 24px;
|
|
102
|
-
color: #1f2937;
|
|
103
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
var _react = _interopRequireDefault(require("react"));
|
|
8
|
-
var _reactDom = require("react-dom");
|
|
9
|
-
var _ConditionRules = _interopRequireDefault(require("../ConditionFormat/ConditionRules"));
|
|
10
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
11
|
-
var ConditionalFormatPortal = function ConditionalFormatPortal(_a) {
|
|
12
|
-
var visible = _a.visible,
|
|
13
|
-
context = _a.context;
|
|
14
|
-
var container = document.getElementById("placeholder-conditional-format");
|
|
15
|
-
if (!visible || !container) return null;
|
|
16
|
-
return /*#__PURE__*/(0, _reactDom.createPortal)(/*#__PURE__*/_react.default.createElement(_ConditionRules.default, {
|
|
17
|
-
context: context
|
|
18
|
-
}), container);
|
|
19
|
-
};
|
|
20
|
-
var _default = exports.default = ConditionalFormatPortal;
|