@daffodil/geography 0.44.0 → 0.45.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2020/driver/in-memory/backend/geography.service.mjs +3 -3
- package/esm2020/driver/in-memory/drivers/geography-driver.module.mjs +4 -4
- package/esm2020/driver/in-memory/drivers/geography.service.mjs +3 -3
- package/esm2020/driver/magento/geography-driver.module.mjs +4 -4
- package/esm2020/driver/magento/geography.service.mjs +3 -3
- package/esm2020/driver/magento/transforms/responses/country.service.mjs +3 -3
- package/esm2020/driver/magento/transforms/responses/subdivision.service.mjs +3 -3
- package/esm2020/driver/testing/drivers/geography-driver.module.mjs +4 -4
- package/esm2020/driver/testing/drivers/geography.service.mjs +3 -3
- package/esm2020/state/effects/geography.effects.mjs +3 -3
- package/esm2020/state/facades/geography/geography.facade.mjs +3 -3
- package/esm2020/state/geography-state.module.mjs +4 -4
- package/esm2020/state/testing/geography-testing.module.mjs +4 -4
- package/esm2020/state/testing/mock-geography-facade.mjs +3 -3
- package/esm2020/testing/factories/address.factory.mjs +3 -3
- package/esm2020/testing/factories/country.factory.mjs +3 -3
- package/esm2020/testing/factories/personal-address.factory.mjs +3 -3
- package/esm2020/testing/factories/subdivision.factory.mjs +3 -3
- package/fesm2015/daffodil-geography-driver-in-memory.mjs +7 -7
- package/fesm2015/daffodil-geography-driver-in-memory.mjs.map +1 -1
- package/fesm2015/daffodil-geography-driver-magento.mjs +9 -9
- package/fesm2015/daffodil-geography-driver-magento.mjs.map +1 -1
- package/fesm2015/daffodil-geography-driver-testing.mjs +5 -5
- package/fesm2015/daffodil-geography-driver-testing.mjs.map +1 -1
- package/fesm2015/daffodil-geography-state-testing.mjs +5 -5
- package/fesm2015/daffodil-geography-state-testing.mjs.map +1 -1
- package/fesm2015/daffodil-geography-state.mjs +7 -7
- package/fesm2015/daffodil-geography-state.mjs.map +1 -1
- package/fesm2015/daffodil-geography-testing.mjs +8 -8
- package/fesm2015/daffodil-geography-testing.mjs.map +1 -1
- package/fesm2020/daffodil-geography-driver-in-memory.mjs +7 -7
- package/fesm2020/daffodil-geography-driver-in-memory.mjs.map +1 -1
- package/fesm2020/daffodil-geography-driver-magento.mjs +9 -9
- package/fesm2020/daffodil-geography-driver-magento.mjs.map +1 -1
- package/fesm2020/daffodil-geography-driver-testing.mjs +5 -5
- package/fesm2020/daffodil-geography-driver-testing.mjs.map +1 -1
- package/fesm2020/daffodil-geography-state-testing.mjs +5 -5
- package/fesm2020/daffodil-geography-state-testing.mjs.map +1 -1
- package/fesm2020/daffodil-geography-state.mjs +7 -7
- package/fesm2020/daffodil-geography-state.mjs.map +1 -1
- package/fesm2020/daffodil-geography-testing.mjs +8 -8
- package/fesm2020/daffodil-geography-testing.mjs.map +1 -1
- package/package.json +3 -3
|
@@ -23,8 +23,8 @@ class DaffInMemoryGeographyService {
|
|
|
23
23
|
return this.http.get(`${this.url}/`);
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
|
-
/** @nocollapse */
|
|
27
|
-
/** @nocollapse */
|
|
26
|
+
/** @nocollapse */ DaffInMemoryGeographyService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffInMemoryGeographyService, deps: [{ token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
27
|
+
/** @nocollapse */ DaffInMemoryGeographyService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffInMemoryGeographyService, providedIn: 'root' });
|
|
28
28
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffInMemoryGeographyService, decorators: [{
|
|
29
29
|
type: Injectable,
|
|
30
30
|
args: [{
|
|
@@ -45,9 +45,9 @@ class DaffGeographyInMemoryDriverModule {
|
|
|
45
45
|
};
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
|
-
/** @nocollapse */
|
|
49
|
-
/** @nocollapse */
|
|
50
|
-
/** @nocollapse */
|
|
48
|
+
/** @nocollapse */ DaffGeographyInMemoryDriverModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffGeographyInMemoryDriverModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
49
|
+
/** @nocollapse */ DaffGeographyInMemoryDriverModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffGeographyInMemoryDriverModule, imports: [CommonModule] });
|
|
50
|
+
/** @nocollapse */ DaffGeographyInMemoryDriverModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffGeographyInMemoryDriverModule, imports: [[
|
|
51
51
|
CommonModule,
|
|
52
52
|
]] });
|
|
53
53
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffGeographyInMemoryDriverModule, decorators: [{
|
|
@@ -104,8 +104,8 @@ class DaffInMemoryBackendGeographyService {
|
|
|
104
104
|
return reqInfo.collection;
|
|
105
105
|
}
|
|
106
106
|
}
|
|
107
|
-
/** @nocollapse */
|
|
108
|
-
/** @nocollapse */
|
|
107
|
+
/** @nocollapse */ DaffInMemoryBackendGeographyService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffInMemoryBackendGeographyService, deps: [{ token: i1$1.DaffCountryFactory }, { token: i1$1.DaffSubdivisionFactory }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
108
|
+
/** @nocollapse */ DaffInMemoryBackendGeographyService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffInMemoryBackendGeographyService, providedIn: 'root' });
|
|
109
109
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffInMemoryBackendGeographyService, decorators: [{
|
|
110
110
|
type: Injectable,
|
|
111
111
|
args: [{
|
|
@@ -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 reqInfo.collection.find(country => country.id === reqInfo.id);\n }\n\n private listCountries(reqInfo: RequestInfo) {\n return reqInfo.collection;\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;AAAhB,QAAA,IAAI,CAAA,IAAA,GAAJ,IAAI,CAAY;AAFpC,QAAA,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,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
|
|
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 reqInfo.collection.find(country => country.id === reqInfo.id);\n }\n\n private listCountries(reqInfo: RequestInfo) {\n return reqInfo.collection;\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;AAAhB,QAAA,IAAI,CAAA,IAAA,GAAJ,IAAI,CAAY;AAFpC,QAAA,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,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;;4IAdU,4BAA4B,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,UAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAA5B,mBAAA,4BAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,4BAA4B,cAF3B,MAAM,EAAA,CAAA,CAAA;2FAEP,4BAA4B,EAAA,UAAA,EAAA,CAAA;kBAHxC,U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AAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAnC,mBAAA,mCAAA,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;2FAEP,mCAAmC,EAAA,UAAA,EAAA,CAAA;kBAH/C,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;iBACnB,CAAA;;;ACrBD;;AAEG;;;;"}
|
|
@@ -19,8 +19,8 @@ class DaffMagentoSubdivisionTransformer {
|
|
|
19
19
|
return region ? Object.assign({ magento_region: region }, { id: String(region.id), name: region.name, iso_3166_2: region.code }) : null;
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
|
-
/** @nocollapse */
|
|
23
|
-
/** @nocollapse */
|
|
22
|
+
/** @nocollapse */ DaffMagentoSubdivisionTransformer.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffMagentoSubdivisionTransformer, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
23
|
+
/** @nocollapse */ DaffMagentoSubdivisionTransformer.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffMagentoSubdivisionTransformer, providedIn: 'root' });
|
|
24
24
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffMagentoSubdivisionTransformer, decorators: [{
|
|
25
25
|
type: Injectable,
|
|
26
26
|
args: [{
|
|
@@ -45,8 +45,8 @@ class DaffMagentoCountryTransformer {
|
|
|
45
45
|
return country ? Object.assign({ magento_country: country }, { subdivisions: this.transformSubdivisions(country.available_regions || []), id: country.id, name: country.full_name_locale, name_en: country.full_name_english, alpha2: country.two_letter_abbreviation, alpha3: country.three_letter_abbreviation }) : null;
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
|
-
/** @nocollapse */
|
|
49
|
-
/** @nocollapse */
|
|
48
|
+
/** @nocollapse */ DaffMagentoCountryTransformer.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffMagentoCountryTransformer, deps: [{ token: DaffMagentoSubdivisionTransformer }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
49
|
+
/** @nocollapse */ DaffMagentoCountryTransformer.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffMagentoCountryTransformer, providedIn: 'root' });
|
|
50
50
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffMagentoCountryTransformer, decorators: [{
|
|
51
51
|
type: Injectable,
|
|
52
52
|
args: [{
|
|
@@ -140,8 +140,8 @@ class DaffGeographyMagentoService {
|
|
|
140
140
|
}).pipe(map(result => this.countryTransformer.transform(result.data.country)), catchError(err => throwError(() => transformMagentoGeographyError(err))));
|
|
141
141
|
}
|
|
142
142
|
}
|
|
143
|
-
/** @nocollapse */
|
|
144
|
-
/** @nocollapse */
|
|
143
|
+
/** @nocollapse */ DaffGeographyMagentoService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffGeographyMagentoService, deps: [{ token: i1.Apollo }, { token: DaffMagentoCountryTransformer }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
144
|
+
/** @nocollapse */ DaffGeographyMagentoService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffGeographyMagentoService, providedIn: 'root' });
|
|
145
145
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffGeographyMagentoService, decorators: [{
|
|
146
146
|
type: Injectable,
|
|
147
147
|
args: [{
|
|
@@ -162,9 +162,9 @@ class DaffGeographyMagentoDriverModule {
|
|
|
162
162
|
};
|
|
163
163
|
}
|
|
164
164
|
}
|
|
165
|
-
/** @nocollapse */
|
|
166
|
-
/** @nocollapse */
|
|
167
|
-
/** @nocollapse */
|
|
165
|
+
/** @nocollapse */ DaffGeographyMagentoDriverModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffGeographyMagentoDriverModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
166
|
+
/** @nocollapse */ DaffGeographyMagentoDriverModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffGeographyMagentoDriverModule, imports: [CommonModule] });
|
|
167
|
+
/** @nocollapse */ DaffGeographyMagentoDriverModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffGeographyMagentoDriverModule, imports: [[
|
|
168
168
|
CommonModule,
|
|
169
169
|
]] });
|
|
170
170
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffGeographyMagentoDriverModule, decorators: [{
|
|
@@ -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 { MagentoCountry } from '../../models/responses/country';\nimport { DaffMagentoSubdivisionTransformer } from './subdivision.service';\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 getCountries = gql`\n query MagentoGetCountries {\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 getCountry = gql`\n query MagentoGetCountry($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 { DaffGeographyDriver } from '@daffodil/geography/driver';\n\nimport { DaffGeographyMagentoService } from './geography.service';\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 };\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;AAC7B,QAAA,OAAO,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AA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,gCAAgC,EAJlC,OAAA,EAAA,CAAA;YACP,YAAY;SACb,CAAA,EAAA,CAAA,CAAA;2FAEU,gCAAgC,EAAA,UAAA,EAAA,CAAA;kBAL5C,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE;wBACP,YAAY;AACb,qBAAA;iBACF,CAAA;;;ACdD;;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 { MagentoCountry } from '../../models/responses/country';\nimport { DaffMagentoSubdivisionTransformer } from './subdivision.service';\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 getCountries = gql`\n query MagentoGetCountries {\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 getCountry = gql`\n query MagentoGetCountry($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 { DaffGeographyDriver } from '@daffodil/geography/driver';\n\nimport { DaffGeographyMagentoService } from './geography.service';\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 };\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;AAC7B,QAAA,OAAO,MAAM,GAAE,MAAA,CAAA,MAAA,CACV,EAAE,cAAc,EAAE,MAAM,EAAE,IAE7B,EAAE,EAAE,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,EACrB,IAAI,EAAE,MAAM,CAAC,IAAI,EACjB,UAAU,EAAE,MAAM,CAAC,IAAI,EAAA,CAAA,GACrB,IAAI,CAAC;KACV;;iJAZU,iCAAiC,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAjC,mBAAA,iCAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,E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|
+
/** @nocollapse */ DaffTestingGeographyService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffTestingGeographyService, deps: [{ token: i1.DaffCountryFactory }, { token: i1.DaffSubdivisionFactory }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
27
|
+
/** @nocollapse */ DaffTestingGeographyService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffTestingGeographyService, providedIn: 'root' });
|
|
28
28
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffTestingGeographyService, decorators: [{
|
|
29
29
|
type: Injectable,
|
|
30
30
|
args: [{
|
|
@@ -45,9 +45,9 @@ class DaffGeographyTestingDriverModule {
|
|
|
45
45
|
};
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
|
-
/** @nocollapse */
|
|
49
|
-
/** @nocollapse */
|
|
50
|
-
/** @nocollapse */
|
|
48
|
+
/** @nocollapse */ DaffGeographyTestingDriverModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffGeographyTestingDriverModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
49
|
+
/** @nocollapse */ DaffGeographyTestingDriverModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffGeographyTestingDriverModule, imports: [CommonModule] });
|
|
50
|
+
/** @nocollapse */ DaffGeographyTestingDriverModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffGeographyTestingDriverModule, imports: [[
|
|
51
51
|
CommonModule,
|
|
52
52
|
]] });
|
|
53
53
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffGeographyTestingDriverModule, decorators: [{
|
|
@@ -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;AAD1C,QAAA,IAAc,CAAA,cAAA,GAAd,cAAc,CAAoB;AAClC,QAAA,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;;
|
|
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;AAD1C,QAAA,IAAc,CAAA,cAAA,GAAd,cAAc,CAAoB;AAClC,QAAA,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;;2IAhBU,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;AAA3B,mBAAA,2BAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,2BAA2B,cAF1B,MAAM,EAAA,CAAA,CAAA;2FAEP,2BAA2B,EAAA,UAAA,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ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: MockDaffGeographyFacade, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
31
|
+
/** @nocollapse */ MockDaffGeographyFacade.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: MockDaffGeographyFacade, providedIn: 'root' });
|
|
32
32
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: MockDaffGeographyFacade, decorators: [{
|
|
33
33
|
type: Injectable,
|
|
34
34
|
args: [{ providedIn: 'root' }]
|
|
@@ -36,9 +36,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImpor
|
|
|
36
36
|
|
|
37
37
|
class DaffGeographyTestingModule {
|
|
38
38
|
}
|
|
39
|
-
/** @nocollapse */
|
|
40
|
-
/** @nocollapse */
|
|
41
|
-
/** @nocollapse */
|
|
39
|
+
/** @nocollapse */ DaffGeographyTestingModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffGeographyTestingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
40
|
+
/** @nocollapse */ DaffGeographyTestingModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffGeographyTestingModule });
|
|
41
|
+
/** @nocollapse */ DaffGeographyTestingModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffGeographyTestingModule, providers: [
|
|
42
42
|
{ provide: DaffGeographyFacade, useExisting: MockDaffGeographyFacade },
|
|
43
43
|
] });
|
|
44
44
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffGeographyTestingModule, decorators: [{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"daffodil-geography-state-testing.mjs","sources":["../../../libs/geography/state/testing/src/mock-geography-facade.ts","../../../libs/geography/state/testing/src/geography-testing.module.ts","../../../libs/geography/state/testing/src/daffodil-geography-state-testing.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport { Dictionary } from '@ngrx/entity';\nimport { Action } from '@ngrx/store';\nimport { BehaviorSubject } from 'rxjs';\n\nimport { DaffStateError } from '@daffodil/core/state';\nimport { DaffCountry } from '@daffodil/geography';\nimport { DaffGeographyFacadeInterface } from '@daffodil/geography/state';\n\n/**\n * @inheritdoc\n */\n@Injectable({ providedIn: 'root' })\nexport class MockDaffGeographyFacade implements DaffGeographyFacadeInterface {\n loading$: BehaviorSubject<boolean> = new BehaviorSubject(null);\n errors$: BehaviorSubject<DaffStateError[]> = new BehaviorSubject([]);\n countries$: BehaviorSubject<DaffCountry[]> = new BehaviorSubject([]);\n countryIds$: BehaviorSubject<DaffCountry['id'][]> = new BehaviorSubject([]);\n countryCount$: BehaviorSubject<number> = new BehaviorSubject(null);\n countryEntities$: BehaviorSubject<Dictionary<DaffCountry>> = new BehaviorSubject(null);\n\n getCountry(id) {\n return new BehaviorSubject(null);\n }\n\n getCountrySubdivisions(id) {\n return new BehaviorSubject([]);\n }\n\n isCountryFullyLoaded(id) {\n return new BehaviorSubject(false);\n }\n\n dispatch(action: Action) {};\n}\n","import { NgModule } from '@angular/core';\n\nimport { DaffGeographyFacade } from '@daffodil/geography/state';\n\nimport { MockDaffGeographyFacade } from './mock-geography-facade';\n\n@NgModule({\n providers: [\n { provide: DaffGeographyFacade, useExisting: MockDaffGeographyFacade },\n ],\n})\nexport class DaffGeographyTestingModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AASA;;AAEG;MAEU,uBAAuB,CAAA;AADpC,IAAA,WAAA,GAAA;QAEE,IAAA,CAAA,QAAQ,GAA6B,IAAI,eAAe,CAAC,IAAI,CAAC,CAAC;QAC/D,IAAA,CAAA,OAAO,GAAsC,IAAI,eAAe,CAAC,EAAE,CAAC,CAAC;QACrE,IAAA,CAAA,UAAU,GAAmC,IAAI,eAAe,CAAC,EAAE,CAAC,CAAC;QACrE,IAAA,CAAA,WAAW,GAAyC,IAAI,eAAe,CAAC,EAAE,CAAC,CAAC;QAC5E,IAAA,CAAA,aAAa,GAA4B,IAAI,eAAe,CAAC,IAAI,CAAC,CAAC;QACnE,IAAA,CAAA,gBAAgB,GAA6C,IAAI,eAAe,CAAC,IAAI,CAAC,CAAC;KAexF;AAbC,IAAA,UAAU,CAAC,EAAE,EAAA;AACX,QAAA,OAAO,IAAI,eAAe,CAAC,IAAI,CAAC,CAAC;KAClC;AAED,IAAA,sBAAsB,CAAC,EAAE,EAAA;AACvB,QAAA,OAAO,IAAI,eAAe,CAAC,EAAE,CAAC,CAAC;KAChC;AAED,IAAA,oBAAoB,CAAC,EAAE,EAAA;AACrB,QAAA,OAAO,IAAI,eAAe,CAAC,KAAK,CAAC,CAAC;KACnC;IAED,QAAQ,CAAC,MAAc,EAAA,GAAI;;;
|
|
1
|
+
{"version":3,"file":"daffodil-geography-state-testing.mjs","sources":["../../../libs/geography/state/testing/src/mock-geography-facade.ts","../../../libs/geography/state/testing/src/geography-testing.module.ts","../../../libs/geography/state/testing/src/daffodil-geography-state-testing.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport { Dictionary } from '@ngrx/entity';\nimport { Action } from '@ngrx/store';\nimport { BehaviorSubject } from 'rxjs';\n\nimport { DaffStateError } from '@daffodil/core/state';\nimport { DaffCountry } from '@daffodil/geography';\nimport { DaffGeographyFacadeInterface } from '@daffodil/geography/state';\n\n/**\n * @inheritdoc\n */\n@Injectable({ providedIn: 'root' })\nexport class MockDaffGeographyFacade implements DaffGeographyFacadeInterface {\n loading$: BehaviorSubject<boolean> = new BehaviorSubject(null);\n errors$: BehaviorSubject<DaffStateError[]> = new BehaviorSubject([]);\n countries$: BehaviorSubject<DaffCountry[]> = new BehaviorSubject([]);\n countryIds$: BehaviorSubject<DaffCountry['id'][]> = new BehaviorSubject([]);\n countryCount$: BehaviorSubject<number> = new BehaviorSubject(null);\n countryEntities$: BehaviorSubject<Dictionary<DaffCountry>> = new BehaviorSubject(null);\n\n getCountry(id) {\n return new BehaviorSubject(null);\n }\n\n getCountrySubdivisions(id) {\n return new BehaviorSubject([]);\n }\n\n isCountryFullyLoaded(id) {\n return new BehaviorSubject(false);\n }\n\n dispatch(action: Action) {};\n}\n","import { NgModule } from '@angular/core';\n\nimport { DaffGeographyFacade } from '@daffodil/geography/state';\n\nimport { MockDaffGeographyFacade } from './mock-geography-facade';\n\n@NgModule({\n providers: [\n { provide: DaffGeographyFacade, useExisting: MockDaffGeographyFacade },\n ],\n})\nexport class DaffGeographyTestingModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AASA;;AAEG;MAEU,uBAAuB,CAAA;AADpC,IAAA,WAAA,GAAA;QAEE,IAAA,CAAA,QAAQ,GAA6B,IAAI,eAAe,CAAC,IAAI,CAAC,CAAC;QAC/D,IAAA,CAAA,OAAO,GAAsC,IAAI,eAAe,CAAC,EAAE,CAAC,CAAC;QACrE,IAAA,CAAA,UAAU,GAAmC,IAAI,eAAe,CAAC,EAAE,CAAC,CAAC;QACrE,IAAA,CAAA,WAAW,GAAyC,IAAI,eAAe,CAAC,EAAE,CAAC,CAAC;QAC5E,IAAA,CAAA,aAAa,GAA4B,IAAI,eAAe,CAAC,IAAI,CAAC,CAAC;QACnE,IAAA,CAAA,gBAAgB,GAA6C,IAAI,eAAe,CAAC,IAAI,CAAC,CAAC;KAexF;AAbC,IAAA,UAAU,CAAC,EAAE,EAAA;AACX,QAAA,OAAO,IAAI,eAAe,CAAC,IAAI,CAAC,CAAC;KAClC;AAED,IAAA,sBAAsB,CAAC,EAAE,EAAA;AACvB,QAAA,OAAO,IAAI,eAAe,CAAC,EAAE,CAAC,CAAC;KAChC;AAED,IAAA,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yFacade {
|
|
|
223
223
|
this.store.dispatch(action);
|
|
224
224
|
}
|
|
225
225
|
}
|
|
226
|
-
/** @nocollapse */
|
|
227
|
-
/** @nocollapse */
|
|
226
|
+
/** @nocollapse */ DaffGeographyFacade.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffGeographyFacade, deps: [{ token: i1.Store }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
227
|
+
/** @nocollapse */ DaffGeographyFacade.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffGeographyFacade, providedIn: 'root' });
|
|
228
228
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffGeographyFacade, decorators: [{
|
|
229
229
|
type: Injectable,
|
|
230
230
|
args: [{
|
|
@@ -241,8 +241,8 @@ class DaffGeographyEffects {
|
|
|
241
241
|
this.list$ = createEffect(() => this.actions$.pipe(ofType(DaffGeographyActionTypes.CountryListAction), switchMap((action) => this.driver.list().pipe(map(resp => new DaffCountryListSuccess(resp)), catchError((error) => of(new DaffCountryListFailure(this.errorMatcher(error))))))));
|
|
242
242
|
}
|
|
243
243
|
}
|
|
244
|
-
/** @nocollapse */
|
|
245
|
-
/** @nocollapse */
|
|
244
|
+
/** @nocollapse */ DaffGeographyEffects.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffGeographyEffects, deps: [{ token: i1$1.Actions }, { token: DaffGeographyDriver }, { token: DAFF_GEOGRAPHY_ERROR_MATCHER }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
245
|
+
/** @nocollapse */ DaffGeographyEffects.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffGeographyEffects });
|
|
246
246
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffGeographyEffects, decorators: [{
|
|
247
247
|
type: Injectable
|
|
248
248
|
}], ctorParameters: function () {
|
|
@@ -257,9 +257,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImpor
|
|
|
257
257
|
|
|
258
258
|
class DaffGeographyStateModule {
|
|
259
259
|
}
|
|
260
|
-
/** @nocollapse */
|
|
261
|
-
/** @nocollapse */
|
|
262
|
-
/** @nocollapse */
|
|
260
|
+
/** @nocollapse */ DaffGeographyStateModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffGeographyStateModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
261
|
+
/** @nocollapse */ DaffGeographyStateModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffGeographyStateModule, imports: [i1.StoreFeatureModule, i1$1.EffectsFeatureModule] });
|
|
262
|
+
/** @nocollapse */ DaffGeographyStateModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffGeographyStateModule, imports: [[
|
|
263
263
|
StoreModule.forFeature(DAFF_GEOGRAPHY_STORE_FEATURE_KEY, daffGeographyReducers),
|
|
264
264
|
EffectsModule.forFeature([
|
|
265
265
|
DaffGeographyEffects,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"daffodil-geography-state.mjs","sources":["../../../libs/geography/state/src/actions/geography.actions.ts","../../../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/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/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 { Action } from '@ngrx/store';\n\nimport { DaffStateError } from '@daffodil/core/state';\nimport { DaffCountry } from '@daffodil/geography';\n\nexport enum DaffGeographyActionTypes {\n CountryLoadAction = '[DaffGeography] Country Load Action',\n CountryLoadSuccessAction = '[DaffGeography] Country Load Success Action',\n CountryLoadFailureAction = '[DaffGeography] Country Load Failure Action',\n CountryListAction = '[DaffGeography] Country List Action',\n CountryListSuccessAction = '[DaffGeography] Country List Success Action',\n CountryListFailureAction = '[DaffGeography] 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 {\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 { DaffCountry } from '@daffodil/geography';\n\nimport {\n DaffGeographyActions,\n DaffGeographyActionTypes,\n} from '../../actions/public_api';\nimport { getCountryAdapter } from './country-entities-adapter';\nimport { daffCountryEntitiesInitialState } from './country-entities-initial-state';\nimport { DaffCountryEntityState } from './country-entities-state.interface';\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 {\n DaffGeographyActions,\n DaffGeographyActionTypes,\n} from '../../actions/public_api';\nimport { daffGeographyInitialState } from './geography-initial-state';\nimport { DaffGeographyReducerState } from './geography-state.interface';\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 { daffCountryEntitiesReducer } from './country-entities/country-entities.reducer';\nimport { daffGeographyReducer } from './geography/geography.reducer';\n\nexport const daffGeographyReducers = {\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 { DaffGeographyStateRootSlice } from '../reducers/geography-reducers-state.interface';\nimport {\n getCountryAdapter,\n DaffCountryEntityState,\n} from '../reducers/public_api';\nimport { getDaffGeographyFeatureStateSelector } from './geography-feature.selector';\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 { DaffGeographyStateRootSlice } from '../reducers/geography-reducers-state.interface';\nimport { DaffGeographyReducerState } from '../reducers/public_api';\nimport { getDaffGeographyFeatureStateSelector } from './geography-feature.selector';\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 { 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 { DaffGeographyStateRootSlice } from '../../reducers/public_api';\nimport {\n getDaffGeographySelectors,\n DaffGeographyAllSelectors,\n} from '../../selectors/public_api';\nimport { DaffGeographyFacadeInterface } from './geography-facade.interface';\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 {\n DaffCountry,\n DAFF_GEOGRAPHY_ERROR_MATCHER,\n} 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';\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":";;;;;;;;;;;;AAKY,IAAA,yBAOX;AAPD,CAAA,UAAY,wBAAwB,EAAA;AAClC,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AAC;AACH,qBAAA;iBACF,CAAA;;;ACjBD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"daffodil-geography-state.mjs","sources":["../../../libs/geography/state/src/actions/geography.actions.ts","../../../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/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/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 { Action } from '@ngrx/store';\n\nimport { DaffStateError } from '@daffodil/core/state';\nimport { DaffCountry } from '@daffodil/geography';\n\nexport enum DaffGeographyActionTypes {\n CountryLoadAction = '[DaffGeography] Country Load Action',\n CountryLoadSuccessAction = '[DaffGeography] Country Load Success Action',\n CountryLoadFailureAction = '[DaffGeography] Country Load Failure Action',\n CountryListAction = '[DaffGeography] Country List Action',\n CountryListSuccessAction = '[DaffGeography] Country List Success Action',\n CountryListFailureAction = '[DaffGeography] 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 {\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 { DaffCountry } from '@daffodil/geography';\n\nimport {\n DaffGeographyActions,\n DaffGeographyActionTypes,\n} from '../../actions/public_api';\nimport { getCountryAdapter } from './country-entities-adapter';\nimport { daffCountryEntitiesInitialState } from './country-entities-initial-state';\nimport { DaffCountryEntityState } from './country-entities-state.interface';\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 {\n DaffGeographyActions,\n DaffGeographyActionTypes,\n} from '../../actions/public_api';\nimport { daffGeographyInitialState } from './geography-initial-state';\nimport { DaffGeographyReducerState } from './geography-state.interface';\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 { daffCountryEntitiesReducer } from './country-entities/country-entities.reducer';\nimport { daffGeographyReducer } from './geography/geography.reducer';\n\nexport const daffGeographyReducers = {\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 { DaffGeographyStateRootSlice } from '../reducers/geography-reducers-state.interface';\nimport {\n getCountryAdapter,\n DaffCountryEntityState,\n} from '../reducers/public_api';\nimport { getDaffGeographyFeatureStateSelector } from './geography-feature.selector';\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 { DaffGeographyStateRootSlice } from '../reducers/geography-reducers-state.interface';\nimport { DaffGeographyReducerState } from '../reducers/public_api';\nimport { getDaffGeographyFeatureStateSelector } from './geography-feature.selector';\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 { 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 { DaffGeographyStateRootSlice } from '../../reducers/public_api';\nimport {\n getDaffGeographySelectors,\n DaffGeographyAllSelectors,\n} from '../../selectors/public_api';\nimport { DaffGeographyFacadeInterface } from './geography-facade.interface';\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 {\n DaffCountry,\n DAFF_GEOGRAPHY_ERROR_MATCHER,\n} 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';\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":";;;;;;;;;;;;AAKY,IAAA,yBAOX;AAPD,CAAA,UAAY,wBAAwB,EAAA;AAClC,IAAA,wBAAA,CAAA,mBAAA,CAAA,GAAA,qCAAyD,CAAA;AACzD,IAAA,wBAAA,CAAA,0BAAA,CAAA,GAAA,6CAAwE,CAAA;AACxE,IAAA,wBAAA,CAAA,0BAAA,CAAA,GAAA,6CAAwE,CAAA;AACxE,IAAA,wBAAA,CAAA,mBAAA,CAAA,GAAA,qCAAyD,CAAA;AACzD,IAAA,wBAAA,CAAA,0BAAA,CAAA,GAAA,6CAAwE,CAAA;AACxE,IAAA,wBAAA,CAAA,0BAAA,CAAA,GAAA,6CAAwE,CAAA;AAC1E,CAAC,EAPW,wBAAwB,KAAxB,wBAAwB,GAOnC,EAAA,CAAA,CAAA,CAAA;MAEY,eAAe,CAAA;AAG1B,IAAA,WAAA,CAAmB,OAAgB,EAAA;AAAhB,QAAA,IAAO,CAAA,OAAA,GAAP,OAAO,CAAS;AAF1B,QAAA,IAAA,CAAA,IAAI,GAAG,wBAAwB,CAAC,iBAAiB,CAAC;KAEpB;AACxC,CAAA;MAEY,sBAAsB,CAAA;AAGjC,IAAA,WAAA,CAAmB,OAAU,EAAA;AAAV,QAAA,IAAO,CAAA,OAAA,GAAP,OAAO,CAAG;AAFpB,QAAA,IAAA,CAAA,IAAI,GAAG,wBAAwB,CAAC,wBAAwB,CAAC;KAEjC;AAClC,CAAA;MAEY,sBAAsB,CAAA;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P1B,OAAA,EAAA,CAAA;AACP,YAAA,WAAW,CAAC,UAAU,CAAC,gCAAgC,EAAE,qBAAqB,CAAC;YAC/E,aAAa,CAAC,UAAU,CAAC;gBACvB,oBAAoB;aACrB,CAAC;SACH,CAAA,EAAA,CAAA,CAAA;2FAEU,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;iBACF,CAAA;;;ACjBD;;AAEG;;;;"}
|
|
@@ -18,8 +18,8 @@ class DaffAddressFactory extends DaffModelFactory {
|
|
|
18
18
|
super(MockDaffAddress);
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
|
-
/** @nocollapse */
|
|
22
|
-
/** @nocollapse */
|
|
21
|
+
/** @nocollapse */ DaffAddressFactory.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffAddressFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
22
|
+
/** @nocollapse */ DaffAddressFactory.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffAddressFactory, providedIn: 'root' });
|
|
23
23
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffAddressFactory, decorators: [{
|
|
24
24
|
type: Injectable,
|
|
25
25
|
args: [{
|
|
@@ -44,8 +44,8 @@ class DaffPersonalAddressFactory extends DaffModelFactory {
|
|
|
44
44
|
super(MockDaffPersonalAddress);
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
|
-
/** @nocollapse */
|
|
48
|
-
/** @nocollapse */
|
|
47
|
+
/** @nocollapse */ DaffPersonalAddressFactory.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffPersonalAddressFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
48
|
+
/** @nocollapse */ DaffPersonalAddressFactory.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffPersonalAddressFactory, providedIn: 'root' });
|
|
49
49
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffPersonalAddressFactory, decorators: [{
|
|
50
50
|
type: Injectable,
|
|
51
51
|
args: [{
|
|
@@ -68,8 +68,8 @@ class DaffCountryFactory extends DaffModelFactory {
|
|
|
68
68
|
super(MockCountry);
|
|
69
69
|
}
|
|
70
70
|
}
|
|
71
|
-
/** @nocollapse */
|
|
72
|
-
/** @nocollapse */
|
|
71
|
+
/** @nocollapse */ DaffCountryFactory.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffCountryFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
72
|
+
/** @nocollapse */ DaffCountryFactory.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffCountryFactory, providedIn: 'root' });
|
|
73
73
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffCountryFactory, decorators: [{
|
|
74
74
|
type: Injectable,
|
|
75
75
|
args: [{
|
|
@@ -89,8 +89,8 @@ class DaffSubdivisionFactory extends DaffModelFactory {
|
|
|
89
89
|
super(MockSubdivision);
|
|
90
90
|
}
|
|
91
91
|
}
|
|
92
|
-
/** @nocollapse */
|
|
93
|
-
/** @nocollapse */
|
|
92
|
+
/** @nocollapse */ DaffSubdivisionFactory.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffSubdivisionFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
93
|
+
/** @nocollapse */ DaffSubdivisionFactory.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffSubdivisionFactory, providedIn: 'root' });
|
|
94
94
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffSubdivisionFactory, decorators: [{
|
|
95
95
|
type: Injectable,
|
|
96
96
|
args: [{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"daffodil-geography-testing.mjs","sources":["../../../libs/geography/testing/src/factories/address.factory.ts","../../../libs/geography/testing/src/factories/personal-address.factory.ts","../../../libs/geography/testing/src/factories/country.factory.ts","../../../libs/geography/testing/src/factories/subdivision.factory.ts","../../../libs/geography/testing/src/daffodil-geography-testing.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport * as faker from '@faker-js/faker/locale/en_US';\n\nimport { DaffModelFactory } from '@daffodil/core/testing';\nimport { DaffAddress } from '@daffodil/geography';\n\n\nexport class MockDaffAddress implements DaffAddress {\n street = faker.address.streetName();\n street2 = faker.address.secondaryAddress();\n city = faker.address.city();\n region = faker.address.stateAbbr();\n postcode = faker.address.zipCode();\n country = faker.address.zipCode();\n}\n\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffAddressFactory extends DaffModelFactory<DaffAddress>{\n constructor(){\n super(MockDaffAddress);\n }\n}\n","import { Injectable } from '@angular/core';\nimport * as faker from '@faker-js/faker/locale/en_US';\n\nimport { DaffModelFactory } from '@daffodil/core/testing';\nimport { DaffPersonalAddress } from '@daffodil/geography';\n\nimport { MockDaffAddress } from './address.factory';\n\nexport class MockDaffPersonalAddress extends MockDaffAddress implements DaffPersonalAddress {\n prefix = faker.name.prefix();\n suffix = faker.name.suffix();\n firstname = faker.name.firstName();\n middlename = faker.name.firstName();\n lastname = faker.name.lastName();\n email = faker.internet.email();\n telephone = faker.phone.phoneNumber();\n}\n\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffPersonalAddressFactory extends DaffModelFactory<DaffPersonalAddress>{\n constructor() {\n super(MockDaffPersonalAddress);\n }\n}\n","import { Injectable } from '@angular/core';\nimport * as faker from '@faker-js/faker/locale/en_US';\n\nimport { DaffModelFactory } from '@daffodil/core/testing';\nimport { DaffCountry } from '@daffodil/geography';\n\nexport class MockCountry implements DaffCountry {\n id = faker.datatype.uuid();\n name = faker.random.word();\n name_en = faker.random.word();\n alpha2 = faker.random.alphaNumeric(2);\n alpha3 = faker.random.alphaNumeric(3);\n subdivisions = [];\n}\n\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffCountryFactory extends DaffModelFactory<DaffCountry> {\n constructor() {\n super(MockCountry);\n }\n}\n","import { Injectable } from '@angular/core';\nimport * as faker from '@faker-js/faker/locale/en_US';\n\nimport { DaffModelFactory } from '@daffodil/core/testing';\nimport { DaffSubdivision } from '@daffodil/geography';\n\nexport class MockSubdivision implements DaffSubdivision {\n id = faker.datatype.uuid();\n name = faker.random.word();\n iso_3166_2 = faker.random.alphaNumeric(2);\n}\n\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffSubdivisionFactory extends DaffModelFactory<DaffSubdivision> {\n constructor() {\n super(MockSubdivision);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;MAOa,eAAe,CAAA;AAA5B,IAAA,WAAA,GAAA;QACE,IAAA,CAAA,MAAM,GAAG,KAAK,CAAC,OAAO,CAAC,UAAU,EAAE,CAAC;QACpC,IAAA,CAAA,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC,gBAAgB,EAAE,CAAC;QAC3C,IAAA,CAAA,IAAI,GAAG,KAAK,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;QAC5B,IAAA,CAAA,MAAM,GAAG,KAAK,CAAC,OAAO,CAAC,SAAS,EAAE,CAAC;QACnC,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC;QACnC,IAAA,CAAA,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC;KACnC;AAAA,CAAA;AAKK,MAAO,kBAAmB,SAAQ,gBAA6B,CAAA;AACnE,IAAA,WAAA,GAAA;QACE,KAAK,CAAC,eAAe,CAAC,CAAC;KACxB;;
|
|
1
|
+
{"version":3,"file":"daffodil-geography-testing.mjs","sources":["../../../libs/geography/testing/src/factories/address.factory.ts","../../../libs/geography/testing/src/factories/personal-address.factory.ts","../../../libs/geography/testing/src/factories/country.factory.ts","../../../libs/geography/testing/src/factories/subdivision.factory.ts","../../../libs/geography/testing/src/daffodil-geography-testing.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport * as faker from '@faker-js/faker/locale/en_US';\n\nimport { DaffModelFactory } from '@daffodil/core/testing';\nimport { DaffAddress } from '@daffodil/geography';\n\n\nexport class MockDaffAddress implements DaffAddress {\n street = faker.address.streetName();\n street2 = faker.address.secondaryAddress();\n city = faker.address.city();\n region = faker.address.stateAbbr();\n postcode = faker.address.zipCode();\n country = faker.address.zipCode();\n}\n\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffAddressFactory extends DaffModelFactory<DaffAddress>{\n constructor(){\n super(MockDaffAddress);\n }\n}\n","import { Injectable } from '@angular/core';\nimport * as faker from '@faker-js/faker/locale/en_US';\n\nimport { DaffModelFactory } from '@daffodil/core/testing';\nimport { DaffPersonalAddress } from '@daffodil/geography';\n\nimport { MockDaffAddress } from './address.factory';\n\nexport class MockDaffPersonalAddress extends MockDaffAddress implements DaffPersonalAddress {\n prefix = faker.name.prefix();\n suffix = faker.name.suffix();\n firstname = faker.name.firstName();\n middlename = faker.name.firstName();\n lastname = faker.name.lastName();\n email = faker.internet.email();\n telephone = faker.phone.phoneNumber();\n}\n\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffPersonalAddressFactory extends DaffModelFactory<DaffPersonalAddress>{\n constructor() {\n super(MockDaffPersonalAddress);\n }\n}\n","import { Injectable } from '@angular/core';\nimport * as faker from '@faker-js/faker/locale/en_US';\n\nimport { DaffModelFactory } from '@daffodil/core/testing';\nimport { DaffCountry } from '@daffodil/geography';\n\nexport class MockCountry implements DaffCountry {\n id = faker.datatype.uuid();\n name = faker.random.word();\n name_en = faker.random.word();\n alpha2 = faker.random.alphaNumeric(2);\n alpha3 = faker.random.alphaNumeric(3);\n subdivisions = [];\n}\n\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffCountryFactory extends DaffModelFactory<DaffCountry> {\n constructor() {\n super(MockCountry);\n }\n}\n","import { Injectable } from '@angular/core';\nimport * as faker from '@faker-js/faker/locale/en_US';\n\nimport { DaffModelFactory } from '@daffodil/core/testing';\nimport { DaffSubdivision } from '@daffodil/geography';\n\nexport class MockSubdivision implements DaffSubdivision {\n id = faker.datatype.uuid();\n name = faker.random.word();\n iso_3166_2 = faker.random.alphaNumeric(2);\n}\n\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffSubdivisionFactory extends DaffModelFactory<DaffSubdivision> {\n constructor() {\n super(MockSubdivision);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;MAOa,eAAe,CAAA;AAA5B,IAAA,WAAA,GAAA;QACE,IAAA,CAAA,MAAM,GAAG,KAAK,CAAC,OAAO,CAAC,UAAU,EAAE,CAAC;QACpC,IAAA,CAAA,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC,gBAAgB,EAAE,CAAC;QAC3C,IAAA,CAAA,IAAI,GAAG,KAAK,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;QAC5B,IAAA,CAAA,MAAM,GAAG,KAAK,CAAC,OAAO,CAAC,SAAS,EAAE,CAAC;QACnC,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC;QACnC,IAAA,CAAA,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC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