@fileverse-dev/fortune-react 1.1.90 → 1.1.92
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/DataVerification/ColorPicker.d.ts +9 -0
- package/es/components/DataVerification/ColorPicker.js +98 -0
- package/es/components/DataVerification/DropdownList.js +22 -7
- package/es/components/DataVerification/DropdownOption.d.ts +11 -0
- package/es/components/DataVerification/DropdownOption.js +264 -0
- package/es/components/DataVerification/index.css +4 -0
- package/es/components/DataVerification/index.js +62 -14
- package/es/components/SheetOverlay/drag_and_drop/column-helpers.js +0 -2
- package/es/components/SheetOverlay/drag_and_drop/row-helpers.js +0 -2
- package/es/components/SheetOverlay/index.js +1 -6
- package/es/components/Toolbar/index.js +44 -45
- package/es/components/Workbook/api.d.ts +1 -0
- package/es/components/Workbook/api.js +2 -0
- package/es/components/Workbook/index.d.ts +1 -0
- package/lib/components/DataVerification/ColorPicker.d.ts +9 -0
- package/lib/components/DataVerification/ColorPicker.js +106 -0
- package/lib/components/DataVerification/DropdownList.js +22 -7
- package/lib/components/DataVerification/DropdownOption.d.ts +11 -0
- package/lib/components/DataVerification/DropdownOption.js +271 -0
- package/lib/components/DataVerification/index.css +4 -0
- package/lib/components/DataVerification/index.js +61 -13
- package/lib/components/SheetOverlay/drag_and_drop/column-helpers.js +0 -2
- package/lib/components/SheetOverlay/drag_and_drop/row-helpers.js +0 -2
- package/lib/components/SheetOverlay/index.js +1 -6
- package/lib/components/Toolbar/index.js +44 -45
- package/lib/components/Workbook/api.d.ts +1 -0
- package/lib/components/Workbook/api.js +2 -0
- package/lib/components/Workbook/index.d.ts +1 -0
- package/package.json +2 -2
|
@@ -8,6 +8,7 @@ exports.default = void 0;
|
|
|
8
8
|
var _fortuneCore = require("@fileverse-dev/fortune-core");
|
|
9
9
|
var _ui = require("@fileverse/ui");
|
|
10
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
+
var _DropdownOption = _interopRequireDefault(require("./DropdownOption"));
|
|
11
12
|
var _context = _interopRequireDefault(require("../../context"));
|
|
12
13
|
var _useDialog = require("../../hooks/useDialog");
|
|
13
14
|
var _datepickerStyles = require("../../utils/datepickerStyles");
|
|
@@ -24,6 +25,9 @@ var __assign = void 0 && (void 0).__assign || function () {
|
|
|
24
25
|
};
|
|
25
26
|
return __assign.apply(this, arguments);
|
|
26
27
|
};
|
|
28
|
+
function createId() {
|
|
29
|
+
return "".concat(Date.now(), "_").concat(Math.random().toString(36).slice(2));
|
|
30
|
+
}
|
|
27
31
|
(0, _datepickerStyles.injectDatepickerStyles)();
|
|
28
32
|
var DataVerification = function DataVerification() {
|
|
29
33
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
|
@@ -38,6 +42,56 @@ var DataVerification = function DataVerification() {
|
|
|
38
42
|
button = _r.button,
|
|
39
43
|
generalDialog = _r.generalDialog;
|
|
40
44
|
var dateCondition = (0, _react.useState)(["between", "notBetween", "equal", "notEqualTo", "earlierThan", "noEarlierThan", "laterThan", "noLaterThan"])[0];
|
|
45
|
+
function getSheetIndex() {
|
|
46
|
+
var _a;
|
|
47
|
+
for (var i = 0; i < context.luckysheetfile.length; i += 1) {
|
|
48
|
+
if (((_a = context.luckysheetfile[i]) === null || _a === void 0 ? void 0 : _a.id) === context.currentSheetId) {
|
|
49
|
+
return i;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
return null;
|
|
53
|
+
}
|
|
54
|
+
var _s = (0, _react.useState)([]),
|
|
55
|
+
optionItems = _s[0],
|
|
56
|
+
setOptionItems = _s[1];
|
|
57
|
+
var valuesFromArray = optionItems.map(function (i) {
|
|
58
|
+
return i.value;
|
|
59
|
+
}).join(",");
|
|
60
|
+
var colors = optionItems.map(function (i) {
|
|
61
|
+
return i.color;
|
|
62
|
+
}).join(",");
|
|
63
|
+
(0, _react.useEffect)(function () {
|
|
64
|
+
setContext(function (ctx) {
|
|
65
|
+
ctx.dataVerification.dataRegulation.color = colors;
|
|
66
|
+
ctx.dataVerification.dataRegulation.value1 = valuesFromArray;
|
|
67
|
+
});
|
|
68
|
+
}, [optionItems]);
|
|
69
|
+
(0, _react.useEffect)(function () {
|
|
70
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
71
|
+
var selectRow = (_c = (_b = (_a = context.luckysheet_select_save) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.row) === null || _c === void 0 ? void 0 : _c[0];
|
|
72
|
+
var selectCol = (_f = (_e = (_d = context.luckysheet_select_save) === null || _d === void 0 ? void 0 : _d[0]) === null || _e === void 0 ? void 0 : _e.column) === null || _f === void 0 ? void 0 : _f[0];
|
|
73
|
+
var sheetIndex = getSheetIndex();
|
|
74
|
+
var dataVerificationInfo = context.luckysheetfile[sheetIndex].dataVerification;
|
|
75
|
+
var value = (_g = dataVerificationInfo === null || dataVerificationInfo === void 0 ? void 0 : dataVerificationInfo["".concat(selectRow, "_").concat(selectCol)]) === null || _g === void 0 ? void 0 : _g.value1;
|
|
76
|
+
var color = (_h = dataVerificationInfo === null || dataVerificationInfo === void 0 ? void 0 : dataVerificationInfo["".concat(selectRow, "_").concat(selectCol)]) === null || _h === void 0 ? void 0 : _h.color;
|
|
77
|
+
if (value && color) {
|
|
78
|
+
var colorValues = color === null || color === void 0 ? void 0 : color.split(",").map(function (v) {
|
|
79
|
+
return v.trim();
|
|
80
|
+
});
|
|
81
|
+
var rgbArray_1 = [];
|
|
82
|
+
for (var i = 0; i < colorValues.length; i += 3) {
|
|
83
|
+
rgbArray_1.push(colorValues.slice(i, i + 3).join(", "));
|
|
84
|
+
}
|
|
85
|
+
value = value === null || value === void 0 ? void 0 : value.split(",");
|
|
86
|
+
setOptionItems(value.map(function (v, i) {
|
|
87
|
+
return {
|
|
88
|
+
id: createId(),
|
|
89
|
+
value: v,
|
|
90
|
+
color: rgbArray_1[i]
|
|
91
|
+
};
|
|
92
|
+
}));
|
|
93
|
+
}
|
|
94
|
+
}, []);
|
|
41
95
|
var dataSelectRange = (0, _react.useCallback)(function (type, value) {
|
|
42
96
|
hideDialog();
|
|
43
97
|
setContext(function (ctx) {
|
|
@@ -66,7 +120,7 @@ var DataVerification = function DataVerification() {
|
|
|
66
120
|
var list = (0, _fortuneCore.getDropdownList)(ctx, value1);
|
|
67
121
|
item.value1 = list.join(",");
|
|
68
122
|
}
|
|
69
|
-
var currentDataVerification = (_c = ctx.luckysheetfile[
|
|
123
|
+
var currentDataVerification = (_c = ctx.luckysheetfile[getSheetIndex()].dataVerification) !== null && _c !== void 0 ? _c : {};
|
|
70
124
|
var str = range[range.length - 1].row[0];
|
|
71
125
|
var edr = range[range.length - 1].row[1];
|
|
72
126
|
var stc = range[range.length - 1].column[0];
|
|
@@ -82,7 +136,7 @@ var DataVerification = function DataVerification() {
|
|
|
82
136
|
}
|
|
83
137
|
}
|
|
84
138
|
}
|
|
85
|
-
ctx.luckysheetfile[
|
|
139
|
+
ctx.luckysheetfile[getSheetIndex()].dataVerification = currentDataVerification;
|
|
86
140
|
}
|
|
87
141
|
});
|
|
88
142
|
} else if (type === "delete") {
|
|
@@ -93,7 +147,7 @@ var DataVerification = function DataVerification() {
|
|
|
93
147
|
showDialog(generalDialog.noSelectionError, "ok");
|
|
94
148
|
return;
|
|
95
149
|
}
|
|
96
|
-
var currentDataVerification = (_c = ctx.luckysheetfile[
|
|
150
|
+
var currentDataVerification = (_c = ctx.luckysheetfile[getSheetIndex()].dataVerification) !== null && _c !== void 0 ? _c : {};
|
|
97
151
|
var str = range[range.length - 1].row[0];
|
|
98
152
|
var edr = range[range.length - 1].row[1];
|
|
99
153
|
var stc = range[range.length - 1].column[0];
|
|
@@ -115,7 +169,7 @@ var DataVerification = function DataVerification() {
|
|
|
115
169
|
var range = ctx.luckysheet_select_save[ctx.luckysheet_select_save.length - 1];
|
|
116
170
|
rangeT = (0, _fortuneCore.getRangetxt)(context, context.currentSheetId, range, context.currentSheetId);
|
|
117
171
|
}
|
|
118
|
-
var index =
|
|
172
|
+
var index = getSheetIndex();
|
|
119
173
|
var ctxDataVerification = ctx.luckysheetfile[index].dataVerification;
|
|
120
174
|
if (ctxDataVerification) {
|
|
121
175
|
if (!ctx.luckysheet_select_save) return;
|
|
@@ -224,15 +278,9 @@ var DataVerification = function DataVerification() {
|
|
|
224
278
|
}, dataVerification[v]);
|
|
225
279
|
}))), ((_c = (_b = context.dataVerification) === null || _b === void 0 ? void 0 : _b.dataRegulation) === null || _c === void 0 ? void 0 : _c.type) === "dropdown" && (/*#__PURE__*/_react.default.createElement("div", {
|
|
226
280
|
className: "mt-4"
|
|
227
|
-
}, /*#__PURE__*/_react.default.createElement(
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
onChange: function onChange(e) {
|
|
231
|
-
var value = e.target.value;
|
|
232
|
-
setContext(function (ctx) {
|
|
233
|
-
ctx.dataVerification.dataRegulation.value1 = value;
|
|
234
|
-
});
|
|
235
|
-
}
|
|
281
|
+
}, /*#__PURE__*/_react.default.createElement(_DropdownOption.default, {
|
|
282
|
+
optionItems: optionItems,
|
|
283
|
+
setOptionItems: setOptionItems
|
|
236
284
|
}), /*#__PURE__*/_react.default.createElement("div", {
|
|
237
285
|
className: "mt-4 flex items-center"
|
|
238
286
|
}, /*#__PURE__*/_react.default.createElement(_ui.Checkbox, {
|
|
@@ -202,7 +202,6 @@ var useColumnDragAndDrop = exports.useColumnDragAndDrop = function useColumnDrag
|
|
|
202
202
|
var sourceIndex_1 = dragRef.current.source;
|
|
203
203
|
var sheetIdx_1 = (0, _fortuneCore.getSheetIndex)(context, context.currentSheetId);
|
|
204
204
|
if (sheetIdx_1 != null && sourceIndex_1 >= 0 && Number.isFinite(finalInsertionIndex_1) && finalInsertionIndex_1 >= 0) {
|
|
205
|
-
console.log("sourceIndex", sourceIndex_1);
|
|
206
205
|
setContext(function (draft) {
|
|
207
206
|
var _a, _b, _c, _d;
|
|
208
207
|
var _sheet = draft.luckysheetfile[sheetIdx_1];
|
|
@@ -307,7 +306,6 @@ var useColumnDragAndDrop = exports.useColumnDragAndDrop = function useColumnDrag
|
|
|
307
306
|
dragRef.current.startX = startX;
|
|
308
307
|
dragRef.current.source = clickedColIndex;
|
|
309
308
|
dragRef.current.active = false;
|
|
310
|
-
console.log("initiateDrag", startX);
|
|
311
309
|
dragRef.current.onDocMove = handleColumnDrag;
|
|
312
310
|
dragRef.current.onDocUp = handleColumnDragEnd;
|
|
313
311
|
document.addEventListener("mousemove", handleColumnDrag);
|
|
@@ -205,7 +205,6 @@ var useRowDragAndDrop = exports.useRowDragAndDrop = function useRowDragAndDrop(c
|
|
|
205
205
|
rows.splice(targetIndex, 0, rowData);
|
|
206
206
|
_sheet.data = rows;
|
|
207
207
|
(0, _fortuneCore.updateContextWithSheetData)(draft, _sheet.data);
|
|
208
|
-
console.log("rows", sourceIndex_1);
|
|
209
208
|
var d = (0, _fortuneCore.getFlowdata)(draft);
|
|
210
209
|
d === null || d === void 0 ? void 0 : d.forEach(function (row) {
|
|
211
210
|
row.forEach(function (cell) {
|
|
@@ -270,7 +269,6 @@ var useRowDragAndDrop = exports.useRowDragAndDrop = function useRowDragAndDrop(c
|
|
|
270
269
|
item.r += 1;
|
|
271
270
|
}
|
|
272
271
|
});
|
|
273
|
-
console.log("_sheet.calcChain", _sheet.calcChain);
|
|
274
272
|
(_b = window === null || window === void 0 ? void 0 : window.updateDataBlockCalcFunctionAfterRowDrag) === null || _b === void 0 ? void 0 : _b.call(window, sourceIndex_1, targetIndex, "row", context.currentSheetId);
|
|
275
273
|
});
|
|
276
274
|
}
|
|
@@ -22,7 +22,6 @@ var _ImgBoxs = _interopRequireDefault(require("../ImgBoxs"));
|
|
|
22
22
|
var _NotationBoxes = _interopRequireDefault(require("../NotationBoxes"));
|
|
23
23
|
var _RangeDialog = _interopRequireDefault(require("../DataVerification/RangeDialog"));
|
|
24
24
|
var _useDialog = require("../../hooks/useDialog");
|
|
25
|
-
var _SVGIcon = _interopRequireDefault(require("../SVGIcon"));
|
|
26
25
|
var _DropdownList = _interopRequireDefault(require("../DataVerification/DropdownList"));
|
|
27
26
|
var _iFrameBoxs = _interopRequireDefault(require("../IFrameBoxs/iFrameBoxs"));
|
|
28
27
|
var _ErrorState = _interopRequireDefault(require("../ErrorState"));
|
|
@@ -491,11 +490,7 @@ var SheetOverlay = function SheetOverlay() {
|
|
|
491
490
|
style: {
|
|
492
491
|
display: "none"
|
|
493
492
|
}
|
|
494
|
-
}, /*#__PURE__*/_react.default.createElement(
|
|
495
|
-
name: "caret-down-fill",
|
|
496
|
-
width: 16,
|
|
497
|
-
height: 16
|
|
498
|
-
})), context.dataVerificationDropDownList && (context.dataVerification.dataRegulation.value1 !== "" || context.dataVerification.dataRegulation.value2 !== "") && (/*#__PURE__*/_react.default.createElement(_DropdownList.default, null)), /*#__PURE__*/_react.default.createElement("div", {
|
|
493
|
+
}), context.dataVerificationDropDownList && (context.dataVerification.dataRegulation.value1 !== "" || context.dataVerification.dataRegulation.value2 !== "") && (/*#__PURE__*/_react.default.createElement(_DropdownList.default, null)), /*#__PURE__*/_react.default.createElement("div", {
|
|
499
494
|
id: "luckysheet-dataVerification-showHintBox",
|
|
500
495
|
ref: dataVerificationHintBoxRef
|
|
501
496
|
}), /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -19,7 +19,6 @@ var _SVGIcon = _interopRequireDefault(require("../SVGIcon"));
|
|
|
19
19
|
var _useDialog = require("../../hooks/useDialog");
|
|
20
20
|
var _SplitColumn = require("../SplitColumn");
|
|
21
21
|
var _LocationCondition = require("../LocationCondition");
|
|
22
|
-
var _DataVerification = _interopRequireDefault(require("../DataVerification"));
|
|
23
22
|
var _ConditionFormat = _interopRequireDefault(require("../ConditionFormat"));
|
|
24
23
|
var _CustomButton = _interopRequireDefault(require("./CustomButton"));
|
|
25
24
|
var _CustomColor = require("./CustomColor");
|
|
@@ -457,58 +456,58 @@ var CurrencySelector = exports.CurrencySelector = function CurrencySelector(_a)
|
|
|
457
456
|
}));
|
|
458
457
|
};
|
|
459
458
|
var Toolbar = function Toolbar(_a) {
|
|
460
|
-
var _b, _c, _d;
|
|
459
|
+
var _b, _c, _d, _e;
|
|
461
460
|
var setMoreItems = _a.setMoreItems,
|
|
462
461
|
moreItemsOpen = _a.moreItemsOpen,
|
|
463
462
|
onMoreToolbarItemsClose = _a.onMoreToolbarItemsClose,
|
|
464
463
|
moreToolbarItems = _a.moreToolbarItems;
|
|
465
|
-
var
|
|
466
|
-
context =
|
|
467
|
-
setContext =
|
|
468
|
-
refs =
|
|
469
|
-
settings =
|
|
470
|
-
handleUndo =
|
|
471
|
-
handleRedo =
|
|
464
|
+
var _f = (0, _react.useContext)(_context.default),
|
|
465
|
+
context = _f.context,
|
|
466
|
+
setContext = _f.setContext,
|
|
467
|
+
refs = _f.refs,
|
|
468
|
+
settings = _f.settings,
|
|
469
|
+
handleUndo = _f.handleUndo,
|
|
470
|
+
handleRedo = _f.handleRedo;
|
|
472
471
|
var contextRef = (0, _react.useRef)(context);
|
|
473
472
|
var containerRef = (0, _react.useRef)(null);
|
|
474
|
-
var
|
|
475
|
-
toolbarWrapIndex =
|
|
476
|
-
setToolbarWrapIndex =
|
|
477
|
-
var
|
|
478
|
-
itemLocations =
|
|
479
|
-
setItemLocations =
|
|
480
|
-
var
|
|
481
|
-
showDuneModal =
|
|
482
|
-
setShowDuneModal =
|
|
483
|
-
var
|
|
484
|
-
isDesktop =
|
|
485
|
-
setIsDesktop =
|
|
486
|
-
var
|
|
487
|
-
showDialog =
|
|
488
|
-
hideDialog =
|
|
473
|
+
var _g = (0, _react.useState)(-1),
|
|
474
|
+
toolbarWrapIndex = _g[0],
|
|
475
|
+
setToolbarWrapIndex = _g[1];
|
|
476
|
+
var _h = (0, _react.useState)([]),
|
|
477
|
+
itemLocations = _h[0],
|
|
478
|
+
setItemLocations = _h[1];
|
|
479
|
+
var _j = (0, _react.useState)(false),
|
|
480
|
+
showDuneModal = _j[0],
|
|
481
|
+
setShowDuneModal = _j[1];
|
|
482
|
+
var _k = (0, _react.useState)(window.innerWidth >= 1280),
|
|
483
|
+
isDesktop = _k[0],
|
|
484
|
+
setIsDesktop = _k[1];
|
|
485
|
+
var _l = (0, _useDialog.useDialog)(),
|
|
486
|
+
showDialog = _l.showDialog,
|
|
487
|
+
hideDialog = _l.hideDialog;
|
|
489
488
|
var firstSelection = (_b = context.luckysheet_select_save) === null || _b === void 0 ? void 0 : _b[0];
|
|
490
489
|
var flowdata = (0, _fortuneCore.getFlowdata)(context);
|
|
491
490
|
contextRef.current = context;
|
|
492
491
|
var row = firstSelection === null || firstSelection === void 0 ? void 0 : firstSelection.row_focus;
|
|
493
492
|
var col = firstSelection === null || firstSelection === void 0 ? void 0 : firstSelection.column_focus;
|
|
494
493
|
var cell = flowdata && row != null && col != null ? (_c = flowdata === null || flowdata === void 0 ? void 0 : flowdata[row]) === null || _c === void 0 ? void 0 : _c[col] : undefined;
|
|
495
|
-
var
|
|
496
|
-
toolbar =
|
|
497
|
-
merge =
|
|
498
|
-
border =
|
|
499
|
-
freezen =
|
|
500
|
-
defaultFmt =
|
|
501
|
-
formula =
|
|
502
|
-
sort =
|
|
503
|
-
align =
|
|
504
|
-
textWrap =
|
|
505
|
-
rotation =
|
|
506
|
-
screenshot =
|
|
507
|
-
filter =
|
|
508
|
-
splitText =
|
|
509
|
-
findAndReplace =
|
|
510
|
-
comment =
|
|
511
|
-
fontarray =
|
|
494
|
+
var _m = (0, _fortuneCore.locale)(context),
|
|
495
|
+
toolbar = _m.toolbar,
|
|
496
|
+
merge = _m.merge,
|
|
497
|
+
border = _m.border,
|
|
498
|
+
freezen = _m.freezen,
|
|
499
|
+
defaultFmt = _m.defaultFmt,
|
|
500
|
+
formula = _m.formula,
|
|
501
|
+
sort = _m.sort,
|
|
502
|
+
align = _m.align,
|
|
503
|
+
textWrap = _m.textWrap,
|
|
504
|
+
rotation = _m.rotation,
|
|
505
|
+
screenshot = _m.screenshot,
|
|
506
|
+
filter = _m.filter,
|
|
507
|
+
splitText = _m.splitText,
|
|
508
|
+
findAndReplace = _m.findAndReplace,
|
|
509
|
+
comment = _m.comment,
|
|
510
|
+
fontarray = _m.fontarray;
|
|
512
511
|
var toolbarFormat = (0, _fortuneCore.locale)(context).format;
|
|
513
512
|
var sheetWidth = context.luckysheetTableContentHW[0];
|
|
514
513
|
var currency = settings.currency;
|
|
@@ -974,8 +973,8 @@ var Toolbar = function Toolbar(_a) {
|
|
|
974
973
|
tooltip: tooltip,
|
|
975
974
|
key: name,
|
|
976
975
|
onClick: function onClick() {
|
|
977
|
-
|
|
978
|
-
|
|
976
|
+
var _a;
|
|
977
|
+
(_a = document.getElementById("data-verification-button")) === null || _a === void 0 ? void 0 : _a.click();
|
|
979
978
|
}
|
|
980
979
|
});
|
|
981
980
|
}
|
|
@@ -1652,7 +1651,7 @@ var Toolbar = function Toolbar(_a) {
|
|
|
1652
1651
|
});
|
|
1653
1652
|
}
|
|
1654
1653
|
}));
|
|
1655
|
-
}, [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]);
|
|
1654
|
+
}, [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]);
|
|
1656
1655
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
1657
1656
|
ref: containerRef,
|
|
1658
1657
|
className: "fortune-toolbar",
|
|
@@ -1669,7 +1668,7 @@ var Toolbar = function Toolbar(_a) {
|
|
|
1669
1668
|
icon: n.icon,
|
|
1670
1669
|
iconName: n.iconName
|
|
1671
1670
|
}, n.children);
|
|
1672
|
-
}), ((
|
|
1671
|
+
}), ((_e = settings.customToolbarItems) === null || _e === void 0 ? void 0 : _e.length) > 0 ? (/*#__PURE__*/_react.default.createElement(_Divider.default, {
|
|
1673
1672
|
key: "customDivider"
|
|
1674
1673
|
})) : null, (toolbarWrapIndex === -1 || isDesktop ? settings.toolbarItems : settings.toolbarItems.slice(0, toolbarWrapIndex + 1)).map(function (name, i) {
|
|
1675
1674
|
return getToolbarItem(name, i);
|
|
@@ -4,6 +4,7 @@ import { SetContextOptions } from "../../context";
|
|
|
4
4
|
export declare function generateAPIs(context: Context, setContext: (recipe: (ctx: Context) => void, options?: SetContextOptions) => void, handleUndo: () => void, handleRedo: () => void, settings: Required<Settings>, cellInput: HTMLDivElement | null, scrollbarX: HTMLDivElement | null, scrollbarY: HTMLDivElement | null, globalCache: GlobalCache | null): {
|
|
5
5
|
applyOp: (ops: Op[]) => void;
|
|
6
6
|
getCryptoPrice: typeof getCryptoPrice;
|
|
7
|
+
DataVerificationComponent: import("react").FC<{}>;
|
|
7
8
|
getCellValue: (row: number, column: number, options?: api.CommonOptions & {
|
|
8
9
|
type?: keyof Cell;
|
|
9
10
|
}) => any;
|
|
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.generateAPIs = generateAPIs;
|
|
7
7
|
var _fortuneCore = require("@fileverse-dev/fortune-core");
|
|
8
|
+
var _DataVerification = _interopRequireDefault(require("../DataVerification"));
|
|
8
9
|
var _immer = require("immer");
|
|
9
10
|
var _lodash = _interopRequireDefault(require("lodash"));
|
|
10
11
|
var _cryptoApi = require("../../utils/cryptoApi");
|
|
@@ -73,6 +74,7 @@ function generateAPIs(context, setContext, handleUndo, handleRedo, settings, cel
|
|
|
73
74
|
});
|
|
74
75
|
},
|
|
75
76
|
getCryptoPrice: _cryptoApi.getCryptoPrice,
|
|
77
|
+
DataVerificationComponent: _DataVerification.default,
|
|
76
78
|
getCellValue: function getCellValue(row, column, options) {
|
|
77
79
|
if (options === void 0) {
|
|
78
80
|
options = {};
|
|
@@ -11,6 +11,7 @@ type AdditionalProps = {
|
|
|
11
11
|
declare const Workbook: React.ForwardRefExoticComponent<Settings & AdditionalProps & React.RefAttributes<{
|
|
12
12
|
applyOp: (ops: Op[]) => void;
|
|
13
13
|
getCryptoPrice: typeof getCryptoPrice;
|
|
14
|
+
DataVerificationComponent: React.FC<{}>;
|
|
14
15
|
getCellValue: (row: number, column: number, options?: api.CommonOptions & {
|
|
15
16
|
type?: "error" | "rt" | "f" | "m" | "v" | "mc" | "ct" | "qp" | "spl" | "bg" | "lo" | "baseValue" | "baseCurrency" | "baseCurrencyPrice" | "isDataBlockFormula" | "ps" | "hl" | keyof import("@fileverse-dev/fortune-core").CellStyle | undefined;
|
|
16
17
|
}) => any;
|
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.92",
|
|
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.92",
|
|
20
20
|
"@fileverse/ui": "^4.1.7-patch-21",
|
|
21
21
|
"@tippyjs/react": "^4.2.6",
|
|
22
22
|
"@types/regenerator-runtime": "^0.13.6",
|