@fileverse-dev/fortune-react 1.0.2-mod-20 → 1.0.2-mod-21
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/index.css +16 -10
- package/dist/index.esm.css +16 -10
- package/dist/index.esm.js +148 -126
- package/dist/index.js +148 -126
- package/dist/index.umd.css +16 -10
- package/dist/index.umd.js +63906 -362
- package/dist/index.umd.min.css +1 -1
- package/dist/index.umd.min.js +42 -3
- package/package.json +3 -2
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;
|
|
1190
1191
|
max-width: 90%;
|
|
1191
1192
|
max-height: 90%;
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
background: white;
|
|
1193
|
+
border-radius: 12px;
|
|
1194
|
+
background: hsl(var(--color-bg-default));
|
|
1195
1195
|
box-shadow: rgb(0 0 0 / 10%) 5px 5px 30px;
|
|
1196
1196
|
box-sizing: border-box;
|
|
1197
1197
|
overflow: auto;
|
|
@@ -1251,10 +1251,11 @@ html::-webkit-scrollbar-button {
|
|
|
1251
1251
|
opacity: 0.7;
|
|
1252
1252
|
}
|
|
1253
1253
|
|
|
1254
|
+
@import "@fileverse/ui/styles";
|
|
1254
1255
|
/*查找替换弹出框样式*/
|
|
1255
1256
|
#fortune-search-replace {
|
|
1256
1257
|
position: absolute;
|
|
1257
|
-
|
|
1258
|
+
min-width: 504px;
|
|
1258
1259
|
z-index: 1002;
|
|
1259
1260
|
}
|
|
1260
1261
|
|
|
@@ -1336,10 +1337,7 @@ html::-webkit-scrollbar-button {
|
|
|
1336
1337
|
}
|
|
1337
1338
|
|
|
1338
1339
|
#fortune-search-replace #searchAllbox {
|
|
1339
|
-
|
|
1340
|
-
border: 1px solid #d4d4d4;
|
|
1341
|
-
margin-top: 10px;
|
|
1342
|
-
overflow-y: auto;
|
|
1340
|
+
overflow-y: scroll;
|
|
1343
1341
|
position: relative;
|
|
1344
1342
|
}
|
|
1345
1343
|
|
|
@@ -1413,6 +1411,14 @@ html::-webkit-scrollbar-button {
|
|
|
1413
1411
|
white-space: nowrap;
|
|
1414
1412
|
}
|
|
1415
1413
|
|
|
1414
|
+
.find-replace-label {
|
|
1415
|
+
min-width: 100px;
|
|
1416
|
+
}
|
|
1417
|
+
|
|
1418
|
+
.find-replace-table-cell {
|
|
1419
|
+
min-width: 154px;
|
|
1420
|
+
}
|
|
1421
|
+
|
|
1416
1422
|
.fortune-link-modify-modal {
|
|
1417
1423
|
position: absolute;
|
|
1418
1424
|
overflow: hidden;
|
|
@@ -3304,8 +3310,8 @@ label {
|
|
|
3304
3310
|
height: 252px;
|
|
3305
3311
|
background: rgb(240, 240, 240);
|
|
3306
3312
|
position: absolute;
|
|
3307
|
-
bottom:
|
|
3308
|
-
left:
|
|
3313
|
+
bottom: 10px;
|
|
3314
|
+
left: 100px;
|
|
3309
3315
|
border-radius: 6px;
|
|
3310
3316
|
box-shadow: 0 2px 4px rgb(0 0 0 / 20%);
|
|
3311
3317
|
border: 1px solid rgba(0, 0, 0, 0.2);
|
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;
|
|
1190
1191
|
max-width: 90%;
|
|
1191
1192
|
max-height: 90%;
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
background: white;
|
|
1193
|
+
border-radius: 12px;
|
|
1194
|
+
background: hsl(var(--color-bg-default));
|
|
1195
1195
|
box-shadow: rgb(0 0 0 / 10%) 5px 5px 30px;
|
|
1196
1196
|
box-sizing: border-box;
|
|
1197
1197
|
overflow: auto;
|
|
@@ -1251,10 +1251,11 @@ html::-webkit-scrollbar-button {
|
|
|
1251
1251
|
opacity: 0.7;
|
|
1252
1252
|
}
|
|
1253
1253
|
|
|
1254
|
+
@import "@fileverse/ui/styles";
|
|
1254
1255
|
/*查找替换弹出框样式*/
|
|
1255
1256
|
#fortune-search-replace {
|
|
1256
1257
|
position: absolute;
|
|
1257
|
-
|
|
1258
|
+
min-width: 504px;
|
|
1258
1259
|
z-index: 1002;
|
|
1259
1260
|
}
|
|
1260
1261
|
|
|
@@ -1336,10 +1337,7 @@ html::-webkit-scrollbar-button {
|
|
|
1336
1337
|
}
|
|
1337
1338
|
|
|
1338
1339
|
#fortune-search-replace #searchAllbox {
|
|
1339
|
-
|
|
1340
|
-
border: 1px solid #d4d4d4;
|
|
1341
|
-
margin-top: 10px;
|
|
1342
|
-
overflow-y: auto;
|
|
1340
|
+
overflow-y: scroll;
|
|
1343
1341
|
position: relative;
|
|
1344
1342
|
}
|
|
1345
1343
|
|
|
@@ -1413,6 +1411,14 @@ html::-webkit-scrollbar-button {
|
|
|
1413
1411
|
white-space: nowrap;
|
|
1414
1412
|
}
|
|
1415
1413
|
|
|
1414
|
+
.find-replace-label {
|
|
1415
|
+
min-width: 100px;
|
|
1416
|
+
}
|
|
1417
|
+
|
|
1418
|
+
.find-replace-table-cell {
|
|
1419
|
+
min-width: 154px;
|
|
1420
|
+
}
|
|
1421
|
+
|
|
1416
1422
|
.fortune-link-modify-modal {
|
|
1417
1423
|
position: absolute;
|
|
1418
1424
|
overflow: hidden;
|
|
@@ -3304,8 +3310,8 @@ label {
|
|
|
3304
3310
|
height: 252px;
|
|
3305
3311
|
background: rgb(240, 240, 240);
|
|
3306
3312
|
position: absolute;
|
|
3307
|
-
bottom:
|
|
3308
|
-
left:
|
|
3313
|
+
bottom: 10px;
|
|
3314
|
+
left: 100px;
|
|
3309
3315
|
border-radius: 6px;
|
|
3310
3316
|
box-shadow: 0 2px 4px rgb(0 0 0 / 20%);
|
|
3311
3317
|
border: 1px solid rgba(0, 0, 0, 0.2);
|
package/dist/index.esm.js
CHANGED
|
@@ -2,6 +2,7 @@ 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, TableCell } from '@fileverse/ui';
|
|
5
6
|
import regeneratorRuntime from 'regenerator-runtime';
|
|
6
7
|
|
|
7
8
|
function _arrayLikeToArray(r, a) {
|
|
@@ -437,11 +438,6 @@ var ColumnHeader = function ColumnHeader() {
|
|
|
437
438
|
var c2 = s[i].column[1];
|
|
438
439
|
columnTitleMap = selectTitlesMap(columnTitleMap, c1, c2);
|
|
439
440
|
}
|
|
440
|
-
console.log({
|
|
441
|
-
x: s[0].row_select,
|
|
442
|
-
y: s[0].column_select,
|
|
443
|
-
columnTitleMap: columnTitleMap
|
|
444
|
-
});
|
|
445
441
|
var columnTitleRange = selectTitlesRange(columnTitleMap);
|
|
446
442
|
var selects = [];
|
|
447
443
|
for (var j = 0; j < columnTitleRange.length; j += 1) {
|
|
@@ -1233,35 +1229,39 @@ var Dialog = function Dialog(_ref) {
|
|
|
1233
1229
|
className: "fortune-dialog",
|
|
1234
1230
|
style: containerStyle
|
|
1235
1231
|
}, /*#__PURE__*/React.createElement("div", {
|
|
1236
|
-
className: "
|
|
1237
|
-
}, /*#__PURE__*/React.createElement(
|
|
1238
|
-
|
|
1232
|
+
className: "flex items-center justify-end border-b color-border-default py-3 px-6"
|
|
1233
|
+
}, /*#__PURE__*/React.createElement(IconButton, {
|
|
1234
|
+
icon: "X",
|
|
1235
|
+
variant: "ghost",
|
|
1239
1236
|
onClick: onCancel,
|
|
1240
1237
|
tabIndex: 0
|
|
1241
|
-
}, /*#__PURE__*/React.createElement(
|
|
1242
|
-
|
|
1243
|
-
style: {
|
|
1244
|
-
padding: 7,
|
|
1245
|
-
cursor: "pointer"
|
|
1246
|
-
}
|
|
1247
|
-
}))), /*#__PURE__*/React.createElement("div", {
|
|
1248
|
-
className: "fortune-dialog-box-content",
|
|
1238
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
1239
|
+
className: "px-6 pb-6 pt-4 text-body-sm",
|
|
1249
1240
|
style: contentStyle
|
|
1250
1241
|
}, children), type != null && (/*#__PURE__*/React.createElement("div", {
|
|
1251
|
-
className: "
|
|
1252
|
-
}, type === "ok" ? (/*#__PURE__*/React.createElement(
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
className: "fortune-message-box-button button-primary",
|
|
1242
|
+
className: "px-6 pb-6 flex flex-row gap-2 justify-end"
|
|
1243
|
+
}, type === "ok" ? (/*#__PURE__*/React.createElement(Button$1, {
|
|
1244
|
+
variant: "default",
|
|
1245
|
+
style: {
|
|
1246
|
+
minWidth: "80px"
|
|
1247
|
+
},
|
|
1258
1248
|
onClick: onOk,
|
|
1259
1249
|
tabIndex: 0
|
|
1260
|
-
}, button.confirm), /*#__PURE__*/React.createElement(
|
|
1261
|
-
|
|
1250
|
+
}, button.confirm)) : (/*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Button$1, {
|
|
1251
|
+
variant: "secondary",
|
|
1252
|
+
style: {
|
|
1253
|
+
minWidth: "80px"
|
|
1254
|
+
},
|
|
1262
1255
|
onClick: onCancel,
|
|
1263
1256
|
tabIndex: 0
|
|
1264
|
-
}, button.cancel)
|
|
1257
|
+
}, button.cancel), /*#__PURE__*/React.createElement(Button$1, {
|
|
1258
|
+
variant: "default",
|
|
1259
|
+
style: {
|
|
1260
|
+
minWidth: "80px"
|
|
1261
|
+
},
|
|
1262
|
+
onClick: onOk,
|
|
1263
|
+
tabIndex: 0
|
|
1264
|
+
}, button.confirm))))));
|
|
1265
1265
|
};
|
|
1266
1266
|
|
|
1267
1267
|
var MessageBox = function MessageBox(_ref) {
|
|
@@ -1273,15 +1273,7 @@ var MessageBox = function MessageBox(_ref) {
|
|
|
1273
1273
|
return /*#__PURE__*/React.createElement(Dialog, {
|
|
1274
1274
|
type: type,
|
|
1275
1275
|
onOk: onOk,
|
|
1276
|
-
onCancel: onCancel
|
|
1277
|
-
contentStyle: {
|
|
1278
|
-
width: 300,
|
|
1279
|
-
paddingTop: 20,
|
|
1280
|
-
paddingBottom: 30,
|
|
1281
|
-
display: "flex",
|
|
1282
|
-
justifyContent: "center",
|
|
1283
|
-
alignItems: "center"
|
|
1284
|
-
}
|
|
1276
|
+
onCancel: onCancel
|
|
1285
1277
|
}, children);
|
|
1286
1278
|
};
|
|
1287
1279
|
|
|
@@ -1365,28 +1357,27 @@ var SearchReplace = function SearchReplace(_ref) {
|
|
|
1365
1357
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
1366
1358
|
replaceText = _useState4[0],
|
|
1367
1359
|
setReplaceText = _useState4[1];
|
|
1368
|
-
var _useState5 = useState(
|
|
1360
|
+
var _useState5 = useState([]),
|
|
1369
1361
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
var _useState7 = useState(
|
|
1362
|
+
searchResult = _useState6[0],
|
|
1363
|
+
setSearchResult = _useState6[1];
|
|
1364
|
+
var _useState7 = useState(),
|
|
1373
1365
|
_useState8 = _slicedToArray(_useState7, 2),
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
var _useState9 = useState(),
|
|
1377
|
-
_useState0 = _slicedToArray(_useState9, 2),
|
|
1378
|
-
selectedCell = _useState0[0],
|
|
1379
|
-
setSelectedCell = _useState0[1];
|
|
1366
|
+
selectedCell = _useState8[0],
|
|
1367
|
+
setSelectedCell = _useState8[1];
|
|
1380
1368
|
var _useAlert = useAlert(),
|
|
1381
1369
|
showAlert = _useAlert.showAlert;
|
|
1382
|
-
var
|
|
1370
|
+
var tableContainerRef = useRef(null);
|
|
1371
|
+
var searchInputRef = useRef(null);
|
|
1372
|
+
var replaceInputRef = useRef(null);
|
|
1373
|
+
var _useState9 = useState({
|
|
1383
1374
|
regCheck: false,
|
|
1384
1375
|
wordCheck: false,
|
|
1385
1376
|
caseCheck: false
|
|
1386
1377
|
}),
|
|
1387
|
-
|
|
1388
|
-
checkMode =
|
|
1389
|
-
checkModeReplace =
|
|
1378
|
+
_useState0 = _slicedToArray(_useState9, 2),
|
|
1379
|
+
checkMode = _useState0[0],
|
|
1380
|
+
checkModeReplace = _useState0[1];
|
|
1390
1381
|
var closeDialog = useCallback(function () {
|
|
1391
1382
|
_.set(refs.globalCache, "searchDialog.mouseEnter", false);
|
|
1392
1383
|
setContext(function (draftCtx) {
|
|
@@ -1422,97 +1413,113 @@ var SearchReplace = function SearchReplace(_ref) {
|
|
|
1422
1413
|
e.stopPropagation();
|
|
1423
1414
|
}
|
|
1424
1415
|
}, /*#__PURE__*/React.createElement("div", {
|
|
1425
|
-
className: "
|
|
1426
|
-
onMouseDown: function onMouseDown(e) {
|
|
1427
|
-
return e.stopPropagation();
|
|
1428
|
-
}
|
|
1416
|
+
className: ""
|
|
1429
1417
|
}, /*#__PURE__*/React.createElement("div", {
|
|
1430
|
-
className: "
|
|
1418
|
+
className: "flex items-center justify-between border-b color-border-default py-3 px-6"
|
|
1419
|
+
}, /*#__PURE__*/React.createElement("h3", {
|
|
1420
|
+
className: "text-heading-sm"
|
|
1421
|
+
}, "Find and replace"), /*#__PURE__*/React.createElement(IconButton, {
|
|
1422
|
+
icon: "X",
|
|
1423
|
+
variant: "ghost",
|
|
1431
1424
|
onClick: closeDialog,
|
|
1432
1425
|
tabIndex: 0
|
|
1433
|
-
}, /*#__PURE__*/React.createElement(SVGIcon, {
|
|
1434
|
-
name: "close",
|
|
1435
|
-
style: {
|
|
1436
|
-
padding: 7,
|
|
1437
|
-
cursor: "pointer"
|
|
1438
|
-
}
|
|
1439
1426
|
})), /*#__PURE__*/React.createElement("div", {
|
|
1440
|
-
className: "
|
|
1441
|
-
}, /*#__PURE__*/React.createElement("span", {
|
|
1442
|
-
id: "searchTab",
|
|
1443
|
-
className: showReplace ? "" : "on",
|
|
1444
|
-
onClick: function onClick() {
|
|
1445
|
-
return setShowReplace(false);
|
|
1446
|
-
},
|
|
1447
|
-
tabIndex: 0
|
|
1448
|
-
}, findAndReplace.find), /*#__PURE__*/React.createElement("span", {
|
|
1449
|
-
id: "replaceTab",
|
|
1450
|
-
className: showReplace ? "on" : "",
|
|
1451
|
-
onClick: function onClick() {
|
|
1452
|
-
return setShowReplace(true);
|
|
1453
|
-
},
|
|
1454
|
-
tabIndex: 0
|
|
1455
|
-
}, findAndReplace.replace)), /*#__PURE__*/React.createElement("div", {
|
|
1456
|
-
className: "ctBox"
|
|
1427
|
+
className: "px-6 pb-6 pt-4"
|
|
1457
1428
|
}, /*#__PURE__*/React.createElement("div", {
|
|
1458
|
-
className: "
|
|
1429
|
+
className: "flex flex-col gap-4"
|
|
1459
1430
|
}, /*#__PURE__*/React.createElement("div", {
|
|
1460
|
-
className: "
|
|
1431
|
+
className: "flex flex-col gap-4"
|
|
1461
1432
|
}, /*#__PURE__*/React.createElement("div", {
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
},
|
|
1433
|
+
id: "searchInput",
|
|
1434
|
+
className: "flex flex-row gap-2 items-center"
|
|
1435
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
1436
|
+
className: "find-replace-label text-heading-xsm"
|
|
1437
|
+
}, findAndReplace.findTextbox, "\uFF1A"), /*#__PURE__*/React.createElement(TextField, {
|
|
1438
|
+
ref: searchInputRef,
|
|
1465
1439
|
className: "formulaInputFocus",
|
|
1466
1440
|
autoFocus: true,
|
|
1467
1441
|
spellCheck: "false",
|
|
1468
1442
|
onKeyDown: function onKeyDown(e) {
|
|
1469
1443
|
return e.stopPropagation();
|
|
1470
1444
|
},
|
|
1445
|
+
onMouseDown: function onMouseDown(e) {
|
|
1446
|
+
var _searchInputRef$curre;
|
|
1447
|
+
if (e.target === searchInputRef.current || ((_searchInputRef$curre = searchInputRef.current) === null || _searchInputRef$curre === void 0 ? void 0 : _searchInputRef$curre.contains(e.target))) {
|
|
1448
|
+
e.stopPropagation();
|
|
1449
|
+
}
|
|
1450
|
+
},
|
|
1471
1451
|
value: searchText,
|
|
1472
1452
|
onChange: function onChange(e) {
|
|
1473
1453
|
return setSearchText(e.target.value);
|
|
1474
1454
|
}
|
|
1475
|
-
})),
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
},
|
|
1455
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
1456
|
+
id: "replaceInput",
|
|
1457
|
+
className: "flex flex-row gap-2 items-center"
|
|
1458
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
1459
|
+
className: "find-replace-label text-heading-xsm"
|
|
1460
|
+
}, findAndReplace.replaceTextbox, "\uFF1A"), /*#__PURE__*/React.createElement(TextField, {
|
|
1461
|
+
ref: replaceInputRef,
|
|
1479
1462
|
className: "formulaInputFocus",
|
|
1480
1463
|
spellCheck: "false",
|
|
1481
1464
|
onKeyDown: function onKeyDown(e) {
|
|
1482
1465
|
return e.stopPropagation();
|
|
1483
1466
|
},
|
|
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
|
+
},
|
|
1484
1473
|
value: replaceText,
|
|
1485
1474
|
onChange: function onChange(e) {
|
|
1486
1475
|
return setReplaceText(e.target.value);
|
|
1487
1476
|
}
|
|
1488
|
-
})))
|
|
1489
|
-
className: "
|
|
1477
|
+
}))), /*#__PURE__*/React.createElement("div", {
|
|
1478
|
+
className: "flex flex-row gap-2"
|
|
1490
1479
|
}, /*#__PURE__*/React.createElement("div", {
|
|
1491
|
-
|
|
1492
|
-
}, /*#__PURE__*/React.createElement("
|
|
1493
|
-
|
|
1494
|
-
|
|
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
|
+
id: "regCheck",
|
|
1485
|
+
className: "flex flex-row gap-2 items-center"
|
|
1486
|
+
}, /*#__PURE__*/React.createElement(Checkbox, {
|
|
1487
|
+
className: "border-2",
|
|
1488
|
+
checked: checkMode.regCheck,
|
|
1489
|
+
onCheckedChange: function onCheckedChange(e) {
|
|
1495
1490
|
return setCheckMode("regCheck", e.target.checked);
|
|
1496
1491
|
}
|
|
1497
1492
|
}), /*#__PURE__*/React.createElement("span", null, findAndReplace.regexTextbox)), /*#__PURE__*/React.createElement("div", {
|
|
1498
|
-
id: "
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
}), /*#__PURE__*/React.createElement("span", null, findAndReplace.wholeTextbox)), /*#__PURE__*/React.createElement("div", {
|
|
1505
|
-
id: "caseCheck"
|
|
1506
|
-
}, /*#__PURE__*/React.createElement("input", {
|
|
1507
|
-
type: "checkbox",
|
|
1508
|
-
onChange: function onChange(e) {
|
|
1493
|
+
id: "caseCheck",
|
|
1494
|
+
className: "flex flex-row gap-2 items-center"
|
|
1495
|
+
}, /*#__PURE__*/React.createElement(Checkbox, {
|
|
1496
|
+
className: "border-2",
|
|
1497
|
+
checked: checkMode.caseCheck,
|
|
1498
|
+
onCheckedChange: function onCheckedChange(e) {
|
|
1509
1499
|
return setCheckMode("caseCheck", e.target.checked);
|
|
1510
1500
|
}
|
|
1511
|
-
}), /*#__PURE__*/React.createElement("span", null, findAndReplace.distinguishTextbox))
|
|
1512
|
-
|
|
1513
|
-
|
|
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) {
|
|
1508
|
+
return setCheckMode("wordCheck", e.target.checked);
|
|
1509
|
+
}
|
|
1510
|
+
}), /*#__PURE__*/React.createElement("span", null, findAndReplace.wholeTextbox)))), /*#__PURE__*/React.createElement(Divider$2, {
|
|
1511
|
+
className: "w-full border-t-[1px]"
|
|
1512
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
1513
|
+
className: "flex flex-row gap-2 justify-center items-center"
|
|
1514
|
+
}, /*#__PURE__*/React.createElement(Button$1, {
|
|
1515
|
+
variant: "secondary",
|
|
1516
|
+
className: "min-w-fit",
|
|
1517
|
+
onClick: closeDialog,
|
|
1518
|
+
tabIndex: 0
|
|
1519
|
+
}, button.close), /*#__PURE__*/React.createElement(Button$1, {
|
|
1514
1520
|
id: "replaceAllBtn",
|
|
1515
|
-
|
|
1521
|
+
variant: "secondary",
|
|
1522
|
+
className: "min-w-fit",
|
|
1516
1523
|
onClick: function onClick() {
|
|
1517
1524
|
setContext(function (draftCtx) {
|
|
1518
1525
|
setSelectedCell(undefined);
|
|
@@ -1521,9 +1528,10 @@ var SearchReplace = function SearchReplace(_ref) {
|
|
|
1521
1528
|
});
|
|
1522
1529
|
},
|
|
1523
1530
|
tabIndex: 0
|
|
1524
|
-
}, findAndReplace.allReplaceBtn), /*#__PURE__*/React.createElement(
|
|
1531
|
+
}, findAndReplace.allReplaceBtn), /*#__PURE__*/React.createElement(Button$1, {
|
|
1525
1532
|
id: "replaceBtn",
|
|
1526
|
-
|
|
1533
|
+
variant: "secondary",
|
|
1534
|
+
className: "min-w-fit",
|
|
1527
1535
|
onClick: function onClick() {
|
|
1528
1536
|
return setContext(function (draftCtx) {
|
|
1529
1537
|
setSelectedCell(undefined);
|
|
@@ -1534,9 +1542,10 @@ var SearchReplace = function SearchReplace(_ref) {
|
|
|
1534
1542
|
});
|
|
1535
1543
|
},
|
|
1536
1544
|
tabIndex: 0
|
|
1537
|
-
}, findAndReplace.replaceBtn)
|
|
1545
|
+
}, findAndReplace.replaceBtn), /*#__PURE__*/React.createElement(Button$1, {
|
|
1538
1546
|
id: "searchAllBtn",
|
|
1539
|
-
|
|
1547
|
+
variant: "secondary",
|
|
1548
|
+
className: "min-w-fit",
|
|
1540
1549
|
onClick: function onClick() {
|
|
1541
1550
|
return setContext(function (draftCtx) {
|
|
1542
1551
|
setSelectedCell(undefined);
|
|
@@ -1547,9 +1556,10 @@ var SearchReplace = function SearchReplace(_ref) {
|
|
|
1547
1556
|
});
|
|
1548
1557
|
},
|
|
1549
1558
|
tabIndex: 0
|
|
1550
|
-
}, findAndReplace.allFindBtn), /*#__PURE__*/React.createElement(
|
|
1559
|
+
}, findAndReplace.allFindBtn), /*#__PURE__*/React.createElement(Button$1, {
|
|
1551
1560
|
id: "searchNextBtn",
|
|
1552
|
-
|
|
1561
|
+
variant: "secondary",
|
|
1562
|
+
className: "min-w-fit",
|
|
1553
1563
|
onClick: function onClick() {
|
|
1554
1564
|
return setContext(function (draftCtx) {
|
|
1555
1565
|
setSearchResult([]);
|
|
@@ -1558,19 +1568,25 @@ var SearchReplace = function SearchReplace(_ref) {
|
|
|
1558
1568
|
});
|
|
1559
1569
|
},
|
|
1560
1570
|
tabIndex: 0
|
|
1561
|
-
}, findAndReplace.findBtn))), /*#__PURE__*/React.createElement("div", {
|
|
1562
|
-
|
|
1563
|
-
|
|
1571
|
+
}, findAndReplace.findBtn)))), searchResult.length > 0 && (/*#__PURE__*/React.createElement("div", {
|
|
1572
|
+
ref: tableContainerRef,
|
|
1573
|
+
className: "px-6 pb-6 max-h-[300px] overflow-y-auto",
|
|
1574
|
+
onMouseDown: function onMouseDown(e) {
|
|
1575
|
+
var _tableContainerRef$cu;
|
|
1576
|
+
if (e.target === tableContainerRef.current || ((_tableContainerRef$cu = tableContainerRef.current) === null || _tableContainerRef$cu === void 0 ? void 0 : _tableContainerRef$cu.contains(e.target))) {
|
|
1577
|
+
var _tableContainerRef$cu2;
|
|
1578
|
+
e.stopPropagation();
|
|
1579
|
+
(_tableContainerRef$cu2 = tableContainerRef.current) === null || _tableContainerRef$cu2 === void 0 ? void 0 : _tableContainerRef$cu2.focus();
|
|
1580
|
+
}
|
|
1581
|
+
},
|
|
1564
1582
|
tabIndex: 0
|
|
1565
|
-
},
|
|
1583
|
+
}, /*#__PURE__*/React.createElement(Table, {
|
|
1566
1584
|
id: "searchAllbox"
|
|
1567
|
-
}, /*#__PURE__*/React.createElement(
|
|
1568
|
-
className: "
|
|
1569
|
-
}, /*#__PURE__*/React.createElement(
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
1573
|
-
className: "boxItem ".concat(_.isEqual(selectedCell, {
|
|
1585
|
+
}, /*#__PURE__*/React.createElement(TableHeader, {
|
|
1586
|
+
className: "color-bg-secondary"
|
|
1587
|
+
}, /*#__PURE__*/React.createElement(TableRow, null, /*#__PURE__*/React.createElement(TableHead, null, findAndReplace.searchTargetSheet), /*#__PURE__*/React.createElement(TableHead, null, findAndReplace.searchTargetCell), /*#__PURE__*/React.createElement(TableHead, null, findAndReplace.searchTargetValue))), /*#__PURE__*/React.createElement(TableBody, null, searchResult.map(function (v) {
|
|
1588
|
+
return /*#__PURE__*/React.createElement(TableRow, {
|
|
1589
|
+
className: "".concat(_.isEqual(selectedCell, {
|
|
1574
1590
|
r: v.r,
|
|
1575
1591
|
c: v.c
|
|
1576
1592
|
}) ? "on" : ""),
|
|
@@ -1589,8 +1605,14 @@ var SearchReplace = function SearchReplace(_ref) {
|
|
|
1589
1605
|
});
|
|
1590
1606
|
},
|
|
1591
1607
|
tabIndex: 0
|
|
1592
|
-
}, /*#__PURE__*/React.createElement(
|
|
1593
|
-
|
|
1608
|
+
}, /*#__PURE__*/React.createElement(TableCell, {
|
|
1609
|
+
className: "find-replace-table-cell"
|
|
1610
|
+
}, v.sheetName), /*#__PURE__*/React.createElement(TableCell, {
|
|
1611
|
+
className: "find-replace-table-cell"
|
|
1612
|
+
}, v.cellPosition), /*#__PURE__*/React.createElement(TableCell, {
|
|
1613
|
+
className: "find-replace-table-cell"
|
|
1614
|
+
}, v.value));
|
|
1615
|
+
})))))));
|
|
1594
1616
|
};
|
|
1595
1617
|
|
|
1596
1618
|
var LinkEditCard = function LinkEditCard(_ref) {
|