@hitgrab/finder 0.1.11-alpha → 0.1.13-alpha
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/core/filters.d.ts +2 -2
- package/dist/core/finder-core-implementation.d.ts +1 -1
- package/dist/core/finder-core.d.ts +3 -2
- package/dist/core/types/rule-types.d.ts +0 -5
- package/dist/index.d.ts +1 -2
- package/dist/index.js +1465 -1467
- package/dist/index.umd.cjs +17 -17
- package/dist/react/components/finder-content-empty.d.ts +5 -4
- package/dist/react/components/finder-content-groups.d.ts +5 -5
- package/dist/react/components/finder-content-items.d.ts +5 -5
- package/dist/react/components/finder-content-loading.d.ts +5 -4
- package/dist/react/components/finder-content-no-matches.d.ts +5 -4
- package/dist/react/components/finder-content.d.ts +9 -9
- package/dist/react/types/react-types.d.ts +24 -11
- package/package.json +2 -4
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { FinderContentProps } from "../types/react-types";
|
|
2
|
+
import { ElementType, ReactNode } from "react";
|
|
3
|
+
interface FinderContentEmptyProps<FItem, FContext> {
|
|
4
|
+
children: ElementType<FinderContentProps<FItem, FContext>["empty"]> | Iterable<ReactNode>;
|
|
4
5
|
}
|
|
5
|
-
declare function FinderContentEmpty({ children: Component }: FinderContentEmptyProps): Iterable<
|
|
6
|
+
declare function FinderContentEmpty<FItem = any, FContext = any>({ children: Component }: FinderContentEmptyProps<FItem, FContext>): Iterable<ReactNode> | import("react/jsx-runtime").JSX.Element | null;
|
|
6
7
|
export { FinderContentEmpty };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { ElementType } from "react";
|
|
2
|
-
import {
|
|
3
|
-
interface FinderContentGroupsProps<FItem
|
|
4
|
-
children: ElementType<
|
|
1
|
+
import { ElementType, ReactNode } from "react";
|
|
2
|
+
import { FinderContentProps } from "../..";
|
|
3
|
+
interface FinderContentGroupsProps<FItem, FContext> {
|
|
4
|
+
children: ElementType<FinderContentProps<FItem, FContext>["groups"]> | Iterable<ReactNode>;
|
|
5
5
|
}
|
|
6
|
-
declare function FinderContentGroups<FItem>({ children: Component }: FinderContentGroupsProps<FItem>): import("react/jsx-runtime").JSX.Element | null;
|
|
6
|
+
declare function FinderContentGroups<FItem = any, FContext = any>({ children: Component }: FinderContentGroupsProps<FItem, FContext>): Iterable<ReactNode> | import("react/jsx-runtime").JSX.Element | null;
|
|
7
7
|
export { FinderContentGroups };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { ElementType } from "react";
|
|
2
|
-
import {
|
|
3
|
-
interface FinderContentItemsProps<FItem
|
|
4
|
-
children: ElementType<
|
|
1
|
+
import { ElementType, ReactNode } from "react";
|
|
2
|
+
import { FinderContentProps } from "../types/react-types";
|
|
3
|
+
interface FinderContentItemsProps<FItem, FContext> {
|
|
4
|
+
children: ElementType<FinderContentProps<FItem, FContext>["items"]> | Iterable<ReactNode>;
|
|
5
5
|
}
|
|
6
|
-
declare function FinderContentItems<FItem>({ children: Component }: FinderContentItemsProps<FItem>): import("react/jsx-runtime").JSX.Element | null;
|
|
6
|
+
declare function FinderContentItems<FItem = any, FContext = any>({ children: Component }: FinderContentItemsProps<FItem, FContext>): Iterable<ReactNode> | import("react/jsx-runtime").JSX.Element | null;
|
|
7
7
|
export { FinderContentItems };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { FinderContentProps } from "../types/react-types";
|
|
2
|
+
import { ElementType, ReactNode } from "react";
|
|
3
|
+
interface FinderContentLoadingProps<FItem, FContext> {
|
|
4
|
+
children: ElementType<FinderContentProps<FItem, FContext>["loading"]> | Iterable<ReactNode>;
|
|
4
5
|
}
|
|
5
|
-
declare function FinderContentLoading({ children: Component }: FinderContentLoadingProps): Iterable<
|
|
6
|
+
declare function FinderContentLoading<FItem, FContext>({ children: Component }: FinderContentLoadingProps<FItem, FContext>): Iterable<ReactNode> | import("react/jsx-runtime").JSX.Element | null;
|
|
6
7
|
export { FinderContentLoading };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { FinderContentProps } from "../types/react-types";
|
|
2
|
+
import { ElementType, ReactNode } from "react";
|
|
3
|
+
interface FinderContentNoMatchesProps<FItem, FContext> {
|
|
4
|
+
children: ElementType<FinderContentProps<FItem, FContext>["loading"]> | Iterable<ReactNode>;
|
|
4
5
|
}
|
|
5
|
-
declare function FinderContentNoMatches({ children: Component }: FinderContentNoMatchesProps): Iterable<
|
|
6
|
+
declare function FinderContentNoMatches<FItem = any, FContext = any>({ children: Component }: FinderContentNoMatchesProps<FItem, FContext>): Iterable<ReactNode> | import("react/jsx-runtime").JSX.Element | null;
|
|
6
7
|
export { FinderContentNoMatches };
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { ElementType } from "react";
|
|
2
|
-
import {
|
|
1
|
+
import { ElementType, ReactNode } from "react";
|
|
2
|
+
import { FinderContentProps } from "../types/react-types";
|
|
3
3
|
import { FinderContentLoading } from "./finder-content-loading";
|
|
4
4
|
import { FinderContentEmpty } from "./finder-content-empty";
|
|
5
5
|
import { FinderContentNoMatches } from "./finder-content-no-matches";
|
|
6
6
|
import { FinderContentItems } from "./finder-content-items";
|
|
7
7
|
import { FinderContentGroups } from "./finder-content-groups";
|
|
8
|
-
interface
|
|
8
|
+
interface FinderContentContainerProps<FItem, FContext> {
|
|
9
9
|
children: {
|
|
10
|
-
loading?:
|
|
11
|
-
empty?:
|
|
12
|
-
noMatches?:
|
|
13
|
-
items?: ElementType<
|
|
14
|
-
groups?: ElementType<
|
|
10
|
+
loading?: ElementType<FinderContentProps<FItem, FContext>["loading"]> | Iterable<ReactNode>;
|
|
11
|
+
empty?: ElementType<FinderContentProps<FItem, FContext>["empty"]> | Iterable<ReactNode>;
|
|
12
|
+
noMatches?: ElementType<FinderContentProps<FItem, FContext>["noMatches"]> | Iterable<ReactNode>;
|
|
13
|
+
items?: ElementType<FinderContentProps<FItem, FContext>["items"]> | Iterable<ReactNode>;
|
|
14
|
+
groups?: ElementType<FinderContentProps<FItem, FContext>["groups"]> | Iterable<ReactNode>;
|
|
15
15
|
};
|
|
16
16
|
}
|
|
17
|
-
declare function FinderContent<FItem = any, FContext = any>({ children: renderProps }:
|
|
17
|
+
declare function FinderContent<FItem = any, FContext = any>({ children: renderProps }: FinderContentContainerProps<FItem, FContext>): (import("react/jsx-runtime").JSX.Element | undefined)[];
|
|
18
18
|
declare namespace FinderContent {
|
|
19
19
|
var Loading: typeof FinderContentLoading;
|
|
20
20
|
var Empty: typeof FinderContentEmpty;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* React-specific types for creating consumer components.
|
|
3
3
|
*/
|
|
4
|
-
import { ElementType, PropsWithChildren,
|
|
4
|
+
import { ElementType, PropsWithChildren, RefObject } from "react";
|
|
5
5
|
import { FinderConstructorOptions, FinderResultGroup, PaginationMixinInterface } from "../../core/types/core-types";
|
|
6
6
|
import { StringMatchSegment } from "../../core/types/string-match-types";
|
|
7
7
|
import { FinderCore } from "../../core/finder-core";
|
|
@@ -9,17 +9,30 @@ export interface FinderProps<FItem, FContext> extends FinderConstructorOptions<F
|
|
|
9
9
|
items: FItem[] | undefined | null;
|
|
10
10
|
controllerRef?: RefObject<FinderCore<FItem, FContext> | null>;
|
|
11
11
|
}
|
|
12
|
-
export interface FinderContentProps<FContext = any> {
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
export interface FinderContentProps<FItem = any, FContext = any> {
|
|
13
|
+
empty: {
|
|
14
|
+
pagination: PaginationMixinInterface;
|
|
15
|
+
context: FContext;
|
|
16
|
+
};
|
|
17
|
+
loading: {
|
|
18
|
+
pagination: PaginationMixinInterface;
|
|
19
|
+
context: FContext;
|
|
20
|
+
};
|
|
21
|
+
noMatches: {
|
|
22
|
+
pagination: PaginationMixinInterface;
|
|
23
|
+
context: FContext;
|
|
24
|
+
};
|
|
25
|
+
items: {
|
|
26
|
+
items: FItem[];
|
|
27
|
+
pagination: PaginationMixinInterface;
|
|
28
|
+
context: FContext;
|
|
29
|
+
};
|
|
30
|
+
groups: {
|
|
31
|
+
groups: FinderResultGroup<FItem>[];
|
|
32
|
+
pagination: PaginationMixinInterface;
|
|
33
|
+
context: FContext;
|
|
34
|
+
};
|
|
15
35
|
}
|
|
16
|
-
export interface FinderContentItemProps<FItem, FContext = any> extends FinderContentProps<FContext> {
|
|
17
|
-
items: FItem[];
|
|
18
|
-
}
|
|
19
|
-
export interface FinderContentGroupProps<FItem, FContext = any> extends FinderContentProps<FContext> {
|
|
20
|
-
groups: FinderResultGroup<FItem>[];
|
|
21
|
-
}
|
|
22
|
-
export type FinderContentRenderProp = ElementType<FinderContentProps> | ReactElement<FinderContentProps> | Iterable<ReactNode>;
|
|
23
36
|
export interface StringMatchSegmentProps {
|
|
24
37
|
segment: StringMatchSegment;
|
|
25
38
|
segmentIndex: number;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hitgrab/finder",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.13-alpha",
|
|
4
4
|
"description": "Headless datatables for things that aren't tables.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
@@ -50,13 +50,11 @@
|
|
|
50
50
|
"homepage": "https://github.com/HitGrab/finder#readme",
|
|
51
51
|
"dependencies": {
|
|
52
52
|
"lodash": "^4.17.21",
|
|
53
|
-
"react": "^19.1.0"
|
|
54
|
-
"react-dom": "^19.1.0"
|
|
53
|
+
"react": "^19.1.0"
|
|
55
54
|
},
|
|
56
55
|
"devDependencies": {
|
|
57
56
|
"@types/lodash": "^4.17.16",
|
|
58
57
|
"@types/react": "^19.1.3",
|
|
59
|
-
"@types/react-dom": "^19.1.3",
|
|
60
58
|
"@vitejs/plugin-react": "^4.3.2",
|
|
61
59
|
"@eslint/js": "^9.36.0",
|
|
62
60
|
"eslint": "^9.36.0",
|