@leankylin-sheet/react 5.2.28 → 5.2.30
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/CircularReferenceDialog/index.d.ts +4 -0
- package/dist/components/Workbook/index.d.ts +4 -4
- package/dist/index.css +201 -0
- package/dist/index.esm.css +201 -0
- package/dist/index.esm.js +142 -1
- package/dist/index.js +142 -1
- package/dist/index.umd.css +201 -0
- package/dist/index.umd.js +466 -173
- package/dist/index.umd.min.css +1 -1
- package/dist/index.umd.min.js +1 -1
- package/package.json +3 -3
|
@@ -18,13 +18,13 @@ declare const Workbook: React.ForwardRefExoticComponent<Settings & AdditionalPro
|
|
|
18
18
|
createFilter: () => void;
|
|
19
19
|
createFilterOptions: (range: any, sheetId: string, filterObj: any, saveData: boolean) => void;
|
|
20
20
|
getCellValue: (row: number, column: number, options?: import("@leankylin-sheet/core/dist/api").CommonOptions & {
|
|
21
|
-
type?: "v" | "m" | "mc" | "f" | "ct" | "qp" | "spl" | "bg" | "lo" | "rt" | "ps" | "
|
|
21
|
+
type?: "v" | "m" | "mc" | "f" | "ct" | "qp" | "spl" | "bg" | "lo" | "rt" | "ps" | "tip" | "hl" | keyof import("@leankylin-sheet/core").CellStyle | undefined;
|
|
22
22
|
}) => any;
|
|
23
23
|
setCellValue: (row: number, column: number, value: any, options?: import("@leankylin-sheet/core/dist/api").CommonOptions & {
|
|
24
|
-
type?: "v" | "m" | "mc" | "f" | "ct" | "qp" | "spl" | "bg" | "lo" | "rt" | "ps" | "
|
|
24
|
+
type?: "v" | "m" | "mc" | "f" | "ct" | "qp" | "spl" | "bg" | "lo" | "rt" | "ps" | "tip" | "hl" | keyof import("@leankylin-sheet/core").CellStyle | undefined;
|
|
25
25
|
}) => void;
|
|
26
26
|
clearCell: (row: number, column: number, options?: import("@leankylin-sheet/core/dist/api").CommonOptions) => void;
|
|
27
|
-
setCellFormat: (row: number, column: number, attr: "v" | "m" | "mc" | "f" | "ct" | "qp" | "spl" | "bg" | "lo" | "rt" | "ps" | "
|
|
27
|
+
setCellFormat: (row: number, column: number, attr: "v" | "m" | "mc" | "f" | "ct" | "qp" | "spl" | "bg" | "lo" | "rt" | "ps" | "tip" | "hl" | keyof import("@leankylin-sheet/core").CellStyle, value: any, options?: import("@leankylin-sheet/core/dist/api").CommonOptions) => void;
|
|
28
28
|
autoFillCell: (copyRange: import("@leankylin-sheet/core").SingleRange, applyRange: import("@leankylin-sheet/core").SingleRange, direction: "up" | "down" | "left" | "right") => void;
|
|
29
29
|
freeze: (type: "row" | "column" | "both", range: {
|
|
30
30
|
row: number;
|
|
@@ -56,7 +56,7 @@ declare const Workbook: React.ForwardRefExoticComponent<Settings & AdditionalPro
|
|
|
56
56
|
setSelection: (range: import("@leankylin-sheet/core").Range, options?: import("@leankylin-sheet/core/dist/api").CommonOptions) => void;
|
|
57
57
|
setCellValuesByRange: (data: any[][], range: import("@leankylin-sheet/core").SingleRange, options?: import("@leankylin-sheet/core/dist/api").CommonOptions, setMerge?: boolean) => void;
|
|
58
58
|
setCellValues: (data: any[]) => void;
|
|
59
|
-
setCellFormatByRange: (attr: "v" | "m" | "mc" | "f" | "ct" | "qp" | "spl" | "bg" | "lo" | "rt" | "ps" | "
|
|
59
|
+
setCellFormatByRange: (attr: "v" | "m" | "mc" | "f" | "ct" | "qp" | "spl" | "bg" | "lo" | "rt" | "ps" | "tip" | "hl" | keyof import("@leankylin-sheet/core").CellStyle, value: any, range: import("@leankylin-sheet/core").SingleRange | import("@leankylin-sheet/core").Range, options?: import("@leankylin-sheet/core/dist/api").CommonOptions) => void;
|
|
60
60
|
mergeCells: (ranges: import("@leankylin-sheet/core").Range, type: string, options?: import("@leankylin-sheet/core/dist/api").CommonOptions) => void;
|
|
61
61
|
cancelMerge: (ranges: import("@leankylin-sheet/core").Range, options?: import("@leankylin-sheet/core/dist/api").CommonOptions) => void;
|
|
62
62
|
getAllSheets: () => SheetType[];
|
package/dist/index.css
CHANGED
|
@@ -2303,6 +2303,207 @@ html::-webkit-scrollbar-button {
|
|
|
2303
2303
|
.leankylin-cell-tip-item{
|
|
2304
2304
|
pointer-events: none;
|
|
2305
2305
|
}
|
|
2306
|
+
.leankylin-circular-ref-overlay {
|
|
2307
|
+
position: absolute;
|
|
2308
|
+
top: 0;
|
|
2309
|
+
left: 0;
|
|
2310
|
+
width: 100%;
|
|
2311
|
+
height: 100%;
|
|
2312
|
+
z-index: 1004;
|
|
2313
|
+
display: flex;
|
|
2314
|
+
align-items: center;
|
|
2315
|
+
justify-content: center;
|
|
2316
|
+
pointer-events: none;
|
|
2317
|
+
}
|
|
2318
|
+
|
|
2319
|
+
.leankylin-circular-ref-dialog {
|
|
2320
|
+
min-width: 520px;
|
|
2321
|
+
max-width: 650px;
|
|
2322
|
+
max-height: 480px;
|
|
2323
|
+
background: #fff;
|
|
2324
|
+
border-radius: 6px;
|
|
2325
|
+
box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.05);
|
|
2326
|
+
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
|
|
2327
|
+
padding: 24px;
|
|
2328
|
+
-webkit-user-select: none;
|
|
2329
|
+
-moz-user-select: none;
|
|
2330
|
+
user-select: none;
|
|
2331
|
+
pointer-events: all;
|
|
2332
|
+
}
|
|
2333
|
+
|
|
2334
|
+
.leankylin-circular-ref-dialog-title {
|
|
2335
|
+
display: flex;
|
|
2336
|
+
align-items: center;
|
|
2337
|
+
gap: 10px;
|
|
2338
|
+
padding-bottom: 12px;
|
|
2339
|
+
border-bottom: 1px solid #f0f0f0;
|
|
2340
|
+
margin-bottom: 14px;
|
|
2341
|
+
cursor: move;
|
|
2342
|
+
}
|
|
2343
|
+
|
|
2344
|
+
.leankylin-circular-ref-dialog-title-icon {
|
|
2345
|
+
display: flex;
|
|
2346
|
+
align-items: center;
|
|
2347
|
+
justify-content: center;
|
|
2348
|
+
width: 28px;
|
|
2349
|
+
height: 28px;
|
|
2350
|
+
border-radius: 50%;
|
|
2351
|
+
background: #fff3e0;
|
|
2352
|
+
flex-shrink: 0;
|
|
2353
|
+
}
|
|
2354
|
+
|
|
2355
|
+
.leankylin-circular-ref-dialog-title-icon svg {
|
|
2356
|
+
width: 16px;
|
|
2357
|
+
height: 16px;
|
|
2358
|
+
color: #e65100;
|
|
2359
|
+
}
|
|
2360
|
+
|
|
2361
|
+
.leankylin-circular-ref-dialog-title-text {
|
|
2362
|
+
font-size: 16px;
|
|
2363
|
+
font-weight: 600;
|
|
2364
|
+
color: #1a1a1a;
|
|
2365
|
+
line-height: 1.4;
|
|
2366
|
+
}
|
|
2367
|
+
|
|
2368
|
+
.leankylin-circular-ref-dialog-desc {
|
|
2369
|
+
font-size: 13px;
|
|
2370
|
+
color: #666;
|
|
2371
|
+
line-height: 1.7;
|
|
2372
|
+
margin-bottom: 16px;
|
|
2373
|
+
padding: 10px 14px;
|
|
2374
|
+
background: #fff8e1;
|
|
2375
|
+
border-radius: 6px;
|
|
2376
|
+
border-left: 3px solid #ffb300;
|
|
2377
|
+
}
|
|
2378
|
+
|
|
2379
|
+
.leankylin-circular-ref-dialog-table-wrap {
|
|
2380
|
+
max-height: 280px;
|
|
2381
|
+
overflow-y: auto;
|
|
2382
|
+
border: 1px solid #e8e8e8;
|
|
2383
|
+
border-radius: 8px;
|
|
2384
|
+
}
|
|
2385
|
+
|
|
2386
|
+
.leankylin-circular-ref-dialog-table-wrap::-webkit-scrollbar {
|
|
2387
|
+
width: 6px;
|
|
2388
|
+
}
|
|
2389
|
+
|
|
2390
|
+
.leankylin-circular-ref-dialog-table-wrap::-webkit-scrollbar-thumb {
|
|
2391
|
+
background: #d0d0d0;
|
|
2392
|
+
border-radius: 3px;
|
|
2393
|
+
}
|
|
2394
|
+
|
|
2395
|
+
.leankylin-circular-ref-dialog-table-wrap::-webkit-scrollbar-track {
|
|
2396
|
+
background: transparent;
|
|
2397
|
+
}
|
|
2398
|
+
|
|
2399
|
+
.leankylin-circular-ref-dialog-table {
|
|
2400
|
+
width: 100%;
|
|
2401
|
+
border-collapse: collapse;
|
|
2402
|
+
table-layout: auto;
|
|
2403
|
+
}
|
|
2404
|
+
|
|
2405
|
+
.leankylin-circular-ref-dialog-table thead th {
|
|
2406
|
+
position: sticky;
|
|
2407
|
+
top: 0;
|
|
2408
|
+
background: #fafafa;
|
|
2409
|
+
color: #555;
|
|
2410
|
+
font-size: 12px;
|
|
2411
|
+
font-weight: 600;
|
|
2412
|
+
text-transform: none;
|
|
2413
|
+
padding: 10px 14px;
|
|
2414
|
+
text-align: left;
|
|
2415
|
+
border-bottom: 2px solid #e8e8e8;
|
|
2416
|
+
letter-spacing: 0.3px;
|
|
2417
|
+
}
|
|
2418
|
+
|
|
2419
|
+
.leankylin-circular-ref-dialog-table thead th:first-child {
|
|
2420
|
+
width: 25%;
|
|
2421
|
+
}
|
|
2422
|
+
|
|
2423
|
+
.leankylin-circular-ref-dialog-table thead th:nth-child(2) {
|
|
2424
|
+
width: 18%;
|
|
2425
|
+
}
|
|
2426
|
+
|
|
2427
|
+
.leankylin-circular-ref-dialog-table thead th:last-child {
|
|
2428
|
+
width: 57%;
|
|
2429
|
+
}
|
|
2430
|
+
|
|
2431
|
+
.leankylin-circular-ref-dialog-table tbody td {
|
|
2432
|
+
padding: 10px 14px;
|
|
2433
|
+
font-size: 13px;
|
|
2434
|
+
color: #333;
|
|
2435
|
+
border-bottom: 1px solid #f5f5f5;
|
|
2436
|
+
vertical-align: middle;
|
|
2437
|
+
}
|
|
2438
|
+
|
|
2439
|
+
.leankylin-circular-ref-dialog-table tbody tr:last-child td {
|
|
2440
|
+
border-bottom: none;
|
|
2441
|
+
}
|
|
2442
|
+
|
|
2443
|
+
.leankylin-circular-ref-dialog-table tbody tr:hover {
|
|
2444
|
+
background: #f9fafb;
|
|
2445
|
+
}
|
|
2446
|
+
|
|
2447
|
+
.leankylin-circular-ref-dialog-table-row {
|
|
2448
|
+
cursor: pointer;
|
|
2449
|
+
transition: background 0.15s;
|
|
2450
|
+
}
|
|
2451
|
+
|
|
2452
|
+
.leankylin-circular-ref-dialog-table-row:hover {
|
|
2453
|
+
background: #e8f0fe !important;
|
|
2454
|
+
}
|
|
2455
|
+
|
|
2456
|
+
.leankylin-circular-ref-dialog-table-cell-sheet {
|
|
2457
|
+
color: #888;
|
|
2458
|
+
font-style: italic;
|
|
2459
|
+
}
|
|
2460
|
+
|
|
2461
|
+
.leankylin-circular-ref-dialog-table-cell-position {
|
|
2462
|
+
display: inline-flex;
|
|
2463
|
+
align-items: center;
|
|
2464
|
+
justify-content: center;
|
|
2465
|
+
padding: 2px 8px;
|
|
2466
|
+
background: #e3f2fd;
|
|
2467
|
+
color: #1565c0;
|
|
2468
|
+
border-radius: 3px;
|
|
2469
|
+
font-weight: 600;
|
|
2470
|
+
font-family: "SF Mono", "Menlo", "Monaco", "Consolas", monospace;
|
|
2471
|
+
font-size: 12px;
|
|
2472
|
+
}
|
|
2473
|
+
|
|
2474
|
+
.leankylin-circular-ref-dialog-table-cell-formula {
|
|
2475
|
+
font-family: "SF Mono", "Menlo", "Monaco", "Consolas", monospace;
|
|
2476
|
+
font-size: 12px;
|
|
2477
|
+
color: #555;
|
|
2478
|
+
word-break: break-all;
|
|
2479
|
+
}
|
|
2480
|
+
|
|
2481
|
+
.leankylin-circular-ref-dialog-footer {
|
|
2482
|
+
display: flex;
|
|
2483
|
+
justify-content: flex-end;
|
|
2484
|
+
margin-top: 16px;
|
|
2485
|
+
padding-top: 12px;
|
|
2486
|
+
border-top: 1px solid #f0f0f0;
|
|
2487
|
+
}
|
|
2488
|
+
|
|
2489
|
+
.leankylin-circular-ref-dialog-footer-btn {
|
|
2490
|
+
display: inline-flex;
|
|
2491
|
+
align-items: center;
|
|
2492
|
+
padding: 7px 20px;
|
|
2493
|
+
font-size: 13px;
|
|
2494
|
+
font-weight: 500;
|
|
2495
|
+
border: none;
|
|
2496
|
+
border-radius: 5px;
|
|
2497
|
+
cursor: pointer;
|
|
2498
|
+
background: #0188FB;
|
|
2499
|
+
color: #fff;
|
|
2500
|
+
transition: background 0.15s;
|
|
2501
|
+
}
|
|
2502
|
+
|
|
2503
|
+
.leankylin-circular-ref-dialog-footer-btn:hover {
|
|
2504
|
+
background: #006fd6;
|
|
2505
|
+
}
|
|
2506
|
+
|
|
2306
2507
|
.leankylin-toolbar {
|
|
2307
2508
|
display: flex;
|
|
2308
2509
|
flex-direction: row;
|
package/dist/index.esm.css
CHANGED
|
@@ -2303,6 +2303,207 @@ html::-webkit-scrollbar-button {
|
|
|
2303
2303
|
.leankylin-cell-tip-item{
|
|
2304
2304
|
pointer-events: none;
|
|
2305
2305
|
}
|
|
2306
|
+
.leankylin-circular-ref-overlay {
|
|
2307
|
+
position: absolute;
|
|
2308
|
+
top: 0;
|
|
2309
|
+
left: 0;
|
|
2310
|
+
width: 100%;
|
|
2311
|
+
height: 100%;
|
|
2312
|
+
z-index: 1004;
|
|
2313
|
+
display: flex;
|
|
2314
|
+
align-items: center;
|
|
2315
|
+
justify-content: center;
|
|
2316
|
+
pointer-events: none;
|
|
2317
|
+
}
|
|
2318
|
+
|
|
2319
|
+
.leankylin-circular-ref-dialog {
|
|
2320
|
+
min-width: 520px;
|
|
2321
|
+
max-width: 650px;
|
|
2322
|
+
max-height: 480px;
|
|
2323
|
+
background: #fff;
|
|
2324
|
+
border-radius: 6px;
|
|
2325
|
+
box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.05);
|
|
2326
|
+
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
|
|
2327
|
+
padding: 24px;
|
|
2328
|
+
-webkit-user-select: none;
|
|
2329
|
+
-moz-user-select: none;
|
|
2330
|
+
user-select: none;
|
|
2331
|
+
pointer-events: all;
|
|
2332
|
+
}
|
|
2333
|
+
|
|
2334
|
+
.leankylin-circular-ref-dialog-title {
|
|
2335
|
+
display: flex;
|
|
2336
|
+
align-items: center;
|
|
2337
|
+
gap: 10px;
|
|
2338
|
+
padding-bottom: 12px;
|
|
2339
|
+
border-bottom: 1px solid #f0f0f0;
|
|
2340
|
+
margin-bottom: 14px;
|
|
2341
|
+
cursor: move;
|
|
2342
|
+
}
|
|
2343
|
+
|
|
2344
|
+
.leankylin-circular-ref-dialog-title-icon {
|
|
2345
|
+
display: flex;
|
|
2346
|
+
align-items: center;
|
|
2347
|
+
justify-content: center;
|
|
2348
|
+
width: 28px;
|
|
2349
|
+
height: 28px;
|
|
2350
|
+
border-radius: 50%;
|
|
2351
|
+
background: #fff3e0;
|
|
2352
|
+
flex-shrink: 0;
|
|
2353
|
+
}
|
|
2354
|
+
|
|
2355
|
+
.leankylin-circular-ref-dialog-title-icon svg {
|
|
2356
|
+
width: 16px;
|
|
2357
|
+
height: 16px;
|
|
2358
|
+
color: #e65100;
|
|
2359
|
+
}
|
|
2360
|
+
|
|
2361
|
+
.leankylin-circular-ref-dialog-title-text {
|
|
2362
|
+
font-size: 16px;
|
|
2363
|
+
font-weight: 600;
|
|
2364
|
+
color: #1a1a1a;
|
|
2365
|
+
line-height: 1.4;
|
|
2366
|
+
}
|
|
2367
|
+
|
|
2368
|
+
.leankylin-circular-ref-dialog-desc {
|
|
2369
|
+
font-size: 13px;
|
|
2370
|
+
color: #666;
|
|
2371
|
+
line-height: 1.7;
|
|
2372
|
+
margin-bottom: 16px;
|
|
2373
|
+
padding: 10px 14px;
|
|
2374
|
+
background: #fff8e1;
|
|
2375
|
+
border-radius: 6px;
|
|
2376
|
+
border-left: 3px solid #ffb300;
|
|
2377
|
+
}
|
|
2378
|
+
|
|
2379
|
+
.leankylin-circular-ref-dialog-table-wrap {
|
|
2380
|
+
max-height: 280px;
|
|
2381
|
+
overflow-y: auto;
|
|
2382
|
+
border: 1px solid #e8e8e8;
|
|
2383
|
+
border-radius: 8px;
|
|
2384
|
+
}
|
|
2385
|
+
|
|
2386
|
+
.leankylin-circular-ref-dialog-table-wrap::-webkit-scrollbar {
|
|
2387
|
+
width: 6px;
|
|
2388
|
+
}
|
|
2389
|
+
|
|
2390
|
+
.leankylin-circular-ref-dialog-table-wrap::-webkit-scrollbar-thumb {
|
|
2391
|
+
background: #d0d0d0;
|
|
2392
|
+
border-radius: 3px;
|
|
2393
|
+
}
|
|
2394
|
+
|
|
2395
|
+
.leankylin-circular-ref-dialog-table-wrap::-webkit-scrollbar-track {
|
|
2396
|
+
background: transparent;
|
|
2397
|
+
}
|
|
2398
|
+
|
|
2399
|
+
.leankylin-circular-ref-dialog-table {
|
|
2400
|
+
width: 100%;
|
|
2401
|
+
border-collapse: collapse;
|
|
2402
|
+
table-layout: auto;
|
|
2403
|
+
}
|
|
2404
|
+
|
|
2405
|
+
.leankylin-circular-ref-dialog-table thead th {
|
|
2406
|
+
position: sticky;
|
|
2407
|
+
top: 0;
|
|
2408
|
+
background: #fafafa;
|
|
2409
|
+
color: #555;
|
|
2410
|
+
font-size: 12px;
|
|
2411
|
+
font-weight: 600;
|
|
2412
|
+
text-transform: none;
|
|
2413
|
+
padding: 10px 14px;
|
|
2414
|
+
text-align: left;
|
|
2415
|
+
border-bottom: 2px solid #e8e8e8;
|
|
2416
|
+
letter-spacing: 0.3px;
|
|
2417
|
+
}
|
|
2418
|
+
|
|
2419
|
+
.leankylin-circular-ref-dialog-table thead th:first-child {
|
|
2420
|
+
width: 25%;
|
|
2421
|
+
}
|
|
2422
|
+
|
|
2423
|
+
.leankylin-circular-ref-dialog-table thead th:nth-child(2) {
|
|
2424
|
+
width: 18%;
|
|
2425
|
+
}
|
|
2426
|
+
|
|
2427
|
+
.leankylin-circular-ref-dialog-table thead th:last-child {
|
|
2428
|
+
width: 57%;
|
|
2429
|
+
}
|
|
2430
|
+
|
|
2431
|
+
.leankylin-circular-ref-dialog-table tbody td {
|
|
2432
|
+
padding: 10px 14px;
|
|
2433
|
+
font-size: 13px;
|
|
2434
|
+
color: #333;
|
|
2435
|
+
border-bottom: 1px solid #f5f5f5;
|
|
2436
|
+
vertical-align: middle;
|
|
2437
|
+
}
|
|
2438
|
+
|
|
2439
|
+
.leankylin-circular-ref-dialog-table tbody tr:last-child td {
|
|
2440
|
+
border-bottom: none;
|
|
2441
|
+
}
|
|
2442
|
+
|
|
2443
|
+
.leankylin-circular-ref-dialog-table tbody tr:hover {
|
|
2444
|
+
background: #f9fafb;
|
|
2445
|
+
}
|
|
2446
|
+
|
|
2447
|
+
.leankylin-circular-ref-dialog-table-row {
|
|
2448
|
+
cursor: pointer;
|
|
2449
|
+
transition: background 0.15s;
|
|
2450
|
+
}
|
|
2451
|
+
|
|
2452
|
+
.leankylin-circular-ref-dialog-table-row:hover {
|
|
2453
|
+
background: #e8f0fe !important;
|
|
2454
|
+
}
|
|
2455
|
+
|
|
2456
|
+
.leankylin-circular-ref-dialog-table-cell-sheet {
|
|
2457
|
+
color: #888;
|
|
2458
|
+
font-style: italic;
|
|
2459
|
+
}
|
|
2460
|
+
|
|
2461
|
+
.leankylin-circular-ref-dialog-table-cell-position {
|
|
2462
|
+
display: inline-flex;
|
|
2463
|
+
align-items: center;
|
|
2464
|
+
justify-content: center;
|
|
2465
|
+
padding: 2px 8px;
|
|
2466
|
+
background: #e3f2fd;
|
|
2467
|
+
color: #1565c0;
|
|
2468
|
+
border-radius: 3px;
|
|
2469
|
+
font-weight: 600;
|
|
2470
|
+
font-family: "SF Mono", "Menlo", "Monaco", "Consolas", monospace;
|
|
2471
|
+
font-size: 12px;
|
|
2472
|
+
}
|
|
2473
|
+
|
|
2474
|
+
.leankylin-circular-ref-dialog-table-cell-formula {
|
|
2475
|
+
font-family: "SF Mono", "Menlo", "Monaco", "Consolas", monospace;
|
|
2476
|
+
font-size: 12px;
|
|
2477
|
+
color: #555;
|
|
2478
|
+
word-break: break-all;
|
|
2479
|
+
}
|
|
2480
|
+
|
|
2481
|
+
.leankylin-circular-ref-dialog-footer {
|
|
2482
|
+
display: flex;
|
|
2483
|
+
justify-content: flex-end;
|
|
2484
|
+
margin-top: 16px;
|
|
2485
|
+
padding-top: 12px;
|
|
2486
|
+
border-top: 1px solid #f0f0f0;
|
|
2487
|
+
}
|
|
2488
|
+
|
|
2489
|
+
.leankylin-circular-ref-dialog-footer-btn {
|
|
2490
|
+
display: inline-flex;
|
|
2491
|
+
align-items: center;
|
|
2492
|
+
padding: 7px 20px;
|
|
2493
|
+
font-size: 13px;
|
|
2494
|
+
font-weight: 500;
|
|
2495
|
+
border: none;
|
|
2496
|
+
border-radius: 5px;
|
|
2497
|
+
cursor: pointer;
|
|
2498
|
+
background: #0188FB;
|
|
2499
|
+
color: #fff;
|
|
2500
|
+
transition: background 0.15s;
|
|
2501
|
+
}
|
|
2502
|
+
|
|
2503
|
+
.leankylin-circular-ref-dialog-footer-btn:hover {
|
|
2504
|
+
background: #006fd6;
|
|
2505
|
+
}
|
|
2506
|
+
|
|
2306
2507
|
.leankylin-toolbar {
|
|
2307
2508
|
display: flex;
|
|
2308
2509
|
flex-direction: row;
|
package/dist/index.esm.js
CHANGED
|
@@ -3716,6 +3716,133 @@ var CellTipRender = function CellTipRender() {
|
|
|
3716
3716
|
}));
|
|
3717
3717
|
};
|
|
3718
3718
|
|
|
3719
|
+
var CircularReferenceDialog = function CircularReferenceDialog() {
|
|
3720
|
+
var _useContext = useContext(WorkbookContext),
|
|
3721
|
+
context = _useContext.context,
|
|
3722
|
+
setContext = _useContext.setContext;
|
|
3723
|
+
var _locale = locale(context),
|
|
3724
|
+
formulaMore = _locale.formulaMore;
|
|
3725
|
+
var cells = context.circularReference || [];
|
|
3726
|
+
var _useState = useState({
|
|
3727
|
+
x: 0,
|
|
3728
|
+
y: 0
|
|
3729
|
+
}),
|
|
3730
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
3731
|
+
offset = _useState2[0],
|
|
3732
|
+
setOffset = _useState2[1];
|
|
3733
|
+
var dragRef = useRef({
|
|
3734
|
+
dragging: false,
|
|
3735
|
+
startX: 0,
|
|
3736
|
+
startY: 0,
|
|
3737
|
+
initialOffsetX: 0,
|
|
3738
|
+
initialOffsetY: 0
|
|
3739
|
+
});
|
|
3740
|
+
var handleDragStart = useCallback(function (e) {
|
|
3741
|
+
dragRef.current = {
|
|
3742
|
+
dragging: true,
|
|
3743
|
+
startX: e.pageX,
|
|
3744
|
+
startY: e.pageY,
|
|
3745
|
+
initialOffsetX: offset.x,
|
|
3746
|
+
initialOffsetY: offset.y
|
|
3747
|
+
};
|
|
3748
|
+
}, [offset]);
|
|
3749
|
+
var handleDragMove = useCallback(function (e) {
|
|
3750
|
+
if (!dragRef.current.dragging) return;
|
|
3751
|
+
var dx = e.pageX - dragRef.current.startX;
|
|
3752
|
+
var dy = e.pageY - dragRef.current.startY;
|
|
3753
|
+
setOffset({
|
|
3754
|
+
x: dragRef.current.initialOffsetX + dx,
|
|
3755
|
+
y: dragRef.current.initialOffsetY + dy
|
|
3756
|
+
});
|
|
3757
|
+
}, []);
|
|
3758
|
+
var handleDragEnd = useCallback(function () {
|
|
3759
|
+
dragRef.current.dragging = false;
|
|
3760
|
+
}, []);
|
|
3761
|
+
var handleNavigate = function handleNavigate(r, c, sheetId) {
|
|
3762
|
+
setContext(function (draftCtx) {
|
|
3763
|
+
if (sheetId !== draftCtx.currentSheetId) {
|
|
3764
|
+
changeSheet(draftCtx, sheetId);
|
|
3765
|
+
}
|
|
3766
|
+
draftCtx.luckysheet_select_save = normalizeSelection(draftCtx, [{
|
|
3767
|
+
row: [r, r],
|
|
3768
|
+
column: [c, c]
|
|
3769
|
+
}]);
|
|
3770
|
+
scrollToHighlightCell(draftCtx, r, c);
|
|
3771
|
+
});
|
|
3772
|
+
};
|
|
3773
|
+
var handleDismiss = function handleDismiss() {
|
|
3774
|
+
setContext(function (ctx) {
|
|
3775
|
+
delete ctx.circularReference;
|
|
3776
|
+
});
|
|
3777
|
+
};
|
|
3778
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
3779
|
+
className: "leankylin-circular-ref-dialog",
|
|
3780
|
+
style: {
|
|
3781
|
+
transform: "translate(".concat(offset.x, "px, ").concat(offset.y, "px)")
|
|
3782
|
+
},
|
|
3783
|
+
onMouseMove: handleDragMove,
|
|
3784
|
+
onMouseUp: handleDragEnd,
|
|
3785
|
+
onMouseLeave: handleDragEnd,
|
|
3786
|
+
onWheelCapture: function onWheelCapture(e) {
|
|
3787
|
+
return e.stopPropagation();
|
|
3788
|
+
}
|
|
3789
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
3790
|
+
className: "leankylin-circular-ref-dialog-title",
|
|
3791
|
+
onMouseDown: handleDragStart
|
|
3792
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
3793
|
+
className: "leankylin-circular-ref-dialog-title-icon"
|
|
3794
|
+
}, /*#__PURE__*/React.createElement("svg", {
|
|
3795
|
+
viewBox: "0 0 24 24",
|
|
3796
|
+
fill: "none",
|
|
3797
|
+
stroke: "currentColor",
|
|
3798
|
+
strokeWidth: "2",
|
|
3799
|
+
strokeLinecap: "round",
|
|
3800
|
+
strokeLinejoin: "round"
|
|
3801
|
+
}, /*#__PURE__*/React.createElement("circle", {
|
|
3802
|
+
cx: "12",
|
|
3803
|
+
cy: "12",
|
|
3804
|
+
r: "10"
|
|
3805
|
+
}), /*#__PURE__*/React.createElement("line", {
|
|
3806
|
+
x1: "12",
|
|
3807
|
+
y1: "8",
|
|
3808
|
+
x2: "12",
|
|
3809
|
+
y2: "12"
|
|
3810
|
+
}), /*#__PURE__*/React.createElement("line", {
|
|
3811
|
+
x1: "12",
|
|
3812
|
+
y1: "16",
|
|
3813
|
+
x2: "12.01",
|
|
3814
|
+
y2: "16"
|
|
3815
|
+
}))), /*#__PURE__*/React.createElement("span", {
|
|
3816
|
+
className: "leankylin-circular-ref-dialog-title-text"
|
|
3817
|
+
}, formulaMore.circularReferenceTitle)), /*#__PURE__*/React.createElement("div", {
|
|
3818
|
+
className: "leankylin-circular-ref-dialog-desc"
|
|
3819
|
+
}, formulaMore.circularReferenceDescription), /*#__PURE__*/React.createElement("div", {
|
|
3820
|
+
className: "leankylin-circular-ref-dialog-table-wrap"
|
|
3821
|
+
}, /*#__PURE__*/React.createElement("table", {
|
|
3822
|
+
className: "leankylin-circular-ref-dialog-table"
|
|
3823
|
+
}, /*#__PURE__*/React.createElement("thead", null, /*#__PURE__*/React.createElement("tr", null, /*#__PURE__*/React.createElement("th", null, formulaMore.circularReferenceSheet), /*#__PURE__*/React.createElement("th", null, formulaMore.circularReferenceCell), /*#__PURE__*/React.createElement("th", null, formulaMore.circularReferenceFormula))), /*#__PURE__*/React.createElement("tbody", null, cells.map(function (cell, index) {
|
|
3824
|
+
return /*#__PURE__*/React.createElement("tr", {
|
|
3825
|
+
key: index,
|
|
3826
|
+
className: "leankylin-circular-ref-dialog-table-row",
|
|
3827
|
+
onClick: function onClick() {
|
|
3828
|
+
return handleNavigate(cell.r, cell.c, cell.sheetId);
|
|
3829
|
+
}
|
|
3830
|
+
}, /*#__PURE__*/React.createElement("td", null, /*#__PURE__*/React.createElement("span", {
|
|
3831
|
+
className: "leankylin-circular-ref-dialog-table-cell-sheet"
|
|
3832
|
+
}, cell.sheetName || "-")), /*#__PURE__*/React.createElement("td", null, /*#__PURE__*/React.createElement("span", {
|
|
3833
|
+
className: "leankylin-circular-ref-dialog-table-cell-position"
|
|
3834
|
+
}, cell.cellPosition)), /*#__PURE__*/React.createElement("td", null, /*#__PURE__*/React.createElement("span", {
|
|
3835
|
+
className: "leankylin-circular-ref-dialog-table-cell-formula"
|
|
3836
|
+
}, cell.formulaContent)));
|
|
3837
|
+
})))), /*#__PURE__*/React.createElement("div", {
|
|
3838
|
+
className: "leankylin-circular-ref-dialog-footer"
|
|
3839
|
+
}, /*#__PURE__*/React.createElement("button", {
|
|
3840
|
+
type: "button",
|
|
3841
|
+
className: "leankylin-circular-ref-dialog-footer-btn",
|
|
3842
|
+
onClick: handleDismiss
|
|
3843
|
+
}, locale(context).button.confirm)));
|
|
3844
|
+
};
|
|
3845
|
+
|
|
3719
3846
|
var SheetOverlay = function SheetOverlay() {
|
|
3720
3847
|
var _refs$cellArea$curren, _refs$cellArea$curren2, _context$luckysheet_s, _context$luckysheet_s2, _context$luckysheet_s3, _context$luckysheet_s4, _context$luckysheet_s5, _context$luckysheet_s6, _context$presences$le, _context$presences, _context$linkCard, _context$rangeDialog;
|
|
3721
3848
|
var _useContext = useContext(WorkbookContext),
|
|
@@ -4218,7 +4345,21 @@ var SheetOverlay = function SheetOverlay() {
|
|
|
4218
4345
|
style: {
|
|
4219
4346
|
left: context.scrollLeft
|
|
4220
4347
|
}
|
|
4221
|
-
}, settings.Footer))))))
|
|
4348
|
+
}, settings.Footer)))))), context.circularReference && context.circularReference.length > 0 && ( /*#__PURE__*/React.createElement("div", {
|
|
4349
|
+
className: "leankylin-circular-ref-overlay",
|
|
4350
|
+
onMouseDown: function onMouseDown(e) {
|
|
4351
|
+
return e.stopPropagation();
|
|
4352
|
+
},
|
|
4353
|
+
onMouseMove: function onMouseMove(e) {
|
|
4354
|
+
return e.stopPropagation();
|
|
4355
|
+
},
|
|
4356
|
+
onMouseUp: function onMouseUp(e) {
|
|
4357
|
+
return e.stopPropagation();
|
|
4358
|
+
},
|
|
4359
|
+
onContextMenu: function onContextMenu(e) {
|
|
4360
|
+
return e.stopPropagation();
|
|
4361
|
+
}
|
|
4362
|
+
}, /*#__PURE__*/React.createElement(CircularReferenceDialog, null))));
|
|
4222
4363
|
};
|
|
4223
4364
|
|
|
4224
4365
|
var Sheet = function Sheet(_ref) {
|