@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
|
@@ -4,187 +4,88 @@
|
|
|
4
4
|
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.daffodil = global.daffodil || {}, global.daffodil.geography = global.daffodil.geography || {}, global.daffodil.geography.state = {}), global.i1, global.entity, global.ng.core, global.effects, global.rxjs, global.rxjs.operators, global.daffodil.geography, global.daffodil.geography.driver));
|
|
5
5
|
}(this, (function (exports, i1, entity, i0, effects, rxjs, operators, geography, driver) { 'use strict';
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
CountryLoadSuccessAction: "[DaffGeography] Country Load Success Action",
|
|
16
|
-
CountryLoadFailureAction: "[DaffGeography] Country Load Failure Action",
|
|
17
|
-
CountryListAction: "[DaffGeography] Country List Action",
|
|
18
|
-
CountryListSuccessAction: "[DaffGeography] Country List Success Action",
|
|
19
|
-
CountryListFailureAction: "[DaffGeography] Country List Failure Action",
|
|
20
|
-
};
|
|
21
|
-
/**
|
|
22
|
-
* @template T
|
|
23
|
-
*/
|
|
7
|
+
(function (DaffGeographyActionTypes) {
|
|
8
|
+
DaffGeographyActionTypes["CountryLoadAction"] = "[DaffGeography] Country Load Action";
|
|
9
|
+
DaffGeographyActionTypes["CountryLoadSuccessAction"] = "[DaffGeography] Country Load Success Action";
|
|
10
|
+
DaffGeographyActionTypes["CountryLoadFailureAction"] = "[DaffGeography] Country Load Failure Action";
|
|
11
|
+
DaffGeographyActionTypes["CountryListAction"] = "[DaffGeography] Country List Action";
|
|
12
|
+
DaffGeographyActionTypes["CountryListSuccessAction"] = "[DaffGeography] Country List Success Action";
|
|
13
|
+
DaffGeographyActionTypes["CountryListFailureAction"] = "[DaffGeography] Country List Failure Action";
|
|
14
|
+
})(exports.DaffGeographyActionTypes || (exports.DaffGeographyActionTypes = {}));
|
|
24
15
|
var DaffCountryLoad = /** @class */ (function () {
|
|
25
|
-
/**
|
|
26
|
-
* @param {?} payload
|
|
27
|
-
*/
|
|
28
16
|
function DaffCountryLoad(payload) {
|
|
29
17
|
this.payload = payload;
|
|
30
|
-
this.type = DaffGeographyActionTypes.CountryLoadAction;
|
|
18
|
+
this.type = exports.DaffGeographyActionTypes.CountryLoadAction;
|
|
31
19
|
}
|
|
32
20
|
return DaffCountryLoad;
|
|
33
21
|
}());
|
|
34
|
-
if (false) {
|
|
35
|
-
/** @type {?} */
|
|
36
|
-
DaffCountryLoad.prototype.type;
|
|
37
|
-
/** @type {?} */
|
|
38
|
-
DaffCountryLoad.prototype.payload;
|
|
39
|
-
}
|
|
40
|
-
/**
|
|
41
|
-
* @template T
|
|
42
|
-
*/
|
|
43
22
|
var DaffCountryLoadSuccess = /** @class */ (function () {
|
|
44
|
-
/**
|
|
45
|
-
* @param {?} payload
|
|
46
|
-
*/
|
|
47
23
|
function DaffCountryLoadSuccess(payload) {
|
|
48
24
|
this.payload = payload;
|
|
49
|
-
this.type = DaffGeographyActionTypes.CountryLoadSuccessAction;
|
|
25
|
+
this.type = exports.DaffGeographyActionTypes.CountryLoadSuccessAction;
|
|
50
26
|
}
|
|
51
27
|
return DaffCountryLoadSuccess;
|
|
52
28
|
}());
|
|
53
|
-
if (false) {
|
|
54
|
-
/** @type {?} */
|
|
55
|
-
DaffCountryLoadSuccess.prototype.type;
|
|
56
|
-
/** @type {?} */
|
|
57
|
-
DaffCountryLoadSuccess.prototype.payload;
|
|
58
|
-
}
|
|
59
29
|
var DaffCountryLoadFailure = /** @class */ (function () {
|
|
60
|
-
/**
|
|
61
|
-
* @param {?} payload
|
|
62
|
-
*/
|
|
63
30
|
function DaffCountryLoadFailure(payload) {
|
|
64
31
|
this.payload = payload;
|
|
65
|
-
this.type = DaffGeographyActionTypes.CountryLoadFailureAction;
|
|
32
|
+
this.type = exports.DaffGeographyActionTypes.CountryLoadFailureAction;
|
|
66
33
|
}
|
|
67
34
|
return DaffCountryLoadFailure;
|
|
68
35
|
}());
|
|
69
|
-
if (false) {
|
|
70
|
-
/** @type {?} */
|
|
71
|
-
DaffCountryLoadFailure.prototype.type;
|
|
72
|
-
/** @type {?} */
|
|
73
|
-
DaffCountryLoadFailure.prototype.payload;
|
|
74
|
-
}
|
|
75
36
|
var DaffCountryList = /** @class */ (function () {
|
|
76
37
|
function DaffCountryList() {
|
|
77
|
-
this.type = DaffGeographyActionTypes.CountryListAction;
|
|
38
|
+
this.type = exports.DaffGeographyActionTypes.CountryListAction;
|
|
78
39
|
}
|
|
79
40
|
return DaffCountryList;
|
|
80
41
|
}());
|
|
81
|
-
if (false) {
|
|
82
|
-
/** @type {?} */
|
|
83
|
-
DaffCountryList.prototype.type;
|
|
84
|
-
}
|
|
85
|
-
/**
|
|
86
|
-
* @template T
|
|
87
|
-
*/
|
|
88
42
|
var DaffCountryListSuccess = /** @class */ (function () {
|
|
89
|
-
/**
|
|
90
|
-
* @param {?} payload
|
|
91
|
-
*/
|
|
92
43
|
function DaffCountryListSuccess(payload) {
|
|
93
44
|
this.payload = payload;
|
|
94
|
-
this.type = DaffGeographyActionTypes.CountryListSuccessAction;
|
|
45
|
+
this.type = exports.DaffGeographyActionTypes.CountryListSuccessAction;
|
|
95
46
|
}
|
|
96
47
|
return DaffCountryListSuccess;
|
|
97
48
|
}());
|
|
98
|
-
if (false) {
|
|
99
|
-
/** @type {?} */
|
|
100
|
-
DaffCountryListSuccess.prototype.type;
|
|
101
|
-
/** @type {?} */
|
|
102
|
-
DaffCountryListSuccess.prototype.payload;
|
|
103
|
-
}
|
|
104
49
|
var DaffCountryListFailure = /** @class */ (function () {
|
|
105
|
-
/**
|
|
106
|
-
* @param {?} payload
|
|
107
|
-
*/
|
|
108
50
|
function DaffCountryListFailure(payload) {
|
|
109
51
|
this.payload = payload;
|
|
110
|
-
this.type = DaffGeographyActionTypes.CountryListFailureAction;
|
|
52
|
+
this.type = exports.DaffGeographyActionTypes.CountryListFailureAction;
|
|
111
53
|
}
|
|
112
54
|
return DaffCountryListFailure;
|
|
113
55
|
}());
|
|
114
|
-
if (false) {
|
|
115
|
-
/** @type {?} */
|
|
116
|
-
DaffCountryListFailure.prototype.type;
|
|
117
|
-
/** @type {?} */
|
|
118
|
-
DaffCountryListFailure.prototype.payload;
|
|
119
|
-
}
|
|
120
56
|
|
|
121
|
-
|
|
122
|
-
* @fileoverview added by tsickle
|
|
123
|
-
* Generated from: actions/public_api.ts
|
|
124
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
125
|
-
*/
|
|
126
|
-
|
|
127
|
-
/**
|
|
128
|
-
* @fileoverview added by tsickle
|
|
129
|
-
* Generated from: reducers/country-entities/country-entities-adapter.ts
|
|
130
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
131
|
-
*/
|
|
132
|
-
var ɵ0 = /**
|
|
133
|
-
* @return {?}
|
|
134
|
-
*/ function () {
|
|
135
|
-
/** @type {?} */
|
|
57
|
+
var ɵ0 = function () {
|
|
136
58
|
var cache;
|
|
137
|
-
return (
|
|
138
|
-
* @template T
|
|
139
|
-
* @return {?}
|
|
140
|
-
*/function () { return cache = cache || entity.createEntityAdapter(); });
|
|
59
|
+
return function () { return cache = cache || entity.createEntityAdapter(); };
|
|
141
60
|
};
|
|
142
61
|
/**
|
|
143
62
|
* Country Adapter for changing/overwriting entity state.
|
|
144
|
-
* @type {?}
|
|
145
63
|
*/
|
|
146
|
-
var getCountryAdapter = (
|
|
64
|
+
var getCountryAdapter = (ɵ0)();
|
|
147
65
|
|
|
148
|
-
/**
|
|
149
|
-
* @fileoverview added by tsickle
|
|
150
|
-
* Generated from: reducers/country-entities/country-entities-initial-state.ts
|
|
151
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
152
|
-
*/
|
|
153
66
|
/**
|
|
154
67
|
* Initial state for country entity state.
|
|
155
|
-
* @type {?}
|
|
156
68
|
*/
|
|
157
69
|
var daffCountryEntitiesInitialState = getCountryAdapter().getInitialState();
|
|
158
70
|
|
|
159
|
-
/**
|
|
160
|
-
* @fileoverview added by tsickle
|
|
161
|
-
* Generated from: reducers/country-entities/country-entities.reducer.ts
|
|
162
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
163
|
-
*/
|
|
164
71
|
/**
|
|
165
72
|
* Reducer function that catches actions and changes/overwrites country entities state.
|
|
166
|
-
* @template T
|
|
167
|
-
* @param {?=} state
|
|
168
|
-
* @param {?=} action
|
|
169
|
-
* @return {?}
|
|
170
73
|
*/
|
|
171
74
|
function daffCountryEntitiesReducer(state, action) {
|
|
172
75
|
if (state === void 0) { state = daffCountryEntitiesInitialState; }
|
|
173
|
-
/** @type {?} */
|
|
174
76
|
var adapter = getCountryAdapter();
|
|
175
77
|
switch (action.type) {
|
|
176
|
-
case DaffGeographyActionTypes.CountryLoadSuccessAction:
|
|
78
|
+
case exports.DaffGeographyActionTypes.CountryLoadSuccessAction:
|
|
177
79
|
return adapter.upsertOne(Object.assign(Object.assign({}, action.payload), { loaded: true }), state);
|
|
178
|
-
case DaffGeographyActionTypes.CountryListSuccessAction:
|
|
179
|
-
return adapter.upsertMany(action.payload.map((
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
* @return {?}
|
|
185
|
-
*/ country) { return (Object.assign(Object.assign({}, country), { loaded: (state.entities[country.id] && state.entities[country.id].loaded) || false, subdivisions: country.subdivisions.length === 0 && state.entities[country.id] && state.entities[country.id].subdivisions.length > 0
|
|
80
|
+
case exports.DaffGeographyActionTypes.CountryListSuccessAction:
|
|
81
|
+
return adapter.upsertMany(action.payload.map(function (country) { return (Object.assign(Object.assign({}, country), {
|
|
82
|
+
// defer to the loaded state of the country already in state (if it exists) but init field to false if it does not
|
|
83
|
+
loaded: (state.entities[country.id] && state.entities[country.id].loaded) || false,
|
|
84
|
+
// if the country coming in has no subdivisions and the same country in state does, use the subdivisions in state
|
|
85
|
+
subdivisions: country.subdivisions.length === 0 && state.entities[country.id] && state.entities[country.id].subdivisions.length > 0
|
|
186
86
|
? state.entities[country.id].subdivisions
|
|
187
|
-
: country.subdivisions
|
|
87
|
+
: country.subdivisions
|
|
88
|
+
})); }), state);
|
|
188
89
|
default:
|
|
189
90
|
return state;
|
|
190
91
|
}
|
|
@@ -425,7 +326,7 @@
|
|
|
425
326
|
ar[i] = from[i];
|
|
426
327
|
}
|
|
427
328
|
}
|
|
428
|
-
return to.concat(ar || from);
|
|
329
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
429
330
|
}
|
|
430
331
|
function __await(v) {
|
|
431
332
|
return this instanceof __await ? (this.v = v, this) : new __await(v);
|
|
@@ -508,34 +409,22 @@
|
|
|
508
409
|
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
509
410
|
}
|
|
510
411
|
|
|
511
|
-
/**
|
|
512
|
-
* @fileoverview added by tsickle
|
|
513
|
-
* Generated from: reducers/geography/geography-initial-state.ts
|
|
514
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
515
|
-
*/
|
|
516
|
-
/** @type {?} */
|
|
517
412
|
var daffGeographyInitialState = {
|
|
518
413
|
loading: false,
|
|
519
414
|
errors: [],
|
|
520
415
|
};
|
|
521
416
|
|
|
522
|
-
/**
|
|
523
|
-
* @template T
|
|
524
|
-
* @param {?=} state
|
|
525
|
-
* @param {?=} action
|
|
526
|
-
* @return {?}
|
|
527
|
-
*/
|
|
528
417
|
function daffGeographyReducer(state, action) {
|
|
529
418
|
if (state === void 0) { state = daffGeographyInitialState; }
|
|
530
419
|
switch (action.type) {
|
|
531
|
-
case DaffGeographyActionTypes.CountryLoadAction:
|
|
532
|
-
case DaffGeographyActionTypes.CountryListAction:
|
|
420
|
+
case exports.DaffGeographyActionTypes.CountryLoadAction:
|
|
421
|
+
case exports.DaffGeographyActionTypes.CountryListAction:
|
|
533
422
|
return Object.assign(Object.assign({}, state), { loading: true });
|
|
534
|
-
case DaffGeographyActionTypes.CountryLoadSuccessAction:
|
|
535
|
-
case DaffGeographyActionTypes.CountryListSuccessAction:
|
|
423
|
+
case exports.DaffGeographyActionTypes.CountryLoadSuccessAction:
|
|
424
|
+
case exports.DaffGeographyActionTypes.CountryListSuccessAction:
|
|
536
425
|
return Object.assign(Object.assign({}, state), { errors: [], loading: false });
|
|
537
|
-
case DaffGeographyActionTypes.CountryLoadFailureAction:
|
|
538
|
-
case DaffGeographyActionTypes.CountryListFailureAction:
|
|
426
|
+
case exports.DaffGeographyActionTypes.CountryLoadFailureAction:
|
|
427
|
+
case exports.DaffGeographyActionTypes.CountryListFailureAction:
|
|
539
428
|
return Object.assign(Object.assign({}, state), { errors: __spread(state.errors, [
|
|
540
429
|
action.payload,
|
|
541
430
|
]), loading: false });
|
|
@@ -544,139 +433,28 @@
|
|
|
544
433
|
}
|
|
545
434
|
}
|
|
546
435
|
|
|
547
|
-
/**
|
|
548
|
-
* @fileoverview added by tsickle
|
|
549
|
-
* Generated from: reducers/geography-reducers.ts
|
|
550
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
551
|
-
*/
|
|
552
|
-
/** @type {?} */
|
|
553
436
|
var daffGeographyReducers = {
|
|
554
437
|
geography: daffGeographyReducer,
|
|
555
438
|
countries: daffCountryEntitiesReducer,
|
|
556
439
|
};
|
|
557
440
|
|
|
558
|
-
/**
|
|
559
|
-
* @fileoverview added by tsickle
|
|
560
|
-
* Generated from: reducers/geography-store-feature-key.ts
|
|
561
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
562
|
-
*/
|
|
563
|
-
/** @type {?} */
|
|
564
441
|
var DAFF_GEOGRAPHY_STORE_FEATURE_KEY = 'daffGeography';
|
|
565
442
|
|
|
566
|
-
|
|
567
|
-
* @fileoverview added by tsickle
|
|
568
|
-
* Generated from: reducers/country-entities/public_api.ts
|
|
569
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
570
|
-
*/
|
|
571
|
-
|
|
572
|
-
/**
|
|
573
|
-
* @fileoverview added by tsickle
|
|
574
|
-
* Generated from: reducers/geography/public_api.ts
|
|
575
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
576
|
-
*/
|
|
577
|
-
|
|
578
|
-
/**
|
|
579
|
-
* @fileoverview added by tsickle
|
|
580
|
-
* Generated from: reducers/public_api.ts
|
|
581
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
582
|
-
*/
|
|
583
|
-
|
|
584
|
-
/**
|
|
585
|
-
* @fileoverview added by tsickle
|
|
586
|
-
* Generated from: selectors/geography-feature.selector.ts
|
|
587
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
588
|
-
*/
|
|
589
|
-
/**
|
|
590
|
-
* @record
|
|
591
|
-
* @template T
|
|
592
|
-
*/
|
|
593
|
-
function DaffGeographyFeatureSelector() { }
|
|
594
|
-
if (false) {
|
|
595
|
-
/** @type {?} */
|
|
596
|
-
DaffGeographyFeatureSelector.prototype.selectGeographyFeatureState;
|
|
597
|
-
}
|
|
598
|
-
var ɵ0$1 = /**
|
|
599
|
-
* @return {?}
|
|
600
|
-
*/ function () {
|
|
601
|
-
/** @type {?} */
|
|
443
|
+
var ɵ0$1 = function () {
|
|
602
444
|
var cache;
|
|
603
|
-
return (
|
|
604
|
-
* @template T
|
|
605
|
-
* @return {?}
|
|
606
|
-
*/function () { return cache = cache || {
|
|
445
|
+
return function () { return cache = cache || {
|
|
607
446
|
selectGeographyFeatureState: i1.createFeatureSelector(DAFF_GEOGRAPHY_STORE_FEATURE_KEY),
|
|
608
|
-
}; }
|
|
447
|
+
}; };
|
|
609
448
|
};
|
|
610
|
-
|
|
611
|
-
var getDaffGeographyFeatureStateSelector = ((ɵ0$1))();
|
|
449
|
+
var getDaffGeographyFeatureStateSelector = (ɵ0$1)();
|
|
612
450
|
|
|
613
|
-
|
|
614
|
-
* @fileoverview added by tsickle
|
|
615
|
-
* Generated from: selectors/country-entities.selector.ts
|
|
616
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
617
|
-
*/
|
|
618
|
-
/**
|
|
619
|
-
* @record
|
|
620
|
-
* @template T
|
|
621
|
-
*/
|
|
622
|
-
function DaffCountryEntitySelectors() { }
|
|
623
|
-
if (false) {
|
|
624
|
-
/** @type {?} */
|
|
625
|
-
DaffCountryEntitySelectors.prototype.selectCountryEntitiesState;
|
|
626
|
-
/** @type {?} */
|
|
627
|
-
DaffCountryEntitySelectors.prototype.selectCountryIds;
|
|
628
|
-
/** @type {?} */
|
|
629
|
-
DaffCountryEntitySelectors.prototype.selectCountryEntities;
|
|
630
|
-
/** @type {?} */
|
|
631
|
-
DaffCountryEntitySelectors.prototype.selectAllCountries;
|
|
632
|
-
/** @type {?} */
|
|
633
|
-
DaffCountryEntitySelectors.prototype.selectCountryTotal;
|
|
634
|
-
/** @type {?} */
|
|
635
|
-
DaffCountryEntitySelectors.prototype.selectCountry;
|
|
636
|
-
/** @type {?} */
|
|
637
|
-
DaffCountryEntitySelectors.prototype.selectCountrySubdivisions;
|
|
638
|
-
/** @type {?} */
|
|
639
|
-
DaffCountryEntitySelectors.prototype.selectIsCountryFullyLoaded;
|
|
640
|
-
}
|
|
641
|
-
/** @type {?} */
|
|
642
|
-
var createCountryEntitySelectors = ( /**
|
|
643
|
-
* @template T
|
|
644
|
-
* @return {?}
|
|
645
|
-
*/function () {
|
|
451
|
+
var createCountryEntitySelectors = function () {
|
|
646
452
|
var selectGeographyFeatureState = getDaffGeographyFeatureStateSelector().selectGeographyFeatureState;
|
|
647
|
-
|
|
648
|
-
var selectCountryEntitiesState = i1.createSelector(selectGeographyFeatureState, ( /**
|
|
649
|
-
* @param {?} state
|
|
650
|
-
* @return {?}
|
|
651
|
-
*/function (/**
|
|
652
|
-
* @param {?} state
|
|
653
|
-
* @return {?}
|
|
654
|
-
*/ state) { return state.countries; }));
|
|
453
|
+
var selectCountryEntitiesState = i1.createSelector(selectGeographyFeatureState, function (state) { return state.countries; });
|
|
655
454
|
var _a = getCountryAdapter().getSelectors(selectCountryEntitiesState), selectIds = _a.selectIds, selectEntities = _a.selectEntities, selectAll = _a.selectAll, selectTotal = _a.selectTotal;
|
|
656
|
-
|
|
657
|
-
var
|
|
658
|
-
|
|
659
|
-
* @return {?}
|
|
660
|
-
*/function (countryId) { return i1.createSelector(selectEntities, ( /**
|
|
661
|
-
* @param {?} countries
|
|
662
|
-
* @return {?}
|
|
663
|
-
*/function (countries) { return countries[countryId]; })); })).memoized;
|
|
664
|
-
/** @type {?} */
|
|
665
|
-
var selectCountrySubdivisions = i1.defaultMemoize(( /**
|
|
666
|
-
* @param {?} countryId
|
|
667
|
-
* @return {?}
|
|
668
|
-
*/function (countryId) { return i1.createSelector(selectCountry(countryId), ( /**
|
|
669
|
-
* @param {?} country
|
|
670
|
-
* @return {?}
|
|
671
|
-
*/function (country) { return (country === null || country === void 0 ? void 0 : country.subdivisions) || []; })); })).memoized;
|
|
672
|
-
/** @type {?} */
|
|
673
|
-
var selectIsCountryFullyLoaded = i1.defaultMemoize(( /**
|
|
674
|
-
* @param {?} countryId
|
|
675
|
-
* @return {?}
|
|
676
|
-
*/function (countryId) { return i1.createSelector(selectCountry(countryId), ( /**
|
|
677
|
-
* @param {?} country
|
|
678
|
-
* @return {?}
|
|
679
|
-
*/function (country) { return country === null || country === void 0 ? void 0 : country.loaded; })); })).memoized;
|
|
455
|
+
var selectCountry = i1.defaultMemoize(function (countryId) { return i1.createSelector(selectEntities, function (countries) { return countries[countryId]; }); }).memoized;
|
|
456
|
+
var selectCountrySubdivisions = i1.defaultMemoize(function (countryId) { return i1.createSelector(selectCountry(countryId), function (country) { return (country === null || country === void 0 ? void 0 : country.subdivisions) || []; }); }).memoized;
|
|
457
|
+
var selectIsCountryFullyLoaded = i1.defaultMemoize(function (countryId) { return i1.createSelector(selectCountry(countryId), function (country) { return country === null || country === void 0 ? void 0 : country.loaded; }); }).memoized;
|
|
680
458
|
return {
|
|
681
459
|
selectCountryEntitiesState: selectCountryEntitiesState,
|
|
682
460
|
/**
|
|
@@ -709,130 +487,42 @@
|
|
|
709
487
|
*/
|
|
710
488
|
selectIsCountryFullyLoaded: selectIsCountryFullyLoaded,
|
|
711
489
|
};
|
|
712
|
-
}
|
|
490
|
+
};
|
|
713
491
|
var ɵ0$2 = createCountryEntitySelectors;
|
|
714
|
-
var ɵ1 =
|
|
715
|
-
* @return {?}
|
|
716
|
-
*/ function () {
|
|
717
|
-
/** @type {?} */
|
|
492
|
+
var ɵ1 = function () {
|
|
718
493
|
var cache;
|
|
719
|
-
return (
|
|
720
|
-
* @template T
|
|
721
|
-
* @return {?}
|
|
722
|
-
*/function () { return cache = cache || createCountryEntitySelectors(); });
|
|
494
|
+
return function () { return cache = cache || createCountryEntitySelectors(); };
|
|
723
495
|
};
|
|
724
|
-
|
|
725
|
-
var getDaffCountryEntitySelectors = ((ɵ1))();
|
|
496
|
+
var getDaffCountryEntitySelectors = (ɵ1)();
|
|
726
497
|
|
|
727
|
-
|
|
728
|
-
* @fileoverview added by tsickle
|
|
729
|
-
* Generated from: selectors/geography.selector.ts
|
|
730
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
731
|
-
*/
|
|
732
|
-
/**
|
|
733
|
-
* @record
|
|
734
|
-
*/
|
|
735
|
-
function DaffGeographySelectors() { }
|
|
736
|
-
if (false) {
|
|
737
|
-
/** @type {?} */
|
|
738
|
-
DaffGeographySelectors.prototype.selectGeographyState;
|
|
739
|
-
/** @type {?} */
|
|
740
|
-
DaffGeographySelectors.prototype.selectGeographyLoading;
|
|
741
|
-
/** @type {?} */
|
|
742
|
-
DaffGeographySelectors.prototype.selectGeographyErrors;
|
|
743
|
-
}
|
|
744
|
-
/** @type {?} */
|
|
745
|
-
var createGeographySelectors = ( /**
|
|
746
|
-
* @template T
|
|
747
|
-
* @return {?}
|
|
748
|
-
*/function () {
|
|
498
|
+
var createGeographySelectors = function () {
|
|
749
499
|
var selectGeographyFeatureState = getDaffGeographyFeatureStateSelector().selectGeographyFeatureState;
|
|
750
|
-
|
|
751
|
-
var
|
|
752
|
-
|
|
753
|
-
* @return {?}
|
|
754
|
-
*/function (/**
|
|
755
|
-
* @param {?} state
|
|
756
|
-
* @return {?}
|
|
757
|
-
*/ state) { return state.geography; }));
|
|
758
|
-
/** @type {?} */
|
|
759
|
-
var selectGeographyLoading = i1.createSelector(selectGeographyState, ( /**
|
|
760
|
-
* @param {?} state
|
|
761
|
-
* @return {?}
|
|
762
|
-
*/function (/**
|
|
763
|
-
* @param {?} state
|
|
764
|
-
* @return {?}
|
|
765
|
-
*/ state) { return state.loading; }));
|
|
766
|
-
/** @type {?} */
|
|
767
|
-
var selectGeographyErrors = i1.createSelector(selectGeographyState, ( /**
|
|
768
|
-
* @param {?} state
|
|
769
|
-
* @return {?}
|
|
770
|
-
*/function (/**
|
|
771
|
-
* @param {?} state
|
|
772
|
-
* @return {?}
|
|
773
|
-
*/ state) { return state.errors; }));
|
|
500
|
+
var selectGeographyState = i1.createSelector(selectGeographyFeatureState, function (state) { return state.geography; });
|
|
501
|
+
var selectGeographyLoading = i1.createSelector(selectGeographyState, function (state) { return state.loading; });
|
|
502
|
+
var selectGeographyErrors = i1.createSelector(selectGeographyState, function (state) { return state.errors; });
|
|
774
503
|
return {
|
|
775
504
|
selectGeographyState: selectGeographyState,
|
|
776
505
|
selectGeographyLoading: selectGeographyLoading,
|
|
777
506
|
selectGeographyErrors: selectGeographyErrors,
|
|
778
507
|
};
|
|
779
|
-
}
|
|
508
|
+
};
|
|
780
509
|
var ɵ0$3 = createGeographySelectors;
|
|
781
|
-
var ɵ1$1 =
|
|
782
|
-
* @return {?}
|
|
783
|
-
*/ function () {
|
|
784
|
-
/** @type {?} */
|
|
510
|
+
var ɵ1$1 = function () {
|
|
785
511
|
var cache;
|
|
786
|
-
return (
|
|
787
|
-
* @template T
|
|
788
|
-
* @return {?}
|
|
789
|
-
*/function () { return cache = cache || createGeographySelectors(); });
|
|
512
|
+
return function () { return cache = cache || createGeographySelectors(); };
|
|
790
513
|
};
|
|
791
|
-
|
|
792
|
-
var getGeographySelectors = ((ɵ1$1))();
|
|
514
|
+
var getGeographySelectors = (ɵ1$1)();
|
|
793
515
|
|
|
794
|
-
|
|
795
|
-
* @fileoverview added by tsickle
|
|
796
|
-
* Generated from: selectors/geography-all.selector.ts
|
|
797
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
798
|
-
*/
|
|
799
|
-
/**
|
|
800
|
-
* @record
|
|
801
|
-
* @template T
|
|
802
|
-
*/
|
|
803
|
-
function DaffGeographyAllSelectors() { }
|
|
804
|
-
var ɵ0$4 = /**
|
|
805
|
-
* @return {?}
|
|
806
|
-
*/ function () {
|
|
807
|
-
/** @type {?} */
|
|
516
|
+
var ɵ0$4 = function () {
|
|
808
517
|
var cache;
|
|
809
|
-
return (
|
|
810
|
-
* @template T
|
|
811
|
-
* @return {?}
|
|
812
|
-
*/function () { return cache = cache || Object.assign(Object.assign(Object.assign({}, getGeographySelectors()), getDaffCountryEntitySelectors()), getDaffGeographyFeatureStateSelector()); });
|
|
518
|
+
return function () { return cache = cache || Object.assign(Object.assign(Object.assign({}, getGeographySelectors()), getDaffCountryEntitySelectors()), getDaffGeographyFeatureStateSelector()); };
|
|
813
519
|
};
|
|
814
|
-
|
|
815
|
-
var getDaffGeographySelectors = ((ɵ0$4))();
|
|
816
|
-
|
|
817
|
-
/**
|
|
818
|
-
* @fileoverview added by tsickle
|
|
819
|
-
* Generated from: selectors/public_api.ts
|
|
820
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
821
|
-
*/
|
|
520
|
+
var getDaffGeographySelectors = (ɵ0$4)();
|
|
822
521
|
|
|
823
522
|
/**
|
|
824
|
-
* @
|
|
825
|
-
* Generated from: facades/geography/geography.facade.ts
|
|
826
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
827
|
-
*/
|
|
828
|
-
/**
|
|
829
|
-
* \@inheritdoc
|
|
830
|
-
* @template T
|
|
523
|
+
* @inheritdoc
|
|
831
524
|
*/
|
|
832
525
|
var DaffGeographyFacade = /** @class */ (function () {
|
|
833
|
-
/**
|
|
834
|
-
* @param {?} store
|
|
835
|
-
*/
|
|
836
526
|
function DaffGeographyFacade(store) {
|
|
837
527
|
this.store = store;
|
|
838
528
|
var _a = getDaffGeographySelectors(), selectCountryIds = _a.selectCountryIds, selectCountryEntities = _a.selectCountryEntities, selectAllCountries = _a.selectAllCountries, selectCountryTotal = _a.selectCountryTotal, selectGeographyLoading = _a.selectGeographyLoading, selectGeographyErrors = _a.selectGeographyErrors, selectCountry = _a.selectCountry, selectCountrySubdivisions = _a.selectCountrySubdivisions, selectIsCountryFullyLoaded = _a.selectIsCountryFullyLoaded;
|
|
@@ -846,36 +536,21 @@
|
|
|
846
536
|
this.countryCount$ = this.store.pipe(i1.select(selectCountryTotal));
|
|
847
537
|
this.countryEntities$ = this.store.pipe(i1.select(selectCountryEntities));
|
|
848
538
|
}
|
|
849
|
-
/**
|
|
850
|
-
* @param {?} id
|
|
851
|
-
* @return {?}
|
|
852
|
-
*/
|
|
853
539
|
DaffGeographyFacade.prototype.getCountry = function (id) {
|
|
854
540
|
return this.store.pipe(i1.select(this._selectCountry(id)));
|
|
855
541
|
};
|
|
856
|
-
/**
|
|
857
|
-
* @param {?} id
|
|
858
|
-
* @return {?}
|
|
859
|
-
*/
|
|
860
542
|
DaffGeographyFacade.prototype.getCountrySubdivisions = function (id) {
|
|
861
543
|
return this.store.pipe(i1.select(this._selectCountrySubdivisions(id)));
|
|
862
544
|
};
|
|
863
|
-
/**
|
|
864
|
-
* @param {?} id
|
|
865
|
-
* @return {?}
|
|
866
|
-
*/
|
|
867
545
|
DaffGeographyFacade.prototype.isCountryFullyLoaded = function (id) {
|
|
868
546
|
return this.store.pipe(i1.select(this._selectIsCountryFullyLoaded(id)));
|
|
869
547
|
};
|
|
870
|
-
/**
|
|
871
|
-
* @param {?} action
|
|
872
|
-
* @return {?}
|
|
873
|
-
*/
|
|
874
548
|
DaffGeographyFacade.prototype.dispatch = function (action) {
|
|
875
549
|
this.store.dispatch(action);
|
|
876
550
|
};
|
|
877
551
|
return DaffGeographyFacade;
|
|
878
552
|
}());
|
|
553
|
+
/** @nocollapse */ DaffGeographyFacade.ɵprov = i0.ɵɵdefineInjectable({ factory: function DaffGeographyFacade_Factory() { return new DaffGeographyFacade(i0.ɵɵinject(i1.Store)); }, token: DaffGeographyFacade, providedIn: "root" });
|
|
879
554
|
DaffGeographyFacade.decorators = [
|
|
880
555
|
{ type: i0.Injectable, args: [{
|
|
881
556
|
providedIn: 'root',
|
|
@@ -885,41 +560,6 @@
|
|
|
885
560
|
DaffGeographyFacade.ctorParameters = function () { return [
|
|
886
561
|
{ type: i1.Store }
|
|
887
562
|
]; };
|
|
888
|
-
/** @nocollapse */ DaffGeographyFacade.ɵprov = i0.ɵɵdefineInjectable({ factory: function DaffGeographyFacade_Factory() { return new DaffGeographyFacade(i0.ɵɵinject(i1.Store)); }, token: DaffGeographyFacade, providedIn: "root" });
|
|
889
|
-
if (false) {
|
|
890
|
-
/** @type {?} */
|
|
891
|
-
DaffGeographyFacade.prototype.loading$;
|
|
892
|
-
/** @type {?} */
|
|
893
|
-
DaffGeographyFacade.prototype.errors$;
|
|
894
|
-
/** @type {?} */
|
|
895
|
-
DaffGeographyFacade.prototype.countries$;
|
|
896
|
-
/** @type {?} */
|
|
897
|
-
DaffGeographyFacade.prototype.countryIds$;
|
|
898
|
-
/** @type {?} */
|
|
899
|
-
DaffGeographyFacade.prototype.countryCount$;
|
|
900
|
-
/** @type {?} */
|
|
901
|
-
DaffGeographyFacade.prototype.countryEntities$;
|
|
902
|
-
/**
|
|
903
|
-
* @type {?}
|
|
904
|
-
* @private
|
|
905
|
-
*/
|
|
906
|
-
DaffGeographyFacade.prototype._selectCountry;
|
|
907
|
-
/**
|
|
908
|
-
* @type {?}
|
|
909
|
-
* @private
|
|
910
|
-
*/
|
|
911
|
-
DaffGeographyFacade.prototype._selectCountrySubdivisions;
|
|
912
|
-
/**
|
|
913
|
-
* @type {?}
|
|
914
|
-
* @private
|
|
915
|
-
*/
|
|
916
|
-
DaffGeographyFacade.prototype._selectIsCountryFullyLoaded;
|
|
917
|
-
/**
|
|
918
|
-
* @type {?}
|
|
919
|
-
* @private
|
|
920
|
-
*/
|
|
921
|
-
DaffGeographyFacade.prototype.store;
|
|
922
|
-
}
|
|
923
563
|
|
|
924
564
|
var __decorate$1 = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
925
565
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
@@ -935,46 +575,14 @@
|
|
|
935
575
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
|
936
576
|
return Reflect.metadata(k, v);
|
|
937
577
|
};
|
|
938
|
-
/**
|
|
939
|
-
* @template T
|
|
940
|
-
*/
|
|
941
578
|
var DaffGeographyEffects = /** @class */ (function () {
|
|
942
|
-
/**
|
|
943
|
-
* @param {?} actions$
|
|
944
|
-
* @param {?} driver
|
|
945
|
-
* @param {?} errorMatcher
|
|
946
|
-
*/
|
|
947
579
|
function DaffGeographyEffects(actions$, driver, errorMatcher) {
|
|
948
580
|
var _this = this;
|
|
949
581
|
this.actions$ = actions$;
|
|
950
582
|
this.driver = driver;
|
|
951
583
|
this.errorMatcher = errorMatcher;
|
|
952
|
-
this.get$ = this.actions$.pipe(effects.ofType(DaffGeographyActionTypes.CountryLoadAction), operators.switchMap((
|
|
953
|
-
|
|
954
|
-
* @return {?}
|
|
955
|
-
*/function (action) { return _this.driver.get(action.payload).pipe(operators.map(( /**
|
|
956
|
-
* @param {?} resp
|
|
957
|
-
* @return {?}
|
|
958
|
-
*/function (/**
|
|
959
|
-
* @param {?} resp
|
|
960
|
-
* @return {?}
|
|
961
|
-
*/ resp) { return new DaffCountryLoadSuccess(resp); })), operators.catchError(( /**
|
|
962
|
-
* @param {?} error
|
|
963
|
-
* @return {?}
|
|
964
|
-
*/function (error) { return rxjs.of(new DaffCountryLoadFailure(_this.errorMatcher(error))); }))); })));
|
|
965
|
-
this.list$ = this.actions$.pipe(effects.ofType(DaffGeographyActionTypes.CountryListAction), operators.switchMap(( /**
|
|
966
|
-
* @param {?} action
|
|
967
|
-
* @return {?}
|
|
968
|
-
*/function (action) { return _this.driver.list().pipe(operators.map(( /**
|
|
969
|
-
* @param {?} resp
|
|
970
|
-
* @return {?}
|
|
971
|
-
*/function (/**
|
|
972
|
-
* @param {?} resp
|
|
973
|
-
* @return {?}
|
|
974
|
-
*/ resp) { return new DaffCountryListSuccess(resp); })), operators.catchError(( /**
|
|
975
|
-
* @param {?} error
|
|
976
|
-
* @return {?}
|
|
977
|
-
*/function (error) { return rxjs.of(new DaffCountryListFailure(_this.errorMatcher(error))); }))); })));
|
|
584
|
+
this.get$ = this.actions$.pipe(effects.ofType(exports.DaffGeographyActionTypes.CountryLoadAction), operators.switchMap(function (action) { return _this.driver.get(action.payload).pipe(operators.map(function (resp) { return new DaffCountryLoadSuccess(resp); }), operators.catchError(function (error) { return rxjs.of(new DaffCountryLoadFailure(_this.errorMatcher(error))); })); }));
|
|
585
|
+
this.list$ = this.actions$.pipe(effects.ofType(exports.DaffGeographyActionTypes.CountryListAction), operators.switchMap(function (action) { return _this.driver.list().pipe(operators.map(function (resp) { return new DaffCountryListSuccess(resp); }), operators.catchError(function (error) { return rxjs.of(new DaffCountryListFailure(_this.errorMatcher(error))); })); }));
|
|
978
586
|
}
|
|
979
587
|
return DaffGeographyEffects;
|
|
980
588
|
}());
|
|
@@ -995,33 +603,7 @@
|
|
|
995
603
|
effects.Effect(),
|
|
996
604
|
__metadata$1("design:type", Object)
|
|
997
605
|
], DaffGeographyEffects.prototype, "list$", void 0);
|
|
998
|
-
if (false) {
|
|
999
|
-
/** @type {?} */
|
|
1000
|
-
DaffGeographyEffects.prototype.get$;
|
|
1001
|
-
/** @type {?} */
|
|
1002
|
-
DaffGeographyEffects.prototype.list$;
|
|
1003
|
-
/**
|
|
1004
|
-
* @type {?}
|
|
1005
|
-
* @private
|
|
1006
|
-
*/
|
|
1007
|
-
DaffGeographyEffects.prototype.actions$;
|
|
1008
|
-
/**
|
|
1009
|
-
* @type {?}
|
|
1010
|
-
* @private
|
|
1011
|
-
*/
|
|
1012
|
-
DaffGeographyEffects.prototype.driver;
|
|
1013
|
-
/**
|
|
1014
|
-
* @type {?}
|
|
1015
|
-
* @private
|
|
1016
|
-
*/
|
|
1017
|
-
DaffGeographyEffects.prototype.errorMatcher;
|
|
1018
|
-
}
|
|
1019
606
|
|
|
1020
|
-
/**
|
|
1021
|
-
* @fileoverview added by tsickle
|
|
1022
|
-
* Generated from: geography-state.module.ts
|
|
1023
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1024
|
-
*/
|
|
1025
607
|
var DaffGeographyStateModule = /** @class */ (function () {
|
|
1026
608
|
function DaffGeographyStateModule() {
|
|
1027
609
|
}
|
|
@@ -1039,15 +621,7 @@
|
|
|
1039
621
|
];
|
|
1040
622
|
|
|
1041
623
|
/**
|
|
1042
|
-
*
|
|
1043
|
-
* Generated from: index.ts
|
|
1044
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1045
|
-
*/
|
|
1046
|
-
|
|
1047
|
-
/**
|
|
1048
|
-
* @fileoverview added by tsickle
|
|
1049
|
-
* Generated from: daffodil-geography-state.ts
|
|
1050
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
624
|
+
* Generated bundle index. Do not edit.
|
|
1051
625
|
*/
|
|
1052
626
|
|
|
1053
627
|
exports.DAFF_GEOGRAPHY_STORE_FEATURE_KEY = DAFF_GEOGRAPHY_STORE_FEATURE_KEY;
|
|
@@ -1057,7 +631,6 @@
|
|
|
1057
631
|
exports.DaffCountryLoad = DaffCountryLoad;
|
|
1058
632
|
exports.DaffCountryLoadFailure = DaffCountryLoadFailure;
|
|
1059
633
|
exports.DaffCountryLoadSuccess = DaffCountryLoadSuccess;
|
|
1060
|
-
exports.DaffGeographyActionTypes = DaffGeographyActionTypes;
|
|
1061
634
|
exports.DaffGeographyFacade = DaffGeographyFacade;
|
|
1062
635
|
exports.DaffGeographyStateModule = DaffGeographyStateModule;
|
|
1063
636
|
exports.daffCountryEntitiesInitialState = daffCountryEntitiesInitialState;
|
|
@@ -1067,6 +640,7 @@
|
|
|
1067
640
|
exports.daffGeographyReducers = daffGeographyReducers;
|
|
1068
641
|
exports.getCountryAdapter = getCountryAdapter;
|
|
1069
642
|
exports.getDaffGeographySelectors = getDaffGeographySelectors;
|
|
643
|
+
exports.ɵ0 = ɵ0$4;
|
|
1070
644
|
exports.ɵa = DaffGeographyEffects;
|
|
1071
645
|
|
|
1072
646
|
Object.defineProperty(exports, '__esModule', { value: true });
|