@underverse-ui/underverse 2.0.15 → 2.0.17
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/api-reference.json +1 -1
- package/dist/{chunk-WEGE3MZ5.js → chunk-23VKHYEB.js} +46 -16
- package/dist/chunk-23VKHYEB.js.map +1 -0
- package/dist/{chunk-D22TNGE5.js → chunk-HEXF4EOB.js} +2 -2
- package/dist/{chunk-NWVDNVLR.js → chunk-YM56RXIZ.js} +3 -3
- package/dist/index.cjs +58 -31
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +16 -19
- package/dist/index.js.map +1 -1
- package/dist/{menu-bar-YMEOEYJS.js → menu-bar-7MPCNTHR.js} +3 -3
- package/dist/ueditor.cjs +45 -15
- package/dist/ueditor.cjs.map +1 -1
- package/dist/ueditor.js +2 -2
- package/package.json +1 -1
- package/dist/chunk-WEGE3MZ5.js.map +0 -1
- /package/dist/{chunk-D22TNGE5.js.map → chunk-HEXF4EOB.js.map} +0 -0
- /package/dist/{chunk-NWVDNVLR.js.map → chunk-YM56RXIZ.js.map} +0 -0
- /package/dist/{menu-bar-YMEOEYJS.js.map → menu-bar-7MPCNTHR.js.map} +0 -0
package/dist/index.d.cts
CHANGED
|
@@ -2963,13 +2963,15 @@ interface DataTableProps<T> {
|
|
|
2963
2963
|
overscan?: number;
|
|
2964
2964
|
/** Alignment of the page navigation controls. Default: "right" */
|
|
2965
2965
|
paginationAlign?: DataTablePaginationAlign;
|
|
2966
|
+
/** Number of page buttons pinned at each end. Defaults to 3 below 14 pages, otherwise 5. */
|
|
2967
|
+
paginationRange?: number;
|
|
2966
2968
|
/** Double-click leaf headers to auto-fit column width based on visible content. Default: true */
|
|
2967
2969
|
enableHeaderAutoFit?: boolean;
|
|
2968
2970
|
labels?: DataTableLabels;
|
|
2969
2971
|
borderMode?: BorderMode;
|
|
2970
2972
|
}
|
|
2971
2973
|
|
|
2972
|
-
declare function DataTable<T extends Record<string, any>>({ columns, data, rowKey, loading, total, page, pageSize, pageSizeOptions, onQueryChange, caption, toolbar, showToolbar, size, enableColumnVisibilityToggle, enableDensityToggle, enableHeaderAlignToggle, uppercaseHeader, striped, columnDividers, className, storageKey, stickyHeader, maxHeight, horizontalMode, overflowHidden, useOverlayScrollbar, virtualizedRows, estimatedRowHeight, overscan, paginationAlign, enableHeaderAutoFit, labels, columnColorGroups, borderMode, }: DataTableProps<T>): react_jsx_runtime.JSX.Element;
|
|
2974
|
+
declare function DataTable<T extends Record<string, any>>({ columns, data, rowKey, loading, total, page, pageSize, pageSizeOptions, onQueryChange, caption, toolbar, showToolbar, size, enableColumnVisibilityToggle, enableDensityToggle, enableHeaderAlignToggle, uppercaseHeader, striped, columnDividers, className, storageKey, stickyHeader, maxHeight, horizontalMode, overflowHidden, useOverlayScrollbar, virtualizedRows, estimatedRowHeight, overscan, paginationAlign, paginationRange, enableHeaderAutoFit, labels, columnColorGroups, borderMode, }: DataTableProps<T>): react_jsx_runtime.JSX.Element;
|
|
2973
2975
|
|
|
2974
2976
|
/** Public props for the `Table` component. */
|
|
2975
2977
|
interface TableProps extends React__default.HTMLAttributes<HTMLTableElement> {
|
package/dist/index.d.ts
CHANGED
|
@@ -2963,13 +2963,15 @@ interface DataTableProps<T> {
|
|
|
2963
2963
|
overscan?: number;
|
|
2964
2964
|
/** Alignment of the page navigation controls. Default: "right" */
|
|
2965
2965
|
paginationAlign?: DataTablePaginationAlign;
|
|
2966
|
+
/** Number of page buttons pinned at each end. Defaults to 3 below 14 pages, otherwise 5. */
|
|
2967
|
+
paginationRange?: number;
|
|
2966
2968
|
/** Double-click leaf headers to auto-fit column width based on visible content. Default: true */
|
|
2967
2969
|
enableHeaderAutoFit?: boolean;
|
|
2968
2970
|
labels?: DataTableLabels;
|
|
2969
2971
|
borderMode?: BorderMode;
|
|
2970
2972
|
}
|
|
2971
2973
|
|
|
2972
|
-
declare function DataTable<T extends Record<string, any>>({ columns, data, rowKey, loading, total, page, pageSize, pageSizeOptions, onQueryChange, caption, toolbar, showToolbar, size, enableColumnVisibilityToggle, enableDensityToggle, enableHeaderAlignToggle, uppercaseHeader, striped, columnDividers, className, storageKey, stickyHeader, maxHeight, horizontalMode, overflowHidden, useOverlayScrollbar, virtualizedRows, estimatedRowHeight, overscan, paginationAlign, enableHeaderAutoFit, labels, columnColorGroups, borderMode, }: DataTableProps<T>): react_jsx_runtime.JSX.Element;
|
|
2974
|
+
declare function DataTable<T extends Record<string, any>>({ columns, data, rowKey, loading, total, page, pageSize, pageSizeOptions, onQueryChange, caption, toolbar, showToolbar, size, enableColumnVisibilityToggle, enableDensityToggle, enableHeaderAlignToggle, uppercaseHeader, striped, columnDividers, className, storageKey, stickyHeader, maxHeight, horizontalMode, overflowHidden, useOverlayScrollbar, virtualizedRows, estimatedRowHeight, overscan, paginationAlign, paginationRange, enableHeaderAutoFit, labels, columnColorGroups, borderMode, }: DataTableProps<T>): react_jsx_runtime.JSX.Element;
|
|
2973
2975
|
|
|
2974
2976
|
/** Public props for the `Table` component. */
|
|
2975
2977
|
interface TableProps extends React__default.HTMLAttributes<HTMLTableElement> {
|
package/dist/index.js
CHANGED
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
extractImageSrcsFromHtml,
|
|
5
5
|
normalizeImageUrl,
|
|
6
6
|
prepareUEditorContentForSave
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-YM56RXIZ.js";
|
|
8
8
|
import {
|
|
9
9
|
EmojiPicker_default
|
|
10
10
|
} from "./chunk-HTGAV4IG.js";
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
import "./chunk-4TYW5K4J.js";
|
|
17
17
|
import {
|
|
18
18
|
Modal_default
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-HEXF4EOB.js";
|
|
20
20
|
import {
|
|
21
21
|
DropdownMenuItem,
|
|
22
22
|
DropdownMenuSeparator,
|
|
@@ -31,7 +31,7 @@ import {
|
|
|
31
31
|
shadcnAnimationStyles,
|
|
32
32
|
useShadCNAnimations,
|
|
33
33
|
useUnderverseUIConfig
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-23VKHYEB.js";
|
|
35
35
|
import {
|
|
36
36
|
ForceInternalTranslationsProvider,
|
|
37
37
|
NextIntlAdapter,
|
|
@@ -22021,24 +22021,19 @@ function DataTablePagination({
|
|
|
22021
22021
|
pageSizeOptions,
|
|
22022
22022
|
setCurPageSize,
|
|
22023
22023
|
size,
|
|
22024
|
-
align
|
|
22024
|
+
align,
|
|
22025
|
+
paginationRange
|
|
22025
22026
|
}) {
|
|
22026
22027
|
const totalPages = Math.ceil(totalItems / curPageSize);
|
|
22027
22028
|
const pages = React51.useMemo(() => {
|
|
22028
|
-
const
|
|
22029
|
-
if (totalPages <=
|
|
22030
|
-
|
|
22031
|
-
|
|
22032
|
-
|
|
22033
|
-
|
|
22034
|
-
|
|
22035
|
-
|
|
22036
|
-
const end = Math.min(totalPages - 1, curPage + 1);
|
|
22037
|
-
for (let i = start; i <= end; i++) result.push(i);
|
|
22038
|
-
if (curPage < totalPages - 2) result.push("...");
|
|
22039
|
-
result.push(totalPages);
|
|
22040
|
-
return result;
|
|
22041
|
-
}, [curPage, totalPages]);
|
|
22029
|
+
const edgeCount = Math.max(1, Math.floor(paginationRange ?? (totalPages < 14 ? 3 : 5)));
|
|
22030
|
+
if (totalPages <= edgeCount * 2 + 3) return Array.from({ length: totalPages }, (_, index) => index + 1);
|
|
22031
|
+
const pageNumbers = /* @__PURE__ */ new Set();
|
|
22032
|
+
for (let page = 1; page <= edgeCount; page += 1) pageNumbers.add(page);
|
|
22033
|
+
for (let page = totalPages - edgeCount + 1; page <= totalPages; page += 1) pageNumbers.add(page);
|
|
22034
|
+
for (let page = Math.max(1, curPage - 1); page <= Math.min(totalPages, curPage + 1); page += 1) pageNumbers.add(page);
|
|
22035
|
+
return Array.from(pageNumbers).sort((a, b) => a - b).flatMap((page, index, sortedPages) => index > 0 && page - sortedPages[index - 1] > 1 ? ["...", page] : [page]);
|
|
22036
|
+
}, [curPage, paginationRange, totalPages]);
|
|
22042
22037
|
if (totalItems === 0) return null;
|
|
22043
22038
|
const controlButtonSize = size === "lg" ? "md" : "sm";
|
|
22044
22039
|
const navBtnClass = size === "sm" ? "h-6 w-6 p-0 rounded-full" : size === "lg" ? "h-8 w-8 p-0 rounded-full" : "h-7 w-7 p-0 rounded-full";
|
|
@@ -22822,6 +22817,7 @@ function DataTable({
|
|
|
22822
22817
|
estimatedRowHeight,
|
|
22823
22818
|
overscan = 8,
|
|
22824
22819
|
paginationAlign = "right",
|
|
22820
|
+
paginationRange,
|
|
22825
22821
|
enableHeaderAutoFit = true,
|
|
22826
22822
|
labels,
|
|
22827
22823
|
columnColorGroups,
|
|
@@ -23074,7 +23070,8 @@ function DataTable({
|
|
|
23074
23070
|
pageSizeOptions,
|
|
23075
23071
|
setCurPageSize,
|
|
23076
23072
|
size,
|
|
23077
|
-
align: paginationAlign
|
|
23073
|
+
align: paginationAlign,
|
|
23074
|
+
paginationRange
|
|
23078
23075
|
}
|
|
23079
23076
|
)
|
|
23080
23077
|
] });
|