diff --git a/apps/docs/src/app/pages/docs/angular/store/implementation/index.md b/apps/docs/src/app/pages/docs/angular/store/implementation/index.md index 41385152..74c70f35 100644 --- a/apps/docs/src/app/pages/docs/angular/store/implementation/index.md +++ b/apps/docs/src/app/pages/docs/angular/store/implementation/index.md @@ -124,9 +124,9 @@ A short example can be found here The util returns an Observable for easy further chaining throughout the application. -### StoreService +### NgxStoreService -Just as the aforementioned `dispatchDataToStore` util, the `StoreService` abstraction works best in tandem with the `createStoreAssets` util. +Just as the aforementioned `dispatchDataToStore` util, the `NgxStoreService` abstraction works best in tandem with the `createStoreAssets` util. This abstraction provides easy access to the selectors that were generated by the assets. These are aimed to reduce the boilerplate and create a coherent store setup throughout your entire application. By passing the selector object to the methods, the abstraction will automatically handle the selection. @@ -137,7 +137,7 @@ This abstraction provides easy access to the selectors that were generated by th | selectErrorFromStore | Selects the error state of the provided data from the store | | selectErrorMessageFromStore | Selects the provided error data of the provided data from the store | -On top of that, the `StoreService` can automatically generate observables for each sub-slice in the provided store. By providing the store interface to the `StoreService` via generics and passing the generated selectors to the constructor, a state object is generated including all the necessary observables. +On top of that, the `NgxStoreService` can automatically generate observables for each sub-slice in the provided store. By providing the store interface to the `NgxStoreService` via generics and passing the generated selectors to the constructor, a state object is generated including all the necessary observables. A short example would be: @@ -154,7 +154,7 @@ export const { actions, reducers, selectors } = createStoreAssets('s ]); @Injectable() -export class StoreStateService extends StoreService { +export class StoreStateService extends NgxStoreService { constructor(protected readonly store: Store) { super(store, selectors); } diff --git a/apps/docs/src/app/pages/docs/angular/store/introduction/index.md b/apps/docs/src/app/pages/docs/angular/store/introduction/index.md index e6046650..c3322d1e 100644 --- a/apps/docs/src/app/pages/docs/angular/store/introduction/index.md +++ b/apps/docs/src/app/pages/docs/angular/store/introduction/index.md @@ -8,6 +8,6 @@ Each of the provided utils can be used individually, but we strongly advice to u As mentioned before, `ngx-store` works in tandem with `@ngrx`. The package aims to optimize the workflow for (complex) projects that currently already use this redux implementation. -With this in mind, our goal is to make this package as flexible as possible. We are aware that existing projects often already have their own approach to their store setup, and therefor we try to provide solutions that can be used when needed. Whilst we strongly suggest using the entire system for the optimal approach, several of our utils are entirely optional. The use of `handleEffect`, `dispatchDataToStore` and the `StoreService` is never mandatory and all utils are opt-in at any stage. +With this in mind, our goal is to make this package as flexible as possible. We are aware that existing projects often already have their own approach to their store setup, and therefor we try to provide solutions that can be used when needed. Whilst we strongly suggest using the entire system for the optimal approach, several of our utils are entirely optional. The use of `handleEffect`, `dispatchDataToStore` and the `NgxStoreService` is never mandatory and all utils are opt-in at any stage. Because of this approach, our implementation has to take into account these constraints and will therefore deviate from the standard redux implementation. diff --git a/apps/docs/src/app/pages/docs/angular/utils/abstracts/query-param-form-sync/index.md b/apps/docs/src/app/pages/docs/angular/utils/abstracts/query-param-form-sync/index.md index 98d0f0e8..b745d377 100644 --- a/apps/docs/src/app/pages/docs/angular/utils/abstracts/query-param-form-sync/index.md +++ b/apps/docs/src/app/pages/docs/angular/utils/abstracts/query-param-form-sync/index.md @@ -44,7 +44,7 @@ export class TableViewComponent extends NgxQueryParamFormSyncComponent< constructor( readonly route: ActivatedRoute, readonly router: Router, - readonly storeService: StoreService + readonly storeService: NgxStoreService ) { super(route, router); } diff --git a/apps/store-test/src/services/courses.service.ts b/apps/store-test/src/services/courses.service.ts index 15e0daa0..4a71e4ea 100644 --- a/apps/store-test/src/services/courses.service.ts +++ b/apps/store-test/src/services/courses.service.ts @@ -3,10 +3,10 @@ import { Store } from '@ngrx/store'; import { of } from 'rxjs'; import { switchMap } from 'rxjs/operators'; import { CoursesStore, actions, selectors } from '../store/courses.store'; -import { StoreService, dispatchDataToStore } from '@ngx/store'; +import { NgxStoreService, dispatchDataToStore } from '@ngx/store'; @Injectable() -export class CoursesService extends StoreService { +export class CoursesService extends NgxStoreService { constructor(protected readonly store: Store) { super(store, selectors); } diff --git a/libs/angular/store/README.md b/libs/angular/store/README.md index e9cee01d..cff6e3cf 100644 --- a/libs/angular/store/README.md +++ b/libs/angular/store/README.md @@ -26,7 +26,7 @@ For more information about the build process, authors, contributions and issues, As mentioned before, `ngx-store` works in tandem with `@ngrx`. The package aims to optimize the workflow for (complex) projects that currently already use this redux implementation. -With this in mind, our goal is to make this package as flexible as possible. We are aware that existing projects often already have their own approach to their store setup, and therefor we try to provide solutions that can be used when needed. Whilst we strongly suggest using the entire system for the optimal approach, several of our utils are entirely optional. The use of `handleEffect`, `dispatchDataToStore` and the `StoreService` is never mandatory and all utils are opt-in at any stage. +With this in mind, our goal is to make this package as flexible as possible. We are aware that existing projects often already have their own approach to their store setup, and therefor we try to provide solutions that can be used when needed. Whilst we strongly suggest using the entire system for the optimal approach, several of our utils are entirely optional. The use of `handleEffect`, `dispatchDataToStore` and the `NgxStoreService` is never mandatory and all utils are opt-in at any stage. Because of this approach, our implementation has to take into account these constraints and will therefore deviate from the standard redux implementation. diff --git a/libs/angular/store/src/lib/store/abstracts/store.service.ts b/libs/angular/store/src/lib/store/abstracts/store.service.ts index 8c145b5c..ca15e791 100644 --- a/libs/angular/store/src/lib/store/abstracts/store.service.ts +++ b/libs/angular/store/src/lib/store/abstracts/store.service.ts @@ -4,7 +4,7 @@ import { Observable } from 'rxjs'; import { NgxStoreSelectors, StoreFlowAssets, StoreState } from '../interfaces'; @Injectable() -export class StoreService { +export class NgxStoreService { /** * A wrapper object for the store state selectors */ @@ -76,7 +76,7 @@ export class StoreService { // Iben: If no selectors were provided, we throw an error informing the user if (!this.stateWrapper) { console.error( - 'NgxStore: No selectors were provided to the constructor of the StoreService extender. Without it, the state object cannot be created and will result in an error.' + 'NgxStore: No selectors were provided to the constructor of the NgxStoreService extender. Without it, the state object cannot be created and will result in an error.' ); return undefined; diff --git a/libs/angular/store/src/lib/store/spec/store-service.ts b/libs/angular/store/src/lib/store/spec/store-service.ts index 2ec324fc..d6b33fad 100644 --- a/libs/angular/store/src/lib/store/spec/store-service.ts +++ b/libs/angular/store/src/lib/store/spec/store-service.ts @@ -4,12 +4,12 @@ import { Observable } from 'rxjs'; import { switchMap } from 'rxjs/operators'; import { HttpClient } from '@angular/common/http'; -import { StoreService } from '../abstracts'; +import { NgxStoreService } from '../abstracts'; import { dispatchDataToStore } from '../utils'; import { DataType, actions, selectors } from './store-assets'; @Injectable() -export class SpecStoreService extends StoreService { +export class SpecStoreService extends NgxStoreService { public readonly channel$: Observable = this.selectFromStore( selectors.channel ); diff --git a/libs/angular/store/src/lib/store/spec/store-state.service.ts b/libs/angular/store/src/lib/store/spec/store-state.service.ts index 50f97e61..4f40a97b 100644 --- a/libs/angular/store/src/lib/store/spec/store-state.service.ts +++ b/libs/angular/store/src/lib/store/spec/store-state.service.ts @@ -8,7 +8,7 @@ import { createStoreAssets, dispatchDataToStore, } from '../utils'; -import { StoreService } from '../abstracts'; +import { NgxStoreService } from '../abstracts'; interface StoreState extends StoreFlowAssets { data: EntityStoreAssets; @@ -28,7 +28,7 @@ export const { actions, reducers, selectors } = createStoreAssets('s ]); @Injectable() -export class StoreStateService extends StoreService { +export class StoreStateService extends NgxStoreService { constructor(protected readonly store: Store) { super(store, selectors); } diff --git a/libs/angular/store/src/lib/store/spec/store.spec.ts b/libs/angular/store/src/lib/store/spec/store.spec.ts index a9679e13..c23367b2 100644 --- a/libs/angular/store/src/lib/store/spec/store.spec.ts +++ b/libs/angular/store/src/lib/store/spec/store.spec.ts @@ -18,7 +18,7 @@ export const mockVideos = [ { id: 'two', url: 'hello.world' }, ]; -// Iben: These tests test the StoreService abstraction, dispatchDataToStore and StoreAssets in one go. +// Iben: These tests test the NgxStoreService abstraction, dispatchDataToStore and StoreAssets in one go. // TODO: Find a way to add an error flow test. describe('NgxStore', () => { let service: SpecStoreService; diff --git a/libs/angular/store/src/public-api.ts b/libs/angular/store/src/public-api.ts index 7d97a360..69b89ae2 100644 --- a/libs/angular/store/src/public-api.ts +++ b/libs/angular/store/src/public-api.ts @@ -1,7 +1,7 @@ /* * Public API Surface of store */ -export { StoreService } from './lib/store/abstracts'; +export { NgxStoreService } from './lib/store/abstracts'; export { BaseStoreAssets, EntityStoreAssets, diff --git a/libs/angular/utils/src/lib/abstracts/query-param-form-sync/query-param-form-sync.component.abstract.md b/libs/angular/utils/src/lib/abstracts/query-param-form-sync/query-param-form-sync.component.abstract.md index 6a2f9b14..a20ed244 100644 --- a/libs/angular/utils/src/lib/abstracts/query-param-form-sync/query-param-form-sync.component.abstract.md +++ b/libs/angular/utils/src/lib/abstracts/query-param-form-sync/query-param-form-sync.component.abstract.md @@ -42,7 +42,7 @@ export class TableViewComponent extends NgxQueryParamFormSyncComponent< constructor( readonly route: ActivatedRoute, readonly router: Router, - readonly storeService: StoreService + readonly storeService: NgxStoreService ) { super(route, router); }