@livetiles/reach-plugin-types 0.4.0-preview.838 → 0.4.0-preview.840
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/lib/index.d.ts +57 -28
- package/package.json +1 -1
package/lib/index.d.ts
CHANGED
|
@@ -4433,26 +4433,44 @@ declare module "libs/reach/ui/common/src/common/paging/HorizontalPager" {
|
|
|
4433
4433
|
}
|
|
4434
4434
|
export const HorizontalPager: FC<Props>;
|
|
4435
4435
|
}
|
|
4436
|
-
declare module "libs/reach/ui/common/src/common/paging/
|
|
4436
|
+
declare module "libs/reach/ui/common/src/common/paging/PaginationStatus" {
|
|
4437
4437
|
import { FC } from 'react';
|
|
4438
|
-
|
|
4439
|
-
|
|
4440
|
-
|
|
4441
|
-
|
|
4442
|
-
|
|
4443
|
-
|
|
4444
|
-
|
|
4445
|
-
|
|
4446
|
-
export
|
|
4438
|
+
export const PaginationStatus: FC<{
|
|
4439
|
+
allLoadedResourceId: string;
|
|
4440
|
+
showAllLoaded: boolean;
|
|
4441
|
+
showSpinner?: boolean;
|
|
4442
|
+
showPlaceholder?: boolean;
|
|
4443
|
+
}>;
|
|
4444
|
+
}
|
|
4445
|
+
declare module "libs/reach/ui/common/src/common/paging/usePaginatedItems" {
|
|
4446
|
+
export type TokenType = string | number;
|
|
4447
|
+
export function usePaginatedItems<TItem extends {
|
|
4448
|
+
id?: string;
|
|
4449
|
+
}, TTokenType extends TokenType>(pageSize: number): {
|
|
4450
|
+
state: {
|
|
4451
|
+
pages: {
|
|
4452
|
+
[pageIndex: string]: TItem[];
|
|
4453
|
+
};
|
|
4454
|
+
paginationToken?: TTokenType;
|
|
4455
|
+
hasNextPage: boolean;
|
|
4456
|
+
};
|
|
4457
|
+
setInitialPages: (firstPageItems: TItem[], paginationToken: TTokenType, hasNextPage: boolean) => void;
|
|
4458
|
+
updatePageItems: (pageKey: TTokenType, pageItems: TItem[], paginationToken: TTokenType, hasNextPage: boolean) => void;
|
|
4459
|
+
lastFetchedPageIndex: number;
|
|
4460
|
+
updateLastFetchedPageIndex: (numberOfPages?: number) => void;
|
|
4461
|
+
updateItem: (id: string, newItem: TItem) => void;
|
|
4462
|
+
insertToTheFront: (newItem: TItem) => void;
|
|
4463
|
+
};
|
|
4447
4464
|
}
|
|
4448
4465
|
declare module "libs/reach/ui/common/src/common/paging/useItemLoaderWithPreFetch" {
|
|
4449
4466
|
import { DependencyList } from 'react';
|
|
4450
4467
|
import { PaginatedList } from "libs/reach/util/common/src/index";
|
|
4451
|
-
|
|
4468
|
+
import { TokenType } from "libs/reach/ui/common/src/common/paging/usePaginatedItems";
|
|
4469
|
+
export interface ItemLoader<TItem, TTokenType extends TokenType> {
|
|
4452
4470
|
(pageSize: number, token?: TTokenType): Promise<PaginatedList<TItem>>;
|
|
4453
4471
|
}
|
|
4454
|
-
export function useItemLoaderWithPreFetch<TItem, TTokenType>(pageSize: number, handler: ItemLoader<TItem, TTokenType>, deps?: DependencyList): {
|
|
4455
|
-
items:
|
|
4472
|
+
export function useItemLoaderWithPreFetch<TItem, TTokenType extends TokenType>(pageSize: number, handler: ItemLoader<TItem, TTokenType>, deps?: DependencyList): {
|
|
4473
|
+
items: TItem[];
|
|
4456
4474
|
isInitialLoading: boolean;
|
|
4457
4475
|
isLoadingNextPage: boolean;
|
|
4458
4476
|
error: any;
|
|
@@ -4462,23 +4480,36 @@ declare module "libs/reach/ui/common/src/common/paging/useItemLoaderWithPreFetch
|
|
|
4462
4480
|
isFirstPage: boolean;
|
|
4463
4481
|
isLastPage: boolean;
|
|
4464
4482
|
isEmpty: boolean;
|
|
4483
|
+
insertToTheFront: (newItem: TItem) => void;
|
|
4484
|
+
updateItem: (id: string, newItem: TItem) => void;
|
|
4465
4485
|
};
|
|
4466
4486
|
}
|
|
4467
|
-
declare module "libs/reach/ui/common/src/common/paging/PaginationStatus" {
|
|
4468
|
-
import { FC } from 'react';
|
|
4469
|
-
export const PaginationStatus: FC<{
|
|
4470
|
-
allLoadedResourceId: string;
|
|
4471
|
-
showAllLoaded: boolean;
|
|
4472
|
-
showSpinner?: boolean;
|
|
4473
|
-
showPlaceholder?: boolean;
|
|
4474
|
-
}>;
|
|
4475
|
-
}
|
|
4476
4487
|
declare module "libs/reach/ui/common/src/common/paging/usePageScrollPagination" {
|
|
4477
4488
|
import { DependencyList } from 'react';
|
|
4478
4489
|
export function usePageScrollPagination(loadMoreItems: () => Promise<void>, allItemsLoaded?: boolean, additionalDeps?: DependencyList): {
|
|
4479
4490
|
isLoadingMore: boolean;
|
|
4480
4491
|
};
|
|
4481
4492
|
}
|
|
4493
|
+
declare module "libs/reach/ui/common/src/common/paging/VerticalPager" {
|
|
4494
|
+
import { FC } from 'react';
|
|
4495
|
+
interface Props {
|
|
4496
|
+
onNextClick?: () => void;
|
|
4497
|
+
onPrevClick?: () => void;
|
|
4498
|
+
hidePagination?: boolean;
|
|
4499
|
+
disablePrevButton?: boolean;
|
|
4500
|
+
disableNextButton?: boolean;
|
|
4501
|
+
className?: string;
|
|
4502
|
+
}
|
|
4503
|
+
export const VerticalPager: FC<Props>;
|
|
4504
|
+
}
|
|
4505
|
+
declare module "libs/reach/ui/common/src/common/paging/index" {
|
|
4506
|
+
export * from "libs/reach/ui/common/src/common/paging/HorizontalPager";
|
|
4507
|
+
export * from "libs/reach/ui/common/src/common/paging/PaginationStatus";
|
|
4508
|
+
export * from "libs/reach/ui/common/src/common/paging/useItemLoaderWithPreFetch";
|
|
4509
|
+
export * from "libs/reach/ui/common/src/common/paging/usePageScrollPagination";
|
|
4510
|
+
export * from "libs/reach/ui/common/src/common/paging/usePaginatedItems";
|
|
4511
|
+
export * from "libs/reach/ui/common/src/common/paging/VerticalPager";
|
|
4512
|
+
}
|
|
4482
4513
|
declare module "libs/reach/ui/common/src/common/pull-to-refresh/PullToRefresh" {
|
|
4483
4514
|
import { FC, ReactNode } from 'react';
|
|
4484
4515
|
export const PullToRefreshContext: import("react").Context<{
|
|
@@ -4809,11 +4840,7 @@ declare module "libs/reach/ui/common/src/common/index" {
|
|
|
4809
4840
|
export * from "libs/reach/ui/common/src/common/isNullOrWhitespaceUtil";
|
|
4810
4841
|
export * from "libs/reach/ui/common/src/common/list-view/ListViewNavigation";
|
|
4811
4842
|
export * from "libs/reach/ui/common/src/common/locals-util";
|
|
4812
|
-
export * from "libs/reach/ui/common/src/common/paging/
|
|
4813
|
-
export * from "libs/reach/ui/common/src/common/paging/VerticalPager";
|
|
4814
|
-
export * from "libs/reach/ui/common/src/common/paging/useItemLoaderWithPreFetch";
|
|
4815
|
-
export * from "libs/reach/ui/common/src/common/paging/PaginationStatus";
|
|
4816
|
-
export * from "libs/reach/ui/common/src/common/paging/usePageScrollPagination";
|
|
4843
|
+
export * from "libs/reach/ui/common/src/common/paging/index";
|
|
4817
4844
|
export * from "libs/reach/ui/common/src/common/pull-to-refresh/PullToRefresh";
|
|
4818
4845
|
export * from "libs/reach/ui/common/src/common/refreshScripts";
|
|
4819
4846
|
export * from "libs/reach/ui/common/src/common/toolbar/Toolbar";
|
|
@@ -8700,7 +8727,7 @@ declare module "libs/reach/feature/content/src/common/body/inline-page-list/useI
|
|
|
8700
8727
|
showPages: boolean;
|
|
8701
8728
|
showDocuments: boolean;
|
|
8702
8729
|
}, getAllItemsHandler: (id: string, pageType?: PageType) => Promise<PageItem[]>, deps?: DependencyList): {
|
|
8703
|
-
pageItems:
|
|
8730
|
+
pageItems: PageItem[];
|
|
8704
8731
|
pagingProps: {
|
|
8705
8732
|
hideNextButton: boolean;
|
|
8706
8733
|
isInitialLoading: boolean;
|
|
@@ -8712,6 +8739,8 @@ declare module "libs/reach/feature/content/src/common/body/inline-page-list/useI
|
|
|
8712
8739
|
isFirstPage: boolean;
|
|
8713
8740
|
isLastPage: boolean;
|
|
8714
8741
|
isEmpty: boolean;
|
|
8742
|
+
insertToTheFront: (newItem: PageItem) => void;
|
|
8743
|
+
updateItem: (id: string, newItem: PageItem) => void;
|
|
8715
8744
|
};
|
|
8716
8745
|
};
|
|
8717
8746
|
}
|