@elderbyte/ngx-starter 19.1.13 → 19.1.15

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.
@@ -18,9 +18,6 @@ export declare class FilterUtil {
18
18
  static mergeCombine(filtersA: Filter[], filtersB: Filter[]): Filter[];
19
19
  static strip(base: Filter[], toRemove: Filter[]): Filter[];
20
20
  private static stripValue;
21
+ private static startsWithFilter;
21
22
  static filterData<T>(data: T[], filters: Filter[]): T[];
22
- private static matches;
23
- private static resolveValue;
24
- private static resolveObjectValue;
25
- private static matchesValue;
26
23
  }
@@ -0,0 +1,54 @@
1
+ import { Filter } from '../data/filters/filter';
2
+ export interface GenericMatcherOptions {
3
+ mode: 'start' | 'full' | 'anywhere';
4
+ caseSensitive: boolean;
5
+ }
6
+ export declare class CustomMatcherSpec {
7
+ private readonly customFilterMatchers;
8
+ static start(): CustomMatcherSpec;
9
+ customFilterWildcard(matcher: (filter: Filter, resolvedValue: any) => boolean): this;
10
+ customFilter(filterKey: string, matcher: (filter: Filter, resolvedValue: any) => boolean): this;
11
+ toMap(): Map<string, // Filter Key
12
+ (filter: Filter, resolvedValue: any) => boolean>;
13
+ }
14
+ export declare class LocalDataFilter {
15
+ private readonly genericOptions;
16
+ private readonly customFilterMatchers;
17
+ /***************************************************************************
18
+ * *
19
+ * Static Builder *
20
+ * *
21
+ **************************************************************************/
22
+ static generic(options: GenericMatcherOptions): LocalDataFilter;
23
+ static custom(customMatcher: CustomMatcherSpec, options: GenericMatcherOptions): LocalDataFilter;
24
+ /***************************************************************************
25
+ * *
26
+ * Fields *
27
+ * *
28
+ **************************************************************************/
29
+ private readonly log;
30
+ private readonly customWildcardMatcher;
31
+ /***************************************************************************
32
+ * *
33
+ * Constructor *
34
+ * *
35
+ **************************************************************************/
36
+ private constructor();
37
+ /***************************************************************************
38
+ * *
39
+ * Public API *
40
+ * *
41
+ **************************************************************************/
42
+ filterData<T>(data: T[], filters: Filter[]): T[];
43
+ /***************************************************************************
44
+ * *
45
+ * Private methods *
46
+ * *
47
+ **************************************************************************/
48
+ private matches;
49
+ private resolveValue;
50
+ private resolveObjectValue;
51
+ private matchesResolvedValue;
52
+ private matchesResolvedValueGeneric;
53
+ private matchesGeneric;
54
+ }
@@ -12,3 +12,4 @@ export * from './parse-util';
12
12
  export * from './focus-util';
13
13
  export * from './batcher';
14
14
  export * from './signal-input';
15
+ export * from './local-data-filter';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elderbyte/ngx-starter",
3
- "version": "19.1.13",
3
+ "version": "19.1.15",
4
4
  "peerDependencies": {
5
5
  "@angular/core": "^18.0.0 || ^19.0.0",
6
6
  "@angular/common": "^18.0.0 || ^19.0.0",