ngrx-entity-crud 16.1.1 → 16.1.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ngrx-entity-crud",
3
- "version": "16.1.1",
3
+ "version": "16.1.2",
4
4
  "repository": "https://github.com/jucasoft/ngrx-entity-crud",
5
5
  "license": "MIT",
6
6
  "schematics": "./schematics/collection.json",
@@ -1,8 +1,8 @@
1
1
  import {createFeatureSelector, createSelector, MemoizedSelector} from '@ngrx/store';
2
- import * as fromRouter from '@ngrx/router-store';
3
2
  import {Data, NavigationExtras, Params} from '@angular/router';
4
3
  import {State} from './state';
5
4
  import {evalData} from 'ngrx-entity-crud';
5
+ import {getRouterSelectors} from "@ngrx/router-store";
6
6
 
7
7
  export const selectRouterState: MemoizedSelector<object, State> = createFeatureSelector<State>('router');
8
8
  const getOptions = (state: State): any => state?.state?.root?.firstChild?.params["options"];
@@ -31,13 +31,17 @@ export const hasPopUp: MemoizedSelector<object, NavigationExtras> = createSelect
31
31
  );
32
32
 
33
33
  export const {
34
- selectQueryParams, // select the current route query params
35
- selectQueryParam, // factory function to select a query param
36
- selectRouteParams, // select the current route params
37
- selectRouteParam, // factory function to select a route param
38
- selectRouteData, // select the current route data
39
- selectUrl, // select the current url
40
- } = fromRouter.getSelectors(selectRouterState);
34
+ selectCurrentRoute, // select the current route
35
+ selectFragment, // select the current route fragment
36
+ selectQueryParams, // select the current route query params
37
+ selectQueryParam, // factory function to select a query param
38
+ selectRouteParams, // select the current route params
39
+ selectRouteParam, // factory function to select a route param
40
+ selectRouteData, // select the current route data
41
+ selectRouteDataParam, // factory function to select a route data param
42
+ selectUrl, // select the current url
43
+ selectTitle, // select the title if available
44
+ } = getRouterSelectors(selectRouterState);
41
45
 
42
46
  export const all: MemoizedSelector<object, RuoteData> = createSelector(
43
47
  selectQueryParams,
@@ -61,3 +65,7 @@ export interface RuoteData {
61
65
  selectUrl: string;
62
66
  }
63
67
 
68
+ export const selectId = createSelector(
69
+ selectRouteParams,
70
+ (params:Params) => params['id']
71
+ )