@leankylin-sheet/react 5.2.26 → 5.2.28
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 +317 -45
- package/dist/index.esm.css +317 -45
- package/dist/index.esm.js +46 -31
- package/dist/index.js +45 -30
- package/dist/index.umd.css +317 -45
- package/dist/index.umd.js +45 -30
- package/dist/index.umd.min.css +1 -1
- package/dist/index.umd.min.js +3 -3
- package/package.json +3 -3
package/dist/index.esm.css
CHANGED
|
@@ -1266,109 +1266,348 @@ html::-webkit-scrollbar-button {
|
|
|
1266
1266
|
.leankylin-modal-dialog-icon-close:hover {
|
|
1267
1267
|
opacity: 0.7;
|
|
1268
1268
|
}
|
|
1269
|
-
|
|
1269
|
+
/* 查找替换弹出框样式 */
|
|
1270
1270
|
#leankylin-search-replace {
|
|
1271
1271
|
position: absolute;
|
|
1272
|
-
padding:
|
|
1272
|
+
padding: 24px 28px;
|
|
1273
1273
|
z-index: 1002;
|
|
1274
|
+
min-width: 520px;
|
|
1275
|
+
max-height: calc(100vh - 60px);
|
|
1276
|
+
overflow-y: auto;
|
|
1277
|
+
font-family:
|
|
1278
|
+
-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
|
|
1279
|
+
Arial, sans-serif;
|
|
1274
1280
|
}
|
|
1275
1281
|
|
|
1282
|
+
/* 关闭按钮 */
|
|
1276
1283
|
#leankylin-search-replace .icon-close {
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1284
|
+
width: 28px;
|
|
1285
|
+
height: 28px;
|
|
1286
|
+
display: flex;
|
|
1287
|
+
align-items: center;
|
|
1288
|
+
justify-content: center;
|
|
1289
|
+
border-radius: 6px;
|
|
1290
|
+
color: #999;
|
|
1291
|
+
cursor: pointer;
|
|
1292
|
+
flex-shrink: 0;
|
|
1293
|
+
transition: all 0.15s;
|
|
1294
|
+
}
|
|
1295
|
+
|
|
1296
|
+
#leankylin-search-replace .icon-close:hover {
|
|
1297
|
+
background-color: rgba(0, 0, 0, 0.05);
|
|
1298
|
+
color: #555;
|
|
1299
|
+
}
|
|
1300
|
+
|
|
1301
|
+
#leankylin-search-replace .icon-close:active {
|
|
1302
|
+
background-color: rgba(0, 0, 0, 0.08);
|
|
1280
1303
|
}
|
|
1281
1304
|
|
|
1305
|
+
/* 统一头部:tab + 关闭 */
|
|
1306
|
+
#leankylin-search-replace .sr-header {
|
|
1307
|
+
display: flex;
|
|
1308
|
+
align-items: center;
|
|
1309
|
+
gap: 8px;
|
|
1310
|
+
margin-bottom: 16px;
|
|
1311
|
+
}
|
|
1312
|
+
|
|
1313
|
+
/* Tab 切换 */
|
|
1282
1314
|
#leankylin-search-replace .tabBox {
|
|
1283
|
-
|
|
1284
|
-
|
|
1315
|
+
display: flex;
|
|
1316
|
+
gap: 2px;
|
|
1317
|
+
flex: 1;
|
|
1318
|
+
background: #f3f3f6;
|
|
1319
|
+
border-radius: 6px;
|
|
1320
|
+
padding: 3px;
|
|
1321
|
+
margin-bottom: 0;
|
|
1285
1322
|
}
|
|
1286
1323
|
|
|
1287
1324
|
#leankylin-search-replace .tabBox span {
|
|
1288
|
-
|
|
1325
|
+
flex: 1;
|
|
1326
|
+
display: inline-flex;
|
|
1327
|
+
align-items: center;
|
|
1328
|
+
justify-content: center;
|
|
1289
1329
|
text-align: center;
|
|
1290
|
-
|
|
1291
|
-
border:
|
|
1292
|
-
|
|
1293
|
-
|
|
1330
|
+
padding: 7px 0;
|
|
1331
|
+
border: none;
|
|
1332
|
+
border-radius: 4px;
|
|
1333
|
+
font-size: 13px;
|
|
1334
|
+
font-weight: 500;
|
|
1335
|
+
color: #666;
|
|
1336
|
+
cursor: pointer;
|
|
1337
|
+
transition: all 0.2s;
|
|
1338
|
+
background: transparent;
|
|
1339
|
+
}
|
|
1340
|
+
|
|
1341
|
+
#leankylin-search-replace .tabBox span:hover {
|
|
1342
|
+
color: #444;
|
|
1294
1343
|
}
|
|
1295
1344
|
|
|
1296
1345
|
#leankylin-search-replace .tabBox span.on {
|
|
1297
|
-
background-color: #
|
|
1298
|
-
|
|
1299
|
-
|
|
1346
|
+
background-color: #fff;
|
|
1347
|
+
color: #333;
|
|
1348
|
+
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
|
|
1300
1349
|
}
|
|
1301
1350
|
|
|
1351
|
+
/* 内容区 */
|
|
1302
1352
|
#leankylin-search-replace .ctBox {
|
|
1303
|
-
padding:
|
|
1304
|
-
border:
|
|
1305
|
-
font-size:
|
|
1306
|
-
min-width:
|
|
1353
|
+
padding: 0;
|
|
1354
|
+
border: none;
|
|
1355
|
+
font-size: 13px;
|
|
1356
|
+
min-width: 460px;
|
|
1307
1357
|
}
|
|
1308
1358
|
|
|
1309
1359
|
#leankylin-search-replace .ctBox .row {
|
|
1310
1360
|
display: flex;
|
|
1311
1361
|
flex-direction: row;
|
|
1362
|
+
gap: 20px;
|
|
1312
1363
|
justify-content: space-between;
|
|
1313
1364
|
}
|
|
1314
1365
|
|
|
1366
|
+
/* 输入框区 */
|
|
1315
1367
|
#leankylin-search-replace .inputBox {
|
|
1316
|
-
|
|
1368
|
+
flex: 1;
|
|
1369
|
+
display: flex;
|
|
1370
|
+
flex-direction: column;
|
|
1371
|
+
gap: 10px;
|
|
1317
1372
|
position: relative;
|
|
1318
1373
|
}
|
|
1319
1374
|
|
|
1320
1375
|
#leankylin-search-replace .inputBox .textboxs {
|
|
1321
|
-
|
|
1322
|
-
|
|
1376
|
+
display: flex;
|
|
1377
|
+
align-items: center;
|
|
1378
|
+
gap: 8px;
|
|
1379
|
+
font-size: 13px;
|
|
1380
|
+
color: #555;
|
|
1381
|
+
white-space: nowrap;
|
|
1323
1382
|
}
|
|
1324
1383
|
|
|
1384
|
+
#leankylin-search-replace .inputBox .textboxs input.formulaInputFocus {
|
|
1385
|
+
flex: 1;
|
|
1386
|
+
height: 32px;
|
|
1387
|
+
padding: 0 10px;
|
|
1388
|
+
border: 1px solid #d9d9d9;
|
|
1389
|
+
border-radius: 6px;
|
|
1390
|
+
font-size: 13px;
|
|
1391
|
+
color: #333;
|
|
1392
|
+
background: #fff;
|
|
1393
|
+
outline: none;
|
|
1394
|
+
transition: border-color 0.2s, box-shadow 0.2s;
|
|
1395
|
+
box-sizing: border-box;
|
|
1396
|
+
}
|
|
1397
|
+
|
|
1398
|
+
#leankylin-search-replace
|
|
1399
|
+
.inputBox
|
|
1400
|
+
.textboxs
|
|
1401
|
+
input.formulaInputFocus:focus {
|
|
1402
|
+
border-color: #8C89FE;
|
|
1403
|
+
box-shadow: 0 0 0 3px rgba(140, 137, 254, 0.12);
|
|
1404
|
+
}
|
|
1405
|
+
|
|
1406
|
+
#leankylin-search-replace
|
|
1407
|
+
.inputBox
|
|
1408
|
+
.textboxs
|
|
1409
|
+
input.formulaInputFocus:hover {
|
|
1410
|
+
border-color: #b0aefe;
|
|
1411
|
+
}
|
|
1412
|
+
|
|
1413
|
+
/* 选项区 (checkbox + 下拉) */
|
|
1325
1414
|
#leankylin-search-replace .checkboxs {
|
|
1326
|
-
|
|
1415
|
+
display: flex;
|
|
1416
|
+
flex-direction: column;
|
|
1417
|
+
gap: 8px;
|
|
1418
|
+
min-width: 160px;
|
|
1327
1419
|
}
|
|
1328
1420
|
|
|
1329
|
-
#leankylin-search-replace .checkboxs div {
|
|
1330
|
-
|
|
1331
|
-
|
|
1421
|
+
#leankylin-search-replace .checkboxs > div {
|
|
1422
|
+
display: flex;
|
|
1423
|
+
align-items: center;
|
|
1424
|
+
gap: 0;
|
|
1332
1425
|
}
|
|
1333
1426
|
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1427
|
+
/* 自定义 Checkbox */
|
|
1428
|
+
#leankylin-search-replace .checkboxs .sr-checkbox {
|
|
1429
|
+
display: inline-flex;
|
|
1430
|
+
align-items: center;
|
|
1431
|
+
gap: 8px;
|
|
1432
|
+
cursor: pointer;
|
|
1433
|
+
font-size: 13px;
|
|
1434
|
+
color: #555;
|
|
1435
|
+
-webkit-user-select: none;
|
|
1436
|
+
-moz-user-select: none;
|
|
1437
|
+
user-select: none;
|
|
1438
|
+
line-height: 1;
|
|
1439
|
+
padding: 4px 0;
|
|
1337
1440
|
}
|
|
1338
1441
|
|
|
1442
|
+
#leankylin-search-replace .checkboxs .sr-checkbox input[type="checkbox"] {
|
|
1443
|
+
-moz-appearance: none;
|
|
1444
|
+
appearance: none;
|
|
1445
|
+
-webkit-appearance: none;
|
|
1446
|
+
width: 16px;
|
|
1447
|
+
height: 16px;
|
|
1448
|
+
margin: 0;
|
|
1449
|
+
border: 1.5px solid #c0c0c0;
|
|
1450
|
+
border-radius: 4px;
|
|
1451
|
+
background: #fff;
|
|
1452
|
+
cursor: pointer;
|
|
1453
|
+
position: relative;
|
|
1454
|
+
flex-shrink: 0;
|
|
1455
|
+
transition: all 0.15s;
|
|
1456
|
+
}
|
|
1457
|
+
|
|
1458
|
+
#leankylin-search-replace
|
|
1459
|
+
.checkboxs
|
|
1460
|
+
.sr-checkbox
|
|
1461
|
+
input[type="checkbox"]:hover {
|
|
1462
|
+
border-color: #8C89FE;
|
|
1463
|
+
}
|
|
1464
|
+
|
|
1465
|
+
#leankylin-search-replace
|
|
1466
|
+
.checkboxs
|
|
1467
|
+
.sr-checkbox
|
|
1468
|
+
input[type="checkbox"]:checked {
|
|
1469
|
+
background: #8C89FE;
|
|
1470
|
+
border-color: #8C89FE;
|
|
1471
|
+
}
|
|
1472
|
+
|
|
1473
|
+
#leankylin-search-replace
|
|
1474
|
+
.checkboxs
|
|
1475
|
+
.sr-checkbox
|
|
1476
|
+
input[type="checkbox"]:checked::after {
|
|
1477
|
+
content: "";
|
|
1478
|
+
position: absolute;
|
|
1479
|
+
left: 4.5px;
|
|
1480
|
+
top: 1.5px;
|
|
1481
|
+
width: 5px;
|
|
1482
|
+
height: 9px;
|
|
1483
|
+
border: solid #fff;
|
|
1484
|
+
border-width: 0 2px 2px 0;
|
|
1485
|
+
transform: rotate(45deg);
|
|
1486
|
+
}
|
|
1487
|
+
|
|
1488
|
+
#leankylin-search-replace
|
|
1489
|
+
.checkboxs
|
|
1490
|
+
.sr-checkbox
|
|
1491
|
+
input[type="checkbox"]:focus-visible {
|
|
1492
|
+
box-shadow: 0 0 0 3px rgba(140, 137, 254, 0.15);
|
|
1493
|
+
}
|
|
1494
|
+
|
|
1495
|
+
#leankylin-search-replace .checkboxs .sr-checkbox span {
|
|
1496
|
+
color: #555;
|
|
1497
|
+
}
|
|
1498
|
+
|
|
1499
|
+
/* 搜索范围下拉 - 与查找/替换输入行同样的布局,select 展开至 input 相同宽度 */
|
|
1500
|
+
#leankylin-search-replace #searchTypeSelect {
|
|
1501
|
+
display: flex;
|
|
1502
|
+
align-items: center;
|
|
1503
|
+
gap: 8px;
|
|
1504
|
+
font-size: 13px;
|
|
1505
|
+
color: #555;
|
|
1506
|
+
white-space: nowrap;
|
|
1507
|
+
}
|
|
1508
|
+
|
|
1509
|
+
#leankylin-search-replace #searchTypeSelect > span {
|
|
1510
|
+
flex-shrink: 0;
|
|
1511
|
+
}
|
|
1512
|
+
|
|
1513
|
+
#leankylin-search-replace #searchTypeSelect select {
|
|
1514
|
+
flex: 1;
|
|
1515
|
+
width: auto;
|
|
1516
|
+
height: 32px;
|
|
1517
|
+
padding: 0 28px 0 10px;
|
|
1518
|
+
border: 1px solid #d9d9d9;
|
|
1519
|
+
border-radius: 6px;
|
|
1520
|
+
background-color: #fff;
|
|
1521
|
+
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23999' d='M3 4.5L6 8l3-3.5H3z'/%3E%3C/svg%3E");
|
|
1522
|
+
background-repeat: no-repeat;
|
|
1523
|
+
background-position: right 8px center;
|
|
1524
|
+
font-size: 13px;
|
|
1525
|
+
color: #333;
|
|
1526
|
+
cursor: pointer;
|
|
1527
|
+
outline: none;
|
|
1528
|
+
-moz-appearance: none;
|
|
1529
|
+
appearance: none;
|
|
1530
|
+
-webkit-appearance: none;
|
|
1531
|
+
transition: border-color 0.2s, box-shadow 0.2s;
|
|
1532
|
+
box-sizing: border-box;
|
|
1533
|
+
}
|
|
1534
|
+
|
|
1535
|
+
#leankylin-search-replace #searchTypeSelect select:hover {
|
|
1536
|
+
border-color: #b0aefe;
|
|
1537
|
+
}
|
|
1538
|
+
|
|
1539
|
+
#leankylin-search-replace #searchTypeSelect select:focus {
|
|
1540
|
+
border-color: #8C89FE;
|
|
1541
|
+
box-shadow: 0 0 0 3px rgba(140, 137, 254, 0.12);
|
|
1542
|
+
}
|
|
1543
|
+
|
|
1544
|
+
/* 按钮区 */
|
|
1339
1545
|
#leankylin-search-replace .btnBox {
|
|
1340
|
-
|
|
1546
|
+
display: flex;
|
|
1547
|
+
flex-wrap: wrap;
|
|
1548
|
+
gap: 8px;
|
|
1549
|
+
margin-top: 16px;
|
|
1341
1550
|
}
|
|
1342
1551
|
|
|
1343
1552
|
#leankylin-search-replace .btnBox .button-default {
|
|
1344
|
-
margin
|
|
1345
|
-
|
|
1553
|
+
margin: 0;
|
|
1554
|
+
padding: 6px 16px;
|
|
1555
|
+
border-radius: 6px;
|
|
1556
|
+
font-size: 13px;
|
|
1557
|
+
font-weight: 500;
|
|
1558
|
+
transition: all 0.15s;
|
|
1346
1559
|
}
|
|
1347
1560
|
|
|
1561
|
+
#leankylin-search-replace .btnBox .button-default:hover {
|
|
1562
|
+
border-color: #8C89FE;
|
|
1563
|
+
color: #8C89FE;
|
|
1564
|
+
}
|
|
1565
|
+
|
|
1566
|
+
#leankylin-search-replace .btnBox .button-default:active {
|
|
1567
|
+
background-color: #f9f9ff;
|
|
1568
|
+
}
|
|
1569
|
+
|
|
1570
|
+
/* 关闭按钮 */
|
|
1348
1571
|
#leankylin-search-replace .close-button {
|
|
1349
|
-
margin
|
|
1350
|
-
|
|
1572
|
+
margin: 12px 0 0;
|
|
1573
|
+
padding: 6px 20px;
|
|
1574
|
+
border-radius: 6px;
|
|
1575
|
+
font-size: 13px;
|
|
1576
|
+
transition: all 0.15s;
|
|
1351
1577
|
}
|
|
1352
1578
|
|
|
1579
|
+
#leankylin-search-replace .close-button:hover {
|
|
1580
|
+
border-color: #aaa;
|
|
1581
|
+
}
|
|
1582
|
+
|
|
1583
|
+
/* 搜索结果列表 */
|
|
1353
1584
|
#leankylin-search-replace #searchAllbox {
|
|
1354
1585
|
height: 210px;
|
|
1355
|
-
border: 1px solid #
|
|
1356
|
-
|
|
1586
|
+
border: 1px solid #e8e8e8;
|
|
1587
|
+
border-radius: 6px;
|
|
1588
|
+
margin-top: 14px;
|
|
1357
1589
|
overflow-y: auto;
|
|
1358
1590
|
position: relative;
|
|
1591
|
+
background: #fff;
|
|
1359
1592
|
}
|
|
1360
1593
|
|
|
1361
1594
|
#leankylin-search-replace #searchAllbox .boxTitle {
|
|
1362
1595
|
width: 100%;
|
|
1363
|
-
height:
|
|
1364
|
-
line-height:
|
|
1365
|
-
padding: 0
|
|
1366
|
-
background-color: #
|
|
1367
|
-
border-bottom: 1px solid #
|
|
1596
|
+
height: 34px;
|
|
1597
|
+
line-height: 34px;
|
|
1598
|
+
padding: 0 10px;
|
|
1599
|
+
background-color: #fafafa;
|
|
1600
|
+
border-bottom: 1px solid #e8e8e8;
|
|
1368
1601
|
box-sizing: border-box;
|
|
1369
1602
|
position: sticky;
|
|
1370
1603
|
left: 0;
|
|
1371
1604
|
top: 0;
|
|
1605
|
+
z-index: 1;
|
|
1606
|
+
font-size: 12px;
|
|
1607
|
+
font-weight: 600;
|
|
1608
|
+
color: #888;
|
|
1609
|
+
text-transform: uppercase;
|
|
1610
|
+
letter-spacing: 0.3px;
|
|
1372
1611
|
}
|
|
1373
1612
|
|
|
1374
1613
|
#leankylin-search-replace #searchAllbox .boxTitle span {
|
|
@@ -1389,11 +1628,23 @@ html::-webkit-scrollbar-button {
|
|
|
1389
1628
|
}
|
|
1390
1629
|
|
|
1391
1630
|
#leankylin-search-replace #searchAllbox .boxMain .boxItem {
|
|
1392
|
-
height:
|
|
1393
|
-
line-height:
|
|
1394
|
-
border-bottom: 1px solid #
|
|
1395
|
-
padding: 0
|
|
1631
|
+
height: 32px;
|
|
1632
|
+
line-height: 32px;
|
|
1633
|
+
border-bottom: 1px solid #f0f0f0;
|
|
1634
|
+
padding: 0 10px;
|
|
1396
1635
|
box-sizing: border-box;
|
|
1636
|
+
cursor: pointer;
|
|
1637
|
+
font-size: 13px;
|
|
1638
|
+
color: #444;
|
|
1639
|
+
transition: background-color 0.12s;
|
|
1640
|
+
}
|
|
1641
|
+
|
|
1642
|
+
#leankylin-search-replace #searchAllbox .boxMain .boxItem:hover {
|
|
1643
|
+
background-color: #f5f5ff;
|
|
1644
|
+
}
|
|
1645
|
+
|
|
1646
|
+
#leankylin-search-replace #searchAllbox .boxMain .boxItem:last-child {
|
|
1647
|
+
border-bottom: none;
|
|
1397
1648
|
}
|
|
1398
1649
|
|
|
1399
1650
|
#leankylin-search-replace #searchAllbox .boxMain .boxItem.on {
|
|
@@ -1419,6 +1670,8 @@ html::-webkit-scrollbar-button {
|
|
|
1419
1670
|
overflow: hidden;
|
|
1420
1671
|
text-overflow: ellipsis;
|
|
1421
1672
|
white-space: nowrap;
|
|
1673
|
+
font-family: "SF Mono", "Fira Code", Menlo, monospace;
|
|
1674
|
+
font-size: 12px;
|
|
1422
1675
|
}
|
|
1423
1676
|
|
|
1424
1677
|
#leankylin-search-replace #searchAllbox .boxMain .boxItem span:nth-of-type(3) {
|
|
@@ -1427,6 +1680,25 @@ html::-webkit-scrollbar-button {
|
|
|
1427
1680
|
text-overflow: ellipsis;
|
|
1428
1681
|
white-space: nowrap;
|
|
1429
1682
|
}
|
|
1683
|
+
|
|
1684
|
+
/* 滚动条美化 */
|
|
1685
|
+
#leankylin-search-replace #searchAllbox::-webkit-scrollbar {
|
|
1686
|
+
width: 6px;
|
|
1687
|
+
}
|
|
1688
|
+
|
|
1689
|
+
#leankylin-search-replace #searchAllbox::-webkit-scrollbar-track {
|
|
1690
|
+
background: transparent;
|
|
1691
|
+
}
|
|
1692
|
+
|
|
1693
|
+
#leankylin-search-replace #searchAllbox::-webkit-scrollbar-thumb {
|
|
1694
|
+
background: #d4d4d4;
|
|
1695
|
+
border-radius: 3px;
|
|
1696
|
+
}
|
|
1697
|
+
|
|
1698
|
+
#leankylin-search-replace #searchAllbox::-webkit-scrollbar-thumb:hover {
|
|
1699
|
+
background: #bbb;
|
|
1700
|
+
}
|
|
1701
|
+
|
|
1430
1702
|
.leankylin-link-modify-modal {
|
|
1431
1703
|
position: absolute;
|
|
1432
1704
|
overflow: hidden;
|
package/dist/index.esm.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defaultContext, defaultSettings, getSheetIndex, colLocationByIndex, fixPositionOnFrozenCells, colLocation, getFlowdata, isAllowEdit, handleColumnHeaderMouseDown, handleColSizeHandleMouseDown, handleColFreezeHandleMouseDown, handleContextMenu, selectTitlesMap, selectTitlesRange, fixColumnStyleOverflowInFreeze, rowLocationByIndex, rowLocation, handleRowHeaderMouseDown, handleRowSizeHandleMouseDown, handleRowFreezeHandleMouseDown, fixRowStyleOverflowInFreeze, functionHTMLGenerate, locale, getCellValue, createRangeHightlight, isInlineStringCell, getInlineStringHTML, valueShowEs, escapeHTMLTag, escapeScriptTag, isShowHidenCR, cancelNormalSelected, moveHighlightCell, updateCell, israngeseleciton, handleFormulaInput, onSearchDialogMoveStart, replaceAll, replace, searchAll, searchNext, normalizeSelection, scrollToHighlightCell, isLinkValid, getRangetxt, goToLink, replaceHtml, removeHyperlink, onRangeSelectionModalMoveStart, saveHyperlink, createFilterOptions, onImageMoveStart, onImageResizeStart, showComments, setEditingComment, onCommentBoxMoveStart, onCommentBoxResizeStart, confirmMessage, getRangeByTxt, getDropdownList, setCellValue, setConditionRules, mergeBorder, setDropcownValue, handleCellAreaMouseDown, handleCellAreaMouseMove, handleCellAreaDragOver, handleCellDrop, handleCellAreaDoubleClick, selectAll, showLinkCard, getCellRowColumn, getCellHyperlink, handleOverlayMouseMove, handleOverlayMouseUp, handleKeydownForZoom, handleOverlayTouchStart, handleOverlayTouchMove, handleOverlayTouchEnd, onCellsMoveStart, createDropCellRange, updateContextWithSheetData, updateContextWithCanvas, initFreeze, Canvas, handleGlobalWheel, setCaretPosition, getDataArr, updateMoreCell, getRegStr, getOptionValue, getSelectRange, applyLocation, updateItem, update, normalizedCellAttr, updateFormat, handleTextSize, handleHorizontalAlign, handleVerticalAlign, handleScreenShot, showImgChooser, insertImage, editComment, deleteComment, showHideComment, showHideAllComments, newComment, handleSum, autoSelectionFormula, handleMerge, handleBorder, handleFreeze, handleSort, createFilter, clearFilter, toolbarItemSelectedFunc, toolbarItemClickHandler, handleTextColor, handleTextBackground, getDataBySelectionNoCopy, getInlineStringNoStyle, rangeHightlightselected, editSheetName, setNextSheet, MAX_ZOOM_RATIO, MIN_ZOOM_RATIO, addSheet, indexToColumnChar, sortSelection, handleCopy, insertRowCol, deleteRowCol, hideSelected, showSelected, api, removeActiveImage, deleteSelectedCellText, jfrefreshgrid, handleLink, deleteSheet, opToPatch, orderbydatafiler, getFilterColumnValues, getFilterColumnColors, saveFilter, cancelActiveImgItem, patchToOp, filterPatch, inverseRowColOptions, ensureSheetIndex, initSheetIndex, handleGlobalKeyDown, handlePasteByLeanklin, groupValuesRefresh } from '@leankylin-sheet/core';
|
|
1
|
+
import { defaultContext, defaultSettings, getSheetIndex, colLocationByIndex, fixPositionOnFrozenCells, colLocation, getFlowdata, isAllowEdit, handleColumnHeaderMouseDown, handleColSizeHandleMouseDown, handleColFreezeHandleMouseDown, handleContextMenu, selectTitlesMap, selectTitlesRange, fixColumnStyleOverflowInFreeze, rowLocationByIndex, rowLocation, handleRowHeaderMouseDown, handleRowSizeHandleMouseDown, handleRowFreezeHandleMouseDown, fixRowStyleOverflowInFreeze, functionHTMLGenerate, locale, getCellValue, createRangeHightlight, isInlineStringCell, getInlineStringHTML, valueShowEs, escapeHTMLTag, escapeScriptTag, isShowHidenCR, cancelNormalSelected, moveHighlightCell, updateCell, israngeseleciton, handleFormulaInput, onSearchDialogMoveStart, replaceAll, replace, searchAll, searchNext, changeSheet, normalizeSelection, scrollToHighlightCell, isLinkValid, getRangetxt, goToLink, replaceHtml, removeHyperlink, onRangeSelectionModalMoveStart, saveHyperlink, createFilterOptions, onImageMoveStart, onImageResizeStart, showComments, setEditingComment, onCommentBoxMoveStart, onCommentBoxResizeStart, confirmMessage, getRangeByTxt, getDropdownList, setCellValue, setConditionRules, mergeBorder, setDropcownValue, handleCellAreaMouseDown, handleCellAreaMouseMove, handleCellAreaDragOver, handleCellDrop, handleCellAreaDoubleClick, selectAll, showLinkCard, getCellRowColumn, getCellHyperlink, handleOverlayMouseMove, handleOverlayMouseUp, handleKeydownForZoom, handleOverlayTouchStart, handleOverlayTouchMove, handleOverlayTouchEnd, onCellsMoveStart, createDropCellRange, updateContextWithSheetData, updateContextWithCanvas, initFreeze, Canvas, handleGlobalWheel, setCaretPosition, getDataArr, updateMoreCell, getRegStr, getOptionValue, getSelectRange, applyLocation, updateItem, update, normalizedCellAttr, updateFormat, handleTextSize, handleHorizontalAlign, handleVerticalAlign, handleScreenShot, showImgChooser, insertImage, editComment, deleteComment, showHideComment, showHideAllComments, newComment, handleSum, autoSelectionFormula, handleMerge, handleBorder, handleFreeze, handleSort, createFilter, clearFilter, toolbarItemSelectedFunc, toolbarItemClickHandler, handleTextColor, handleTextBackground, getDataBySelectionNoCopy, getInlineStringNoStyle, rangeHightlightselected, editSheetName, setNextSheet, MAX_ZOOM_RATIO, MIN_ZOOM_RATIO, addSheet, indexToColumnChar, sortSelection, handleCopy, insertRowCol, deleteRowCol, hideSelected, showSelected, api, removeActiveImage, deleteSelectedCellText, jfrefreshgrid, handleLink, deleteSheet, opToPatch, orderbydatafiler, getFilterColumnValues, getFilterColumnColors, saveFilter, cancelActiveImgItem, patchToOp, filterPatch, inverseRowColOptions, ensureSheetIndex, initSheetIndex, handleGlobalKeyDown, handlePasteByLeanklin, groupValuesRefresh } from '@leankylin-sheet/core';
|
|
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';
|
|
@@ -1566,9 +1566,12 @@ var SearchReplace = function SearchReplace() {
|
|
|
1566
1566
|
}, []);
|
|
1567
1567
|
var getInitialPosition = useCallback(function (container) {
|
|
1568
1568
|
var rect = container.getBoundingClientRect();
|
|
1569
|
+
var estimatedHeight = 520;
|
|
1570
|
+
var dialogWidth = 500;
|
|
1571
|
+
var top = Math.max(40, Math.min((rect.height - estimatedHeight) / 2, rect.height - estimatedHeight - 20));
|
|
1569
1572
|
return {
|
|
1570
|
-
left: (rect.width -
|
|
1571
|
-
top: (
|
|
1573
|
+
left: Math.max(20, (rect.width - dialogWidth) / 2),
|
|
1574
|
+
top: Number.isFinite(top) && top > 0 ? top : 40
|
|
1572
1575
|
};
|
|
1573
1576
|
}, []);
|
|
1574
1577
|
var body = document.body;
|
|
@@ -1596,15 +1599,8 @@ var SearchReplace = function SearchReplace() {
|
|
|
1596
1599
|
return e.stopPropagation();
|
|
1597
1600
|
}
|
|
1598
1601
|
}, /*#__PURE__*/React.createElement("div", {
|
|
1599
|
-
className: "
|
|
1600
|
-
|
|
1601
|
-
}, /*#__PURE__*/React.createElement(SVGIcon, {
|
|
1602
|
-
name: "close",
|
|
1603
|
-
style: {
|
|
1604
|
-
padding: 7,
|
|
1605
|
-
cursor: "pointer"
|
|
1606
|
-
}
|
|
1607
|
-
})), /*#__PURE__*/React.createElement("div", {
|
|
1602
|
+
className: "sr-header"
|
|
1603
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
1608
1604
|
className: "tabBox"
|
|
1609
1605
|
}, /*#__PURE__*/React.createElement("span", {
|
|
1610
1606
|
id: "searchTab",
|
|
@@ -1619,12 +1615,38 @@ var SearchReplace = function SearchReplace() {
|
|
|
1619
1615
|
return setShowReplace(true);
|
|
1620
1616
|
}
|
|
1621
1617
|
}, findAndReplace.replace)), /*#__PURE__*/React.createElement("div", {
|
|
1618
|
+
className: "icon-close",
|
|
1619
|
+
onClick: closeDialog
|
|
1620
|
+
}, /*#__PURE__*/React.createElement("svg", {
|
|
1621
|
+
width: "14",
|
|
1622
|
+
height: "14",
|
|
1623
|
+
viewBox: "0 0 16 16",
|
|
1624
|
+
fill: "none"
|
|
1625
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
1626
|
+
d: "M12 4L4 12M4 4l8 8",
|
|
1627
|
+
stroke: "currentColor",
|
|
1628
|
+
strokeWidth: "1.5",
|
|
1629
|
+
strokeLinecap: "round"
|
|
1630
|
+
})))), /*#__PURE__*/React.createElement("div", {
|
|
1622
1631
|
className: "ctBox"
|
|
1623
1632
|
}, /*#__PURE__*/React.createElement("div", {
|
|
1624
1633
|
className: "row"
|
|
1625
1634
|
}, /*#__PURE__*/React.createElement("div", {
|
|
1626
1635
|
className: "inputBox"
|
|
1627
1636
|
}, /*#__PURE__*/React.createElement("div", {
|
|
1637
|
+
id: "searchTypeSelect"
|
|
1638
|
+
}, /*#__PURE__*/React.createElement("span", null, findAndReplace.searchTypeLabel, "\uFF1A"), /*#__PURE__*/React.createElement("select", {
|
|
1639
|
+
value: searchType,
|
|
1640
|
+
onChange: function onChange(e) {
|
|
1641
|
+
return setSearchType(e.target.value);
|
|
1642
|
+
}
|
|
1643
|
+
}, /*#__PURE__*/React.createElement("option", {
|
|
1644
|
+
value: "v"
|
|
1645
|
+
}, findAndReplace.searchTypeValue), /*#__PURE__*/React.createElement("option", {
|
|
1646
|
+
value: "f"
|
|
1647
|
+
}, findAndReplace.searchTypeFormula), /*#__PURE__*/React.createElement("option", {
|
|
1648
|
+
value: "m"
|
|
1649
|
+
}, findAndReplace.searchTypeDisplay))), /*#__PURE__*/React.createElement("div", {
|
|
1628
1650
|
className: "textboxs",
|
|
1629
1651
|
id: "searchInput"
|
|
1630
1652
|
}, findAndReplace.findTextbox, "\uFF1A", /*#__PURE__*/React.createElement("input", {
|
|
@@ -1655,42 +1677,32 @@ var SearchReplace = function SearchReplace() {
|
|
|
1655
1677
|
className: "checkboxs"
|
|
1656
1678
|
}, /*#__PURE__*/React.createElement("div", {
|
|
1657
1679
|
id: "regCheck"
|
|
1680
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
1681
|
+
className: "sr-checkbox"
|
|
1658
1682
|
}, /*#__PURE__*/React.createElement("input", {
|
|
1659
1683
|
type: "checkbox",
|
|
1660
1684
|
onChange: function onChange(e) {
|
|
1661
1685
|
return setCheckMode("regCheck", e.target.checked);
|
|
1662
1686
|
}
|
|
1663
|
-
}), /*#__PURE__*/React.createElement("span", null, findAndReplace.regexTextbox)), /*#__PURE__*/React.createElement("div", {
|
|
1687
|
+
}), /*#__PURE__*/React.createElement("span", null, findAndReplace.regexTextbox))), /*#__PURE__*/React.createElement("div", {
|
|
1664
1688
|
id: "wordCheck"
|
|
1689
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
1690
|
+
className: "sr-checkbox"
|
|
1665
1691
|
}, /*#__PURE__*/React.createElement("input", {
|
|
1666
1692
|
type: "checkbox",
|
|
1667
1693
|
onChange: function onChange(e) {
|
|
1668
1694
|
return setCheckMode("wordCheck", e.target.checked);
|
|
1669
1695
|
}
|
|
1670
|
-
}), /*#__PURE__*/React.createElement("span", null, findAndReplace.wholeTextbox)), /*#__PURE__*/React.createElement("div", {
|
|
1696
|
+
}), /*#__PURE__*/React.createElement("span", null, findAndReplace.wholeTextbox))), /*#__PURE__*/React.createElement("div", {
|
|
1671
1697
|
id: "caseCheck"
|
|
1698
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
1699
|
+
className: "sr-checkbox"
|
|
1672
1700
|
}, /*#__PURE__*/React.createElement("input", {
|
|
1673
1701
|
type: "checkbox",
|
|
1674
1702
|
onChange: function onChange(e) {
|
|
1675
1703
|
return setCheckMode("caseCheck", e.target.checked);
|
|
1676
1704
|
}
|
|
1677
|
-
}), /*#__PURE__*/React.createElement("span", null, findAndReplace.distinguishTextbox)), /*#__PURE__*/React.createElement("div", {
|
|
1678
|
-
id: "searchTypeSelect"
|
|
1679
|
-
}, /*#__PURE__*/React.createElement("span", null, findAndReplace.searchTypeLabel), /*#__PURE__*/React.createElement("select", {
|
|
1680
|
-
value: searchType,
|
|
1681
|
-
onChange: function onChange(e) {
|
|
1682
|
-
return setSearchType(e.target.value);
|
|
1683
|
-
},
|
|
1684
|
-
style: {
|
|
1685
|
-
marginLeft: 4
|
|
1686
|
-
}
|
|
1687
|
-
}, /*#__PURE__*/React.createElement("option", {
|
|
1688
|
-
value: "v"
|
|
1689
|
-
}, findAndReplace.searchTypeValue), /*#__PURE__*/React.createElement("option", {
|
|
1690
|
-
value: "f"
|
|
1691
|
-
}, findAndReplace.searchTypeFormula), /*#__PURE__*/React.createElement("option", {
|
|
1692
|
-
value: "m"
|
|
1693
|
-
}, findAndReplace.searchTypeDisplay))))), /*#__PURE__*/React.createElement("div", {
|
|
1705
|
+
}), /*#__PURE__*/React.createElement("span", null, findAndReplace.distinguishTextbox))))), /*#__PURE__*/React.createElement("div", {
|
|
1694
1706
|
className: "btnBox"
|
|
1695
1707
|
}, showReplace && ( /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
1696
1708
|
id: "replaceAllBtn",
|
|
@@ -1757,6 +1769,9 @@ var SearchReplace = function SearchReplace() {
|
|
|
1757
1769
|
key: v.cellPosition,
|
|
1758
1770
|
onClick: function onClick() {
|
|
1759
1771
|
setContext(function (draftCtx) {
|
|
1772
|
+
if (v.sheetId !== draftCtx.currentSheetId) {
|
|
1773
|
+
changeSheet(draftCtx, v.sheetId);
|
|
1774
|
+
}
|
|
1760
1775
|
draftCtx.luckysheet_select_save = normalizeSelection(draftCtx, [{
|
|
1761
1776
|
row: [v.r, v.r],
|
|
1762
1777
|
column: [v.c, v.c]
|