1 | import { GRID_PROPERTY_TYPES } from "@egjs/grid";
|
2 | import { GROUP_TYPE } from "./consts";
|
3 | import { GroupManagerStatus } from "./GroupManager";
|
4 | import InfiniteGrid from "./InfiniteGrid";
|
5 | import { InfiniteGridItem, InfiniteGridItemStatus } from "./InfiniteGridItem";
|
6 | import { CategorizedGroup, InfiniteGridGroup, InfiniteGridInsertedItems, InfiniteGridItemInfo, RenderingOptions } from "./types";
|
7 | export declare function isWindow(el: Window | Element): el is Window;
|
8 | export declare function isNumber(val: any): val is number;
|
9 | export declare function isString(val: any): val is string;
|
10 | export declare function isObject(val: any): val is object;
|
11 | export declare function flat<T>(arr: T[][]): T[];
|
12 | export declare function splitOptions(options: Record<string, any>): {
|
13 | gridOptions: Record<string, any>;
|
14 | };
|
15 | export declare function splitGridOptions(options: Record<string, any>): {
|
16 | gridOptions: Record<string, any>;
|
17 | };
|
18 | export declare function categorize<Item extends InfiniteGridItemInfo = InfiniteGridItem>(items: Item[]): CategorizedGroup<Item>[];
|
19 | export declare function getNextCursors(prevKeys: Array<string | number>, nextKeys: Array<string | number>, prevStartCursor: number, prevEndCursor: number): {
|
20 | startCursor: number;
|
21 | endCursor: number;
|
22 | };
|
23 | export declare function splitVirtualGroups<Group extends {
|
24 | type: GROUP_TYPE;
|
25 | groupKey: string | number;
|
26 | }>(groups: Group[], direction: "start" | "end", nextGroups: CategorizedGroup<InfiniteGridItemStatus>[]): Group[];
|
27 | export declare function getFirstRenderingItems(nextItems: InfiniteGridItemStatus[], horizontal: boolean): InfiniteGridItem[];
|
28 | export declare function getRenderingItemsByStatus(groupManagerStatus: GroupManagerStatus, nextItems: InfiniteGridItemStatus[], usePlaceholder: boolean, horizontal: boolean): InfiniteGridItem[];
|
29 | export declare function mountRenderingItems(items: InfiniteGridItemInfo[], options: RenderingOptions): void;
|
30 | export declare function getRenderingItems(items: InfiniteGridItemInfo[], options: RenderingOptions): InfiniteGridItem[];
|
31 | export declare function InfiniteGridGetterSetter(component: {
|
32 | prototype: InfiniteGrid<any>;
|
33 | propertyTypes: typeof GRID_PROPERTY_TYPES;
|
34 | }): void;
|
35 | export declare function makeKey(registeredKeys: Record<string, any>): string;
|
36 | export declare function convertHTMLtoElement(html: string): HTMLElement[];
|
37 | export declare function convertInsertedItems(items: InfiniteGridInsertedItems, groupKey?: string | number): InfiniteGridItemInfo[];
|
38 | export declare function toArray(nodes: HTMLCollection): HTMLElement[];
|
39 | export declare function toArray<T>(nodes: {
|
40 | length: number;
|
41 | [key: number]: T;
|
42 | }): T[];
|
43 | export declare function findIndex<T>(arr: T[], callback: (value: T, index: number) => boolean): number;
|
44 | export declare function findLastIndex<T>(arr: T[], callback: (value: T, index: number) => boolean): number;
|
45 | export declare function getItemInfo(info: InfiniteGridItemInfo): InfiniteGridItemInfo;
|
46 | export declare function setPlaceholder(item: InfiniteGridItem, info: InfiniteGridItemStatus): void;
|
47 | export declare function isFlatOutline(start: number[], end: number[]): boolean;
|
48 | export declare function range(length: number): number[];
|
49 | export declare function flatGroups(groups: InfiniteGridGroup[]): InfiniteGridItem[];
|
50 | export declare function filterVirtuals<T extends InfiniteGridItem | InfiniteGridGroup>(items: T[], includePlaceholders?: boolean): T[];
|
51 |
|
52 |
|
53 |
|
54 |
|
55 |
|
56 |
|
57 |
|
58 |
|
59 |
|
60 |
|
61 |
|
62 |
|
63 |
|
64 |
|
65 | export declare const withInfiniteGridMethods: (prototype: any, memberName: string) => void;
|