@mittwald/flow-react-components 0.1.0-alpha.42 → 0.1.0-alpha.44

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.
Files changed (73) hide show
  1. package/dist/Avatar.js +14 -13
  2. package/dist/Heading.js +21 -15
  3. package/dist/IconChevronUp-_2GHUOdG.js +10 -0
  4. package/dist/IconPlus-D0cizRQb.js +10 -0
  5. package/dist/Icons.js +27 -26
  6. package/dist/InlineCode-CVs3jCiw.js +13 -0
  7. package/dist/InlineCode.js +3 -10
  8. package/dist/List/ListLoaderAsyncResource.js +8 -0
  9. package/dist/List.js +546 -0
  10. package/dist/NumberField.js +12 -11
  11. package/dist/styles.css +1 -1
  12. package/dist/types/components/Heading/stories/Default.stories.d.ts +1 -0
  13. package/dist/types/components/Heading/stories/EdgeCases.stories.d.ts +6 -0
  14. package/dist/types/components/List/List.d.ts +7 -0
  15. package/dist/types/components/List/List.test.d.ts +1 -0
  16. package/dist/types/components/List/components/DataLoader/DataLoader.d.ts +3 -0
  17. package/dist/types/components/List/components/DataLoader/components/SuspenseFallback/SuspenseFallback.d.ts +6 -0
  18. package/dist/types/components/List/components/DataLoader/components/SuspenseFallback/index.d.ts +3 -0
  19. package/dist/types/components/List/components/DataLoader/index.d.ts +3 -0
  20. package/dist/types/components/List/components/FilterBar/FilterBar.d.ts +6 -0
  21. package/dist/types/components/List/components/FilterBar/components/FilterPicker/FilterPicker.d.ts +2 -0
  22. package/dist/types/components/List/components/FilterBar/components/FilterPicker/index.d.ts +3 -0
  23. package/dist/types/components/List/components/FilterBar/components/FilterPickerItem/FilterPickerItem.d.ts +8 -0
  24. package/dist/types/components/List/components/FilterBar/components/FilterPickerItem/index.d.ts +3 -0
  25. package/dist/types/components/List/components/FilterBar/components/SortingPicker/SortingPicker.d.ts +2 -0
  26. package/dist/types/components/List/components/FilterBar/components/SortingPicker/index.d.ts +3 -0
  27. package/dist/types/components/List/components/FilterBar/components/SortingPickerItem/SortingPickerItem.d.ts +8 -0
  28. package/dist/types/components/List/components/FilterBar/components/SortingPickerItem/index.d.ts +3 -0
  29. package/dist/types/components/List/components/FilterBar/index.d.ts +3 -0
  30. package/dist/types/components/List/components/Item/FallbackRenderer.d.ts +7 -0
  31. package/dist/types/components/List/components/Item/Item.d.ts +5 -0
  32. package/dist/types/components/List/components/Item/index.d.ts +3 -0
  33. package/dist/types/components/List/components/Items/Items.d.ts +6 -0
  34. package/dist/types/components/List/components/Items/index.d.ts +3 -0
  35. package/dist/types/components/List/components/ListFilter.d.ts +5 -0
  36. package/dist/types/components/List/components/ListItemView.d.ts +6 -0
  37. package/dist/types/components/List/components/ListLoaderAsync.d.ts +6 -0
  38. package/dist/types/components/List/components/ListLoaderAsyncResource.d.ts +6 -0
  39. package/dist/types/components/List/components/ListSorting.d.ts +5 -0
  40. package/dist/types/components/List/components/ListStaticData.d.ts +5 -0
  41. package/dist/types/components/List/components/PaginationInfos/PaginationInfos.d.ts +4 -0
  42. package/dist/types/components/List/components/PaginationInfos/index.d.ts +3 -0
  43. package/dist/types/components/List/components/ShowMoreItemsButton/ShowMoreItemsButton.d.ts +4 -0
  44. package/dist/types/components/List/components/ShowMoreItemsButton/index.d.ts +3 -0
  45. package/dist/types/components/List/hooks/useList.d.ts +1 -0
  46. package/dist/types/components/List/index.d.ts +8 -0
  47. package/dist/types/components/List/listContext.d.ts +8 -0
  48. package/dist/types/components/List/model/List.d.ts +21 -0
  49. package/dist/types/components/List/model/ReactTable.d.ts +17 -0
  50. package/dist/types/components/List/model/filter/Filter.d.ts +26 -0
  51. package/dist/types/components/List/model/filter/types.d.ts +9 -0
  52. package/dist/types/components/List/model/item/Item.d.ts +14 -0
  53. package/dist/types/components/List/model/item/ItemCollection.d.ts +8 -0
  54. package/dist/types/components/List/model/item/types.d.ts +5 -0
  55. package/dist/types/components/List/model/loading/IncrementalLoader.d.ts +23 -0
  56. package/dist/types/components/List/model/loading/types.d.ts +43 -0
  57. package/dist/types/components/List/model/pagination/Pagination.d.ts +16 -0
  58. package/dist/types/components/List/model/pagination/types.d.ts +3 -0
  59. package/dist/types/components/List/model/sorting/Sorting.d.ts +12 -0
  60. package/dist/types/components/List/model/sorting/types.d.ts +4 -0
  61. package/dist/types/components/List/model/types.d.ts +14 -0
  62. package/dist/types/components/List/stories/Default.stories.d.ts +6 -0
  63. package/dist/types/components/List/testData/userApi.d.ts +57 -0
  64. package/dist/types/lib/react/components/Empty/Empty.d.ts +3 -0
  65. package/dist/types/lib/react/components/Empty/index.d.ts +3 -0
  66. package/dist/types/lib/react/components/Render/Render.d.ts +4 -0
  67. package/dist/types/lib/react/components/Render/Render.test.d.ts +1 -0
  68. package/dist/types/lib/react/components/Render/index.d.ts +1 -0
  69. package/dist/types/lib/react/deepFindOfType.d.ts +3 -0
  70. package/dist/types/lib/react/deepFindOfType.test.d.ts +1 -0
  71. package/dist/types/lib/react/deepHas.d.ts +2 -0
  72. package/package.json +24 -3
  73. package/dist/IconPlus-C2E1lBEu.js +0 -12
