@dereekb/dbx-core 9.5.2 → 9.5.5

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.
@@ -17,6 +17,7 @@ export declare class DbxAngularRouterService implements DbxRouterService, DbxRou
17
17
  go(input: ObservableOrValue<SegueRefOrSegueRefRouterLink<NavigationExtras | NavigationBehaviorOptions>>): Promise<boolean>;
18
18
  updateParams(inputParams: ObservableOrValue<SegueRefRawSegueParams>): Promise<boolean>;
19
19
  isActive(segueRef: SegueRefOrSegueRefRouterLink): boolean;
20
+ isActiveExactly(segueRef: SegueRefOrSegueRefRouterLink): boolean;
20
21
  comparePrecision(a: SegueRefOrSegueRefRouterLink, b: SegueRefOrSegueRefRouterLink): number;
21
22
  static ɵfac: i0.ɵɵFactoryDeclaration<DbxAngularRouterService, never>;
22
23
  static ɵprov: i0.ɵɵInjectableDeclaration<DbxAngularRouterService>;
@@ -23,7 +23,9 @@ export declare class DbxUIRouterService implements DbxRouterService, DbxRouterTr
23
23
  go(input: ObservableOrValue<SegueRefOrSegueRefRouterLink<TransitionOptions>>): Promise<boolean>;
24
24
  updateParams(inputParams: ObservableOrValue<SegueRefRawSegueParams>): Promise<boolean>;
25
25
  isActive(input: SegueRefOrSegueRefRouterLink): boolean;
26
+ isActiveExactly(input: SegueRefOrSegueRefRouterLink): boolean;
26
27
  comparePrecision(aInput: SegueRefOrSegueRefRouterLink, bInput: SegueRefOrSegueRefRouterLink): number;
28
+ isActiveState(input: SegueRefOrSegueRefRouterLink, exactly: boolean): boolean;
27
29
  static ɵfac: i0.ɵɵFactoryDeclaration<DbxUIRouterService, never>;
28
30
  static ɵprov: i0.ɵɵInjectableDeclaration<DbxUIRouterService>;
29
31
  }
@@ -27,6 +27,12 @@ export declare abstract class DbxRouterService {
27
27
  * @param segueRef
28
28
  */
29
29
  abstract isActive(segueRef: SegueRefOrSegueRefRouterLink): boolean;
30
+ /**
31
+ * Returns true if the input segue ref is considered active exactly.
32
+ *
33
+ * @param segueRef
34
+ */
35
+ abstract isActiveExactly(segueRef: SegueRefOrSegueRefRouterLink): boolean;
30
36
  /**
31
37
  * Compares the two refs for precision for a certain route.
32
38
  *
@@ -1,4 +1,8 @@
1
+ import { ArrayOrValue } from '@dereekb/util';
1
2
  import { MonoTypeOperatorFunction, Observable } from 'rxjs';
3
+ import { SegueRefOrSegueRefRouterLink } from '../../segue';
4
+ import { DbxRouterService } from '../service/router.service';
5
+ import { DbxRouterTransitionService } from '../service/router.transition.service';
2
6
  import { DbxRouterTransitionEvent, DbxRouterTransitionEventType } from './transition';
3
7
  /**
4
8
  * Convenience function for filtering success from the input observable.
@@ -9,3 +13,26 @@ import { DbxRouterTransitionEvent, DbxRouterTransitionEventType } from './transi
9
13
  export declare function successTransition(obs: Observable<DbxRouterTransitionEvent>): Observable<DbxRouterTransitionEvent>;
10
14
  export declare function filterTransitionSuccess(): MonoTypeOperatorFunction<DbxRouterTransitionEvent>;
11
15
  export declare function filterTransitionEvent(type: DbxRouterTransitionEventType): MonoTypeOperatorFunction<DbxRouterTransitionEvent>;
16
+ /**
17
+ * isLatestSuccessfulRoute() config
18
+ */
19
+ export interface IsLatestSuccessfulRouteConfig {
20
+ readonly dbxRouterTransitionService: DbxRouterTransitionService;
21
+ readonly dbxRouterService: DbxRouterService;
22
+ /**
23
+ * Route or list of routes to check if they're active or not.
24
+ */
25
+ readonly routes: ArrayOrValue<SegueRefOrSegueRefRouterLink>;
26
+ /**
27
+ * Whether or not to match route activity exactly.
28
+ */
29
+ readonly activeExactly?: boolean;
30
+ }
31
+ /**
32
+ * Creates a new observable that uses the input DbxRouterTransitionService and DbxRouterService to determine whether or not any of the configured routes are active.
33
+ *
34
+ * @param obs
35
+ * @param config
36
+ * @returns
37
+ */
38
+ export declare function isLatestSuccessfulRoute(config: IsLatestSuccessfulRouteConfig): Observable<boolean>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dereekb/dbx-core",
3
- "version": "9.5.2",
3
+ "version": "9.5.5",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^14.0.0",
6
6
  "@angular/core": "^14.0.0",
@@ -9,12 +9,12 @@
9
9
  "@ngrx/effects": "^14.0.0",
10
10
  "@ngrx/entity": "^14.0.0",
11
11
  "@ngrx/store": "^14.0.0",
12
- "@dereekb/util": "9.5.2",
13
- "@dereekb/rxjs": "9.5.2",
12
+ "@dereekb/util": "9.5.5",
13
+ "@dereekb/rxjs": "9.5.5",
14
14
  "@angular/platform-browser": "^14.0.0",
15
15
  "@uirouter/core": "^6.0.8",
16
16
  "date-fns": "^2.29.0",
17
- "@dereekb/date": "9.5.2",
17
+ "@dereekb/date": "9.5.5",
18
18
  "@angular/router": "^14.0.0"
19
19
  },
20
20
  "dependencies": {