diff --git a/package.json b/package.json index 747b1ee..5ea4764 100644 --- a/package.json +++ b/package.json @@ -46,8 +46,7 @@ "@ngrx/effects": "^9.0.0", "@ngrx/store": "^9.0.0", "deep-object-diff": "^1.1.0", - "rxjs": "^6.5.3", - "rxjs-compat": "^6.5.3" + "rxjs": "^6.5.3" }, "devDependencies": { "@angular/animations": "^9.0.0", @@ -110,7 +109,6 @@ "rimraf": "^2.6.2", "rollup": "^0.55.1", "rxjs": "~6.5.0", - "rxjs-compat": "~6.5.0", "sorcery": "^0.10.0", "ts-node": "^4.1.0", "tsickle": "^0.38.1", diff --git a/spec/actions.spec.ts b/spec/actions.spec.ts index 2db38fe..7fc49b6 100644 --- a/spec/actions.spec.ts +++ b/spec/actions.spec.ts @@ -1,5 +1,3 @@ -import { async, inject, fakeAsync, TestBed } from '@angular/core/testing'; - import { NgrxJsonApiActionTypes, ApiPostInitAction, @@ -241,6 +239,7 @@ describe('Json Api Actions', () => { let action = new ApiGetSuccessAction({}, 'testZone'); expect(action.type).toEqual(NgrxJsonApiActionTypes.API_GET_SUCCESS); expect(action.payload).toEqual({}); + }); it('should generate an api read fail action using apiReadFail', () => { diff --git a/spec/effects.spec.ts b/spec/effects.spec.ts index d3ca12a..426440c 100644 --- a/spec/effects.spec.ts +++ b/spec/effects.spec.ts @@ -5,7 +5,7 @@ import { HttpResponse, } from '@angular/common/http'; -import { Observable } from 'rxjs/Observable'; +import { Observable } from 'rxjs'; import { cold, hot } from 'jasmine-marbles'; @@ -43,7 +43,7 @@ describe('NgrxJsonApiEffects', () => { let actions: Observable; let api: NgrxJsonApi; let store: Store; - let mockStoreLet: any; + let mockStorePipe: any; beforeEach(() => { TestBed.configureTestingModule({ @@ -65,11 +65,11 @@ describe('NgrxJsonApiEffects', () => { api = TestBed.get(NgrxJsonApi); effects = TestBed.get(NgrxJsonApiEffects); store = TestBed.get(Store); - mockStoreLet = { - let: function() {}, + mockStorePipe = { + pipe: function() {}, }; - spyOn(store, 'let'); - spyOn(mockStoreLet, 'let'); + spyOn(store, 'pipe'); + spyOn(mockStorePipe, 'pipe'); }); let resource = { @@ -240,8 +240,8 @@ describe('NgrxJsonApiEffects', () => { actions = hot('-a', { a: localqueryinitAction }); let response = cold('--a', { a: query }); let expected = cold('---b', { b: completed }); - store.let.and.returnValue(mockStoreLet); - mockStoreLet.let.and.returnValue(response); + store.pipe.and.returnValue(mockStorePipe); + mockStorePipe.pipe.and.returnValue(response); expect(effects.queryStore$).toBeObservable(expected); }); @@ -298,8 +298,8 @@ describe('NgrxJsonApiEffects', () => { b: completed2, c: completed3, }); - store.let.and.returnValue(mockStoreLet); - mockStoreLet.let.and.returnValue(response); + store.pipe.and.returnValue(mockStorePipe); + mockStorePipe.pipe.and.returnValue(response); expect(effects.queryStore$).toBeObservable(expected); }); @@ -329,8 +329,8 @@ describe('NgrxJsonApiEffects', () => { actions = hot('-a--b', { a: localqueryinitAction, b: removeQueryAction }); let response = cold('--a----b', { a: resource1, b: resource2 }); let expected = cold('---a', { a: completed }); - store.let.and.returnValue(mockStoreLet); - mockStoreLet.let.and.returnValue(response); + store.pipe.and.returnValue(mockStorePipe); + mockStorePipe.pipe.and.returnValue(response); expect(effects.queryStore$).toBeObservable(expected); }); @@ -347,8 +347,8 @@ describe('NgrxJsonApiEffects', () => { actions = hot('-a', { a: localqueryfailAction }); let response = cold('--#', {}, error); let expected = cold('---b', { b: completed }); - store.let.and.returnValue(mockStoreLet); - mockStoreLet.let.and.returnValue(response); + store.pipe.and.returnValue(mockStorePipe); + mockStorePipe.pipe.and.returnValue(response); expect(effects.queryStore$).toBeObservable(expected); }); diff --git a/spec/pipes.spec.ts b/spec/pipes.spec.ts index 19ea95a..3ffde80 100644 --- a/spec/pipes.spec.ts +++ b/spec/pipes.spec.ts @@ -11,6 +11,7 @@ import { import { denormaliseStoreResource } from '../src/utils'; import { TestingModule } from './testing.module'; +import { map } from 'rxjs/operators'; describe('Pipes', () => { let pipe; @@ -104,7 +105,7 @@ describe('Pipes', () => { }; let storeResource = pipe.service .findOne({ query, fromServer: false }) - .map(it => it.data); + .pipe(map(it => it.data)); let denormalised = pipe.transform(storeResource); denormalised.subscribe(it => { expect(_.get(it, 'relationships.author.reference')).toBeDefined(); @@ -117,7 +118,7 @@ describe('Pipes', () => { }; let storeResource = pipe.service .findMany({ query, fromServer: false }) - .map(it => it.data); + .pipe(map(it => it.data)); let denormalised = pipe.transform(storeResource); denormalised.subscribe(it => { expect(_.get(it[0], 'relationships.author.reference')).toBeDefined(); diff --git a/spec/selectors.spec.ts b/spec/selectors.spec.ts index 8e2cb0e..52defe3 100644 --- a/spec/selectors.spec.ts +++ b/spec/selectors.spec.ts @@ -1,6 +1,6 @@ import { fakeAsync, inject, TestBed, tick } from '@angular/core/testing'; -import { Observable } from 'rxjs/Observable'; +import { Observable } from 'rxjs'; import { TestingModule } from './testing.module'; import { Store } from '@ngrx/store'; @@ -31,7 +31,7 @@ describe('NgrxJsonApiSelectors', () => { ); beforeEach(() => { - store = store.let(selectNgrxJsonApiDefaultZone()); + store = store.pipe(selectNgrxJsonApiDefaultZone()); }); describe('selectStoreResourcesOfType', () => { @@ -40,7 +40,7 @@ describe('NgrxJsonApiSelectors', () => { fakeAsync(() => { let res; let sub = store - .let(selectStoreResourcesOfType('Article')) + .pipe(selectStoreResourcesOfType('Article')) .subscribe(d => (res = d)); tick(); expect(res['1']).toBeDefined(); @@ -58,7 +58,7 @@ describe('NgrxJsonApiSelectors', () => { 'should get the a single query given a queryId', fakeAsync(() => { let res; - let sub = store.let(selectStoreQuery('1')).subscribe(d => (res = d)); + let sub = store.pipe(selectStoreQuery('1')).subscribe(d => (res = d)); tick(); expect(res.query).toBeDefined(); expect(res.resultIds).toBeDefined(); @@ -70,7 +70,7 @@ describe('NgrxJsonApiSelectors', () => { 'should return undefined for unavailable queries', fakeAsync(() => { let res; - let sub = store.let(selectStoreQuery('10')).subscribe(d => (res = d)); + let sub = store.pipe(selectStoreQuery('10')).subscribe(d => (res = d)); tick(); expect(res).not.toBeDefined(); }) @@ -83,7 +83,7 @@ describe('NgrxJsonApiSelectors', () => { fakeAsync(() => { let res; let sub = store - .let(selectManyQueryResult('1')) + .pipe(selectManyQueryResult('1')) .subscribe(d => (res = d)); tick(); expect(res.data[0].id).toEqual('1'); @@ -96,7 +96,7 @@ describe('NgrxJsonApiSelectors', () => { fakeAsync(() => { let res; let sub = store - .let(selectManyQueryResult('doesNotExist')) + .pipe(selectManyQueryResult('doesNotExist')) .subscribe(d => (res = d)); tick(); expect(res).toBeUndefined(); @@ -108,7 +108,7 @@ describe('NgrxJsonApiSelectors', () => { fakeAsync(() => { let res; let sub = store - .let(selectManyQueryResult('55')) + .pipe(selectManyQueryResult('55')) .subscribe(d => (res = d)); tick(); expect(res.data).toEqual([]); @@ -120,7 +120,7 @@ describe('NgrxJsonApiSelectors', () => { fakeAsync(() => { let res; let sub = store - .let(selectManyQueryResult('56')) + .pipe(selectManyQueryResult('56')) .subscribe(d => (res = d)); tick(); expect(res.data[0]).toBeUndefined(); @@ -135,7 +135,7 @@ describe('NgrxJsonApiSelectors', () => { fakeAsync(() => { let res; let sub = store - .let(selectOneQueryResult('2')) + .pipe(selectOneQueryResult('2')) .subscribe(d => (res = d)); tick(); expect(res.data.id).toEqual('1'); @@ -147,7 +147,7 @@ describe('NgrxJsonApiSelectors', () => { fakeAsync(() => { let res; let sub = store - .let(selectOneQueryResult('doesNotExist')) + .pipe(selectOneQueryResult('doesNotExist')) .subscribe(d => (res = d)); tick(); expect(res).toBeUndefined(); @@ -160,7 +160,7 @@ describe('NgrxJsonApiSelectors', () => { let res; let err; let sub = store - .let(selectOneQueryResult('1')) + .pipe(selectOneQueryResult('1')) .subscribe(d => (res = d), e => (err = e)); tick(); expect(res).toBeUndefined(); @@ -174,7 +174,7 @@ describe('NgrxJsonApiSelectors', () => { fakeAsync(() => { let res; let sub = store - .let(selectOneQueryResult('55')) + .pipe(selectOneQueryResult('55')) .subscribe(d => (res = d)); tick(); expect(res.data).toBeNull(); @@ -188,7 +188,7 @@ describe('NgrxJsonApiSelectors', () => { fakeAsync(() => { let res; let sub = store - .let(selectStoreResource({ type: 'Article', id: '1' })) + .pipe(selectStoreResource({ type: 'Article', id: '1' })) .subscribe(d => (res = d)); tick(); expect(res.attributes.title).toEqual('Article 1'); @@ -202,7 +202,7 @@ describe('NgrxJsonApiSelectors', () => { fakeAsync(() => { let res; let sub = store - .let(selectStoreResource({ type: 'Article', id: '100' })) + .pipe(selectStoreResource({ type: 'Article', id: '100' })) .subscribe(d => (res = d)); tick(); expect(res).not.toBeDefined(); @@ -216,7 +216,7 @@ describe('NgrxJsonApiSelectors', () => { fakeAsync(() => { let res; let sub = store - .let( + .pipe( selectStoreResources([ { type: 'Article', id: '1' }, { type: 'Article', id: '2' }, @@ -238,7 +238,7 @@ describe('NgrxJsonApiSelectors', () => { fakeAsync(() => { let res; let sub = store - .let( + .pipe( selectStoreResources([ { type: 'Article', id: '100' }, { type: 'Article', id: '1' }, diff --git a/spec/services.spec.ts b/spec/services.spec.ts index 11c5304..4406267 100644 --- a/spec/services.spec.ts +++ b/spec/services.spec.ts @@ -2,7 +2,7 @@ import { inject, TestBed } from '@angular/core/testing'; import * as _ from 'lodash'; -import { Observable } from 'rxjs/Observable'; +import { Observable } from 'rxjs'; import { NgrxJsonApiService } from '../src/services'; import { denormaliseStoreResource } from '../src/utils'; @@ -10,6 +10,7 @@ import { denormaliseStoreResource } from '../src/utils'; import { StoreResource } from '../src/interfaces'; import { TestingModule } from './testing.module'; import { resourceDefinitions } from './test_utils'; +import { map } from 'rxjs/operators'; describe('NgrxJsonApiService', () => { let service: NgrxJsonApiService; @@ -74,7 +75,7 @@ describe('NgrxJsonApiService', () => { let res; let storeResource = service .findOne({ query, fromServer: false, denormalise: true }) - .map(it => it.data); + .pipe(map(it => it.data)); storeResource.subscribe(it => (res = it)); service.denormaliseResource(storeResource).subscribe(it => { expect(it).toEqual(res); @@ -155,7 +156,7 @@ describe('NgrxJsonApiService', () => { let res: Array; let storeResources: Observable> = service .findMany({ query, fromServer: false, denormalise: true }) - .map(it => it.data); + .pipe(map(it => it.data)); storeResources.subscribe(it => (res = it)); service.denormaliseResource(storeResources).subscribe(it => { expect(it).toEqual(res); diff --git a/spec/testing.module.ts b/spec/testing.module.ts index 12428ac..aebd43f 100644 --- a/spec/testing.module.ts +++ b/spec/testing.module.ts @@ -2,8 +2,6 @@ import { NgModule } from '@angular/core'; import { HttpClientModule } from '@angular/common/http'; import { HttpClientTestingModule } from '@angular/common/http/testing'; -import 'rxjs/add/observable/of'; -import 'rxjs/add/observable/throw'; import { StoreModule } from '@ngrx/store'; import { EffectsModule } from '@ngrx/effects'; diff --git a/src/api.ts b/src/api.ts index 21e7282..570545f 100644 --- a/src/api.ts +++ b/src/api.ts @@ -12,10 +12,7 @@ import { HttpUserEvent, } from '@angular/common/http'; -import { ErrorObservable } from 'rxjs/observable/ErrorObservable'; -import { Observable } from 'rxjs/Observable'; -import 'rxjs/add/operator/map'; -import 'rxjs/add/observable/throw'; +import { Observable } from 'rxjs'; import { Document, diff --git a/src/effects.ts b/src/effects.ts index fab8af9..b6af970 100644 --- a/src/effects.ts +++ b/src/effects.ts @@ -7,28 +7,19 @@ import * as _ from 'lodash'; import { Action, Store } from '@ngrx/store'; import { Actions, Effect, ofType } from '@ngrx/effects'; -import { Observable } from 'rxjs/Observable'; -import { of } from 'rxjs/observable/of'; +import { Observable } from 'rxjs'; +import { concat, of } from 'rxjs'; -import 'rxjs/add/operator/concatAll'; import { catchError, - concatAll, combineLatest, - debounceTime, + distinctUntilChanged, filter, flatMap, map, - mapTo, mergeMap, - skip, - switchMap, - switchMapTo, - tap, - take, toArray, withLatestFrom, - takeWhile, takeUntil, } from 'rxjs/operators'; import { @@ -78,6 +69,7 @@ import { sortPendingChanges, filterResources, } from './utils'; +import { from } from 'rxjs/internal/observable/from'; @Injectable() export class NgrxJsonApiEffects implements OnDestroy { @@ -188,9 +180,9 @@ export class NgrxJsonApiEffects implements OnDestroy { mergeMap((action: LocalQueryInitAction) => { const query = action.payload; return this.store - .let(selectNgrxJsonApiZone(action.zoneId)) - .let(this.executeLocalQuery(query)) .pipe( + selectNgrxJsonApiZone(action.zoneId), + this.executeLocalQuery(query), map( results => new LocalQuerySuccessAction( @@ -219,17 +211,17 @@ export class NgrxJsonApiEffects implements OnDestroy { return (state$: Observable) => { let selected$: Observable; if (!query.type) { - return state$.map(() => Observable.throw('Unknown query')); + return state$.pipe(map(() => Observable.throw('Unknown query'))); } else if (query.type && query.id) { - selected$ = state$.let( + selected$ = state$.pipe( selectStoreResource({ type: query.type, id: query.id }) ); } else { selected$ = state$ - .let(selectStoreResourcesOfType(query.type)) .pipe( + selectStoreResourcesOfType(query.type), combineLatest( - state$.map(it => it.data), + state$.pipe(map(it => it.data)), ( resources: NgrxJsonApiStoreResources, storeData: NgrxJsonApiStoreData @@ -244,7 +236,7 @@ export class NgrxJsonApiEffects implements OnDestroy { ) ); } - return selected$.distinctUntilChanged(); + return selected$.pipe(distinctUntilChanged()); }; } @@ -439,8 +431,7 @@ export class NgrxJsonApiEffects implements OnDestroy { throw new Error('unknown state ' + pendingChange.state); } } - return of(...actions) - .concatAll() + return concat(...actions) .pipe( toArray(), map(actions => this.toApplyAction(actions, action.zoneId)) diff --git a/src/pipes.ts b/src/pipes.ts index 9eca9c5..7de1142 100644 --- a/src/pipes.ts +++ b/src/pipes.ts @@ -1,7 +1,6 @@ import { Pipe, PipeTransform } from '@angular/core'; -import { Observable } from 'rxjs/Observable'; -import 'rxjs/add/operator/let'; +import { Observable } from 'rxjs'; import { NgrxJsonApiService } from './services'; import { diff --git a/src/selectors.ts b/src/selectors.ts index 3bfa899..070ac72 100644 --- a/src/selectors.ts +++ b/src/selectors.ts @@ -1,19 +1,6 @@ import * as _ from 'lodash'; -import { Observable } from 'rxjs/Observable'; -import 'rxjs/add/observable/concat'; -import 'rxjs/add/observable/throw'; -import 'rxjs/add/operator/combineLatest'; -import 'rxjs/add/operator/concat'; -import 'rxjs/add/operator/concatMap'; -import 'rxjs/add/operator/distinctUntilChanged'; -import 'rxjs/add/operator/do'; -import 'rxjs/add/operator/filter'; -import 'rxjs/add/operator/let'; -import 'rxjs/add/operator/map'; -import 'rxjs/add/operator/mergeMap'; -import 'rxjs/add/observable/zip'; - +import { Observable } from 'rxjs'; import { filter, map } from 'rxjs/operators'; import { Store, select } from '@ngrx/store'; @@ -35,6 +22,7 @@ import { } from './interfaces'; import { denormaliseStoreResource, denormaliseStoreResources } from './utils'; + export function selectNgrxJson() { return (state$: Observable) => (>state$).pipe( @@ -50,9 +38,10 @@ export function selectNgrxJsonApiDefaultZone() { export function selectNgrxJsonApiZone(zoneId: string) { return (state$: Observable) => - (>state$) - .let(selectNgrxJson()) - .map((it: any) => it.zones[zoneId] as NgrxJsonApiZone); + (>state$).pipe( + selectNgrxJson(), + map((it: any) => it.zones[zoneId] as NgrxJsonApiZone) + ); } export function getNgrxJsonApiZone(state: any, zoneId: string) { @@ -63,7 +52,7 @@ export function selectStoreQuery( queryId: string ): (state: Observable) => Observable { return (state$: Observable) => { - return state$.map(state => state.queries[queryId]); + return state$.pipe(map(state => state.queries[queryId])); }; } @@ -73,20 +62,22 @@ export function selectStoreResourcesOfType( state: Observable ) => Observable { return (state$: Observable) => { - return state$ - .map(state => state.data) - .map(data => (data ? data[type] : undefined)); + return state$.pipe( + map(state => state.data), + map(data => (data ? data[type] : undefined)) + ); }; } export function selectStoreResource(identifier: ResourceIdentifier) { return (state$: Observable) => { - return state$ - .let(selectStoreResourcesOfType(identifier.type)) - .map( + return state$.pipe( + selectStoreResourcesOfType(identifier.type), + map( resources => (resources ? resources[identifier.id] : undefined) as StoreResource - ); + ) + ); }; } @@ -111,7 +102,7 @@ export function selectManyQueryResult( denormalize?: boolean ): (state: Observable) => Observable { return (state$: Observable) => { - return state$.map(state => { + return state$.pipe(map(state => { let storeQuery = state.queries[queryId]; if (!storeQuery) { return undefined; @@ -135,7 +126,7 @@ export function selectManyQueryResult( data: results as Array, }; } - }); + })); }; } @@ -144,7 +135,7 @@ export function selectOneQueryResult( denormalize?: boolean ): (state: Observable) => Observable { return (state$: Observable) => { - return state$.map(state => { + return state$.pipe(map(state => { let storeQuery = state.queries[queryId]; if (!storeQuery) { return undefined; @@ -176,7 +167,7 @@ export function selectOneQueryResult( }; return queryResult; } - }); + })); }; } @@ -184,7 +175,7 @@ export function selectOneQueryResult( * deprecated, to not use any longer */ export function getNgrxJsonApiStore(state$: Observable): Observable { - return state$.let(selectNgrxJsonApiDefaultZone()); + return state$.pipe(selectNgrxJsonApiDefaultZone()); } /** @@ -195,7 +186,7 @@ export class NgrxJsonApiSelectors { public getNgrxJsonApiStore$(): (state$: Observable) => Observable { return (state$: Observable): Observable => { - return state$.let(selectNgrxJsonApiDefaultZone()); + return state$.pipe(selectNgrxJsonApiDefaultZone()); }; } @@ -212,8 +203,10 @@ export class NgrxJsonApiSelectors { public getStoreResourceOfType$(type: string) { return (state$: Observable) => { return state$ - .let(this.getStoreData$()) - .map(resources => (resources ? resources[type] : undefined)); + .pipe( + this.getStoreData$(), + map(resources => (resources ? resources[type] : undefined)) + ); }; } @@ -241,9 +234,10 @@ export class NgrxJsonApiSelectors { public getPersistedResource$(identifier: ResourceIdentifier) { return (state$: Observable) => { - return state$ - .let(this.getStoreResource$(identifier)) - .map(it => (it ? it.persistedResource : undefined)); + return state$.pipe( + this.getStoreResource$(identifier), + map(it => (it ? it.persistedResource : undefined)) + ); }; } } diff --git a/src/services.ts b/src/services.ts index 52694ee..f9e5f33 100644 --- a/src/services.ts +++ b/src/services.ts @@ -1,7 +1,6 @@ import * as _ from 'lodash'; -import { Observable } from 'rxjs/Observable'; -import 'rxjs/add/operator/finally'; +import { Observable } from 'rxjs'; import { Store } from '@ngrx/store'; @@ -51,6 +50,7 @@ import { getDenormalisedValue, uuid, } from './utils'; +import { combineLatest, finalize, map } from 'rxjs/operators'; export interface FindOptions { query: Query; @@ -143,9 +143,10 @@ export class NgrxJsonApiZoneService { queryId: string, denormalize = false ): Observable { - return this.store - .let(selectNgrxJsonApiZone(this.zoneId)) - .let(selectManyQueryResult(queryId, denormalize)); + return this.store.pipe( + selectNgrxJsonApiZone(this.zoneId), + selectManyQueryResult(queryId, denormalize) + ); } /** @@ -158,9 +159,10 @@ export class NgrxJsonApiZoneService { queryId: string, denormalize = false ): Observable { - return this.store - .let(selectNgrxJsonApiZone(this.zoneId)) - .let(selectOneQueryResult(queryId, denormalize)); + return this.store.pipe( + selectNgrxJsonApiZone(this.zoneId), + selectOneQueryResult(queryId, denormalize) + ); } /** @@ -170,9 +172,10 @@ export class NgrxJsonApiZoneService { public selectStoreResource( identifier: ResourceIdentifier ): Observable { - return this.store - .let(selectNgrxJsonApiZone(this.zoneId)) - .let(selectStoreResource(identifier)); + return this.store.pipe( + selectNgrxJsonApiZone(this.zoneId), + selectStoreResource(identifier) + ); } /** @@ -182,9 +185,10 @@ export class NgrxJsonApiZoneService { public selectStoreResources( identifiers: ResourceIdentifier[] ): Observable { - return this.store - .let(selectNgrxJsonApiZone(this.zoneId)) - .let(selectStoreResources(identifiers)); + return this.store.pipe( + selectNgrxJsonApiZone(this.zoneId), + selectStoreResources(identifiers) + ); } /** @@ -367,7 +371,7 @@ export class NgrxJsonApiService extends NgrxJsonApiZoneService { public get storeSnapshot() { if (!this._storeSnapshot) { this.store - .let(selectNgrxJsonApiDefaultZone()) + .pipe(selectNgrxJsonApiDefaultZone()) .subscribe(it => (this._storeSnapshot = it as NgrxJsonApiStore)); if (!this._storeSnapshot) { @@ -403,9 +407,9 @@ export class NgrxJsonApiService extends NgrxJsonApiZoneService { } else { queryResult$ = this.selectOneResults(newQuery.queryId, denormalise); } - return >queryResult$.finally(() => + return >queryResult$.pipe(finalize(() => this.removeQuery(newQuery.queryId) - ); + )); } private uuid() { @@ -450,8 +454,8 @@ export class NgrxJsonApiService extends NgrxJsonApiZoneService { storeResource$: Observable, zoneId: string = this.zoneId ): Observable { - return storeResource$.combineLatest( - this.store.let(selectNgrxJsonApiZone(zoneId)).map(state => state.data), + return storeResource$.pipe(combineLatest( + this.store.pipe(selectNgrxJsonApiZone(zoneId), map(state => state.data)), ( storeResource: StoreResource | StoreResource[], storeData: NgrxJsonApiStoreData @@ -466,7 +470,7 @@ export class NgrxJsonApiService extends NgrxJsonApiZoneService { return denormaliseStoreResource(resource, storeData) as StoreResource; } } - ); + )); } public getDenormalisedPath(path: string, resourceType: string): string { diff --git a/yarn.lock b/yarn.lock index e0b0b7d..f0f7edd 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5271,11 +5271,6 @@ rollup@^0.55.1: version "0.55.3" resolved "https://registry.yarnpkg.com/rollup/-/rollup-0.55.3.tgz#0af082a766d51c3058430c8372442ff5207d8736" -rxjs-compat@~6.5.0: - version "6.5.5" - resolved "https://registry.yarnpkg.com/rxjs-compat/-/rxjs-compat-6.5.5.tgz#073c40510f29c45a2a5fc02dde87f8c3ad75f2c2" - integrity sha512-F42sssVbUyWH4vJswEo6m+Eh02xHv3q93n8S7nUJO58R7sbc3CvJIOts605zdaBhWa1xMB9aVSyqPqhQ5q3eXg== - rxjs@~6.5.0: version "6.5.5" resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.5.5.tgz#c5c884e3094c8cfee31bf27eb87e54ccfc87f9ec"