@hitgrab/finder 0.1.0-alpha → 0.1.4-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/__tests__/test-types.d.ts +2 -2
- package/dist/core/core-constants.d.ts +39 -0
- package/dist/core/effect-book.d.ts +12 -0
- package/dist/core/{events/event-emitter.d.ts → event-emitter.d.ts} +2 -2
- package/dist/core/filters.d.ts +28 -0
- package/dist/core/finder-core-implementation.d.ts +44 -0
- package/dist/core/finder-core.d.ts +56 -45
- package/dist/core/finder-error.d.ts +3 -0
- package/dist/core/{group-by/group-by.d.ts → group-by.d.ts} +6 -5
- package/dist/core/{pagination/pagination.d.ts → pagination.d.ts} +1 -1
- package/dist/core/{rule-book/rule-book.d.ts → rule-book.d.ts} +3 -3
- package/dist/core/search/calculate-character-match-indexes.d.ts +1 -0
- package/dist/core/search/{result-segments/search-result-segments.d.ts → calculate-string-match-segments.d.ts} +3 -3
- package/dist/core/search/{result-segments/result-segment-haystack.d.ts → string-match-haystack.d.ts} +3 -3
- package/dist/core/{search/search.d.ts → search.d.ts} +5 -5
- package/dist/core/{sort-by/sort-by.d.ts → sort-by.d.ts} +9 -5
- package/dist/core/{tester/tester.d.ts → tester.d.ts} +1 -1
- package/dist/core/types/core-types.d.ts +16 -15
- package/dist/core/types/effect-types.d.ts +0 -2
- package/dist/core/types/event-types.d.ts +5 -4
- package/dist/core/types/rule-types.d.ts +8 -12
- package/dist/core/types/string-match-types.d.ts +10 -0
- package/dist/core/utils/rule-type-enforcers.d.ts +5 -3
- package/dist/core/utils/rule-utils.d.ts +2 -4
- package/dist/index.d.ts +5 -3
- package/dist/index.js +3265 -3196
- package/dist/index.umd.cjs +19 -19
- package/dist/react/components/finder-search-term-haystack.d.ts +8 -0
- package/dist/react/components/finder.d.ts +2 -2
- package/dist/react/components/string-match.d.ts +12 -0
- package/dist/react/types/react-types.d.ts +8 -5
- package/package.json +11 -10
- package/dist/core/effect-book/effect-book.d.ts +0 -8
- package/dist/core/filters/filters-interface.d.ts +0 -31
- package/dist/core/filters/filters.d.ts +0 -28
- package/dist/core/group-by/group-by-interface.d.ts +0 -21
- package/dist/core/pagination/pagination-interface.d.ts +0 -23
- package/dist/core/search/algorithms/sequential-characters.d.ts +0 -1
- package/dist/core/search/algorithms/sequential-string.d.ts +0 -1
- package/dist/core/search/result-segments/result-segment-types.d.ts +0 -17
- package/dist/core/search/search-interface.d.ts +0 -15
- package/dist/core/sort-by/sort-by-interface.d.ts +0 -23
- package/dist/core/utils/finder-utils.d.ts +0 -3
- package/dist/react/components/finder-search-term.d.ts +0 -8
- package/dist/react/hooks/use-finder-constructor.d.ts +0 -7
- /package/dist/core/{debounce-callback-registry/debounce-callback-registry.d.ts → debounce-callback-registry.d.ts} +0 -0
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import { RuleEffect, SearchEffect } from "../types/effect-types";
|
|
2
|
-
import {
|
|
3
|
-
export declare function getFilterOptionFromIdentifier<FItem, FContext>(optionOrOptionValue: FilterOption | any, options: FilterOption[] | ((items: FItem[], context?: FContext) => FilterOption[]) | undefined, items: FItem[], context?: FContext): any;
|
|
4
|
-
export declare function isFilterOption(data: unknown): data is FilterOption;
|
|
2
|
+
import { FilterRuleUnion, GroupByRule, HydratedFilterRule, SearchRule, SortByRule } from "../types/rule-types";
|
|
5
3
|
export declare function isSortByRule<FItem>(rule: unknown): rule is SortByRule<FItem>;
|
|
6
4
|
export declare function isSearchRule<FItem>(rule: unknown): rule is SearchRule<FItem>;
|
|
7
|
-
export declare function
|
|
5
|
+
export declare function isFilterRule<FItem>(rule: unknown): rule is FilterRuleUnion<FItem>;
|
|
8
6
|
export declare function isHydratedFilterRule<FItem>(rule: unknown): rule is HydratedFilterRule<FItem>;
|
|
9
7
|
export declare function isGroupByRule<FItem>(rule: unknown): rule is GroupByRule<FItem>;
|
|
10
8
|
export declare function isRuleEffect<FItem>(data: unknown): data is RuleEffect<FItem>;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
export type {
|
|
2
|
-
export type { FinderRule, SearchRule, SortByRule, GroupByRule, FilterRule, HydratedFilterRule, FilterRuleUnion, FilterOption } from "./core/types/rule-types";
|
|
1
|
+
export type { FinderConstructorOptions, FinderResultGroup, SortDirection } from "./core/types/core-types";
|
|
3
2
|
export { finderRuleset, searchRule, filterRule, sortByRule, groupByRule, ruleEffect, searchEffect } from "./core/utils/rule-type-enforcers";
|
|
3
|
+
export type { FinderRule, SearchRule, SortByRule, GroupByRule, FilterRule, HydratedFilterRule, FilterRuleUnion, FilterOption } from "./core/types/rule-types";
|
|
4
4
|
export type { RuleEffect, SearchEffect } from "./core/types/effect-types";
|
|
5
5
|
export type { FinderEvent, FinderInitEvent, FinderReadyEvent, FinderFirstUserInteractionEvent, FinderChangeEvent } from "./core/types/event-types";
|
|
6
|
+
export type { StringMatchSegment } from "./core/types/string-match-types";
|
|
6
7
|
/**
|
|
7
8
|
* React hooks and components
|
|
8
9
|
*/
|
|
9
10
|
export { useFinder } from "./react/hooks/use-finder";
|
|
10
11
|
export { Finder } from "./react/components/finder";
|
|
11
12
|
export { useFinderRef } from "./react/hooks/use-finder-ref";
|
|
12
|
-
export
|
|
13
|
+
export { StringMatch } from "./react/components/string-match";
|
|
14
|
+
export type { FinderProps, FinderContentProps, FinderContentGroupProps, FinderContentItemProps, StringMatchSegmentProps } from "./react/types/react-types";
|