@daffodil/geography 0.77.0 → 0.79.0

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.
Files changed (32) hide show
  1. package/driver/in-memory/backend/geography.service.d.ts +3 -2
  2. package/driver/in-memory/collection-name.const.d.ts +1 -0
  3. package/driver/in-memory/drivers/geography.service.d.ts +4 -3
  4. package/driver/index.d.ts +1 -2
  5. package/driver/interfaces/geography-service.interface.d.ts +1 -2
  6. package/driver/public_api.d.ts +2 -0
  7. package/esm2022/driver/in-memory/backend/geography.service.mjs +3 -1
  8. package/esm2022/driver/in-memory/collection-name.const.mjs +2 -0
  9. package/esm2022/driver/in-memory/drivers/geography-driver.module.mjs +6 -6
  10. package/esm2022/driver/in-memory/drivers/geography.service.mjs +10 -6
  11. package/esm2022/driver/index.mjs +2 -3
  12. package/esm2022/driver/interfaces/geography-service.interface.mjs +7 -3
  13. package/esm2022/driver/magento/geography-driver.module.mjs +6 -17
  14. package/esm2022/driver/public_api.mjs +3 -0
  15. package/esm2022/driver/testing/drivers/geography-driver.module.mjs +3 -6
  16. package/esm2022/models/address.mjs +1 -1
  17. package/esm2022/state/injection-tokens/error-matcher.token.mjs +7 -3
  18. package/esm2022/state/injection-tokens/public_api.mjs +2 -2
  19. package/fesm2022/daffodil-geography-driver-in-memory.mjs +35 -32
  20. package/fesm2022/daffodil-geography-driver-in-memory.mjs.map +1 -1
  21. package/fesm2022/daffodil-geography-driver-magento.mjs +5 -16
  22. package/fesm2022/daffodil-geography-driver-magento.mjs.map +1 -1
  23. package/fesm2022/daffodil-geography-driver-testing.mjs +2 -5
  24. package/fesm2022/daffodil-geography-driver-testing.mjs.map +1 -1
  25. package/fesm2022/daffodil-geography-driver.mjs +7 -4
  26. package/fesm2022/daffodil-geography-driver.mjs.map +1 -1
  27. package/fesm2022/daffodil-geography-state.mjs +9 -4
  28. package/fesm2022/daffodil-geography-state.mjs.map +1 -1
  29. package/models/address.d.ts +1 -1
  30. package/package.json +1 -1
  31. package/state/injection-tokens/error-matcher.token.d.ts +1 -2
  32. package/state/injection-tokens/public_api.d.ts +1 -1
@@ -1,5 +1,5 @@
1
1
  import { InMemoryDbService, RequestInfo } from 'angular-in-memory-web-api';
2
- import { DaffInMemoryDataServiceInterface } from '@daffodil/core/testing';
2
+ import { DaffInMemorySingleRouteableBackend } from '@daffodil/driver/in-memory';
3
3
  import { DaffCountry } from '@daffodil/geography';
4
4
  import { DaffCountryFactory, DaffSubdivisionFactory } from '@daffodil/geography/testing';
5
5
  import * as i0 from "@angular/core";
@@ -8,9 +8,10 @@ import * as i0 from "@angular/core";
8
8
  *
9
9
  * @inheritdoc
10
10
  */
11
- export declare class DaffInMemoryBackendGeographyService implements InMemoryDbService, DaffInMemoryDataServiceInterface {
11
+ export declare class DaffInMemoryBackendGeographyService implements InMemoryDbService, DaffInMemorySingleRouteableBackend {
12
12
  private countryFactory;
13
13
  private subdivisionFactory;
14
+ readonly collectionName = "countries";
14
15
  countries: DaffCountry[];
15
16
  constructor(countryFactory: DaffCountryFactory, subdivisionFactory: DaffSubdivisionFactory);
16
17
  /**
@@ -0,0 +1 @@
1
+ export declare const DAFF_GEOGRAPHY_IN_MEMORY_COLLECTION_NAME = "countries";
@@ -1,15 +1,16 @@
1
1
  import { HttpClient } from '@angular/common/http';
2
+ import { InMemoryBackendConfig } from 'angular-in-memory-web-api';
2
3
  import { Observable } from 'rxjs';
4
+ import { DaffInMemoryDriverBase } from '@daffodil/driver/in-memory';
3
5
  import { DaffCountry } from '@daffodil/geography';
4
6
  import { DaffGeographyServiceInterface } from '@daffodil/geography/driver';
5
7
  import * as i0 from "@angular/core";
6
8
  /**
7
9
  * @inheritdoc
8
10
  */
9
- export declare class DaffInMemoryGeographyService implements DaffGeographyServiceInterface<DaffCountry> {
11
+ export declare class DaffInMemoryGeographyService extends DaffInMemoryDriverBase implements DaffGeographyServiceInterface<DaffCountry> {
10
12
  private http;
11
- url: string;
12
- constructor(http: HttpClient);
13
+ constructor(http: HttpClient, config: InMemoryBackendConfig);
13
14
  get(countryId: DaffCountry['id']): Observable<DaffCountry>;
14
15
  list(): Observable<DaffCountry[]>;
15
16
  static ɵfac: i0.ɵɵFactoryDeclaration<DaffInMemoryGeographyService, never>;
package/driver/index.d.ts CHANGED
@@ -1,2 +1 @@
1
- export * from './errors/public_api';
2
- export { DaffGeographyServiceInterface, DaffGeographyDriver, } from './interfaces/geography-service.interface';
1
+ export * from './public_api';
@@ -1,7 +1,6 @@
1
- import { InjectionToken } from '@angular/core';
2
1
  import { Observable } from 'rxjs';
3
2
  import { DaffCountry } from '@daffodil/geography';
4
- export declare const DaffGeographyDriver: InjectionToken<DaffGeographyServiceInterface<DaffCountry>>;
3
+ export declare const DaffGeographyDriver: import("@angular/core").InjectionToken<DaffGeographyServiceInterface<DaffCountry>>, provideDaffGeographyDriver: <R extends DaffGeographyServiceInterface<DaffCountry> = DaffGeographyServiceInterface<DaffCountry>>(klass: import("@angular/core").Type<R>) => import("@angular/core").ExistingProvider;
5
4
  export interface DaffGeographyServiceInterface<T extends DaffCountry = DaffCountry> {
6
5
  /**
7
6
  * Retrieves the list of countries available to the given store.
@@ -0,0 +1,2 @@
1
+ export * from './errors/public_api';
2
+ export { DaffGeographyServiceInterface, DaffGeographyDriver, provideDaffGeographyDriver, } from './interfaces/geography-service.interface';
@@ -1,6 +1,7 @@
1
1
  import { Injectable } from '@angular/core';
2
2
  import { STATUS, } from 'angular-in-memory-web-api';
3
3
  import { DaffCountryFactory, DaffSubdivisionFactory, } from '@daffodil/geography/testing';
4
+ import { DAFF_GEOGRAPHY_IN_MEMORY_COLLECTION_NAME } from '../collection-name.const';
4
5
  import * as i0 from "@angular/core";
5
6
  import * as i1 from "@daffodil/geography/testing";
6
7
  /**
@@ -12,6 +13,7 @@ export class DaffInMemoryBackendGeographyService {
12
13
  constructor(countryFactory, subdivisionFactory) {
13
14
  this.countryFactory = countryFactory;
14
15
  this.subdivisionFactory = subdivisionFactory;
16
+ this.collectionName = DAFF_GEOGRAPHY_IN_MEMORY_COLLECTION_NAME;
15
17
  this.countries = this.countryFactory.createMany(5);
16
18
  this.countries.forEach(country => country.subdivisions = this.subdivisionFactory.createMany(5));
17
19
  }
@@ -56,4 +58,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.2", ngImpor
56
58
  providedIn: 'root',
57
59
  }]
58
60
  }], ctorParameters: () => [{ type: i1.DaffCountryFactory }, { type: i1.DaffSubdivisionFactory }] });
59
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ2VvZ3JhcGh5LnNlcnZpY2UuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9saWJzL2dlb2dyYXBoeS9kcml2ZXIvaW4tbWVtb3J5L3NyYy9iYWNrZW5kL2dlb2dyYXBoeS5zZXJ2aWNlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxVQUFVLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFDM0MsT0FBTyxFQUdMLE1BQU0sR0FDUCxNQUFNLDJCQUEyQixDQUFDO0FBSW5DLE9BQU8sRUFDTCxrQkFBa0IsRUFDbEIsc0JBQXNCLEdBQ3ZCLE1BQU0sNkJBQTZCLENBQUM7OztBQUVyQzs7OztHQUlHO0FBSUgsTUFBTSxPQUFPLG1DQUFtQztJQUc5QyxZQUNVLGNBQWtDLEVBQ2xDLGtCQUEwQztRQUQxQyxtQkFBYyxHQUFkLGNBQWMsQ0FBb0I7UUFDbEMsdUJBQWtCLEdBQWxCLGtCQUFrQixDQUF3QjtRQUVsRCxJQUFJLENBQUMsU0FBUyxHQUFHLElBQUksQ0FBQyxjQUFjLENBQUMsVUFBVSxDQUFDLENBQUMsQ0FBQyxDQUFDO1FBQ25ELElBQUksQ0FBQyxTQUFTLENBQUMsT0FBTyxDQUFDLE9BQU8sQ0FBQyxFQUF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1xuICAgIHJldHVybiB0aGlzLmNvdW50cmllcy5maW5kKGNvdW50cnkgPT4gY291bnRyeS5pZCA9PT0gcmVxSW5mby5pZCk7XG4gIH1cblxuICBwcml2YXRlIGxpc3RDb3VudHJpZXMocmVxSW5mbzogUmVxdWVzdEluZm8pIHtcbiAgICByZXR1cm4gdGhpcy5jb3VudHJpZXM7XG4gIH1cbn1cbiJdfQ==
@@ -0,0 +1,2 @@
1
+ export const DAFF_GEOGRAPHY_IN_MEMORY_COLLECTION_NAME = 'countries';
2
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29sbGVjdGlvbi1uYW1lLmNvbnN0LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vbGlicy9nZW9ncmFwaHkvZHJpdmVyL2luLW1lbW9yeS9zcmMvY29sbGVjdGlvbi1uYW1lLmNvbnN0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE1BQU0sQ0FBQyxNQUFNLHdDQUF3QyxHQUFHLFdBQVcsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCBjb25zdCBEQUZGX0dFT0dSQVBIWV9JTl9NRU1PUllfQ09MTEVDVElPTl9OQU1FID0gJ2NvdW50cmllcyc7XG4iXX0=
@@ -1,17 +1,17 @@
1
1
  import { CommonModule } from '@angular/common';
2
2
  import { NgModule, } from '@angular/core';
3
- import { DaffGeographyDriver } from '@daffodil/geography/driver';
3
+ import { provideDaffInMemoryBackends } from '@daffodil/driver/in-memory';
4
+ import { provideDaffGeographyDriver } from '@daffodil/geography/driver';
4
5
  import { DaffInMemoryGeographyService } from './geography.service';
6
+ import { DaffInMemoryBackendGeographyService } from '../backend/geography.service';
5
7
  import * as i0 from "@angular/core";
6
8
  export class DaffGeographyInMemoryDriverModule {
7
9
  static forRoot() {
8
10
  return {
9
11
  ngModule: DaffGeographyInMemoryDriverModule,
10
12
  providers: [
11
- {
12
- provide: DaffGeographyDriver,
13
- useExisting: DaffInMemoryGeographyService,
14
- },
13
+ provideDaffGeographyDriver(DaffInMemoryGeographyService),
14
+ provideDaffInMemoryBackends(DaffInMemoryBackendGeographyService),
15
15
  ],
16
16
  };
17
17
  }
@@ -27,4 +27,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.2", ngImpor
27
27
  ],
28
28
  }]
29
29
  }] });
30
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ2VvZ3JhcGh5LWRyaXZlci5tb2R1bGUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9saWJzL2dlb2dyYXBoeS9kcml2ZXIvaW4tbWVtb3J5L3NyYy9kcml2ZXJzL2dlb2dyYXBoeS1kcml2ZXIubW9kdWxlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxZQUFZLEVBQUUsTUFBTSxpQkFBaUIsQ0FBQztBQUMvQyxPQUFPLEVBQ0wsUUFBUSxHQUVULE1BQU0sZUFBZSxDQUFDO0FBRXZCLE9BQU8sRUFBRSxtQkFBbUIsRUFBRSxNQUFNLDRCQUE0QixDQUFDO0FBRWpFLE9BQU8sRUFBRSw0QkFBNEIsRUFBRSxNQUFNLHFCQUFxQixDQUFDOztBQU9uRSxNQUFNLE9BQU8saUNBQWlDO0lBQzVDLE1BQU0sQ0FBQyxPQUFPO1FBQ1osT0FBTztZQUNMLFFBQVEsRUFBRSxpQ0FBaUM7WUFDM0MsU0FBUyxFQUFFO2dCQUNUO29CQUNFLE9BQU8sRUFBRSxtQkFBbUI7b0JBQzVCLFdBQVcsRUFBRSw0QkFBNEI7aUJBQzFDO2FBQ0Y7U0FDRixDQUFDO0lBQ0osQ0FBQztpSUFYVSxpQ0FBaUM7a0lBQWpDLGlDQUFpQyxZQUgxQyxZQUFZO2t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ICAgICBwcm92aWRlRGFmZkluTWVtb3J5QmFja2VuZHMoRGFmZkluTWVtb3J5QmFja2VuZEdlb2dyYXBoeVNlcnZpY2UpLFxuICAgICAgXSxcbiAgICB9O1xuICB9XG59XG4iXX0=
@@ -1,17 +1,21 @@
1
1
  import { HttpClient } from '@angular/common/http';
2
2
  import { Injectable } from '@angular/core';
3
+ import { InMemoryBackendConfig } from 'angular-in-memory-web-api';
3
4
  import { throwError, } from 'rxjs';
4
5
  import { catchError, map, } from 'rxjs/operators';
6
+ import { DaffInMemoryDriverBase } from '@daffodil/driver/in-memory';
5
7
  import { DaffCountryNotFoundError, } from '@daffodil/geography/driver';
8
+ import { DAFF_GEOGRAPHY_IN_MEMORY_COLLECTION_NAME } from '../collection-name.const';
6
9
  import * as i0 from "@angular/core";
7
10
  import * as i1 from "@angular/common/http";
11
+ import * as i2 from "angular-in-memory-web-api";
8
12
  /**
9
13
  * @inheritdoc
10
14
  */
11
- export class DaffInMemoryGeographyService {
12
- constructor(http) {
15
+ export class DaffInMemoryGeographyService extends DaffInMemoryDriverBase {
16
+ constructor(http, config) {
17
+ super(config, DAFF_GEOGRAPHY_IN_MEMORY_COLLECTION_NAME);
13
18
  this.http = http;
14
- this.url = '/api/countries';
15
19
  }
16
20
  get(countryId) {
17
21
  return this.http.get(`${this.url}/${countryId}`).pipe(catchError((error) => throwError(() => new DaffCountryNotFoundError('Country could not be found'))), map(result => result));
@@ -19,7 +23,7 @@ export class DaffInMemoryGeographyService {
19
23
  list() {
20
24
  return this.http.get(`${this.url}/`);
21
25
  }
22
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: DaffInMemoryGeographyService, deps: [{ token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable }); }
26
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: DaffInMemoryGeographyService, deps: [{ token: i1.HttpClient }, { token: i2.InMemoryBackendConfig }], target: i0.ɵɵFactoryTarget.Injectable }); }
23
27
  /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: DaffInMemoryGeographyService, providedIn: 'root' }); }
24
28
  }
25
29
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: DaffInMemoryGeographyService, decorators: [{
@@ -27,5 +31,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.2", ngImpor
27
31
  args: [{
28
32
  providedIn: 'root',
29
33
  }]
30
- }], ctorParameters: () => [{ type: i1.HttpClient }] });
31
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ2VvZ3JhcGh5LnNlcnZpY2UuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9saWJzL2dlb2dyYXBoeS9kcml2ZXIvaW4tbWVtb3J5L3NyYy9kcml2ZXJzL2dlb2dyYXBoeS5zZXJ2aWNlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxVQUFVLEVBQUUsTUFBTSxzQkFBc0IsQ0FBQztBQUNsRCxPQUFPLEVBQUUsVUFBVSxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBQzNDLE9BQU8sRUFFTCxVQUFVLEdBQ1gsTUFBTSxNQUFNLENBQUM7QUFDZCxPQUFPLEVBQ0wsVUFBVSxFQUNWLEdBQUcsR0FDSixNQUFNLGdCQUFnQixDQUFDO0FBR3hCLE9BQU8sRUFFTCx3QkFBd0IsR0FDekIsTUFBTSw0QkFBNEIsQ0FBQzs7O0FBRXBDOztHQUVHO0FBSUgsTUFBTSxPQUFPLDRCQUE0QjtJQUd2QyxZQUFvQixJQUFnQjtRQUFoQixTQUFJLEdBQUosSUFBSSx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lsL2dlb2dyYXBoeSc7XG5pbXBvcnQge1xuICBEYWZmR2VvZ3JhcGh5U2VydmljZUludGVyZmFjZSxcbiAgRGFmZkNvdW50cnlOb3RGb3VuZEVycm9yLFxufSBmcm9tICdAZGFmZm9kaWwvZ2VvZ3JhcGh5L2RyaXZlcic7XG5cbi8qKlxuICogQGluaGVyaXRkb2NcbiAqL1xuQEluamVjdGFibGUoe1xuICBwcm92aWRlZEluOiAncm9vdCcsXG59KVxuZXhwb3J0IGNsYXNzIERhZmZJbk1lbW9yeUdlb2dyYXBoeVNlcnZpY2UgaW1wbGVtZW50cyBEYWZmR2VvZ3JhcGh5U2VydmljZUludGVyZmFjZTxEYWZmQ291bnRyeT4ge1xuICB1cmwgPSAnL2FwaS9jb3VudHJpZXMnO1xuXG4gIGNvbnN0cnVjdG9yKHByaXZhdGUgaHR0cDogSHR0cENsaWVudCkge31cblxuICBnZXQoY291bnRyeUlkOiBEYWZmQ291bnRyeVsnaWQnXSk6IE9ic2VydmFibGU8RGFmZkNvdW50cnk+IHtcbiAgICByZXR1cm4gdGhpcy5odHRwLmdldDxEYWZmQ291bnRyeT4oYCR7dGhpcy51cmx9LyR7Y291bnRyeUlkfWApLnBpcGUoXG4gICAgICBjYXRjaEVycm9yKChlcnJvcjogRXJyb3IpID0+IHRocm93RXJyb3IoKCkgPT4gbmV3IERhZmZDb3VudHJ5Tm90Rm91bmRFcnJvcignQ291bnRyeSBjb3VsZCBub3QgYmUgZm91bmQnKSkpLFxuICAgICAgbWFwKHJlc3VsdCA9PiByZXN1bHQpLFxuICAgICk7XG4gIH1cblxuICBsaXN0KCk6IE9ic2VydmFibGU8RGFmZkNvdW50cnlbXT4ge1xuICAgIHJldHVybiB0aGlzLmh0dHAuZ2V0PERhZmZDb3VudHJ5W10+KGAke3RoaXMudXJsfS9gKTtcbiAgfVxufVxuIl19
34
+ }], ctorParameters: () => [{ type: i1.HttpClient }, { type: i2.InMemoryBackendConfig }] });
35
+ //# sourceMappingURL=data:application/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udHJ5IGNvdWxkIG5vdCBiZSBmb3VuZCcpKSksXG4gICAgICBtYXAocmVzdWx0ID0+IHJlc3VsdCksXG4gICAgKTtcbiAgfVxuXG4gIGxpc3QoKTogT2JzZXJ2YWJsZTxEYWZmQ291bnRyeVtdPiB7XG4gICAgcmV0dXJuIHRoaXMuaHR0cC5nZXQ8RGFmZkNvdW50cnlbXT4oYCR7dGhpcy51cmx9L2ApO1xuICB9XG59XG4iXX0=
@@ -1,3 +1,2 @@
1
- export * from './errors/public_api';
2
- export { DaffGeographyDriver, } from './interfaces/geography-service.interface';
3
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9saWJzL2dlb2dyYXBoeS9kcml2ZXIvc3JjL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLGNBQWMscUJBQXFCLENBQUM7QUFDcEMsT0FBTyxFQUVMLG1CQUFtQixHQUNwQixNQUFNLDBDQUEwQyxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0ICogZnJvbSAnLi9lcnJvcnMvcHVibGljX2FwaSc7XG5leHBvcnQge1xuICBEYWZmR2VvZ3JhcGh5U2VydmljZUludGVyZmFjZSxcbiAgRGFmZkdlb2dyYXBoeURyaXZlcixcbn0gZnJvbSAnLi9pbnRlcmZhY2VzL2dlb2dyYXBoeS1zZXJ2aWNlLmludGVyZmFjZSc7XG4iXX0=
1
+ export * from './public_api';
2
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9saWJzL2dlb2dyYXBoeS9kcml2ZXIvc3JjL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLGNBQWMsY0FBYyxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0ICogZnJvbSAnLi9wdWJsaWNfYXBpJztcbiJdfQ==
@@ -1,3 +1,7 @@
1
- import { InjectionToken } from '@angular/core';
2
- export const DaffGeographyDriver = new InjectionToken('DaffGeographyDriver');
3
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ2VvZ3JhcGh5LXNlcnZpY2UuaW50ZXJmYWNlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vbGlicy9nZW9ncmFwaHkvZHJpdmVyL3NyYy9pbnRlcmZhY2VzL2dlb2dyYXBoeS1zZXJ2aWNlLmludGVyZmFjZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsY0FBYyxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBSy9DLE1BQU0sQ0FBQyxNQUFNLG1CQUFtQixHQUFHLElBQUksY0FBYyxDQUFnQyxxQkFBcUIsQ0FBQyxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgSW5qZWN0aW9uVG9rZW4gfSBmcm9tICdAYW5ndWxhci9jb3JlJztcbmltcG9ydCB7IE9ic2VydmFibGUgfSBmcm9tICdyeGpzJztcblxuaW1wb3J0IHsgRGFmZkNvdW50cnkgfSBmcm9tICdAZGFmZm9kaWwvZ2VvZ3JhcGh5JztcblxuZXhwb3J0IGNvbnN0IERhZmZHZW9ncmFwaHlEcml2ZXIgPSBuZXcgSW5qZWN0aW9uVG9rZW48RGFmZkdlb2dyYXBoeVNlcnZpY2VJbnRlcmZhY2U+KCdEYWZmR2VvZ3JhcGh5RHJpdmVyJyk7XG5cbmV4cG9ydCBpbnRlcmZhY2UgRGFmZkdlb2dyYXBoeVNlcnZpY2VJbnRlcmZhY2U8VCBleHRlbmRzIERhZmZDb3VudHJ5ID0gRGFmZkNvdW50cnk+IHtcbiAgLyoqXG4gICAqIFJldHJpZXZlcyB0aGUgbGlzdCBvZiBjb3VudHJpZXMgYXZhaWxhYmxlIHRvIHRoZSBnaXZlbiBzdG9yZS5cbiAgICovXG4gIGxpc3QoKTogT2JzZXJ2YWJsZTxUW10+O1xuXG4gIC8qKlxuICAgKiBSZXRyaWV2ZSBwcmVjaXNlIGluZm9ybWF0aW9uIGFib3V0IGEgc3BlY2lmaWMgY291bnRyeS5cbiAgICovXG4gIGdldChpZDogVFsnaWQnXSk6IE9ic2VydmFibGU8VD47XG59XG4iXX0=
1
+ import { createSingletonInjectionToken } from '@daffodil/core';
2
+ export const { token: DaffGeographyDriver,
3
+ /**
4
+ * Provider function for {@link DaffGeographyDriver}.
5
+ */
6
+ provider: provideDaffGeographyDriver, } = createSingletonInjectionToken('DaffGeographyDriver');
7
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ2VvZ3JhcGh5LXNlcnZpY2UuaW50ZXJmYWNlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vbGlicy9nZW9ncmFwaHkvZHJpdmVyL3NyYy9pbnRlcmZhY2VzL2dlb2dyYXBoeS1zZXJ2aWNlLmludGVyZmFjZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFFQSxPQUFPLEVBQUUsNkJBQTZCLEVBQUUsTUFBTSxnQkFBZ0IsQ0FBQztBQUcvRCxNQUFNLENBQUMsTUFBTSxFQUNYLEtBQUssRUFBRSxtQkFBbUI7QUFDMUI7O0dBRUc7QUFDSCxRQUFRLEVBQUUsMEJBQTBCLEdBQ3JDLEdBQUcsNkJBQTZCLENBQWdDLHFCQUFxQixDQUFDLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBPYnNlcnZhYmxlIH0gZnJvbSAncnhqcyc7XG5cbmltcG9ydCB7IGNyZWF0ZVNpbmdsZXRvbkluamVjdGlvblRva2VuIH0gZnJvbSAnQGRhZmZvZGlsL2NvcmUnO1xuaW1wb3J0IHsgRGFmZkNvdW50cnkgfSBmcm9tICdAZGFmZm9kaWwvZ2VvZ3JhcGh5JztcblxuZXhwb3J0IGNvbnN0IHtcbiAgdG9rZW46IERhZmZHZW9ncmFwaHlEcml2ZXIsXG4gIC8qKlxuICAgKiBQcm92aWRlciBmdW5jdGlvbiBmb3Ige0BsaW5rIERhZmZHZW9ncmFwaHlEcml2ZXJ9LlxuICAgKi9cbiAgcHJvdmlkZXI6IHByb3ZpZGVEYWZmR2VvZ3JhcGh5RHJpdmVyLFxufSA9IGNyZWF0ZVNpbmdsZXRvbkluamVjdGlvblRva2VuPERhZmZHZW9ncmFwaHlTZXJ2aWNlSW50ZXJmYWNlPignRGFmZkdlb2dyYXBoeURyaXZlcicpO1xuXG5leHBvcnQgaW50ZXJmYWNlIERhZmZHZW9ncmFwaHlTZXJ2aWNlSW50ZXJmYWNlPFQgZXh0ZW5kcyBEYWZmQ291bnRyeSA9IERhZmZDb3VudHJ5PiB7XG4gIC8qKlxuICAgKiBSZXRyaWV2ZXMgdGhlIGxpc3Qgb2YgY291bnRyaWVzIGF2YWlsYWJsZSB0byB0aGUgZ2l2ZW4gc3RvcmUuXG4gICAqL1xuICBsaXN0KCk6IE9ic2VydmFibGU8VFtdPjtcblxuICAvKipcbiAgICogUmV0cmlldmUgcHJlY2lzZSBpbmZvcm1hdGlvbiBhYm91dCBhIHNwZWNpZmljIGNvdW50cnkuXG4gICAqL1xuICBnZXQoaWQ6IFRbJ2lkJ10pOiBPYnNlcnZhYmxlPFQ+O1xufVxuIl19
@@ -1,7 +1,7 @@
1
1
  import { CommonModule } from '@angular/common';
