@daffodil/geography 0.88.1 → 0.90.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/index.d.ts +59 -1
- package/driver/index.d.ts +32 -1
- package/driver/magento/index.d.ts +95 -1
- package/driver/testing/index.d.ts +29 -1
- package/fesm2022/daffodil-geography-driver-in-memory.mjs +10 -10
- 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-driver.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/fesm2022/daffodil-geography.mjs.map +1 -1
- package/index.d.ts +77 -1
- package/package.json +1 -1
- package/state/index.d.ts +163 -1
- package/state/testing/index.d.ts +33 -1
- package/testing/index.d.ts +63 -1
- package/comparators/address.d.ts +0 -8
- package/comparators/personal-address.d.ts +0 -8
- package/comparators/public_api.d.ts +0 -2
- package/driver/errors/country-not-found.d.ts +0 -6
- package/driver/errors/invalid-api-response.d.ts +0 -6
- package/driver/errors/public_api.d.ts +0 -2
- package/driver/in-memory/backend/geography.service.d.ts +0 -32
- package/driver/in-memory/collection-name.const.d.ts +0 -1
- package/driver/in-memory/drivers/geography-driver.module.d.ts +0 -9
- package/driver/in-memory/drivers/geography.service.d.ts +0 -18
- package/driver/in-memory/drivers/public_api.d.ts +0 -2
- package/driver/in-memory/public_api.d.ts +0 -2
- package/driver/interfaces/geography-service.interface.d.ts +0 -13
- package/driver/magento/errors/codes.d.ts +0 -3
- package/driver/magento/errors/map.d.ts +0 -2
- package/driver/magento/errors/transform.d.ts +0 -1
- package/driver/magento/geography-driver.module.d.ts +0 -9
- package/driver/magento/geography.service.d.ts +0 -20
- package/driver/magento/models/responses/country.d.ts +0 -10
- package/driver/magento/models/responses/public_api.d.ts +0 -2
- package/driver/magento/models/responses/region.d.ts +0 -6
- package/driver/magento/public_api.d.ts +0 -6
- package/driver/magento/queries/fragments/country.d.ts +0 -1
- package/driver/magento/queries/fragments/public_api.d.ts +0 -2
- package/driver/magento/queries/fragments/region.d.ts +0 -1
- package/driver/magento/queries/get-countries.d.ts +0 -2
- package/driver/magento/queries/get-country.d.ts +0 -2
- package/driver/magento/queries/public_api.d.ts +0 -4
- package/driver/magento/queries/responses/get-countries.d.ts +0 -4
- package/driver/magento/queries/responses/get-country.d.ts +0 -4
- package/driver/magento/queries/responses/public_api.d.ts +0 -2
- package/driver/magento/transforms/responses/country.service.d.ts +0 -18
- package/driver/magento/transforms/responses/subdivision.service.d.ts +0 -14
- package/driver/magento/validators/get-countries.d.ts +0 -3
- package/driver/magento/validators/public_api.d.ts +0 -1
- package/driver/public_api.d.ts +0 -2
- package/driver/testing/drivers/geography-driver.module.d.ts +0 -9
- package/driver/testing/drivers/geography.service.d.ts +0 -17
- package/driver/testing/drivers/public_api.d.ts +0 -2
- package/driver/testing/public_api.d.ts +0 -1
- package/models/address.d.ts +0 -18
- package/models/country.d.ts +0 -18
- package/models/personal-address.d.ts +0 -14
- package/models/public_api.d.ts +0 -4
- package/models/subdivision.d.ts +0 -9
- package/public_api.d.ts +0 -2
- package/state/actions/geography.actions.d.ts +0 -40
- package/state/actions/public_api.d.ts +0 -1
- package/state/effects/geography.effects.d.ts +0 -16
- package/state/facades/geography/geography-facade.interface.d.ts +0 -16
- package/state/facades/geography/geography.facade.d.ts +0 -30
- package/state/geography-state.module.d.ts +0 -8
- package/state/injection-tokens/error-matcher.token.d.ts +0 -6
- package/state/injection-tokens/public_api.d.ts +0 -1
- package/state/public_api.d.ts +0 -7
- package/state/reducers/country-entities/country-entities-adapter.d.ts +0 -6
- package/state/reducers/country-entities/country-entities-initial-state.d.ts +0 -5
- package/state/reducers/country-entities/country-entities-state.interface.d.ts +0 -6
- package/state/reducers/country-entities/country-entities.reducer.d.ts +0 -7
- package/state/reducers/country-entities/public_api.d.ts +0 -4
- package/state/reducers/geography/geography-initial-state.d.ts +0 -2
- package/state/reducers/geography/geography-state.interface.d.ts +0 -5
- package/state/reducers/geography/geography.reducer.d.ts +0 -4
- package/state/reducers/geography/public_api.d.ts +0 -3
- package/state/reducers/geography-reducers-state.interface.d.ts +0 -11
- package/state/reducers/geography-reducers.d.ts +0 -3
- package/state/reducers/geography-store-feature-key.d.ts +0 -1
- package/state/reducers/public_api.d.ts +0 -5
- package/state/selectors/country-entities.selector.d.ts +0 -16
- package/state/selectors/geography-all.selector.d.ts +0 -7
- package/state/selectors/geography-feature.selector.d.ts +0 -8
- package/state/selectors/geography.selector.d.ts +0 -11
- package/state/selectors/public_api.d.ts +0 -1
- package/state/testing/geography-testing.module.d.ts +0 -6
- package/state/testing/mock-geography-facade.d.ts +0 -24
- package/state/testing/public_api.d.ts +0 -2
- package/testing/factories/address.factory.d.ts +0 -17
- package/testing/factories/country.factory.d.ts +0 -19
- package/testing/factories/personal-address.factory.d.ts +0 -18
- package/testing/factories/public_api.d.ts +0 -4
- package/testing/factories/subdivision.factory.d.ts +0 -13
- package/testing/public_api.d.ts +0 -1
package/testing/index.d.ts
CHANGED
|
@@ -1 +1,63 @@
|
|
|
1
|
-
|
|
1
|
+
import { DaffModelFactory } from '@daffodil/core/testing';
|
|
2
|
+
import * as _daffodil_geography from '@daffodil/geography';
|
|
3
|
+
import { DaffAddress, DaffPersonalAddress, DaffSubdivision, DaffCountry } from '@daffodil/geography';
|
|
4
|
+
import * as i0 from '@angular/core';
|
|
5
|
+
|
|
6
|
+
declare class MockDaffAddress implements DaffAddress {
|
|
7
|
+
street: string;
|
|
8
|
+
street2: string;
|
|
9
|
+
city: string;
|
|
10
|
+
region: string;
|
|
11
|
+
region_code: string;
|
|
12
|
+
postcode: string;
|
|
13
|
+
country: string;
|
|
14
|
+
}
|
|
15
|
+
declare class DaffAddressFactory extends DaffModelFactory<DaffAddress> {
|
|
16
|
+
constructor();
|
|
17
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DaffAddressFactory, never>;
|
|
18
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<DaffAddressFactory>;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
declare class MockDaffPersonalAddress extends MockDaffAddress implements DaffPersonalAddress {
|
|
22
|
+
prefix: string;
|
|
23
|
+
suffix: string;
|
|
24
|
+
firstname: string;
|
|
25
|
+
middlename: string;
|
|
26
|
+
lastname: string;
|
|
27
|
+
email: string;
|
|
28
|
+
telephone: string;
|
|
29
|
+
}
|
|
30
|
+
declare class DaffPersonalAddressFactory extends DaffModelFactory<DaffPersonalAddress> {
|
|
31
|
+
constructor();
|
|
32
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DaffPersonalAddressFactory, never>;
|
|
33
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<DaffPersonalAddressFactory>;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
declare class MockSubdivision implements DaffSubdivision {
|
|
37
|
+
id: string;
|
|
38
|
+
name: string;
|
|
39
|
+
iso_3166_2: string;
|
|
40
|
+
}
|
|
41
|
+
declare class DaffSubdivisionFactory extends DaffModelFactory<DaffSubdivision> {
|
|
42
|
+
constructor();
|
|
43
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DaffSubdivisionFactory, never>;
|
|
44
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<DaffSubdivisionFactory>;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
declare class MockCountry implements DaffCountry {
|
|
48
|
+
protected subdivisionFactory: DaffSubdivisionFactory;
|
|
49
|
+
id: string;
|
|
50
|
+
name: string;
|
|
51
|
+
name_en: string;
|
|
52
|
+
alpha2: string;
|
|
53
|
+
alpha3: string;
|
|
54
|
+
subdivisions: _daffodil_geography.DaffSubdivision[];
|
|
55
|
+
constructor(subdivisionFactory: DaffSubdivisionFactory);
|
|
56
|
+
}
|
|
57
|
+
declare class DaffCountryFactory extends DaffModelFactory<DaffCountry> {
|
|
58
|
+
constructor(subdivisionFactory: DaffSubdivisionFactory);
|
|
59
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DaffCountryFactory, never>;
|
|
60
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<DaffCountryFactory>;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export { DaffAddressFactory, DaffCountryFactory, DaffPersonalAddressFactory, DaffSubdivisionFactory, MockCountry, MockDaffAddress, MockDaffPersonalAddress, MockSubdivision };
|
package/comparators/address.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { DaffAddress } from '../models/address';
|
|
2
|
-
/**
|
|
3
|
-
* Compares two addresses and returns true if all of their fields are equal.
|
|
4
|
-
*
|
|
5
|
-
* @param address0 An address.
|
|
6
|
-
* @param address1 An address.
|
|
7
|
-
*/
|
|
8
|
-
export declare function daffCompareAddresses(address0: DaffAddress, address1: DaffAddress): boolean;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { DaffPersonalAddress } from '../models/personal-address';
|
|
2
|
-
/**
|
|
3
|
-
* Compares two personal addresses and returns true if all of their fields are equal.
|
|
4
|
-
*
|
|
5
|
-
* @param address0 A personal address.
|
|
6
|
-
* @param address1 A personal address.
|
|
7
|
-
*/
|
|
8
|
-
export declare function daffComparePersonalAddresses(address0: DaffPersonalAddress, address1: DaffPersonalAddress): boolean;
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { InMemoryDbService, RequestInfo } from 'angular-in-memory-web-api';
|
|
2
|
-
import { DaffInMemorySingleRouteableBackend } from '@daffodil/driver/in-memory';
|
|
3
|
-
import { DaffCountry } from '@daffodil/geography';
|
|
4
|
-
import { DaffCountryFactory, DaffSubdivisionFactory } from '@daffodil/geography/testing';
|
|
5
|
-
import * as i0 from "@angular/core";
|
|
6
|
-
/**
|
|
7
|
-
* An in-memory service that stubs out the backend services for getting countries.
|
|
8
|
-
*
|
|
9
|
-
* @inheritdoc
|
|
10
|
-
*/
|
|
11
|
-
export declare class DaffInMemoryBackendGeographyService implements InMemoryDbService, DaffInMemorySingleRouteableBackend {
|
|
12
|
-
private countryFactory;
|
|
13
|
-
private subdivisionFactory;
|
|
14
|
-
readonly collectionName = "countries";
|
|
15
|
-
countries: DaffCountry[];
|
|
16
|
-
constructor(countryFactory: DaffCountryFactory, subdivisionFactory: DaffSubdivisionFactory);
|
|
17
|
-
/**
|
|
18
|
-
* Creates a fake database of countries for the geography inmemory backend service.
|
|
19
|
-
*
|
|
20
|
-
* @docs-private
|
|
21
|
-
* @returns A fake database of an array of countries
|
|
22
|
-
*/
|
|
23
|
-
createDb(reqInfo: RequestInfo): any;
|
|
24
|
-
/**
|
|
25
|
-
* Responds to GET requests.
|
|
26
|
-
*/
|
|
27
|
-
get(reqInfo: RequestInfo): any;
|
|
28
|
-
private getCountry;
|
|
29
|
-
private listCountries;
|
|
30
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DaffInMemoryBackendGeographyService, never>;
|
|
31
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<DaffInMemoryBackendGeographyService>;
|
|
32
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const DAFF_GEOGRAPHY_IN_MEMORY_COLLECTION_NAME = "countries";
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { ModuleWithProviders } from '@angular/core';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
import * as i1 from "@angular/common";
|
|
4
|
-
export declare class DaffGeographyInMemoryDriverModule {
|
|
5
|
-
static forRoot(): ModuleWithProviders<DaffGeographyInMemoryDriverModule>;
|
|
6
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DaffGeographyInMemoryDriverModule, never>;
|
|
7
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<DaffGeographyInMemoryDriverModule, never, [typeof i1.CommonModule], never>;
|
|
8
|
-
static ɵinj: i0.ɵɵInjectorDeclaration<DaffGeographyInMemoryDriverModule>;
|
|
9
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { HttpClient } from '@angular/common/http';
|
|
2
|
-
import { InMemoryBackendConfig } from 'angular-in-memory-web-api';
|
|
3
|
-
import { Observable } from 'rxjs';
|
|
4
|
-
import { DaffInMemoryDriverBase } from '@daffodil/driver/in-memory';
|
|
5
|
-
import { DaffCountry } from '@daffodil/geography';
|
|
6
|
-
import { DaffGeographyServiceInterface } from '@daffodil/geography/driver';
|
|
7
|
-
import * as i0 from "@angular/core";
|
|
8
|
-
/**
|
|
9
|
-
* @inheritdoc
|
|
10
|
-
*/
|
|
11
|
-
export declare class DaffInMemoryGeographyService extends DaffInMemoryDriverBase implements DaffGeographyServiceInterface<DaffCountry> {
|
|
12
|
-
private http;
|
|
13
|
-
constructor(http: HttpClient, config: InMemoryBackendConfig);
|
|
14
|
-
get(countryId: DaffCountry['id']): Observable<DaffCountry>;
|
|
15
|
-
list(): Observable<DaffCountry[]>;
|
|
16
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DaffInMemoryGeographyService, never>;
|
|
17
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<DaffInMemoryGeographyService>;
|
|
18
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { Observable } from 'rxjs';
|
|
2
|
-
import { DaffCountry } from '@daffodil/geography';
|
|
3
|
-
export declare const DaffGeographyDriver: import("@angular/core").InjectionToken<DaffGeographyServiceInterface<DaffCountry>>, provideDaffGeographyDriver: <R extends DaffGeographyServiceInterface<DaffCountry> = DaffGeographyServiceInterface<DaffCountry>>(klass: import("@angular/core").Type<R>) => import("@angular/core").ExistingProvider;
|
|
4
|
-
export interface DaffGeographyServiceInterface<T extends DaffCountry = DaffCountry> {
|
|
5
|
-
/**
|
|
6
|
-
* Retrieves the list of countries available to the given store.
|
|
7
|
-
*/
|
|
8
|
-
list(): Observable<T[]>;
|
|
9
|
-
/**
|
|
10
|
-
* Retrieve precise information about a specific country.
|
|
11
|
-
*/
|
|
12
|
-
get(id: T['id']): Observable<T>;
|
|
13
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function transformMagentoGeographyError(error: any): import("@daffodil/core").DaffError;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { ModuleWithProviders } from '@angular/core';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
import * as i1 from "@angular/common";
|
|
4
|
-
export declare class DaffGeographyMagentoDriverModule {
|
|
5
|
-
static forRoot(): ModuleWithProviders<DaffGeographyMagentoDriverModule>;
|
|
6
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DaffGeographyMagentoDriverModule, never>;
|
|
7
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<DaffGeographyMagentoDriverModule, never, [typeof i1.CommonModule], never>;
|
|
8
|
-
static ɵinj: i0.ɵɵInjectorDeclaration<DaffGeographyMagentoDriverModule>;
|
|
9
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { Apollo } from 'apollo-angular';
|
|
2
|
-
import { Observable } from 'rxjs';
|
|
3
|
-
import { DaffCountry } from '@daffodil/geography';
|
|
4
|
-
import { DaffGeographyServiceInterface } from '@daffodil/geography/driver';
|
|
5
|
-
import { DaffMagentoCountryTransformer } from './transforms/responses/country.service';
|
|
6
|
-
import * as i0 from "@angular/core";
|
|
7
|
-
/**
|
|
8
|
-
* A service for making Magento GraphQL queries for carts.
|
|
9
|
-
*
|
|
10
|
-
* @inheritdoc
|
|
11
|
-
*/
|
|
12
|
-
export declare class DaffGeographyMagentoService implements DaffGeographyServiceInterface<DaffCountry> {
|
|
13
|
-
private apollo;
|
|
14
|
-
countryTransformer: DaffMagentoCountryTransformer;
|
|
15
|
-
constructor(apollo: Apollo, countryTransformer: DaffMagentoCountryTransformer);
|
|
16
|
-
list(): Observable<DaffCountry[]>;
|
|
17
|
-
get(countryId: DaffCountry['id']): Observable<DaffCountry>;
|
|
18
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DaffGeographyMagentoService, never>;
|
|
19
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<DaffGeographyMagentoService>;
|
|
20
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { MagentoRegion } from './region';
|
|
2
|
-
export interface MagentoCountry {
|
|
3
|
-
__typename?: 'Country';
|
|
4
|
-
id: string;
|
|
5
|
-
available_regions?: MagentoRegion[];
|
|
6
|
-
full_name_english: string;
|
|
7
|
-
full_name_locale: string;
|
|
8
|
-
three_letter_abbreviation: string;
|
|
9
|
-
two_letter_abbreviation: string;
|
|
10
|
-
}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export { DaffMagentoCountryTransformer } from './transforms/responses/country.service';
|
|
2
|
-
export { DaffMagentoSubdivisionTransformer } from './transforms/responses/subdivision.service';
|
|
3
|
-
export * from './models/responses/public_api';
|
|
4
|
-
export * from './queries/public_api';
|
|
5
|
-
export { DaffGeographyMagentoService } from './geography.service';
|
|
6
|
-
export { DaffGeographyMagentoDriverModule } from './geography-driver.module';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const countryFragment: import("apollo-angular").TypedDocumentNode<unknown, unknown>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const regionFragment: import("apollo-angular").TypedDocumentNode<unknown, unknown>;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { DaffCountry } from '@daffodil/geography';
|
|
2
|
-
import { DaffMagentoSubdivisionTransformer } from './subdivision.service';
|
|
3
|
-
import { MagentoCountry } from '../../models/responses/country';
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
|
-
/**
|
|
6
|
-
* Transforms magento carts into an object usable by daffodil.
|
|
7
|
-
*/
|
|
8
|
-
export declare class DaffMagentoCountryTransformer {
|
|
9
|
-
subdivisionTransformer: DaffMagentoSubdivisionTransformer;
|
|
10
|
-
constructor(subdivisionTransformer: DaffMagentoSubdivisionTransformer);
|
|
11
|
-
private transformSubdivisions;
|
|
12
|
-
/**
|
|
13
|
-
* Transforms the MagentoCountry from the magento country query into a DaffCountry.
|
|
14
|
-
*/
|
|
15
|
-
transform(country: MagentoCountry): DaffCountry;
|
|
16
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DaffMagentoCountryTransformer, never>;
|
|
17
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<DaffMagentoCountryTransformer>;
|
|
18
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { DaffSubdivision } from '@daffodil/geography';
|
|
2
|
-
import { MagentoRegion } from '../../models/responses/region';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
/**
|
|
5
|
-
* Transforms magento carts into an object usable by daffodil.
|
|
6
|
-
*/
|
|
7
|
-
export declare class DaffMagentoSubdivisionTransformer {
|
|
8
|
-
/**
|
|
9
|
-
* Transforms the MagentoRegion from the magento region query into a DaffSubdivision.
|
|
10
|
-
*/
|
|
11
|
-
transform(region: MagentoRegion): DaffSubdivision;
|
|
12
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DaffMagentoSubdivisionTransformer, never>;
|
|
13
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<DaffMagentoSubdivisionTransformer>;
|
|
14
|
-
}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { ApolloQueryResult } from '@apollo/client/core';
|
|
2
|
-
import { MagentoGetCountriesResponse } from '../queries/public_api';
|
|
3
|
-
export declare const validateGetCountriesResponse: (response: ApolloQueryResult<MagentoGetCountriesResponse>) => ApolloQueryResult<MagentoGetCountriesResponse>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { validateGetCountriesResponse } from './get-countries';
|
package/driver/public_api.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { ModuleWithProviders } from '@angular/core';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
import * as i1 from "@angular/common";
|
|
4
|
-
export declare class DaffGeographyTestingDriverModule {
|
|
5
|
-
static forRoot(): ModuleWithProviders<DaffGeographyTestingDriverModule>;
|
|
6
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DaffGeographyTestingDriverModule, never>;
|
|
7
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<DaffGeographyTestingDriverModule, never, [typeof i1.CommonModule], never>;
|
|
8
|
-
static ɵinj: i0.ɵɵInjectorDeclaration<DaffGeographyTestingDriverModule>;
|
|
9
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { Observable } from 'rxjs';
|
|
2
|
-
import { DaffCountry } from '@daffodil/geography';
|
|
3
|
-
import { DaffGeographyServiceInterface } from '@daffodil/geography/driver';
|
|
4
|
-
import { DaffCountryFactory, DaffSubdivisionFactory } from '@daffodil/geography/testing';
|
|
5
|
-
import * as i0 from "@angular/core";
|
|
6
|
-
/**
|
|
7
|
-
* @inheritdoc
|
|
8
|
-
*/
|
|
9
|
-
export declare class DaffTestingGeographyService implements DaffGeographyServiceInterface<DaffCountry> {
|
|
10
|
-
private countryFactory;
|
|
11
|
-
private subdivisionFactory;
|
|
12
|
-
constructor(countryFactory: DaffCountryFactory, subdivisionFactory: DaffSubdivisionFactory);
|
|
13
|
-
get(countryId: DaffCountry['id']): Observable<DaffCountry>;
|
|
14
|
-
list(): Observable<DaffCountry[]>;
|
|
15
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DaffTestingGeographyService, never>;
|
|
16
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<DaffTestingGeographyService>;
|
|
17
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './drivers/public_api';
|
package/models/address.d.ts
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { ID } from '@daffodil/core';
|
|
2
|
-
import { DaffSubdivision } from './subdivision';
|
|
3
|
-
/**
|
|
4
|
-
* A basic model of an address
|
|
5
|
-
*/
|
|
6
|
-
export interface DaffAddress {
|
|
7
|
-
street: string;
|
|
8
|
-
street2?: string;
|
|
9
|
-
city: string;
|
|
10
|
-
/**
|
|
11
|
-
* The ID of the {@link DaffSubdivision}.
|
|
12
|
-
*/
|
|
13
|
-
region: DaffSubdivision['id'];
|
|
14
|
-
region_code?: DaffSubdivision['iso_3166_2'];
|
|
15
|
-
country?: ID;
|
|
16
|
-
country_id?: ID;
|
|
17
|
-
postcode: string;
|
|
18
|
-
}
|
package/models/country.d.ts
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { DaffIdentifiable } from '@daffodil/core';
|
|
2
|
-
import { DaffSubdivision } from './subdivision';
|
|
3
|
-
/**
|
|
4
|
-
* A representation of a country on the planet Earth.
|
|
5
|
-
* See: ISO-3166
|
|
6
|
-
*/
|
|
7
|
-
export interface DaffCountry extends DaffIdentifiable {
|
|
8
|
-
name: string;
|
|
9
|
-
name_en: string;
|
|
10
|
-
alpha2: string;
|
|
11
|
-
alpha3: string;
|
|
12
|
-
subdivisions: DaffSubdivision[];
|
|
13
|
-
/**
|
|
14
|
-
* Whether or not the country has been fully loaded.
|
|
15
|
-
* If true, the subdivisions field will be populated if any exist.
|
|
16
|
-
*/
|
|
17
|
-
loaded?: boolean;
|
|
18
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { DaffAddress } from './address';
|
|
2
|
-
/**
|
|
3
|
-
* A specialized type of address useful for associating a physical address
|
|
4
|
-
* with a particular individual.
|
|
5
|
-
*/
|
|
6
|
-
export interface DaffPersonalAddress extends DaffAddress {
|
|
7
|
-
prefix?: string;
|
|
8
|
-
suffix?: string;
|
|
9
|
-
firstname: string;
|
|
10
|
-
middlename?: string;
|
|
11
|
-
lastname: string;
|
|
12
|
-
telephone: string;
|
|
13
|
-
email?: string;
|
|
14
|
-
}
|
package/models/public_api.d.ts
DELETED
package/models/subdivision.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { DaffIdentifiable } from '@daffodil/core';
|
|
2
|
-
/**
|
|
3
|
-
* The subdivisions of a country as per ISO-3166-2
|
|
4
|
-
* For the United States this is commonly termed as "States"
|
|
5
|
-
*/
|
|
6
|
-
export interface DaffSubdivision extends DaffIdentifiable {
|
|
7
|
-
name: string;
|
|
8
|
-
iso_3166_2: string;
|
|
9
|
-
}
|
package/public_api.d.ts
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { Action } from '@ngrx/store';
|
|
2
|
-
import { DaffStateError } from '@daffodil/core/state';
|
|
3
|
-
import { DaffCountry } from '@daffodil/geography';
|
|
4
|
-
export declare enum DaffGeographyActionTypes {
|
|
5
|
-
CountryLoadAction = "[@daffodil/geography] Country Load Action",
|
|
6
|
-
CountryLoadSuccessAction = "[@daffodil/geography] Country Load Success Action",
|
|
7
|
-
CountryLoadFailureAction = "[@daffodil/geography] Country Load Failure Action",
|
|
8
|
-
CountryListAction = "[@daffodil/geography] Country List Action",
|
|
9
|
-
CountryListSuccessAction = "[@daffodil/geography] Country List Success Action",
|
|
10
|
-
CountryListFailureAction = "[@daffodil/geography] Country List Failure Action"
|
|
11
|
-
}
|
|
12
|
-
export declare class DaffCountryLoad<T extends DaffCountry> implements Action {
|
|
13
|
-
payload: T['id'];
|
|
14
|
-
readonly type = DaffGeographyActionTypes.CountryLoadAction;
|
|
15
|
-
constructor(payload: T['id']);
|
|
16
|
-
}
|
|
17
|
-
export declare class DaffCountryLoadSuccess<T extends DaffCountry> implements Action {
|
|
18
|
-
payload: T;
|
|
19
|
-
readonly type = DaffGeographyActionTypes.CountryLoadSuccessAction;
|
|
20
|
-
constructor(payload: T);
|
|
21
|
-
}
|
|
22
|
-
export declare class DaffCountryLoadFailure implements Action {
|
|
23
|
-
payload: DaffStateError;
|
|
24
|
-
readonly type = DaffGeographyActionTypes.CountryLoadFailureAction;
|
|
25
|
-
constructor(payload: DaffStateError);
|
|
26
|
-
}
|
|
27
|
-
export declare class DaffCountryList implements Action {
|
|
28
|
-
readonly type = DaffGeographyActionTypes.CountryListAction;
|
|
29
|
-
}
|
|
30
|
-
export declare class DaffCountryListSuccess<T extends DaffCountry> implements Action {
|
|
31
|
-
payload: T[];
|
|
32
|
-
readonly type = DaffGeographyActionTypes.CountryListSuccessAction;
|
|
33
|
-
constructor(payload: T[]);
|
|
34
|
-
}
|
|
35
|
-
export declare class DaffCountryListFailure implements Action {
|
|
36
|
-
payload: DaffStateError;
|
|
37
|
-
readonly type = DaffGeographyActionTypes.CountryListFailureAction;
|
|
38
|
-
constructor(payload: DaffStateError);
|
|
39
|
-
}
|
|
40
|
-
export type DaffGeographyActions<T extends DaffCountry> = DaffCountryLoad<T> | DaffCountryLoadSuccess<T> | DaffCountryLoadFailure | DaffCountryList | DaffCountryListSuccess<T> | DaffCountryListFailure;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './geography.actions';
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { Actions } from '@ngrx/effects';
|
|
2
|
-
import { ErrorTransformer } from '@daffodil/core/state';
|
|
3
|
-
import { DaffCountry } from '@daffodil/geography';
|
|
4
|
-
import { DaffGeographyServiceInterface } from '@daffodil/geography/driver';
|
|
5
|
-
import { DaffCountryLoadSuccess, DaffCountryLoadFailure, DaffCountryListSuccess, DaffCountryListFailure } from '../actions/public_api';
|
|
6
|
-
import * as i0 from "@angular/core";
|
|
7
|
-
export declare class DaffGeographyEffects<T extends DaffCountry> {
|
|
8
|
-
private actions$;
|
|
9
|
-
private driver;
|
|
10
|
-
private errorMatcher;
|
|
11
|
-
constructor(actions$: Actions, driver: DaffGeographyServiceInterface<T>, errorMatcher: ErrorTransformer);
|
|
12
|
-
get$: import("rxjs").Observable<DaffCountryLoadFailure | DaffCountryLoadSuccess<T>> & import("@ngrx/effects").CreateEffectMetadata;
|
|
13
|
-
list$: import("rxjs").Observable<DaffCountryListFailure | DaffCountryListSuccess<T>> & import("@ngrx/effects").CreateEffectMetadata;
|
|
14
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DaffGeographyEffects<any>, never>;
|
|
15
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<DaffGeographyEffects<any>>;
|
|
16
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { Dictionary } from '@ngrx/entity';
|
|
2
|
-
import { Action } from '@ngrx/store';
|
|
3
|
-
import { Observable } from 'rxjs';
|
|
4
|
-
import { DaffStoreFacade, DaffStateError } from '@daffodil/core/state';
|
|
5
|
-
import { DaffCountry } from '@daffodil/geography';
|
|
6
|
-
export interface DaffGeographyFacadeInterface<T extends DaffCountry = DaffCountry> extends DaffStoreFacade<Action> {
|
|
7
|
-
loading$: Observable<boolean>;
|
|
8
|
-
errors$: Observable<DaffStateError[]>;
|
|
9
|
-
countries$: Observable<T[]>;
|
|
10
|
-
countryIds$: Observable<T['id'][]>;
|
|
11
|
-
countryCount$: Observable<number>;
|
|
12
|
-
countryEntities$: Observable<Dictionary<T>>;
|
|
13
|
-
getCountry(id: T['id']): Observable<T>;
|
|
14
|
-
getCountrySubdivisions(id: T['id']): Observable<T['subdivisions']>;
|
|
15
|
-
isCountryFullyLoaded(id: T['id']): Observable<boolean>;
|
|
16
|
-
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { Dictionary } from '@ngrx/entity';
|
|
2
|
-
import { Action, Store } from '@ngrx/store';
|
|
3
|
-
import { Observable } from 'rxjs';
|
|
4
|
-
import { DaffStateError } from '@daffodil/core/state';
|
|
5
|
-
import { DaffCountry } from '@daffodil/geography';
|
|
6
|
-
import { DaffGeographyFacadeInterface } from './geography-facade.interface';
|
|
7
|
-
import { DaffGeographyStateRootSlice } from '../../reducers/public_api';
|
|
8
|
-
import * as i0 from "@angular/core";
|
|
9
|
-
/**
|
|
10
|
-
* @inheritdoc
|
|
11
|
-
*/
|
|
12
|
-
export declare class DaffGeographyFacade<T extends DaffCountry = DaffCountry> implements DaffGeographyFacadeInterface<T> {
|
|
13
|
-
private store;
|
|
14
|
-
loading$: Observable<boolean>;
|
|
15
|
-
errors$: Observable<DaffStateError[]>;
|
|
16
|
-
countries$: Observable<T[]>;
|
|
17
|
-
countryIds$: Observable<T['id'][]>;
|
|
18
|
-
countryCount$: Observable<number>;
|
|
19
|
-
countryEntities$: Observable<Dictionary<T>>;
|
|
20
|
-
private _selectCountry;
|
|
21
|
-
private _selectCountrySubdivisions;
|
|
22
|
-
private _selectIsCountryFullyLoaded;
|
|
23
|
-
constructor(store: Store<DaffGeographyStateRootSlice<T>>);
|
|
24
|
-
getCountry(id: T['id']): Observable<T>;
|
|
25
|
-
getCountrySubdivisions(id: T['id']): Observable<T['subdivisions']>;
|
|
26
|
-
isCountryFullyLoaded(id: T['id']): Observable<boolean>;
|
|
27
|
-
dispatch(action: Action): void;
|
|
28
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DaffGeographyFacade<any>, never>;
|
|
29
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<DaffGeographyFacade<any>>;
|
|
30
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import * as i0 from "@angular/core";
|
|
2
|
-
import * as i1 from "@ngrx/store";
|
|
3
|
-
import * as i2 from "@ngrx/effects";
|
|
4
|
-
export declare class DaffGeographyStateModule {
|
|
5
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DaffGeographyStateModule, never>;
|
|
6
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<DaffGeographyStateModule, never, [typeof i1.StoreFeatureModule, typeof i2.EffectsFeatureModule], never>;
|
|
7
|
-
static ɵinj: i0.ɵɵInjectorDeclaration<DaffGeographyStateModule>;
|
|
8
|
-
}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { daffTransformErrorToStateError } from '@daffodil/core/state';
|
|
2
|
-
/**
|
|
3
|
-
* Transforms `DaffError`s into `DaffStateError`s before they are serialized into state.
|
|
4
|
-
* Can be used to further refine Daffodil errors into more specific app errors.
|
|
5
|
-
*/
|
|
6
|
-
export declare const DAFF_GEOGRAPHY_ERROR_MATCHER: import("@angular/core").InjectionToken<typeof daffTransformErrorToStateError>, provideDaffGeographyErrorMatcher: <R extends typeof daffTransformErrorToStateError = typeof daffTransformErrorToStateError>(value: R) => import("@angular/core").ValueProvider;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './error-matcher.token';
|
package/state/public_api.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export * from './selectors/public_api';
|
|
2
|
-
export * from './reducers/public_api';
|
|
3
|
-
export * from './actions/public_api';
|
|
4
|
-
export * from './injection-tokens/public_api';
|
|
5
|
-
export { DaffGeographyFacade } from './facades/geography/geography.facade';
|
|
6
|
-
export { DaffGeographyFacadeInterface } from './facades/geography/geography-facade.interface';
|
|
7
|
-
export { DaffGeographyStateModule } from './geography-state.module';
|