najm-kit 2.2.4 → 2.2.5
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.mjs +32 -4
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -12127,7 +12127,24 @@ var computeFlags = (state) => {
|
|
|
12127
12127
|
const hasControls = Boolean(state.showColumnVisibility || state.showAddButton || state.showViewToggle);
|
|
12128
12128
|
const isRefreshing = Boolean(state.isLoading) && hasData;
|
|
12129
12129
|
const showContent = !state.error && !hasNoData && !isFilteredEmpty && (!state.isLoading || hasData);
|
|
12130
|
-
return {
|
|
12130
|
+
return {
|
|
12131
|
+
hasData,
|
|
12132
|
+
hasNoData,
|
|
12133
|
+
isTableView,
|
|
12134
|
+
isCardView,
|
|
12135
|
+
isJsonView,
|
|
12136
|
+
isFilesView,
|
|
12137
|
+
isCustomMode,
|
|
12138
|
+
hasActions,
|
|
12139
|
+
hasControls,
|
|
12140
|
+
isRefreshing,
|
|
12141
|
+
showContent,
|
|
12142
|
+
// Rendered during a first load too, so the bar occupies its height while
|
|
12143
|
+
// the skeleton is up. Without it the body is one bar taller than it will be
|
|
12144
|
+
// once rows arrive, the measured page size is one row too many, and that
|
|
12145
|
+
// row is visibly removed the moment the table loads.
|
|
12146
|
+
showPagination: state.showPagination && (showContent || Boolean(state.isLoading))
|
|
12147
|
+
};
|
|
12131
12148
|
};
|
|
12132
12149
|
var createSelectors = (_store) => {
|
|
12133
12150
|
const store = _store;
|
|
@@ -13842,7 +13859,7 @@ function CardLoadMorePagination({
|
|
|
13842
13859
|
function NTablePagination() {
|
|
13843
13860
|
const table = useTableStore.use.table();
|
|
13844
13861
|
const showPagination = useTableStore.use.showPagination();
|
|
13845
|
-
|
|
13862
|
+
useTableStore.use.showContent();
|
|
13846
13863
|
const pageSizeOptions = useTableStore.use.pageSizeOptions();
|
|
13847
13864
|
const classNames = useTableStore.use.classNames();
|
|
13848
13865
|
const effectiveViewMode = useTableStore.use.effectiveViewMode();
|
|
@@ -13855,7 +13872,7 @@ function NTablePagination() {
|
|
|
13855
13872
|
const setPagination = useTableStore.use.setPagination();
|
|
13856
13873
|
const isPaginationControlled = useTableStore.use.isPaginationControlled();
|
|
13857
13874
|
const bordered = useTableStore.use.bordered();
|
|
13858
|
-
if (!table || !
|
|
13875
|
+
if (!table || !showPagination || effectiveViewMode === "json" || effectiveViewMode === "files") return null;
|
|
13859
13876
|
if (cardPagination.mode === "all") return null;
|
|
13860
13877
|
if (effectiveViewMode === "cards" && cardPagination.mode === "infinite") return null;
|
|
13861
13878
|
if (effectiveViewMode === "cards" && cardPagination.mode === "load-more") {
|
|
@@ -14336,7 +14353,18 @@ function TableLayout(props) {
|
|
|
14336
14353
|
] })
|
|
14337
14354
|
}
|
|
14338
14355
|
),
|
|
14339
|
-
/* @__PURE__ */ jsx(
|
|
14356
|
+
/* @__PURE__ */ jsx(
|
|
14357
|
+
"div",
|
|
14358
|
+
{
|
|
14359
|
+
"data-ntable-pagination": true,
|
|
14360
|
+
"aria-hidden": isLoading && !isRefreshing ? "true" : void 0,
|
|
14361
|
+
className: cn(
|
|
14362
|
+
"min-w-0 shrink-0 bg-background text-foreground",
|
|
14363
|
+
isLoading && !isRefreshing && "invisible"
|
|
14364
|
+
),
|
|
14365
|
+
children: /* @__PURE__ */ jsx(NTablePagination, {})
|
|
14366
|
+
}
|
|
14367
|
+
)
|
|
14340
14368
|
] });
|
|
14341
14369
|
}
|
|
14342
14370
|
function NTable(props) {
|