2
2
  import { NgModule, } from '@angular/core';
3
- import { DAFF_MAGENTO_CACHEABLE_OPERATIONS } from '@daffodil/driver/magento';
4
- import { DaffGeographyDriver } from '@daffodil/geography/driver';
3
+ import { provideDaffMagentoCacheableOperation } from '@daffodil/driver/magento';
4
+ import { provideDaffGeographyDriver } from '@daffodil/geography/driver';
5
5
  import { DaffGeographyMagentoService } from './geography.service';
6
6
  import { MAGENTO_GET_COUNTRIES_QUERY_NAME, MAGENTO_GET_COUNTRY_QUERY_NAME, } from './queries/public_api';
7
7
  import * as i0 from "@angular/core";
@@ -10,20 +10,9 @@ export class DaffGeographyMagentoDriverModule {
10
10
  return {
11
11
  ngModule: DaffGeographyMagentoDriverModule,
12
12
  providers: [
13
- {
14
- provide: DaffGeographyDriver,
15
- useExisting: DaffGeographyMagentoService,
16
- },
17
- {
18
- provide: DAFF_MAGENTO_CACHEABLE_OPERATIONS,
19
- useValue: MAGENTO_GET_COUNTRY_QUERY_NAME,
20
- multi: true,
21
- },
22
- {
23
- provide: DAFF_MAGENTO_CACHEABLE_OPERATIONS,
24
- useValue: MAGENTO_GET_COUNTRIES_QUERY_NAME,
25
- multi: true,
26
- },
13
+ provideDaffGeographyDriver(DaffGeographyMagentoService),
14
+ provideDaffMagentoCacheableOperation(MAGENTO_GET_COUNTRY_QUERY_NAME),
15
+ provideDaffMagentoCacheableOperation(MAGENTO_GET_COUNTRIES_QUERY_NAME),
27
16
  ],
28
17
  };
29
18
  }
@@ -39,4 +28,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.2", ngImpor
39
28
  ],
40
29
  }]
41
30
  }] });
42
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ2VvZ3JhcGh5LWRyaXZlci5tb2R1bGUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9saWJzL2dlb2dyYXBoeS9kcml2ZXIvbWFnZW50by9zcmMvZ2VvZ3JhcGh5LWRyaXZlci5tb2R1bGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFlBQVksRUFBRSxNQUFNLGlCQUFpQixDQUFDO0FBQy9DLE9BQU8sRUFDTCxRQUF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uQE5nTW9kdWxlKHtcbiAgaW1wb3J0czogW1xuICAgIENvbW1vbk1vZHVsZSxcbiAgXSxcbn0pXG5leHBvcnQgY2xhc3MgRGFmZkdlb2dyYXBoeU1hZ2VudG9Ecml2ZXJNb2R1bGUge1xuICBzdGF0aWMgZm9yUm9vdCgpOiBNb2R1bGVXaXRoUHJvdmlkZXJzPERhZmZHZW9ncmFwaHlNYWdlbnRvRHJpdmVyTW9kdWxlPiB7XG4gICAgcmV0dXJuIHtcbiAgICAgIG5nTW9kdWxlOiBEYWZmR2VvZ3JhcGh5TWFnZW50b0RyaXZlck1vZHVsZSxcbiAgICAgIHByb3ZpZGVyczogW1xuICAgICAgICBwcm92aWRlRGFmZkdlb2dyYXBoeURyaXZlcihEYWZmR2VvZ3JhcGh5TWFnZW50b1NlcnZpY2UpLFxuICAgICAgICBwcm92aWRlRGFmZk1hZ2VudG9DYWNoZWFibGVPcGVyYXRpb24oTUFHRU5UT19HRVRfQ09VTlRSWV9RVUVSWV9OQU1FKSxcbiAgICAgICAgcHJvdmlkZURhZmZNYWdlbnRvQ2FjaGVhYmxlT3BlcmF0aW9uKE1BR0VOVE9fR0VUX0NPVU5UUklFU19RVUVSWV9OQU1FKSxcbiAgICAgIF0sXG4gICAgfTtcbiAgfVxufVxuIl19
@@ -0,0 +1,3 @@
1
+ export * from './errors/public_api';
2
+ export { DaffGeographyDriver, provideDaffGeographyDriver, } from './interfaces/geography-service.interface';
3
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljX2FwaS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYnMvZ2VvZ3JhcGh5L2RyaXZlci9zcmMvcHVibGljX2FwaS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxjQUFjLHFCQUFxQixDQUFDO0FBQ3BDLE9BQU8sRUFFTCxtQkFBbUIsRUFDbkIsMEJBQTBCLEdBQzNCLE1BQU0sMENBQTBDLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgKiBmcm9tICcuL2Vycm9ycy9wdWJsaWNfYXBpJztcbmV4cG9ydCB7XG4gIERhZmZHZW9ncmFwaHlTZXJ2aWNlSW50ZXJmYWNlLFxuICBEYWZmR2VvZ3JhcGh5RHJpdmVyLFxuICBwcm92aWRlRGFmZkdlb2dyYXBoeURyaXZlcixcbn0gZnJvbSAnLi9pbnRlcmZhY2VzL2dlb2dyYXBoeS1zZXJ2aWNlLmludGVyZmFjZSc7XG4iXX0=
@@ -1,6 +1,6 @@
1
1
  import { CommonModule } from '@angular/common';
2
2
  import { NgModule, } from '@angular/core';
3
- import { DaffGeographyDriver } from '@daffodil/geography/driver';
3
+ import { provideDaffGeographyDriver } from '@daffodil/geography/driver';
4
4
  import { DaffTestingGeographyService } from './geography.service';
5
5
  import * as i0 from "@angular/core";
6
6
  export class DaffGeographyTestingDriverModule {
@@ -8,10 +8,7 @@ export class DaffGeographyTestingDriverModule {
8
8
  return {
9
9
  ngModule: DaffGeographyTestingDriverModule,
10
10
  providers: [
11
- {
12
- provide: DaffGeographyDriver,
13
- useExisting: DaffTestingGeographyService,
14
- },
11
+ provideDaffGeographyDriver(DaffTestingGeographyService),
15
12
  ],
16
13
  };
17
14
  }
@@ -27,4 +24,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.2", ngImpor
27
24
  ],
28
25
  }]
29
26
  }] });
30
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ2VvZ3JhcGh5LWRyaXZlci5tb2R1bGUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9saWJzL2dlb2dyYXBoeS9kcml2ZXIvdGVzdGluZy9zcmMvZHJpdmVycy9nZW9ncmFwaHktZHJpdmVyLm1vZHVsZS50cyJdLCJuYW1lcyI6W10sIm1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8 +1,12 @@
1
- import { InjectionToken } from '@angular/core';
1
+ import { createSingleInjectionToken } from '@daffodil/core';
2
2
  import { daffTransformErrorToStateError } from '@daffodil/core/state';
3
3
  /**
4
4
  * Transforms `DaffError`s into `DaffStateError`s before they are serialized into state.
5
5
  * Can be used to further refine Daffodil errors into more specific app errors.
6
6
  */
7
- export const DAFF_GEOGRAPHY_ERROR_MATCHER = new InjectionToken('DAFF_GEOGRAPHY_ERROR_MATCHER', { factory: () => daffTransformErrorToStateError });
8
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXJyb3ItbWF0Y2hlci50b2tlbi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL2xpYnMvZ2VvZ3JhcGh5L3N0YXRlL3NyYy9pbmplY3Rpb24tdG9rZW5zL2Vycm9yLW1hdGNoZXIudG9rZW4udHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLGNBQWMsRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUUvQyxPQUFPLEVBQUUsOEJBQThCLEVBQUUsTUFBTSxzQkFBc0IsQ0FBQztBQUV0RTs7O0dBR0c7QUFDSCxNQUFNLENBQUMsTUFBTSw0QkFBNEIsR0FBRyxJQUFJLGNBQWMsQ0FDNUQsOEJBQThCLEVBQzlCLEVBQUUsT0FBTyxFQUFFLEdBQUcsRUFBRSxDQUFDLDhCQUE4QixFQUFFLENBQ2xELENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBJbmplY3Rpb25Ub2tlbiB9IGZyb20gJ0Bhbmd1bGFyL2NvcmUnO1xuXG5pbXBvcnQgeyBkYWZmVHJhbnNmb3JtRXJyb3JUb1N0YXRlRXJyb3IgfSBmcm9tICdAZGFmZm9kaWwvY29yZS9zdGF0ZSc7XG5cbi8qKlxuICogVHJhbnNmb3JtcyBgRGFmZkVycm9yYHMgaW50byBgRGFmZlN0YXRlRXJyb3JgcyBiZWZvcmUgdGhleSBhcmUgc2VyaWFsaXplZCBpbnRvIHN0YXRlLlxuICogQ2FuIGJlIHVzZWQgdG8gZnVydGhlciByZWZpbmUgRGFmZm9kaWwgZXJyb3JzIGludG8gbW9yZSBzcGVjaWZpYyBhcHAgZXJyb3JzLlxuICovXG5leHBvcnQgY29uc3QgREFGRl9HRU9HUkFQSFlfRVJST1JfTUFUQ0hFUiA9IG5ldyBJbmplY3Rpb25Ub2tlbjx0eXBlb2YgZGFmZlRyYW5zZm9ybUVycm9yVG9TdGF0ZUVycm9yPihcbiAgJ0RBRkZfR0VPR1JBUEhZX0VSUk9SX01BVENIRVInLFxuICB7IGZhY3Rvcnk6ICgpID0+IGRhZmZUcmFuc2Zvcm1FcnJvclRvU3RhdGVFcnJvciB9LFxuKTtcbiJdfQ==
7
+ export const { token: DAFF_GEOGRAPHY_ERROR_MATCHER,
8
+ /**
9
+ * Provider function for {@link DAFF_GEOGRAPHY_ERROR_MATCHER}.
10
+ */
11
+ provider: provideDaffGeographyErrorMatcher, } = createSingleInjectionToken('DAFF_GEOGRAPHY_ERROR_MATCHER', { factory: () => daffTransformErrorToStateError });
12
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXJyb3ItbWF0Y2hlci50b2tlbi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL2xpYnMvZ2VvZ3JhcGh5L3N0YXRlL3NyYy9pbmplY3Rpb24tdG9rZW5zL2Vycm9yLW1hdGNoZXIudG9rZW4udHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLDBCQUEwQixFQUFFLE1BQU0sZ0JBQWdCLENBQUM7QUFDNUQsT0FBTyxFQUFFLDhCQUE4QixFQUFFLE1BQU0sc0JBQXNCLENBQUM7QUFFdEU7OztHQUdHO0FBQ0gsTUFBTS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yeTogKCkgPT4gZGFmZlRyYW5zZm9ybUVycm9yVG9TdGF0ZUVycm9yIH0sXG4pO1xuIl19
@@ -1,2 +1,2 @@
1
- export { DAFF_GEOGRAPHY_ERROR_MATCHER } from './error-matcher.token';
2
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljX2FwaS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL2xpYnMvZ2VvZ3JhcGh5L3N0YXRlL3NyYy9pbmplY3Rpb24tdG9rZW5zL3B1YmxpY19hcGkudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLDRCQUE0QixFQUFFLE1BQU0sdUJBQXVCLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgeyBEQUZGX0dFT0dSQVBIWV9FUlJPUl9NQVRDSEVSIH0gZnJvbSAnLi9lcnJvci1tYXRjaGVyLnRva2VuJztcbiJdfQ==
1
+ export * from './error-matcher.token';
2
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljX2FwaS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL2xpYnMvZ2VvZ3JhcGh5L3N0YXRlL3NyYy9pbmplY3Rpb24tdG9rZW5zL3B1YmxpY19hcGkudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsY0FBYyx1QkFBdUIsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCAqIGZyb20gJy4vZXJyb3ItbWF0Y2hlci50b2tlbic7XG4iXX0=
@@ -1,20 +1,24 @@
1
1
  import { CommonModule } from '@angular/common';
