@daffodil/geography 0.38.9 → 0.39.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/bundles/daffodil-geography-driver-in-memory.umd.js +12 -124
- package/bundles/daffodil-geography-driver-in-memory.umd.js.map +1 -1
- package/bundles/daffodil-geography-driver-in-memory.umd.min.js +1 -1
- package/bundles/daffodil-geography-driver-in-memory.umd.min.js.map +1 -1
- package/bundles/daffodil-geography-driver-magento.umd.js +15 -170
- package/bundles/daffodil-geography-driver-magento.umd.js.map +1 -1
- package/bundles/daffodil-geography-driver-magento.umd.min.js +1 -1
- package/bundles/daffodil-geography-driver-magento.umd.min.js.map +1 -1
- package/bundles/daffodil-geography-driver-testing.umd.js +3 -59
- package/bundles/daffodil-geography-driver-testing.umd.js.map +1 -1
- package/bundles/daffodil-geography-driver-testing.umd.min.js +1 -1
- package/bundles/daffodil-geography-driver-testing.umd.min.js.map +1 -1
- package/bundles/daffodil-geography-driver.umd.js +2 -58
- package/bundles/daffodil-geography-driver.umd.js.map +1 -1
- package/bundles/daffodil-geography-driver.umd.min.js +1 -1
- package/bundles/daffodil-geography-driver.umd.min.js.map +1 -1
- package/bundles/daffodil-geography-state-testing.umd.js +3 -58
- package/bundles/daffodil-geography-state-testing.umd.js.map +1 -1
- package/bundles/daffodil-geography-state-testing.umd.min.js +1 -1
- package/bundles/daffodil-geography-state-testing.umd.min.js.map +1 -1
- package/bundles/daffodil-geography-state.umd.js +63 -489
- package/bundles/daffodil-geography-state.umd.js.map +1 -1
- package/bundles/daffodil-geography-state.umd.min.js +2 -2
- package/bundles/daffodil-geography-state.umd.min.js.map +1 -1
- package/bundles/daffodil-geography-testing.umd.js +6 -78
- package/bundles/daffodil-geography-testing.umd.js.map +1 -1
- package/bundles/daffodil-geography-testing.umd.min.js +2 -2
- package/bundles/daffodil-geography-testing.umd.min.js.map +1 -1
- package/bundles/daffodil-geography.umd.js +8 -44
- package/bundles/daffodil-geography.umd.js.map +1 -1
- package/bundles/daffodil-geography.umd.min.js.map +1 -1
- package/driver/in-memory/package.json +1 -1
- package/driver/magento/package.json +1 -1
- package/driver/package.json +1 -1
- package/driver/testing/package.json +1 -1
- package/esm2015/comparators/address.js +3 -9
- package/esm2015/comparators/personal-address.js +3 -9
- package/esm2015/comparators/public_api.js +1 -6
- package/esm2015/daffodil-geography.js +2 -7
- package/esm2015/driver/daffodil-geography-driver.js +2 -7
- package/esm2015/driver/errors/country-not-found.js +1 -15
- package/esm2015/driver/errors/invalid-api-response.js +1 -15
- package/esm2015/driver/errors/public_api.js +1 -6
- package/esm2015/driver/in-memory/backend/geography.service.js +9 -57
- package/esm2015/driver/in-memory/daffodil-geography-driver-in-memory.js +2 -7
- package/esm2015/driver/in-memory/drivers/geography-driver.module.js +1 -9
- package/esm2015/driver/in-memory/drivers/geography.service.js +4 -36
- package/esm2015/driver/in-memory/drivers/public_api.js +1 -6
- package/esm2015/driver/in-memory/index.js +2 -7
- package/esm2015/driver/in-memory/public_api.js +2 -7
- package/esm2015/driver/index.js +2 -7
- package/esm2015/driver/interfaces/geography-service.interface.js +1 -25
- package/esm2015/driver/magento/daffodil-geography-driver-magento.js +2 -7
- package/esm2015/driver/magento/errors/codes.js +5 -11
- package/esm2015/driver/magento/errors/map.js +1 -7
- package/esm2015/driver/magento/errors/transform.js +1 -10
- package/esm2015/driver/magento/geography-driver.module.js +1 -9
- package/esm2015/driver/magento/geography.service.js +5 -50
- package/esm2015/driver/magento/index.js +2 -7
- package/esm2015/driver/magento/models/responses/country.js +2 -26
- package/esm2015/driver/magento/models/responses/public_api.js +2 -6
- package/esm2015/driver/magento/models/responses/region.js +2 -20
- package/esm2015/driver/magento/public_api.js +3 -8
- package/esm2015/driver/magento/queries/fragments/country.js +1 -7
- package/esm2015/driver/magento/queries/fragments/public_api.js +1 -6
- package/esm2015/driver/magento/queries/fragments/region.js +1 -7
- package/esm2015/driver/magento/queries/get-countries.js +1 -7
- package/esm2015/driver/magento/queries/get-country.js +1 -7
- package/esm2015/driver/magento/queries/public_api.js +3 -8
- package/esm2015/driver/magento/queries/responses/get-countries.js +2 -14
- package/esm2015/driver/magento/queries/responses/get-country.js +2 -14
- package/esm2015/driver/magento/queries/responses/public_api.js +2 -6
- package/esm2015/driver/magento/transforms/responses/country.service.js +3 -26
- package/esm2015/driver/magento/transforms/responses/subdivision.service.js +2 -9
- package/esm2015/driver/magento/validators/get-countries.js +3 -13
- package/esm2015/driver/magento/validators/public_api.js +1 -6
- package/esm2015/driver/testing/daffodil-geography-driver-testing.js +2 -7
- package/esm2015/driver/testing/drivers/geography-driver.module.js +1 -9
- package/esm2015/driver/testing/drivers/geography.service.js +3 -31
- package/esm2015/driver/testing/drivers/public_api.js +1 -6
- package/esm2015/driver/testing/index.js +2 -7
- package/esm2015/driver/testing/public_api.js +2 -7
- package/esm2015/index.js +2 -7
- package/esm2015/injection-tokens/error-matcher.token.js +2 -11
- package/esm2015/injection-tokens/public_api.js +1 -6
- package/esm2015/models/address.js +2 -34
- package/esm2015/models/country.js +2 -30
- package/esm2015/models/personal-address.js +2 -28
- package/esm2015/models/public_api.js +2 -6
- package/esm2015/models/subdivision.js +2 -18
- package/esm2015/public_api.js +4 -9
- package/esm2015/state/actions/geography.actions.js +10 -74
- package/esm2015/state/actions/public_api.js +2 -7
- package/esm2015/state/daffodil-geography-state.js +2 -7
- package/esm2015/state/effects/geography.effects.js +3 -61
- package/esm2015/state/facades/geography/geography-facade.interface.js +2 -40
- package/esm2015/state/facades/geography/geography.facade.js +3 -62
- package/esm2015/state/geography-state.module.js +1 -6
- package/esm2015/state/index.js +4 -9
- package/esm2015/state/reducers/country-entities/country-entities-adapter.js +4 -18
- package/esm2015/state/reducers/country-entities/country-entities-initial-state.js +1 -7
- package/esm2015/state/reducers/country-entities/country-entities-state.interface.js +2 -6
- package/esm2015/state/reducers/country-entities/country-entities.reducer.js +7 -17
- package/esm2015/state/reducers/country-entities/public_api.js +1 -6
- package/esm2015/state/reducers/geography/geography-initial-state.js +1 -7
- package/esm2015/state/reducers/geography/geography-state.interface.js +2 -16
- package/esm2015/state/reducers/geography/geography.reducer.js +1 -12
- package/esm2015/state/reducers/geography/public_api.js +1 -6
- package/esm2015/state/reducers/geography-reducers-state.interface.js +1 -26
- package/esm2015/state/reducers/geography-reducers.js +1 -7
- package/esm2015/state/reducers/geography-store-feature-key.js +1 -7
- package/esm2015/state/reducers/public_api.js +3 -8
- package/esm2015/state/selectors/country-entities.selector.js +10 -84
- package/esm2015/state/selectors/geography-all.selector.js +4 -23
- package/esm2015/state/selectors/geography-feature.selector.js +5 -28
- package/esm2015/state/selectors/geography.selector.js +9 -55
- package/esm2015/state/selectors/public_api.js +2 -7
- package/esm2015/state/testing/daffodil-geography-state-testing.js +2 -7
- package/esm2015/state/testing/geography-testing.module.js +1 -6
- package/esm2015/state/testing/index.js +2 -7
- package/esm2015/state/testing/mock-geography-facade.js +3 -39
- package/esm2015/state/testing/public_api.js +1 -6
- package/esm2015/testing/daffodil-geography-testing.js +2 -7
- package/esm2015/testing/factories/address.factory.js +2 -21
- package/esm2015/testing/factories/country.factory.js +2 -21
- package/esm2015/testing/factories/personal-address.factory.js +2 -23
- package/esm2015/testing/factories/public_api.js +5 -10
- package/esm2015/testing/factories/subdivision.factory.js +2 -15
- package/esm2015/testing/index.js +2 -7
- package/esm2015/testing/public_api.js +2 -7
- package/fesm2015/daffodil-geography-driver-in-memory.js +13 -121
- package/fesm2015/daffodil-geography-driver-in-memory.js.map +1 -1
- package/fesm2015/daffodil-geography-driver-magento.js +15 -196
- package/fesm2015/daffodil-geography-driver-magento.js.map +1 -1
- package/fesm2015/daffodil-geography-driver-testing.js +4 -60
- package/fesm2015/daffodil-geography-driver-testing.js.map +1 -1
- package/fesm2015/daffodil-geography-driver.js +1 -67
- package/fesm2015/daffodil-geography-driver.js.map +1 -1
- package/fesm2015/daffodil-geography-state-testing.js +4 -59
- package/fesm2015/daffodil-geography-state-testing.js.map +1 -1
- package/fesm2015/daffodil-geography-state.js +49 -488
- package/fesm2015/daffodil-geography-state.js.map +1 -1
- package/fesm2015/daffodil-geography-testing.js +6 -98
- package/fesm2015/daffodil-geography-testing.js.map +1 -1
- package/fesm2015/daffodil-geography.js +8 -57
- package/fesm2015/daffodil-geography.js.map +1 -1
- package/package.json +3 -3
- package/state/package.json +1 -1
- package/state/testing/package.json +1 -1
- package/testing/package.json +1 -1
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @fileoverview added by tsickle
|
|
3
|
-
* Generated from: factories/personal-address.factory.ts
|
|
4
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
5
|
-
*/
|
|
6
1
|
import { Injectable } from '@angular/core';
|
|
7
2
|
import * as faker from 'faker/locale/en_US';
|
|
8
3
|
import { DaffModelFactory } from '@daffodil/core/testing';
|
|
@@ -20,27 +15,12 @@ export class MockDaffPersonalAddress extends MockDaffAddress {
|
|
|
20
15
|
this.telephone = faker.phone.phoneNumber();
|
|
21
16
|
}
|
|
22
17
|
}
|
|
23
|
-
if (false) {
|
|
24
|
-
/** @type {?} */
|
|
25
|
-
MockDaffPersonalAddress.prototype.prefix;
|
|
26
|
-
/** @type {?} */
|
|
27
|
-
MockDaffPersonalAddress.prototype.suffix;
|
|
28
|
-
/** @type {?} */
|
|
29
|
-
MockDaffPersonalAddress.prototype.firstname;
|
|
30
|
-
/** @type {?} */
|
|
31
|
-
MockDaffPersonalAddress.prototype.middlename;
|
|
32
|
-
/** @type {?} */
|
|
33
|
-
MockDaffPersonalAddress.prototype.lastname;
|
|
34
|
-
/** @type {?} */
|
|
35
|
-
MockDaffPersonalAddress.prototype.email;
|
|
36
|
-
/** @type {?} */
|
|
37
|
-
MockDaffPersonalAddress.prototype.telephone;
|
|
38
|
-
}
|
|
39
18
|
export class DaffPersonalAddressFactory extends DaffModelFactory {
|
|
40
19
|
constructor() {
|
|
41
20
|
super(MockDaffPersonalAddress);
|
|
42
21
|
}
|
|
43
22
|
}
|
|
23
|
+
/** @nocollapse */ DaffPersonalAddressFactory.ɵprov = i0.ɵɵdefineInjectable({ factory: function DaffPersonalAddressFactory_Factory() { return new DaffPersonalAddressFactory(); }, token: DaffPersonalAddressFactory, providedIn: "root" });
|
|
44
24
|
DaffPersonalAddressFactory.decorators = [
|
|
45
25
|
{ type: Injectable, args: [{
|
|
46
26
|
providedIn: 'root',
|
|
@@ -48,5 +28,4 @@ DaffPersonalAddressFactory.decorators = [
|
|
|
48
28
|
];
|
|
49
29
|
/** @nocollapse */
|
|
50
30
|
DaffPersonalAddressFactory.ctorParameters = () => [];
|
|
51
|
-
|
|
52
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGVyc29uYWwtYWRkcmVzcy5mYWN0b3J5LmpzIiwic291cmNlUm9vdCI6Ii9ob21lL2dyaWVzdC9ncmF5Y29yZWlvL2RhZmZvZGlsL2xpYnMvZ2VvZ3JhcGh5L3Rlc3Rpbmcvc3JjLyIsInNvdXJjZXMiOlsiZmFjdG9yaWVzL3BlcnNvbmFsLWFkZHJlc3MuZmFjdG9yeS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7OztBQUFBLE9BQU8sRUFBRSxVQUFVLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFDM0MsT0FBTyxLQUFLLEtBQUssTUFBTSxvQkFBb0IsQ0FBQztBQUU1QyxPQUFPLEVBQUUsZ0JBQWdCLEVBQUUsTUFBTSx3QkFBd0IsQ0FBQztBQUcxRCxPQUFPLEVBQUUsZUFBZSxFQUFFLE1BQU0sbUJBQW1CLENBQUM7O0FBRXBELE1BQU0sT0FBTyx1QkFBd0IsU0FBUSxlQUFlO0lBQTVEOztRQUNFLFdBQU0sR0FBRyxLQUFLLENBQUMsSUFBSSxDQUFDLE1BQU0sRUFBRSxDQUFDO1FBQzdCLFdBQU0sR0FBRyxLQUFLLENBQUMsS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
4
|
-
*
|
|
5
|
-
|
|
6
|
-
export { MockDaffAddress, DaffAddressFactory } from './address.factory';
|
|
7
|
-
export { MockDaffPersonalAddress, DaffPersonalAddressFactory } from './personal-address.factory';
|
|
8
|
-
export { MockCountry, DaffCountryFactory } from './country.factory';
|
|
9
|
-
export { MockSubdivision, DaffSubdivisionFactory } from './subdivision.factory';
|
|
10
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljX2FwaS5qcyIsInNvdXJjZVJvb3QiOiIvaG9tZS9ncmllc3QvZ3JheWNvcmVpby9kYWZmb2RpbC9saWJzL2dlb2dyYXBoeS90ZXN0aW5nL3NyYy8iLCJzb3VyY2VzIjpbImZhY3Rvcmllcy9wdWJsaWNfYXBpLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7O0FBQUEsb0RBQWMsbUJBQW1CLENBQUM7QUFDbEMsb0VBQWMsNEJBQTRCLENBQUM7QUFDM0MsZ0RBQWMsbUJBQW1CLENBQUM7QUFDbEMsd0RBQWMsdUJBQXVCLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgKiBmcm9tICcuL2FkZHJlc3MuZmFjdG9yeSc7XG5leHBvcnQgKiBmcm9tICcuL3BlcnNvbmFsLWFkZHJlc3MuZmFjdG9yeSc7XG5leHBvcnQgKiBmcm9tICcuL2NvdW50cnkuZmFjdG9yeSc7XG5leHBvcnQgKiBmcm9tICcuL3N1YmRpdmlzaW9uLmZhY3RvcnknO1xuIl19
|
|
1
|
+
export * from './address.factory';
|
|
2
|
+
export * from './personal-address.factory';
|
|
3
|
+
export * from './country.factory';
|
|
4
|
+
export * from './subdivision.factory';
|
|
5
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljX2FwaS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL2xpYnMvZ2VvZ3JhcGh5L3Rlc3Rpbmcvc3JjL2ZhY3Rvcmllcy9wdWJsaWNfYXBpLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLGNBQWMsbUJBQW1CLENBQUM7QUFDbEMsY0FBYyw0QkFBNEIsQ0FBQztBQUMzQyxjQUFjLG1CQUFtQixDQUFDO0FBQ2xDLGNBQWMsdUJBQXVCLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgKiBmcm9tICcuL2FkZHJlc3MuZmFjdG9yeSc7XG5leHBvcnQgKiBmcm9tICcuL3BlcnNvbmFsLWFkZHJlc3MuZmFjdG9yeSc7XG5leHBvcnQgKiBmcm9tICcuL2NvdW50cnkuZmFjdG9yeSc7XG5leHBvcnQgKiBmcm9tICcuL3N1YmRpdmlzaW9uLmZhY3RvcnknO1xuIl19
|
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @fileoverview added by tsickle
|
|
3
|
-
* Generated from: factories/subdivision.factory.ts
|
|
4
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
5
|
-
*/
|
|
6
1
|
import { Injectable } from '@angular/core';
|
|
7
2
|
import * as faker from 'faker/locale/en_US';
|
|
8
3
|
import { DaffModelFactory } from '@daffodil/core/testing';
|
|
@@ -14,19 +9,12 @@ export class MockSubdivision {
|
|
|
14
9
|
this.iso_3166_2 = faker.random.alphaNumeric(2);
|
|
15
10
|
}
|
|
16
11
|
}
|
|
17
|
-
if (false) {
|
|
18
|
-
/** @type {?} */
|
|
19
|
-
MockSubdivision.prototype.id;
|
|
20
|
-
/** @type {?} */
|
|
21
|
-
MockSubdivision.prototype.name;
|
|
22
|
-
/** @type {?} */
|
|
23
|
-
MockSubdivision.prototype.iso_3166_2;
|
|
24
|
-
}
|
|
25
12
|
export class DaffSubdivisionFactory extends DaffModelFactory {
|
|
26
13
|
constructor() {
|
|
27
14
|
super(MockSubdivision);
|
|
28
15
|
}
|
|
29
16
|
}
|
|
17
|
+
/** @nocollapse */ DaffSubdivisionFactory.ɵprov = i0.ɵɵdefineInjectable({ factory: function DaffSubdivisionFactory_Factory() { return new DaffSubdivisionFactory(); }, token: DaffSubdivisionFactory, providedIn: "root" });
|
|
30
18
|
DaffSubdivisionFactory.decorators = [
|
|
31
19
|
{ type: Injectable, args: [{
|
|
32
20
|
providedIn: 'root',
|
|
@@ -34,5 +22,4 @@ DaffSubdivisionFactory.decorators = [
|
|
|
34
22
|
];
|
|
35
23
|
/** @nocollapse */
|
|
36
24
|
DaffSubdivisionFactory.ctorParameters = () => [];
|
|
37
|
-
|
|
38
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3ViZGl2aXNpb24uZmFjdG9yeS5qcyIsInNvdXJjZVJvb3QiOiIvaG9tZS9ncmllc3QvZ3JheWNvcmVpby9kYWZmb2RpbC9saWJzL2dlb2dyYXBoeS90ZXN0aW5nL3NyYy8iLCJzb3VyY2VzIjpbImZhY3Rvcmllcy9zdWJkaXZpc2lvbi5mYWN0b3J5LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7O0FBQUEsT0FBTyxFQUFFLFVBQVUsRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUMzQyxPQUFPLEtBQUssS0FBSyxNQUFNLG9CQUFvQixDQUFDO0FBRTVDLE9BQU8sRUFBRSxnQkFBZ0IsRUFBRSxNQUFNLHdCQUF3QixDQUFDOztBQUcxRCxNQUFNLE9BQU8sZUFBZTtJQUE1QjtRQUNFLE9BQUUsR0FBRyxLQUFLLENBQUMsUUFBUSxDQUFDLElBQUksRUFBRSxDQUFDO1FBQzNCLFNBQUksR0FBRyxLQUFLLENBQUMsTUFBTSxDQUFDLElBQUksRUFBRSxDQUFDO1FBQzVCLGVBQVUsR0FBRyxLQUFLLENBQUMsTUFBTSxDQUFDLFlBQVks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0IHsgRGFmZk1vZGVsRmFjdG9yeSB9IGZyb20gJ0BkYWZmb2RpbC9jb3JlL3Rlc3RpbmcnO1xuaW1wb3J0IHsgRGFmZlN1YmRpdmlzaW9uIH0gZnJvbSAnQGRhZmZvZGlsL2dlb2dyYXBoeSc7XG5cbmV4cG9ydCBjbGFzcyBNb2NrU3ViZGl2aXNpb24gaW1wbGVtZW50cyBEYWZmU3ViZGl2aXNpb24ge1xuICBpZCA9IGZha2VyLmRhdGF0eXBlLnV1aWQoKTtcbiAgbmFtZSA9IGZha2VyLnJhbmRvbS53b3JkKCk7XG5cdGlzb18zMTY2XzIgPSBmYWtlci5yYW5kb20uYWxwaGFOdW1lcmljKDIpO1xufVxuXG5ASW5qZWN0YWJsZSh7XG4gIHByb3ZpZGVkSW46ICdyb290Jyxcbn0pXG5leHBvcnQgY2xhc3MgRGFmZlN1YmRpdmlzaW9uRmFjdG9yeSBleHRlbmRzIERhZmZNb2RlbEZhY3Rvcnk8RGFmZlN1YmRpdmlzaW9uPiB7XG4gIGNvbnN0cnVjdG9yKCkge1xuICAgIHN1cGVyKE1vY2tTdWJkaXZpc2lvbik7XG4gIH1cbn1cbiJdfQ==
|
package/esm2015/testing/index.js
CHANGED
|
@@ -1,7 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
* Generated from: index.ts
|
|
4
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
5
|
-
*/
|
|
6
|
-
export { MockDaffAddress, DaffAddressFactory, MockDaffPersonalAddress, DaffPersonalAddressFactory, MockCountry, DaffCountryFactory, MockSubdivision, DaffSubdivisionFactory } from './public_api';
|
|
7
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiL2hvbWUvZ3JpZXN0L2dyYXljb3JlaW8vZGFmZm9kaWwvbGlicy9nZW9ncmFwaHkvdGVzdGluZy9zcmMvIiwic291cmNlcyI6WyJpbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7OztBQUFBLG1MQUFjLGNBQWMsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCAqIGZyb20gJy4vcHVibGljX2FwaSc7XG4iXX0=
|
|
1
|
+
export * from './public_api';
|
|
2
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9saWJzL2dlb2dyYXBoeS90ZXN0aW5nL3NyYy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxjQUFjLGNBQWMsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCAqIGZyb20gJy4vcHVibGljX2FwaSc7XG4iXX0=
|
|
@@ -1,7 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
* Generated from: public_api.ts
|
|
4
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
5
|
-
*/
|
|
6
|
-
export { MockDaffAddress, DaffAddressFactory, MockDaffPersonalAddress, DaffPersonalAddressFactory, MockCountry, DaffCountryFactory, MockSubdivision, DaffSubdivisionFactory } from './factories/public_api';
|
|
7
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljX2FwaS5qcyIsInNvdXJjZVJvb3QiOiIvaG9tZS9ncmllc3QvZ3JheWNvcmVpby9kYWZmb2RpbC9saWJzL2dlb2dyYXBoeS90ZXN0aW5nL3NyYy8iLCJzb3VyY2VzIjpbInB1YmxpY19hcGkudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7QUFBQSxtTEFBYyx3QkFBd0IsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCAqIGZyb20gJy4vZmFjdG9yaWVzL3B1YmxpY19hcGknO1xuIl19
|
|
1
|
+
export * from './factories/public_api';
|
|
2
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljX2FwaS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYnMvZ2VvZ3JhcGh5L3Rlc3Rpbmcvc3JjL3B1YmxpY19hcGkudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsY0FBYyx3QkFBd0IsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCAqIGZyb20gJy4vZmFjdG9yaWVzL3B1YmxpY19hcGknO1xuIl19
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CommonModule } from '@angular/common';
|
|
2
|
-
import {
|
|
2
|
+
import { ɵɵdefineInjectable, ɵɵinject, Injectable, NgModule } from '@angular/core';
|
|
3
3
|
import { DaffCountryNotFoundError, DaffGeographyDriver } from '@daffodil/geography/driver';
|
|
4
4
|
import { HttpClient } from '@angular/common/http';
|
|
5
5
|
import { throwError } from 'rxjs';
|
|
@@ -8,43 +8,21 @@ import { STATUS } from 'angular-in-memory-web-api';
|
|
|
8
8
|
import { DaffCountryFactory, DaffSubdivisionFactory } from '@daffodil/geography/testing';
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
|
-
* @
|
|
12
|
-
* Generated from: drivers/geography.service.ts
|
|
13
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
14
|
-
*/
|
|
15
|
-
/**
|
|
16
|
-
* \@inheritdoc
|
|
11
|
+
* @inheritdoc
|
|
17
12
|
*/
|
|
18
13
|
class DaffInMemoryGeographyService {
|
|
19
|
-
/**
|
|
20
|
-
* @param {?} http
|
|
21
|
-
*/
|
|
22
14
|
constructor(http) {
|
|
23
15
|
this.http = http;
|
|
24
16
|
this.url = '/api/countries';
|
|
25
17
|
}
|
|
26
|
-
/**
|
|
27
|
-
* @param {?} countryId
|
|
28
|
-
* @return {?}
|
|
29
|
-
*/
|
|
30
18
|
get(countryId) {
|
|
31
|
-
return this.http.get(`${this.url}/${countryId}`).pipe(catchError((
|
|
32
|
-
* @param {?} error
|
|
33
|
-
* @return {?}
|
|
34
|
-
*/
|
|
35
|
-
(error) => throwError(DaffCountryNotFoundError))), map((/**
|
|
36
|
-
* @param {?} result
|
|
37
|
-
* @return {?}
|
|
38
|
-
*/
|
|
39
|
-
result => result)));
|
|
19
|
+
return this.http.get(`${this.url}/${countryId}`).pipe(catchError((error) => throwError(DaffCountryNotFoundError)), map(result => result));
|
|
40
20
|
}
|
|
41
|
-
/**
|
|
42
|
-
* @return {?}
|
|
43
|
-
*/
|
|
44
21
|
list() {
|
|
45
22
|
return this.http.get(`${this.url}/`);
|
|
46
23
|
}
|
|
47
24
|
}
|
|
25
|
+
/** @nocollapse */ DaffInMemoryGeographyService.ɵprov = ɵɵdefineInjectable({ factory: function DaffInMemoryGeographyService_Factory() { return new DaffInMemoryGeographyService(ɵɵinject(HttpClient)); }, token: DaffInMemoryGeographyService, providedIn: "root" });
|
|
48
26
|
DaffInMemoryGeographyService.decorators = [
|
|
49
27
|
{ type: Injectable, args: [{
|
|
50
28
|
providedIn: 'root',
|
|
@@ -54,26 +32,8 @@ DaffInMemoryGeographyService.decorators = [
|
|
|
54
32
|
DaffInMemoryGeographyService.ctorParameters = () => [
|
|
55
33
|
{ type: HttpClient }
|
|
56
34
|
];
|
|
57
|
-
/** @nocollapse */ DaffInMemoryGeographyService.ɵprov = ɵɵdefineInjectable({ factory: function DaffInMemoryGeographyService_Factory() { return new DaffInMemoryGeographyService(ɵɵinject(HttpClient)); }, token: DaffInMemoryGeographyService, providedIn: "root" });
|
|
58
|
-
if (false) {
|
|
59
|
-
/** @type {?} */
|
|
60
|
-
DaffInMemoryGeographyService.prototype.url;
|
|
61
|
-
/**
|
|
62
|
-
* @type {?}
|
|
63
|
-
* @private
|
|
64
|
-
*/
|
|
65
|
-
DaffInMemoryGeographyService.prototype.http;
|
|
66
|
-
}
|
|
67
35
|
|
|
68
|
-
/**
|
|
69
|
-
* @fileoverview added by tsickle
|
|
70
|
-
* Generated from: drivers/geography-driver.module.ts
|
|
71
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
72
|
-
*/
|
|
73
36
|
class DaffGeographyInMemoryDriverModule {
|
|
74
|
-
/**
|
|
75
|
-
* @return {?}
|
|
76
|
-
*/
|
|
77
37
|
static forRoot() {
|
|
78
38
|
return {
|
|
79
39
|
ngModule: DaffGeographyInMemoryDriverModule,
|
|
@@ -94,47 +54,26 @@ DaffGeographyInMemoryDriverModule.decorators = [
|
|
|
94
54
|
},] }
|
|
95
55
|
];
|
|
96
56
|
|
|
97
|
-
/**
|
|
98
|
-
* @fileoverview added by tsickle
|
|
99
|
-
* Generated from: drivers/public_api.ts
|
|
100
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
101
|
-
*/
|
|
102
|
-
|
|
103
|
-
/**
|
|
104
|
-
* @fileoverview added by tsickle
|
|
105
|
-
* Generated from: backend/geography.service.ts
|
|
106
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
107
|
-
*/
|
|
108
57
|
/**
|
|
109
58
|
* An in-memory service that stubs out the backend services for getting countries.
|
|
110
59
|
*
|
|
111
|
-
*
|
|
60
|
+
* @inheritdoc
|
|
112
61
|
*/
|
|
113
62
|
class DaffInMemoryBackendGeographyService {
|
|
114
|
-
/**
|
|
115
|
-
* @param {?} countryFactory
|
|
116
|
-
* @param {?} subdivisionFactory
|
|
117
|
-
*/
|
|
118
63
|
constructor(countryFactory, subdivisionFactory) {
|
|
119
64
|
this.countryFactory = countryFactory;
|
|
120
65
|
this.subdivisionFactory = subdivisionFactory;
|
|
121
66
|
this.countries = this.countryFactory.createMany(5);
|
|
122
|
-
this.countries.forEach((
|
|
123
|
-
* @param {?} country
|
|
124
|
-
* @return {?}
|
|
125
|
-
*/
|
|
126
|
-
country => country.subdivisions = this.subdivisionFactory.createMany(5)));
|
|
67
|
+
this.countries.forEach(country => country.subdivisions = this.subdivisionFactory.createMany(5));
|
|
127
68
|
}
|
|
128
69
|
/**
|
|
129
70
|
* Creates a fake database of countries for the geography inmemory backend service.
|
|
130
71
|
*
|
|
131
|
-
*
|
|
132
|
-
* @
|
|
133
|
-
* @return {?} A fake database of an array of countries
|
|
72
|
+
* @docs-private
|
|
73
|
+
* @returns A fake database of an array of countries
|
|
134
74
|
*/
|
|
135
75
|
createDb(reqInfo) {
|
|
136
76
|
if (reqInfo) {
|
|
137
|
-
/** @type {?} */
|
|
138
77
|
const seedData = reqInfo.utils.getJsonBody(reqInfo.req).countries;
|
|
139
78
|
if (seedData) {
|
|
140
79
|
this.countries = seedData;
|
|
@@ -146,39 +85,21 @@ class DaffInMemoryBackendGeographyService {
|
|
|
146
85
|
}
|
|
147
86
|
/**
|
|
148
87
|
* Responds to GET requests.
|
|
149
|
-
* @param {?} reqInfo
|
|
150
|
-
* @return {?}
|
|
151
88
|
*/
|
|
152
89
|
get(reqInfo) {
|
|
153
|
-
return reqInfo.utils.createResponse$((
|
|
154
|
-
* @return {?}
|
|
155
|
-
*/
|
|
156
|
-
() => ({
|
|
90
|
+
return reqInfo.utils.createResponse$(() => ({
|
|
157
91
|
body: reqInfo.id ? this.getCountry(reqInfo) : this.listCountries(reqInfo),
|
|
158
92
|
status: STATUS.OK,
|
|
159
|
-
}))
|
|
93
|
+
}));
|
|
160
94
|
}
|
|
161
|
-
/**
|
|
162
|
-
* @private
|
|
163
|
-
* @param {?} reqInfo
|
|
164
|
-
* @return {?}
|
|
165
|
-
*/
|
|
166
95
|
getCountry(reqInfo) {
|
|
167
|
-
return reqInfo.collection.find(
|
|
168
|
-
* @param {?} country
|
|
169
|
-
* @return {?}
|
|
170
|
-
*/
|
|
171
|
-
country => country.id === reqInfo.id));
|
|
96
|
+
return reqInfo.collection.find(country => country.id === reqInfo.id);
|
|
172
97
|
}
|
|
173
|
-
/**
|
|
174
|
-
* @private
|
|
175
|
-
* @param {?} reqInfo
|
|
176
|
-
* @return {?}
|
|
177
|
-
*/
|
|
178
98
|
listCountries(reqInfo) {
|
|
179
99
|
return reqInfo.collection;
|
|
180
100
|
}
|
|
181
101
|
}
|
|
102
|
+
/** @nocollapse */ DaffInMemoryBackendGeographyService.ɵprov = ɵɵdefineInjectable({ factory: function DaffInMemoryBackendGeographyService_Factory() { return new DaffInMemoryBackendGeographyService(ɵɵinject(DaffCountryFactory), ɵɵinject(DaffSubdivisionFactory)); }, token: DaffInMemoryBackendGeographyService, providedIn: "root" });
|
|
182
103
|
DaffInMemoryBackendGeographyService.decorators = [
|
|
183
104
|
{ type: Injectable, args: [{
|
|
184
105
|
providedIn: 'root',
|
|
@@ -189,38 +110,9 @@ DaffInMemoryBackendGeographyService.ctorParameters = () => [
|
|
|
189
110
|
{ type: DaffCountryFactory },
|
|
190
111
|
{ type: DaffSubdivisionFactory }
|
|
191
112
|
];
|
|
192
|
-
/** @nocollapse */ DaffInMemoryBackendGeographyService.ɵprov = ɵɵdefineInjectable({ factory: function DaffInMemoryBackendGeographyService_Factory() { return new DaffInMemoryBackendGeographyService(ɵɵinject(DaffCountryFactory), ɵɵinject(DaffSubdivisionFactory)); }, token: DaffInMemoryBackendGeographyService, providedIn: "root" });
|
|
193
|
-
if (false) {
|
|
194
|
-
/** @type {?} */
|
|
195
|
-
DaffInMemoryBackendGeographyService.prototype.countries;
|
|
196
|
-
/**
|
|
197
|
-
* @type {?}
|
|
198
|
-
* @private
|
|
199
|
-
*/
|
|
200
|
-
DaffInMemoryBackendGeographyService.prototype.countryFactory;
|
|
201
|
-
/**
|
|
202
|
-
* @type {?}
|
|
203
|
-
* @private
|
|
204
|
-
*/
|
|
205
|
-
DaffInMemoryBackendGeographyService.prototype.subdivisionFactory;
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
/**
|
|
209
|
-
* @fileoverview added by tsickle
|
|
210
|
-
* Generated from: public_api.ts
|
|
211
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
212
|
-
*/
|
|
213
|
-
|
|
214
|
-
/**
|
|
215
|
-
* @fileoverview added by tsickle
|
|
216
|
-
* Generated from: index.ts
|
|
217
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
218
|
-
*/
|
|
219
113
|
|
|
220
114
|
/**
|
|
221
|
-
*
|
|
222
|
-
* Generated from: daffodil-geography-driver-in-memory.ts
|
|
223
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
115
|
+
* Generated bundle index. Do not edit.
|
|
224
116
|
*/
|
|
225
117
|
|
|
226
118
|
export { DaffGeographyInMemoryDriverModule, DaffInMemoryBackendGeographyService, DaffInMemoryGeographyService };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"daffodil-geography-driver-in-memory.js","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"],"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(DaffCountryNotFoundError)),\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"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"daffodil-geography-driver-in-memory.js","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(DaffCountryNotFoundError)),\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":[],"mappings":";;;;;;;;;AAiBA;;;MAMa,4BAA4B;IAGvC,YAAoB,IAAgB;QAAhB,SAAI,GAAJ,IAAI,CAAY;QAFpC,QAAG,GAAG,gBAAgB,CAAC;KAEiB;IAExC,GAAG,CAAC,SAA4B;QAC9B,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAAc,GAAG,IAAI,CAAC,GAAG,IAAI,SAAS,EAAE,CAAC,CAAC,IAAI,CAChE,UAAU,CAAC,CAAC,KAAY,KAAK,UAAU,CAAC,wBAAwB,CAAC,CAAC,EAClE,GAAG,CAAC,MAAM,IAAI,MAAM,CAAC,CACtB,CAAC;KACH;IAED,IAAI;QACF,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAAgB,GAAG,IAAI,CAAC,GAAG,GAAG,CAAC,CAAC;KACrD;;;;YAjBF,UAAU,SAAC;gBACV,UAAU,EAAE,MAAM;aACnB;;;;YAtBQ,UAAU;;;MCeN,iCAAiC;IAC5C,OAAO,OAAO;QACZ,OAAO;YACL,QAAQ,EAAE,iCAAiC;YAC3C,SAAS,EAAE;gBACT;oBACE,OAAO,EAAE,mBAAmB;oBAC5B,WAAW,EAAE,4BAA4B;iBAC1C;aACF;SACF,CAAC;KACH;;;YAhBF,QAAQ,SAAC;gBACR,OAAO,EAAE;oBACP,YAAY;iBACb;aACF;;;ACAD;;;;;MAQa,mCAAmC;IAG9C,YACU,cAAkC,EAClC,kBAA0C;QAD1C,mBAAc,GAAd,cAAc,CAAoB;QAClC,uBAAkB,GAAlB,kBAAkB,CAAwB;QAElD,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,cAAc,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;QACnD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