@daffodil/geography 0.76.0 → 0.78.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/driver/in-memory/backend/geography.service.d.ts +3 -2
- package/driver/in-memory/collection-name.const.d.ts +1 -0
- package/driver/in-memory/drivers/geography.service.d.ts +4 -3
- package/esm2022/driver/in-memory/backend/geography.service.mjs +6 -4
- package/esm2022/driver/in-memory/collection-name.const.mjs +2 -0
- package/esm2022/driver/in-memory/drivers/geography-driver.module.mjs +8 -5
- package/esm2022/driver/in-memory/drivers/geography.service.mjs +12 -8
- package/esm2022/driver/magento/geography-driver.module.mjs +5 -5
- package/esm2022/driver/magento/geography.service.mjs +4 -4
- package/esm2022/driver/magento/transforms/responses/country.service.mjs +4 -4
- package/esm2022/driver/magento/transforms/responses/subdivision.service.mjs +4 -4
- package/esm2022/driver/magento/validators/get-countries.mjs +1 -1
- package/esm2022/driver/testing/drivers/geography-driver.module.mjs +5 -5
- package/esm2022/driver/testing/drivers/geography.service.mjs +4 -4
- package/esm2022/state/effects/geography.effects.mjs +4 -4
- package/esm2022/state/facades/geography/geography.facade.mjs +4 -4
- package/esm2022/state/geography-state.module.mjs +5 -5
- package/esm2022/state/reducers/country-entities/country-entities.reducer.mjs +1 -1
- package/esm2022/state/reducers/geography/geography.reducer.mjs +1 -1
- package/esm2022/state/testing/geography-testing.module.mjs +5 -5
- package/esm2022/state/testing/mock-geography-facade.mjs +4 -4
- package/esm2022/testing/factories/address.factory.mjs +4 -4
- package/esm2022/testing/factories/country.factory.mjs +4 -4
- package/esm2022/testing/factories/personal-address.factory.mjs +4 -4
- package/esm2022/testing/factories/subdivision.factory.mjs +4 -4
- package/fesm2022/daffodil-geography-driver-in-memory.mjs +42 -36
- package/fesm2022/daffodil-geography-driver-in-memory.mjs.map +1 -1
- package/fesm2022/daffodil-geography-driver-magento.mjs +13 -13
- package/fesm2022/daffodil-geography-driver-magento.mjs.map +1 -1
- package/fesm2022/daffodil-geography-driver-testing.mjs +7 -7
- package/fesm2022/daffodil-geography-driver-testing.mjs.map +1 -1
- package/fesm2022/daffodil-geography-state-testing.mjs +7 -7
- package/fesm2022/daffodil-geography-state-testing.mjs.map +1 -1
- package/fesm2022/daffodil-geography-state.mjs +10 -10
- package/fesm2022/daffodil-geography-state.mjs.map +1 -1
- package/fesm2022/daffodil-geography-testing.mjs +12 -12
- package/fesm2022/daffodil-geography-testing.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -26,4 +26,4 @@ export function daffGeographyReducer(state = daffGeographyInitialState, action)
|
|
|
26
26
|
return state;
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
29
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ2VvZ3JhcGh5LnJlZHVjZXIuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9saWJzL2dlb2dyYXBoeS9zdGF0ZS9zcmMvcmVkdWNlcnMvZ2VvZ3JhcGh5L2dlb2dyYXBoeS5yZWR1Y2VyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUVBLE9BQU8sRUFBRSx5QkFBeUIsRUFBRSxNQUFNLDJCQUEyQixDQUFDO0FBRXRFLE9BQU8sRUFFTCx3QkFBd0IsR0FDekIsTUFBTSwwQkFBMEIsQ0FBQztBQUVsQyxNQUFNLFVBQVUsb0JBQW9CLENBQ2xDLEtBQUssR0FBRyx5QkFBeUIsRUFDakMsTUFBK0I7SUFFL0IsUUFBUSxNQUFNLENBQUMsSUFBSSxFQUFFLENBQUM7UUFDcEIsS0FBSyx3QkFBd0IsQ0FBQyxpQkFBaUIsQ0FBQztRQUNoRCxLQUFLLHdCQUF3QixDQUFDLGlCQUFpQjtZQUM3QyxPQUFPLEVBQUUsR0FBRyxLQUFLLEVBQUUsT0FBTyxFQUFFLElBQUksRUFBR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=
|
|
@@ -3,13 +3,13 @@ import { DaffGeographyFacade } from '@daffodil/geography/state';
|
|
|
3
3
|
import { MockDaffGeographyFacade } from './mock-geography-facade';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
5
|
export class DaffGeographyStateTestingModule {
|
|
6
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
7
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
8
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
6
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: DaffGeographyStateTestingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
7
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.2", ngImport: i0, type: DaffGeographyStateTestingModule }); }
|
|
8
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: DaffGeographyStateTestingModule, providers: [
|
|
9
9
|
{ provide: DaffGeographyFacade, useExisting: MockDaffGeographyFacade },
|
|
10
10
|
] }); }
|
|
11
11
|
}
|
|
12
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
12
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: DaffGeographyStateTestingModule, decorators: [{
|
|
13
13
|
type: NgModule,
|
|
14
14
|
args: [{
|
|
15
15
|
providers: [
|
|
@@ -17,4 +17,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.10", ngImpo
|
|
|
17
17
|
],
|
|
18
18
|
}]
|
|
19
19
|
}] });
|
|
20
|
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ZhY2FkZSc7XG5cbkBOZ01vZHVsZSh7XG4gIHByb3ZpZGVyczogW1xuICAgIHsgcHJvdmlkZTogRGFmZkdlb2dyYXBoeUZhY2FkZSwgdXNlRXhpc3Rpbmc6IE1vY2tEYWZmR2VvZ3JhcGh5RmFjYWRlIH0sXG4gIF0sXG59KVxuZXhwb3J0IGNsYXNzIERhZmZHZW9ncmFwaHlTdGF0ZVRlc3RpbmdNb2R1bGUge31cbiJdfQ==
|
|
@@ -24,11 +24,11 @@ export class MockDaffGeographyFacade {
|
|
|
24
24
|
}
|
|
25
25
|
dispatch(action) { }
|
|
26
26
|
;
|
|
27
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
28
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
27
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: MockDaffGeographyFacade, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
28
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: MockDaffGeographyFacade, providedIn: 'root' }); }
|
|
29
29
|
}
|
|
30
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
30
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: MockDaffGeographyFacade, decorators: [{
|
|
31
31
|
type: Injectable,
|
|
32
32
|
args: [{ providedIn: 'root' }]
|
|
33
33
|
}] });
|
|
34
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
34
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibW9jay1nZW9ncmFwaHktZmFjYWRlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJ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G5ldyBCZWhhdmlvclN1YmplY3QoW10pO1xuICBjb3VudHJ5SWRzJDogQmVoYXZpb3JTdWJqZWN0PERhZmZDb3VudHJ5WydpZCddW10+ID0gbmV3IEJlaGF2aW9yU3ViamVjdChbXSk7XG4gIGNvdW50cnlDb3VudCQ6IEJlaGF2aW9yU3ViamVjdDxudW1iZXI+ID0gbmV3IEJlaGF2aW9yU3ViamVjdChudWxsKTtcbiAgY291bnRyeUVudGl0aWVzJDogQmVoYXZpb3JTdWJqZWN0PERpY3Rpb25hcnk8RGFmZkNvdW50cnk+PiA9IG5ldyBCZWhhdmlvclN1YmplY3QobnVsbCk7XG5cbiAgZ2V0Q291bnRyeShpZCkge1xuICAgIHJldHVybiBuZXcgQmVoYXZpb3JTdWJqZWN0KG51bGwpO1xuICB9XG5cbiAgZ2V0Q291bnRyeVN1YmRpdmlzaW9ucyhpZCkge1xuICAgIHJldHVybiBuZXcgQmVoYXZpb3JTdWJqZWN0KFtdKTtcbiAgfVxuXG4gIGlzQ291bnRyeUZ1bGx5TG9hZGVkKGlkKSB7XG4gICAgcmV0dXJuIG5ldyBCZWhhdmlvclN1YmplY3QoZmFsc2UpO1xuICB9XG5cbiAgZGlzcGF0Y2goYWN0aW9uOiBBY3Rpb24pIHt9O1xufVxuIl19
|
|
@@ -17,13 +17,13 @@ export class DaffAddressFactory extends DaffModelFactory {
|
|
|
17
17
|
constructor() {
|
|
18
18
|
super(MockDaffAddress);
|
|
19
19
|
}
|
|
20
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
21
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
20
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: DaffAddressFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
21
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: DaffAddressFactory, providedIn: 'root' }); }
|
|
22
22
|
}
|
|
23
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
23
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: DaffAddressFactory, decorators: [{
|
|
24
24
|
type: Injectable,
|
|
25
25
|
args: [{
|
|
26
26
|
providedIn: 'root',
|
|
27
27
|
}]
|
|
28
28
|
}], ctorParameters: () => [] });
|
|
29
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
29
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWRkcmVzcy5mYWN0b3J5LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vbGlicy9nZW9ncmFwaHkvdGVzdGluZy9zcmMvZmFjdG9yaWVzL2FkZHJlc3MuZmFjdG9yeS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsVUFBVSxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBQzNDLE9BQU8sRUFBRSxLQUFLLEVBQUUsTUFBTSw4QkFBOEIsQ0FBQztBQUVyRCxPQUFPLEVBQUUsZ0JBQWdCLEVBQUUsTUFBTSx3QkFBd0IsQ0FBQzs7QUFJMUQsTUFBTSxPQUFPLGVBQWU7SUFBNUI7UUFDRSxXQUFNLEdBQUcsS0FBSyxDQUFDLE9BQU8sQ0FBQyxNQUFNLEVBQUUsQ0FBQztRQUNoQyxZQUFPLEdBQUcsS0FBSyxDQUFDLE9BQU8sQ0FBQyxnQkFBZ0IsRUFBRSxDQUFDO1FBQzNDLFNBQUksR0FBRyxLQUFLLENBQUMsT0FBTyxDQUFDLElBQUksRUFBRSxDQUFDO1FBQzVCLFdBQU0sR0FBRyxL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7XG4gIHJlZ2lvbiA9IGZha2VyLmRhdGF0eXBlLnV1aWQoKTtcbiAgcmVnaW9uX2NvZGUgPSBmYWtlci5hZGRyZXNzLnN0YXRlQWJicigpO1xuICBwb3N0Y29kZSA9IGZha2VyLmFkZHJlc3MuemlwQ29kZSgpO1xuICBjb3VudHJ5ID0gZmFrZXIuYWRkcmVzcy5jb3VudHJ5Q29kZSgpO1xufVxuXG5ASW5qZWN0YWJsZSh7XG4gIHByb3ZpZGVkSW46ICdyb290Jyxcbn0pXG5leHBvcnQgY2xhc3MgRGFmZkFkZHJlc3NGYWN0b3J5IGV4dGVuZHMgRGFmZk1vZGVsRmFjdG9yeTxEYWZmQWRkcmVzcz57XG4gIGNvbnN0cnVjdG9yKCl7XG4gICAgc3VwZXIoTW9ja0RhZmZBZGRyZXNzKTtcbiAgfVxufVxuIl19
|
|
@@ -19,13 +19,13 @@ export class DaffCountryFactory extends DaffModelFactory {
|
|
|
19
19
|
constructor(subdivisionFactory) {
|
|
20
20
|
super(MockCountry, subdivisionFactory);
|
|
21
21
|
}
|
|
22
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
23
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
22
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: DaffCountryFactory, deps: [{ token: i1.DaffSubdivisionFactory }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
23
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: DaffCountryFactory, providedIn: 'root' }); }
|
|
24
24
|
}
|
|
25
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
25
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: DaffCountryFactory, decorators: [{
|
|
26
26
|
type: Injectable,
|
|
27
27
|
args: [{
|
|
28
28
|
providedIn: 'root',
|
|
29
29
|
}]
|
|
30
30
|
}], ctorParameters: () => [{ type: i1.DaffSubdivisionFactory }] });
|
|
31
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
31
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY291bnRyeS5mYWN0b3J5LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vbGlicy9nZW9ncmFwaHkvdGVzdGluZy9zcmMvZmFjdG9yaWVzL2NvdW50cnkuZmFjdG9yeS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsVUFBVSxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBQzNDLE9BQU8sRUFBRSxLQUFLLEVBQUUsTUFBTSw4QkFBOEIsQ0FBQztBQUVyRCxPQUFPLEVBQUUsZ0JBQWdCLEVBQUUsTUFBTSx3QkFBd0IsQ0FBQztBQUcxRCxPQUFPLEVBQUUsc0JBQXNCLEVBQUUsTUFBTSx1QkFBdUIsQ0FBQzs7O0FBRS9ELE1BQU0sT0FBTyxXQUFXO0lBUXRCLFlBQ1ksa0JBQTBDO1FBQTFDLHVCQUFrQixHQUFsQixrQkFBa0IsQ0FBd0I7UUFSdEQsT0FBRSxHQUFHLEtBQUssQ0FBQyxRQUFRLENBQUMsSUFBSSxFQUFFLENBQUM7UUFDM0IsU0FBSSxHQUFHLEtBQUssQ0FBQyxNQUFNLENBQUMsSUFBSSxFQUFFLENBQUM7UUFDM0IsWUFBTyxHQUFHLEtBQUssQ0FBQyxNQUFNLENBQUMsSUFBSSxFQUFFLENBQUM7UUFDOUIsV0FBTSxHQUFHLEtBQUssQ0FBQyxNQUFNLENBQUMsWUFBWSxDQUFDLENBQUMsQ0FBQyxDQUFD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Wtlci5kYXRhdHlwZS51dWlkKCk7XG4gIG5hbWUgPSBmYWtlci5yYW5kb20ud29yZCgpO1xuICBuYW1lX2VuID0gZmFrZXIucmFuZG9tLndvcmQoKTtcbiAgYWxwaGEyID0gZmFrZXIucmFuZG9tLmFscGhhTnVtZXJpYygyKTtcbiAgYWxwaGEzID0gZmFrZXIucmFuZG9tLmFscGhhTnVtZXJpYygzKTtcbiAgc3ViZGl2aXNpb25zID0gdGhpcy5zdWJkaXZpc2lvbkZhY3RvcnkuY3JlYXRlTWFueShmYWtlci5kYXRhdHlwZS5udW1iZXIoeyBtaW46IDAsIG1heDogMTAgfSkpO1xuXG4gIGNvbnN0cnVjdG9yKFxuICAgIHByb3RlY3RlZCBzdWJkaXZpc2lvbkZhY3Rvcnk6IERhZmZTdWJkaXZpc2lvbkZhY3RvcnksXG4gICkge31cbn1cblxuQEluamVjdGFibGUoe1xuICBwcm92aWRlZEluOiAncm9vdCcsXG59KVxuZXhwb3J0IGNsYXNzIERhZmZDb3VudHJ5RmFjdG9yeSBleHRlbmRzIERhZmZNb2RlbEZhY3Rvcnk8RGFmZkNvdW50cnk+IHtcbiAgY29uc3RydWN0b3IoXG4gICAgc3ViZGl2aXNpb25GYWN0b3J5OiBEYWZmU3ViZGl2aXNpb25GYWN0b3J5LFxuICApIHtcbiAgICBzdXBlcihNb2NrQ291bnRyeSwgc3ViZGl2aXNpb25GYWN0b3J5KTtcbiAgfVxufVxuIl19
|
|
@@ -19,13 +19,13 @@ export class DaffPersonalAddressFactory extends DaffModelFactory {
|
|
|
19
19
|
constructor() {
|
|
20
20
|
super(MockDaffPersonalAddress);
|
|
21
21
|
}
|
|
22
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
23
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
22
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: DaffPersonalAddressFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
23
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: DaffPersonalAddressFactory, providedIn: 'root' }); }
|
|
24
24
|
}
|
|
25
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
25
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: DaffPersonalAddressFactory, decorators: [{
|
|
26
26
|
type: Injectable,
|
|
27
27
|
args: [{
|
|
28
28
|
providedIn: 'root',
|
|
29
29
|
}]
|
|
30
30
|
}], ctorParameters: () => [] });
|
|
31
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
31
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGVyc29uYWwtYWRkcmVzcy5mYWN0b3J5LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vbGlicy9nZW9ncmFwaHkvdGVzdGluZy9zcmMvZmFjdG9yaWVzL3BlcnNvbmFsLWFkZHJlc3MuZmFjdG9yeS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsVUFBVSxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBQzNDLE9BQU8sRUFBRSxLQUFLLEVBQUUsTUFBTSw4QkFBOEIsQ0FBQztBQUVyRCxPQUFPLEVBQUUsZ0JBQWdCLEVBQUUsTUFBTSx3QkFBd0IsQ0FBQztBQUcxRCxPQUFPLEVBQUUsZUFBZSxFQUFFLE1BQU0sbUJBQW1CLENBQUM7O0FBRXBELE1BQU0sT0FBTyx1QkFBd0IsU0FBUSxlQUFlO0lBQTVEOztRQUNFLFdBQU0sR0FBRyxLQUFLLENB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vY2tEYWZmQWRkcmVzcyB9IGZyb20gJy4vYWRkcmVzcy5mYWN0b3J5JztcblxuZXhwb3J0IGNsYXNzIE1vY2tEYWZmUGVyc29uYWxBZGRyZXNzIGV4dGVuZHMgTW9ja0RhZmZBZGRyZXNzIGltcGxlbWVudHMgRGFmZlBlcnNvbmFsQWRkcmVzcyB7XG4gIHByZWZpeCA9IGZha2VyLm5hbWUucHJlZml4KCk7XG4gIHN1ZmZpeCA9IGZha2VyLm5hbWUuc3VmZml4KCk7XG4gIGZpcnN0bmFtZSA9IGZha2VyLm5hbWUuZmlyc3ROYW1lKCk7XG4gIG1pZGRsZW5hbWUgPSBmYWtlci5uYW1lLmZpcnN0TmFtZSgpO1xuICBsYXN0bmFtZSA9IGZha2VyLm5hbWUubGFzdE5hbWUoKTtcbiAgZW1haWwgPSBmYWtlci5pbnRlcm5ldC5lbWFpbCgpO1xuICB0ZWxlcGhvbmUgPSBmYWtlci5waG9uZS5udW1iZXIoKTtcbn1cblxuQEluamVjdGFibGUoe1xuICBwcm92aWRlZEluOiAncm9vdCcsXG59KVxuZXhwb3J0IGNsYXNzIERhZmZQZXJzb25hbEFkZHJlc3NGYWN0b3J5IGV4dGVuZHMgRGFmZk1vZGVsRmFjdG9yeTxEYWZmUGVyc29uYWxBZGRyZXNzPntcbiAgY29uc3RydWN0b3IoKSB7XG4gICAgc3VwZXIoTW9ja0RhZmZQZXJzb25hbEFkZHJlc3MpO1xuICB9XG59XG4iXX0=
|
|
@@ -13,13 +13,13 @@ export class DaffSubdivisionFactory extends DaffModelFactory {
|
|
|
13
13
|
constructor() {
|
|
14
14
|
super(MockSubdivision);
|
|
15
15
|
}
|
|
16
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
17
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
16
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: DaffSubdivisionFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
17
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: DaffSubdivisionFactory, providedIn: 'root' }); }
|
|
18
18
|
}
|
|
19
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
19
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: DaffSubdivisionFactory, decorators: [{
|
|
20
20
|
type: Injectable,
|
|
21
21
|
args: [{
|
|
22
22
|
providedIn: 'root',
|
|
23
23
|
}]
|
|
24
24
|
}], ctorParameters: () => [] });
|
|
25
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
25
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3ViZGl2aXNpb24uZmFjdG9yeS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL2xpYnMvZ2VvZ3JhcGh5L3Rlc3Rpbmcvc3JjL2ZhY3Rvcmllcy9zdWJkaXZpc2lvbi5mYWN0b3J5LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxVQUFVLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFDM0MsT0FBTyxFQUFFLEtBQUssRUFBRSxNQUFNLDhCQUE4QixDQUFDO0FBRXJELE9BQU8sRUFBRSxnQkFBZ0IsRUFBRSxNQUFNLHdCQUF3QixDQUFDOztBQUcxRCxNQUFNLE9BQU8sZUFBZTtJQUE1QjtRQUNFLE9BQUUsR0FBRyxLQUFLLENBQUMsUUFBUSxDQUFDLElBQUksRUFBRSxDQUFDO1FBQzNCLFNBQUksR0FBRyxLQUFLLENBQUMsTUFBTSxDQU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ge1xuICBjb25zdHJ1Y3RvcigpIHtcbiAgICBzdXBlcihNb2NrU3ViZGl2aXNpb24pO1xuICB9XG59XG4iXX0=
|
|
@@ -1,20 +1,24 @@
|
|
|
1
1
|
import { CommonModule } from '@angular/common';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
3
|
import { Injectable, NgModule } from '@angular/core';
|
|
4
|
+
import { DaffInMemoryDriverBase, provideDaffInMemoryBackends } from '@daffodil/driver/in-memory';
|
|
4
5
|
import { DaffCountryNotFoundError, DaffGeographyDriver } from '@daffodil/geography/driver';
|
|
5
6
|
import * as i1 from '@angular/common/http';
|
|
7
|
+
import * as i2 from 'angular-in-memory-web-api';
|
|
8
|
+
import { STATUS } from 'angular-in-memory-web-api';
|
|
6
9
|
import { throwError } from 'rxjs';
|
|
7
10
|
import { catchError, map } from 'rxjs/operators';
|
|
8
|
-
import { STATUS } from 'angular-in-memory-web-api';
|
|
9
11
|
import * as i1$1 from '@daffodil/geography/testing';
|
|
10
12
|
|
|
13
|
+
const DAFF_GEOGRAPHY_IN_MEMORY_COLLECTION_NAME = 'countries';
|
|
14
|
+
|
|
11
15
|
/**
|
|
12
16
|
* @inheritdoc
|
|
13
17
|
*/
|
|
14
|
-
class DaffInMemoryGeographyService {
|
|
15
|
-
constructor(http) {
|
|
18
|
+
class DaffInMemoryGeographyService extends DaffInMemoryDriverBase {
|
|
19
|
+
constructor(http, config) {
|
|
20
|
+
super(config, DAFF_GEOGRAPHY_IN_MEMORY_COLLECTION_NAME);
|
|
16
21
|
this.http = http;
|
|
17
|
-
this.url = '/api/countries';
|
|
18
22
|
}
|
|
19
23
|
get(countryId) {
|
|
20
24
|
return this.http.get(`${this.url}/${countryId}`).pipe(catchError((error) => throwError(() => new DaffCountryNotFoundError('Country could not be found'))), map(result => result));
|
|
@@ -22,40 +26,15 @@ class DaffInMemoryGeographyService {
|
|
|
22
26
|
list() {
|
|
23
27
|
return this.http.get(`${this.url}/`);
|
|
24
28
|
}
|
|
25
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
26
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
29
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: DaffInMemoryGeographyService, deps: [{ token: i1.HttpClient }, { token: i2.InMemoryBackendConfig }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
30
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: DaffInMemoryGeographyService, providedIn: 'root' }); }
|
|
27
31
|
}
|
|
28
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
32
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: DaffInMemoryGeographyService, decorators: [{
|
|
29
33
|
type: Injectable,
|
|
30
34
|
args: [{
|
|
31
35
|
providedIn: 'root',
|
|
32
36
|
}]
|
|
33
|
-
}], ctorParameters: () => [{ type: i1.HttpClient }] });
|
|
34
|
-
|
|
35
|
-
class DaffGeographyInMemoryDriverModule {
|
|
36
|
-
static forRoot() {
|
|
37
|
-
return {
|
|
38
|
-
ngModule: DaffGeographyInMemoryDriverModule,
|
|
39
|
-
providers: [
|
|
40
|
-
{
|
|
41
|
-
provide: DaffGeographyDriver,
|
|
42
|
-
useExisting: DaffInMemoryGeographyService,
|
|
43
|
-
},
|
|
44
|
-
],
|
|
45
|
-
};
|
|
46
|
-
}
|
|
47
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.10", ngImport: i0, type: DaffGeographyInMemoryDriverModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
48
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.10", ngImport: i0, type: DaffGeographyInMemoryDriverModule, imports: [CommonModule] }); }
|
|
49
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.10", ngImport: i0, type: DaffGeographyInMemoryDriverModule, imports: [CommonModule] }); }
|
|
50
|
-
}
|
|
51
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.10", ngImport: i0, type: DaffGeographyInMemoryDriverModule, decorators: [{
|
|
52
|
-
type: NgModule,
|
|
53
|
-
args: [{
|
|
54
|
-
imports: [
|
|
55
|
-
CommonModule,
|
|
56
|
-
],
|
|
57
|
-
}]
|
|
58
|
-
}] });
|
|
37
|
+
}], ctorParameters: () => [{ type: i1.HttpClient }, { type: i2.InMemoryBackendConfig }] });
|
|
59
38
|
|
|
60
39
|
/**
|
|
61
40
|
* An in-memory service that stubs out the backend services for getting countries.
|
|
@@ -66,6 +45,7 @@ class DaffInMemoryBackendGeographyService {
|
|
|
66
45
|
constructor(countryFactory, subdivisionFactory) {
|
|
67
46
|
this.countryFactory = countryFactory;
|
|
68
47
|
this.subdivisionFactory = subdivisionFactory;
|
|
48
|
+
this.collectionName = DAFF_GEOGRAPHY_IN_MEMORY_COLLECTION_NAME;
|
|
69
49
|
this.countries = this.countryFactory.createMany(5);
|
|
70
50
|
this.countries.forEach(country => country.subdivisions = this.subdivisionFactory.createMany(5));
|
|
71
51
|
}
|
|
@@ -101,16 +81,42 @@ class DaffInMemoryBackendGeographyService {
|
|
|
101
81
|
listCountries(reqInfo) {
|
|
102
82
|
return this.countries;
|
|
103
83
|
}
|
|
104
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
105
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
84
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: DaffInMemoryBackendGeographyService, deps: [{ token: i1$1.DaffCountryFactory }, { token: i1$1.DaffSubdivisionFactory }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
85
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: DaffInMemoryBackendGeographyService, providedIn: 'root' }); }
|
|
106
86
|
}
|
|
107
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
87
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: DaffInMemoryBackendGeographyService, decorators: [{
|
|
108
88
|
type: Injectable,
|
|
109
89
|
args: [{
|
|
110
90
|
providedIn: 'root',
|
|
111
91
|
}]
|
|
112
92
|
}], ctorParameters: () => [{ type: i1$1.DaffCountryFactory }, { type: i1$1.DaffSubdivisionFactory }] });
|
|
113
93
|
|
|
94
|
+
class DaffGeographyInMemoryDriverModule {
|
|
95
|
+
static forRoot() {
|
|
96
|
+
return {
|
|
97
|
+
ngModule: DaffGeographyInMemoryDriverModule,
|
|
98
|
+
providers: [
|
|
99
|
+
{
|
|
100
|
+
provide: DaffGeographyDriver,
|
|
101
|
+
useExisting: DaffInMemoryGeographyService,
|
|
102
|
+
},
|
|
103
|
+
provideDaffInMemoryBackends(DaffInMemoryBackendGeographyService),
|
|
104
|
+
],
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: DaffGeographyInMemoryDriverModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
108
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.2", ngImport: i0, type: DaffGeographyInMemoryDriverModule, imports: [CommonModule] }); }
|
|
109
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: DaffGeographyInMemoryDriverModule, imports: [CommonModule] }); }
|
|
110
|
+
}
|
|
111
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: DaffGeographyInMemoryDriverModule, decorators: [{
|
|
112
|
+
type: NgModule,
|
|
113
|
+
args: [{
|
|
114
|
+
imports: [
|
|
115
|
+
CommonModule,
|
|
116
|
+
],
|
|
117
|
+
}]
|
|
118
|
+
}] });
|
|
119
|
+
|
|
114
120
|
/**
|
|
115
121
|
* Generated bundle index. Do not edit.
|
|
116
122
|
*/
|
|
@@ -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/
|
|
1
|
+
{"version":3,"file":"daffodil-geography-driver-in-memory.mjs","sources":["../../../libs/geography/driver/in-memory/src/collection-name.const.ts","../../../libs/geography/driver/in-memory/src/drivers/geography.service.ts","../../../libs/geography/driver/in-memory/src/backend/geography.service.ts","../../../libs/geography/driver/in-memory/src/drivers/geography-driver.module.ts","../../../libs/geography/driver/in-memory/src/daffodil-geography-driver-in-memory.ts"],"sourcesContent":["export const DAFF_GEOGRAPHY_IN_MEMORY_COLLECTION_NAME = 'countries';\n","import { HttpClient } from '@angular/common/http';\nimport { Injectable } from '@angular/core';\nimport { InMemoryBackendConfig } from 'angular-in-memory-web-api';\nimport {\n Observable,\n throwError,\n} from 'rxjs';\nimport {\n catchError,\n map,\n} from 'rxjs/operators';\n\nimport { DaffInMemoryDriverBase } from '@daffodil/driver/in-memory';\nimport { DaffCountry } from '@daffodil/geography';\nimport {\n DaffGeographyServiceInterface,\n DaffCountryNotFoundError,\n} from '@daffodil/geography/driver';\n\nimport { DAFF_GEOGRAPHY_IN_MEMORY_COLLECTION_NAME } from '../collection-name.const';\n\n/**\n * @inheritdoc\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffInMemoryGeographyService extends DaffInMemoryDriverBase implements DaffGeographyServiceInterface<DaffCountry> {\n constructor(\n private http: HttpClient,\n config: InMemoryBackendConfig,\n ) {\n super(config, DAFF_GEOGRAPHY_IN_MEMORY_COLLECTION_NAME);\n }\n\n get(countryId: DaffCountry['id']): Observable<DaffCountry> {\n return this.http.get<DaffCountry>(`${this.url}/${countryId}`).pipe(\n catchError((error: Error) => throwError(() => new DaffCountryNotFoundError('Country could not be found'))),\n map(result => result),\n );\n }\n\n list(): Observable<DaffCountry[]> {\n return this.http.get<DaffCountry[]>(`${this.url}/`);\n }\n}\n","import { Injectable } from '@angular/core';\nimport {\n InMemoryDbService,\n RequestInfo,\n STATUS,\n} from 'angular-in-memory-web-api';\n\nimport { DaffInMemorySingleRouteableBackend } from '@daffodil/driver/in-memory';\nimport { DaffCountry } from '@daffodil/geography';\nimport {\n DaffCountryFactory,\n DaffSubdivisionFactory,\n} from '@daffodil/geography/testing';\n\nimport { DAFF_GEOGRAPHY_IN_MEMORY_COLLECTION_NAME } from '../collection-name.const';\n\n/**\n * An in-memory service that stubs out the backend services for getting countries.\n *\n * @inheritdoc\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffInMemoryBackendGeographyService implements InMemoryDbService, DaffInMemorySingleRouteableBackend {\n readonly collectionName = DAFF_GEOGRAPHY_IN_MEMORY_COLLECTION_NAME;\n\n countries: DaffCountry[];\n\n constructor(\n private countryFactory: DaffCountryFactory,\n private subdivisionFactory: DaffSubdivisionFactory,\n ) {\n this.countries = this.countryFactory.createMany(5);\n this.countries.forEach(country => country.subdivisions = this.subdivisionFactory.createMany(5));\n }\n\n /**\n * Creates a fake database of countries for the geography inmemory backend service.\n *\n * @docs-private\n * @returns A fake database of an array of countries\n */\n createDb(reqInfo: RequestInfo): any {\n if (reqInfo) {\n const seedData = reqInfo.utils.getJsonBody(reqInfo.req).countries;\n if (seedData) {\n this.countries = seedData;\n }\n }\n\n return {\n countries: this.countries,\n };\n }\n\n /**\n * Responds to GET requests.\n */\n get(reqInfo: RequestInfo): any {\n return reqInfo.utils.createResponse$(() => ({\n body: reqInfo.id ? this.getCountry(reqInfo) : this.listCountries(reqInfo),\n status: STATUS.OK,\n }));\n }\n\n private getCountry(reqInfo: RequestInfo) {\n return this.countries.find(country => country.id === reqInfo.id);\n }\n\n private listCountries(reqInfo: RequestInfo) {\n return this.countries;\n }\n}\n","import { CommonModule } from '@angular/common';\nimport {\n NgModule,\n ModuleWithProviders,\n} from '@angular/core';\n\nimport { provideDaffInMemoryBackends } from '@daffodil/driver/in-memory';\nimport { DaffGeographyDriver } from '@daffodil/geography/driver';\n\nimport { DaffInMemoryGeographyService } from './geography.service';\nimport { DaffInMemoryBackendGeographyService } from '../backend/geography.service';\n\n@NgModule({\n imports: [\n CommonModule,\n ],\n})\nexport class DaffGeographyInMemoryDriverModule {\n static forRoot(): ModuleWithProviders<DaffGeographyInMemoryDriverModule> {\n return {\n ngModule: DaffGeographyInMemoryDriverModule,\n providers: [\n {\n provide: DaffGeographyDriver,\n useExisting: DaffInMemoryGeographyService,\n },\n provideDaffInMemoryBackends(DaffInMemoryBackendGeographyService),\n ],\n };\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1"],"mappings":";;;;;;;;;;;;AAAO,MAAM,wCAAwC,GAAG,WAAW;;ACqBnE;;AAEG;AAIG,MAAO,4BAA6B,SAAQ,sBAAsB,CAAA;IACtE,WACU,CAAA,IAAgB,EACxB,MAA6B,EAAA;AAE7B,QAAA,KAAK,CAAC,MAAM,EAAE,wCAAwC,CAAC,CAAC;QAHhD,IAAI,CAAA,IAAA,GAAJ,IAAI,CAAY;KAIzB;AAED,IAAA,GAAG,CAAC,SAA4B,EAAA;QAC9B,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAAc,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,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE;wBACP,YAAY;AACb,qBAAA;AACF,iBAAA,CAAA;;;AChBD;;AAEG;;;;"}
|
|
@@ -23,10 +23,10 @@ class DaffMagentoSubdivisionTransformer {
|
|
|
23
23
|
iso_3166_2: region.code,
|
|
24
24
|
} : null;
|
|
25
25
|
}
|
|
26
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
27
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
26
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: DaffMagentoSubdivisionTransformer, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
27
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: DaffMagentoSubdivisionTransformer, providedIn: 'root' }); }
|
|
28
28
|
}
|
|
29
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
29
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: DaffMagentoSubdivisionTransformer, decorators: [{
|
|
30
30
|
type: Injectable,
|
|
31
31
|
args: [{
|
|
32
32
|
providedIn: 'root',
|
|
@@ -57,10 +57,10 @@ class DaffMagentoCountryTransformer {
|
|
|
57
57
|
alpha3: country.three_letter_abbreviation,
|
|
58
58
|
} : null;
|
|
59
59
|
}
|
|
60
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
61
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
60
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: DaffMagentoCountryTransformer, deps: [{ token: DaffMagentoSubdivisionTransformer }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
61
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: DaffMagentoCountryTransformer, providedIn: 'root' }); }
|
|
62
62
|
}
|
|
63
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
63
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: DaffMagentoCountryTransformer, decorators: [{
|
|
64
64
|
type: Injectable,
|
|
65
65
|
args: [{
|
|
66
66
|
providedIn: 'root',
|
|
@@ -154,10 +154,10 @@ class DaffGeographyMagentoService {
|
|
|
154
154
|
},
|
|
155
155
|
}).pipe(map(result => this.countryTransformer.transform(result.data.country)), catchError(err => throwError(() => transformMagentoGeographyError(err))));
|
|
156
156
|
}
|
|
157
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
158
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
157
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: DaffGeographyMagentoService, deps: [{ token: i1.Apollo }, { token: DaffMagentoCountryTransformer }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
158
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: DaffGeographyMagentoService, providedIn: 'root' }); }
|
|
159
159
|
}
|
|
160
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
160
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: DaffGeographyMagentoService, decorators: [{
|
|
161
161
|
type: Injectable,
|
|
162
162
|
args: [{
|
|
163
163
|
providedIn: 'root',
|
|
@@ -186,11 +186,11 @@ class DaffGeographyMagentoDriverModule {
|
|
|
186
186
|
],
|
|
187
187
|
};
|
|
188
188
|
}
|
|
189
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
190
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
191
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
189
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: DaffGeographyMagentoDriverModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
190
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.2", ngImport: i0, type: DaffGeographyMagentoDriverModule, imports: [CommonModule] }); }
|
|
191
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: DaffGeographyMagentoDriverModule, imports: [CommonModule] }); }
|
|
192
192
|
}
|
|
193
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
193
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: DaffGeographyMagentoDriverModule, decorators: [{
|
|
194
194
|
type: NgModule,
|
|
195
195
|
args: [{
|
|
196
196
|
imports: [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"daffodil-geography-driver-magento.mjs","sources":["../../../libs/geography/driver/magento/src/transforms/responses/subdivision.service.ts","../../../libs/geography/driver/magento/src/transforms/responses/country.service.ts","../../../libs/geography/driver/magento/src/queries/fragments/country.ts","../../../libs/geography/driver/magento/src/queries/fragments/region.ts","../../../libs/geography/driver/magento/src/queries/get-countries.ts","../../../libs/geography/driver/magento/src/queries/get-country.ts","../../../libs/geography/driver/magento/src/errors/codes.ts","../../../libs/geography/driver/magento/src/errors/map.ts","../../../libs/geography/driver/magento/src/errors/transform.ts","../../../libs/geography/driver/magento/src/validators/get-countries.ts","../../../libs/geography/driver/magento/src/geography.service.ts","../../../libs/geography/driver/magento/src/geography-driver.module.ts","../../../libs/geography/driver/magento/src/daffodil-geography-driver-magento.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\n\nimport { DaffSubdivision } from '@daffodil/geography';\n\nimport { MagentoRegion } from '../../models/responses/region';\n\n/**\n * Transforms magento carts into an object usable by daffodil.\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffMagentoSubdivisionTransformer {\n /**\n * Transforms the MagentoRegion from the magento region query into a DaffSubdivision.\n */\n transform(region: MagentoRegion): DaffSubdivision {\n return region ? {\n ...{ magento_region: region },\n\n id: String(region.id),\n name: region.name,\n iso_3166_2: region.code,\n } : null;\n }\n}\n","import { Injectable } from '@angular/core';\n\nimport { DaffCountry } from '@daffodil/geography';\n\nimport { DaffMagentoSubdivisionTransformer } from './subdivision.service';\nimport { MagentoCountry } from '../../models/responses/country';\n\n/**\n * Transforms magento carts into an object usable by daffodil.\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffMagentoCountryTransformer {\n constructor(public subdivisionTransformer: DaffMagentoSubdivisionTransformer) {}\n\n private transformSubdivisions(regions: MagentoCountry['available_regions']): DaffCountry['subdivisions'] {\n return regions.map(region => this.subdivisionTransformer.transform(region));\n }\n\n /**\n * Transforms the MagentoCountry from the magento country query into a DaffCountry.\n */\n transform(country: MagentoCountry): DaffCountry {\n return country ? {\n ...{ magento_country: country },\n\n subdivisions: this.transformSubdivisions(country.available_regions || []),\n\n id: country.id,\n name: country.full_name_locale,\n name_en: country.full_name_english,\n alpha2: country.two_letter_abbreviation,\n alpha3: country.three_letter_abbreviation,\n } : null;\n }\n}\n","import { gql } from 'apollo-angular';\n\n\nexport const countryFragment = gql`\n fragment country on Country {\n id\n full_name_english\n full_name_locale\n three_letter_abbreviation\n two_letter_abbreviation\n }\n`;\n","import { gql } from 'apollo-angular';\n\n\nexport const regionFragment = gql`\n fragment region on Region {\n code\n id\n name\n }\n`;\n","import { gql } from 'apollo-angular';\n\nimport { countryFragment } from './fragments/public_api';\n\nexport const MAGENTO_GET_COUNTRIES_QUERY_NAME = 'MagentoGetCountries';\n\nexport const getCountries = gql`\n query ${MAGENTO_GET_COUNTRIES_QUERY_NAME} {\n countries {\n ...country\n }\n }\n ${countryFragment}\n`;\n","import { gql } from 'apollo-angular';\n\nimport {\n countryFragment,\n regionFragment,\n} from './fragments/public_api';\n\nexport const MAGENTO_GET_COUNTRY_QUERY_NAME = 'MagentoGetCountry';\n\nexport const getCountry = gql`\n query ${MAGENTO_GET_COUNTRY_QUERY_NAME}($countryId: String!) {\n country(id: $countryId) {\n ...country\n available_regions {\n ...region\n }\n }\n }\n ${countryFragment}\n ${regionFragment}\n`;\n","export enum MagentoGeographyGraphQlErrorCode {\n COUNTRY_NOT_FOUND = 'graphql-no-such-entity',\n}\n","import { DaffErrorCodeMap } from '@daffodil/core';\nimport { DaffCountryNotFoundError } from '@daffodil/geography/driver';\n\nimport { MagentoGeographyGraphQlErrorCode } from './codes';\n\nexport const DaffGeographyMagentoErrorMap: DaffErrorCodeMap = {\n [MagentoGeographyGraphQlErrorCode.COUNTRY_NOT_FOUND]: DaffCountryNotFoundError,\n};\n","import { daffTransformMagentoError } from '@daffodil/driver/magento';\n\nimport { DaffGeographyMagentoErrorMap } from './map';\n\nexport function transformMagentoGeographyError(error: any) {\n return daffTransformMagentoError(error, DaffGeographyMagentoErrorMap);\n}\n","import { ApolloQueryResult } from '@apollo/client/core';\n\nimport { DaffGeographyInvalidAPIResponseError } from '@daffodil/geography/driver';\n\nimport { MagentoGetCountriesResponse } from '../queries/public_api';\n\nexport const validateGetCountriesResponse = (response: ApolloQueryResult<MagentoGetCountriesResponse>) => {\n if (response.data.countries) {\n return response;\n } else {\n throw new DaffGeographyInvalidAPIResponseError('Get countries response does not contain a valid list of countries.');\n }\n};\n","import { Injectable } from '@angular/core';\nimport { Apollo } from 'apollo-angular';\nimport {\n Observable,\n throwError,\n} from 'rxjs';\nimport {\n map,\n catchError,\n} from 'rxjs/operators';\n\nimport { DaffCountry } from '@daffodil/geography';\nimport { DaffGeographyServiceInterface } from '@daffodil/geography/driver';\n\nimport { transformMagentoGeographyError } from './errors/transform';\nimport { getCountry } from './queries/get-country';\nimport {\n getCountries,\n MagentoGetCountriesResponse,\n} from './queries/public_api';\nimport { MagentoGetCountryResponse } from './queries/responses/get-country';\nimport { DaffMagentoCountryTransformer } from './transforms/responses/country.service';\nimport { validateGetCountriesResponse } from './validators/public_api';\n\n/**\n * A service for making Magento GraphQL queries for carts.\n *\n * @inheritdoc\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffGeographyMagentoService implements DaffGeographyServiceInterface<DaffCountry> {\n constructor(\n private apollo: Apollo,\n public countryTransformer: DaffMagentoCountryTransformer,\n ) {}\n\n list(): Observable<DaffCountry[]> {\n return this.apollo.query<MagentoGetCountriesResponse>({\n query: getCountries,\n }).pipe(\n map(validateGetCountriesResponse),\n map(result => result.data.countries.map(country => this.countryTransformer.transform(country))),\n catchError(err => throwError(() => transformMagentoGeographyError(err))),\n );\n }\n\n get(countryId: DaffCountry['id']): Observable<DaffCountry> {\n return this.apollo.query<MagentoGetCountryResponse>({\n query: getCountry,\n variables: {\n countryId,\n },\n }).pipe(\n map(result => this.countryTransformer.transform(result.data.country)),\n catchError(err => throwError(() => transformMagentoGeographyError(err))),\n );\n }\n}\n","import { CommonModule } from '@angular/common';\nimport {\n NgModule,\n ModuleWithProviders,\n} from '@angular/core';\n\nimport { DAFF_MAGENTO_CACHEABLE_OPERATIONS } from '@daffodil/driver/magento';\nimport { DaffGeographyDriver } from '@daffodil/geography/driver';\n\nimport { DaffGeographyMagentoService } from './geography.service';\nimport {\n MAGENTO_GET_COUNTRIES_QUERY_NAME,\n MAGENTO_GET_COUNTRY_QUERY_NAME,\n} from './queries/public_api';\n\n@NgModule({\n imports: [\n CommonModule,\n ],\n})\nexport class DaffGeographyMagentoDriverModule {\n static forRoot(): ModuleWithProviders<DaffGeographyMagentoDriverModule> {\n return {\n ngModule: DaffGeographyMagentoDriverModule,\n providers: [\n {\n provide: DaffGeographyDriver,\n useExisting: DaffGeographyMagentoService,\n },\n {\n provide: DAFF_MAGENTO_CACHEABLE_OPERATIONS,\n useValue: MAGENTO_GET_COUNTRY_QUERY_NAME,\n multi: true,\n },\n {\n provide: DAFF_MAGENTO_CACHEABLE_OPERATIONS,\n useValue: MAGENTO_GET_COUNTRIES_QUERY_NAME,\n multi: true,\n },\n ],\n };\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1.DaffMagentoSubdivisionTransformer","i2.DaffMagentoCountryTransformer"],"mappings":";;;;;;;;;;AAMA;;AAEG;MAIU,iCAAiC,CAAA;AAC5C;;AAEG;AACH,IAAA,SAAS,CAAC,MAAqB,EAAA;QAC7B,OAAO,MAAM,GAAG;AACd,YAAA,GAAG,EAAE,cAAc,EAAE,MAAM,EAAE;AAE7B,YAAA,EAAE,EAAE,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC;YACrB,IAAI,EAAE,MAAM,CAAC,IAAI;YACjB,UAAU,EAAE,MAAM,CAAC,IAAI;SACxB,GAAG,IAAI,CAAC;KACV;kIAZU,iCAAiC,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA,EAAA;AAAjC,uBAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QA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AA,EAAA,EAAA,EAAA,IAAA,EAAA,gCAAgC,YAHzC,YAAY,CAAA,EAAA,CAAA,CAAA,EAAA;;4FAGH,gCAAgC,EAAA,UAAA,EAAA,CAAA;kBAL5C,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE;wBACP,YAAY;AACb,qBAAA;AACF,iBAAA,CAAA;;;ACnBD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"daffodil-geography-driver-magento.mjs","sources":["../../../libs/geography/driver/magento/src/transforms/responses/subdivision.service.ts","../../../libs/geography/driver/magento/src/transforms/responses/country.service.ts","../../../libs/geography/driver/magento/src/queries/fragments/country.ts","../../../libs/geography/driver/magento/src/queries/fragments/region.ts","../../../libs/geography/driver/magento/src/queries/get-countries.ts","../../../libs/geography/driver/magento/src/queries/get-country.ts","../../../libs/geography/driver/magento/src/errors/codes.ts","../../../libs/geography/driver/magento/src/errors/map.ts","../../../libs/geography/driver/magento/src/errors/transform.ts","../../../libs/geography/driver/magento/src/validators/get-countries.ts","../../../libs/geography/driver/magento/src/geography.service.ts","../../../libs/geography/driver/magento/src/geography-driver.module.ts","../../../libs/geography/driver/magento/src/daffodil-geography-driver-magento.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\n\nimport { DaffSubdivision } from '@daffodil/geography';\n\nimport { MagentoRegion } from '../../models/responses/region';\n\n/**\n * Transforms magento carts into an object usable by daffodil.\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffMagentoSubdivisionTransformer {\n /**\n * Transforms the MagentoRegion from the magento region query into a DaffSubdivision.\n */\n transform(region: MagentoRegion): DaffSubdivision {\n return region ? {\n ...{ magento_region: region },\n\n id: String(region.id),\n name: region.name,\n iso_3166_2: region.code,\n } : null;\n }\n}\n","import { Injectable } from '@angular/core';\n\nimport { DaffCountry } from '@daffodil/geography';\n\nimport { DaffMagentoSubdivisionTransformer } from './subdivision.service';\nimport { MagentoCountry } from '../../models/responses/country';\n\n/**\n * Transforms magento carts into an object usable by daffodil.\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffMagentoCountryTransformer {\n constructor(public subdivisionTransformer: DaffMagentoSubdivisionTransformer) {}\n\n private transformSubdivisions(regions: MagentoCountry['available_regions']): DaffCountry['subdivisions'] {\n return regions.map(region => this.subdivisionTransformer.transform(region));\n }\n\n /**\n * Transforms the MagentoCountry from the magento country query into a DaffCountry.\n */\n transform(country: MagentoCountry): DaffCountry {\n return country ? {\n ...{ magento_country: country },\n\n subdivisions: this.transformSubdivisions(country.available_regions || []),\n\n id: country.id,\n name: country.full_name_locale,\n name_en: country.full_name_english,\n alpha2: country.two_letter_abbreviation,\n alpha3: country.three_letter_abbreviation,\n } : null;\n }\n}\n","import { gql } from 'apollo-angular';\n\n\nexport const countryFragment = gql`\n fragment country on Country {\n id\n full_name_english\n full_name_locale\n three_letter_abbreviation\n two_letter_abbreviation\n }\n`;\n","import { gql } from 'apollo-angular';\n\n\nexport const regionFragment = gql`\n fragment region on Region {\n code\n id\n name\n }\n`;\n","import { gql } from 'apollo-angular';\n\nimport { countryFragment } from './fragments/public_api';\n\nexport const MAGENTO_GET_COUNTRIES_QUERY_NAME = 'MagentoGetCountries';\n\nexport const getCountries = gql`\n query ${MAGENTO_GET_COUNTRIES_QUERY_NAME} {\n countries {\n ...country\n }\n }\n ${countryFragment}\n`;\n","import { gql } from 'apollo-angular';\n\nimport {\n countryFragment,\n regionFragment,\n} from './fragments/public_api';\n\nexport const MAGENTO_GET_COUNTRY_QUERY_NAME = 'MagentoGetCountry';\n\nexport const getCountry = gql`\n query ${MAGENTO_GET_COUNTRY_QUERY_NAME}($countryId: String!) {\n country(id: $countryId) {\n ...country\n available_regions {\n ...region\n }\n }\n }\n ${countryFragment}\n ${regionFragment}\n`;\n","export enum MagentoGeographyGraphQlErrorCode {\n COUNTRY_NOT_FOUND = 'graphql-no-such-entity',\n}\n","import { DaffErrorCodeMap } from '@daffodil/core';\nimport { DaffCountryNotFoundError } from '@daffodil/geography/driver';\n\nimport { MagentoGeographyGraphQlErrorCode } from './codes';\n\nexport const DaffGeographyMagentoErrorMap: DaffErrorCodeMap = {\n [MagentoGeographyGraphQlErrorCode.COUNTRY_NOT_FOUND]: DaffCountryNotFoundError,\n};\n","import { daffTransformMagentoError } from '@daffodil/driver/magento';\n\nimport { DaffGeographyMagentoErrorMap } from './map';\n\nexport function transformMagentoGeographyError(error: any) {\n return daffTransformMagentoError(error, DaffGeographyMagentoErrorMap);\n}\n","import { ApolloQueryResult } from '@apollo/client/core';\n\nimport { DaffGeographyInvalidAPIResponseError } from '@daffodil/geography/driver';\n\nimport { MagentoGetCountriesResponse } from '../queries/public_api';\n\nexport const validateGetCountriesResponse = (response: ApolloQueryResult<MagentoGetCountriesResponse>) => {\n if (response.data.countries) {\n return response;\n } else {\n throw new DaffGeographyInvalidAPIResponseError('Get countries response does not contain a valid list of countries.');\n }\n};\n","import { Injectable } from '@angular/core';\nimport { Apollo } from 'apollo-angular';\nimport {\n Observable,\n throwError,\n} from 'rxjs';\nimport {\n map,\n catchError,\n} from 'rxjs/operators';\n\nimport { DaffCountry } from '@daffodil/geography';\nimport { DaffGeographyServiceInterface } from '@daffodil/geography/driver';\n\nimport { transformMagentoGeographyError } from './errors/transform';\nimport { getCountry } from './queries/get-country';\nimport {\n getCountries,\n MagentoGetCountriesResponse,\n} from './queries/public_api';\nimport { MagentoGetCountryResponse } from './queries/responses/get-country';\nimport { DaffMagentoCountryTransformer } from './transforms/responses/country.service';\nimport { validateGetCountriesResponse } from './validators/public_api';\n\n/**\n * A service for making Magento GraphQL queries for carts.\n *\n * @inheritdoc\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffGeographyMagentoService implements DaffGeographyServiceInterface<DaffCountry> {\n constructor(\n private apollo: Apollo,\n public countryTransformer: DaffMagentoCountryTransformer,\n ) {}\n\n list(): Observable<DaffCountry[]> {\n return this.apollo.query<MagentoGetCountriesResponse>({\n query: getCountries,\n }).pipe(\n map(validateGetCountriesResponse),\n map(result => result.data.countries.map(country => this.countryTransformer.transform(country))),\n catchError(err => throwError(() => transformMagentoGeographyError(err))),\n );\n }\n\n get(countryId: DaffCountry['id']): Observable<DaffCountry> {\n return this.apollo.query<MagentoGetCountryResponse>({\n query: getCountry,\n variables: {\n countryId,\n },\n }).pipe(\n map(result => this.countryTransformer.transform(result.data.country)),\n catchError(err => throwError(() => transformMagentoGeographyError(err))),\n );\n }\n}\n","import { CommonModule } from '@angular/common';\nimport {\n NgModule,\n ModuleWithProviders,\n} from '@angular/core';\n\nimport { DAFF_MAGENTO_CACHEABLE_OPERATIONS } from '@daffodil/driver/magento';\nimport { DaffGeographyDriver } from '@daffodil/geography/driver';\n\nimport { DaffGeographyMagentoService } from './geography.service';\nimport {\n MAGENTO_GET_COUNTRIES_QUERY_NAME,\n MAGENTO_GET_COUNTRY_QUERY_NAME,\n} from './queries/public_api';\n\n@NgModule({\n imports: [\n CommonModule,\n ],\n})\nexport class DaffGeographyMagentoDriverModule {\n static forRoot(): ModuleWithProviders<DaffGeographyMagentoDriverModule> {\n return {\n ngModule: DaffGeographyMagentoDriverModule,\n providers: [\n {\n provide: DaffGeographyDriver,\n useExisting: DaffGeographyMagentoService,\n },\n {\n provide: DAFF_MAGENTO_CACHEABLE_OPERATIONS,\n useValue: MAGENTO_GET_COUNTRY_QUERY_NAME,\n multi: true,\n },\n {\n provide: DAFF_MAGENTO_CACHEABLE_OPERATIONS,\n useValue: MAGENTO_GET_COUNTRIES_QUERY_NAME,\n multi: true,\n },\n ],\n };\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1.DaffMagentoSubdivisionTransformer","i2.DaffMagentoCountryTransformer"],"mappings":";;;;;;;;;;AAMA;;AAEG;MAIU,iCAAiC,CAAA;AAC5C;;AAEG;AACH,IAAA,SAAS,CAAC,MAAqB,EAAA;QAC7B,OAAO,MAAM,GAAG;AACd,YAAA,GAAG,EAAE,cAAc,EAAE,MAAM,EAAE;AA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,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA,EAAA;AAAhC,uBAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,gCAAgC,YAHzC,YAAY,CAAA,EAAA,CAAA,CAAA,EAAA;AAGH,uBAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,gCAAgC,YAHzC,YAAY,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAGH,gCAAgC,EAAA,UAAA,EAAA,CAAA;kBAL5C,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE;wBACP,YAAY;AACb,qBAAA;AACF,iBAAA,CAAA;;;ACnBD;;AAEG;;;;"}
|
|
@@ -22,10 +22,10 @@ class DaffTestingGeographyService {
|
|
|
22
22
|
list() {
|
|
23
23
|
return of(this.countryFactory.createMany(5));
|
|
24
24
|
}
|
|
25
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
26
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
25
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: DaffTestingGeographyService, deps: [{ token: i1.DaffCountryFactory }, { token: i1.DaffSubdivisionFactory }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
26
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: DaffTestingGeographyService, providedIn: 'root' }); }
|
|
27
27
|
}
|
|
28
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
28
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: DaffTestingGeographyService, decorators: [{
|
|
29
29
|
type: Injectable,
|
|
30
30
|
args: [{
|
|
31
31
|
providedIn: 'root',
|
|
@@ -44,11 +44,11 @@ class DaffGeographyTestingDriverModule {
|
|
|
44
44
|
],
|
|
45
45
|
};
|
|
46
46
|
}
|
|
47
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
48
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
49
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
47
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: DaffGeographyTestingDriverModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
48
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.2", ngImport: i0, type: DaffGeographyTestingDriverModule, imports: [CommonModule] }); }
|
|
49
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: DaffGeographyTestingDriverModule, imports: [CommonModule] }); }
|
|
50
50
|
}
|
|
51
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
51
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: DaffGeographyTestingDriverModule, decorators: [{
|
|
52
52
|
type: NgModule,
|
|
53
53
|
args: [{
|
|
54
54
|
imports: [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"daffodil-geography-driver-testing.mjs","sources":["../../../libs/geography/driver/testing/src/drivers/geography.service.ts","../../../libs/geography/driver/testing/src/drivers/geography-driver.module.ts","../../../libs/geography/driver/testing/src/daffodil-geography-driver-testing.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport {\n Observable,\n of,\n} from 'rxjs';\n\nimport { DaffCountry } from '@daffodil/geography';\nimport { DaffGeographyServiceInterface } from '@daffodil/geography/driver';\nimport {\n DaffCountryFactory,\n DaffSubdivisionFactory,\n} from '@daffodil/geography/testing';\n\n/**\n * @inheritdoc\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffTestingGeographyService implements DaffGeographyServiceInterface<DaffCountry> {\n\n constructor(\n private countryFactory: DaffCountryFactory,\n private subdivisionFactory: DaffSubdivisionFactory,\n ) {}\n\n get(countryId: DaffCountry['id']): Observable<DaffCountry> {\n return of(this.countryFactory.create({\n id: countryId,\n subdivisions: this.subdivisionFactory.createMany(3),\n }));\n }\n\n list(): Observable<DaffCountry[]> {\n return of(this.countryFactory.createMany(5));\n }\n}\n","import { CommonModule } from '@angular/common';\nimport {\n NgModule,\n ModuleWithProviders,\n} from '@angular/core';\n\nimport { DaffGeographyDriver } from '@daffodil/geography/driver';\n\nimport { DaffTestingGeographyService } from './geography.service';\n\n@NgModule({\n imports: [\n CommonModule,\n ],\n})\nexport class DaffGeographyTestingDriverModule {\n static forRoot(): ModuleWithProviders<DaffGeographyTestingDriverModule> {\n return {\n ngModule: DaffGeographyTestingDriverModule,\n providers: [\n {\n provide: DaffGeographyDriver,\n useExisting: DaffTestingGeographyService,\n },\n ],\n };\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAaA;;AAEG;MAIU,2BAA2B,CAAA;IAEtC,WACU,CAAA,cAAkC,EAClC,kBAA0C,EAAA;QAD1C,IAAc,CAAA,cAAA,GAAd,cAAc,CAAoB;QAClC,IAAkB,CAAA,kBAAA,GAAlB,kBAAkB,CAAwB;KAChD;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;QAD1C,IAAc,CAAA,cAAA,GAAd,cAAc,CAAoB;QAClC,IAAkB,CAAA,kBAAA,GAAlB,kBAAkB,CAAwB;KAChD;AAEJ,IAAA,GAAG,CAAC,SAA4B,EAAA;AAC9B,QAAA,OAAO,EAAE,CAAC,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC;AACnC,YAAA,EAAE,EAAE,SAAS;YACb,YAAY,EAAE,IAAI,CAAC,kBAAkB,CAAC,UAAU,CAAC,CAAC,CAAC;AACpD,SAAA,CAAC,CAAC,CAAC;KACL;IAED,IAAI,GAAA;QACF,OAAO,EAAE,CAAC,IAAI,CAAC,cAAc,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;KAC9C;iIAhBU,2BAA2B,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,kBAAA,EAAA,EAAA,EAAA,KAAA,EAAA,EAAA,CAAA,sBAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA,EAAA;AAA3B,uBAAA,SAAA,IAAA,CAAA,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,EAAA;;2FAEP,2BAA2B,EAAA,UAAA,EAAA,CAAA;kBAHvC,UAA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