2
2
  import * as i0 from '@angular/core';
3
3
  import { Injectable, NgModule } from '@angular/core';
4
- import { DaffCountryNotFoundError, DaffGeographyDriver } from '@daffodil/geography/driver';
4
+ import { DaffInMemoryDriverBase, provideDaffInMemoryBackends } from '@daffodil/driver/in-memory';
5
+ import { DaffCountryNotFoundError, provideDaffGeographyDriver } from '@daffodil/geography/driver';
5
6
  import * as i1 from '@angular/common/http';
7
+ import * as i2 from 'angular-in-memory-web-api';
8
+ import { STATUS } from 'angular-in-memory-web-api';
6
9
  import { throwError } from 'rxjs';
7
10
  import { catchError, map } from 'rxjs/operators';
8
- import { STATUS } from 'angular-in-memory-web-api';
9
11
  import * as i1$1 from '@daffodil/geography/testing';
10
12
 
13
+ const DAFF_GEOGRAPHY_IN_MEMORY_COLLECTION_NAME = 'countries';
14
+
11
15
  /**
12
16
  * @inheritdoc
13
17
  */
14
- class DaffInMemoryGeographyService {
15
- constructor(http) {
18
+ class DaffInMemoryGeographyService extends DaffInMemoryDriverBase {
19
+ constructor(http, config) {
20
+ super(config, DAFF_GEOGRAPHY_IN_MEMORY_COLLECTION_NAME);
16
21
  this.http = http;
17
- this.url = '/api/countries';
18
22
  }
19
23
  get(countryId) {
20
24
  return this.http.get(`${this.url}/${countryId}`).pipe(catchError((error) => throwError(() => new DaffCountryNotFoundError('Country could not be found'))), map(result => result));
@@ -22,7 +26,7 @@ class DaffInMemoryGeographyService {
22
26
  list() {
23
27
  return this.http.get(`${this.url}/`);
24
28
  }
25
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: DaffInMemoryGeographyService, deps: [{ token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable }); }
29
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: DaffInMemoryGeographyService, deps: [{ token: i1.HttpClient }, { token: i2.InMemoryBackendConfig }], target: i0.ɵɵFactoryTarget.Injectable }); }
26
30
  /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: DaffInMemoryGeographyService, providedIn: 'root' }); }
27
31
  }
28
32
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: DaffInMemoryGeographyService, decorators: [{
@@ -30,32 +34,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.2", ngImpor
30
34
  args: [{
31
35
  providedIn: 'root',
32
36
  }]
33
- }], ctorParameters: () => [{ type: i1.HttpClient }] });
34
-
35
- class DaffGeographyInMemoryDriverModule {
36
- static forRoot() {
37
- return {
38
- ngModule: DaffGeographyInMemoryDriverModule,
39
- providers: [
40
- {
41
- provide: DaffGeographyDriver,
42
- useExisting: DaffInMemoryGeographyService,
43
- },
44
- ],
45
- };
46
- }
47
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: DaffGeographyInMemoryDriverModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
48
- /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.2", ngImport: i0, type: DaffGeographyInMemoryDriverModule, imports: [CommonModule] }); }
49
- /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: DaffGeographyInMemoryDriverModule, imports: [CommonModule] }); }
50
- }
51
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: DaffGeographyInMemoryDriverModule, decorators: [{
52
- type: NgModule,
53
- args: [{
54
- imports: [
55
- CommonModule,
56
- ],
57
- }]
58
- }] });
37
+ }], ctorParameters: () => [{ type: i1.HttpClient }, { type: i2.InMemoryBackendConfig }] });
59
38
 
60
39
  /**
61
40
  * An in-memory service that stubs out the backend services for getting countries.
@@ -66,6 +45,7 @@ class DaffInMemoryBackendGeographyService {
66
45
  constructor(countryFactory, subdivisionFactory) {
67
46
  this.countryFactory = countryFactory;
68
47
  this.subdivisionFactory = subdivisionFactory;
48
+ this.collectionName = DAFF_GEOGRAPHY_IN_MEMORY_COLLECTION_NAME;
69
49
  this.countries = this.countryFactory.createMany(5);
70
50
  this.countries.forEach(country => country.subdivisions = this.subdivisionFactory.createMany(5));
71
51
  }
@@ -111,6 +91,29 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.2", ngImpor
111
91
  }]
112
92
  }], ctorParameters: () => [{ type: i1$1.DaffCountryFactory }, { type: i1$1.DaffSubdivisionFactory }] });
113
93
 
94
+ class DaffGeographyInMemoryDriverModule {
95
+ static forRoot() {
96
+ return {
97
+ ngModule: DaffGeographyInMemoryDriverModule,
98
+ providers: [
99
+ provideDaffGeographyDriver(DaffInMemoryGeographyService),
100
+ provideDaffInMemoryBackends(DaffInMemoryBackendGeographyService),
101
+ ],
102
+ };
103
+ }
104
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: DaffGeographyInMemoryDriverModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
105
+ /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.2", ngImport: i0, type: DaffGeographyInMemoryDriverModule, imports: [CommonModule] }); }
106
+ /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: DaffGeographyInMemoryDriverModule, imports: [CommonModule] }); }
107
+ }
108
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: DaffGeographyInMemoryDriverModule, decorators: [{
109
+ type: NgModule,
110
+ args: [{
111
+ imports: [
112
+ CommonModule,
113
+ ],
114
+ }]
115
+ }] });
116
+
114
117
  /**
115
118
  * Generated bundle index. Do not edit.
116
119
  */
@@ -1 +1 @@
1
- {"version":3,"file":"daffodil-geography-driver-in-memory.mjs","sources":["../../../libs/geography/driver/in-memory/src/drivers/geography.service.ts","../../../libs/geography/driver/in-memory/src/drivers/geography-driver.module.ts","../../../libs/geography/driver/in-memory/src/backend/geography.service.ts","../../../libs/geography/driver/in-memory/src/daffodil-geography-driver-in-memory.ts"],"sourcesContent":["import { HttpClient } from '@angular/common/http';\nimport { Injectable } from '@angular/core';\nimport {\n Observable,\n throwError,\n} from 'rxjs';\nimport {\n catchError,\n map,\n} from 'rxjs/operators';\n\nimport { DaffCountry } from '@daffodil/geography';\nimport {\n DaffGeographyServiceInterface,\n DaffCountryNotFoundError,\n} from '@daffodil/geography/driver';\n\n/**\n * @inheritdoc\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffInMemoryGeographyService implements DaffGeographyServiceInterface<DaffCountry> {\n url = '/api/countries';\n\n constructor(private http: HttpClient) {}\n\n get(countryId: DaffCountry['id']): Observable<DaffCountry> {\n return this.http.get<DaffCountry>(`${this.url}/${countryId}`).pipe(\n catchError((error: Error) => throwError(() => new DaffCountryNotFoundError('Country could not be found'))),\n map(result => result),\n );\n }\n\n list(): Observable<DaffCountry[]> {\n return this.http.get<DaffCountry[]>(`${this.url}/`);\n }\n}\n","import { CommonModule } from '@angular/common';\nimport {\n NgModule,\n ModuleWithProviders,\n} from '@angular/core';\n\nimport { DaffGeographyDriver } from '@daffodil/geography/driver';\n\nimport { DaffInMemoryGeographyService } from './geography.service';\n\n@NgModule({\n imports: [\n CommonModule,\n ],\n})\nexport class DaffGeographyInMemoryDriverModule {\n static forRoot(): ModuleWithProviders<DaffGeographyInMemoryDriverModule> {\n return {\n ngModule: DaffGeographyInMemoryDriverModule,\n providers: [\n {\n provide: DaffGeographyDriver,\n useExisting: DaffInMemoryGeographyService,\n },\n ],\n };\n }\n}\n","import { Injectable } from '@angular/core';\nimport {\n InMemoryDbService,\n RequestInfo,\n STATUS,\n} from 'angular-in-memory-web-api';\n\nimport { DaffInMemoryDataServiceInterface } from '@daffodil/core/testing';\nimport { DaffCountry } from '@daffodil/geography';\nimport {\n DaffCountryFactory,\n DaffSubdivisionFactory,\n} from '@daffodil/geography/testing';\n\n/**\n * An in-memory service that stubs out the backend services for getting countries.\n *\n * @inheritdoc\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffInMemoryBackendGeographyService implements InMemoryDbService, DaffInMemoryDataServiceInterface {\n countries: DaffCountry[];\n\n constructor(\n private countryFactory: DaffCountryFactory,\n private subdivisionFactory: DaffSubdivisionFactory,\n ) {\n this.countries = this.countryFactory.createMany(5);\n this.countries.forEach(country => country.subdivisions = this.subdivisionFactory.createMany(5));\n }\n\n /**\n * Creates a fake database of countries for the geography inmemory backend service.\n *\n * @docs-private\n * @returns A fake database of an array of countries\n */\n createDb(reqInfo: RequestInfo): any {\n if (reqInfo) {\n const seedData = reqInfo.utils.getJsonBody(reqInfo.req).countries;\n if (seedData) {\n this.countries = seedData;\n }\n }\n\n return {\n countries: this.countries,\n };\n }\n\n /**\n * Responds to GET requests.\n */\n get(reqInfo: RequestInfo): any {\n return reqInfo.utils.createResponse$(() => ({\n body: reqInfo.id ? this.getCountry(reqInfo) : this.listCountries(reqInfo),\n status: STATUS.OK,\n }));\n }\n\n private getCountry(reqInfo: RequestInfo) {\n return this.countries.find(country => country.id === reqInfo.id);\n }\n\n private listCountries(reqInfo: RequestInfo) {\n return this.countries;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1"],"mappings":";;;;;;;;;;AAiBA;;AAEG;MAIU,4BAA4B,CAAA;AAGvC,IAAA,WAAA,CAAoB,IAAgB,EAAA;QAAhB,IAAI,CAAA,IAAA,GAAJ,IAAI,CAAY;QAFpC,IAAG,CAAA,GAAA,GAAG,gBAAgB,CAAC;KAEiB;AAExC,IAAA,GAAG,CAAC,SAA4B,EAAA;QAC9B,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAAc,CAAA,EAAG,IAAI,CAAC,GAAG,IAAI,SAAS,CAAA,CAAE,CAAC,CA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AAS;SAC1B,CAAC;KACH;AAED;;AAEG;AACH,IAAA,GAAG,CAAC,OAAoB,EAAA;QACtB,OAAO,OAAO,CAAC,KAAK,CAAC,eAAe,CAAC,OAAO;YAC1C,IAAI,EAAE,OAAO,CAAC,EAAE,GAAG,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,GAAG,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC;YACzE,MAAM,EAAE,MAAM,CAAC,EAAE;AAClB,SAAA,CAAC,CAAC,CAAC;KACL;AAEO,IAAA,UAAU,CAAC,OAAoB,EAAA;AACrC,QAAA,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,IAAI,OAAO,CAAC,EAAE,KAAK,OAAO,CAAC,EAAE,CAAC,CAAC;KAClE;AAEO,IAAA,aAAa,CAAC,OAAoB,EAAA;QACxC,OAAO,IAAI,CAAC,SAAS,CAAC;KACvB;iIA9CU,mCAAmC,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAAA,IAAA,CAAA,kBAAA,EAAA,EAAA,EAAA,KAAA,EAAAA,IAAA,CAAA,sBAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA,EAAA;AAAnC,uBAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,mCAAmC,cAFlC,MAAM,EAAA,CAAA,CAAA,EAAA;;2FAEP,mCAAmC,EAAA,UAAA,EAAA,CAAA;kBAH/C,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;AACnB,iBAAA,CAAA;;;ACrBD;;AAEG;;;;"}
1
+ {"version":3,"file":"daffodil-geography-driver-in-memory.mjs","sources":["../../../libs/geography/driver/in-memory/src/collection-name.const.ts","../../../libs/geography/driver/in-memory/src/drivers/geography.service.ts","../../../libs/geography/driver/in-memory/src/backend/geography.service.ts","../../../libs/geography/driver/in-memory/src/drivers/geography-driver.module.ts","../../../libs/geography/driver/in-memory/src/daffodil-geography-driver-in-memory.ts"],"sourcesContent":["export const DAFF_GEOGRAPHY_IN_MEMORY_COLLECTION_NAME = 'countries';\n","import { HttpClient } from '@angular/common/http';\nimport { Injectable } from '@angular/core';\nimport { InMemoryBackendConfig } from 'angular-in-memory-web-api';\nimport {\n Observable,\n throwError,\n} from 'rxjs';\nimport {\n catchError,\n map,\n} from 'rxjs/operators';\n\nimport { DaffInMemoryDriverBase } from '@daffodil/driver/in-memory';\nimport { DaffCountry } from '@daffodil/geography';\nimport {\n DaffGeographyServiceInterface,\n DaffCountryNotFoundError,\n} from '@daffodil/geography/driver';\n\nimport { DAFF_GEOGRAPHY_IN_MEMORY_COLLECTION_NAME } from '../collection-name.const';\n\n/**\n * @inheritdoc\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffInMemoryGeographyService extends DaffInMemoryDriverBase implements DaffGeographyServiceInterface<DaffCountry> {\n constructor(\n private http: HttpClient,\n config: InMemoryBackendConfig,\n ) {\n super(config, DAFF_GEOGRAPHY_IN_MEMORY_COLLECTION_NAME);\n }\n\n get(countryId: DaffCountry['id']): Observable<DaffCountry> {\n return this.http.get<DaffCountry>(`${this.url}/${countryId}`).pipe(\n catchError((error: Error) => throwError(() => new DaffCountryNotFoundError('Country could not be found'))),\n map(result => result),\n );\n }\n\n list(): Observable<DaffCountry[]> {\n return this.http.get<DaffCountry[]>(`${this.url}/`);\n }\n}\n","import { Injectable } from '@angular/core';\nimport {\n InMemoryDbService,\n RequestInfo,\n STATUS,\n} from 'angular-in-memory-web-api';\n\nimport { DaffInMemorySingleRouteableBackend } from '@daffodil/driver/in-memory';\nimport { DaffCountry } from '@daffodil/geography';\nimport {\n DaffCountryFactory,\n DaffSubdivisionFactory,\n} from '@daffodil/geography/testing';\n\nimport { DAFF_GEOGRAPHY_IN_MEMORY_COLLECTION_NAME } from '../collection-name.const';\n\n/**\n * An in-memory service that stubs out the backend services for getting countries.\n *\n * @inheritdoc\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffInMemoryBackendGeographyService implements InMemoryDbService, DaffInMemorySingleRouteableBackend {\n readonly collectionName = DAFF_GEOGRAPHY_IN_MEMORY_COLLECTION_NAME;\n\n countries: DaffCountry[];\n\n constructor(\n private countryFactory: DaffCountryFactory,\n private subdivisionFactory: DaffSubdivisionFactory,\n ) {\n this.countries = this.countryFactory.createMany(5);\n this.countries.forEach(country => country.subdivisions = this.subdivisionFactory.createMany(5));\n }\n\n /**\n * Creates a fake database of countries for the geography inmemory backend service.\n *\n * @docs-private\n * @returns A fake database of an array of countries\n */\n createDb(reqInfo: RequestInfo): any {\n if (reqInfo) {\n const seedData = reqInfo.utils.getJsonBody(reqInfo.req).countries;\n if (seedData) {\n this.countries = seedData;\n }\n }\n\n return {\n countries: this.countries,\n };\n }\n\n /**\n * Responds to GET requests.\n */\n get(reqInfo: RequestInfo): any {\n return reqInfo.utils.createResponse$(() => ({\n body: reqInfo.id ? this.getCountry(reqInfo) : this.listCountries(reqInfo),\n status: STATUS.OK,\n }));\n }\n\n private getCountry(reqInfo: RequestInfo) {\n return this.countries.find(country => country.id === reqInfo.id);\n }\n\n private listCountries(reqInfo: RequestInfo) {\n return this.countries;\n }\n}\n","import { CommonModule } from '@angular/common';\nimport {\n NgModule,\n ModuleWithProviders,\n} from '@angular/core';\n\nimport { provideDaffInMemoryBackends } from '@daffodil/driver/in-memory';\nimport { provideDaffGeographyDriver } from '@daffodil/geography/driver';\n\nimport { DaffInMemoryGeographyService } from './geography.service';\nimport { DaffInMemoryBackendGeographyService } from '../backend/geography.service';\n\n@NgModule({\n imports: [\n CommonModule,\n ],\n})\nexport class DaffGeographyInMemoryDriverModule {\n static forRoot(): ModuleWithProviders<DaffGeographyInMemoryDriverModule> {\n return {\n ngModule: DaffGeographyInMemoryDriverModule,\n providers: [\n provideDaffGeographyDriver(DaffInMemoryGeographyService),\n provideDaffInMemoryBackends(DaffInMemoryBackendGeographyService),\n ],\n };\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1"],"mappings":";;;;;;;;;;;;AAAO,MAAM,wCAAwC,GAAG,WAAW;;ACqBnE;;AAEG;AAIG,MAAO,4BAA6B,SAAQ,sBAAsB,CAAA;IACtE,WACU,CAAA,IAAgB,EACxB,MAA6B,EAAA;AAE7B,QAAA,KAAK,CAAC,MAAM,EAAE,wCAAwC,CAAC,CAAC;QAHhD,IAAI,CAAA,IAAA,GAAJ,IAAI,CAAY;KAIzB;AAED,IAAA,GAAG,CAAC,SAA4B,EAAA;QAC9B,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAAc,CAAA,EAAG,IAAI,CAAC,GAAG,IAAI,SAAS,CAAA,CAAE,CAAC,CAAC,IAAI,CAChE,UAAU,CAAC,CAAC,KAAY,KAAK,UAAU,CAAC,MAAM,IAAI,wBAAwB,CAAC,4BAA4B,CAAC,CAAC,CAAC,EAC1G,GAAG,CAAC,MAAM,IAAI,MAAM,CAAC,CACtB,CAAC;KACH;IAED,IAAI,GAAA;AACF,QAAA,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAAgB,CAAG,EAAA,IAAI,CAAC,GAAG,CAAG,CAAA,CAAA,CAAC,CAAC;KACrD;iIAjBU,4BAA4B,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,UAAA,EAAA,EAAA,EAAA,KAAA,EAAA,EAAA,CAAA,qBAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA,EAAA;AAA5B,uBAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,I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AA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,iCAAiC,YAH1C,YAAY,CAAA,EAAA,CAAA,CAAA,EAAA;AAGH,uBAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,iCAAiC,YAH1C,YAAY,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAGH,iCAAiC,EAAA,UAAA,EAAA,CAAA;kBAL7C,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE;wBACP,YAAY;AACb,qBAAA;AACF,iBAAA,CAAA;;;AChBD;;AAEG;;;;"}
@@ -4,8 +4,8 @@ import * as i1 from 'apollo-angular';
4
4
  import { gql } from 'apollo-angular';
