@fileverse-dev/fortune-react 1.0.2-mod-21 → 1.0.2-mod-22
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 +24 -0
- package/dist/index.esm.css +24 -0
- package/dist/index.esm.js +37 -23
- package/dist/index.js +36 -22
- package/dist/index.umd.css +24 -0
- package/dist/index.umd.js +36 -22
- package/dist/index.umd.min.css +1 -1
- package/dist/index.umd.min.js +1 -1
- package/package.json +1 -1
package/dist/index.css
CHANGED
|
@@ -1419,6 +1419,30 @@ html::-webkit-scrollbar-button {
|
|
|
1419
1419
|
min-width: 154px;
|
|
1420
1420
|
}
|
|
1421
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
|
+
|
|
1422
1446
|
.fortune-link-modify-modal {
|
|
1423
1447
|
position: absolute;
|
|
1424
1448
|
overflow: hidden;
|
package/dist/index.esm.css
CHANGED
|
@@ -1419,6 +1419,30 @@ html::-webkit-scrollbar-button {
|
|
|
1419
1419
|
min-width: 154px;
|
|
1420
1420
|
}
|
|
1421
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
|
+
|
|
1422
1446
|
.fortune-link-modify-modal {
|
|
1423
1447
|
position: absolute;
|
|
1424
1448
|
overflow: hidden;
|
package/dist/index.esm.js
CHANGED
|
@@ -2,7 +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
|
+
import { IconButton, Button as Button$1, TextField, Checkbox, Divider as Divider$2, Table, TableHeader, TableRow, TableHead, TableBody, cn, TableCell } from '@fileverse/ui';
|
|
6
6
|
import regeneratorRuntime from 'regenerator-runtime';
|
|
7
7
|
|
|
8
8
|
function _arrayLikeToArray(r, a) {
|
|
@@ -1347,8 +1347,7 @@ var SearchReplace = function SearchReplace(_ref) {
|
|
|
1347
1347
|
setContext = _useContext.setContext,
|
|
1348
1348
|
refs = _useContext.refs;
|
|
1349
1349
|
var _locale = locale(context),
|
|
1350
|
-
findAndReplace = _locale.findAndReplace
|
|
1351
|
-
button = _locale.button;
|
|
1350
|
+
findAndReplace = _locale.findAndReplace;
|
|
1352
1351
|
var _useState = useState(""),
|
|
1353
1352
|
_useState2 = _slicedToArray(_useState, 2),
|
|
1354
1353
|
searchText = _useState2[0],
|
|
@@ -1412,9 +1411,7 @@ var SearchReplace = function SearchReplace(_ref) {
|
|
|
1412
1411
|
onSearchDialogMoveStart(refs.globalCache, nativeEvent, getContainer());
|
|
1413
1412
|
e.stopPropagation();
|
|
1414
1413
|
}
|
|
1415
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
1416
|
-
className: ""
|
|
1417
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
1414
|
+
}, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
|
|
1418
1415
|
className: "flex items-center justify-between border-b color-border-default py-3 px-6"
|
|
1419
1416
|
}, /*#__PURE__*/React.createElement("h3", {
|
|
1420
1417
|
className: "text-heading-sm"
|
|
@@ -1450,7 +1447,10 @@ var SearchReplace = function SearchReplace(_ref) {
|
|
|
1450
1447
|
},
|
|
1451
1448
|
value: searchText,
|
|
1452
1449
|
onChange: function onChange(e) {
|
|
1453
|
-
|
|
1450
|
+
if (e.target.value.length === 0) {
|
|
1451
|
+
setSearchResult([]);
|
|
1452
|
+
}
|
|
1453
|
+
setSearchText(e.target.value);
|
|
1454
1454
|
}
|
|
1455
1455
|
})), /*#__PURE__*/React.createElement("div", {
|
|
1456
1456
|
id: "replaceInput",
|
|
@@ -1510,13 +1510,8 @@ var SearchReplace = function SearchReplace(_ref) {
|
|
|
1510
1510
|
}), /*#__PURE__*/React.createElement("span", null, findAndReplace.wholeTextbox)))), /*#__PURE__*/React.createElement(Divider$2, {
|
|
1511
1511
|
className: "w-full border-t-[1px]"
|
|
1512
1512
|
}), /*#__PURE__*/React.createElement("div", {
|
|
1513
|
-
className: "flex flex-row gap-2 justify-center items-center"
|
|
1513
|
+
className: "flex flex-row gap-2 justify-center items-center mb-4"
|
|
1514
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, {
|
|
1520
1515
|
id: "replaceAllBtn",
|
|
1521
1516
|
variant: "secondary",
|
|
1522
1517
|
className: "min-w-fit",
|
|
@@ -1527,7 +1522,8 @@ var SearchReplace = function SearchReplace(_ref) {
|
|
|
1527
1522
|
showAlert(alertMsg);
|
|
1528
1523
|
});
|
|
1529
1524
|
},
|
|
1530
|
-
tabIndex: 0
|
|
1525
|
+
tabIndex: 0,
|
|
1526
|
+
disabled: searchText.length === 0 || replaceText.length === 0
|
|
1531
1527
|
}, findAndReplace.allReplaceBtn), /*#__PURE__*/React.createElement(Button$1, {
|
|
1532
1528
|
id: "replaceBtn",
|
|
1533
1529
|
variant: "secondary",
|
|
@@ -1541,7 +1537,8 @@ var SearchReplace = function SearchReplace(_ref) {
|
|
|
1541
1537
|
}
|
|
1542
1538
|
});
|
|
1543
1539
|
},
|
|
1544
|
-
tabIndex: 0
|
|
1540
|
+
tabIndex: 0,
|
|
1541
|
+
disabled: searchText.length === 0 || replaceText.length === 0
|
|
1545
1542
|
}, findAndReplace.replaceBtn), /*#__PURE__*/React.createElement(Button$1, {
|
|
1546
1543
|
id: "searchAllBtn",
|
|
1547
1544
|
variant: "secondary",
|
|
@@ -1555,10 +1552,11 @@ var SearchReplace = function SearchReplace(_ref) {
|
|
|
1555
1552
|
if (_.isEmpty(res)) showAlert(findAndReplace.noFindTip);
|
|
1556
1553
|
});
|
|
1557
1554
|
},
|
|
1558
|
-
tabIndex: 0
|
|
1555
|
+
tabIndex: 0,
|
|
1556
|
+
disabled: searchText.length === 0
|
|
1559
1557
|
}, findAndReplace.allFindBtn), /*#__PURE__*/React.createElement(Button$1, {
|
|
1560
1558
|
id: "searchNextBtn",
|
|
1561
|
-
variant: "
|
|
1559
|
+
variant: "default",
|
|
1562
1560
|
className: "min-w-fit",
|
|
1563
1561
|
onClick: function onClick() {
|
|
1564
1562
|
return setContext(function (draftCtx) {
|
|
@@ -1567,10 +1565,13 @@ var SearchReplace = function SearchReplace(_ref) {
|
|
|
1567
1565
|
if (alertMsg != null) showAlert(alertMsg);
|
|
1568
1566
|
});
|
|
1569
1567
|
},
|
|
1570
|
-
tabIndex: 0
|
|
1571
|
-
|
|
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", {
|
|
1572
1573
|
ref: tableContainerRef,
|
|
1573
|
-
className: "
|
|
1574
|
+
className: "mb-6 table-container max-h-[300px] overflow-y-auto",
|
|
1574
1575
|
onMouseDown: function onMouseDown(e) {
|
|
1575
1576
|
var _tableContainerRef$cu;
|
|
1576
1577
|
if (e.target === tableContainerRef.current || ((_tableContainerRef$cu = tableContainerRef.current) === null || _tableContainerRef$cu === void 0 ? void 0 : _tableContainerRef$cu.contains(e.target))) {
|
|
@@ -1579,6 +1580,19 @@ var SearchReplace = function SearchReplace(_ref) {
|
|
|
1579
1580
|
(_tableContainerRef$cu2 = tableContainerRef.current) === null || _tableContainerRef$cu2 === void 0 ? void 0 : _tableContainerRef$cu2.focus();
|
|
1580
1581
|
}
|
|
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
|
+
},
|
|
1582
1596
|
tabIndex: 0
|
|
1583
1597
|
}, /*#__PURE__*/React.createElement(Table, {
|
|
1584
1598
|
id: "searchAllbox"
|
|
@@ -1586,10 +1600,10 @@ var SearchReplace = function SearchReplace(_ref) {
|
|
|
1586
1600
|
className: "color-bg-secondary"
|
|
1587
1601
|
}, /*#__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
1602
|
return /*#__PURE__*/React.createElement(TableRow, {
|
|
1589
|
-
className:
|
|
1603
|
+
className: cn(_.isEqual(selectedCell, {
|
|
1590
1604
|
r: v.r,
|
|
1591
1605
|
c: v.c
|
|
1592
|
-
}) ? "
|
|
1606
|
+
}) ? "color-bg-default-selected" : ""),
|
|
1593
1607
|
key: v.cellPosition,
|
|
1594
1608
|
onClick: function onClick() {
|
|
1595
1609
|
setContext(function (draftCtx) {
|
|
@@ -1612,7 +1626,7 @@ var SearchReplace = function SearchReplace(_ref) {
|
|
|
1612
1626
|
}, v.cellPosition), /*#__PURE__*/React.createElement(TableCell, {
|
|
1613
1627
|
className: "find-replace-table-cell"
|
|
1614
1628
|
}, v.value));
|
|
1615
|
-
})))))));
|
|
1629
|
+
})))))))));
|
|
1616
1630
|
};
|
|
1617
1631
|
|
|
1618
1632
|
var LinkEditCard = function LinkEditCard(_ref) {
|
package/dist/index.js
CHANGED
|
@@ -1358,8 +1358,7 @@ var SearchReplace = function SearchReplace(_ref) {
|
|
|
1358
1358
|
setContext = _useContext.setContext,
|
|
1359
1359
|
refs = _useContext.refs;
|
|
1360
1360
|
var _locale = fortuneCore.locale(context),
|
|
1361
|
-
findAndReplace = _locale.findAndReplace
|
|
1362
|
-
button = _locale.button;
|
|
1361
|
+
findAndReplace = _locale.findAndReplace;
|
|
1363
1362
|
var _useState = React.useState(""),
|
|
1364
1363
|
_useState2 = _slicedToArray(_useState, 2),
|
|
1365
1364
|
searchText = _useState2[0],
|
|
@@ -1423,9 +1422,7 @@ var SearchReplace = function SearchReplace(_ref) {
|
|
|
1423
1422
|
fortuneCore.onSearchDialogMoveStart(refs.globalCache, nativeEvent, getContainer());
|
|
1424
1423
|
e.stopPropagation();
|
|
1425
1424
|
}
|
|
1426
|
-
}, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
1427
|
-
className: ""
|
|
1428
|
-
}, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
1425
|
+
}, /*#__PURE__*/React__default['default'].createElement("div", null, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
1429
1426
|
className: "flex items-center justify-between border-b color-border-default py-3 px-6"
|
|
1430
1427
|
}, /*#__PURE__*/React__default['default'].createElement("h3", {
|
|
1431
1428
|
className: "text-heading-sm"
|
|
@@ -1461,7 +1458,10 @@ var SearchReplace = function SearchReplace(_ref) {
|
|
|
1461
1458
|
},
|
|
1462
1459
|
value: searchText,
|
|
1463
1460
|
onChange: function onChange(e) {
|
|
1464
|
-
|
|
1461
|
+
if (e.target.value.length === 0) {
|
|
1462
|
+
setSearchResult([]);
|
|
1463
|
+
}
|
|
1464
|
+
setSearchText(e.target.value);
|
|
1465
1465
|
}
|
|
1466
1466
|
})), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
1467
1467
|
id: "replaceInput",
|
|
@@ -1521,13 +1521,8 @@ var SearchReplace = function SearchReplace(_ref) {
|
|
|
1521
1521
|
}), /*#__PURE__*/React__default['default'].createElement("span", null, findAndReplace.wholeTextbox)))), /*#__PURE__*/React__default['default'].createElement(ui.Divider, {
|
|
1522
1522
|
className: "w-full border-t-[1px]"
|
|
1523
1523
|
}), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
1524
|
-
className: "flex flex-row gap-2 justify-center items-center"
|
|
1524
|
+
className: "flex flex-row gap-2 justify-center items-center mb-4"
|
|
1525
1525
|
}, /*#__PURE__*/React__default['default'].createElement(ui.Button, {
|
|
1526
|
-
variant: "secondary",
|
|
1527
|
-
className: "min-w-fit",
|
|
1528
|
-
onClick: closeDialog,
|
|
1529
|
-
tabIndex: 0
|
|
1530
|
-
}, button.close), /*#__PURE__*/React__default['default'].createElement(ui.Button, {
|
|
1531
1526
|
id: "replaceAllBtn",
|
|
1532
1527
|
variant: "secondary",
|
|
1533
1528
|
className: "min-w-fit",
|
|
@@ -1538,7 +1533,8 @@ var SearchReplace = function SearchReplace(_ref) {
|
|
|
1538
1533
|
showAlert(alertMsg);
|
|
1539
1534
|
});
|
|
1540
1535
|
},
|
|
1541
|
-
tabIndex: 0
|
|
1536
|
+
tabIndex: 0,
|
|
1537
|
+
disabled: searchText.length === 0 || replaceText.length === 0
|
|
1542
1538
|
}, findAndReplace.allReplaceBtn), /*#__PURE__*/React__default['default'].createElement(ui.Button, {
|
|
1543
1539
|
id: "replaceBtn",
|
|
1544
1540
|
variant: "secondary",
|
|
@@ -1552,7 +1548,8 @@ var SearchReplace = function SearchReplace(_ref) {
|
|
|
1552
1548
|
}
|
|
1553
1549
|
});
|
|
1554
1550
|
},
|
|
1555
|
-
tabIndex: 0
|
|
1551
|
+
tabIndex: 0,
|
|
1552
|
+
disabled: searchText.length === 0 || replaceText.length === 0
|
|
1556
1553
|
}, findAndReplace.replaceBtn), /*#__PURE__*/React__default['default'].createElement(ui.Button, {
|
|
1557
1554
|
id: "searchAllBtn",
|
|
1558
1555
|
variant: "secondary",
|
|
@@ -1566,10 +1563,11 @@ var SearchReplace = function SearchReplace(_ref) {
|
|
|
1566
1563
|
if (___default['default'].isEmpty(res)) showAlert(findAndReplace.noFindTip);
|
|
1567
1564
|
});
|
|
1568
1565
|
},
|
|
1569
|
-
tabIndex: 0
|
|
1566
|
+
tabIndex: 0,
|
|
1567
|
+
disabled: searchText.length === 0
|
|
1570
1568
|
}, findAndReplace.allFindBtn), /*#__PURE__*/React__default['default'].createElement(ui.Button, {
|
|
1571
1569
|
id: "searchNextBtn",
|
|
1572
|
-
variant: "
|
|
1570
|
+
variant: "default",
|
|
1573
1571
|
className: "min-w-fit",
|
|
1574
1572
|
onClick: function onClick() {
|
|
1575
1573
|
return setContext(function (draftCtx) {
|
|
@@ -1578,10 +1576,13 @@ var SearchReplace = function SearchReplace(_ref) {
|
|
|
1578
1576
|
if (alertMsg != null) showAlert(alertMsg);
|
|
1579
1577
|
});
|
|
1580
1578
|
},
|
|
1581
|
-
tabIndex: 0
|
|
1582
|
-
|
|
1579
|
+
tabIndex: 0,
|
|
1580
|
+
disabled: searchText.length === 0
|
|
1581
|
+
}, findAndReplace.findBtn))), searchResult.length > 0 && (/*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(ui.Divider, {
|
|
1582
|
+
className: "w-full border-t-[1px] mb-4"
|
|
1583
|
+
}), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
1583
1584
|
ref: tableContainerRef,
|
|
1584
|
-
className: "
|
|
1585
|
+
className: "mb-6 table-container max-h-[300px] overflow-y-auto",
|
|
1585
1586
|
onMouseDown: function onMouseDown(e) {
|
|
1586
1587
|
var _tableContainerRef$cu;
|
|
1587
1588
|
if (e.target === tableContainerRef.current || ((_tableContainerRef$cu = tableContainerRef.current) === null || _tableContainerRef$cu === void 0 ? void 0 : _tableContainerRef$cu.contains(e.target))) {
|
|
@@ -1590,6 +1591,19 @@ var SearchReplace = function SearchReplace(_ref) {
|
|
|
1590
1591
|
(_tableContainerRef$cu2 = tableContainerRef.current) === null || _tableContainerRef$cu2 === void 0 ? void 0 : _tableContainerRef$cu2.focus();
|
|
1591
1592
|
}
|
|
1592
1593
|
},
|
|
1594
|
+
onWheel: function onWheel(e) {
|
|
1595
|
+
e.preventDefault();
|
|
1596
|
+
e.stopPropagation();
|
|
1597
|
+
if (tableContainerRef.current) {
|
|
1598
|
+
tableContainerRef.current.scrollTop += e.deltaY;
|
|
1599
|
+
}
|
|
1600
|
+
},
|
|
1601
|
+
onTouchStart: function onTouchStart(e) {
|
|
1602
|
+
e.stopPropagation();
|
|
1603
|
+
},
|
|
1604
|
+
onTouchMove: function onTouchMove(e) {
|
|
1605
|
+
e.stopPropagation();
|
|
1606
|
+
},
|
|
1593
1607
|
tabIndex: 0
|
|
1594
1608
|
}, /*#__PURE__*/React__default['default'].createElement(ui.Table, {
|
|
1595
1609
|
id: "searchAllbox"
|
|
@@ -1597,10 +1611,10 @@ var SearchReplace = function SearchReplace(_ref) {
|
|
|
1597
1611
|
className: "color-bg-secondary"
|
|
1598
1612
|
}, /*#__PURE__*/React__default['default'].createElement(ui.TableRow, null, /*#__PURE__*/React__default['default'].createElement(ui.TableHead, null, findAndReplace.searchTargetSheet), /*#__PURE__*/React__default['default'].createElement(ui.TableHead, null, findAndReplace.searchTargetCell), /*#__PURE__*/React__default['default'].createElement(ui.TableHead, null, findAndReplace.searchTargetValue))), /*#__PURE__*/React__default['default'].createElement(ui.TableBody, null, searchResult.map(function (v) {
|
|
1599
1613
|
return /*#__PURE__*/React__default['default'].createElement(ui.TableRow, {
|
|
1600
|
-
className:
|
|
1614
|
+
className: ui.cn(___default['default'].isEqual(selectedCell, {
|
|
1601
1615
|
r: v.r,
|
|
1602
1616
|
c: v.c
|
|
1603
|
-
}) ? "
|
|
1617
|
+
}) ? "color-bg-default-selected" : ""),
|
|
1604
1618
|
key: v.cellPosition,
|
|
1605
1619
|
onClick: function onClick() {
|
|
1606
1620
|
setContext(function (draftCtx) {
|
|
@@ -1623,7 +1637,7 @@ var SearchReplace = function SearchReplace(_ref) {
|
|
|
1623
1637
|
}, v.cellPosition), /*#__PURE__*/React__default['default'].createElement(ui.TableCell, {
|
|
1624
1638
|
className: "find-replace-table-cell"
|
|
1625
1639
|
}, v.value));
|
|
1626
|
-
})))))));
|
|
1640
|
+
})))))))));
|
|
1627
1641
|
};
|
|
1628
1642
|
|
|
1629
1643
|
var LinkEditCard = function LinkEditCard(_ref) {
|
package/dist/index.umd.css
CHANGED
|
@@ -1419,6 +1419,30 @@ html::-webkit-scrollbar-button {
|
|
|
1419
1419
|
min-width: 154px;
|
|
1420
1420
|
}
|
|
1421
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
|
+
|
|
1422
1446
|
.fortune-link-modify-modal {
|
|
1423
1447
|
position: absolute;
|
|
1424
1448
|
overflow: hidden;
|
package/dist/index.umd.js
CHANGED
|
@@ -104350,8 +104350,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
104350
104350
|
setContext = _useContext.setContext,
|
|
104351
104351
|
refs = _useContext.refs;
|
|
104352
104352
|
var _locale = locale(context),
|
|
104353
|
-
findAndReplace = _locale.findAndReplace
|
|
104354
|
-
button = _locale.button;
|
|
104353
|
+
findAndReplace = _locale.findAndReplace;
|
|
104355
104354
|
var _useState = React.useState(""),
|
|
104356
104355
|
_useState2 = _slicedToArray(_useState, 2),
|
|
104357
104356
|
searchText = _useState2[0],
|
|
@@ -104415,9 +104414,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
104415
104414
|
onSearchDialogMoveStart(refs.globalCache, nativeEvent, getContainer());
|
|
104416
104415
|
e.stopPropagation();
|
|
104417
104416
|
}
|
|
104418
|
-
}, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
104419
|
-
className: ""
|
|
104420
|
-
}, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
104417
|
+
}, /*#__PURE__*/React__default['default'].createElement("div", null, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
104421
104418
|
className: "flex items-center justify-between border-b color-border-default py-3 px-6"
|
|
104422
104419
|
}, /*#__PURE__*/React__default['default'].createElement("h3", {
|
|
104423
104420
|
className: "text-heading-sm"
|
|
@@ -104453,7 +104450,10 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
104453
104450
|
},
|
|
104454
104451
|
value: searchText,
|
|
104455
104452
|
onChange: function onChange(e) {
|
|
104456
|
-
|
|
104453
|
+
if (e.target.value.length === 0) {
|
|
104454
|
+
setSearchResult([]);
|
|
104455
|
+
}
|
|
104456
|
+
setSearchText(e.target.value);
|
|
104457
104457
|
}
|
|
104458
104458
|
})), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
104459
104459
|
id: "replaceInput",
|
|
@@ -104513,13 +104513,8 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
104513
104513
|
}), /*#__PURE__*/React__default['default'].createElement("span", null, findAndReplace.wholeTextbox)))), /*#__PURE__*/React__default['default'].createElement(o8, {
|
|
104514
104514
|
className: "w-full border-t-[1px]"
|
|
104515
104515
|
}), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
104516
|
-
className: "flex flex-row gap-2 justify-center items-center"
|
|
104516
|
+
className: "flex flex-row gap-2 justify-center items-center mb-4"
|
|
104517
104517
|
}, /*#__PURE__*/React__default['default'].createElement(_t, {
|
|
104518
|
-
variant: "secondary",
|
|
104519
|
-
className: "min-w-fit",
|
|
104520
|
-
onClick: closeDialog,
|
|
104521
|
-
tabIndex: 0
|
|
104522
|
-
}, button.close), /*#__PURE__*/React__default['default'].createElement(_t, {
|
|
104523
104518
|
id: "replaceAllBtn",
|
|
104524
104519
|
variant: "secondary",
|
|
104525
104520
|
className: "min-w-fit",
|
|
@@ -104530,7 +104525,8 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
104530
104525
|
showAlert(alertMsg);
|
|
104531
104526
|
});
|
|
104532
104527
|
},
|
|
104533
|
-
tabIndex: 0
|
|
104528
|
+
tabIndex: 0,
|
|
104529
|
+
disabled: searchText.length === 0 || replaceText.length === 0
|
|
104534
104530
|
}, findAndReplace.allReplaceBtn), /*#__PURE__*/React__default['default'].createElement(_t, {
|
|
104535
104531
|
id: "replaceBtn",
|
|
104536
104532
|
variant: "secondary",
|
|
@@ -104544,7 +104540,8 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
104544
104540
|
}
|
|
104545
104541
|
});
|
|
104546
104542
|
},
|
|
104547
|
-
tabIndex: 0
|
|
104543
|
+
tabIndex: 0,
|
|
104544
|
+
disabled: searchText.length === 0 || replaceText.length === 0
|
|
104548
104545
|
}, findAndReplace.replaceBtn), /*#__PURE__*/React__default['default'].createElement(_t, {
|
|
104549
104546
|
id: "searchAllBtn",
|
|
104550
104547
|
variant: "secondary",
|
|
@@ -104558,10 +104555,11 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
104558
104555
|
if (lodash.isEmpty(res)) showAlert(findAndReplace.noFindTip);
|
|
104559
104556
|
});
|
|
104560
104557
|
},
|
|
104561
|
-
tabIndex: 0
|
|
104558
|
+
tabIndex: 0,
|
|
104559
|
+
disabled: searchText.length === 0
|
|
104562
104560
|
}, findAndReplace.allFindBtn), /*#__PURE__*/React__default['default'].createElement(_t, {
|
|
104563
104561
|
id: "searchNextBtn",
|
|
104564
|
-
variant: "
|
|
104562
|
+
variant: "default",
|
|
104565
104563
|
className: "min-w-fit",
|
|
104566
104564
|
onClick: function onClick() {
|
|
104567
104565
|
return setContext(function (draftCtx) {
|
|
@@ -104570,10 +104568,13 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
104570
104568
|
if (alertMsg != null) showAlert(alertMsg);
|
|
104571
104569
|
});
|
|
104572
104570
|
},
|
|
104573
|
-
tabIndex: 0
|
|
104574
|
-
|
|
104571
|
+
tabIndex: 0,
|
|
104572
|
+
disabled: searchText.length === 0
|
|
104573
|
+
}, findAndReplace.findBtn))), searchResult.length > 0 && (/*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(o8, {
|
|
104574
|
+
className: "w-full border-t-[1px] mb-4"
|
|
104575
|
+
}), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
104575
104576
|
ref: tableContainerRef,
|
|
104576
|
-
className: "
|
|
104577
|
+
className: "mb-6 table-container max-h-[300px] overflow-y-auto",
|
|
104577
104578
|
onMouseDown: function onMouseDown(e) {
|
|
104578
104579
|
var _tableContainerRef$cu;
|
|
104579
104580
|
if (e.target === tableContainerRef.current || ((_tableContainerRef$cu = tableContainerRef.current) === null || _tableContainerRef$cu === void 0 ? void 0 : _tableContainerRef$cu.contains(e.target))) {
|
|
@@ -104582,6 +104583,19 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
104582
104583
|
(_tableContainerRef$cu2 = tableContainerRef.current) === null || _tableContainerRef$cu2 === void 0 ? void 0 : _tableContainerRef$cu2.focus();
|
|
104583
104584
|
}
|
|
104584
104585
|
},
|
|
104586
|
+
onWheel: function onWheel(e) {
|
|
104587
|
+
e.preventDefault();
|
|
104588
|
+
e.stopPropagation();
|
|
104589
|
+
if (tableContainerRef.current) {
|
|
104590
|
+
tableContainerRef.current.scrollTop += e.deltaY;
|
|
104591
|
+
}
|
|
104592
|
+
},
|
|
104593
|
+
onTouchStart: function onTouchStart(e) {
|
|
104594
|
+
e.stopPropagation();
|
|
104595
|
+
},
|
|
104596
|
+
onTouchMove: function onTouchMove(e) {
|
|
104597
|
+
e.stopPropagation();
|
|
104598
|
+
},
|
|
104585
104599
|
tabIndex: 0
|
|
104586
104600
|
}, /*#__PURE__*/React__default['default'].createElement(Jve, {
|
|
104587
104601
|
id: "searchAllbox"
|
|
@@ -104589,10 +104603,10 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
104589
104603
|
className: "color-bg-secondary"
|
|
104590
104604
|
}, /*#__PURE__*/React__default['default'].createElement(nke, null, /*#__PURE__*/React__default['default'].createElement(ake, null, findAndReplace.searchTargetSheet), /*#__PURE__*/React__default['default'].createElement(ake, null, findAndReplace.searchTargetCell), /*#__PURE__*/React__default['default'].createElement(ake, null, findAndReplace.searchTargetValue))), /*#__PURE__*/React__default['default'].createElement(eke, null, searchResult.map(function (v) {
|
|
104591
104605
|
return /*#__PURE__*/React__default['default'].createElement(nke, {
|
|
104592
|
-
className:
|
|
104606
|
+
className: S$1(lodash.isEqual(selectedCell, {
|
|
104593
104607
|
r: v.r,
|
|
104594
104608
|
c: v.c
|
|
104595
|
-
}) ? "
|
|
104609
|
+
}) ? "color-bg-default-selected" : ""),
|
|
104596
104610
|
key: v.cellPosition,
|
|
104597
104611
|
onClick: function onClick() {
|
|
104598
104612
|
setContext(function (draftCtx) {
|
|
@@ -104615,7 +104629,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
104615
104629
|
}, v.cellPosition), /*#__PURE__*/React__default['default'].createElement(oke, {
|
|
104616
104630
|
className: "find-replace-table-cell"
|
|
104617
104631
|
}, v.value));
|
|
104618
|
-
})))))));
|
|
104632
|
+
})))))))));
|
|
104619
104633
|
};
|
|
104620
104634
|
|
|
104621
104635
|
var LinkEditCard = function LinkEditCard(_ref) {
|