@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
|
@@ -115,7 +115,7 @@
|
|
|
115
115
|
}
|
|
116
116
|
|
|
117
117
|
.condition-rules-set-title {
|
|
118
|
-
margin:
|
|
118
|
+
margin: 6px 0px;
|
|
119
119
|
}
|
|
120
120
|
|
|
121
121
|
.condition-rules-setbox {
|
|
@@ -149,23 +149,13 @@
|
|
|
149
149
|
}
|
|
150
150
|
|
|
151
151
|
.condition-rules-select-color {
|
|
152
|
-
background:
|
|
153
|
-
width:
|
|
154
|
-
height:
|
|
155
|
-
border-radius:
|
|
156
|
-
border: none;
|
|
152
|
+
background: hsl(var(--color-bg-default));
|
|
153
|
+
width: 2.5rem;
|
|
154
|
+
height: 1.5rem;
|
|
155
|
+
border-radius: 4px;
|
|
157
156
|
padding: 0;
|
|
158
157
|
margin: 0;
|
|
159
158
|
cursor: pointer;
|
|
160
|
-
outline: none;
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
input[type="color"]::-webkit-color-swatch-wrapper {
|
|
164
|
-
padding: 0;
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
input[type="color"]::-webkit-color-swatch {
|
|
168
|
-
border: 1px solid #d4d4d4;
|
|
169
159
|
}
|
|
170
160
|
|
|
171
161
|
.condition-rules-between-box {
|
|
@@ -220,50 +210,3 @@ input[type="number"].condition-rules-project-input::-webkit-inner-spin-button {
|
|
|
220
210
|
input[type="number"].condition-rules-project-input {
|
|
221
211
|
-moz-appearance: textfield;
|
|
222
212
|
}
|
|
223
|
-
|
|
224
|
-
.condition-list-parent {
|
|
225
|
-
padding: 12px 8px;
|
|
226
|
-
gap: 12px;
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
.condition-list-parent:hover {
|
|
230
|
-
background-color: hsl(var(--color-bg-default-hover));
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
.condition-list-pill {
|
|
234
|
-
display: flex;
|
|
235
|
-
align-items: center;
|
|
236
|
-
justify-content: center;
|
|
237
|
-
width: 44px;
|
|
238
|
-
height: 56px;
|
|
239
|
-
padding: 4px 16px;
|
|
240
|
-
gap: 10px;
|
|
241
|
-
border-radius: 4px;
|
|
242
|
-
border: 1px solid #E8EBEC;
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
.condition-list-text {
|
|
246
|
-
font-family: "Helvetica Neue";
|
|
247
|
-
font-size: 14px;
|
|
248
|
-
font-style: normal;
|
|
249
|
-
font-weight: 500;
|
|
250
|
-
line-height: 20px;
|
|
251
|
-
}
|
|
252
|
-
|
|
253
|
-
.condition-list-type {
|
|
254
|
-
color: hsl(var(--color-text-default, #363B3F));
|
|
255
|
-
font-family: "Helvetica Neue";
|
|
256
|
-
font-size: 14px;
|
|
257
|
-
font-style: normal;
|
|
258
|
-
font-weight: 500;
|
|
259
|
-
line-height: 20px;
|
|
260
|
-
}
|
|
261
|
-
|
|
262
|
-
.condition-list-range {
|
|
263
|
-
color: hsl(var(--color-text-secondary, #77818A));
|
|
264
|
-
font-family: "Helvetica Neue";
|
|
265
|
-
font-size: 12px;
|
|
266
|
-
font-style: normal;
|
|
267
|
-
font-weight: 400;
|
|
268
|
-
line-height: 16px;
|
|
269
|
-
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { useCallback, useContext, useEffect, useRef } from "react";
|
|
2
2
|
import "./index.css";
|
|
3
|
-
import { locale } from "@fileverse-dev/fortune-core";
|
|
3
|
+
import { locale, updateItem } from "@fileverse-dev/fortune-core";
|
|
4
4
|
import _ from "lodash";
|
|
5
5
|
import WorkbookContext from "../../context";
|
|
6
6
|
import Select, { Option } from "../Toolbar/Select";
|
|
@@ -227,7 +227,9 @@ var ConditionalFormat = function ConditionalFormat(_a) {
|
|
|
227
227
|
padding: "6px 10px"
|
|
228
228
|
},
|
|
229
229
|
onClick: function onClick() {
|
|
230
|
-
setContext(function (ctx) {
|
|
230
|
+
setContext(function (ctx) {
|
|
231
|
+
updateItem(ctx, "delSheet");
|
|
232
|
+
});
|
|
231
233
|
},
|
|
232
234
|
tabIndex: 0
|
|
233
235
|
}, conditionformat[v]);
|
|
@@ -128,6 +128,7 @@ import Divider from "./Divider";
|
|
|
128
128
|
import "./index.css";
|
|
129
129
|
import Menu from "./Menu";
|
|
130
130
|
import "tippy.js/dist/tippy.css";
|
|
131
|
+
import ConditionalFormat from "../ConditionFormat";
|
|
131
132
|
import SVGIcon from "../SVGIcon";
|
|
132
133
|
import { LucideIcon as LocalLucidIcon } from "../../components/SheetOverlay/LucideIcon";
|
|
133
134
|
var ContextMenu = function ContextMenu() {
|
|
@@ -985,20 +986,50 @@ var ContextMenu = function ContextMenu() {
|
|
|
985
986
|
}), /*#__PURE__*/React.createElement("p", null, rightclick.link)));
|
|
986
987
|
}
|
|
987
988
|
if (name === "conditionFormat") {
|
|
988
|
-
|
|
989
|
+
var closeContextMenu = function closeContextMenu() {
|
|
990
|
+
return setContext(function (ctx) {
|
|
991
|
+
ctx.contextMenu = {};
|
|
992
|
+
});
|
|
993
|
+
};
|
|
994
|
+
return /*#__PURE__*/React.createElement(Tippy, {
|
|
989
995
|
key: name,
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
996
|
+
placement: "right-start",
|
|
997
|
+
interactive: true,
|
|
998
|
+
interactiveBorder: 50,
|
|
999
|
+
offset: [0, 0],
|
|
1000
|
+
arrow: false,
|
|
1001
|
+
zIndex: 3000,
|
|
1002
|
+
appendTo: document.body,
|
|
1003
|
+
onShow: function onShow() {
|
|
1004
|
+
setActiveMenu("conditionFormat");
|
|
1005
|
+
},
|
|
1006
|
+
onHide: function onHide() {
|
|
1007
|
+
if (activeMenu === "conditionFormat") setActiveMenu("");
|
|
1008
|
+
},
|
|
1009
|
+
content: /*#__PURE__*/React.createElement("div", {
|
|
1010
|
+
style: {
|
|
1011
|
+
minWidth: 220
|
|
1012
|
+
}
|
|
1013
|
+
}, /*#__PURE__*/React.createElement(ConditionalFormat, {
|
|
1014
|
+
items: ["highlightCellRules", "itemSelectionRules", "-", "deleteRule"],
|
|
1015
|
+
setOpen: closeContextMenu
|
|
1016
|
+
})),
|
|
1017
|
+
trigger: "mouseenter focus",
|
|
1018
|
+
hideOnClick: false
|
|
1019
|
+
}, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Menu, {
|
|
1020
|
+
isActive: activeMenu === "conditionFormat"
|
|
997
1021
|
}, /*#__PURE__*/React.createElement("div", {
|
|
998
|
-
className: "
|
|
1022
|
+
className: "flex items-center justify-between w-full"
|
|
1023
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
1024
|
+
className: "flex items-center gap-2 context-item"
|
|
999
1025
|
}, /*#__PURE__*/React.createElement(LucideIcon, {
|
|
1000
1026
|
name: "PaintbrushVertical"
|
|
1001
|
-
}), /*#__PURE__*/React.createElement("p", null, "Conditional
|
|
1027
|
+
}), /*#__PURE__*/React.createElement("p", null, rightclick.conditionFormat || "Conditional Format")), /*#__PURE__*/React.createElement(LucideIcon, {
|
|
1028
|
+
name: "ChevronRight",
|
|
1029
|
+
width: 16,
|
|
1030
|
+
height: 16,
|
|
1031
|
+
className: "color-text-secondary w-4 h-4"
|
|
1032
|
+
})))));
|
|
1002
1033
|
}
|
|
1003
1034
|
if (name === "clear-format") {
|
|
1004
1035
|
return /*#__PURE__*/React.createElement(Menu, {
|
|
@@ -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;
|
|
@@ -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;
|
|
@@ -127,7 +127,6 @@ import { toolbarItemClickHandler, handleTextBackground, handleTextColor, handleT
|
|
|
127
127
|
import _ from "lodash";
|
|
128
128
|
import { IconButton, LucideIcon, Tooltip, Command, CommandInput, CommandList, CommandEmpty, CommandGroup, CommandItem } from "@fileverse/ui";
|
|
129
129
|
import DataVerificationPortal from "./dataVerificationPortal";
|
|
130
|
-
import ConditionalFormatPortal from "./conditionalFormatPortal";
|
|
131
130
|
import WorkbookContext from "../../context";
|
|
132
131
|
import "./index.css";
|
|
133
132
|
import Button from "./Button";
|
|
@@ -138,6 +137,7 @@ import SVGIcon from "../SVGIcon";
|
|
|
138
137
|
import { useDialog } from "../../hooks/useDialog";
|
|
139
138
|
import { SplitColumn } from "../SplitColumn";
|
|
140
139
|
import { LocationCondition } from "../LocationCondition";
|
|
140
|
+
import ConditionalFormat from "../ConditionFormat";
|
|
141
141
|
import CustomButton from "./CustomButton";
|
|
142
142
|
import { CustomColor } from "./CustomColor";
|
|
143
143
|
import { FormatSearch } from "../FormatSearch";
|
|
@@ -596,9 +596,6 @@ var Toolbar = function Toolbar(_a) {
|
|
|
596
596
|
var _o = useState(false),
|
|
597
597
|
showDataValidation = _o[0],
|
|
598
598
|
setShowDataValidation = _o[1];
|
|
599
|
-
var _p = useState(false),
|
|
600
|
-
showConditionalFormat = _p[0],
|
|
601
|
-
setShowConditionalFormat = _p[1];
|
|
602
599
|
var dataVerificationClick = function dataVerificationClick(selectedCells) {
|
|
603
600
|
var _a;
|
|
604
601
|
var selection = api.getSelection(context);
|
|
@@ -619,26 +616,7 @@ var Toolbar = function Toolbar(_a) {
|
|
|
619
616
|
};
|
|
620
617
|
useEffect(function () {
|
|
621
618
|
window.dataVerificationClick = dataVerificationClick;
|
|
622
|
-
window.conditionalFormatClick = conditionalFormatClick;
|
|
623
619
|
}, []);
|
|
624
|
-
var conditionalFormatClick = function conditionalFormatClick(selectedCells) {
|
|
625
|
-
var _a;
|
|
626
|
-
var selection = api.getSelection(context);
|
|
627
|
-
if (!selection && !selectedCells) {
|
|
628
|
-
setContext(function (ctx) {
|
|
629
|
-
api.setSelection(ctx, [{
|
|
630
|
-
row: [0, 0],
|
|
631
|
-
column: [0, 0]
|
|
632
|
-
}], {
|
|
633
|
-
id: context.currentSheetId
|
|
634
|
-
});
|
|
635
|
-
});
|
|
636
|
-
}
|
|
637
|
-
(_a = document.getElementById("conditional-format-button")) === null || _a === void 0 ? void 0 : _a.click();
|
|
638
|
-
setTimeout(function () {
|
|
639
|
-
setShowConditionalFormat(true);
|
|
640
|
-
}, 100);
|
|
641
|
-
};
|
|
642
620
|
var getToolbarItem = useCallback(function (name, i) {
|
|
643
621
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
644
622
|
var tooltip = toolbar[name];
|
|
@@ -1134,13 +1112,17 @@ var Toolbar = function Toolbar(_a) {
|
|
|
1134
1112
|
});
|
|
1135
1113
|
}
|
|
1136
1114
|
if (name === "conditionFormat") {
|
|
1137
|
-
var
|
|
1138
|
-
return /*#__PURE__*/React.createElement(
|
|
1139
|
-
|
|
1140
|
-
iconId: name,
|
|
1141
|
-
tooltip: tooltip,
|
|
1115
|
+
var items_4 = ["highlightCellRules", "itemSelectionRules", "-", "deleteRule"];
|
|
1116
|
+
return /*#__PURE__*/React.createElement(Combo, {
|
|
1117
|
+
iconId: "conditionFormat",
|
|
1142
1118
|
key: name,
|
|
1143
|
-
|
|
1119
|
+
tooltip: toolbar.conditionalFormat,
|
|
1120
|
+
showArrow: false
|
|
1121
|
+
}, function (setOpen) {
|
|
1122
|
+
return /*#__PURE__*/React.createElement(ConditionalFormat, {
|
|
1123
|
+
items: items_4,
|
|
1124
|
+
setOpen: setOpen
|
|
1125
|
+
});
|
|
1144
1126
|
});
|
|
1145
1127
|
}
|
|
1146
1128
|
if (name === "image") {
|
|
@@ -1333,7 +1315,7 @@ var Toolbar = function Toolbar(_a) {
|
|
|
1333
1315
|
});
|
|
1334
1316
|
}
|
|
1335
1317
|
if (name === "border") {
|
|
1336
|
-
var
|
|
1318
|
+
var items_5 = [{
|
|
1337
1319
|
text: border.borderTop,
|
|
1338
1320
|
value: "border-top",
|
|
1339
1321
|
icon: "BorderTop"
|
|
@@ -1388,7 +1370,7 @@ var Toolbar = function Toolbar(_a) {
|
|
|
1388
1370
|
}, function (setOpen) {
|
|
1389
1371
|
return /*#__PURE__*/React.createElement("div", {
|
|
1390
1372
|
className: "fortune-toolbar-select fortune-border-grid"
|
|
1391
|
-
},
|
|
1373
|
+
}, items_5.map(function (_a) {
|
|
1392
1374
|
var value = _a.value,
|
|
1393
1375
|
icon = _a.icon;
|
|
1394
1376
|
return /*#__PURE__*/React.createElement("div", {
|
|
@@ -1409,7 +1391,7 @@ var Toolbar = function Toolbar(_a) {
|
|
|
1409
1391
|
});
|
|
1410
1392
|
}
|
|
1411
1393
|
if (name === "freeze") {
|
|
1412
|
-
var
|
|
1394
|
+
var items_6 = [{
|
|
1413
1395
|
text: freezen.freezenRowRange,
|
|
1414
1396
|
value: "freeze-row"
|
|
1415
1397
|
}, {
|
|
@@ -1433,7 +1415,7 @@ var Toolbar = function Toolbar(_a) {
|
|
|
1433
1415
|
});
|
|
1434
1416
|
}
|
|
1435
1417
|
}, function (setOpen) {
|
|
1436
|
-
return /*#__PURE__*/React.createElement(Select, null,
|
|
1418
|
+
return /*#__PURE__*/React.createElement(Select, null, items_6.map(function (_a) {
|
|
1437
1419
|
var text = _a.text,
|
|
1438
1420
|
value = _a.value;
|
|
1439
1421
|
return /*#__PURE__*/React.createElement(Option, {
|
|
@@ -1455,7 +1437,7 @@ var Toolbar = function Toolbar(_a) {
|
|
|
1455
1437
|
});
|
|
1456
1438
|
}
|
|
1457
1439
|
if (name === "text-wrap") {
|
|
1458
|
-
var
|
|
1440
|
+
var items_7 = [{
|
|
1459
1441
|
text: textWrap.clip,
|
|
1460
1442
|
iconId: "text-clip",
|
|
1461
1443
|
value: "clip"
|
|
@@ -1468,9 +1450,9 @@ var Toolbar = function Toolbar(_a) {
|
|
|
1468
1450
|
iconId: "text-wrap",
|
|
1469
1451
|
value: "wrap"
|
|
1470
1452
|
}];
|
|
1471
|
-
var curr_3 =
|
|
1453
|
+
var curr_3 = items_7[0];
|
|
1472
1454
|
if ((cell === null || cell === void 0 ? void 0 : cell.tb) != null) {
|
|
1473
|
-
curr_3 = _.get(
|
|
1455
|
+
curr_3 = _.get(items_7, cell.tb);
|
|
1474
1456
|
}
|
|
1475
1457
|
return /*#__PURE__*/React.createElement(Combo, {
|
|
1476
1458
|
iconId: curr_3.iconId,
|
|
@@ -1487,7 +1469,7 @@ var Toolbar = function Toolbar(_a) {
|
|
|
1487
1469
|
justifyContent: "center",
|
|
1488
1470
|
gap: 4
|
|
1489
1471
|
}
|
|
1490
|
-
},
|
|
1472
|
+
}, items_7.map(function (_a) {
|
|
1491
1473
|
var iconId = _a.iconId,
|
|
1492
1474
|
value = _a.value;
|
|
1493
1475
|
return /*#__PURE__*/React.createElement(IconButton, {
|
|
@@ -1518,7 +1500,7 @@ var Toolbar = function Toolbar(_a) {
|
|
|
1518
1500
|
});
|
|
1519
1501
|
}
|
|
1520
1502
|
if (name === "text-rotation") {
|
|
1521
|
-
var
|
|
1503
|
+
var items_8 = [{
|
|
1522
1504
|
text: rotation.none,
|
|
1523
1505
|
iconId: "text-rotation-none",
|
|
1524
1506
|
value: "none"
|
|
@@ -1543,9 +1525,9 @@ var Toolbar = function Toolbar(_a) {
|
|
|
1543
1525
|
iconId: "text-rotation-down",
|
|
1544
1526
|
value: "rotation-down"
|
|
1545
1527
|
}];
|
|
1546
|
-
var curr =
|
|
1528
|
+
var curr = items_8[0];
|
|
1547
1529
|
if ((cell === null || cell === void 0 ? void 0 : cell.tr) != null) {
|
|
1548
|
-
curr = _.get(
|
|
1530
|
+
curr = _.get(items_8, cell.tr);
|
|
1549
1531
|
}
|
|
1550
1532
|
return /*#__PURE__*/React.createElement(Combo, {
|
|
1551
1533
|
iconId: curr.iconId,
|
|
@@ -1553,7 +1535,7 @@ var Toolbar = function Toolbar(_a) {
|
|
|
1553
1535
|
tooltip: toolbar.textRotate,
|
|
1554
1536
|
showArrow: false
|
|
1555
1537
|
}, function (setOpen) {
|
|
1556
|
-
return /*#__PURE__*/React.createElement(Select, null,
|
|
1538
|
+
return /*#__PURE__*/React.createElement(Select, null, items_8.map(function (_a) {
|
|
1557
1539
|
var text = _a.text,
|
|
1558
1540
|
iconId = _a.iconId,
|
|
1559
1541
|
value = _a.value;
|
|
@@ -1578,7 +1560,7 @@ var Toolbar = function Toolbar(_a) {
|
|
|
1578
1560
|
});
|
|
1579
1561
|
}
|
|
1580
1562
|
if (name === "filter") {
|
|
1581
|
-
var
|
|
1563
|
+
var items_9 = [{
|
|
1582
1564
|
iconId: "sort-asc",
|
|
1583
1565
|
value: "sort-asc",
|
|
1584
1566
|
text: sort.asc,
|
|
@@ -1628,7 +1610,7 @@ var Toolbar = function Toolbar(_a) {
|
|
|
1628
1610
|
style: {
|
|
1629
1611
|
minWidth: "11.25rem"
|
|
1630
1612
|
}
|
|
1631
|
-
},
|
|
1613
|
+
}, items_9.map(function (_a, index) {
|
|
1632
1614
|
var text = _a.text,
|
|
1633
1615
|
iconId = _a.iconId,
|
|
1634
1616
|
value = _a.value,
|
|
@@ -1677,18 +1659,12 @@ var Toolbar = function Toolbar(_a) {
|
|
|
1677
1659
|
}
|
|
1678
1660
|
}));
|
|
1679
1661
|
}, [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]);
|
|
1680
|
-
useEffect(function () {
|
|
1681
|
-
console.log("context", context);
|
|
1682
|
-
}, [context]);
|
|
1683
1662
|
return /*#__PURE__*/React.createElement("div", {
|
|
1684
1663
|
ref: containerRef,
|
|
1685
1664
|
className: "fortune-toolbar",
|
|
1686
1665
|
"aria-label": toolbar.toolbar
|
|
1687
1666
|
}, /*#__PURE__*/React.createElement(DataVerificationPortal, {
|
|
1688
1667
|
visible: showDataValidation
|
|
1689
|
-
}), /*#__PURE__*/React.createElement(ConditionalFormatPortal, {
|
|
1690
|
-
visible: showConditionalFormat,
|
|
1691
|
-
context: context
|
|
1692
1668
|
}), /*#__PURE__*/React.createElement("input", {
|
|
1693
1669
|
id: "fortune-img-upload",
|
|
1694
1670
|
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
|
};
|
|
@@ -14,7 +14,6 @@ import _ from "lodash";
|
|
|
14
14
|
import { getCryptoPrice } from "../../utils/cryptoApi";
|
|
15
15
|
import { useDialog } from "../../hooks/useDialog";
|
|
16
16
|
import { SplitColumn } from "../../components/SplitColumn";
|
|
17
|
-
import ConditionRules from "../ConditionFormat/ConditionRules";
|
|
18
17
|
export function generateAPIs(context, setContext, handleUndo, handleRedo, settings, cellInput, scrollbarX, scrollbarY, globalCache, refs) {
|
|
19
18
|
return {
|
|
20
19
|
applyOp: function applyOp(ops) {
|
|
@@ -453,9 +452,6 @@ export function generateAPIs(context, setContext, handleUndo, handleRedo, settin
|
|
|
453
452
|
},
|
|
454
453
|
getSplitColComponent: function getSplitColComponent() {
|
|
455
454
|
return SplitColumn;
|
|
456
|
-
},
|
|
457
|
-
getConditionalFormatComponent: function getConditionalFormatComponent() {
|
|
458
|
-
return ConditionRules;
|
|
459
455
|
}
|
|
460
456
|
};
|
|
461
457
|
}
|
|
@@ -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;
|
|
@@ -353,9 +353,6 @@ var Workbook = /*#__PURE__*/React.forwardRef(function (_a, ref) {
|
|
|
353
353
|
refs: refs
|
|
354
354
|
};
|
|
355
355
|
}, [context, handleRedo, handleUndo, mergedSettings, refs, setContextWithProduce]);
|
|
356
|
-
var _e = useState(false),
|
|
357
|
-
show = _e[0],
|
|
358
|
-
setShow = _e[1];
|
|
359
356
|
useEffect(function () {
|
|
360
357
|
if (!_.isEmpty(context.luckysheetfile)) {
|
|
361
358
|
onChange === null || onChange === void 0 ? void 0 : onChange(context.luckysheetfile);
|