5
5
  import { throwError } from 'rxjs';
6
6
  import { map, catchError } from 'rxjs/operators';
7
- import { daffTransformMagentoError, DAFF_MAGENTO_CACHEABLE_OPERATIONS } from '@daffodil/driver/magento';
8
- import { DaffCountryNotFoundError, DaffGeographyInvalidAPIResponseError, DaffGeographyDriver } from '@daffodil/geography/driver';
7
+ import { daffTransformMagentoError, provideDaffMagentoCacheableOperation } from '@daffodil/driver/magento';
8
+ import { DaffCountryNotFoundError, DaffGeographyInvalidAPIResponseError, provideDaffGeographyDriver } from '@daffodil/geography/driver';
9
9
  import { CommonModule } from '@angular/common';
10
10
 
11
11
  /**
@@ -169,20 +169,9 @@ class DaffGeographyMagentoDriverModule {
169
169
  return {
170
170
  ngModule: DaffGeographyMagentoDriverModule,
171
171
  providers: [
172
- {
173
- provide: DaffGeographyDriver,
174
- useExisting: DaffGeographyMagentoService,
175
- },
176
- {
177
- provide: DAFF_MAGENTO_CACHEABLE_OPERATIONS,
178
- useValue: MAGENTO_GET_COUNTRY_QUERY_NAME,
179
- multi: true,
180
- },
181
- {
182
- provide: DAFF_MAGENTO_CACHEABLE_OPERATIONS,
183
- useValue: MAGENTO_GET_COUNTRIES_QUERY_NAME,
184
- multi: true,
185
- },
172
+ provideDaffGeographyDriver(DaffGeographyMagentoService),
173
+ provideDaffMagentoCacheableOperation(MAGENTO_GET_COUNTRY_QUERY_NAME),
174
+ provideDaffMagentoCacheableOperation(MAGENTO_GET_COUNTRIES_QUERY_NAME),
186
175
  ],
187
176
  };
188
177
  }
@@ -1 +1 @@
1
- {"version":3,"file":"daffodil-geography-driver-magento.mjs","sources":["../../../libs/geography/driver/magento/src/transforms/responses/subdivision.service.ts","../../../libs/geography/driver/magento/src/transforms/responses/country.service.ts","../../../libs/geography/driver/magento/src/queries/fragments/country.ts","../../../libs/geography/driver/magento/src/queries/fragments/region.ts","../../../libs/geography/driver/magento/src/queries/get-countries.ts","../../../libs/geography/driver/magento/src/queries/get-country.ts","../../../libs/geography/driver/magento/src/errors/codes.ts","../../../libs/geography/driver/magento/src/errors/map.ts","../../../libs/geography/driver/magento/src/errors/transform.ts","../../../libs/geography/driver/magento/src/validators/get-countries.ts","../../../libs/geography/driver/magento/src/geography.service.ts","../../../libs/geography/driver/magento/src/geography-driver.module.ts","../../../libs/geography/driver/magento/src/daffodil-geography-driver-magento.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\n\nimport { DaffSubdivision } from '@daffodil/geography';\n\nimport { MagentoRegion } from '../../models/responses/region';\n\n/**\n * Transforms magento carts into an object usable by daffodil.\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffMagentoSubdivisionTransformer {\n /**\n * Transforms the MagentoRegion from the magento region query into a DaffSubdivision.\n */\n transform(region: MagentoRegion): DaffSubdivision {\n return region ? {\n ...{ magento_region: region },\n\n id: String(region.id),\n name: region.name,\n iso_3166_2: region.code,\n } : null;\n }\n}\n","import { Injectable } from '@angular/core';\n\nimport { DaffCountry } from '@daffodil/geography';\n\nimport { DaffMagentoSubdivisionTransformer } from './subdivision.service';\nimport { MagentoCountry } from '../../models/responses/country';\n\n/**\n * Transforms magento carts into an object usable by daffodil.\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffMagentoCountryTransformer {\n constructor(public subdivisionTransformer: DaffMagentoSubdivisionTransformer) {}\n\n private transformSubdivisions(regions: MagentoCountry['available_regions']): DaffCountry['subdivisions'] {\n return regions.map(region => this.subdivisionTransformer.transform(region));\n }\n\n /**\n * Transforms the MagentoCountry from the magento country query into a DaffCountry.\n */\n transform(country: MagentoCountry): DaffCountry {\n return country ? {\n ...{ magento_country: country },\n\n subdivisions: this.transformSubdivisions(country.available_regions || []),\n\n id: country.id,\n name: country.full_name_locale,\n name_en: country.full_name_english,\n alpha2: country.two_letter_abbreviation,\n alpha3: country.three_letter_abbreviation,\n } : null;\n }\n}\n","import { gql } from 'apollo-angular';\n\n\nexport const countryFragment = gql`\n fragment country on Country {\n id\n full_name_english\n full_name_locale\n three_letter_abbreviation\n two_letter_abbreviation\n }\n`;\n","import { gql } from 'apollo-angular';\n\n\nexport const regionFragment = gql`\n fragment region on Region {\n code\n id\n name\n }\n`;\n","import { gql } from 'apollo-angular';\n\nimport { countryFragment } from './fragments/public_api';\n\nexport const MAGENTO_GET_COUNTRIES_QUERY_NAME = 'MagentoGetCountries';\n\nexport const getCountries = gql`\n query ${MAGENTO_GET_COUNTRIES_QUERY_NAME} {\n countries {\n ...country\n }\n }\n ${countryFragment}\n`;\n","import { gql } from 'apollo-angular';\n\nimport {\n countryFragment,\n regionFragment,\n} from './fragments/public_api';\n\nexport const MAGENTO_GET_COUNTRY_QUERY_NAME = 'MagentoGetCountry';\n\nexport const getCountry = gql`\n query ${MAGENTO_GET_COUNTRY_QUERY_NAME}($countryId: String!) {\n country(id: $countryId) {\n ...country\n available_regions {\n ...region\n }\n }\n }\n ${countryFragment}\n ${regionFragment}\n`;\n","export enum MagentoGeographyGraphQlErrorCode {\n COUNTRY_NOT_FOUND = 'graphql-no-such-entity',\n}\n","import { DaffErrorCodeMap } from '@daffodil/core';\nimport { DaffCountryNotFoundError } from '@daffodil/geography/driver';\n\nimport { MagentoGeographyGraphQlErrorCode } from './codes';\n\nexport const DaffGeographyMagentoErrorMap: DaffErrorCodeMap = {\n [MagentoGeographyGraphQlErrorCode.COUNTRY_NOT_FOUND]: DaffCountryNotFoundError,\n};\n","import { daffTransformMagentoError } from '@daffodil/driver/magento';\n\nimport { DaffGeographyMagentoErrorMap } from './map';\n\nexport function transformMagentoGeographyError(error: any) {\n return daffTransformMagentoError(error, DaffGeographyMagentoErrorMap);\n}\n","import { ApolloQueryResult } from '@apollo/client/core';\n\nimport { DaffGeographyInvalidAPIResponseError } from '@daffodil/geography/driver';\n\nimport { MagentoGetCountriesResponse } from '../queries/public_api';\n\nexport const validateGetCountriesResponse = (response: ApolloQueryResult<MagentoGetCountriesResponse>) => {\n if (response.data.countries) {\n return response;\n } else {\n throw new DaffGeographyInvalidAPIResponseError('Get countries response does not contain a valid list of countries.');\n }\n};\n","import { Injectable } from '@angular/core';\nimport { Apollo } from 'apollo-angular';\nimport {\n Observable,\n throwError,\n} from 'rxjs';\nimport {\n map,\n catchError,\n} from 'rxjs/operators';\n\nimport { DaffCountry } from '@daffodil/geography';\nimport { DaffGeographyServiceInterface } from '@daffodil/geography/driver';\n\nimport { transformMagentoGeographyError } from './errors/transform';\nimport { getCountry } from './queries/get-country';\nimport {\n getCountries,\n MagentoGetCountriesResponse,\n} from './queries/public_api';\nimport { MagentoGetCountryResponse } from './queries/responses/get-country';\nimport { DaffMagentoCountryTransformer } from './transforms/responses/country.service';\nimport { validateGetCountriesResponse } from './validators/public_api';\n\n/**\n * A service for making Magento GraphQL queries for carts.\n *\n * @inheritdoc\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffGeographyMagentoService implements DaffGeographyServiceInterface<DaffCountry> {\n constructor(\n private apollo: Apollo,\n public countryTransformer: DaffMagentoCountryTransformer,\n ) {}\n\n list(): Observable<DaffCountry[]> {\n return this.apollo.query<MagentoGetCountriesResponse>({\n query: getCountries,\n }).pipe(\n map(validateGetCountriesResponse),\n map(result => result.data.countries.map(country => this.countryTransformer.transform(country))),\n catchError(err => throwError(() => transformMagentoGeographyError(err))),\n );\n }\n\n get(countryId: DaffCountry['id']): Observable<DaffCountry> {\n return this.apollo.query<MagentoGetCountryResponse>({\n query: getCountry,\n variables: {\n countryId,\n },\n }).pipe(\n map(result => this.countryTransformer.transform(result.data.country)),\n catchError(err => throwError(() => transformMagentoGeographyError(err))),\n );\n }\n}\n","import { CommonModule } from '@angular/common';\nimport {\n NgModule,\n ModuleWithProviders,\n} from '@angular/core';\n\nimport { DAFF_MAGENTO_CACHEABLE_OPERATIONS } from '@daffodil/driver/magento';\nimport { DaffGeographyDriver } from '@daffodil/geography/driver';\n\nimport { DaffGeographyMagentoService } from './geography.service';\nimport {\n MAGENTO_GET_COUNTRIES_QUERY_NAME,\n MAGENTO_GET_COUNTRY_QUERY_NAME,\n} from './queries/public_api';\n\n@NgModule({\n imports: [\n CommonModule,\n ],\n})\nexport class DaffGeographyMagentoDriverModule {\n static forRoot(): ModuleWithProviders<DaffGeographyMagentoDriverModule> {\n return {\n ngModule: DaffGeographyMagentoDriverModule,\n providers: [\n {\n provide: DaffGeographyDriver,\n useExisting: DaffGeographyMagentoService,\n },\n {\n provide: DAFF_MAGENTO_CACHEABLE_OPERATIONS,\n useValue: MAGENTO_GET_COUNTRY_QUERY_NAME,\n multi: true,\n },\n {\n provide: DAFF_MAGENTO_CACHEABLE_OPERATIONS,\n useValue: MAGENTO_GET_COUNTRIES_QUERY_NAME,\n multi: true,\n },\n ],\n };\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1.DaffMagentoSubdivisionTransformer","i2.DaffMagentoCountryTransformer"],"mappings":";;;;;;;;;;AAMA;;AAEG;MAIU,iCAAiC,CAAA;AAC5C;;AAEG;AACH,IAAA,SAAS,CAAC,MAAqB,EAAA;QAC7B,OAAO,MAAM,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C,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA,EAAA;AAAhC,uBAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,gCAAgC,YAHzC,YAAY,CAAA,EAAA,CAAA,CAAA,EAAA;AAGH,uBAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,gCAAgC,YAHzC,YAAY,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAGH,gCAAgC,EAAA,UAAA,EAAA,CAAA;kBAL5C,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE;wBACP,YAAY;AACb,qBAAA;AACF,iBAAA,CAAA;;;ACnBD;;AAEG;;;;"}
1
+ {"version":3,"file":"daffodil-geography-driver-magento.mjs","sources":["../../../libs/geography/driver/magento/src/transforms/responses/subdivision.service.ts","../../../libs/geography/driver/magento/src/transforms/responses/country.service.ts","../../../libs/geography/driver/magento/src/queries/fragments/country.ts","../../../libs/geography/driver/magento/src/queries/fragments/region.ts","../../../libs/geography/driver/magento/src/queries/get-countries.ts","../../../libs/geography/driver/magento/src/queries/get-country.ts","../../../libs/geography/driver/magento/src/errors/codes.ts","../../../libs/geography/driver/magento/src/errors/map.ts","../../../libs/geography/driver/magento/src/errors/transform.ts","../../../libs/geography/driver/magento/src/validators/get-countries.ts","../../../libs/geography/driver/magento/src/geography.service.ts","../../../libs/geography/driver/magento/src/geography-driver.module.ts","../../../libs/geography/driver/magento/src/daffodil-geography-driver-magento.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\n\nimport { DaffSubdivision } from '@daffodil/geography';\n\nimport { MagentoRegion } from '../../models/responses/region';\n\n/**\n * Transforms magento carts into an object usable by daffodil.\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffMagentoSubdivisionTransformer {\n /**\n * Transforms the MagentoRegion from the magento region query into a DaffSubdivision.\n */\n transform(region: MagentoRegion): DaffSubdivision {\n return region ? {\n ...{ magento_region: region },\n\n id: String(region.id),\n name: region.name,\n iso_3166_2: region.code,\n } : null;\n }\n}\n","import { Injectable } from '@angular/core';\n\nimport { DaffCountry } from '@daffodil/geography';\n\nimport { DaffMagentoSubdivisionTransformer } from './subdivision.service';\nimport { MagentoCountry } from '../../models/responses/country';\n\n/**\n * Transforms magento carts into an object usable by daffodil.\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffMagentoCountryTransformer {\n constructor(public subdivisionTransformer: DaffMagentoSubdivisionTransformer) {}\n\n private transformSubdivisions(regions: MagentoCountry['available_regions']): DaffCountry['subdivisions'] {\n return regions.map(region => this.subdivisionTransformer.transform(region));\n }\n\n /**\n * Transforms the MagentoCountry from the magento country query into a DaffCountry.\n */\n transform(country: MagentoCountry): DaffCountry {\n return country ? {\n ...{ magento_country: country },\n\n subdivisions: this.transformSubdivisions(country.available_regions || []),\n\n id: country.id,\n name: country.full_name_locale,\n name_en: country.full_name_english,\n alpha2: country.two_letter_abbreviation,\n alpha3: country.three_letter_abbreviation,\n } : null;\n }\n}\n","import { gql } from 'apollo-angular';\n\n\nexport const countryFragment = gql`\n fragment country on Country {\n id\n full_name_english\n full_name_locale\n three_letter_abbreviation\n two_letter_abbreviation\n }\n`;\n","import { gql } from 'apollo-angular';\n\n\nexport const regionFragment = gql`\n fragment region on Region {\n code\n id\n name\n }\n`;\n","import { gql } from 'apollo-angular';\n\nimport { countryFragment } from './fragments/public_api';\n\nexport const MAGENTO_GET_COUNTRIES_QUERY_NAME = 'MagentoGetCountries';\n\nexport const getCountries = gql`\n query ${MAGENTO_GET_COUNTRIES_QUERY_NAME} {\n countries {\n ...country\n }\n }\n ${countryFragment}\n`;\n","import { gql } from 'apollo-angular';\n\nimport {\n countryFragment,\n regionFragment,\n} from './fragments/public_api';\n\nexport const MAGENTO_GET_COUNTRY_QUERY_NAME = 'MagentoGetCountry';\n\nexport const getCountry = gql`\n query ${MAGENTO_GET_COUNTRY_QUERY_NAME}($countryId: String!) {\n country(id: $countryId) {\n ...country\n available_regions {\n ...region\n }\n }\n }\n ${countryFragment}\n ${regionFragment}\n`;\n","export enum MagentoGeographyGraphQlErrorCode {\n COUNTRY_NOT_FOUND = 'graphql-no-such-entity',\n}\n","import { DaffErrorCodeMap } from '@daffodil/core';\nimport { DaffCountryNotFoundError } from '@daffodil/geography/driver';\n\nimport { MagentoGeographyGraphQlErrorCode } from './codes';\n\nexport const DaffGeographyMagentoErrorMap: DaffErrorCodeMap = {\n [MagentoGeographyGraphQlErrorCode.COUNTRY_NOT_FOUND]: DaffCountryNotFoundError,\n};\n","import { daffTransformMagentoError } from '@daffodil/driver/magento';\n\nimport { DaffGeographyMagentoErrorMap } from './map';\n\nexport function transformMagentoGeographyError(error: any) {\n return daffTransformMagentoError(error, DaffGeographyMagentoErrorMap);\n}\n","import { ApolloQueryResult } from '@apollo/client/core';\n\nimport { DaffGeographyInvalidAPIResponseError } from '@daffodil/geography/driver';\n\nimport { MagentoGetCountriesResponse } from '../queries/public_api';\n\nexport const validateGetCountriesResponse = (response: ApolloQueryResult<MagentoGetCountriesResponse>) => {\n if (response.data.countries) {\n return response;\n } else {\n throw new DaffGeographyInvalidAPIResponseError('Get countries response does not contain a valid list of countries.');\n }\n};\n","import { Injectable } from '@angular/core';\nimport { Apollo } from 'apollo-angular';\nimport {\n Observable,\n throwError,\n} from 'rxjs';\nimport {\n map,\n catchError,\n} from 'rxjs/operators';\n\nimport { DaffCountry } from '@daffodil/geography';\nimport { DaffGeographyServiceInterface } from '@daffodil/geography/driver';\n\nimport { transformMagentoGeographyError } from './errors/transform';\nimport { getCountry } from './queries/get-country';\nimport {\n getCountries,\n MagentoGetCountriesResponse,\n} from './queries/public_api';\nimport { MagentoGetCountryResponse } from './queries/responses/get-country';\nimport { DaffMagentoCountryTransformer } from './transforms/responses/country.service';\nimport { validateGetCountriesResponse } from './validators/public_api';\n\n/**\n * A service for making Magento GraphQL queries for carts.\n *\n * @inheritdoc\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffGeographyMagentoService implements DaffGeographyServiceInterface<DaffCountry> {\n constructor(\n private apollo: Apollo,\n public countryTransformer: DaffMagentoCountryTransformer,\n ) {}\n\n list(): Observable<DaffCountry[]> {\n return this.apollo.query<MagentoGetCountriesResponse>({\n query: getCountries,\n }).pipe(\n map(validateGetCountriesResponse),\n map(result => result.data.countries.map(country => this.countryTransformer.transform(country))),\n catchError(err => throwError(() => transformMagentoGeographyError(err))),\n );\n }\n\n get(countryId: DaffCountry['id']): Observable<DaffCountry> {\n return this.apollo.query<MagentoGetCountryResponse>({\n query: getCountry,\n variables: {\n countryId,\n },\n }).pipe(\n map(result => this.countryTransformer.transform(result.data.country)),\n catchError(err => throwError(() => transformMagentoGeographyError(err))),\n );\n }\n}\n","import { CommonModule } from '@angular/common';\nimport {\n NgModule,\n ModuleWithProviders,\n} from '@angular/core';\n\nimport { provideDaffMagentoCacheableOperation } from '@daffodil/driver/magento';\nimport { provideDaffGeographyDriver } from '@daffodil/geography/driver';\n\nimport { DaffGeographyMagentoService } from './geography.service';\nimport {\n MAGENTO_GET_COUNTRIES_QUERY_NAME,\n MAGENTO_GET_COUNTRY_QUERY_NAME,\n} from './queries/public_api';\n\n@NgModule({\n imports: [\n CommonModule,\n ],\n})\nexport class DaffGeographyMagentoDriverModule {\n static forRoot(): ModuleWithProviders<DaffGeographyMagentoDriverModule> {\n return {\n ngModule: DaffGeographyMagentoDriverModule,\n providers: [\n provideDaffGeographyDriver(DaffGeographyMagentoService),\n provideDaffMagentoCacheableOperation(MAGENTO_GET_COUNTRY_QUERY_NAME),\n provideDaffMagentoCacheableOperation(MAGENTO_GET_COUNTRIES_QUERY_NAME),\n ],\n };\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1.DaffMagentoSubdivisionTransformer","i2.DaffMagentoCountryTransformer"],"mappings":";;;;;;;;;;AAMA;;AAEG;MAIU,iCAAiC,CAAA;AAC5C;;AAEG;AACH,IAAA,SAAS,CAAC,MAAqB,EAAA;QAC7B,OAAO,MAAM,GAAG;AACd,YAAA,GAAG,EAAE,cAAc,EAAE,MAAM,EAAE;AAE7B,YAAA,EAAE,EAAE,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC;YACrB,IAAI,EAAE,MAAM,CAAC,IAAI;YACjB,UAAU,EAAE,MAAM,CAAC,IAAI;SACxB,GAAG,IAAI,CAAC;KACV;iIAZU,iCAAiC,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA,EAAA;AAAjC,uBAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,iCAAiC,cAFhC,MAAM,EAAA,CAAA,CAAA,EAAA;;2FAEP,iCAAiC,EAAA,UAAA,EAAA,CAAA;kBAH7C,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;AACnB,iBAAA,CAAA;;;ACJD;;AAEG;MAIU,6BAA6B,CAAA;AACxC,IAAA,WAAA,CAAmB,sBAAyD,EAAA;QAAzD,IAAsB,CAAA,sBAAA,GAAtB,sBAAsB,CAAmC;KAAI;AAExE,IAAA,qBAAqB,CAAC,OAA4C,EAAA;AACxE,QAAA,OAAO,OAAO,CAAC,GAAG,CAAC,MAAM,IAAI,IAAI,CAAC,sBAAsB,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC;KAC7E;AA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;SACF,CAAC;KACH;iIAVU,gCAAgC,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA,EAAA;AAAhC,uBAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,gCAAgC,YAHzC,YAAY,CAAA,EAAA,CAAA,CAAA,EAAA;AAGH,uBAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,gCAAgC,YAHzC,YAAY,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAGH,gCAAgC,EAAA,UAAA,EAAA,CAAA;kBAL5C,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE;wBACP,YAAY;AACb,qBAAA;AACF,iBAAA,CAAA;;;ACnBD;;AAEG;;;;"}
@@ -1,7 +1,7 @@
1
1
  import { CommonModule } from '@angular/common';
2
2
  import * as i0 from '@angular/core';
3
3
  import { Injectable, NgModule } from '@angular/core';
4
- import { DaffGeographyDriver } from '@daffodil/geography/driver';
4
+ import { provideDaffGeographyDriver } from '@daffodil/geography/driver';
5
5
  import { of } from 'rxjs';
6
6
  import * as i1 from '@daffodil/geography/testing';
7
7
 
@@ -37,10 +37,7 @@ class DaffGeographyTestingDriverModule {
37
37
  return {
38
38
  ngModule: DaffGeographyTestingDriverModule,
39
39
  providers: [
40
- {
41
- provide: DaffGeographyDriver,
42
- useExisting: DaffTestingGeographyService,
43
- },
40
+ provideDaffGeographyDriver(DaffTestingGeographyService),
44
41
  ],
45
42
  };
46
43
  }
@@ -1 +1 @@
1
- {"version":3,"file":"daffodil-geography-driver-testing.mjs","sources":["../../../libs/geography/driver/testing/src/drivers/geography.service.ts","../../../libs/geography/driver/testing/src/drivers/geography-driver.module.ts","../../../libs/geography/driver/testing/src/daffodil-geography-driver-testing.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport {\n Observable,\n of,\n} from 'rxjs';\n\nimport { DaffCountry } from '@daffodil/geography';\nimport { DaffGeographyServiceInterface } from '@daffodil/geography/driver';\nimport {\n DaffCountryFactory,\n DaffSubdivisionFactory,\n} from '@daffodil/geography/testing';\n\n/**\n * @inheritdoc\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffTestingGeographyService implements DaffGeographyServiceInterface<DaffCountry> {\n\n constructor(\n private countryFactory: DaffCountryFactory,\n private subdivisionFactory: DaffSubdivisionFactory,\n ) {}\n\n get(countryId: DaffCountry['id']): Observable<DaffCountry> {\n return of(this.countryFactory.create({\n id: countryId,\n subdivisions: this.subdivisionFactory.createMany(3),\n }));\n }\n\n list(): Observable<DaffCountry[]> {\n return of(this.countryFactory.createMany(5));\n }\n}\n","import { CommonModule } from '@angular/common';\nimport {\n NgModule,\n ModuleWithProviders,\n} from '@angular/core';\n\nimport { DaffGeographyDriver } from '@daffodil/geography/driver';\n\nimport { DaffTestingGeographyService } from './geography.service';\n\n@NgModule({\n imports: [\n CommonModule,\n ],\n})\nexport class DaffGeographyTestingDriverModule {\n static forRoot(): ModuleWithProviders<DaffGeographyTestingDriverModule> {\n return {\n ngModule: DaffGeographyTestingDriverModule,\n providers: [\n {\n provide: DaffGeographyDriver,\n useExisting: DaffTestingGeographyService,\n },\n ],\n };\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAaA;;AAEG;MAIU,2BAA2B,CAAA;IAEtC,WACU,CAAA,cAAkC,EAClC,kBAA0C,EAAA;QAD1C,IAAc,CAAA,cAAA,GAAd,cAAc,CAAoB;QAClC,IAAkB,CAAA,kBAAA,GAAlB,kBAAkB,CAAwB;KAChD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AA,CAAA,CAAA,EAAA;AAAhC,uBAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,gCAAgC,YAHzC,YAAY,CAAA,EAAA,CAAA,CAAA,EAAA;AAGH,uBAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,gCAAgC,YAHzC,YAAY,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAGH,gCAAgC,EAAA,UAAA,EAAA,CAAA;kBAL5C,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE;wBACP,YAAY;AACb,qBAAA;AACF,iBAAA,CAAA;;;ACdD;;AAEG;;;;"}
1
+ {"version":3,"file":"daffodil-geography-driver-testing.mjs","sources":["../../../libs/geography/driver/testing/src/drivers/geography.service.ts","../../../libs/geography/driver/testing/src/drivers/geography-driver.module.ts","../../../libs/geography/driver/testing/src/daffodil-geography-driver-testing.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport {\n Observable,\n of,\n} from 'rxjs';\n\nimport { DaffCountry } from '@daffodil/geography';\nimport { DaffGeographyServiceInterface } from '@daffodil/geography/driver';\nimport {\n DaffCountryFactory,\n DaffSubdivisionFactory,\n} from '@daffodil/geography/testing';\n\n/**\n * @inheritdoc\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffTestingGeographyService implements DaffGeographyServiceInterface<DaffCountry> {\n\n constructor(\n private countryFactory: DaffCountryFactory,\n private subdivisionFactory: DaffSubdivisionFactory,\n ) {}\n\n get(countryId: DaffCountry['id']): Observable<DaffCountry> {\n return of(this.countryFactory.create({\n id: countryId,\n subdivisions: this.subdivisionFactory.createMany(3),\n }));\n }\n\n list(): Observable<DaffCountry[]> {\n return of(this.countryFactory.createMany(5));\n }\n}\n","import { CommonModule } from '@angular/common';\nimport {\n NgModule,\n ModuleWithProviders,\n} from '@angular/core';\n\nimport { provideDaffGeographyDriver } from '@daffodil/geography/driver';\n\nimport { DaffTestingGeographyService } from './geography.service';\n\n@NgModule({\n imports: [\n CommonModule,\n ],\n})\nexport class DaffGeographyTestingDriverModule {\n static forRoot(): ModuleWithProviders<DaffGeographyTestingDriverModule> {\n return {\n ngModule: DaffGeographyTestingDriverModule,\n providers: [\n provideDaffGeographyDriver(DaffTestingGeographyService),\n ],\n };\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAaA;;AAEG;MAIU,2BAA2B,CAAA;IAEtC,WACU,CAAA,cAAkC,EAClC,kBAA0C,EAAA;QAD1C,IAAc,CAAA,cAAA,GAAd,cAAc,CAAoB;QAClC,IAAkB,CAAA,kBAAA,GAAlB,kBAAkB,CAAwB;KAChD;AAEJ,IAAA,GAAG,CAAC,SAA4B,EAAA;AAC9B,QAAA,OAAO,EAAE,CAAC,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC;AACnC,YAAA,EAAE,EAAE,SAAS;YACb,YAAY,EAAE,IAAI,CAAC,kBAAkB,CAAC,UAAU,CAAC,CAAC,CAAC;AACpD,SAAA,CAAC,CAAC,CAAC;KACL;IAED,IAAI,GAAA;QACF,OAAO,EAAE,CAAC,IAAI,CAAC,cAAc,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;KAC9C;iIAhBU,2BAA2B,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,kBAAA,EAAA,EAAA,EAAA,KAAA,EAAA,EAAA,CAAA,sBAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA,EAAA;AAA3B,uBAAA,SAAA,IAAA,CAAA,K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heritableError } from '@daffodil/core';
2
- import { InjectionToken } from '@angular/core';
1
+ import { DaffInheritableError, createSingletonInjectionToken } from '@daffodil/core';
3
2
 
4
3
  class DaffCountryNotFoundError extends DaffInheritableError {
5
4
  constructor(message) {
@@ -17,11 +16,15 @@ class DaffGeographyInvalidAPIResponseError extends DaffInheritableError {
17
16
  }
18
17
  }
19
18
 
20
- const DaffGeographyDriver = new InjectionToken('DaffGeographyDriver');
19
+ const { token: DaffGeographyDriver,
20
+ /**
21
+ * Provider function for {@link DaffGeographyDriver}.
22
+ */
23
+ provider: provideDaffGeographyDriver, } = createSingletonInjectionToken('DaffGeographyDriver');
21
24
 
