@fileverse-dev/fortune-react 1.0.2-mod-22 → 1.0.2-mod-20-patch-1
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/dist/components/Workbook/api.d.ts +1048 -2
- package/dist/components/Workbook/index.d.ts +1046 -0
- package/dist/index.css +8 -38
- package/dist/index.esm.css +8 -38
- package/dist/index.esm.js +178 -175
- package/dist/index.js +178 -175
- package/dist/index.umd.css +8 -38
- package/dist/index.umd.js +183 -63697
- package/dist/index.umd.min.css +1 -1
- package/dist/index.umd.min.js +3 -42
- package/package.json +2 -3
package/dist/index.css
CHANGED
|
@@ -1187,11 +1187,11 @@ html::-webkit-scrollbar-button {
|
|
|
1187
1187
|
}
|
|
1188
1188
|
|
|
1189
1189
|
.fortune-dialog {
|
|
1190
|
-
min-width: 368px;
|
|
1191
1190
|
max-width: 90%;
|
|
1192
1191
|
max-height: 90%;
|
|
1193
|
-
|
|
1194
|
-
|
|
1192
|
+
overflow: scroll;
|
|
1193
|
+
border-radius: 6px;
|
|
1194
|
+
background: white;
|
|
1195
1195
|
box-shadow: rgb(0 0 0 / 10%) 5px 5px 30px;
|
|
1196
1196
|
box-sizing: border-box;
|
|
1197
1197
|
overflow: auto;
|
|
@@ -1251,11 +1251,10 @@ html::-webkit-scrollbar-button {
|
|
|
1251
1251
|
opacity: 0.7;
|
|
1252
1252
|
}
|
|
1253
1253
|
|
|
1254
|
-
@import "@fileverse/ui/styles";
|
|
1255
1254
|
/*查找替换弹出框样式*/
|
|
1256
1255
|
#fortune-search-replace {
|
|
1257
1256
|
position: absolute;
|
|
1258
|
-
|
|
1257
|
+
padding: 30px 42px;
|
|
1259
1258
|
z-index: 1002;
|
|
1260
1259
|
}
|
|
1261
1260
|
|
|
@@ -1337,7 +1336,10 @@ html::-webkit-scrollbar-button {
|
|
|
1337
1336
|
}
|
|
1338
1337
|
|
|
1339
1338
|
#fortune-search-replace #searchAllbox {
|
|
1340
|
-
|
|
1339
|
+
height: 210px;
|
|
1340
|
+
border: 1px solid #d4d4d4;
|
|
1341
|
+
margin-top: 10px;
|
|
1342
|
+
overflow-y: auto;
|
|
1341
1343
|
position: relative;
|
|
1342
1344
|
}
|
|
1343
1345
|
|
|
@@ -1411,38 +1413,6 @@ html::-webkit-scrollbar-button {
|
|
|
1411
1413
|
white-space: nowrap;
|
|
1412
1414
|
}
|
|
1413
1415
|
|
|
1414
|
-
.find-replace-label {
|
|
1415
|
-
min-width: 100px;
|
|
1416
|
-
}
|
|
1417
|
-
|
|
1418
|
-
.find-replace-table-cell {
|
|
1419
|
-
min-width: 154px;
|
|
1420
|
-
}
|
|
1421
|
-
|
|
1422
|
-
/* Add scrollbar styles */
|
|
1423
|
-
#fortune-search-replace .table-container {
|
|
1424
|
-
scrollbar-width: thin;
|
|
1425
|
-
scrollbar-color: #babac0 transparent;
|
|
1426
|
-
}
|
|
1427
|
-
|
|
1428
|
-
#fortune-search-replace .table-container::-webkit-scrollbar {
|
|
1429
|
-
width: 8px;
|
|
1430
|
-
height: 8px;
|
|
1431
|
-
}
|
|
1432
|
-
|
|
1433
|
-
#fortune-search-replace .table-container::-webkit-scrollbar-track {
|
|
1434
|
-
background-color: transparent;
|
|
1435
|
-
}
|
|
1436
|
-
|
|
1437
|
-
#fortune-search-replace .table-container::-webkit-scrollbar-thumb {
|
|
1438
|
-
background-color: #babac0;
|
|
1439
|
-
border-radius: 16px;
|
|
1440
|
-
}
|
|
1441
|
-
|
|
1442
|
-
#fortune-search-replace .table-container::-webkit-scrollbar-button {
|
|
1443
|
-
display: none;
|
|
1444
|
-
}
|
|
1445
|
-
|
|
1446
1416
|
.fortune-link-modify-modal {
|
|
1447
1417
|
position: absolute;
|
|
1448
1418
|
overflow: hidden;
|
package/dist/index.esm.css
CHANGED
|
@@ -1187,11 +1187,11 @@ html::-webkit-scrollbar-button {
|
|
|
1187
1187
|
}
|
|
1188
1188
|
|
|
1189
1189
|
.fortune-dialog {
|
|
1190
|
-
min-width: 368px;
|
|
1191
1190
|
max-width: 90%;
|
|
1192
1191
|
max-height: 90%;
|
|
1193
|
-
|
|
1194
|
-
|
|
1192
|
+
overflow: scroll;
|
|
1193
|
+
border-radius: 6px;
|
|
1194
|
+
background: white;
|
|
1195
1195
|
box-shadow: rgb(0 0 0 / 10%) 5px 5px 30px;
|
|
1196
1196
|
box-sizing: border-box;
|
|
1197
1197
|
overflow: auto;
|
|
@@ -1251,11 +1251,10 @@ html::-webkit-scrollbar-button {
|
|
|
1251
1251
|
opacity: 0.7;
|
|
1252
1252
|
}
|
|
1253
1253
|
|
|
1254
|
-
@import "@fileverse/ui/styles";
|
|
1255
1254
|
/*查找替换弹出框样式*/
|
|
1256
1255
|
#fortune-search-replace {
|
|
1257
1256
|
position: absolute;
|
|
1258
|
-
|
|
1257
|
+
padding: 30px 42px;
|
|
1259
1258
|
z-index: 1002;
|
|
1260
1259
|
}
|
|
1261
1260
|
|
|
@@ -1337,7 +1336,10 @@ html::-webkit-scrollbar-button {
|
|
|
1337
1336
|
}
|
|
1338
1337
|
|
|
1339
1338
|
#fortune-search-replace #searchAllbox {
|
|
1340
|
-
|
|
1339
|
+
height: 210px;
|
|
1340
|
+
border: 1px solid #d4d4d4;
|
|
1341
|
+
margin-top: 10px;
|
|
1342
|
+
overflow-y: auto;
|
|
1341
1343
|
position: relative;
|
|
1342
1344
|
}
|
|
1343
1345
|
|
|
@@ -1411,38 +1413,6 @@ html::-webkit-scrollbar-button {
|
|
|
1411
1413
|
white-space: nowrap;
|
|
1412
1414
|
}
|
|
1413
1415
|
|
|
1414
|
-
.find-replace-label {
|
|
1415
|
-
min-width: 100px;
|
|
1416
|
-
}
|
|
1417
|
-
|
|
1418
|
-
.find-replace-table-cell {
|
|
1419
|
-
min-width: 154px;
|
|
1420
|
-
}
|
|
1421
|
-
|
|
1422
|
-
/* Add scrollbar styles */
|
|
1423
|
-
#fortune-search-replace .table-container {
|
|
1424
|
-
scrollbar-width: thin;
|
|
1425
|
-
scrollbar-color: #babac0 transparent;
|
|
1426
|
-
}
|
|
1427
|
-
|
|
1428
|
-
#fortune-search-replace .table-container::-webkit-scrollbar {
|
|
1429
|
-
width: 8px;
|
|
1430
|
-
height: 8px;
|
|
1431
|
-
}
|
|
1432
|
-
|
|
1433
|
-
#fortune-search-replace .table-container::-webkit-scrollbar-track {
|
|
1434
|
-
background-color: transparent;
|
|
1435
|
-
}
|
|
1436
|
-
|
|
1437
|
-
#fortune-search-replace .table-container::-webkit-scrollbar-thumb {
|
|
1438
|
-
background-color: #babac0;
|
|
1439
|
-
border-radius: 16px;
|
|
1440
|
-
}
|
|
1441
|
-
|
|
1442
|
-
#fortune-search-replace .table-container::-webkit-scrollbar-button {
|
|
1443
|
-
display: none;
|
|
1444
|
-
}
|
|
1445
|
-
|
|
1446
1416
|
.fortune-link-modify-modal {
|
|
1447
1417
|
position: absolute;
|
|
1448
1418
|
overflow: hidden;
|
package/dist/index.esm.js
CHANGED
|
@@ -2,7 +2,6 @@ import { defaultContext, defaultSettings, getSheetIndex, colLocationByIndex, fix
|
|
|
2
2
|
import React, { useContext, useRef, useState, useMemo, useCallback, useEffect, useLayoutEffect, useImperativeHandle } from 'react';
|
|
3
3
|
import produce, { applyPatches, enablePatches, produceWithPatches } from 'immer';
|
|
4
4
|
import _ from 'lodash';
|
|
5
|
-
import { IconButton, Button as Button$1, TextField, Checkbox, Divider as Divider$2, Table, TableHeader, TableRow, TableHead, TableBody, cn, TableCell } from '@fileverse/ui';
|
|
6
5
|
import regeneratorRuntime from 'regenerator-runtime';
|
|
7
6
|
|
|
8
7
|
function _arrayLikeToArray(r, a) {
|
|
@@ -1229,39 +1228,35 @@ var Dialog = function Dialog(_ref) {
|
|
|
1229
1228
|
className: "fortune-dialog",
|
|
1230
1229
|
style: containerStyle
|
|
1231
1230
|
}, /*#__PURE__*/React.createElement("div", {
|
|
1232
|
-
className: "
|
|
1233
|
-
}, /*#__PURE__*/React.createElement(
|
|
1234
|
-
|
|
1235
|
-
variant: "ghost",
|
|
1231
|
+
className: "fortune-modal-dialog-header"
|
|
1232
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
1233
|
+
className: "fortune-modal-dialog-icon-close",
|
|
1236
1234
|
onClick: onCancel,
|
|
1237
1235
|
tabIndex: 0
|
|
1238
|
-
}
|
|
1239
|
-
|
|
1236
|
+
}, /*#__PURE__*/React.createElement(SVGIcon, {
|
|
1237
|
+
name: "close",
|
|
1238
|
+
style: {
|
|
1239
|
+
padding: 7,
|
|
1240
|
+
cursor: "pointer"
|
|
1241
|
+
}
|
|
1242
|
+
}))), /*#__PURE__*/React.createElement("div", {
|
|
1243
|
+
className: "fortune-dialog-box-content",
|
|
1240
1244
|
style: contentStyle
|
|
1241
1245
|
}, children), type != null && (/*#__PURE__*/React.createElement("div", {
|
|
1242
|
-
className: "
|
|
1243
|
-
}, type === "ok" ? (/*#__PURE__*/React.createElement(
|
|
1244
|
-
|
|
1245
|
-
style: {
|
|
1246
|
-
minWidth: "80px"
|
|
1247
|
-
},
|
|
1246
|
+
className: "fortune-dialog-box-button-container"
|
|
1247
|
+
}, type === "ok" ? (/*#__PURE__*/React.createElement("div", {
|
|
1248
|
+
className: "fortune-message-box-button button-default",
|
|
1248
1249
|
onClick: onOk,
|
|
1249
1250
|
tabIndex: 0
|
|
1250
|
-
}, button.confirm)) : (/*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(
|
|
1251
|
-
|
|
1252
|
-
style: {
|
|
1253
|
-
minWidth: "80px"
|
|
1254
|
-
},
|
|
1255
|
-
onClick: onCancel,
|
|
1256
|
-
tabIndex: 0
|
|
1257
|
-
}, button.cancel), /*#__PURE__*/React.createElement(Button$1, {
|
|
1258
|
-
variant: "default",
|
|
1259
|
-
style: {
|
|
1260
|
-
minWidth: "80px"
|
|
1261
|
-
},
|
|
1251
|
+
}, button.confirm)) : (/*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
1252
|
+
className: "fortune-message-box-button button-primary",
|
|
1262
1253
|
onClick: onOk,
|
|
1263
1254
|
tabIndex: 0
|
|
1264
|
-
}, button.confirm)
|
|
1255
|
+
}, button.confirm), /*#__PURE__*/React.createElement("div", {
|
|
1256
|
+
className: "fortune-message-box-button button-default",
|
|
1257
|
+
onClick: onCancel,
|
|
1258
|
+
tabIndex: 0
|
|
1259
|
+
}, button.cancel))))));
|
|
1265
1260
|
};
|
|
1266
1261
|
|
|
1267
1262
|
var MessageBox = function MessageBox(_ref) {
|
|
@@ -1273,7 +1268,15 @@ var MessageBox = function MessageBox(_ref) {
|
|
|
1273
1268
|
return /*#__PURE__*/React.createElement(Dialog, {
|
|
1274
1269
|
type: type,
|
|
1275
1270
|
onOk: onOk,
|
|
1276
|
-
onCancel: onCancel
|
|
1271
|
+
onCancel: onCancel,
|
|
1272
|
+
contentStyle: {
|
|
1273
|
+
width: 300,
|
|
1274
|
+
paddingTop: 20,
|
|
1275
|
+
paddingBottom: 30,
|
|
1276
|
+
display: "flex",
|
|
1277
|
+
justifyContent: "center",
|
|
1278
|
+
alignItems: "center"
|
|
1279
|
+
}
|
|
1277
1280
|
}, children);
|
|
1278
1281
|
};
|
|
1279
1282
|
|
|
@@ -1347,7 +1350,8 @@ var SearchReplace = function SearchReplace(_ref) {
|
|
|
1347
1350
|
setContext = _useContext.setContext,
|
|
1348
1351
|
refs = _useContext.refs;
|
|
1349
1352
|
var _locale = locale(context),
|
|
1350
|
-
findAndReplace = _locale.findAndReplace
|
|
1353
|
+
findAndReplace = _locale.findAndReplace,
|
|
1354
|
+
button = _locale.button;
|
|
1351
1355
|
var _useState = useState(""),
|
|
1352
1356
|
_useState2 = _slicedToArray(_useState, 2),
|
|
1353
1357
|
searchText = _useState2[0],
|
|
@@ -1356,27 +1360,28 @@ var SearchReplace = function SearchReplace(_ref) {
|
|
|
1356
1360
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
1357
1361
|
replaceText = _useState4[0],
|
|
1358
1362
|
setReplaceText = _useState4[1];
|
|
1359
|
-
var _useState5 = useState(
|
|
1363
|
+
var _useState5 = useState(context.showReplace),
|
|
1360
1364
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
var _useState7 = useState(),
|
|
1365
|
+
showReplace = _useState6[0],
|
|
1366
|
+
setShowReplace = _useState6[1];
|
|
1367
|
+
var _useState7 = useState([]),
|
|
1364
1368
|
_useState8 = _slicedToArray(_useState7, 2),
|
|
1365
|
-
|
|
1366
|
-
|
|
1369
|
+
searchResult = _useState8[0],
|
|
1370
|
+
setSearchResult = _useState8[1];
|
|
1371
|
+
var _useState9 = useState(),
|
|
1372
|
+
_useState0 = _slicedToArray(_useState9, 2),
|
|
1373
|
+
selectedCell = _useState0[0],
|
|
1374
|
+
setSelectedCell = _useState0[1];
|
|
1367
1375
|
var _useAlert = useAlert(),
|
|
1368
1376
|
showAlert = _useAlert.showAlert;
|
|
1369
|
-
var
|
|
1370
|
-
var searchInputRef = useRef(null);
|
|
1371
|
-
var replaceInputRef = useRef(null);
|
|
1372
|
-
var _useState9 = useState({
|
|
1377
|
+
var _useState1 = useState({
|
|
1373
1378
|
regCheck: false,
|
|
1374
1379
|
wordCheck: false,
|
|
1375
1380
|
caseCheck: false
|
|
1376
1381
|
}),
|
|
1377
|
-
|
|
1378
|
-
checkMode =
|
|
1379
|
-
checkModeReplace =
|
|
1382
|
+
_useState10 = _slicedToArray(_useState1, 2),
|
|
1383
|
+
checkMode = _useState10[0],
|
|
1384
|
+
checkModeReplace = _useState10[1];
|
|
1380
1385
|
var closeDialog = useCallback(function () {
|
|
1381
1386
|
_.set(refs.globalCache, "searchDialog.mouseEnter", false);
|
|
1382
1387
|
setContext(function (draftCtx) {
|
|
@@ -1411,110 +1416,98 @@ var SearchReplace = function SearchReplace(_ref) {
|
|
|
1411
1416
|
onSearchDialogMoveStart(refs.globalCache, nativeEvent, getContainer());
|
|
1412
1417
|
e.stopPropagation();
|
|
1413
1418
|
}
|
|
1414
|
-
}, /*#__PURE__*/React.createElement("div",
|
|
1415
|
-
className: "
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1419
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
1420
|
+
className: "container",
|
|
1421
|
+
onMouseDown: function onMouseDown(e) {
|
|
1422
|
+
return e.stopPropagation();
|
|
1423
|
+
}
|
|
1424
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
1425
|
+
className: "icon-close fortune-modal-dialog-icon-close",
|
|
1421
1426
|
onClick: closeDialog,
|
|
1422
1427
|
tabIndex: 0
|
|
1428
|
+
}, /*#__PURE__*/React.createElement(SVGIcon, {
|
|
1429
|
+
name: "close",
|
|
1430
|
+
style: {
|
|
1431
|
+
padding: 7,
|
|
1432
|
+
cursor: "pointer"
|
|
1433
|
+
}
|
|
1423
1434
|
})), /*#__PURE__*/React.createElement("div", {
|
|
1424
|
-
className: "
|
|
1435
|
+
className: "tabBox"
|
|
1436
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
1437
|
+
id: "searchTab",
|
|
1438
|
+
className: showReplace ? "" : "on",
|
|
1439
|
+
onClick: function onClick() {
|
|
1440
|
+
return setShowReplace(false);
|
|
1441
|
+
},
|
|
1442
|
+
tabIndex: 0
|
|
1443
|
+
}, findAndReplace.find), /*#__PURE__*/React.createElement("span", {
|
|
1444
|
+
id: "replaceTab",
|
|
1445
|
+
className: showReplace ? "on" : "",
|
|
1446
|
+
onClick: function onClick() {
|
|
1447
|
+
return setShowReplace(true);
|
|
1448
|
+
},
|
|
1449
|
+
tabIndex: 0
|
|
1450
|
+
}, findAndReplace.replace)), /*#__PURE__*/React.createElement("div", {
|
|
1451
|
+
className: "ctBox"
|
|
1425
1452
|
}, /*#__PURE__*/React.createElement("div", {
|
|
1426
|
-
className: "
|
|
1453
|
+
className: "row"
|
|
1427
1454
|
}, /*#__PURE__*/React.createElement("div", {
|
|
1428
|
-
className: "
|
|
1455
|
+
className: "inputBox"
|
|
1429
1456
|
}, /*#__PURE__*/React.createElement("div", {
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
}, /*#__PURE__*/React.createElement("
|
|
1433
|
-
className: "find-replace-label text-heading-xsm"
|
|
1434
|
-
}, findAndReplace.findTextbox, "\uFF1A"), /*#__PURE__*/React.createElement(TextField, {
|
|
1435
|
-
ref: searchInputRef,
|
|
1457
|
+
className: "textboxs",
|
|
1458
|
+
id: "searchInput"
|
|
1459
|
+
}, findAndReplace.findTextbox, "\uFF1A", /*#__PURE__*/React.createElement("input", {
|
|
1436
1460
|
className: "formulaInputFocus",
|
|
1437
1461
|
autoFocus: true,
|
|
1438
1462
|
spellCheck: "false",
|
|
1439
1463
|
onKeyDown: function onKeyDown(e) {
|
|
1440
1464
|
return e.stopPropagation();
|
|
1441
1465
|
},
|
|
1442
|
-
onMouseDown: function onMouseDown(e) {
|
|
1443
|
-
var _searchInputRef$curre;
|
|
1444
|
-
if (e.target === searchInputRef.current || ((_searchInputRef$curre = searchInputRef.current) === null || _searchInputRef$curre === void 0 ? void 0 : _searchInputRef$curre.contains(e.target))) {
|
|
1445
|
-
e.stopPropagation();
|
|
1446
|
-
}
|
|
1447
|
-
},
|
|
1448
1466
|
value: searchText,
|
|
1449
1467
|
onChange: function onChange(e) {
|
|
1450
|
-
|
|
1451
|
-
setSearchResult([]);
|
|
1452
|
-
}
|
|
1453
|
-
setSearchText(e.target.value);
|
|
1468
|
+
return setSearchText(e.target.value);
|
|
1454
1469
|
}
|
|
1455
|
-
})), /*#__PURE__*/React.createElement("div", {
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
}, /*#__PURE__*/React.createElement("
|
|
1459
|
-
className: "find-replace-label text-heading-xsm"
|
|
1460
|
-
}, findAndReplace.replaceTextbox, "\uFF1A"), /*#__PURE__*/React.createElement(TextField, {
|
|
1461
|
-
ref: replaceInputRef,
|
|
1470
|
+
})), showReplace && (/*#__PURE__*/React.createElement("div", {
|
|
1471
|
+
className: "textboxs",
|
|
1472
|
+
id: "replaceInput"
|
|
1473
|
+
}, findAndReplace.replaceTextbox, "\uFF1A", /*#__PURE__*/React.createElement("input", {
|
|
1462
1474
|
className: "formulaInputFocus",
|
|
1463
1475
|
spellCheck: "false",
|
|
1464
1476
|
onKeyDown: function onKeyDown(e) {
|
|
1465
1477
|
return e.stopPropagation();
|
|
1466
1478
|
},
|
|
1467
|
-
onMouseDown: function onMouseDown(e) {
|
|
1468
|
-
var _replaceInputRef$curr;
|
|
1469
|
-
if (e.target === replaceInputRef.current || ((_replaceInputRef$curr = replaceInputRef.current) === null || _replaceInputRef$curr === void 0 ? void 0 : _replaceInputRef$curr.contains(e.target))) {
|
|
1470
|
-
e.stopPropagation();
|
|
1471
|
-
}
|
|
1472
|
-
},
|
|
1473
1479
|
value: replaceText,
|
|
1474
1480
|
onChange: function onChange(e) {
|
|
1475
1481
|
return setReplaceText(e.target.value);
|
|
1476
1482
|
}
|
|
1477
|
-
}))), /*#__PURE__*/React.createElement("div", {
|
|
1478
|
-
className: "
|
|
1479
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
1480
|
-
className: "find-replace-label"
|
|
1481
|
-
}), /*#__PURE__*/React.createElement("div", {
|
|
1482
|
-
className: "flex flex-col gap-2 text-body-sm"
|
|
1483
|
+
})))), /*#__PURE__*/React.createElement("div", {
|
|
1484
|
+
className: "checkboxs"
|
|
1483
1485
|
}, /*#__PURE__*/React.createElement("div", {
|
|
1484
|
-
id: "regCheck"
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
checked: checkMode.regCheck,
|
|
1489
|
-
onCheckedChange: function onCheckedChange(e) {
|
|
1486
|
+
id: "regCheck"
|
|
1487
|
+
}, /*#__PURE__*/React.createElement("input", {
|
|
1488
|
+
type: "checkbox",
|
|
1489
|
+
onChange: function onChange(e) {
|
|
1490
1490
|
return setCheckMode("regCheck", e.target.checked);
|
|
1491
1491
|
}
|
|
1492
1492
|
}), /*#__PURE__*/React.createElement("span", null, findAndReplace.regexTextbox)), /*#__PURE__*/React.createElement("div", {
|
|
1493
|
-
id: "
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
checked: checkMode.caseCheck,
|
|
1498
|
-
onCheckedChange: function onCheckedChange(e) {
|
|
1499
|
-
return setCheckMode("caseCheck", e.target.checked);
|
|
1500
|
-
}
|
|
1501
|
-
}), /*#__PURE__*/React.createElement("span", null, findAndReplace.distinguishTextbox)), /*#__PURE__*/React.createElement("div", {
|
|
1502
|
-
id: "wordCheck",
|
|
1503
|
-
className: "flex flex-row gap-2 items-center"
|
|
1504
|
-
}, /*#__PURE__*/React.createElement(Checkbox, {
|
|
1505
|
-
className: "border-2",
|
|
1506
|
-
checked: checkMode.wordCheck,
|
|
1507
|
-
onCheckedChange: function onCheckedChange(e) {
|
|
1493
|
+
id: "wordCheck"
|
|
1494
|
+
}, /*#__PURE__*/React.createElement("input", {
|
|
1495
|
+
type: "checkbox",
|
|
1496
|
+
onChange: function onChange(e) {
|
|
1508
1497
|
return setCheckMode("wordCheck", e.target.checked);
|
|
1509
1498
|
}
|
|
1510
|
-
}), /*#__PURE__*/React.createElement("span", null, findAndReplace.wholeTextbox))
|
|
1511
|
-
|
|
1512
|
-
}
|
|
1513
|
-
|
|
1514
|
-
|
|
1499
|
+
}), /*#__PURE__*/React.createElement("span", null, findAndReplace.wholeTextbox)), /*#__PURE__*/React.createElement("div", {
|
|
1500
|
+
id: "caseCheck"
|
|
1501
|
+
}, /*#__PURE__*/React.createElement("input", {
|
|
1502
|
+
type: "checkbox",
|
|
1503
|
+
onChange: function onChange(e) {
|
|
1504
|
+
return setCheckMode("caseCheck", e.target.checked);
|
|
1505
|
+
}
|
|
1506
|
+
}), /*#__PURE__*/React.createElement("span", null, findAndReplace.distinguishTextbox)))), /*#__PURE__*/React.createElement("div", {
|
|
1507
|
+
className: "btnBox"
|
|
1508
|
+
}, showReplace && (/*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
1515
1509
|
id: "replaceAllBtn",
|
|
1516
|
-
|
|
1517
|
-
className: "min-w-fit",
|
|
1510
|
+
className: "fortune-message-box-button button-default",
|
|
1518
1511
|
onClick: function onClick() {
|
|
1519
1512
|
setContext(function (draftCtx) {
|
|
1520
1513
|
setSelectedCell(undefined);
|
|
@@ -1522,12 +1515,10 @@ var SearchReplace = function SearchReplace(_ref) {
|
|
|
1522
1515
|
showAlert(alertMsg);
|
|
1523
1516
|
});
|
|
1524
1517
|
},
|
|
1525
|
-
tabIndex: 0
|
|
1526
|
-
|
|
1527
|
-
}, findAndReplace.allReplaceBtn), /*#__PURE__*/React.createElement(Button$1, {
|
|
1518
|
+
tabIndex: 0
|
|
1519
|
+
}, findAndReplace.allReplaceBtn), /*#__PURE__*/React.createElement("div", {
|
|
1528
1520
|
id: "replaceBtn",
|
|
1529
|
-
|
|
1530
|
-
className: "min-w-fit",
|
|
1521
|
+
className: "fortune-message-box-button button-default",
|
|
1531
1522
|
onClick: function onClick() {
|
|
1532
1523
|
return setContext(function (draftCtx) {
|
|
1533
1524
|
setSelectedCell(undefined);
|
|
@@ -1537,12 +1528,10 @@ var SearchReplace = function SearchReplace(_ref) {
|
|
|
1537
1528
|
}
|
|
1538
1529
|
});
|
|
1539
1530
|
},
|
|
1540
|
-
tabIndex: 0
|
|
1541
|
-
|
|
1542
|
-
}, findAndReplace.replaceBtn), /*#__PURE__*/React.createElement(Button$1, {
|
|
1531
|
+
tabIndex: 0
|
|
1532
|
+
}, findAndReplace.replaceBtn))), /*#__PURE__*/React.createElement("div", {
|
|
1543
1533
|
id: "searchAllBtn",
|
|
1544
|
-
|
|
1545
|
-
className: "min-w-fit",
|
|
1534
|
+
className: "fortune-message-box-button button-default",
|
|
1546
1535
|
onClick: function onClick() {
|
|
1547
1536
|
return setContext(function (draftCtx) {
|
|
1548
1537
|
setSelectedCell(undefined);
|
|
@@ -1552,12 +1541,10 @@ var SearchReplace = function SearchReplace(_ref) {
|
|
|
1552
1541
|
if (_.isEmpty(res)) showAlert(findAndReplace.noFindTip);
|
|
1553
1542
|
});
|
|
1554
1543
|
},
|
|
1555
|
-
tabIndex: 0
|
|
1556
|
-
|
|
1557
|
-
}, findAndReplace.allFindBtn), /*#__PURE__*/React.createElement(Button$1, {
|
|
1544
|
+
tabIndex: 0
|
|
1545
|
+
}, findAndReplace.allFindBtn), /*#__PURE__*/React.createElement("div", {
|
|
1558
1546
|
id: "searchNextBtn",
|
|
1559
|
-
|
|
1560
|
-
className: "min-w-fit",
|
|
1547
|
+
className: "fortune-message-box-button button-default",
|
|
1561
1548
|
onClick: function onClick() {
|
|
1562
1549
|
return setContext(function (draftCtx) {
|
|
1563
1550
|
setSearchResult([]);
|
|
@@ -1565,45 +1552,23 @@ var SearchReplace = function SearchReplace(_ref) {
|
|
|
1565
1552
|
if (alertMsg != null) showAlert(alertMsg);
|
|
1566
1553
|
});
|
|
1567
1554
|
},
|
|
1568
|
-
tabIndex: 0,
|
|
1569
|
-
disabled: searchText.length === 0
|
|
1570
|
-
}, findAndReplace.findBtn))), searchResult.length > 0 && (/*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Divider$2, {
|
|
1571
|
-
className: "w-full border-t-[1px] mb-4"
|
|
1572
|
-
}), /*#__PURE__*/React.createElement("div", {
|
|
1573
|
-
ref: tableContainerRef,
|
|
1574
|
-
className: "mb-6 table-container max-h-[300px] overflow-y-auto",
|
|
1575
|
-
onMouseDown: function onMouseDown(e) {
|
|
1576
|
-
var _tableContainerRef$cu;
|
|
1577
|
-
if (e.target === tableContainerRef.current || ((_tableContainerRef$cu = tableContainerRef.current) === null || _tableContainerRef$cu === void 0 ? void 0 : _tableContainerRef$cu.contains(e.target))) {
|
|
1578
|
-
var _tableContainerRef$cu2;
|
|
1579
|
-
e.stopPropagation();
|
|
1580
|
-
(_tableContainerRef$cu2 = tableContainerRef.current) === null || _tableContainerRef$cu2 === void 0 ? void 0 : _tableContainerRef$cu2.focus();
|
|
1581
|
-
}
|
|
1582
|
-
},
|
|
1583
|
-
onWheel: function onWheel(e) {
|
|
1584
|
-
e.preventDefault();
|
|
1585
|
-
e.stopPropagation();
|
|
1586
|
-
if (tableContainerRef.current) {
|
|
1587
|
-
tableContainerRef.current.scrollTop += e.deltaY;
|
|
1588
|
-
}
|
|
1589
|
-
},
|
|
1590
|
-
onTouchStart: function onTouchStart(e) {
|
|
1591
|
-
e.stopPropagation();
|
|
1592
|
-
},
|
|
1593
|
-
onTouchMove: function onTouchMove(e) {
|
|
1594
|
-
e.stopPropagation();
|
|
1595
|
-
},
|
|
1596
1555
|
tabIndex: 0
|
|
1597
|
-
}, /*#__PURE__*/React.createElement(
|
|
1556
|
+
}, findAndReplace.findBtn))), /*#__PURE__*/React.createElement("div", {
|
|
1557
|
+
className: "close-button fortune-message-box-button button-default",
|
|
1558
|
+
onClick: closeDialog,
|
|
1559
|
+
tabIndex: 0
|
|
1560
|
+
}, button.close), searchResult.length > 0 && (/*#__PURE__*/React.createElement("div", {
|
|
1598
1561
|
id: "searchAllbox"
|
|
1599
|
-
}, /*#__PURE__*/React.createElement(
|
|
1600
|
-
className: "
|
|
1601
|
-
}, /*#__PURE__*/React.createElement(
|
|
1602
|
-
|
|
1603
|
-
|
|
1562
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
1563
|
+
className: "boxTitle"
|
|
1564
|
+
}, /*#__PURE__*/React.createElement("span", null, findAndReplace.searchTargetSheet), /*#__PURE__*/React.createElement("span", null, findAndReplace.searchTargetCell), /*#__PURE__*/React.createElement("span", null, findAndReplace.searchTargetValue)), /*#__PURE__*/React.createElement("div", {
|
|
1565
|
+
className: "boxMain"
|
|
1566
|
+
}, searchResult.map(function (v) {
|
|
1567
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
1568
|
+
className: "boxItem ".concat(_.isEqual(selectedCell, {
|
|
1604
1569
|
r: v.r,
|
|
1605
1570
|
c: v.c
|
|
1606
|
-
}) ? "
|
|
1571
|
+
}) ? "on" : ""),
|
|
1607
1572
|
key: v.cellPosition,
|
|
1608
1573
|
onClick: function onClick() {
|
|
1609
1574
|
setContext(function (draftCtx) {
|
|
@@ -1619,14 +1584,8 @@ var SearchReplace = function SearchReplace(_ref) {
|
|
|
1619
1584
|
});
|
|
1620
1585
|
},
|
|
1621
1586
|
tabIndex: 0
|
|
1622
|
-
}, /*#__PURE__*/React.createElement(
|
|
1623
|
-
|
|
1624
|
-
}, v.sheetName), /*#__PURE__*/React.createElement(TableCell, {
|
|
1625
|
-
className: "find-replace-table-cell"
|
|
1626
|
-
}, v.cellPosition), /*#__PURE__*/React.createElement(TableCell, {
|
|
1627
|
-
className: "find-replace-table-cell"
|
|
1628
|
-
}, v.value));
|
|
1629
|
-
})))))))));
|
|
1587
|
+
}, /*#__PURE__*/React.createElement("span", null, v.sheetName), /*#__PURE__*/React.createElement("span", null, v.cellPosition), /*#__PURE__*/React.createElement("span", null, v.value));
|
|
1588
|
+
}))))));
|
|
1630
1589
|
};
|
|
1631
1590
|
|
|
1632
1591
|
var LinkEditCard = function LinkEditCard(_ref) {
|
|
@@ -9882,7 +9841,7 @@ var MoreItemsContaier = function MoreItemsContaier(_ref) {
|
|
|
9882
9841
|
}, children);
|
|
9883
9842
|
};
|
|
9884
9843
|
|
|
9885
|
-
function generateAPIs(context, setContext, handleUndo, handleRedo, settings, cellInput, scrollbarX, scrollbarY) {
|
|
9844
|
+
function generateAPIs(context, setContext, handleUndo, handleRedo, settings, cellInput, scrollbarX, scrollbarY, globalCache) {
|
|
9886
9845
|
return {
|
|
9887
9846
|
applyOp: function applyOp(ops) {
|
|
9888
9847
|
setContext(function (ctx_) {
|
|
@@ -10183,6 +10142,50 @@ function generateAPIs(context, setContext, handleUndo, handleRedo, settings, cel
|
|
|
10183
10142
|
},
|
|
10184
10143
|
celldataToData: function celldataToData(celldata, rowCount, colCount) {
|
|
10185
10144
|
return api.celldataToData(celldata, rowCount, colCount);
|
|
10145
|
+
},
|
|
10146
|
+
insertFunction: function insertFunction(selectedFuncIndex, filteredFunctionList, callback) {
|
|
10147
|
+
var _context$luckysheet_s2;
|
|
10148
|
+
var last = (_context$luckysheet_s2 = context.luckysheet_select_save) === null || _context$luckysheet_s2 === void 0 ? void 0 : _context$luckysheet_s2[context.luckysheet_select_save.length - 1];
|
|
10149
|
+
var row_index = last === null || last === void 0 ? void 0 : last.row_focus;
|
|
10150
|
+
var col_index = last === null || last === void 0 ? void 0 : last.column_focus;
|
|
10151
|
+
if (!last) {
|
|
10152
|
+
row_index = 0;
|
|
10153
|
+
col_index = 0;
|
|
10154
|
+
} else {
|
|
10155
|
+
if (row_index == null) {
|
|
10156
|
+
var _last$row2 = _slicedToArray(last.row, 1);
|
|
10157
|
+
row_index = _last$row2[0];
|
|
10158
|
+
}
|
|
10159
|
+
if (col_index == null) {
|
|
10160
|
+
var _last$column2 = _slicedToArray(last.column, 1);
|
|
10161
|
+
col_index = _last$column2[0];
|
|
10162
|
+
}
|
|
10163
|
+
}
|
|
10164
|
+
var formulaTxt = "<span dir=\"auto\" class=\"luckysheet-formula-text-color\">=</span><span dir=\"auto\" class=\"luckysheet-formula-text-color\">".concat(filteredFunctionList[selectedFuncIndex].n.toUpperCase(), "</span><span dir=\"auto\" class=\"luckysheet-formula-text-color\">(</span>");
|
|
10165
|
+
var _locale2 = locale(context),
|
|
10166
|
+
functionlist = _locale2.functionlist;
|
|
10167
|
+
setContext(function (ctx) {
|
|
10168
|
+
if (cellInput != null && globalCache != null) {
|
|
10169
|
+
ctx.luckysheetCellUpdate = [row_index, col_index];
|
|
10170
|
+
globalCache.doNotUpdateCell = true;
|
|
10171
|
+
cellInput.innerHTML = formulaTxt;
|
|
10172
|
+
var spans = cellInput.childNodes;
|
|
10173
|
+
if (!_.isEmpty(spans)) {
|
|
10174
|
+
setCaretPosition(ctx, spans[spans.length - 1], 0, 1);
|
|
10175
|
+
}
|
|
10176
|
+
ctx.functionHint = filteredFunctionList[selectedFuncIndex].n.toUpperCase();
|
|
10177
|
+
ctx.functionCandidates = [];
|
|
10178
|
+
if (_.isEmpty(ctx.formulaCache.functionlistMap)) {
|
|
10179
|
+
for (var i = 0; i < functionlist.length; i += 1) {
|
|
10180
|
+
ctx.formulaCache.functionlistMap[functionlist[i].n] = functionlist[i];
|
|
10181
|
+
}
|
|
10182
|
+
}
|
|
10183
|
+
callback === null || callback === void 0 ? void 0 : callback();
|
|
10184
|
+
}
|
|
10185
|
+
});
|
|
10186
|
+
},
|
|
10187
|
+
getLocaleContext: function getLocaleContext() {
|
|
10188
|
+
return locale(context);
|
|
10186
10189
|
}
|
|
10187
10190
|
};
|
|
10188
10191
|
}
|
|
@@ -11390,8 +11393,8 @@ var Workbook = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
11390
11393
|
};
|
|
11391
11394
|
}, [onPaste]);
|
|
11392
11395
|
useImperativeHandle(ref, function () {
|
|
11393
|
-
return generateAPIs(context, setContextWithProduce, handleUndo, handleRedo, mergedSettings, cellInput.current, scrollbarX.current, scrollbarY.current);
|
|
11394
|
-
}, [context, setContextWithProduce, handleUndo, handleRedo, mergedSettings]);
|
|
11396
|
+
return generateAPIs(context, setContextWithProduce, handleUndo, handleRedo, mergedSettings, cellInput.current, scrollbarX.current, scrollbarY.current, globalCache.current);
|
|
11397
|
+
}, [context, setContextWithProduce, handleUndo, handleRedo, mergedSettings, globalCache]);
|
|
11395
11398
|
var i = getSheetIndex(context, context.currentSheetId);
|
|
11396
11399
|
if (i == null) {
|
|
11397
11400
|
return null;
|