@elaraai/e3-ui-components 1.0.72 → 1.0.73
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/README.md +1 -1
- package/dist/components/PagedDatasetPreview.d.ts +4 -3
- package/dist/components/PagedDatasetPreview.d.ts.map +1 -1
- package/dist/index.cjs +1 -11
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1 -11
- package/dist/index.js.map +1 -1
- package/package.json +13 -13
package/dist/index.js
CHANGED
|
@@ -32,7 +32,7 @@ import { Box, Flex, Text, HStack, Input, useSlotRecipe, useRecipe, VStack, useTo
|
|
|
32
32
|
import { implementUIComponent, getSomeorUndefined, formatPredicate, SliceEditPopover, SlicePredicateBuilder, EastChakraSelect, EastChakraStringInput, EastChakraDateTimeInput, EastChakraFloatInput, EastChakraIntegerInput, formatTick, useSliceReactivity, useContainerBelow, usePersistedState, SliceRailCluster, EastChakraComponent, ClauseChip, StateImpl, NavImpl, SliceImpl, SliceApplyImpl, OverlayImpl, ClipboardImpl, DownloadImpl, ShareImpl, LoadingIcon, DatasetKeySearch, EastChakraValueTree, keyRangePredicates, createUIStore, UIStoreProvider } from "@elaraai/east-ui-components";
|
|
33
33
|
import { DatasetKeySearch as DatasetKeySearch2 } from "@elaraai/east-ui-components";
|
|
34
34
|
import { createPortal } from "react-dom";
|
|
35
|
-
import { sliceMatches } from "@elaraai/east-ui/internal";
|
|
35
|
+
import { sliceMatches, pruneRetainedPages } from "@elaraai/east-ui/internal";
|
|
36
36
|
import { QueryClient as QueryClient$1, QueryClientProvider, useMutation, useQuery, keepPreviousData, useQueryClient } from "@tanstack/react-query";
|
|
37
37
|
import { useVirtualizer } from "@tanstack/react-virtual";
|
|
38
38
|
var Subscribable = class {
|
|
@@ -64411,16 +64411,6 @@ function pagingDebug(...args) {
|
|
|
64411
64411
|
}
|
|
64412
64412
|
const PAGE_SIZE = 500;
|
|
64413
64413
|
const MAX_RETAINED_PAGES = 8;
|
|
64414
|
-
function pruneRetainedPages(pages, firstPage, lastPage, max5) {
|
|
64415
|
-
if (pages.size <= max5) return pages;
|
|
64416
|
-
const distance2 = (p2) => p2 < firstPage ? firstPage - p2 : p2 > lastPage ? p2 - lastPage : 0;
|
|
64417
|
-
const keep = [...pages.keys()].sort((a2, b2) => distance2(a2) - distance2(b2) || a2 - b2).slice(0, max5);
|
|
64418
|
-
const kept = /* @__PURE__ */ new Map();
|
|
64419
|
-
for (const p2 of keep.sort((a2, b2) => a2 - b2)) {
|
|
64420
|
-
kept.set(p2, pages.get(p2));
|
|
64421
|
-
}
|
|
64422
|
-
return kept;
|
|
64423
|
-
}
|
|
64424
64414
|
function pageRows(type, decoded, offset) {
|
|
64425
64415
|
if (type.type === "Array") {
|
|
64426
64416
|
const elemType2 = type.value;
|