@@ -4,3 +4,4 @@ declare const meta: Meta<typeof Heading>;
4
4
  export default meta;
5
5
  type Story = StoryObj<typeof Heading>;
6
6
  export declare const Default: Story;
7
+ export declare const WithIcon: Story;
@@ -0,0 +1,6 @@
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+ import Heading from "../Heading";
3
+ declare const meta: Meta<typeof Heading>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof Heading>;
6
+ export declare const LongText: Story;
@@ -0,0 +1,7 @@
1
+ import React, { PropsWithChildren } from "react";
2
+ import { AnyData } from './model/item/types';
3
+ import { ListShape } from './model/types';
4
+ interface Props extends PropsWithChildren, Pick<ListShape<AnyData>, "enableMultiSort"> {
5
+ }
6
+ export declare function List(props: Props): React.JSX.Element;
7
+ export default List;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,3 @@
1
+ import React from "react";
2
+ export declare const DataLoader: () => React.JSX.Element[];
3
+ export default DataLoader;
@@ -0,0 +1,6 @@
1
+ import { FC } from "react";
2
+ interface Props {
3
+ pageIndex: number;
4
+ }
5
+ export declare const SuspenseFallback: FC<Props>;
6
+ export default SuspenseFallback;
@@ -0,0 +1,3 @@
1
+ import { SuspenseFallback } from "./SuspenseFallback";
2
+ export { SuspenseFallback } from "./SuspenseFallback";
3
+ export default SuspenseFallback;
@@ -0,0 +1,3 @@
1
+ import { DataLoader } from "./DataLoader";
2
+ export { DataLoader } from "./DataLoader";
3
+ export default DataLoader;
@@ -0,0 +1,6 @@
1
+ import { FC } from "react";
2
+ interface Props {
3
+ className?: string;
4
+ }
5
+ export declare const FilterBar: FC<Props>;
6
+ export default FilterBar;
@@ -0,0 +1,2 @@
1
+ import { FC } from "react";
2
+ export declare const FilterPicker: FC;
@@ -0,0 +1,3 @@
1
+ import { FilterPicker } from "./FilterPicker";
2
+ export { FilterPicker } from "./FilterPicker";
3
+ export default FilterPicker;
@@ -0,0 +1,8 @@
1
+ import { FC } from "react";
2
+ import { Filter } from '../../../../model/filter/Filter';
3
+ import { AnyData } from '../../../../model/item/types';
4
+ interface Props {
5
+ filter: Filter<AnyData>;
6
+ }
7
+ export declare const FilterPickerItem: FC<Props>;
8
+ export {};
@@ -0,0 +1,3 @@
1
+ import { FilterPickerItem } from "./FilterPickerItem";
2
+ export { FilterPickerItem } from "./FilterPickerItem";
3
+ export default FilterPickerItem;
@@ -0,0 +1,2 @@
1
+ import { FC } from "react";
2
+ export declare const SortingPicker: FC;
@@ -0,0 +1,3 @@
1
+ import { SortingPicker } from "./SortingPicker";
2
+ export { SortingPicker } from "./SortingPicker";
3
+ export default SortingPicker;
@@ -0,0 +1,8 @@
1
+ import { FC } from "react";
2
+ import { AnyData } from '../../../../model/item/types';
3
+ import { Sorting } from '../../../../model/sorting/Sorting';
4
+ interface Props {
5
+ sorting: Sorting<AnyData>;
6
+ }
7
+ export declare const SortingPickerItem: FC<Props>;
8
+ export {};
@@ -0,0 +1,3 @@
1
+ import { SortingPickerItem } from "./SortingPickerItem";
2
+ export { SortingPickerItem } from "./SortingPickerItem";
3
+ export default SortingPickerItem;
@@ -0,0 +1,3 @@
1
+ import { FilterBar } from "./FilterBar";
2
+ export { FilterBar } from "./FilterBar";
3
+ export default FilterBar;
@@ -0,0 +1,7 @@
1
+ import { AnyData } from '../../model/item/types';
2
+ import { FC } from "react";
3
+ interface Props {
4
+ data: AnyData;
5
+ }
6
+ export declare const FallbackRenderer: FC<Props>;
7
+ export {};
@@ -0,0 +1,5 @@
1
+ import React, { PropsWithChildren } from "react";
2
+ interface Props extends PropsWithChildren {
3
+ }
4
+ export declare const Item: (props: Props) => React.JSX.Element;
5
+ export default Item;
@@ -0,0 +1,3 @@
1
+ import { Item } from "./Item";
2
+ export { Item } from "./Item";
3
+ export default Item;
@@ -0,0 +1,6 @@
1
+ import { FC } from "react";
2
+ interface Props {
3
+ className?: string;
4
+ }
5
+ export declare const Items: FC<Props>;
6
+ export default Items;
@@ -0,0 +1,3 @@
1
+ import { Items } from "./Items";
2
+ export { Items } from "./Items";
3
+ export default Items;
@@ -0,0 +1,5 @@
1
+ import { FilterShape } from '../model/filter/types';
2
+ interface Props<T> extends Omit<FilterShape<T>, "type"> {
3
+ }
4
+ export declare function ListFilter<T = never>(ignoredProps: Props<T>): null;
5
+ export {};
@@ -0,0 +1,6 @@
1
+ import { RenderItemFn } from '../model/item/Item';
2
+ interface Props<T> {
3
+ children: RenderItemFn<T>;
4
+ }
5
+ export declare function ListItemView<T = never>(ignoredProps: Props<T>): null;
6
+ export {};
@@ -0,0 +1,6 @@
1
+ import { AsyncDataLoaderShape } from '../model/loading/types';
2
+ interface Props<T> extends Omit<AsyncDataLoaderShape<T>, "asyncLoader"> {
3
+ children: AsyncDataLoaderShape<T>["asyncLoader"];
4
+ }
5
+ export declare function ListLoaderAsync<T = never>(ignoredProps: Props<T>): null;
6
+ export {};
@@ -0,0 +1,6 @@
1
+ import { AsyncResourceFactoryDataLoaderShape } from '../model/loading/types';
2
+ interface Props<T> extends Omit<AsyncResourceFactoryDataLoaderShape<T>, "asyncResourceFactory"> {
3
+ children: AsyncResourceFactoryDataLoaderShape<T>["asyncResourceFactory"];
4
+ }
5
+ export declare function ListLoaderAsyncResource<T = never>(ignoredProps: Props<T>): null;
6
+ export {};
@@ -0,0 +1,5 @@
1
+ import { SortingShape } from '../model/sorting/types';
2
+ interface Props<T> extends SortingShape<T> {
3
+ }
4
+ export declare function ListSorting<T = never>(ignoredProps: Props<T>): null;
5
+ export {};
@@ -0,0 +1,5 @@
1
+ interface Props<T> {
2
+ data: T[];
3
+ }
4
+ export declare function ListStaticData<T = never>(ignoredProps: Props<T>): null;
5
+ export {};
@@ -0,0 +1,4 @@
1
+ import { TextProps } from '../../../Text';
2
+ import { FC } from "react";
3
+ export declare const PaginationInfos: FC<TextProps>;
4
+ export default PaginationInfos;
@@ -0,0 +1,3 @@
1
+ import { PaginationInfos } from "./PaginationInfos";
2
+ export { PaginationInfos } from "./PaginationInfos";
3
+ export default PaginationInfos;
@@ -0,0 +1,4 @@
1
+ import { FC } from "react";
2
+ import { ButtonProps } from '../../../Button';
3
+ export declare const ShowMoreItemsButton: FC<ButtonProps>;
4
+ export default ShowMoreItemsButton;
@@ -0,0 +1,3 @@
1
+ import { ShowMoreItemsButton } from "./ShowMoreItemsButton";
2
+ export { ShowMoreItemsButton } from "./ShowMoreItemsButton";
3
+ export default ShowMoreItemsButton;
@@ -0,0 +1 @@
1
+ export declare const useList: () => import("../model/List").List<any>;
@@ -0,0 +1,8 @@
1
+ import { List } from "./List";
2
+ export * from "./List";
3
+ export * from "./components/ListFilter";
4
+ export * from "./components/ListSorting";
5
+ export * from "./components/ListItemView";
6
+ export * from "./components/ListLoaderAsync";
7
+ export * from "./components/ListStaticData";
8
+ export default List;
@@ -0,0 +1,8 @@
1
+ /// <reference types="react" />
2
+ import List from './model/List';
3
+ import { AnyData } from './model/item/types';
4
+ interface ListContext {
5
+ list: List<AnyData>;
6
+ }
7
+ export declare const listContext: import("react").Context<ListContext>;
8
+ export {};
@@ -0,0 +1,21 @@
1
+ import { ItemCollection } from './item/ItemCollection';
2
+ import { Pagination } from './pagination/Pagination';
3
+ import { RenderItemFn } from './item/Item';
4
+ import { Filter } from "./filter/Filter";
5
+ import { Sorting } from './sorting/Sorting';
6
+ import ReactTable from './ReactTable';
7
+ import { ListShape } from './types';
8
+ import { IncrementalLoader } from './loading/IncrementalLoader';
9
+ export declare class List<T> {
10
+ readonly filters: Array<Filter<T>>;
11
+ readonly sorting: Array<Sorting<T>>;
12
+ readonly items: ItemCollection<T>;
13
+ readonly render?: RenderItemFn<T>;
14
+ readonly reactTable: ReactTable<T>;
15
+ readonly pagination: Pagination<T>;
16
+ readonly loader: IncrementalLoader<T>;
17
+ private constructor();
18
+ static useNew<T>(shape: ListShape<T>): List<T>;
19
+ isFiltered(): boolean;
20
+ }
21
+ export default List;
@@ -0,0 +1,17 @@
1
+ import { Column, Table, TableOptions } from "@tanstack/react-table";
2
+ import List from './List';
3
+ import { PropertyName } from './item/Item';
4
+ export declare class ReactTable<T> {
5
+ readonly list: List<T>;
6
+ readonly table: Table<T>;
7
+ private readonly tableState;
8
+ private constructor();
9
+ static useNew<T>(list: List<T>, tableOptions?: Partial<TableOptions<T>>): ReactTable<T>;
10
+ private useReactTable;
11
+ private useUpdateTableState;
12
+ private onTableStateChange;
13
+ private getUpdatedTableState;
14
+ getTableColumn(property: PropertyName<T>): Column<T>;
15
+ private getTableColumnDefs;
16
+ }
17
+ export default ReactTable;
@@ -0,0 +1,26 @@
1
+ import { Column, ColumnDef, ColumnFilter } from "@tanstack/react-table";
2
+ import List from '../List';
3
+ import { PropertyName } from '../item/Item';
4
+ import { FilterMatcher, FilterMode, FilterShape } from './types';
5
+ export declare class Filter<T> {
6
+ private readonly _values?;
7
+ readonly list: List<T>;
8
+ readonly property: PropertyName<T>;
9
+ readonly mode: FilterMode;
10
+ readonly matcher: FilterMatcher;
11
+ private onFilterUpdateCallbacks;
12
+ constructor(list: List<T>, shape: FilterShape<T>);
13
+ updateTableColumnDef(def: ColumnDef<T>): void;
14
+ private getReactTableFilterFn;
15
+ private checkFilterMatches;
16
+ protected getTableColumnFilter(): ColumnFilter | undefined;
17
+ protected getTableColumn(): Column<T>;
18
+ getValue(): unknown;
19
+ getValueId(value: unknown): string;
20
+ get values(): unknown[];
21
+ getArrayValue(): Array<unknown>;
22
+ isValueActive(value: unknown): boolean;
23
+ isActive(): boolean;
24
+ toggleValue(newValue: unknown): void;
25
+ onFilterUpdated(cb: () => unknown): void;
26
+ }
@@ -0,0 +1,9 @@
1
+ import { PropertyName } from '../item/Item';
2
+ export type FilterMode = "all" | "some" | "one";
3
+ export type FilterMatcher = (filterValue: unknown, property: unknown) => boolean;
4
+ export interface FilterShape<T> {
5
+ property: PropertyName<T>;
6
+ mode?: FilterMode;
7
+ matcher?: FilterMatcher;
8
+ values?: unknown[];
9
+ }
@@ -0,0 +1,14 @@
1
+ import { ItemCollection } from './ItemCollection';
2
+ import { ReactNode } from "react";
3
+ import { DeepKeys, Row } from "@tanstack/react-table";
4
+ export type PropertyName<T> = DeepKeys<T>;
5
+ export type RenderItemFn<T> = (data: T) => ReactNode;
6
+ export declare class Item<T> {
7
+ readonly id: string;
8
+ readonly data: T;
9
+ readonly collection: ItemCollection<T>;
10
+ constructor(collection: ItemCollection<T>, id: string, data: T);
11
+ render(): ReactNode;
12
+ static fromRow<T>(collection: ItemCollection<T>, row: Row<T>): Item<T>;
13
+ private static fallbackRenderItemFn;
14
+ }
@@ -0,0 +1,8 @@
1
+ import List from '../List';
2
+ import { Item } from './Item';
3
+ export declare class ItemCollection<T> {
4
+ readonly list: List<T>;
5
+ private constructor();
6
+ static useNew<T>(list: List<T>): ItemCollection<T>;
7
+ get entries(): Item<T>[];
8
+ }
@@ -0,0 +1,5 @@
1
+ export type AnyData = any;
2
+ export interface ListDataLoaderResult<T> {
3
+ data: T[];
4
+ itemTotalCount?: number;
5
+ }
@@ -0,0 +1,23 @@
1
+ import List from '../List';
2
+ import { IncrementalLoaderShape } from './types';
3
+ export declare class IncrementalLoader<T> {
4
+ private readonly list;
5
+ private readonly dataSource;
6
+ private readonly pagesDataSignal;
7
+ private readonly pagesLoadingStateSignal;
8
+ readonly manualSorting: boolean;
9
+ readonly manualFiltering: boolean;
10
+ readonly manualPagination: boolean;
11
+ constructor(list: List<T>, shape?: IncrementalLoaderShape<T>);
12
+ private reset;
13
+ useIsLoading(): boolean;
14
+ useData(): T[];
15
+ useSuspenseHook(pageIndex: number): void;
16
+ getLoaderInvocationHooks(): Array<() => void>;
17
+ private useLoadPage;
18
+ private getDataLoaderOptions;
19
+ private getPageDataAsyncResource;
20
+ private updatePageData;
21
+ private updatePageLoadingState;
22
+ loadMore(): void;
23
+ }
@@ -0,0 +1,43 @@
1
+ import { PropertyRecord } from '../types';
2
+ import { FilterMode } from '../filter/types';
3
+ import { AsyncResource } from "@mittwald/react-use-promise";
4
+ type DataLoaderSortOptions<T> = PropertyRecord<T, "asc" | "desc">;
5
+ type DataLoaderFilterOptions<T> = PropertyRecord<T, {
6
+ mode: FilterMode;
7
+ values: unknown[];
8
+ }>;
9
+ interface DataLoaderPaginationOptions {
10
+ offset: number;
11
+ limit: number;
12
+ }
13
+ export interface DataLoaderOptions<T> {
14
+ sorting?: DataLoaderSortOptions<T>;
15
+ filtering?: DataLoaderFilterOptions<T>;
16
+ pagination?: DataLoaderPaginationOptions;
17
+ }
18
+ export type DataLoaderResult<T> = {
19
+ data: T[];
20
+ itemTotalCount?: number;
21
+ };
22
+ export type AsyncDataLoader<T> = (options?: DataLoaderOptions<T>) => Promise<DataLoaderResult<T>>;
23
+ type AsyncResourceFactory<T> = (options?: DataLoaderOptions<T>) => AsyncResource<DataLoaderResult<T>>;
24
+ type StaticData<T> = T[];
25
+ interface DynamicLoaderShape {
26
+ manualSorting?: boolean;
27
+ manualFiltering?: boolean;
28
+ manualPagination?: boolean;
29
+ }
30
+ export interface StaticDataLoaderShape<T> {
31
+ staticData: StaticData<T>;
32
+ }
33
+ export type AsyncResourceFactoryDataLoaderShape<T> = {
34
+ asyncResourceFactory: AsyncResourceFactory<T>;
35
+ } & DynamicLoaderShape;
36
+ export type AsyncDataLoaderShape<T> = {
37
+ asyncLoader: AsyncDataLoader<T>;
38
+ } & DynamicLoaderShape;
39
+ export type DataSource<T> = StaticDataLoaderShape<T> | AsyncResourceFactoryDataLoaderShape<T> | AsyncDataLoaderShape<T>;
40
+ export interface IncrementalLoaderShape<T> {
41
+ source?: DataSource<T>;
42
+ }
43
+ export {};
@@ -0,0 +1,16 @@
1
+ import List from '../List';
2
+ import { PaginationShape } from './types';
3
+ export declare class Pagination<T> {
4
+ private readonly list;
5
+ readonly initialPageSize: number;
6
+ constructor(list: List<T>, shape?: PaginationShape);
7
+ getPageIndex(): number;
8
+ hasNextPage(): boolean;
9
+ nextPage(): void;
10
+ updatePageSize(size: number): void;
11
+ getPageSize(): number;
12
+ getTotalItemsCount(): number | undefined;
13
+ getFilteredItemsCount(): number;
14
+ getVisibleItemsCount(): number | undefined;
15
+ updateItemTotalCount(value: number): void;
16
+ }
@@ -0,0 +1,3 @@
1
+ export interface PaginationShape {
2
+ pageSize?: number;
3
+ }
@@ -0,0 +1,12 @@
1
+ import { Column, ColumnDef, SortDirection } from "@tanstack/react-table";
2
+ import List from '../List';
3
+ import { PropertyName } from '../item/Item';
4
+ import { SortingShape } from './types';
5
+ export declare class Sorting<T> {
6
+ readonly list: List<T>;
7
+ readonly property: PropertyName<T>;
8
+ constructor(list: List<T>, shape: SortingShape<T>);
9
+ updateTableColumnDef(def: ColumnDef<T>): void;
10
+ get direction(): SortDirection | false;
11
+ getTableColumn(): Column<T>;
12
+ }
@@ -0,0 +1,4 @@
1
+ import { PropertyName } from '../item/Item';
2
+ export interface SortingShape<T> {
3
+ property: PropertyName<T>;
4
+ }
@@ -0,0 +1,14 @@
1
+ import { PropertyName, RenderItemFn } from './item/Item';
2
+ import { SortingShape } from './sorting/types';
3
+ import { PaginationShape } from './pagination/types';
4
+ import { FilterShape } from './filter/types';
5
+ import { IncrementalLoaderShape } from './loading/types';
6
+ export interface ListShape<T> {
7
+ loader?: IncrementalLoaderShape<T>;
8
+ render?: RenderItemFn<T>;
9
+ filters?: FilterShape<T>[];
10
+ sorting?: SortingShape<T>[];
11
+ pagination?: PaginationShape;
12
+ enableMultiSort?: boolean;
13
+ }
14
+ export type PropertyRecord<T, TValue> = Partial<Record<PropertyName<T>, TValue>>;
@@ -0,0 +1,6 @@
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+ import List from "../List";
3
+ declare const meta: Meta<typeof List>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof List>;
6
+ export declare const Default: Story;
@@ -0,0 +1,57 @@
1
+ export type User = (typeof users)[number];
2
+ export declare const getStates: () => Promise<string[]>;
3
+ interface Request {
4
+ pagination?: {
5
+ limit: number;
6
+ skip: number;
7
+ };
8
+ filter?: {
9
+ states?: string[];
10
+ };
11
+ }
12
+ interface Response {
13
+ data: User[];
14
+ totalCount: number;
15
+ }
16
+ export declare const getUsers: (req: Request) => Promise<Response>;
17
+ export declare const users: {
18
+ status: string;
19
+ name: {
20
+ first: string;
21
+ middle: string;
22
+ last: string;
23
+ };
24
+ username: string;
25
+ password: string;
26
+ emails: string[];
27
+ phoneNumber: string;
28
+ location: {
29
+ street: string;
30
+ city: string;
31
+ state: string;
32
+ country: string;
33
+ zip: string;
34
+ coordinates: {
35
+ latitude: number;
36
+ longitude: number;
37
+ };
38
+ };
39
+ website: string;
40
+ domain: string;
41
+ job: {
42
+ title: string;
43
+ descriptor: string;
44
+ area: string;
45
+ type: string;
46
+ company: string;
47
+ };
48
+ creditCard: {
49
+ number: string;
50
+ cvv: string;
51
+ issuer: string;
52
+ };
53
+ uuid: string;
54
+ objectId: string;
55
+ }[];
56
+ export declare const states: string[];
57
+ export {};
@@ -0,0 +1,3 @@
1
+ import { FC } from "react";
2
+ export declare const Empty: FC<any>;
3
+ export default Empty;
@@ -0,0 +1,3 @@
1
+ import { Empty } from "./Empty";
2
+ export { Empty } from "./Empty";
3
+ export default Empty;
@@ -0,0 +1,4 @@
1
+ import { FC, ReactNode } from "react";
2
+ export declare const Render: FC<{
3
+ children: () => ReactNode | void;
4
+ }>;
@@ -0,0 +1 @@
1
+ export * from "./Render";
@@ -0,0 +1,3 @@
1
+ import { ComponentProps, ElementType, FunctionComponentElement, ReactNode } from "react";
2
+ export declare const deepFindOfType: <T extends ElementType>(children: ReactNode, searchType: T) => FunctionComponentElement<ComponentProps<T>> | undefined;
3
+ export declare const deepFilterByType: <T extends ElementType>(children: ReactNode, searchType: T) => Array<FunctionComponentElement<ComponentProps<T>>>;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,2 @@
1
+ import { ElementType, ReactNode } from "react";
2
+ export declare const deepHas: (children: ReactNode | ReactNode[], searchType: ElementType) => boolean;