22
25
  /**
23
26
  * Generated bundle index. Do not edit.
24
27
  */
25
28
 
26
- export { DaffCountryNotFoundError, DaffGeographyDriver, DaffGeographyInvalidAPIResponseError };
29
+ export { DaffCountryNotFoundError, DaffGeographyDriver, DaffGeographyInvalidAPIResponseError, provideDaffGeographyDriver };
27
30
  //# sourceMappingURL=daffodil-geography-driver.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"daffodil-geography-driver.mjs","sources":["../../../libs/geography/driver/src/errors/country-not-found.ts","../../../libs/geography/driver/src/errors/invalid-api-response.ts","../../../libs/geography/driver/src/interfaces/geography-service.interface.ts","../../../libs/geography/driver/src/daffodil-geography-driver.ts"],"sourcesContent":["import {\n DaffError,\n DaffInheritableError,\n} from '@daffodil/core';\n\nexport class DaffCountryNotFoundError extends DaffInheritableError implements DaffError {\n public readonly code: string = 'DAFF_GEOGRAPHY_COUNTRY_NOT_FOUND';\n\n constructor(public message: string) {\n super(message);\n }\n}\n","import {\n DaffError,\n DaffInheritableError,\n} from '@daffodil/core';\n\nexport class DaffGeographyInvalidAPIResponseError extends DaffInheritableError implements DaffError {\n public readonly code: string = 'DAFF_GEOGRAPHY_INVALID_API_RESPONSE';\n\n constructor(public message: string) {\n super(message);\n }\n}\n","import { InjectionToken } from '@angular/core';\nimport { Observable } from 'rxjs';\n\nimport { DaffCountry } from '@daffodil/geography';\n\nexport const DaffGeographyDriver = new InjectionToken<DaffGeographyServiceInterface>('DaffGeographyDriver');\n\nexport interface DaffGeographyServiceInterface<T extends DaffCountry = DaffCountry> {\n /**\n * Retrieves the list of countries available to the given store.\n */\n list(): Observable<T[]>;\n\n /**\n * Retrieve precise information about a specific country.\n */\n get(id: T['id']): Observable<T>;\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;AAKM,MAAO,wBAAyB,SAAQ,oBAAoB,CAAA;AAGhE,IAAA,WAAA,CAAmB,OAAe,EAAA;QAChC,KAAK,CAAC,OAAO,CAAC,CAAC;QADE,IAAO,CAAA,OAAA,GAAP,OAAO,CAAQ;QAFlB,IAAI,CAAA,IAAA,GAAW,kCAAkC,CAAC;KAIjE;AACF;;ACNK,MAAO,oCAAqC,SAAQ,oBAAoB,CAAA;AAG5E,IAAA,WAAA,CAAmB,OAAe,EAAA;QAChC,KAAK,CAAC,OAAO,CAAC,CAAC;QADE,IAAO,CAAA,OAAA,GAAP,OAAO,CAAQ;QAFlB,IAAI,CAAA,IAAA,GAAW,qCAAqC,CAAC;KAIpE;AACF;;MCNY,mBAAmB,GAAG,IAAI,cAAc,CAAgC,qBAAqB;;ACL1G;;AAEG;;;;"}
