@sia.soul/sia-react-ui 0.1.131 → 0.1.134
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/{chunk-NYU3DJVZ.js → chunk-436QH6XH.js} +10 -2
- package/dist/{chunk-OHIBJFX5.js → chunk-4KNFPQEV.js} +2 -2
- package/dist/{chunk-J3RX7GCZ.js → chunk-L2S7IPSM.js} +1 -1
- package/dist/{chunk-EWEDQ3VJ.js → chunk-UVHC6OEX.js} +70 -5
- package/dist/{chunk-RC5MXFLI.js → chunk-WIRIEIRO.js} +1 -1
- package/dist/{core-DoyeSoBN.d.ts → core-Bkk7-59o.d.ts} +3 -3
- package/dist/{core-DUmn3A2b.d.cts → core-lZIzt-an.d.cts} +3 -3
- package/dist/core.cjs +74 -5
- package/dist/core.d.cts +1 -1
- package/dist/core.d.ts +1 -1
- package/dist/core.js +3 -3
- package/dist/index.cjs +221 -49
- package/dist/index.css +52 -0
- package/dist/index.d.cts +9 -3
- package/dist/index.d.ts +9 -3
- package/dist/index.js +147 -44
- package/dist/rich-text-editor.cjs +58 -5
- package/dist/rich-text-editor.js +2 -2
- package/dist/select-date-range.cjs +19 -0
- package/dist/select-date-range.js +3 -3
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -2484,10 +2484,35 @@ var import_react12 = require("react");
|
|
|
2484
2484
|
|
|
2485
2485
|
// src/components/Navigation.tsx
|
|
2486
2486
|
var import_react10 = require("react");
|
|
2487
|
+
|
|
2488
|
+
// src/components/floatingScrollbarOwnership.ts
|
|
2489
|
+
var targets = /* @__PURE__ */ new Map();
|
|
2490
|
+
function registerFloatingScrollbar(track, target) {
|
|
2491
|
+
targets.set(track, { target, dragging: false });
|
|
2492
|
+
return () => {
|
|
2493
|
+
targets.delete(track);
|
|
2494
|
+
};
|
|
2495
|
+
}
|
|
2496
|
+
function setFloatingScrollbarDragging(track, dragging) {
|
|
2497
|
+
const entry = targets.get(track);
|
|
2498
|
+
if (entry) entry.dragging = dragging;
|
|
2499
|
+
}
|
|
2500
|
+
function resolveFloatingScrollbarTarget(target) {
|
|
2501
|
+
const track = target instanceof Element ? target.closest(".sia-floating-scrollbar") : null;
|
|
2502
|
+
return track && targets.get(track)?.target || target;
|
|
2503
|
+
}
|
|
2504
|
+
function hasFloatingScrollbarInteraction(container) {
|
|
2505
|
+
if (!container) return false;
|
|
2506
|
+
return [...targets].some(([track, entry]) => container.contains(entry.target) && (entry.dragging || track.matches(":hover")));
|
|
2507
|
+
}
|
|
2508
|
+
|
|
2509
|
+
// src/components/Navigation.tsx
|
|
2487
2510
|
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
2488
2511
|
var import_react11 = require("react");
|
|
2489
2512
|
function MenuPopup({
|
|
2490
2513
|
anchorRef,
|
|
2514
|
+
popupRef,
|
|
2515
|
+
keyPath,
|
|
2491
2516
|
open,
|
|
2492
2517
|
placement,
|
|
2493
2518
|
menuId,
|
|
@@ -2518,13 +2543,15 @@ function MenuPopup({
|
|
|
2518
2543
|
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
2519
2544
|
PopupPortal,
|
|
2520
2545
|
{
|
|
2546
|
+
ref: popupRef,
|
|
2521
2547
|
anchorRef,
|
|
2522
2548
|
open: mounted,
|
|
2523
2549
|
placement,
|
|
2524
|
-
offset: 4,
|
|
2550
|
+
offset: placement.startsWith("right") || placement.startsWith("left") ? 16 : 4,
|
|
2525
2551
|
className: `sia-menu__popup sia-menu--${theme}${open ? " is-open" : " is-closing"}`,
|
|
2526
2552
|
style: { fontSize },
|
|
2527
2553
|
"data-sia-menu-owner": menuId,
|
|
2554
|
+
"data-sia-menu-path": JSON.stringify(keyPath),
|
|
2528
2555
|
onMouseEnter,
|
|
2529
2556
|
onMouseLeave,
|
|
2530
2557
|
children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("ul", { className: "sia-menu__popup-list", role: "menu", children })
|
|
@@ -2539,7 +2566,12 @@ function MenuEntry({
|
|
|
2539
2566
|
reserveIcon
|
|
2540
2567
|
}) {
|
|
2541
2568
|
const anchorRef = (0, import_react10.useRef)(null);
|
|
2569
|
+
const popupRef = (0, import_react10.useRef)(null);
|
|
2542
2570
|
const closeTimerRef = (0, import_react10.useRef)(void 0);
|
|
2571
|
+
const toggleRef = (0, import_react10.useRef)(props.toggle);
|
|
2572
|
+
(0, import_react10.useLayoutEffect)(() => {
|
|
2573
|
+
toggleRef.current = props.toggle;
|
|
2574
|
+
});
|
|
2543
2575
|
const hasChildren = Boolean(item.children?.length);
|
|
2544
2576
|
const isOpen = props.open.includes(item.key);
|
|
2545
2577
|
const isSelected = props.selected.includes(item.key);
|
|
@@ -2557,7 +2589,14 @@ function MenuEntry({
|
|
|
2557
2589
|
}
|
|
2558
2590
|
function scheduleClose() {
|
|
2559
2591
|
cancelClose();
|
|
2560
|
-
closeTimerRef.current = window.setTimeout(() =>
|
|
2592
|
+
closeTimerRef.current = window.setTimeout(() => {
|
|
2593
|
+
const interacting = hasFloatingScrollbarInteraction(popupRef.current) || [...document.querySelectorAll(".sia-menu__popup[data-sia-menu-owner]")].some((popup) => popup.dataset.siaMenuOwner === props.menuId && JSON.parse(popup.dataset.siaMenuPath ?? "[]").includes(item.key) && hasFloatingScrollbarInteraction(popup));
|
|
2594
|
+
if (interacting) {
|
|
2595
|
+
scheduleClose();
|
|
2596
|
+
return;
|
|
2597
|
+
}
|
|
2598
|
+
toggleRef.current(item.key, false);
|
|
2599
|
+
}, 100);
|
|
2561
2600
|
}
|
|
2562
2601
|
const hover = props.triggerSubMenuAction === "hover" && hasChildren && !inlineSubmenu;
|
|
2563
2602
|
const submenu = hasChildren ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(MenuLevel, { items: item.children ?? [], level: level + 1, parents: [item.key, ...parents], props }) : null;
|
|
@@ -2600,6 +2639,8 @@ function MenuEntry({
|
|
|
2600
2639
|
MenuPopup,
|
|
2601
2640
|
{
|
|
2602
2641
|
anchorRef,
|
|
2642
|
+
popupRef,
|
|
2643
|
+
keyPath: path,
|
|
2603
2644
|
open: isOpen,
|
|
2604
2645
|
placement: popupPlacement,
|
|
2605
2646
|
menuId: props.menuId,
|
|
@@ -2660,6 +2701,22 @@ function Menu({
|
|
|
2660
2701
|
const rootRef = (0, import_react10.useRef)(null);
|
|
2661
2702
|
const [selected, setSelected] = useControllableState({ value: selectedKeys, defaultValue: defaultSelectedKeys });
|
|
2662
2703
|
const [open, setOpen] = useControllableState({ value: openKeys, defaultValue: defaultOpenKeys, onChange: (next) => onOpenChange?.([...next]) });
|
|
2704
|
+
const pendingOpenRef = (0, import_react10.useRef)(open);
|
|
2705
|
+
(0, import_react10.useLayoutEffect)(() => {
|
|
2706
|
+
pendingOpenRef.current = open;
|
|
2707
|
+
});
|
|
2708
|
+
const popupPaths = (0, import_react10.useMemo)(() => {
|
|
2709
|
+
const paths = /* @__PURE__ */ new Map();
|
|
2710
|
+
const visit = (entries, parents) => {
|
|
2711
|
+
for (const entry of entries) {
|
|
2712
|
+
const path = [...parents, entry.key];
|
|
2713
|
+
paths.set(entry.key, path);
|
|
2714
|
+
if (entry.children) visit(entry.children, path);
|
|
2715
|
+
}
|
|
2716
|
+
};
|
|
2717
|
+
visit(items, []);
|
|
2718
|
+
return paths;
|
|
2719
|
+
}, [items]);
|
|
2663
2720
|
const revealedKey = (0, import_react10.useRef)();
|
|
2664
2721
|
const firstSelected = selected[0];
|
|
2665
2722
|
(0, import_react10.useLayoutEffect)(() => {
|
|
@@ -2687,7 +2744,7 @@ function Menu({
|
|
|
2687
2744
|
(0, import_react10.useEffect)(() => {
|
|
2688
2745
|
if (mode === "inline" || !open.length) return void 0;
|
|
2689
2746
|
const closeOutside = (event) => {
|
|
2690
|
-
const target = event.target;
|
|
2747
|
+
const target = resolveFloatingScrollbarTarget(event.target);
|
|
2691
2748
|
if (rootRef.current?.contains(target)) return;
|
|
2692
2749
|
const owner = target instanceof Element ? target.closest("[data-sia-menu-owner]")?.getAttribute("data-sia-menu-owner") : null;
|
|
2693
2750
|
if (owner !== menuId) setOpen([]);
|
|
@@ -2696,8 +2753,14 @@ function Menu({
|
|
|
2696
2753
|
return () => document.removeEventListener("pointerdown", closeOutside);
|
|
2697
2754
|
}, [menuId, mode, open.length, setOpen]);
|
|
2698
2755
|
function toggle(key, force) {
|
|
2699
|
-
const
|
|
2700
|
-
|
|
2756
|
+
const current = pendingOpenRef.current;
|
|
2757
|
+
const shouldOpen = force ?? !current.includes(key);
|
|
2758
|
+
if (shouldOpen === current.includes(key)) return;
|
|
2759
|
+
const cascading = mode !== "inline" || inlineCollapsed;
|
|
2760
|
+
const branch = popupPaths.get(key) ?? [key];
|
|
2761
|
+
const next = shouldOpen ? [...current.filter((item) => !cascading || branch.includes(item)), key] : current.filter((item) => item !== key && (!cascading || !popupPaths.get(item)?.includes(key)));
|
|
2762
|
+
pendingOpenRef.current = next;
|
|
2763
|
+
setOpen(next);
|
|
2701
2764
|
}
|
|
2702
2765
|
function select(item, keyPath, domEvent) {
|
|
2703
2766
|
const info = { key: item.key, keyPath, domEvent, item };
|
|
@@ -4003,6 +4066,7 @@ function FloatingScrollbarProvider({ disabled = false, targetRef }) {
|
|
|
4003
4066
|
event.preventDefault();
|
|
4004
4067
|
event.stopPropagation();
|
|
4005
4068
|
entry.dragging = true;
|
|
4069
|
+
setFloatingScrollbarDragging(track, true);
|
|
4006
4070
|
showEntry(entry);
|
|
4007
4071
|
thumb.setPointerCapture(event.pointerId);
|
|
4008
4072
|
const startPointer = axis === "vertical" ? event.clientY : event.clientX;
|
|
@@ -4023,6 +4087,7 @@ function FloatingScrollbarProvider({ disabled = false, targetRef }) {
|
|
|
4023
4087
|
const onPointerUp = (upEvent) => {
|
|
4024
4088
|
if (upEvent.pointerId !== event.pointerId) return;
|
|
4025
4089
|
entry.dragging = false;
|
|
4090
|
+
setFloatingScrollbarDragging(track, false);
|
|
4026
4091
|
thumb.releasePointerCapture(event.pointerId);
|
|
4027
4092
|
window.removeEventListener("pointermove", onPointerMove);
|
|
4028
4093
|
window.removeEventListener("pointerup", onPointerUp);
|
|
@@ -4054,6 +4119,8 @@ function FloatingScrollbarProvider({ disabled = false, targetRef }) {
|
|
|
4054
4119
|
if (entries.has(target)) return;
|
|
4055
4120
|
const horizontal = createTrack("horizontal");
|
|
4056
4121
|
const vertical = createTrack("vertical");
|
|
4122
|
+
const releaseHorizontalOwner = registerFloatingScrollbar(horizontal.track, target);
|
|
4123
|
+
const releaseVerticalOwner = registerFloatingScrollbar(vertical.track, target);
|
|
4057
4124
|
layer.append(horizontal.track, vertical.track);
|
|
4058
4125
|
const onPointerEnter = () => {
|
|
4059
4126
|
const entry2 = entries.get(target);
|
|
@@ -4095,6 +4162,8 @@ function FloatingScrollbarProvider({ disabled = false, targetRef }) {
|
|
|
4095
4162
|
if (entry.hideTimer !== null) window.clearTimeout(entry.hideTimer);
|
|
4096
4163
|
cleanupHorizontal();
|
|
4097
4164
|
cleanupVertical();
|
|
4165
|
+
releaseHorizontalOwner();
|
|
4166
|
+
releaseVerticalOwner();
|
|
4098
4167
|
target.removeEventListener("pointerenter", onPointerEnter);
|
|
4099
4168
|
target.removeEventListener("pointerleave", onPointerLeave);
|
|
4100
4169
|
target.removeEventListener("scroll", onScroll);
|
|
@@ -7456,8 +7525,8 @@ var FormStore = class {
|
|
|
7456
7525
|
}
|
|
7457
7526
|
validateFields = async (names) => {
|
|
7458
7527
|
const fields = names?.map((name) => this.fields.get(pathKey2(name))).filter(Boolean);
|
|
7459
|
-
const
|
|
7460
|
-
const results = await Promise.all(
|
|
7528
|
+
const targets2 = fields ?? [...this.fields.values()];
|
|
7529
|
+
const results = await Promise.all(targets2.map(async (field) => ({ field, errors: await this.validateField(field.name) })));
|
|
7461
7530
|
const errorFields = results.filter((item) => item.errors.length).map((item) => ({ name: item.field.name, errors: item.errors }));
|
|
7462
7531
|
const values = this.getFieldsValue();
|
|
7463
7532
|
if (errorFields.length) throw { values, errorFields };
|
|
@@ -13774,6 +13843,46 @@ function createRowIdentity() {
|
|
|
13774
13843
|
};
|
|
13775
13844
|
}
|
|
13776
13845
|
|
|
13846
|
+
// src/components/Table/cellFocus.ts
|
|
13847
|
+
function playCellFocusGlow(cell, isVisible, onFinish) {
|
|
13848
|
+
const namespace = "http://www.w3.org/2000/svg";
|
|
13849
|
+
const glow = document.createElementNS(namespace, "svg");
|
|
13850
|
+
glow.classList.add("sia-table__cell-focus-glow");
|
|
13851
|
+
glow.setAttribute("aria-hidden", "true");
|
|
13852
|
+
const paths = [12, 6, 2].map((length) => {
|
|
13853
|
+
const path = document.createElementNS(namespace, "path");
|
|
13854
|
+
path.setAttribute("pathLength", "100");
|
|
13855
|
+
path.style.setProperty("--sia-cell-focus-tail", String(length));
|
|
13856
|
+
path.setAttribute("stroke-dasharray", `${length} ${100 - length}`);
|
|
13857
|
+
glow.appendChild(path);
|
|
13858
|
+
return path;
|
|
13859
|
+
});
|
|
13860
|
+
let frame = 0, disposed = false;
|
|
13861
|
+
const cleanup2 = () => {
|
|
13862
|
+
if (disposed) return;
|
|
13863
|
+
disposed = true;
|
|
13864
|
+
cancelAnimationFrame(frame);
|
|
13865
|
+
glow.remove();
|
|
13866
|
+
onFinish();
|
|
13867
|
+
};
|
|
13868
|
+
const position = () => {
|
|
13869
|
+
if (!cell.isConnected || !isVisible()) {
|
|
13870
|
+
cleanup2();
|
|
13871
|
+
return;
|
|
13872
|
+
}
|
|
13873
|
+
const rect = cell.getBoundingClientRect();
|
|
13874
|
+
Object.assign(glow.style, { left: `${rect.left}px`, top: `${rect.top}px`, width: `${rect.width}px`, height: `${rect.height}px` });
|
|
13875
|
+
paths.forEach((path) => path.setAttribute("d", `M 1.5 1.5 H ${rect.width - 1.5} V ${rect.height - 1.5} H 1.5 Z`));
|
|
13876
|
+
frame = requestAnimationFrame(position);
|
|
13877
|
+
};
|
|
13878
|
+
position();
|
|
13879
|
+
if (!disposed) document.body.appendChild(glow);
|
|
13880
|
+
glow.addEventListener("animationend", (event) => {
|
|
13881
|
+
if (event.target === glow) cleanup2();
|
|
13882
|
+
});
|
|
13883
|
+
return cleanup2;
|
|
13884
|
+
}
|
|
13885
|
+
|
|
13777
13886
|
// src/components/Table/Table.tsx
|
|
13778
13887
|
var import_react57 = require("react");
|
|
13779
13888
|
|
|
@@ -16524,6 +16633,12 @@ function TableInner(props, ref) {
|
|
|
16524
16633
|
const rootRef = (0, import_react57.useRef)(null);
|
|
16525
16634
|
const remainingHeight = useRemainingHeight(rootRef, height == null && tableHeight == null ? fillRemaining : false);
|
|
16526
16635
|
const scrollRef = (0, import_react57.useRef)(null);
|
|
16636
|
+
const cellFocusRequest = (0, import_react57.useRef)(0);
|
|
16637
|
+
const cellGlow = (0, import_react57.useRef)(null);
|
|
16638
|
+
(0, import_react57.useEffect)(() => () => {
|
|
16639
|
+
cellFocusRequest.current++;
|
|
16640
|
+
cellGlow.current?.();
|
|
16641
|
+
}, []);
|
|
16527
16642
|
const tableRef = (0, import_react57.useRef)(null);
|
|
16528
16643
|
useScrollbarProximity();
|
|
16529
16644
|
const scrollbarDragRef = (0, import_react57.useRef)(null);
|
|
@@ -16874,44 +16989,100 @@ function TableInner(props, ref) {
|
|
|
16874
16989
|
scrollbarDragRef.current = null;
|
|
16875
16990
|
if (rootRef.current) rootRef.current.dataset.scrollbarDragging = "false";
|
|
16876
16991
|
}, []);
|
|
16877
|
-
(0, import_react57.useImperativeHandle)(ref, () =>
|
|
16878
|
-
|
|
16879
|
-
|
|
16880
|
-
|
|
16881
|
-
|
|
16882
|
-
|
|
16883
|
-
|
|
16884
|
-
|
|
16885
|
-
|
|
16886
|
-
|
|
16887
|
-
|
|
16888
|
-
|
|
16889
|
-
|
|
16890
|
-
|
|
16891
|
-
|
|
16892
|
-
|
|
16893
|
-
|
|
16894
|
-
|
|
16895
|
-
|
|
16896
|
-
|
|
16897
|
-
|
|
16898
|
-
|
|
16899
|
-
|
|
16900
|
-
|
|
16901
|
-
|
|
16902
|
-
|
|
16903
|
-
|
|
16904
|
-
|
|
16905
|
-
|
|
16906
|
-
|
|
16907
|
-
|
|
16908
|
-
|
|
16909
|
-
|
|
16910
|
-
|
|
16911
|
-
|
|
16912
|
-
|
|
16913
|
-
|
|
16914
|
-
|
|
16992
|
+
(0, import_react57.useImperativeHandle)(ref, () => {
|
|
16993
|
+
const api = {
|
|
16994
|
+
getRows: () => pipeline.rows.map((row) => row.record),
|
|
16995
|
+
getColumns: () => pipeline.columns,
|
|
16996
|
+
getPluginApi: (pluginId) => pluginApisRef.current[pluginId],
|
|
16997
|
+
scrollTo: (options) => scrollRef.current?.scrollTo(options),
|
|
16998
|
+
scrollToRow: (key) => {
|
|
16999
|
+
const viewport = scrollRef.current;
|
|
17000
|
+
const table = tableRef.current;
|
|
17001
|
+
const index = pipeline.rows.findIndex((row2) => row2.key === key);
|
|
17002
|
+
if (!viewport || !table || !viewport.clientHeight || index < 0) return false;
|
|
17003
|
+
const row = Array.from(table.tBodies[0]?.rows ?? []).find((element) => element.dataset.rowKey === String(key));
|
|
17004
|
+
const headerHeight = table.tHead?.offsetHeight ?? headerRows.length * rowHeight;
|
|
17005
|
+
const top = row ? row.getBoundingClientRect().top - viewport.getBoundingClientRect().top - viewport.clientTop + viewport.scrollTop : headerHeight + index * rowHeight;
|
|
17006
|
+
const height2 = row?.offsetHeight ?? rowHeight;
|
|
17007
|
+
const headerInset = stickyHeader ? headerHeight : 0;
|
|
17008
|
+
const footerInset = table.tFoot?.offsetHeight ?? 0;
|
|
17009
|
+
const visibleTop = viewport.scrollTop + headerInset;
|
|
17010
|
+
const visibleBottom = viewport.scrollTop + viewport.clientHeight - footerInset;
|
|
17011
|
+
if (top < visibleTop || height2 > visibleBottom - visibleTop) viewport.scrollTop = Math.max(0, top - headerInset);
|
|
17012
|
+
else if (top + height2 > visibleBottom) viewport.scrollTop = top + height2 - viewport.clientHeight + footerInset;
|
|
17013
|
+
if (shouldVirtualize) setScrollTop(viewport.scrollTop);
|
|
17014
|
+
updateScrollMetrics();
|
|
17015
|
+
return true;
|
|
17016
|
+
},
|
|
17017
|
+
focusCell: async (key, columnKey, options) => {
|
|
17018
|
+
const request = ++cellFocusRequest.current;
|
|
17019
|
+
cellGlow.current?.();
|
|
17020
|
+
cellGlow.current = null;
|
|
17021
|
+
const viewport = scrollRef.current;
|
|
17022
|
+
const columnIndex = leafColumns.findIndex((column2) => column2.key === columnKey);
|
|
17023
|
+
if (!viewport || columnIndex < 0 || !api.scrollToRow(key)) return false;
|
|
17024
|
+
const column = leafColumns[columnIndex];
|
|
17025
|
+
if (!normalizeFixed(column.fixed)) {
|
|
17026
|
+
const start = leafColumns.slice(0, columnIndex).reduce((sum, item) => sum + (columnWidths.get(item.key) ?? DEFAULT_WIDTH), 0);
|
|
17027
|
+
const width = columnWidths.get(columnKey) ?? DEFAULT_WIDTH;
|
|
17028
|
+
const visibleWidth = viewport.clientWidth - left - right;
|
|
17029
|
+
if (start < viewport.scrollLeft + left || width > visibleWidth) viewport.scrollLeft = Math.max(0, start - left);
|
|
17030
|
+
else if (start + width > viewport.scrollLeft + viewport.clientWidth - right) viewport.scrollLeft = start + width - viewport.clientWidth + right;
|
|
17031
|
+
if (canvas) setScrollLeft(viewport.scrollLeft);
|
|
17032
|
+
}
|
|
17033
|
+
updateScrollMetrics();
|
|
17034
|
+
let previousRect;
|
|
17035
|
+
for (let frame = 0; frame < 20; frame++) {
|
|
17036
|
+
await new Promise((resolve) => requestAnimationFrame(() => resolve()));
|
|
17037
|
+
if (request !== cellFocusRequest.current || !viewport.isConnected || !viewport.clientHeight) return false;
|
|
17038
|
+
const row = Array.from(tableRef.current?.tBodies[0]?.rows ?? []).find((item) => item.dataset.rowKey === String(key));
|
|
17039
|
+
const cell = Array.from(row?.cells ?? []).find((item) => item.dataset.columnKey === columnKey);
|
|
17040
|
+
if (!cell || !cell.offsetWidth) continue;
|
|
17041
|
+
api.scrollToRow(key);
|
|
17042
|
+
const visible = () => {
|
|
17043
|
+
if (!cell.isConnected || !viewport.clientHeight || !cell.offsetWidth) return false;
|
|
17044
|
+
const bounds = viewport.getBoundingClientRect(), rect2 = cell.getBoundingClientRect();
|
|
17045
|
+
const top = bounds.top + viewport.clientTop + (stickyHeader ? tableRef.current?.tHead?.offsetHeight ?? 0 : 0);
|
|
17046
|
+
const bottom = bounds.top + viewport.clientTop + viewport.clientHeight - (tableRef.current?.tFoot?.offsetHeight ?? 0);
|
|
17047
|
+
const fixed = normalizeFixed(column.fixed);
|
|
17048
|
+
return rect2.top >= Math.max(0, top) - 1 && rect2.bottom <= Math.min(window.innerHeight, bottom) + 1 && rect2.left >= Math.max(0, bounds.left + viewport.clientLeft + (fixed ? 0 : left)) - 1 && rect2.right <= Math.min(window.innerWidth, bounds.left + viewport.clientLeft + viewport.clientWidth - (fixed ? 0 : right)) + 1;
|
|
17049
|
+
};
|
|
17050
|
+
const rect = cell.getBoundingClientRect();
|
|
17051
|
+
const stable = previousRect && Math.abs(rect.top - previousRect.top) < 0.5 && Math.abs(rect.left - previousRect.left) < 0.5 && Math.abs(rect.width - previousRect.width) < 0.5 && Math.abs(rect.height - previousRect.height) < 0.5;
|
|
17052
|
+
previousRect = rect;
|
|
17053
|
+
if (!visible() || !stable) continue;
|
|
17054
|
+
const address = { rowKey: key, columnKey };
|
|
17055
|
+
pluginApisRef.current.cellSelection?.setRange({ anchor: address, focus: address });
|
|
17056
|
+
cell.tabIndex = -1;
|
|
17057
|
+
cell.focus({ preventScroll: true });
|
|
17058
|
+
await new Promise((resolve) => requestAnimationFrame(() => resolve()));
|
|
17059
|
+
if (request !== cellFocusRequest.current || !visible()) return false;
|
|
17060
|
+
if (options?.highlight !== false) {
|
|
17061
|
+
const cleanup2 = playCellFocusGlow(cell, visible, () => {
|
|
17062
|
+
cellGlow.current = null;
|
|
17063
|
+
});
|
|
17064
|
+
cellGlow.current = cleanup2;
|
|
17065
|
+
}
|
|
17066
|
+
return true;
|
|
17067
|
+
}
|
|
17068
|
+
return false;
|
|
17069
|
+
},
|
|
17070
|
+
setLoading: setInternalLoading,
|
|
17071
|
+
getPage: () => pluginApisRef.current.pagination?.getPage?.() ?? { current: 1, pageSize: dataSource.length || 25 },
|
|
17072
|
+
setPage: (page) => pluginApisRef.current.pagination?.setPage?.(page),
|
|
17073
|
+
clearSelection: () => pluginApisRef.current.selection?.clear?.(),
|
|
17074
|
+
setSelectedKeys: (keys) => pluginApisRef.current.selection?.setSelectedKeys?.(keys),
|
|
17075
|
+
getSelectedRows: () => pluginApisRef.current.selection?.getSelectedRows?.() ?? [],
|
|
17076
|
+
getSortInfo: () => pluginApisRef.current.sort?.getSortInfo?.() ?? null,
|
|
17077
|
+
getColumnSettings: () => pluginApisRef.current.columnSetting?.getSettings?.() ?? [],
|
|
17078
|
+
openColumnSetting: () => pluginApisRef.current.columnSetting?.open?.(),
|
|
17079
|
+
generatePageParams: (model) => pluginApisRef.current.pagination?.generatePageParams?.(model) ?? model,
|
|
17080
|
+
requestCount: async (model) => {
|
|
17081
|
+
await pluginApisRef.current.pagination?.requestCount?.(model);
|
|
17082
|
+
}
|
|
17083
|
+
};
|
|
17084
|
+
return api;
|
|
17085
|
+
}, [dataSource.length, pipeline.columns, pipeline.rows, headerRows.length, rowHeight, stickyHeader, shouldVirtualize, updateScrollMetrics, leafColumns, columnWidths, left, right, canvas]);
|
|
16915
17086
|
const coreContext = {
|
|
16916
17087
|
pluginId: "core",
|
|
16917
17088
|
sourceData: dataSource,
|
|
@@ -17649,7 +17820,8 @@ function createWorksheetPlugin(options) {
|
|
|
17649
17820
|
...column,
|
|
17650
17821
|
render: (value, record, index, info) => {
|
|
17651
17822
|
const area = bounds(), cols = columns();
|
|
17652
|
-
const handle = area && context.rows[area.bottom]?.key === info.row.key && cols[area.right]?.key === column.key &&
|
|
17823
|
+
const handle = area && context.rows[area.bottom]?.key === info.row.key && cols[area.right]?.key === column.key && // 填充入口与编辑权限一致,避免只读格或保存锁定后仍暗示可以拖拽修改。
|
|
17824
|
+
editable(record, column) && (suppressEditing || !context.state.editing);
|
|
17653
17825
|
return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(import_jsx_runtime56.Fragment, { children: [
|
|
17654
17826
|
render ? render(value, record, index, info) : value,
|
|
17655
17827
|
handle && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
@@ -20950,9 +21122,9 @@ function chordMatrixLayout(matrix, options = {}) {
|
|
|
20950
21122
|
let angle = options.startAngle ?? -Math.PI / 2;
|
|
20951
21123
|
const subSort = options.legacySubSort ? options.sortSub === "ascending" ? "ascending" : options.sort === "descending" ? "descending" : "none" : options.sortSub;
|
|
20952
21124
|
const groups = order.map((index) => {
|
|
20953
|
-
const start = angle,
|
|
20954
|
-
if (subSort && subSort !== "none")
|
|
20955
|
-
for (const target of
|
|
21125
|
+
const start = angle, targets2 = Array.from({ length: n }, (_, i) => i);
|
|
21126
|
+
if (subSort && subSort !== "none") targets2.sort((a, b) => (values[index][a] - values[index][b]) * (subSort === "ascending" ? 1 : -1) || a - b);
|
|
21127
|
+
for (const target of targets2) {
|
|
20956
21128
|
const value = values[index][target], end = angle + direction * value * factor;
|
|
20957
21129
|
segments[index][target] = { index, target, start: angle, end, value };
|
|
20958
21130
|
angle = end;
|
package/dist/index.css
CHANGED
|
@@ -11186,6 +11186,58 @@ body > .sia-title-tooltip[data-sia-popup-layer] {
|
|
|
11186
11186
|
z-index: 5;
|
|
11187
11187
|
}
|
|
11188
11188
|
|
|
11189
|
+
/* src/components/Table/cellFocus.css */
|
|
11190
|
+
.sia-table__cell-focus-glow {
|
|
11191
|
+
position: fixed;
|
|
11192
|
+
z-index: 2147483647;
|
|
11193
|
+
overflow: visible;
|
|
11194
|
+
pointer-events: none;
|
|
11195
|
+
fill: none;
|
|
11196
|
+
animation: sia-table-cell-focus-fade 1100ms linear forwards;
|
|
11197
|
+
}
|
|
11198
|
+
.sia-table__cell-focus-glow path {
|
|
11199
|
+
stroke: #ff303b;
|
|
11200
|
+
stroke-width: 3px;
|
|
11201
|
+
stroke-linecap: round;
|
|
11202
|
+
opacity: .25;
|
|
11203
|
+
filter: drop-shadow(0 0 3px #ff303b);
|
|
11204
|
+
animation: sia-table-cell-focus-orbit 900ms linear forwards;
|
|
11205
|
+
}
|
|
11206
|
+
.sia-table__cell-focus-glow path:nth-child(2) {
|
|
11207
|
+
opacity: .6;
|
|
11208
|
+
}
|
|
11209
|
+
.sia-table__cell-focus-glow path:nth-child(3) {
|
|
11210
|
+
opacity: 1;
|
|
11211
|
+
}
|
|
11212
|
+
@keyframes sia-table-cell-focus-orbit {
|
|
11213
|
+
from {
|
|
11214
|
+
stroke-dashoffset: var(--sia-cell-focus-tail);
|
|
11215
|
+
}
|
|
11216
|
+
to {
|
|
11217
|
+
stroke-dashoffset: calc(var(--sia-cell-focus-tail) - 100);
|
|
11218
|
+
}
|
|
11219
|
+
}
|
|
11220
|
+
@keyframes sia-table-cell-focus-fade {
|
|
11221
|
+
0%, 82% {
|
|
11222
|
+
opacity: 1;
|
|
11223
|
+
}
|
|
11224
|
+
100% {
|
|
11225
|
+
opacity: 0;
|
|
11226
|
+
}
|
|
11227
|
+
}
|
|
11228
|
+
@media (prefers-reduced-motion: reduce) {
|
|
11229
|
+
.sia-table__cell-focus-glow {
|
|
11230
|
+
animation-duration: 200ms;
|
|
11231
|
+
}
|
|
11232
|
+
.sia-table__cell-focus-glow path {
|
|
11233
|
+
animation: none;
|
|
11234
|
+
stroke-dasharray: none;
|
|
11235
|
+
}
|
|
11236
|
+
.sia-table__cell-focus-glow path:not(:last-child) {
|
|
11237
|
+
display: none;
|
|
11238
|
+
}
|
|
11239
|
+
}
|
|
11240
|
+
|
|
11189
11241
|
/* src/components/Table/worksheet.css */
|
|
11190
11242
|
.sia-table__worksheet-cell:not(.sia-table__cell--fixed) {
|
|
11191
11243
|
position: relative;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { HTMLAttributes, ReactNode, CSSProperties, ElementType, FormHTMLAttributes, InputHTMLAttributes, ChangeEvent, TextareaHTMLAttributes, MouseEvent, Key, PointerEvent, Ref, ReactElement, ButtonHTMLAttributes, RefObject } from 'react';
|
|
3
|
-
import { T as TagStatus, B as BadgeProps } from './core-
|
|
4
|
-
export { a as Badge, b as BadgeRibbonProps, c as BadgeStatus, d as Breadcrumb, e as BreadcrumbItem, f as BreadcrumbProps, C as Calendar, g as CalendarProps, h as Card, i as CardAccent, j as CardProps, k as Carousel, l as CarouselProps, m as CarouselRef, n as Collapse, o as CollapseItem, p as CollapseKey, q as CollapseProps, D as Dropdown, r as DropdownButtonProps, s as DropdownMenuProps, t as DropdownOpenSource, u as DropdownPlacement, v as DropdownProps, w as DropdownTrigger, F as FILLED_ICON_NAMES, x as FilledIconName, y as FloatButton, z as FloatButtonBackTopProps, A as FloatButtonGroupProps, E as FloatButtonProps, G as FloatButtonShape, H as FloatingPlacement, I as FloatingTrigger, J as ICON_NAMES, K as Icon, L as IconName, M as IconProps, N as IconVariant, O as Image, P as ImagePreview, Q as ImagePreviewConfig, R as ImagePreviewGroup, S as ImagePreviewGroupProps, U as ImagePreviewProps, V as ImageProps, W as Input, X as InputProps, Y as Menu, Z as MenuClickInfo, _ as MenuItem, $ as MenuMode, a0 as MenuProps, a1 as MenuTheme, a2 as MessageConfig, a3 as MessageHandle, a4 as MessageKey, a5 as MessageType, a6 as NotificationConfig, a7 as NotificationPlacement, a8 as NotificationType, a9 as Popconfirm, aa as PopconfirmProps, ab as Popover, ac as PopoverProps, ad as Progress, ae as ProgressProps, af as ProgressStatus, ag as Rate, ah as RateProps, ai as Result, aj as ResultProps, ak as ResultStatus, al as Segmented, am as SegmentedOption, an as SegmentedProps, ao as SegmentedValue, ap as Spin, aq as SpinProps, ar as StepItem, as as StepStatus, at as Steps, au as StepsProps, av as TabItem, aw as Tabs, ax as TabsContextMenuClickInfo, ay as TabsOrientation, az as TabsPosition, aA as TabsProps, aB as TabsType, aC as Tag, aD as TagProps, aE as TagSize, aF as TagVariant, aG as Timeline, aH as TimelineItem, aI as TimelineProps, aJ as Toolbar, aK as ToolbarItem, aL as ToolbarProps, aM as Tooltip, aN as TooltipProps, aO as Tour, aP as TourProps, aQ as TourStep, aR as Tree, aS as TreeDropPosition, aT as TreeKey, aU as TreeNode, aV as TreeProps, aW as Typography, aX as TypographyLinkProps, aY as TypographyProps, aZ as TypographyTitleProps, a_ as TypographyType, a$ as Upload, b0 as UploadChangeInfo, b1 as UploadDraggerProps, b2 as UploadFile, b3 as UploadFileStatus, b4 as UploadHttpRequest, b5 as UploadItemActions, b6 as UploadProps, b7 as UploadRef, b8 as UploadRejectInfo, b9 as UploadRequestHandle, ba as UploadRequestOptions, bb as Watermark, bc as WatermarkFont, bd as WatermarkProps, be as message, bf as notification } from './core-
|
|
3
|
+
import { T as TagStatus, B as BadgeProps } from './core-lZIzt-an.cjs';
|
|
4
|
+
export { a as Badge, b as BadgeRibbonProps, c as BadgeStatus, d as Breadcrumb, e as BreadcrumbItem, f as BreadcrumbProps, C as Calendar, g as CalendarProps, h as Card, i as CardAccent, j as CardProps, k as Carousel, l as CarouselProps, m as CarouselRef, n as Collapse, o as CollapseItem, p as CollapseKey, q as CollapseProps, D as Dropdown, r as DropdownButtonProps, s as DropdownMenuProps, t as DropdownOpenSource, u as DropdownPlacement, v as DropdownProps, w as DropdownTrigger, F as FILLED_ICON_NAMES, x as FilledIconName, y as FloatButton, z as FloatButtonBackTopProps, A as FloatButtonGroupProps, E as FloatButtonProps, G as FloatButtonShape, H as FloatingPlacement, I as FloatingTrigger, J as ICON_NAMES, K as Icon, L as IconName, M as IconProps, N as IconVariant, O as Image, P as ImagePreview, Q as ImagePreviewConfig, R as ImagePreviewGroup, S as ImagePreviewGroupProps, U as ImagePreviewProps, V as ImageProps, W as Input, X as InputProps, Y as Menu, Z as MenuClickInfo, _ as MenuItem, $ as MenuMode, a0 as MenuProps, a1 as MenuTheme, a2 as MessageConfig, a3 as MessageHandle, a4 as MessageKey, a5 as MessageType, a6 as NotificationConfig, a7 as NotificationPlacement, a8 as NotificationType, a9 as Popconfirm, aa as PopconfirmProps, ab as Popover, ac as PopoverProps, ad as Progress, ae as ProgressProps, af as ProgressStatus, ag as Rate, ah as RateProps, ai as Result, aj as ResultProps, ak as ResultStatus, al as Segmented, am as SegmentedOption, an as SegmentedProps, ao as SegmentedValue, ap as Spin, aq as SpinProps, ar as StepItem, as as StepStatus, at as Steps, au as StepsProps, av as TabItem, aw as Tabs, ax as TabsContextMenuClickInfo, ay as TabsOrientation, az as TabsPosition, aA as TabsProps, aB as TabsType, aC as Tag, aD as TagProps, aE as TagSize, aF as TagVariant, aG as Timeline, aH as TimelineItem, aI as TimelineProps, aJ as Toolbar, aK as ToolbarItem, aL as ToolbarProps, aM as Tooltip, aN as TooltipProps, aO as Tour, aP as TourProps, aQ as TourStep, aR as Tree, aS as TreeDropPosition, aT as TreeKey, aU as TreeNode, aV as TreeProps, aW as Typography, aX as TypographyLinkProps, aY as TypographyProps, aZ as TypographyTitleProps, a_ as TypographyType, a$ as Upload, b0 as UploadChangeInfo, b1 as UploadDraggerProps, b2 as UploadFile, b3 as UploadFileStatus, b4 as UploadHttpRequest, b5 as UploadItemActions, b6 as UploadProps, b7 as UploadRef, b8 as UploadRejectInfo, b9 as UploadRequestHandle, ba as UploadRequestOptions, bb as Watermark, bc as WatermarkFont, bd as WatermarkProps, be as message, bf as notification } from './core-lZIzt-an.cjs';
|
|
5
5
|
import { C as ControlSize, I as InputPlaceholderMode, a as ControlStatus } from './shared-Bx4B28Wh.cjs';
|
|
6
6
|
import { B as ButtonProps, a as ButtonSize } from './Button-O_pNB3SQ.cjs';
|
|
7
7
|
export { b as Button, c as ButtonVariant } from './Button-O_pNB3SQ.cjs';
|
|
@@ -2361,6 +2361,11 @@ interface TableRef<T> {
|
|
|
2361
2361
|
scrollTo: (options: ScrollToOptions) => void;
|
|
2362
2362
|
/** 按 rowKey 定位当前筛选、排序、分页及树展开后列表中的行,仅在该行被遮挡时立即纵向滚动,使其避开吸顶表头和合计行;支持虚拟列表,不改变横向位置或焦点。返回是否找到目标且视口可见;目标被筛掉、位于其他页、表格隐藏或未挂载时返回 false,不自动切页。应在数据提交和弹框显示后调用。 */
|
|
2363
2363
|
scrollToRow: (key: TableKey) => boolean;
|
|
2364
|
+
/** 按稳定行键和叶子列键定位单元格,横纵滚动避开吸顶表头、固定列及合计行,选中并聚焦但不进入编辑。等待虚拟行挂载、位置稳定且整格在可视区后返回成功,再由顶层浮层沿边框顺时针播放一圈红色流光渐隐(绕行约 900 毫秒,随后 200 毫秒消失);不拦截操作,减少动态效果时仅红框淡出。隐藏列、其它页、无法完整显示的单元格、不可见表格或被后续定位取代时返回 false,不自动切页或显示隐藏列。应在数据更新及弹框关闭动画完成后调用;再次定位、目标滚出可视区或卸载会清理动效。 */
|
|
2365
|
+
focusCell: (rowKey: TableKey, columnKey: string, options?: {
|
|
2366
|
+
/** 是否在目标可见后播放一圈红色边框流光渐隐,默认 true;false 仅滚动、选中和聚焦。 */
|
|
2367
|
+
highlight?: boolean;
|
|
2368
|
+
}) => Promise<boolean>;
|
|
2364
2369
|
/** 切换加载状态。 */
|
|
2365
2370
|
setLoading: (loading: boolean) => void;
|
|
2366
2371
|
/** 读取当前分页状态。 */
|
|
@@ -3089,6 +3094,7 @@ interface WorksheetState {
|
|
|
3089
3094
|
* 与 Table 默认单元格选择配合,勿再同时安装 createEditablePlugin;使用稳定 rowKey。
|
|
3090
3095
|
* 每个表格用 useMemo 创建独立实例,onChange 必须同步更新不可变 dataSource;外部换表自动清空历史。
|
|
3091
3096
|
* 输入框中的原生复制、粘贴和撤销保留;快捷键只在当前工作表内生效,不发送网络请求。
|
|
3097
|
+
* 填充柄仅在选区右下角单元格可编辑时显示,遵循 editable 与 editable.canEdit;只读格仍可选中和复制。
|
|
3092
3098
|
*/
|
|
3093
3099
|
declare function createWorksheetPlugin<T extends Record<string, unknown>>(options: TableWorksheetPluginOptions<T>): TablePlugin<T, WorksheetState, TableWorksheetApi<T>>;
|
|
3094
3100
|
|
|
@@ -3122,7 +3128,7 @@ interface FloatingScrollbarProviderProps {
|
|
|
3122
3128
|
/** 仅接管指定容器;不传时接管页面中的滚动容器。 */
|
|
3123
3129
|
targetRef?: RefObject<HTMLElement | null>;
|
|
3124
3130
|
}
|
|
3125
|
-
/**
|
|
3131
|
+
/** 为页面或指定容器接入浮动滚动条;悬停、滚动或拖动时显示,离开且停止交互后隐藏,不占用布局宽度。轨道保留滚动容器的交互归属,供菜单判断内部操作;布局变化重新发现容器,定尺寸脱离文档流元素的定位变化仅复核相关子树与祖先。 */
|
|
3126
3132
|
declare function FloatingScrollbarProvider({ disabled, targetRef }: FloatingScrollbarProviderProps): null;
|
|
3127
3133
|
|
|
3128
3134
|
/** SiaTheme的模式类型。 */
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { HTMLAttributes, ReactNode, CSSProperties, ElementType, FormHTMLAttributes, InputHTMLAttributes, ChangeEvent, TextareaHTMLAttributes, MouseEvent, Key, PointerEvent, Ref, ReactElement, ButtonHTMLAttributes, RefObject } from 'react';
|
|
3
|
-
import { T as TagStatus, B as BadgeProps } from './core-
|
|
4
|
-
export { a as Badge, b as BadgeRibbonProps, c as BadgeStatus, d as Breadcrumb, e as BreadcrumbItem, f as BreadcrumbProps, C as Calendar, g as CalendarProps, h as Card, i as CardAccent, j as CardProps, k as Carousel, l as CarouselProps, m as CarouselRef, n as Collapse, o as CollapseItem, p as CollapseKey, q as CollapseProps, D as Dropdown, r as DropdownButtonProps, s as DropdownMenuProps, t as DropdownOpenSource, u as DropdownPlacement, v as DropdownProps, w as DropdownTrigger, F as FILLED_ICON_NAMES, x as FilledIconName, y as FloatButton, z as FloatButtonBackTopProps, A as FloatButtonGroupProps, E as FloatButtonProps, G as FloatButtonShape, H as FloatingPlacement, I as FloatingTrigger, J as ICON_NAMES, K as Icon, L as IconName, M as IconProps, N as IconVariant, O as Image, P as ImagePreview, Q as ImagePreviewConfig, R as ImagePreviewGroup, S as ImagePreviewGroupProps, U as ImagePreviewProps, V as ImageProps, W as Input, X as InputProps, Y as Menu, Z as MenuClickInfo, _ as MenuItem, $ as MenuMode, a0 as MenuProps, a1 as MenuTheme, a2 as MessageConfig, a3 as MessageHandle, a4 as MessageKey, a5 as MessageType, a6 as NotificationConfig, a7 as NotificationPlacement, a8 as NotificationType, a9 as Popconfirm, aa as PopconfirmProps, ab as Popover, ac as PopoverProps, ad as Progress, ae as ProgressProps, af as ProgressStatus, ag as Rate, ah as RateProps, ai as Result, aj as ResultProps, ak as ResultStatus, al as Segmented, am as SegmentedOption, an as SegmentedProps, ao as SegmentedValue, ap as Spin, aq as SpinProps, ar as StepItem, as as StepStatus, at as Steps, au as StepsProps, av as TabItem, aw as Tabs, ax as TabsContextMenuClickInfo, ay as TabsOrientation, az as TabsPosition, aA as TabsProps, aB as TabsType, aC as Tag, aD as TagProps, aE as TagSize, aF as TagVariant, aG as Timeline, aH as TimelineItem, aI as TimelineProps, aJ as Toolbar, aK as ToolbarItem, aL as ToolbarProps, aM as Tooltip, aN as TooltipProps, aO as Tour, aP as TourProps, aQ as TourStep, aR as Tree, aS as TreeDropPosition, aT as TreeKey, aU as TreeNode, aV as TreeProps, aW as Typography, aX as TypographyLinkProps, aY as TypographyProps, aZ as TypographyTitleProps, a_ as TypographyType, a$ as Upload, b0 as UploadChangeInfo, b1 as UploadDraggerProps, b2 as UploadFile, b3 as UploadFileStatus, b4 as UploadHttpRequest, b5 as UploadItemActions, b6 as UploadProps, b7 as UploadRef, b8 as UploadRejectInfo, b9 as UploadRequestHandle, ba as UploadRequestOptions, bb as Watermark, bc as WatermarkFont, bd as WatermarkProps, be as message, bf as notification } from './core-
|
|
3
|
+
import { T as TagStatus, B as BadgeProps } from './core-Bkk7-59o.js';
|
|
4
|
+
export { a as Badge, b as BadgeRibbonProps, c as BadgeStatus, d as Breadcrumb, e as BreadcrumbItem, f as BreadcrumbProps, C as Calendar, g as CalendarProps, h as Card, i as CardAccent, j as CardProps, k as Carousel, l as CarouselProps, m as CarouselRef, n as Collapse, o as CollapseItem, p as CollapseKey, q as CollapseProps, D as Dropdown, r as DropdownButtonProps, s as DropdownMenuProps, t as DropdownOpenSource, u as DropdownPlacement, v as DropdownProps, w as DropdownTrigger, F as FILLED_ICON_NAMES, x as FilledIconName, y as FloatButton, z as FloatButtonBackTopProps, A as FloatButtonGroupProps, E as FloatButtonProps, G as FloatButtonShape, H as FloatingPlacement, I as FloatingTrigger, J as ICON_NAMES, K as Icon, L as IconName, M as IconProps, N as IconVariant, O as Image, P as ImagePreview, Q as ImagePreviewConfig, R as ImagePreviewGroup, S as ImagePreviewGroupProps, U as ImagePreviewProps, V as ImageProps, W as Input, X as InputProps, Y as Menu, Z as MenuClickInfo, _ as MenuItem, $ as MenuMode, a0 as MenuProps, a1 as MenuTheme, a2 as MessageConfig, a3 as MessageHandle, a4 as MessageKey, a5 as MessageType, a6 as NotificationConfig, a7 as NotificationPlacement, a8 as NotificationType, a9 as Popconfirm, aa as PopconfirmProps, ab as Popover, ac as PopoverProps, ad as Progress, ae as ProgressProps, af as ProgressStatus, ag as Rate, ah as RateProps, ai as Result, aj as ResultProps, ak as ResultStatus, al as Segmented, am as SegmentedOption, an as SegmentedProps, ao as SegmentedValue, ap as Spin, aq as SpinProps, ar as StepItem, as as StepStatus, at as Steps, au as StepsProps, av as TabItem, aw as Tabs, ax as TabsContextMenuClickInfo, ay as TabsOrientation, az as TabsPosition, aA as TabsProps, aB as TabsType, aC as Tag, aD as TagProps, aE as TagSize, aF as TagVariant, aG as Timeline, aH as TimelineItem, aI as TimelineProps, aJ as Toolbar, aK as ToolbarItem, aL as ToolbarProps, aM as Tooltip, aN as TooltipProps, aO as Tour, aP as TourProps, aQ as TourStep, aR as Tree, aS as TreeDropPosition, aT as TreeKey, aU as TreeNode, aV as TreeProps, aW as Typography, aX as TypographyLinkProps, aY as TypographyProps, aZ as TypographyTitleProps, a_ as TypographyType, a$ as Upload, b0 as UploadChangeInfo, b1 as UploadDraggerProps, b2 as UploadFile, b3 as UploadFileStatus, b4 as UploadHttpRequest, b5 as UploadItemActions, b6 as UploadProps, b7 as UploadRef, b8 as UploadRejectInfo, b9 as UploadRequestHandle, ba as UploadRequestOptions, bb as Watermark, bc as WatermarkFont, bd as WatermarkProps, be as message, bf as notification } from './core-Bkk7-59o.js';
|
|
5
5
|
import { C as ControlSize, I as InputPlaceholderMode, a as ControlStatus } from './shared-Bx4B28Wh.js';
|
|
6
6
|
import { B as ButtonProps, a as ButtonSize } from './Button-BiL3Wjsd.js';
|
|
7
7
|
export { b as Button, c as ButtonVariant } from './Button-BiL3Wjsd.js';
|
|
@@ -2361,6 +2361,11 @@ interface TableRef<T> {
|
|
|
2361
2361
|
scrollTo: (options: ScrollToOptions) => void;
|
|
2362
2362
|
/** 按 rowKey 定位当前筛选、排序、分页及树展开后列表中的行,仅在该行被遮挡时立即纵向滚动,使其避开吸顶表头和合计行;支持虚拟列表,不改变横向位置或焦点。返回是否找到目标且视口可见;目标被筛掉、位于其他页、表格隐藏或未挂载时返回 false,不自动切页。应在数据提交和弹框显示后调用。 */
|
|
2363
2363
|
scrollToRow: (key: TableKey) => boolean;
|
|
2364
|
+
/** 按稳定行键和叶子列键定位单元格,横纵滚动避开吸顶表头、固定列及合计行,选中并聚焦但不进入编辑。等待虚拟行挂载、位置稳定且整格在可视区后返回成功,再由顶层浮层沿边框顺时针播放一圈红色流光渐隐(绕行约 900 毫秒,随后 200 毫秒消失);不拦截操作,减少动态效果时仅红框淡出。隐藏列、其它页、无法完整显示的单元格、不可见表格或被后续定位取代时返回 false,不自动切页或显示隐藏列。应在数据更新及弹框关闭动画完成后调用;再次定位、目标滚出可视区或卸载会清理动效。 */
|
|
2365
|
+
focusCell: (rowKey: TableKey, columnKey: string, options?: {
|
|
2366
|
+
/** 是否在目标可见后播放一圈红色边框流光渐隐,默认 true;false 仅滚动、选中和聚焦。 */
|
|
2367
|
+
highlight?: boolean;
|
|
2368
|
+
}) => Promise<boolean>;
|
|
2364
2369
|
/** 切换加载状态。 */
|
|
2365
2370
|
setLoading: (loading: boolean) => void;
|
|
2366
2371
|
/** 读取当前分页状态。 */
|
|
@@ -3089,6 +3094,7 @@ interface WorksheetState {
|
|
|
3089
3094
|
* 与 Table 默认单元格选择配合,勿再同时安装 createEditablePlugin;使用稳定 rowKey。
|
|
3090
3095
|
* 每个表格用 useMemo 创建独立实例,onChange 必须同步更新不可变 dataSource;外部换表自动清空历史。
|
|
3091
3096
|
* 输入框中的原生复制、粘贴和撤销保留;快捷键只在当前工作表内生效,不发送网络请求。
|
|
3097
|
+
* 填充柄仅在选区右下角单元格可编辑时显示,遵循 editable 与 editable.canEdit;只读格仍可选中和复制。
|
|
3092
3098
|
*/
|
|
3093
3099
|
declare function createWorksheetPlugin<T extends Record<string, unknown>>(options: TableWorksheetPluginOptions<T>): TablePlugin<T, WorksheetState, TableWorksheetApi<T>>;
|
|
3094
3100
|
|
|
@@ -3122,7 +3128,7 @@ interface FloatingScrollbarProviderProps {
|
|
|
3122
3128
|
/** 仅接管指定容器;不传时接管页面中的滚动容器。 */
|
|
3123
3129
|
targetRef?: RefObject<HTMLElement | null>;
|
|
3124
3130
|
}
|
|
3125
|
-
/**
|
|
3131
|
+
/** 为页面或指定容器接入浮动滚动条;悬停、滚动或拖动时显示,离开且停止交互后隐藏,不占用布局宽度。轨道保留滚动容器的交互归属,供菜单判断内部操作;布局变化重新发现容器,定尺寸脱离文档流元素的定位变化仅复核相关子树与祖先。 */
|
|
3126
3132
|
declare function FloatingScrollbarProvider({ disabled, targetRef }: FloatingScrollbarProviderProps): null;
|
|
3127
3133
|
|
|
3128
3134
|
/** SiaTheme的模式类型。 */
|