1
+ {"version":3,"file":"daffodil-geography-driver.mjs","sources":["../../../libs/geography/driver/src/errors/country-not-found.ts","../../../libs/geography/driver/src/errors/invalid-api-response.ts","../../../libs/geography/driver/src/interfaces/geography-service.interface.ts","../../../libs/geography/driver/src/daffodil-geography-driver.ts"],"sourcesContent":["import {\n DaffError,\n DaffInheritableError,\n} from '@daffodil/core';\n\nexport class DaffCountryNotFoundError extends DaffInheritableError implements DaffError {\n public readonly code: string = 'DAFF_GEOGRAPHY_COUNTRY_NOT_FOUND';\n\n constructor(public message: string) {\n super(message);\n }\n}\n","import {\n DaffError,\n DaffInheritableError,\n} from '@daffodil/core';\n\nexport class DaffGeographyInvalidAPIResponseError extends DaffInheritableError implements DaffError {\n public readonly code: string = 'DAFF_GEOGRAPHY_INVALID_API_RESPONSE';\n\n constructor(public message: string) {\n super(message);\n }\n}\n","import { Observable } from 'rxjs';\n\nimport { createSingletonInjectionToken } from '@daffodil/core';\nimport { DaffCountry } from '@daffodil/geography';\n\nexport const {\n token: DaffGeographyDriver,\n /**\n * Provider function for {@link DaffGeographyDriver}.\n */\n provider: provideDaffGeographyDriver,\n} = createSingletonInjectionToken<DaffGeographyServiceInterface>('DaffGeographyDriver');\n\nexport interface DaffGeographyServiceInterface<T extends DaffCountry = DaffCountry> {\n /**\n * Retrieves the list of countries available to the given store.\n */\n list(): Observable<T[]>;\n\n /**\n * Retrieve precise information about a specific country.\n */\n get(id: T['id']): Observable<T>;\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;AAKM,MAAO,wBAAyB,SAAQ,oBAAoB,CAAA;AAGhE,IAAA,WAAA,CAAmB,OAAe,EAAA;QAChC,KAAK,CAAC,OAAO,CAAC,CAAC;QADE,IAAO,CAAA,OAAA,GAAP,OAAO,CAAQ;QAFlB,IAAI,CAAA,IAAA,GAAW,kCAAkC,CAAC;KAIjE;AACF;;ACNK,MAAO,oCAAqC,SAAQ,oBAAoB,CAAA;AAG5E,IAAA,WAAA,CAAmB,OAAe,EAAA;QAChC,KAAK,CAAC,OAAO,CAAC,CAAC;QADE,IAAO,CAAA,OAAA,GAAP,OAAO,CAAQ;QAFlB,IAAI,CAAA,IAAA,GAAW,qCAAqC,CAAC;KAIpE;AACF;;ACNM,MAAM,EACX,KAAK,EAAE,mBAAmB;AAC1B;;AAEG;AACH,QAAQ,EAAE,0BAA0B,GACrC,GAAG,6BAA6B,CAAgC,qBAAqB;;ACXtF;;AAEG;;;;"}
@@ -1,9 +1,10 @@
1
1
  import * as i1 from '@ngrx/store';
2
2
  import { createFeatureSelector, createSelector, defaultMemoize, select, StoreModule } from '@ngrx/store';
3
3
  import { createEntityAdapter } from '@ngrx/entity';
4
- import * as i0 from '@angular/core';
5
- import { InjectionToken, Injectable, Inject, NgModule } from '@angular/core';
4
+ import { createSingleInjectionToken } from '@daffodil/core';
6
5
  import { daffTransformErrorToStateError } from '@daffodil/core/state';
6
+ import * as i0 from '@angular/core';
7
+ import { Injectable, Inject, NgModule } from '@angular/core';
7
8
  import * as i1$1 from '@ngrx/effects';
8
9
  import { createEffect, ofType, EffectsModule } from '@ngrx/effects';
9
10
  import { of } from 'rxjs';
@@ -214,7 +215,11 @@ const getDaffGeographySelectors = (() => {
214
215
  * Transforms `DaffError`s into `DaffStateError`s before they are serialized into state.
215
216
  * Can be used to further refine Daffodil errors into more specific app errors.
216
217
  */
217
- const DAFF_GEOGRAPHY_ERROR_MATCHER = new InjectionToken('DAFF_GEOGRAPHY_ERROR_MATCHER', { factory: () => daffTransformErrorToStateError });
218
+ const { token: DAFF_GEOGRAPHY_ERROR_MATCHER,
219
+ /**
220
+ * Provider function for {@link DAFF_GEOGRAPHY_ERROR_MATCHER}.
221
+ */
222
+ provider: provideDaffGeographyErrorMatcher, } = createSingleInjectionToken('DAFF_GEOGRAPHY_ERROR_MATCHER', { factory: () => daffTransformErrorToStateError });
218
223
 
219
224
  /**
220
225
  * @inheritdoc
@@ -300,5 +305,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.2", ngImpor
300
305
  * Generated bundle index. Do not edit.
301
306
  */
302
307
 
303
- export { DAFF_GEOGRAPHY_ERROR_MATCHER, DAFF_GEOGRAPHY_STORE_FEATURE_KEY, DaffCountryList, DaffCountryListFailure, DaffCountryListSuccess, DaffCountryLoad, DaffCountryLoadFailure, DaffCountryLoadSuccess, DaffGeographyActionTypes, DaffGeographyFacade, DaffGeographyStateModule, daffCountryEntitiesInitialState, daffCountryEntitiesReducer, daffGeographyInitialState, daffGeographyReducer, daffGeographyReducers, getCountryAdapter, getDaffGeographySelectors };
308
+ export { DAFF_GEOGRAPHY_ERROR_MATCHER, DAFF_GEOGRAPHY_STORE_FEATURE_KEY, DaffCountryList, DaffCountryListFailure, DaffCountryListSuccess, DaffCountryLoad, DaffCountryLoadFailure, DaffCountryLoadSuccess, DaffGeographyActionTypes, DaffGeographyFacade, DaffGeographyStateModule, daffCountryEntitiesInitialState, daffCountryEntitiesReducer, daffGeographyInitialState, daffGeographyReducer, daffGeographyReducers, getCountryAdapter, getDaffGeographySelectors, provideDaffGeographyErrorMatcher };
304
309
  //# sourceMappingURL=daffodil-geography-state.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"daffodil-geography-state.mjs","sources":["../../../libs/geography/state/src/reducers/country-entities/country-entities-adapter.ts","../../../libs/geography/state/src/reducers/country-entities/country-entities-initial-state.ts","../../../libs/geography/state/src/actions/geography.actions.ts","../../../libs/geography/state/src/reducers/country-entities/country-entities.reducer.ts","../../../libs/geography/state/src/reducers/geography/geography-initial-state.ts","../../../libs/geography/state/src/reducers/geography/geography.reducer.ts","../../../libs/geography/state/src/reducers/geography-reducers.ts","../../../libs/geography/state/src/reducers/geography-store-feature-key.ts","../../../libs/geography/state/src/selectors/geography-feature.selector.ts","../../../libs/geography/state/src/selectors/country-entities.selector.ts","../../../libs/geography/state/src/selectors/geography.selector.ts","../../../libs/geography/state/src/selectors/geography-all.selector.ts","../../../libs/geography/state/src/injection-tokens/error-matcher.token.ts","../../../libs/geography/state/src/facades/geography/geography.facade.ts","../../../libs/geography/state/src/effects/geography.effects.ts","../../../libs/geography/state/src/geography-state.module.ts","../../../libs/geography/state/src/daffodil-geography-state.ts"],"sourcesContent":["import {\n EntityAdapter,\n createEntityAdapter,\n} from '@ngrx/entity';\n\nimport { DaffCountry } from '@daffodil/geography';\n\n/**\n * Country Adapter for changing/overwriting entity state.\n */\nexport const getCountryAdapter = (() => {\n let cache;\n return <T extends DaffCountry = DaffCountry>(): EntityAdapter<T> =>\n cache = cache || createEntityAdapter<T>();\n})();\n","import { getCountryAdapter } from './country-entities-adapter';\nimport { DaffCountryEntityState } from './country-entities-state.interface';\n\n/**\n * Initial state for country entity state.\n */\nexport const daffCountryEntitiesInitialState: DaffCountryEntityState<any> = getCountryAdapter().getInitialState();\n","import { Action } from '@ngrx/store';\n\nimport { DaffStateError } from '@daffodil/core/state';\nimport { DaffCountry } from '@daffodil/geography';\n\nexport enum DaffGeographyActionTypes {\n CountryLoadAction = '[@daffodil/geography] Country Load Action',\n CountryLoadSuccessAction = '[@daffodil/geography] Country Load Success Action',\n CountryLoadFailureAction = '[@daffodil/geography] Country Load Failure Action',\n CountryListAction = '[@daffodil/geography] Country List Action',\n CountryListSuccessAction = '[@daffodil/geography] Country List Success Action',\n CountryListFailureAction = '[@daffodil/geography] Country List Failure Action',\n}\n\nexport class DaffCountryLoad<T extends DaffCountry> implements Action {\n readonly type = DaffGeographyActionTypes.CountryLoadAction;\n\n constructor(public payload: T['id']) {}\n}\n\nexport class DaffCountryLoadSuccess<T extends DaffCountry> implements Action {\n readonly type = DaffGeographyActionTypes.CountryLoadSuccessAction;\n\n constructor(public payload: T) {}\n}\n\nexport class DaffCountryLoadFailure implements Action {\n readonly type = DaffGeographyActionTypes.CountryLoadFailureAction;\n\n constructor(public payload: DaffStateError) {}\n}\n\nexport class DaffCountryList implements Action {\n readonly type = DaffGeographyActionTypes.CountryListAction;\n}\n\nexport class DaffCountryListSuccess<T extends DaffCountry> implements Action {\n readonly type = DaffGeographyActionTypes.CountryListSuccessAction;\n\n constructor(public payload: T[]) {}\n}\n\nexport class DaffCountryListFailure implements Action {\n readonly type = DaffGeographyActionTypes.CountryListFailureAction;\n\n constructor(public payload: DaffStateError) {}\n}\n\nexport type DaffGeographyActions<T extends DaffCountry> =\n | DaffCountryLoad<T>\n | DaffCountryLoadSuccess<T>\n | DaffCountryLoadFailure\n | DaffCountryList\n | DaffCountryListSuccess<T>\n | DaffCountryListFailure;\n","import { DaffCountry } from '@daffodil/geography';\n\nimport { getCountryAdapter } from './country-entities-adapter';\nimport { daffCountryEntitiesInitialState } from './country-entities-initial-state';\nimport { DaffCountryEntityState } from './country-entities-state.interface';\nimport {\n DaffGeographyActions,\n DaffGeographyActionTypes,\n} from '../../actions/public_api';\n\n/**\n * Reducer function that catches actions and changes/overwrites country entities state.\n */\nexport function daffCountryEntitiesReducer<T extends DaffCountry = DaffCountry>(\n state = daffCountryEntitiesInitialState,\n action: DaffGeographyActions<T>,\n): DaffCountryEntityState<T> {\n const adapter = getCountryAdapter<T>();\n\n switch (action.type) {\n case DaffGeographyActionTypes.CountryLoadSuccessAction:\n return adapter.upsertOne({\n ...action.payload,\n loaded: true,\n }, state);\n\n case DaffGeographyActionTypes.CountryListSuccessAction:\n return adapter.upsertMany(\n action.payload.map(country => ({\n ...country,\n // defer to the loaded state of the country already in state (if it exists) but init field to false if it does not\n loaded: (state.entities[country.id] && state.entities[country.id].loaded) || false,\n // if the country coming in has no subdivisions and the same country in state does, use the subdivisions in state\n subdivisions: country.subdivisions.length === 0 && state.entities[country.id] && state.entities[country.id].subdivisions.length > 0\n ? state.entities[country.id].subdivisions\n : country.subdivisions,\n })),\n state,\n );\n\n default:\n return state;\n }\n}\n","import { DaffGeographyReducerState } from './geography-state.interface';\n\nexport const daffGeographyInitialState: DaffGeographyReducerState = {\n loading: false,\n errors: [],\n};\n","import { DaffCountry } from '@daffodil/geography';\n\nimport { daffGeographyInitialState } from './geography-initial-state';\nimport { DaffGeographyReducerState } from './geography-state.interface';\nimport {\n DaffGeographyActions,\n DaffGeographyActionTypes,\n} from '../../actions/public_api';\n\nexport function daffGeographyReducer<T extends DaffCountry>(\n state = daffGeographyInitialState,\n action: DaffGeographyActions<T>,\n): DaffGeographyReducerState {\n switch (action.type) {\n case DaffGeographyActionTypes.CountryLoadAction:\n case DaffGeographyActionTypes.CountryListAction:\n return { ...state, loading: true };\n\n case DaffGeographyActionTypes.CountryLoadSuccessAction:\n case DaffGeographyActionTypes.CountryListSuccessAction:\n return {\n ...state,\n errors: [],\n loading: false,\n };\n\n case DaffGeographyActionTypes.CountryLoadFailureAction:\n case DaffGeographyActionTypes.CountryListFailureAction:\n return {\n ...state,\n errors: [\n ...state.errors,\n action.payload,\n ],\n loading: false,\n };\n\n default:\n return state;\n }\n}\n","import { ActionReducerMap } from '@ngrx/store';\n\nimport { daffCountryEntitiesReducer } from './country-entities/country-entities.reducer';\nimport { daffGeographyReducer } from './geography/geography.reducer';\nimport { DaffGeographyFeatureState } from './geography-reducers-state.interface';\n\nexport const daffGeographyReducers: ActionReducerMap<DaffGeographyFeatureState> = {\n geography: daffGeographyReducer,\n countries: daffCountryEntitiesReducer,\n};\n","export const DAFF_GEOGRAPHY_STORE_FEATURE_KEY = 'daffGeography';\n","import {\n createFeatureSelector,\n MemoizedSelector,\n} from '@ngrx/store';\n\nimport { DaffCountry } from '@daffodil/geography';\n\nimport { DaffGeographyStateRootSlice } from '../reducers/geography-reducers-state.interface';\nimport {\n DaffGeographyFeatureState,\n DAFF_GEOGRAPHY_STORE_FEATURE_KEY,\n} from '../reducers/public_api';\n\nexport interface DaffGeographyFeatureSelector<T extends DaffCountry = DaffCountry> {\n selectGeographyFeatureState: MemoizedSelector<DaffGeographyStateRootSlice<T>, DaffGeographyFeatureState<T>>;\n}\n\nexport const getDaffGeographyFeatureStateSelector = (() => {\n let cache;\n return <T extends DaffCountry = DaffCountry>(): DaffGeographyFeatureSelector<T> =>\n cache = cache || {\n selectGeographyFeatureState: createFeatureSelector<DaffGeographyFeatureState<T>>(DAFF_GEOGRAPHY_STORE_FEATURE_KEY),\n };\n})();\n","import { Dictionary } from '@ngrx/entity';\nimport {\n createSelector,\n MemoizedSelector,\n defaultMemoize,\n} from '@ngrx/store';\n\nimport { DaffCountry } from '@daffodil/geography';\n\nimport { getDaffGeographyFeatureStateSelector } from './geography-feature.selector';\nimport { DaffGeographyStateRootSlice } from '../reducers/geography-reducers-state.interface';\nimport {\n getCountryAdapter,\n DaffCountryEntityState,\n} from '../reducers/public_api';\n\nexport interface DaffCountryEntitySelectors<T extends DaffCountry = DaffCountry> {\n selectCountryEntitiesState: MemoizedSelector<DaffGeographyStateRootSlice<T>, DaffCountryEntityState<T>>;\n selectCountryIds: MemoizedSelector<DaffGeographyStateRootSlice<T>, T['id'][]>;\n selectCountryEntities: MemoizedSelector<DaffGeographyStateRootSlice<T>, Dictionary<T>>;\n selectAllCountries: MemoizedSelector<DaffGeographyStateRootSlice<T>, T[]>;\n selectCountryTotal: MemoizedSelector<DaffGeographyStateRootSlice<T>, number>;\n selectCountry: (id: T['id']) => MemoizedSelector<DaffGeographyStateRootSlice<T>, T>;\n selectCountrySubdivisions: (id: T['id']) => MemoizedSelector<DaffGeographyStateRootSlice<T>, T['subdivisions']>;\n selectIsCountryFullyLoaded: (id: T['id']) => MemoizedSelector<DaffGeographyStateRootSlice<T>, boolean>;\n}\n\nconst createCountryEntitySelectors = <T extends DaffCountry = DaffCountry>() => {\n const { selectGeographyFeatureState } = getDaffGeographyFeatureStateSelector<T>();\n const selectCountryEntitiesState = createSelector(\n selectGeographyFeatureState,\n state => state.countries,\n );\n const { selectIds, selectEntities, selectAll, selectTotal } = getCountryAdapter<T>().getSelectors(selectCountryEntitiesState);\n\n const selectCountry = defaultMemoize((countryId: T['id']) => createSelector(\n selectEntities,\n (countries: Dictionary<T>) => countries[countryId],\n )).memoized;\n\n const selectCountrySubdivisions = defaultMemoize((countryId: T['id']) => createSelector(\n selectCountry(countryId),\n (country: T) => country?.subdivisions || [],\n )).memoized;\n\n const selectIsCountryFullyLoaded = defaultMemoize((countryId: T['id']) => createSelector(\n selectCountry(countryId),\n (country: T) => country?.loaded,\n )).memoized;\n\n return {\n selectCountryEntitiesState,\n /**\n * Selector for country IDs.\n */\n selectCountryIds: selectIds,\n /**\n * Selector for country entities.\n */\n selectCountryEntities: selectEntities,\n /**\n * Selector for all countries.\n */\n selectAllCountries: selectAll,\n /**\n * Selector for total number of countries.\n */\n selectCountryTotal: selectTotal,\n /**\n * Selector for a specific country.\n */\n selectCountry,\n /**\n * Selector for a specific country's subdivisions.\n */\n selectCountrySubdivisions,\n /**\n * Selector for checking if a country has been fully loaded.\n * If true, then a country's subdivisions will be populated if any exist.\n */\n selectIsCountryFullyLoaded,\n };\n};\n\nexport const getDaffCountryEntitySelectors = (() => {\n let cache;\n return <T extends DaffCountry>(): DaffCountryEntitySelectors<T> =>\n cache = cache || createCountryEntitySelectors<T>();\n})();\n\n","import {\n createSelector,\n MemoizedSelector,\n} from '@ngrx/store';\n\nimport { DaffStateError } from '@daffodil/core/state';\nimport { DaffCountry } from '@daffodil/geography';\n\nimport { getDaffGeographyFeatureStateSelector } from './geography-feature.selector';\nimport { DaffGeographyStateRootSlice } from '../reducers/geography-reducers-state.interface';\nimport { DaffGeographyReducerState } from '../reducers/public_api';\n\nexport interface DaffGeographySelectors {\n selectGeographyState: MemoizedSelector<DaffGeographyStateRootSlice, DaffGeographyReducerState>;\n selectGeographyLoading: MemoizedSelector<DaffGeographyStateRootSlice, boolean>;\n selectGeographyErrors: MemoizedSelector<DaffGeographyStateRootSlice, DaffStateError[]>;\n}\n\nconst createGeographySelectors = <T extends DaffCountry = DaffCountry>() => {\n const { selectGeographyFeatureState } = getDaffGeographyFeatureStateSelector<T>();\n const selectGeographyState = createSelector(\n selectGeographyFeatureState,\n state => state.geography,\n );\n\n const selectGeographyLoading = createSelector(\n selectGeographyState,\n state => state.loading,\n );\n\n const selectGeographyErrors = createSelector(\n selectGeographyState,\n state => state.errors,\n );\n\n return {\n selectGeographyState,\n selectGeographyLoading,\n selectGeographyErrors,\n };\n};\n\nexport const getGeographySelectors = (() => {\n let cache;\n return <T extends DaffCountry = DaffCountry>(): DaffGeographySelectors =>\n cache = cache || createGeographySelectors<T>();\n})();\n","import { DaffCountry } from '@daffodil/geography';\n\nimport {\n DaffCountryEntitySelectors,\n getDaffCountryEntitySelectors,\n} from './country-entities.selector';\nimport {\n DaffGeographyFeatureSelector,\n getDaffGeographyFeatureStateSelector,\n} from './geography-feature.selector';\nimport {\n DaffGeographySelectors,\n getGeographySelectors,\n} from './geography.selector';\n\nexport interface DaffGeographyAllSelectors<T extends DaffCountry = DaffCountry> extends\n DaffCountryEntitySelectors<T>,\n DaffGeographySelectors,\n DaffGeographyFeatureSelector<T> {}\n\nexport const getDaffGeographySelectors = (() => {\n let cache;\n return <T extends DaffCountry = DaffCountry>(): DaffGeographyAllSelectors<T> =>\n cache = cache || {\n ...getGeographySelectors<T>(),\n ...getDaffCountryEntitySelectors<T>(),\n ...getDaffGeographyFeatureStateSelector<T>(),\n };\n})();\n","import { InjectionToken } from '@angular/core';\n\nimport { daffTransformErrorToStateError } from '@daffodil/core/state';\n\n/**\n * Transforms `DaffError`s into `DaffStateError`s before they are serialized into state.\n * Can be used to further refine Daffodil errors into more specific app errors.\n */\nexport const DAFF_GEOGRAPHY_ERROR_MATCHER = new InjectionToken<typeof daffTransformErrorToStateError>(\n 'DAFF_GEOGRAPHY_ERROR_MATCHER',\n { factory: () => daffTransformErrorToStateError },\n);\n","import { Injectable } from '@angular/core';\nimport { Dictionary } from '@ngrx/entity';\nimport {\n Action,\n Store,\n select,\n} from '@ngrx/store';\nimport { Observable } from 'rxjs';\n\nimport { DaffStateError } from '@daffodil/core/state';\nimport { DaffCountry } from '@daffodil/geography';\n\nimport { DaffGeographyFacadeInterface } from './geography-facade.interface';\nimport { DaffGeographyStateRootSlice } from '../../reducers/public_api';\nimport {\n getDaffGeographySelectors,\n DaffGeographyAllSelectors,\n} from '../../selectors/public_api';\n\n/**\n * @inheritdoc\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffGeographyFacade<T extends DaffCountry = DaffCountry> implements DaffGeographyFacadeInterface<T> {\n loading$: Observable<boolean>;\n errors$: Observable<DaffStateError[]>;\n\n countries$: Observable<T[]>;\n countryIds$: Observable<T['id'][]>;\n countryCount$: Observable<number>;\n countryEntities$: Observable<Dictionary<T>>;\n\n private _selectCountry: DaffGeographyAllSelectors<T>['selectCountry'];\n private _selectCountrySubdivisions: DaffGeographyAllSelectors<T>['selectCountrySubdivisions'];\n private _selectIsCountryFullyLoaded: DaffGeographyAllSelectors<T>['selectIsCountryFullyLoaded'];\n\n constructor(private store: Store<DaffGeographyStateRootSlice<T>>) {\n const {\n selectCountryIds,\n selectCountryEntities,\n selectAllCountries,\n selectCountryTotal,\n selectGeographyLoading,\n selectGeographyErrors,\n selectCountry,\n selectCountrySubdivisions,\n selectIsCountryFullyLoaded,\n } = getDaffGeographySelectors<T>();\n\n this._selectCountry = selectCountry;\n this._selectCountrySubdivisions = selectCountrySubdivisions;\n this._selectIsCountryFullyLoaded = selectIsCountryFullyLoaded;\n\n this.loading$ = this.store.pipe(select(selectGeographyLoading));\n this.errors$ = this.store.pipe(select(selectGeographyErrors));\n\n this.countries$ = this.store.pipe(select(selectAllCountries));\n this.countryIds$ = this.store.pipe(select(selectCountryIds));\n this.countryCount$ = this.store.pipe(select(selectCountryTotal));\n this.countryEntities$ = this.store.pipe(select(selectCountryEntities));\n }\n\n getCountry(id: T['id']): Observable<T> {\n return this.store.pipe(select(this._selectCountry(id)));\n }\n\n getCountrySubdivisions(id: T['id']): Observable<T['subdivisions']> {\n return this.store.pipe(select(this._selectCountrySubdivisions(id)));\n }\n\n isCountryFullyLoaded(id: T['id']): Observable<boolean> {\n return this.store.pipe(select(this._selectIsCountryFullyLoaded(id)));\n }\n\n dispatch(action: Action) {\n this.store.dispatch(action);\n }\n}\n","import {\n Injectable,\n Inject,\n} from '@angular/core';\nimport {\n Actions,\n createEffect,\n ofType,\n} from '@ngrx/effects';\nimport { of } from 'rxjs';\nimport {\n switchMap,\n map,\n catchError,\n} from 'rxjs/operators';\n\nimport { DaffError } from '@daffodil/core';\nimport { ErrorTransformer } from '@daffodil/core/state';\nimport { DaffCountry } from '@daffodil/geography';\nimport {\n DaffGeographyServiceInterface,\n DaffGeographyDriver,\n} from '@daffodil/geography/driver';\n\nimport {\n DaffGeographyActionTypes,\n DaffCountryLoad,\n DaffCountryLoadSuccess,\n DaffCountryLoadFailure,\n DaffCountryList,\n DaffCountryListSuccess,\n DaffCountryListFailure,\n} from '../actions/public_api';\nimport { DAFF_GEOGRAPHY_ERROR_MATCHER } from '../injection-tokens/public_api';\n\n@Injectable()\nexport class DaffGeographyEffects<T extends DaffCountry> {\n constructor(\n private actions$: Actions,\n @Inject(DaffGeographyDriver) private driver: DaffGeographyServiceInterface<T>,\n @Inject(DAFF_GEOGRAPHY_ERROR_MATCHER) private errorMatcher: ErrorTransformer,\n ) {}\n\n\n get$ = createEffect(() => this.actions$.pipe(\n ofType(DaffGeographyActionTypes.CountryLoadAction),\n switchMap((action: DaffCountryLoad<T>) => this.driver.get(action.payload).pipe(\n map(resp => new DaffCountryLoadSuccess(resp)),\n catchError((error: DaffError) => of(new DaffCountryLoadFailure(this.errorMatcher(error)))),\n )),\n ));\n\n\n list$ = createEffect(() => this.actions$.pipe(\n ofType(DaffGeographyActionTypes.CountryListAction),\n switchMap((action: DaffCountryList) => this.driver.list().pipe(\n map(resp => new DaffCountryListSuccess(resp)),\n catchError((error: DaffError) => of(new DaffCountryListFailure(this.errorMatcher(error)))),\n )),\n ));\n}\n","import { NgModule } from '@angular/core';\nimport { EffectsModule } from '@ngrx/effects';\nimport { StoreModule } from '@ngrx/store';\n\nimport { DaffGeographyEffects } from './effects/geography.effects';\nimport {\n daffGeographyReducers,\n DAFF_GEOGRAPHY_STORE_FEATURE_KEY,\n} from './reducers/public_api';\n\n@NgModule({\n imports: [\n StoreModule.forFeature(DAFF_GEOGRAPHY_STORE_FEATURE_KEY, daffGeographyReducers),\n EffectsModule.forFeature([\n DaffGeographyEffects,\n ]),\n ],\n})\nexport class DaffGeographyStateModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1","i2"],"mappings":";;;;;;;;;;;;AAOA;;AAEG;AACU,MAAA,iBAAiB,GAAG,CAAC,MAAK;AACrC,IAAA,IAAI,KAAK,CAAC;IACV,OAAO,MACL,KAAK,GAAG,KAAK,IAAI,mBAAmB,EAAK,CAAC;AAC9C,CAAC;;ACXD;;AAEG;MACU,+BAA+B,GAAgC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;;;MCtB3B,wBAAwB,CAAA;iIAAxB,wBAAwB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA,EAAA;kIAAxB,wBAAwB,EAAA,OAAA,EAAA,CAAA,EAAA,CAAA,kBAAA,EAAAC,IAAA,CAAA,oBAAA,CAAA,EAAA,CAAA,CAAA,EAAA;kIAAxB,wBAAwB,EAAA,OAAA,EAAA,CANjC,WAAW,CAAC,UAAU,CAAC,gCAAgC,EAAE,qBAAqB,CAAC;YAC/E,aAAa,CAAC,UAAU,CAAC;gBACvB,oBAAoB;aACrB,CAAC,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAGO,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBARpC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE;AACP,wBAAA,WAAW,CAAC,UAAU,CAAC,gCAAgC,EAAE,qBAAqB,CAAC;wBAC/E,aAAa,CAAC,UAAU,CAAC;4BACvB,oBAAoB;yBACrB,CAAC;AACH,qBAAA;AACF,iBAAA,CAAA;;;ACjBD;;AAEG;;;;"}
1
+ {"version":3,"file":"daffodil-geography-state.mjs","sources":["../../../libs/geography/state/src/reducers/country-entities/country-entities-adapter.ts","../../../libs/geography/state/src/reducers/country-entities/country-entities-initial-state.ts","../../../libs/geography/state/src/actions/geography.actions.ts","../../../libs/geography/state/src/reducers/country-entities/country-entities.reducer.ts","../../../libs/geography/state/src/reducers/geography/geography-initial-state.ts","../../../libs/geography/state/src/reducers/geography/geography.reducer.ts","../../../libs/geography/state/src/reducers/geography-reducers.ts","../../../libs/geography/state/src/reducers/geography-store-feature-key.ts","../../../libs/geography/state/src/selectors/geography-feature.selector.ts","../../../libs/geography/state/src/selectors/country-entities.selector.ts","../../../libs/geography/state/src/selectors/geography.selector.ts","../../../libs/geography/state/src/selectors/geography-all.selector.ts","../../../libs/geography/state/src/injection-tokens/error-matcher.token.ts","../../../libs/geography/state/src/facades/geography/geography.facade.ts","../../../libs/geography/state/src/effects/geography.effects.ts","../../../libs/geography/state/src/geography-state.module.ts","../../../libs/geography/state/src/daffodil-geography-state.ts"],"sourcesContent":["import {\n EntityAdapter,\n createEntityAdapter,\n} from '@ngrx/entity';\n\nimport { DaffCountry } from '@daffodil/geography';\n\n/**\n * Country Adapter for changing/overwriting entity state.\n */\nexport const getCountryAdapter = (() => {\n let cache;\n return <T extends DaffCountry = DaffCountry>(): EntityAdapter<T> =>\n cache = cache || createEntityAdapter<T>();\n})();\n","import { getCountryAdapter } from './country-entities-adapter';\nimport { DaffCountryEntityState } from './country-entities-state.interface';\n\n/**\n * Initial state for country entity state.\n */\nexport const daffCountryEntitiesInitialState: DaffCountryEntityState<any> = getCountryAdapter().getInitialState();\n","import { Action } from '@ngrx/store';\n\nimport { DaffStateError } from '@daffodil/core/state';\nimport { DaffCountry } from '@daffodil/geography';\n\nexport enum DaffGeographyActionTypes {\n CountryLoadAction = '[@daffodil/geography] Country Load Action',\n CountryLoadSuccessAction = '[@daffodil/geography] Country Load Success Action',\n CountryLoadFailureAction = '[@daffodil/geography] Country Load Failure Action',\n CountryListAction = '[@daffodil/geography] Country List Action',\n CountryListSuccessAction = '[@daffodil/geography] Country List Success Action',\n CountryListFailureAction = '[@daffodil/geography] Country List Failure Action',\n}\n\nexport class DaffCountryLoad<T extends DaffCountry> implements Action {\n readonly type = DaffGeographyActionTypes.CountryLoadAction;\n\n constructor(public payload: T['id']) {}\n}\n\nexport class DaffCountryLoadSuccess<T extends DaffCountry> implements Action {\n readonly type = DaffGeographyActionTypes.CountryLoadSuccessAction;\n\n constructor(public payload: T) {}\n}\n\nexport class DaffCountryLoadFailure implements Action {\n readonly type = DaffGeographyActionTypes.CountryLoadFailureAction;\n\n constructor(public payload: DaffStateError) {}\n}\n\nexport class DaffCountryList implements Action {\n readonly type = DaffGeographyActionTypes.CountryListAction;\n}\n\nexport class DaffCountryListSuccess<T extends DaffCountry> implements Action {\n readonly type = DaffGeographyActionTypes.CountryListSuccessAction;\n\n constructor(public payload: T[]) {}\n}\n\nexport class DaffCountryListFailure implements Action {\n readonly type = DaffGeographyActionTypes.CountryListFailureAction;\n\n constructor(public payload: DaffStateError) {}\n}\n\nexport type DaffGeographyActions<T extends DaffCountry> =\n | DaffCountryLoad<T>\n | DaffCountryLoadSuccess<T>\n | DaffCountryLoadFailure\n | DaffCountryList\n | DaffCountryListSuccess<T>\n | DaffCountryListFailure;\n","import { DaffCountry } from '@daffodil/geography';\n\nimport { getCountryAdapter } from './country-entities-adapter';\nimport { daffCountryEntitiesInitialState } from './country-entities-initial-state';\nimport { DaffCountryEntityState } from './country-entities-state.interface';\nimport {\n DaffGeographyActions,\n DaffGeographyActionTypes,\n} from '../../actions/public_api';\n\n/**\n * Reducer function that catches actions and changes/overwrites country entities state.\n */\nexport function daffCountryEntitiesReducer<T extends DaffCountry = DaffCountry>(\n state = daffCountryEntitiesInitialState,\n action: DaffGeographyActions<T>,\n): DaffCountryEntityState<T> {\n const adapter = getCountryAdapter<T>();\n\n switch (action.type) {\n case DaffGeographyActionTypes.CountryLoadSuccessAction:\n return adapter.upsertOne({\n ...action.payload,\n loaded: true,\n }, state);\n\n case DaffGeographyActionTypes.CountryListSuccessAction:\n return adapter.upsertMany(\n action.payload.map(country => ({\n ...country,\n // defer to the loaded state of the country already in state (if it exists) but init field to false if it does not\n loaded: (state.entities[country.id] && state.entities[country.id].loaded) || false,\n // if the country coming in has no subdivisions and the same country in state does, use the subdivisions in state\n subdivisions: country.subdivisions.length === 0 && state.entities[country.id] && state.entities[country.id].subdivisions.length > 0\n ? state.entities[country.id].subdivisions\n : country.subdivisions,\n })),\n state,\n );\n\n default:\n return state;\n }\n}\n","import { DaffGeographyReducerState } from './geography-state.interface';\n\nexport const daffGeographyInitialState: DaffGeographyReducerState = {\n loading: false,\n errors: [],\n};\n","import { DaffCountry } from '@daffodil/geography';\n\nimport { daffGeographyInitialState } from './geography-initial-state';\nimport { DaffGeographyReducerState } from './geography-state.interface';\nimport {\n DaffGeographyActions,\n DaffGeographyActionTypes,\n} from '../../actions/public_api';\n\nexport function daffGeographyReducer<T extends DaffCountry>(\n state = daffGeographyInitialState,\n action: DaffGeographyActions<T>,\n): DaffGeographyReducerState {\n switch (action.type) {\n case DaffGeographyActionTypes.CountryLoadAction:\n case DaffGeographyActionTypes.CountryListAction:\n return { ...state, loading: true };\n\n case DaffGeographyActionTypes.CountryLoadSuccessAction:\n case DaffGeographyActionTypes.CountryListSuccessAction:\n return {\n ...state,\n errors: [],\n loading: false,\n };\n\n case DaffGeographyActionTypes.CountryLoadFailureAction:\n case DaffGeographyActionTypes.CountryListFailureAction:\n return {\n ...state,\n errors: [\n ...state.errors,\n action.payload,\n ],\n loading: false,\n };\n\n default:\n return state;\n }\n}\n","import { ActionReducerMap } from '@ngrx/store';\n\nimport { daffCountryEntitiesReducer } from './country-entities/country-entities.reducer';\nimport { daffGeographyReducer } from './geography/geography.reducer';\nimport { DaffGeographyFeatureState } from './geography-reducers-state.interface';\n\nexport const daffGeographyReducers: ActionReducerMap<DaffGeographyFeatureState> = {\n geography: daffGeographyReducer,\n countries: daffCountryEntitiesReducer,\n};\n","export const DAFF_GEOGRAPHY_STORE_FEATURE_KEY = 'daffGeography';\n","import {\n createFeatureSelector,\n MemoizedSelector,\n} from '@ngrx/store';\n\nimport { DaffCountry } from '@daffodil/geography';\n\nimport { DaffGeographyStateRootSlice } from '../reducers/geography-reducers-state.interface';\nimport {\n DaffGeographyFeatureState,\n DAFF_GEOGRAPHY_STORE_FEATURE_KEY,\n} from '../reducers/public_api';\n\nexport interface DaffGeographyFeatureSelector<T extends DaffCountry = DaffCountry> {\n selectGeographyFeatureState: MemoizedSelector<DaffGeographyStateRootSlice<T>, DaffGeographyFeatureState<T>>;\n}\n\nexport const getDaffGeographyFeatureStateSelector = (() => {\n let cache;\n return <T extends DaffCountry = DaffCountry>(): DaffGeographyFeatureSelector<T> =>\n cache = cache || {\n selectGeographyFeatureState: createFeatureSelector<DaffGeographyFeatureState<T>>(DAFF_GEOGRAPHY_STORE_FEATURE_KEY),\n };\n})();\n","import { Dictionary } from '@ngrx/entity';\nimport {\n createSelector,\n MemoizedSelector,\n defaultMemoize,\n} from '@ngrx/store';\n\nimport { DaffCountry } from '@daffodil/geography';\n\nimport { getDaffGeographyFeatureStateSelector } from './geography-feature.selector';\nimport { DaffGeographyStateRootSlice } from '../reducers/geography-reducers-state.interface';\nimport {\n getCountryAdapter,\n DaffCountryEntityState,\n} from '../reducers/public_api';\n\nexport interface DaffCountryEntitySelectors<T extends DaffCountry = DaffCountry> {\n selectCountryEntitiesState: MemoizedSelector<DaffGeographyStateRootSlice<T>, DaffCountryEntityState<T>>;\n selectCountryIds: MemoizedSelector<DaffGeographyStateRootSlice<T>, T['id'][]>;\n selectCountryEntities: MemoizedSelector<DaffGeographyStateRootSlice<T>, Dictionary<T>>;\n selectAllCountries: MemoizedSelector<DaffGeographyStateRootSlice<T>, T[]>;\n selectCountryTotal: MemoizedSelector<DaffGeographyStateRootSlice<T>, number>;\n selectCountry: (id: T['id']) => MemoizedSelector<DaffGeographyStateRootSlice<T>, T>;\n selectCountrySubdivisions: (id: T['id']) => MemoizedSelector<DaffGeographyStateRootSlice<T>, T['subdivisions']>;\n selectIsCountryFullyLoaded: (id: T['id']) => MemoizedSelector<DaffGeographyStateRootSlice<T>, boolean>;\n}\n\nconst createCountryEntitySelectors = <T extends DaffCountry = DaffCountry>() => {\n const { selectGeographyFeatureState } = getDaffGeographyFeatureStateSelector<T>();\n const selectCountryEntitiesState = createSelector(\n selectGeographyFeatureState,\n state => state.countries,\n );\n const { selectIds, selectEntities, selectAll, selectTotal } = getCountryAdapter<T>().getSelectors(selectCountryEntitiesState);\n\n const selectCountry = defaultMemoize((countryId: T['id']) => createSelector(\n selectEntities,\n (countries: Dictionary<T>) => countries[countryId],\n )).memoized;\n\n const selectCountrySubdivisions = defaultMemoize((countryId: T['id']) => createSelector(\n selectCountry(countryId),\n (country: T) => country?.subdivisions || [],\n )).memoized;\n\n const selectIsCountryFullyLoaded = defaultMemoize((countryId: T['id']) => createSelector(\n selectCountry(countryId),\n (country: T) => country?.loaded,\n )).memoized;\n\n return {\n selectCountryEntitiesState,\n /**\n * Selector for country IDs.\n */\n selectCountryIds: selectIds,\n /**\n * Selector for country entities.\n */\n selectCountryEntities: selectEntities,\n /**\n * Selector for all countries.\n */\n selectAllCountries: selectAll,\n /**\n * Selector for total number of countries.\n */\n selectCountryTotal: selectTotal,\n /**\n * Selector for a specific country.\n */\n selectCountry,\n /**\n * Selector for a specific country's subdivisions.\n */\n selectCountrySubdivisions,\n /**\n * Selector for checking if a country has been fully loaded.\n * If true, then a country's subdivisions will be populated if any exist.\n */\n selectIsCountryFullyLoaded,\n };\n};\n\nexport const getDaffCountryEntitySelectors = (() => {\n let cache;\n return <T extends DaffCountry>(): DaffCountryEntitySelectors<T> =>\n cache = cache || createCountryEntitySelectors<T>();\n})();\n\n","import {\n createSelector,\n MemoizedSelector,\n} from '@ngrx/store';\n\nimport { DaffStateError } from '@daffodil/core/state';\nimport { DaffCountry } from '@daffodil/geography';\n\nimport { getDaffGeographyFeatureStateSelector } from './geography-feature.selector';\nimport { DaffGeographyStateRootSlice } from '../reducers/geography-reducers-state.interface';\nimport { DaffGeographyReducerState } from '../reducers/public_api';\n\nexport interface DaffGeographySelectors {\n selectGeographyState: MemoizedSelector<DaffGeographyStateRootSlice, DaffGeographyReducerState>;\n selectGeographyLoading: MemoizedSelector<DaffGeographyStateRootSlice, boolean>;\n selectGeographyErrors: MemoizedSelector<DaffGeographyStateRootSlice, DaffStateError[]>;\n}\n\nconst createGeographySelectors = <T extends DaffCountry = DaffCountry>() => {\n const { selectGeographyFeatureState } = getDaffGeographyFeatureStateSelector<T>();\n const selectGeographyState = createSelector(\n selectGeographyFeatureState,\n state => state.geography,\n );\n\n const selectGeographyLoading = createSelector(\n selectGeographyState,\n state => state.loading,\n );\n\n const selectGeographyErrors = createSelector(\n selectGeographyState,\n state => state.errors,\n );\n\n return {\n selectGeographyState,\n selectGeographyLoading,\n selectGeographyErrors,\n };\n};\n\nexport const getGeographySelectors = (() => {\n let cache;\n return <T extends DaffCountry = DaffCountry>(): DaffGeographySelectors =>\n cache = cache || createGeographySelectors<T>();\n})();\n","import { DaffCountry } from '@daffodil/geography';\n\nimport {\n DaffCountryEntitySelectors,\n getDaffCountryEntitySelectors,\n} from './country-entities.selector';\nimport {\n DaffGeographyFeatureSelector,\n getDaffGeographyFeatureStateSelector,\n} from './geography-feature.selector';\nimport {\n DaffGeographySelectors,\n getGeographySelectors,\n} from './geography.selector';\n\nexport interface DaffGeographyAllSelectors<T extends DaffCountry = DaffCountry> extends\n DaffCountryEntitySelectors<T>,\n DaffGeographySelectors,\n DaffGeographyFeatureSelector<T> {}\n\nexport const getDaffGeographySelectors = (() => {\n let cache;\n return <T extends DaffCountry = DaffCountry>(): DaffGeographyAllSelectors<T> =>\n cache = cache || {\n ...getGeographySelectors<T>(),\n ...getDaffCountryEntitySelectors<T>(),\n ...getDaffGeographyFeatureStateSelector<T>(),\n };\n})();\n","import { createSingleInjectionToken } from '@daffodil/core';\nimport { daffTransformErrorToStateError } from '@daffodil/core/state';\n\n/**\n * Transforms `DaffError`s into `DaffStateError`s before they are serialized into state.\n * Can be used to further refine Daffodil errors into more specific app errors.\n */\nexport const {\n token: DAFF_GEOGRAPHY_ERROR_MATCHER,\n /**\n * Provider function for {@link DAFF_GEOGRAPHY_ERROR_MATCHER}.\n */\n provider: provideDaffGeographyErrorMatcher,\n} = createSingleInjectionToken<typeof daffTransformErrorToStateError>(\n 'DAFF_GEOGRAPHY_ERROR_MATCHER',\n { factory: () => daffTransformErrorToStateError },\n);\n","import { Injectable } from '@angular/core';\nimport { Dictionary } from '@ngrx/entity';\nimport {\n Action,\n Store,\n select,\n} from '@ngrx/store';\nimport { Observable } from 'rxjs';\n\nimport { DaffStateError } from '@daffodil/core/state';\nimport { DaffCountry } from '@daffodil/geography';\n\nimport { DaffGeographyFacadeInterface } from './geography-facade.interface';\nimport { DaffGeographyStateRootSlice } from '../../reducers/public_api';\nimport {\n getDaffGeographySelectors,\n DaffGeographyAllSelectors,\n} from '../../selectors/public_api';\n\n/**\n * @inheritdoc\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffGeographyFacade<T extends DaffCountry = DaffCountry> implements DaffGeographyFacadeInterface<T> {\n loading$: Observable<boolean>;\n errors$: Observable<DaffStateError[]>;\n\n countries$: Observable<T[]>;\n countryIds$: Observable<T['id'][]>;\n countryCount$: Observable<number>;\n countryEntities$: Observable<Dictionary<T>>;\n\n private _selectCountry: DaffGeographyAllSelectors<T>['selectCountry'];\n private _selectCountrySubdivisions: DaffGeographyAllSelectors<T>['selectCountrySubdivisions'];\n private _selectIsCountryFullyLoaded: DaffGeographyAllSelectors<T>['selectIsCountryFullyLoaded'];\n\n constructor(private store: Store<DaffGeographyStateRootSlice<T>>) {\n const {\n selectCountryIds,\n selectCountryEntities,\n selectAllCountries,\n selectCountryTotal,\n selectGeographyLoading,\n selectGeographyErrors,\n selectCountry,\n selectCountrySubdivisions,\n selectIsCountryFullyLoaded,\n } = getDaffGeographySelectors<T>();\n\n this._selectCountry = selectCountry;\n this._selectCountrySubdivisions = selectCountrySubdivisions;\n this._selectIsCountryFullyLoaded = selectIsCountryFullyLoaded;\n\n this.loading$ = this.store.pipe(select(selectGeographyLoading));\n this.errors$ = this.store.pipe(select(selectGeographyErrors));\n\n this.countries$ = this.store.pipe(select(selectAllCountries));\n this.countryIds$ = this.store.pipe(select(selectCountryIds));\n this.countryCount$ = this.store.pipe(select(selectCountryTotal));\n this.countryEntities$ = this.store.pipe(select(selectCountryEntities));\n }\n\n getCountry(id: T['id']): Observable<T> {\n return this.store.pipe(select(this._selectCountry(id)));\n }\n\n getCountrySubdivisions(id: T['id']): Observable<T['subdivisions']> {\n return this.store.pipe(select(this._selectCountrySubdivisions(id)));\n }\n\n isCountryFullyLoaded(id: T['id']): Observable<boolean> {\n return this.store.pipe(select(this._selectIsCountryFullyLoaded(id)));\n }\n\n dispatch(action: Action) {\n this.store.dispatch(action);\n }\n}\n","import {\n Injectable,\n Inject,\n} from '@angular/core';\nimport {\n Actions,\n createEffect,\n ofType,\n} from '@ngrx/effects';\nimport { of } from 'rxjs';\nimport {\n switchMap,\n map,\n catchError,\n} from 'rxjs/operators';\n\nimport { DaffError } from '@daffodil/core';\nimport { ErrorTransformer } from '@daffodil/core/state';\nimport { DaffCountry } from '@daffodil/geography';\nimport {\n DaffGeographyServiceInterface,\n DaffGeographyDriver,\n} from '@daffodil/geography/driver';\n\nimport {\n DaffGeographyActionTypes,\n DaffCountryLoad,\n DaffCountryLoadSuccess,\n DaffCountryLoadFailure,\n DaffCountryList,\n DaffCountryListSuccess,\n DaffCountryListFailure,\n} from '../actions/public_api';\nimport { DAFF_GEOGRAPHY_ERROR_MATCHER } from '../injection-tokens/public_api';\n\n@Injectable()\nexport class DaffGeographyEffects<T extends DaffCountry> {\n constructor(\n private actions$: Actions,\n @Inject(DaffGeographyDriver) private driver: DaffGeographyServiceInterface<T>,\n @Inject(DAFF_GEOGRAPHY_ERROR_MATCHER) private errorMatcher: ErrorTransformer,\n ) {}\n\n\n get$ = createEffect(() => this.actions$.pipe(\n ofType(DaffGeographyActionTypes.CountryLoadAction),\n switchMap((action: DaffCountryLoad<T>) => this.driver.get(action.payload).pipe(\n map(resp => new DaffCountryLoadSuccess(resp)),\n catchError((error: DaffError) => of(new DaffCountryLoadFailure(this.errorMatcher(error)))),\n )),\n ));\n\n\n list$ = createEffect(() => this.actions$.pipe(\n ofType(DaffGeographyActionTypes.CountryListAction),\n switchMap((action: DaffCountryList) => this.driver.list().pipe(\n map(resp => new DaffCountryListSuccess(resp)),\n catchError((error: DaffError) => of(new DaffCountryListFailure(this.errorMatcher(error)))),\n )),\n ));\n}\n","import { NgModule } from '@angular/core';\nimport { EffectsModule } from '@ngrx/effects';\nimport { StoreModule } from '@ngrx/store';\n\nimport { DaffGeographyEffects } from './effects/geography.effects';\nimport {\n daffGeographyReducers,\n DAFF_GEOGRAPHY_STORE_FEATURE_KEY,\n} from './reducers/public_api';\n\n@NgModule({\n imports: [\n StoreModule.forFeature(DAFF_GEOGRAPHY_STORE_FEATURE_KEY, daffGeographyReducers),\n EffectsModule.forFeature([\n DaffGeographyEffects,\n ]),\n ],\n})\nexport class DaffGeographyStateModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1","i2"],"mappings":";;;;;;;;;;;;;AAOA;;AAEG;AACU,MAAA,iBAAiB,GAAG,CAAC,MAAK;AACrC,IAAA,IAAI,KAAK,CAAC;IACV,OAAO,MACL,KAAK,GAAG,KAAK,IAAI,mBAAmB,EAAK,CAAC;AAC9C,CAAC;;ACXD;;AAEG;MACU,+BAA+B,GAAgC,iBAAiB,EAAE,CAAC,eAAe;;ICDnG,yBAOX;AAPD,CAAA,UAAY,wBAAwB,EAAA;AAClC,IAAA,wBAAA,CAAA,mBAAA,CAAA,GAAA,2CAA+D,CAAA;AAC/D,IAAA,wBAAA,CAAA,0BAAA,CAAA,GAAA,mDAA8E,CAAA;AAC9E,IAAA,wBAAA,CAAA,0BAAA,CAAA,GAAA,mDAA8E,CAAA;AAC9E,IAAA,wBAAA,CAAA,mBAAA,CAAA,GAAA,2CAA+D,CAAA;AAC/D,IAAA,wBAAA,CAAA,0BAAA,CAAA,GAAA,mDAA8E,CAAA;AAC9E,IAAA,wBAAA,CAAA,0BAAA,CAAA,GAAA,mDAA8E,CAAA;AAChF,CAAC,EAPW,wBAAwB,KAAxB,wBAAwB,GAOnC,EAAA,CAAA,CAAA,CAAA;MAEY,eAAe,CAAA;AAG1B,IAAA,WAAA,CAAmB,OAAgB,EAAA;QAAhB,IAAO,CAAA,OAAA,GAAP,OAAO,CAAS;AAF1B,QAAA,IAAA,CAAA,IAAI,GAAG,wBAAwB,CAAC,iBAAiB,CAAC;KAEpB;AACxC,CAAA;MAEY,sBAAsB,CAAA;AAG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;yBACrB,CAAC;AACH,qBAAA;AACF,iBAAA,CAAA;;;ACjBD;;AAEG;;;;"}
@@ -15,7 +15,7 @@ export interface DaffAddress {
15
15
  /**
16
16
  * Use DaffAddress#region instead.
17
17
  *
18
- * @deprecated
18
+ * @deprecated Deprecated in version 0.78.0. Will be removed in version 0.81.0.
19
19
  */
20
20
  region_id?: ID;
21
21
  country?: ID;
package/package.json CHANGED
@@ -1 +1 @@
1
- {"name":"@daffodil/geography","nx":{"targets":{"build":{"outputs":["{workspaceRoot}/dist/geography"]}}},"version":"0.77.0","description":"A package for interacting with platforms that provide geographic data information like States and Countries","repository":{"type":"git","url":"https://github.com/graycoreio/daffodil"},"author":"Graycore LLC","license":"MIT","bugs":{"url":"https://github.com/graycoreio/daffodil/issues"},"homepage":"https://github.com/graycoreio/daffodil","peerDependencies":{"@angular/core":"^18.2.2","@daffodil/core":"0.77.0"},"optionalDependencies":{"@daffodil/driver":"0.77.0"},"module":"fesm2022/daffodil-geography.mjs","typings":"index.d.ts","exports":{"./package.json":{"default":"./package.json"},".":{"types":"./index.d.ts","esm2022":"./esm2022/daffodil-geography.mjs","esm":"./esm2022/daffodil-geography.mjs","default":"./fesm2022/daffodil-geography.mjs"},"./driver":{"types":"./driver/index.d.ts","esm2022":"./esm2022/driver/daffodil-geography-driver.mjs","esm":"./esm2022/driver/daffodil-geography-driver.mjs","default":"./fesm2022/daffodil-geography-driver.mjs"},"./state":{"types":"./state/index.d.ts","esm2022":"./esm2022/state/daffodil-geography-state.mjs","esm":"./esm2022/state/daffodil-geography-state.mjs","default":"./fesm2022/daffodil-geography-state.mjs"},"./testing":{"types":"./testing/index.d.ts","esm2022":"./esm2022/testing/daffodil-geography-testing.mjs","esm":"./esm2022/testing/daffodil-geography-testing.mjs","default":"./fesm2022/daffodil-geography-testing.mjs"},"./driver/in-memory":{"types":"./driver/in-memory/index.d.ts","esm2022":"./esm2022/driver/in-memory/daffodil-geography-driver-in-memory.mjs","esm":"./esm2022/driver/in-memory/daffodil-geography-driver-in-memory.mjs","default":"./fesm2022/daffodil-geography-driver-in-memory.mjs"},"./driver/magento":{"types":"./driver/magento/index.d.ts","esm2022":"./esm2022/driver/magento/daffodil-geography-driver-magento.mjs","esm":"./esm2022/driver/magento/daffodil-geography-driver-magento.mjs","default":"./fesm2022/daffodil-geography-driver-magento.mjs"},"./driver/testing":{"types":"./driver/testing/index.d.ts","esm2022":"./esm2022/driver/testing/daffodil-geography-driver-testing.mjs","esm":"./esm2022/driver/testing/daffodil-geography-driver-testing.mjs","default":"./fesm2022/daffodil-geography-driver-testing.mjs"},"./state/testing":{"types":"./state/testing/index.d.ts","esm2022":"./esm2022/state/testing/daffodil-geography-state-testing.mjs","esm":"./esm2022/state/testing/daffodil-geography-state-testing.mjs","default":"./fesm2022/daffodil-geography-state-testing.mjs"}},"sideEffects":false,"dependencies":{"tslib":"^2.3.0"}}
1
+ {"name":"@daffodil/geography","nx":{"targets":{"build":{"outputs":["{workspaceRoot}/dist/geography"]}}},"version":"0.79.0","description":"A package for interacting with platforms that provide geographic data information like States and Countries","repository":{"type":"git","url":"https://github.com/graycoreio/daffodil"},"author":"Graycore LLC","license":"MIT","bugs":{"url":"https://github.com/graycoreio/daffodil/issues"},"homepage":"https://github.com/graycoreio/daffodil","peerDependencies":{"@angular/core":"^18.2.2","@daffodil/core":"0.79.0"},"optionalDependencies":{"@daffodil/driver":"0.79.0"},"module":"fesm2022/daffodil-geography.mjs","typings":"index.d.ts","exports":{"./package.json":{"default":"./package.json"},".":{"types":"./index.d.ts","esm2022":"./esm2022/daffodil-geography.mjs","esm":"./esm2022/daffodil-geography.mjs","default":"./fesm2022/daffodil-geography.mjs"},"./driver":{"types":"./driver/index.d.ts","esm2022":"./esm2022/driver/daffodil-geography-driver.mjs","esm":"./esm2022/driver/daffodil-geography-driver.mjs","default":"./fesm2022/daffodil-geography-driver.mjs"},"./state":{"types":"./state/index.d.ts","esm2022":"./esm2022/state/daffodil-geography-state.mjs","esm":"./esm2022/state/daffodil-geography-state.mjs","default":"./fesm2022/daffodil-geography-state.mjs"},"./testing":{"types":"./testing/index.d.ts","esm2022":"./esm2022/testing/daffodil-geography-testing.mjs","esm":"./esm2022/testing/daffodil-geography-testing.mjs","default":"./fesm2022/daffodil-geography-testing.mjs"},"./driver/in-memory":{"types":"./driver/in-memory/index.d.ts","esm2022":"./esm2022/driver/in-memory/daffodil-geography-driver-in-memory.mjs","esm":"./esm2022/driver/in-memory/daffodil-geography-driver-in-memory.mjs","default":"./fesm2022/daffodil-geography-driver-in-memory.mjs"},"./driver/magento":{"types":"./driver/magento/index.d.ts","esm2022":"./esm2022/driver/magento/daffodil-geography-driver-magento.mjs","esm":"./esm2022/driver/magento/daffodil-geography-driver-magento.mjs","default":"./fesm2022/daffodil-geography-driver-magento.mjs"},"./driver/testing":{"types":"./driver/testing/index.d.ts","esm2022":"./esm2022/driver/testing/daffodil-geography-driver-testing.mjs","esm":"./esm2022/driver/testing/daffodil-geography-driver-testing.mjs","default":"./fesm2022/daffodil-geography-driver-testing.mjs"},"./state/testing":{"types":"./state/testing/index.d.ts","esm2022":"./esm2022/state/testing/daffodil-geography-state-testing.mjs","esm":"./esm2022/state/testing/daffodil-geography-state-testing.mjs","default":"./fesm2022/daffodil-geography-state-testing.mjs"}},"sideEffects":false,"dependencies":{"tslib":"^2.3.0"}}
@@ -1,7 +1,6 @@
1
- import { InjectionToken } from '@angular/core';
2
1
  import { daffTransformErrorToStateError } from '@daffodil/core/state';
3
2
  /**
4
3
  * Transforms `DaffError`s into `DaffStateError`s before they are serialized into state.
5
4
  * Can be used to further refine Daffodil errors into more specific app errors.
6
5
  */
7
- export declare const DAFF_GEOGRAPHY_ERROR_MATCHER: InjectionToken<typeof daffTransformErrorToStateError>;
6
+ export declare const DAFF_GEOGRAPHY_ERROR_MATCHER: import("@angular/core").InjectionToken<typeof daffTransformErrorToStateError>, provideDaffGeographyErrorMatcher: <R extends typeof daffTransformErrorToStateError = typeof daffTransformErrorToStateError>(value: R) => import("@angular/core").ValueProvider;
@@ -1 +1 @@
1
- export { DAFF_GEOGRAPHY_ERROR_MATCHER } from './error-matcher.token';
1
+ export * from './error-matcher.token';