@esolve/ng-esolve-connect 0.16.2 → 0.18.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/esm2020/lib/account/esolve-account.service.mjs +4 -4
- package/esm2020/lib/auth/esolve-auth-interceptor.service.mjs +4 -4
- package/esm2020/lib/auth/esolve-auth.service.mjs +18 -13
- package/esm2020/lib/banners/esolve-banner.service.mjs +4 -4
- package/esm2020/lib/cart/esolve-cart-stock-item.model.mjs +3 -2
- package/esm2020/lib/cart/esolve-cart.service.mjs +5 -5
- package/esm2020/lib/category-tree/esolve-category-tree.service.mjs +4 -4
- package/esm2020/lib/enquiry/esolve-enquiry.service.mjs +4 -4
- package/esm2020/lib/locations/esolve-location-geo.model.mjs +8 -0
- package/esm2020/lib/locations/esolve-location-record.interface.mjs +1 -1
- package/esm2020/lib/locations/esolve-location.model.mjs +3 -1
- package/esm2020/lib/locations/esolve-locations.service.mjs +23 -4
- package/esm2020/lib/manufacturers/esolve-manufacturers.service.mjs +4 -4
- package/esm2020/lib/media/esolve-media.service.mjs +4 -4
- package/esm2020/lib/menu/esolve-menu.service.mjs +4 -4
- package/esm2020/lib/news/esolve-news.service.mjs +4 -4
- package/esm2020/lib/ng-esolve-connect.module.mjs +5 -5
- package/esm2020/lib/payment/classes/esolve-banking-details.model.mjs +11 -0
- package/esm2020/lib/payment/classes/esolve-payment-method.model.mjs +36 -0
- package/esm2020/lib/payment/classes/esolve-payment-result.model.mjs +37 -0
- package/esm2020/lib/payment/classes/esolve-vault-item-result.model.mjs +20 -0
- package/esm2020/lib/payment/classes/esolve-vault-item.model.mjs +20 -0
- package/esm2020/lib/payment/classes/index.mjs +6 -0
- package/esm2020/lib/payment/esolve-payment.service.mjs +60 -19
- package/esm2020/lib/payment/index.mjs +4 -14
- package/esm2020/lib/payment/interfaces/esolve-card-data.interface.mjs +2 -0
- package/esm2020/lib/payment/interfaces/esolve-payment-form-input.interface.mjs +2 -0
- package/esm2020/lib/payment/interfaces/esolve-payment-method-options.interface.mjs +2 -0
- package/esm2020/lib/payment/interfaces/esolve-payment-method-record.interface.mjs +2 -0
- package/esm2020/lib/payment/interfaces/esolve-payment-response.interface.mjs +2 -0
- package/esm2020/lib/payment/interfaces/esolve-payment-set-body.interface.mjs +2 -0
- package/esm2020/lib/payment/interfaces/esolve-payment-status.interface.mjs +2 -0
- package/esm2020/lib/payment/interfaces/esolve-vault-record.interface.mjs +2 -0
- package/esm2020/lib/payment/interfaces/esolve-vault-response.interface.mjs +2 -0
- package/esm2020/lib/payment/interfaces/index.mjs +9 -0
- package/esm2020/lib/payment/types/esolve-integration-type.type.mjs +2 -0
- package/esm2020/lib/payment/types/esolve-service-provider.type.mjs +2 -0
- package/esm2020/lib/payment/types/index.mjs +3 -0
- package/esm2020/lib/ranges/esolve-ranges.service.mjs +4 -4
- package/esm2020/lib/session/esolve-session.service.mjs +4 -4
- package/esm2020/lib/shared/assets/esolve-assets.service.mjs +4 -4
- package/esm2020/lib/shared/cookie/esolve-cookie.service.mjs +4 -4
- package/esm2020/lib/shared/errors/esolve-error-handler.service.mjs +4 -4
- package/esm2020/lib/shared/geocoder/esolve-geocoder.service.mjs +4 -4
- package/esm2020/lib/shared/response/esolve-response-handler.service.mjs +4 -4
- package/esm2020/lib/shared/seo/esolve-seo.service.mjs +4 -4
- package/esm2020/lib/shipping/esolve-shipping.service.mjs +4 -4
- package/esm2020/lib/specials/esolve-specials.service.mjs +4 -4
- package/esm2020/lib/stock/classes/esolve-stock-item-base.model.mjs +14 -1
- package/esm2020/lib/stock/esolve-stock.service.mjs +4 -4
- package/esm2020/lib/stock/interfaces/esolve-stock-base-record.interface.mjs +1 -1
- package/esm2020/lib/tags/esolve-tags.service.mjs +4 -4
- package/esm2020/lib/topics/esolve-topic.service.mjs +4 -4
- package/fesm2015/esolve-ng-esolve-connect.mjs +284 -172
- package/fesm2015/esolve-ng-esolve-connect.mjs.map +1 -1
- package/fesm2020/esolve-ng-esolve-connect.mjs +268 -160
- package/fesm2020/esolve-ng-esolve-connect.mjs.map +1 -1
- package/lib/cart/esolve-cart-stock-item.model.d.ts +2 -1
- package/lib/locations/esolve-location-geo.model.d.ts +6 -0
- package/lib/locations/esolve-location-record.interface.d.ts +3 -0
- package/lib/locations/esolve-location.model.d.ts +2 -0
- package/lib/locations/esolve-locations.service.d.ts +6 -0
- package/lib/payment/{esolve-banking-details.model.d.ts → classes/esolve-banking-details.model.d.ts} +0 -0
- package/lib/payment/{esolve-payment-method.model.d.ts → classes/esolve-payment-method.model.d.ts} +2 -2
- package/lib/payment/classes/esolve-payment-result.model.d.ts +28 -0
- package/lib/payment/{esolve-vault-item-result.model.d.ts → classes/esolve-vault-item-result.model.d.ts} +2 -2
- package/lib/payment/{esolve-vault-item.model.d.ts → classes/esolve-vault-item.model.d.ts} +0 -0
- package/lib/payment/classes/index.d.ts +5 -0
- package/lib/payment/esolve-payment.service.d.ts +36 -7
- package/lib/payment/index.d.ts +3 -13
- package/lib/payment/{esolve-card-data.interface.d.ts → interfaces/esolve-card-data.interface.d.ts} +0 -0
- package/lib/payment/interfaces/esolve-payment-form-input.interface.d.ts +4 -0
- package/lib/payment/{esolve-payment-method-options.interface.d.ts → interfaces/esolve-payment-method-options.interface.d.ts} +0 -0
- package/lib/payment/{esolve-payment-method-record.interface.d.ts → interfaces/esolve-payment-method-record.interface.d.ts} +1 -1
- package/lib/payment/interfaces/esolve-payment-response.interface.d.ts +28 -0
- package/lib/payment/{esolve-payment-set-body.interface.d.ts → interfaces/esolve-payment-set-body.interface.d.ts} +0 -0
- package/lib/payment/interfaces/esolve-payment-status.interface.d.ts +3 -0
- package/lib/payment/{esolve-vault-record.interface.d.ts → interfaces/esolve-vault-record.interface.d.ts} +0 -0
- package/lib/payment/{esolve-vault-response.interface.d.ts → interfaces/esolve-vault-response.interface.d.ts} +1 -1
- package/lib/payment/interfaces/index.d.ts +7 -0
- package/lib/payment/{esolve-integration-type.type.d.ts → types/esolve-integration-type.type.d.ts} +0 -0
- package/lib/payment/types/esolve-service-provider.type.d.ts +1 -0
- package/lib/payment/types/index.d.ts +2 -0
- package/lib/stock/classes/esolve-stock-item-base.model.d.ts +9 -0
- package/lib/stock/interfaces/esolve-stock-base-record.interface.d.ts +2 -0
- package/package.json +1 -1
- package/esm2020/lib/payment/esolve-banking-details.model.mjs +0 -11
- package/esm2020/lib/payment/esolve-card-data.interface.mjs +0 -2
- package/esm2020/lib/payment/esolve-integration-type.type.mjs +0 -2
- package/esm2020/lib/payment/esolve-paygate-form-input.interface.mjs +0 -2
- package/esm2020/lib/payment/esolve-payment-method-options.interface.mjs +0 -2
- package/esm2020/lib/payment/esolve-payment-method-record.interface.mjs +0 -2
- package/esm2020/lib/payment/esolve-payment-method.model.mjs +0 -36
- package/esm2020/lib/payment/esolve-payment-response.interface.mjs +0 -2
- package/esm2020/lib/payment/esolve-payment-result.model.mjs +0 -22
- package/esm2020/lib/payment/esolve-payment-set-body.interface.mjs +0 -2
- package/esm2020/lib/payment/esolve-vault-item-result.model.mjs +0 -20
- package/esm2020/lib/payment/esolve-vault-item.model.mjs +0 -20
- package/esm2020/lib/payment/esolve-vault-record.interface.mjs +0 -2
- package/esm2020/lib/payment/esolve-vault-response.interface.mjs +0 -2
- package/lib/payment/esolve-paygate-form-input.interface.d.ts +0 -4
- package/lib/payment/esolve-payment-response.interface.d.ts +0 -10
- package/lib/payment/esolve-payment-result.model.d.ts +0 -11
|
@@ -8,6 +8,7 @@ import { CookieService } from 'ngx-cookie-service';
|
|
|
8
8
|
import { BehaviorSubject, throwError, of, iif } from 'rxjs';
|
|
9
9
|
import * as i1$1 from '@angular/platform-browser';
|
|
10
10
|
import { map, catchError, tap, switchMap } from 'rxjs/operators';
|
|
11
|
+
import { __awaiter } from 'tslib';
|
|
11
12
|
|
|
12
13
|
const ESOLVE_CONNECT_CONFIG = new InjectionToken('esolve.connect.config');
|
|
13
14
|
|
|
@@ -120,9 +121,9 @@ class EsolveCookieService {
|
|
|
120
121
|
}
|
|
121
122
|
}
|
|
122
123
|
}
|
|
123
|
-
EsolveCookieService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
124
|
-
EsolveCookieService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.
|
|
125
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
124
|
+
EsolveCookieService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: EsolveCookieService, deps: [{ token: i1.CookieService }, { token: PLATFORM_ID }, { token: 'REQUEST', optional: true }, { token: 'RESPONSE', optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
125
|
+
EsolveCookieService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: EsolveCookieService, providedIn: 'root' });
|
|
126
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: EsolveCookieService, decorators: [{
|
|
126
127
|
type: Injectable,
|
|
127
128
|
args: [{
|
|
128
129
|
providedIn: 'root',
|
|
@@ -217,9 +218,9 @@ class EsolveSessionService {
|
|
|
217
218
|
}
|
|
218
219
|
}
|
|
219
220
|
}
|
|
220
|
-
EsolveSessionService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
221
|
-
EsolveSessionService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.
|
|
222
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
221
|
+
EsolveSessionService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: EsolveSessionService, deps: [{ token: PLATFORM_ID }, { token: ESOLVE_CONNECT_CONFIG }, { token: EsolveCookieService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
222
|
+
EsolveSessionService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: EsolveSessionService, providedIn: 'root' });
|
|
223
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: EsolveSessionService, decorators: [{
|
|
223
224
|
type: Injectable,
|
|
224
225
|
args: [{
|
|
225
226
|
providedIn: 'root',
|
|
@@ -264,9 +265,9 @@ class EsolveAuthInterceptorService {
|
|
|
264
265
|
return next.handle(req);
|
|
265
266
|
}
|
|
266
267
|
}
|
|
267
|
-
EsolveAuthInterceptorService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
268
|
-
EsolveAuthInterceptorService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.
|
|
269
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
268
|
+
EsolveAuthInterceptorService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: EsolveAuthInterceptorService, deps: [{ token: ESOLVE_CONNECT_CONFIG }, { token: EsolveSessionService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
269
|
+
EsolveAuthInterceptorService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: EsolveAuthInterceptorService });
|
|
270
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: EsolveAuthInterceptorService, decorators: [{
|
|
270
271
|
type: Injectable
|
|
271
272
|
}], ctorParameters: function () {
|
|
272
273
|
return [{ type: undefined, decorators: [{
|
|
@@ -293,14 +294,14 @@ class NgEsolveConnectModule {
|
|
|
293
294
|
};
|
|
294
295
|
}
|
|
295
296
|
}
|
|
296
|
-
NgEsolveConnectModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
297
|
-
NgEsolveConnectModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.
|
|
297
|
+
NgEsolveConnectModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: NgEsolveConnectModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
298
|
+
NgEsolveConnectModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: NgEsolveConnectModule, imports: [CommonModule,
|
|
298
299
|
HttpClientModule] });
|
|
299
|
-
NgEsolveConnectModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.
|
|
300
|
+
NgEsolveConnectModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: NgEsolveConnectModule, providers: [CookieService], imports: [[
|
|
300
301
|
CommonModule,
|
|
301
302
|
HttpClientModule
|
|
302
303
|
]] });
|
|
303
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
304
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: NgEsolveConnectModule, decorators: [{
|
|
304
305
|
type: NgModule,
|
|
305
306
|
args: [{
|
|
306
307
|
declarations: [],
|
|
@@ -362,9 +363,9 @@ class EsolveResponseHandlerService {
|
|
|
362
363
|
return resultHandler(response);
|
|
363
364
|
}
|
|
364
365
|
}
|
|
365
|
-
EsolveResponseHandlerService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
366
|
-
EsolveResponseHandlerService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.
|
|
367
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
366
|
+
EsolveResponseHandlerService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: EsolveResponseHandlerService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
367
|
+
EsolveResponseHandlerService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: EsolveResponseHandlerService, providedIn: 'root' });
|
|
368
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: EsolveResponseHandlerService, decorators: [{
|
|
368
369
|
type: Injectable,
|
|
369
370
|
args: [{
|
|
370
371
|
providedIn: 'root',
|
|
@@ -459,9 +460,9 @@ class EsolveErrorHandlerService {
|
|
|
459
460
|
return new EsolveHttpError('error', result.message, result.code);
|
|
460
461
|
}
|
|
461
462
|
}
|
|
462
|
-
EsolveErrorHandlerService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
463
|
-
EsolveErrorHandlerService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.
|
|
464
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
463
|
+
EsolveErrorHandlerService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: EsolveErrorHandlerService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
464
|
+
EsolveErrorHandlerService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: EsolveErrorHandlerService, providedIn: 'root' });
|
|
465
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: EsolveErrorHandlerService, decorators: [{
|
|
465
466
|
type: Injectable,
|
|
466
467
|
args: [{
|
|
467
468
|
providedIn: 'root'
|
|
@@ -578,9 +579,9 @@ class EsolveSeoService {
|
|
|
578
579
|
return pageSeo;
|
|
579
580
|
}
|
|
580
581
|
}
|
|
581
|
-
EsolveSeoService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
582
|
-
EsolveSeoService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.
|
|
583
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
582
|
+
EsolveSeoService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: EsolveSeoService, deps: [{ token: ESOLVE_CONNECT_CONFIG }, { token: i1$1.Title }, { token: i1$1.Meta }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
583
|
+
EsolveSeoService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: EsolveSeoService, providedIn: 'root' });
|
|
584
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: EsolveSeoService, decorators: [{
|
|
584
585
|
type: Injectable,
|
|
585
586
|
args: [{
|
|
586
587
|
providedIn: 'root',
|
|
@@ -671,9 +672,9 @@ class EsolveGeocoderService {
|
|
|
671
672
|
return geocode_result;
|
|
672
673
|
}
|
|
673
674
|
}
|
|
674
|
-
EsolveGeocoderService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
675
|
-
EsolveGeocoderService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.
|
|
676
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
675
|
+
EsolveGeocoderService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: EsolveGeocoderService, deps: [{ token: ESOLVE_CONNECT_CONFIG }, { token: i1$2.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
676
|
+
EsolveGeocoderService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: EsolveGeocoderService, providedIn: 'root' });
|
|
677
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: EsolveGeocoderService, decorators: [{
|
|
677
678
|
type: Injectable,
|
|
678
679
|
args: [{
|
|
679
680
|
providedIn: 'root',
|
|
@@ -853,9 +854,9 @@ class EsolveCategoryTreeService {
|
|
|
853
854
|
return null;
|
|
854
855
|
}
|
|
855
856
|
}
|
|
856
|
-
EsolveCategoryTreeService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
857
|
-
EsolveCategoryTreeService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.
|
|
858
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
857
|
+
EsolveCategoryTreeService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: EsolveCategoryTreeService, deps: [{ token: ESOLVE_CONNECT_CONFIG }, { token: i1$2.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
858
|
+
EsolveCategoryTreeService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: EsolveCategoryTreeService, providedIn: 'root' });
|
|
859
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: EsolveCategoryTreeService, decorators: [{
|
|
859
860
|
type: Injectable,
|
|
860
861
|
args: [{
|
|
861
862
|
providedIn: 'root',
|
|
@@ -978,9 +979,9 @@ class EsolveManufacturersService {
|
|
|
978
979
|
return new EsolveManufacturer(record);
|
|
979
980
|
}
|
|
980
981
|
}
|
|
981
|
-
EsolveManufacturersService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
982
|
-
EsolveManufacturersService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.
|
|
983
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
982
|
+
EsolveManufacturersService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: EsolveManufacturersService, deps: [{ token: ESOLVE_CONNECT_CONFIG }, { token: i1$2.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
983
|
+
EsolveManufacturersService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: EsolveManufacturersService, providedIn: 'root' });
|
|
984
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: EsolveManufacturersService, decorators: [{
|
|
984
985
|
type: Injectable,
|
|
985
986
|
args: [{
|
|
986
987
|
providedIn: 'root',
|
|
@@ -1104,9 +1105,9 @@ class EsolveRangesService {
|
|
|
1104
1105
|
return new EsolveRange(record);
|
|
1105
1106
|
}
|
|
1106
1107
|
}
|
|
1107
|
-
EsolveRangesService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
1108
|
-
EsolveRangesService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.
|
|
1109
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
1108
|
+
EsolveRangesService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: EsolveRangesService, deps: [{ token: ESOLVE_CONNECT_CONFIG }, { token: i1$2.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1109
|
+
EsolveRangesService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: EsolveRangesService, providedIn: 'root' });
|
|
1110
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: EsolveRangesService, decorators: [{
|
|
1110
1111
|
type: Injectable,
|
|
1111
1112
|
args: [{
|
|
1112
1113
|
providedIn: 'root',
|
|
@@ -1211,9 +1212,9 @@ class EsolveTagsService {
|
|
|
1211
1212
|
return tags;
|
|
1212
1213
|
}
|
|
1213
1214
|
}
|
|
1214
|
-
EsolveTagsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
1215
|
-
EsolveTagsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.
|
|
1216
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
1215
|
+
EsolveTagsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: EsolveTagsService, deps: [{ token: ESOLVE_CONNECT_CONFIG }, { token: i1$2.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1216
|
+
EsolveTagsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: EsolveTagsService, providedIn: 'root' });
|
|
1217
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: EsolveTagsService, decorators: [{
|
|
1217
1218
|
type: Injectable,
|
|
1218
1219
|
args: [{
|
|
1219
1220
|
providedIn: 'root',
|
|
@@ -1277,9 +1278,9 @@ class EsolveTopicService {
|
|
|
1277
1278
|
return topics;
|
|
1278
1279
|
}
|
|
1279
1280
|
}
|
|
1280
|
-
EsolveTopicService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
1281
|
-
EsolveTopicService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.
|
|
1282
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
1281
|
+
EsolveTopicService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: EsolveTopicService, deps: [{ token: ESOLVE_CONNECT_CONFIG }, { token: i1$2.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1282
|
+
EsolveTopicService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: EsolveTopicService, providedIn: 'root' });
|
|
1283
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: EsolveTopicService, decorators: [{
|
|
1283
1284
|
type: Injectable,
|
|
1284
1285
|
args: [{
|
|
1285
1286
|
providedIn: 'root',
|
|
@@ -1447,9 +1448,9 @@ class EsolveAssetsService {
|
|
|
1447
1448
|
return params;
|
|
1448
1449
|
}
|
|
1449
1450
|
}
|
|
1450
|
-
EsolveAssetsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
1451
|
-
EsolveAssetsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.
|
|
1452
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
1451
|
+
EsolveAssetsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: EsolveAssetsService, deps: [{ token: ESOLVE_CONNECT_CONFIG }, { token: i1$2.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1452
|
+
EsolveAssetsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: EsolveAssetsService, providedIn: 'root' });
|
|
1453
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: EsolveAssetsService, decorators: [{
|
|
1453
1454
|
type: Injectable,
|
|
1454
1455
|
args: [{
|
|
1455
1456
|
providedIn: 'root',
|
|
@@ -1549,9 +1550,15 @@ class EsolveAuthService {
|
|
|
1549
1550
|
}));
|
|
1550
1551
|
}
|
|
1551
1552
|
logout() {
|
|
1552
|
-
this
|
|
1553
|
-
|
|
1554
|
-
|
|
1553
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1554
|
+
this.session.clearTimer();
|
|
1555
|
+
this.cookieService.delete('_ws_id');
|
|
1556
|
+
const response = yield this.getAccessToken('', '', true).toPromise();
|
|
1557
|
+
if (response) {
|
|
1558
|
+
return response;
|
|
1559
|
+
}
|
|
1560
|
+
throw new Error('Invalid response');
|
|
1561
|
+
});
|
|
1555
1562
|
}
|
|
1556
1563
|
checkAccessToken(session) {
|
|
1557
1564
|
var _a;
|
|
@@ -1561,7 +1568,7 @@ class EsolveAuthService {
|
|
|
1561
1568
|
.get(`${this.config.api_url}/get-access-token.php`, {
|
|
1562
1569
|
params: { key: token },
|
|
1563
1570
|
headers: new HttpHeaders({
|
|
1564
|
-
'Accept-Language': '*'
|
|
1571
|
+
'Accept-Language': '*',
|
|
1565
1572
|
}),
|
|
1566
1573
|
})
|
|
1567
1574
|
.pipe(map((responseData) => {
|
|
@@ -1579,14 +1586,15 @@ class EsolveAuthService {
|
|
|
1579
1586
|
user_id: additional_data.user_id,
|
|
1580
1587
|
};
|
|
1581
1588
|
return result;
|
|
1582
|
-
}))
|
|
1583
|
-
.toPromise();
|
|
1589
|
+
}));
|
|
1584
1590
|
}
|
|
1585
1591
|
// Handlers
|
|
1586
1592
|
handleExpiration() {
|
|
1587
1593
|
return (session) => {
|
|
1588
|
-
this.checkAccessToken(session).then((response) => {
|
|
1589
|
-
|
|
1594
|
+
this.checkAccessToken(session).toPromise().then((response) => {
|
|
1595
|
+
if (response) {
|
|
1596
|
+
this.handleAuthentication(response);
|
|
1597
|
+
}
|
|
1590
1598
|
}, () => {
|
|
1591
1599
|
this.logout();
|
|
1592
1600
|
});
|
|
@@ -1606,7 +1614,7 @@ class EsolveAuthService {
|
|
|
1606
1614
|
if ((!errorRes.type) ||
|
|
1607
1615
|
(!errorRes.service_type) ||
|
|
1608
1616
|
(!errorRes.message)) {
|
|
1609
|
-
return throwError(error);
|
|
1617
|
+
return throwError(() => error);
|
|
1610
1618
|
}
|
|
1611
1619
|
if (errorRes.message.trim() !== '') {
|
|
1612
1620
|
error.message = errorRes.message;
|
|
@@ -1614,12 +1622,12 @@ class EsolveAuthService {
|
|
|
1614
1622
|
if (errorRes.additional_data) {
|
|
1615
1623
|
error.data = errorRes.additional_data;
|
|
1616
1624
|
}
|
|
1617
|
-
return throwError(error);
|
|
1625
|
+
return throwError(() => error);
|
|
1618
1626
|
}
|
|
1619
1627
|
}
|
|
1620
|
-
EsolveAuthService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
1621
|
-
EsolveAuthService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.
|
|
1622
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
1628
|
+
EsolveAuthService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: EsolveAuthService, deps: [{ token: ESOLVE_CONNECT_CONFIG }, { token: i1$2.HttpClient }, { token: EsolveSessionService }, { token: EsolveErrorHandlerService }, { token: EsolveCookieService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1629
|
+
EsolveAuthService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: EsolveAuthService, providedIn: 'root' });
|
|
1630
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: EsolveAuthService, decorators: [{
|
|
1623
1631
|
type: Injectable,
|
|
1624
1632
|
args: [{
|
|
1625
1633
|
providedIn: 'root',
|
|
@@ -1816,6 +1824,14 @@ class EsolveLocationTradingDay {
|
|
|
1816
1824
|
}
|
|
1817
1825
|
}
|
|
1818
1826
|
|
|
1827
|
+
class EsolveLocationGEO {
|
|
1828
|
+
constructor(distance, range, target_description) {
|
|
1829
|
+
this.distance = distance;
|
|
1830
|
+
this.range = range;
|
|
1831
|
+
this.target_description = target_description;
|
|
1832
|
+
}
|
|
1833
|
+
}
|
|
1834
|
+
|
|
1819
1835
|
class EsolveLocation {
|
|
1820
1836
|
constructor(record) {
|
|
1821
1837
|
this.id = +record.id;
|
|
@@ -1851,6 +1867,7 @@ class EsolveLocation {
|
|
|
1851
1867
|
const sunday = new EsolveLocationTradingDay(record.sunday_open_time, record.sunday_close_time);
|
|
1852
1868
|
const public_holiday = new EsolveLocationTradingDay(record.public_holiday_open_time, record.public_holiday_close_time);
|
|
1853
1869
|
this.trading_times = new EsolveLocationTradingTimes(monday, tuesday, wednesday, thursday, friday, saturday, sunday, public_holiday, record.trading_hours_additional_info);
|
|
1870
|
+
this.geo = new EsolveLocationGEO(record.range, record.distance, record.target_description);
|
|
1854
1871
|
}
|
|
1855
1872
|
}
|
|
1856
1873
|
|
|
@@ -1874,6 +1891,25 @@ class EsolveLocationsService {
|
|
|
1874
1891
|
return this.processStockLocations(response.records);
|
|
1875
1892
|
}));
|
|
1876
1893
|
}
|
|
1894
|
+
/**
|
|
1895
|
+
* Retrieves a list of stock locations
|
|
1896
|
+
*
|
|
1897
|
+
* @returns An `Observable` with an array of stock locations
|
|
1898
|
+
*/
|
|
1899
|
+
getStockLocationsGeo(addresses_id = 0) {
|
|
1900
|
+
return this.http
|
|
1901
|
+
.get(`${this.config.api_url}/get-locations-geo.php`, {
|
|
1902
|
+
params: {
|
|
1903
|
+
addresses_id,
|
|
1904
|
+
},
|
|
1905
|
+
})
|
|
1906
|
+
.pipe(map((response) => {
|
|
1907
|
+
if (response.records === undefined) {
|
|
1908
|
+
throw response;
|
|
1909
|
+
}
|
|
1910
|
+
return this.processStockLocations(response.records);
|
|
1911
|
+
}));
|
|
1912
|
+
}
|
|
1877
1913
|
/**
|
|
1878
1914
|
* Processes the eSolve stock location records.
|
|
1879
1915
|
*
|
|
@@ -1890,9 +1926,9 @@ class EsolveLocationsService {
|
|
|
1890
1926
|
return stock_locations;
|
|
1891
1927
|
}
|
|
1892
1928
|
}
|
|
1893
|
-
EsolveLocationsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
1894
|
-
EsolveLocationsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.
|
|
1895
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
1929
|
+
EsolveLocationsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: EsolveLocationsService, deps: [{ token: ESOLVE_CONNECT_CONFIG }, { token: i1$2.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1930
|
+
EsolveLocationsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: EsolveLocationsService, providedIn: 'root' });
|
|
1931
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: EsolveLocationsService, decorators: [{
|
|
1896
1932
|
type: Injectable,
|
|
1897
1933
|
args: [{
|
|
1898
1934
|
providedIn: 'root',
|
|
@@ -2315,9 +2351,9 @@ class EsolveAccountService {
|
|
|
2315
2351
|
}
|
|
2316
2352
|
}
|
|
2317
2353
|
}
|
|
2318
|
-
EsolveAccountService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
2319
|
-
EsolveAccountService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.
|
|
2320
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
2354
|
+
EsolveAccountService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: EsolveAccountService, deps: [{ token: ESOLVE_CONNECT_CONFIG }, { token: i1$2.HttpClient }, { token: EsolveSessionService }, { token: EsolveErrorHandlerService }, { token: EsolveResponseHandlerService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2355
|
+
EsolveAccountService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: EsolveAccountService, providedIn: 'root' });
|
|
2356
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: EsolveAccountService, decorators: [{
|
|
2321
2357
|
type: Injectable,
|
|
2322
2358
|
args: [{
|
|
2323
2359
|
providedIn: 'root',
|
|
@@ -2459,9 +2495,9 @@ class EsolveBannerService {
|
|
|
2459
2495
|
return banners;
|
|
2460
2496
|
}
|
|
2461
2497
|
}
|
|
2462
|
-
EsolveBannerService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
2463
|
-
EsolveBannerService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.
|
|
2464
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
2498
|
+
EsolveBannerService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: EsolveBannerService, deps: [{ token: ESOLVE_CONNECT_CONFIG }, { token: i1$2.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2499
|
+
EsolveBannerService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: EsolveBannerService, providedIn: 'root' });
|
|
2500
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: EsolveBannerService, decorators: [{
|
|
2465
2501
|
type: Injectable,
|
|
2466
2502
|
args: [{
|
|
2467
2503
|
providedIn: 'root',
|
|
@@ -2604,9 +2640,9 @@ class EsolveMediaService {
|
|
|
2604
2640
|
return this.http.get(`${this.config.api_url}/get-media.php`, { params });
|
|
2605
2641
|
}
|
|
2606
2642
|
}
|
|
2607
|
-
EsolveMediaService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
2608
|
-
EsolveMediaService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.
|
|
2609
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
2643
|
+
EsolveMediaService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: EsolveMediaService, deps: [{ token: ESOLVE_CONNECT_CONFIG }, { token: i1$2.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2644
|
+
EsolveMediaService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: EsolveMediaService, providedIn: 'root' });
|
|
2645
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: EsolveMediaService, decorators: [{
|
|
2610
2646
|
type: Injectable,
|
|
2611
2647
|
args: [{
|
|
2612
2648
|
providedIn: 'root',
|
|
@@ -2655,9 +2691,9 @@ class EsolveMenuService {
|
|
|
2655
2691
|
return menu;
|
|
2656
2692
|
}
|
|
2657
2693
|
}
|
|
2658
|
-
EsolveMenuService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
2659
|
-
EsolveMenuService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.
|
|
2660
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
2694
|
+
EsolveMenuService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: EsolveMenuService, deps: [{ token: ESOLVE_CONNECT_CONFIG }, { token: i1$2.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2695
|
+
EsolveMenuService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: EsolveMenuService, providedIn: 'root' });
|
|
2696
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: EsolveMenuService, decorators: [{
|
|
2661
2697
|
type: Injectable,
|
|
2662
2698
|
args: [{
|
|
2663
2699
|
providedIn: 'root',
|
|
@@ -2855,9 +2891,9 @@ class EsolveNewsService {
|
|
|
2855
2891
|
return params;
|
|
2856
2892
|
}
|
|
2857
2893
|
}
|
|
2858
|
-
EsolveNewsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
2859
|
-
EsolveNewsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.
|
|
2860
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
2894
|
+
EsolveNewsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: EsolveNewsService, deps: [{ token: ESOLVE_CONNECT_CONFIG }, { token: i1$2.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2895
|
+
EsolveNewsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: EsolveNewsService, providedIn: 'root' });
|
|
2896
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: EsolveNewsService, decorators: [{
|
|
2861
2897
|
type: Injectable,
|
|
2862
2898
|
args: [{
|
|
2863
2899
|
providedIn: 'root',
|
|
@@ -2945,7 +2981,7 @@ class EsolveStockLeadTimes {
|
|
|
2945
2981
|
|
|
2946
2982
|
class EsolveStockItemBase {
|
|
2947
2983
|
constructor(record = {}) {
|
|
2948
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y;
|
|
2984
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0;
|
|
2949
2985
|
/**
|
|
2950
2986
|
* eSolve Generated ID
|
|
2951
2987
|
*/
|
|
@@ -2978,6 +3014,14 @@ class EsolveStockItemBase {
|
|
|
2978
3014
|
* Featured state
|
|
2979
3015
|
*/
|
|
2980
3016
|
this.featured = false;
|
|
3017
|
+
/**
|
|
3018
|
+
* Number of stock available
|
|
3019
|
+
*/
|
|
3020
|
+
this.amount_in_stock = 0;
|
|
3021
|
+
/**
|
|
3022
|
+
* Total items linked to the item as a recipe
|
|
3023
|
+
*/
|
|
3024
|
+
this.total_recipe_items = 0;
|
|
2981
3025
|
/**
|
|
2982
3026
|
* Height measured in meters (m)
|
|
2983
3027
|
*/
|
|
@@ -3062,17 +3106,19 @@ class EsolveStockItemBase {
|
|
|
3062
3106
|
this.ranges_id = +((_l = record.ranges_id) !== null && _l !== void 0 ? _l : 0);
|
|
3063
3107
|
this.active = !!+((_m = record.is_active) !== null && _m !== void 0 ? _m : false);
|
|
3064
3108
|
this.featured = !!+((_o = record.is_featured) !== null && _o !== void 0 ? _o : false);
|
|
3065
|
-
this.
|
|
3066
|
-
this.
|
|
3067
|
-
this.
|
|
3068
|
-
this.
|
|
3109
|
+
this.amount_in_stock = +((_p = record.onhand) !== null && _p !== void 0 ? _p : 0);
|
|
3110
|
+
this.total_recipe_items = +((_q = record.total_recipe_items) !== null && _q !== void 0 ? _q : 0);
|
|
3111
|
+
this.height = +((_r = record.height) !== null && _r !== void 0 ? _r : 0);
|
|
3112
|
+
this.width = +((_s = record.width) !== null && _s !== void 0 ? _s : 0);
|
|
3113
|
+
this.length = +((_t = record.length) !== null && _t !== void 0 ? _t : 0);
|
|
3114
|
+
this.weight = +((_u = record.weight) !== null && _u !== void 0 ? _u : 0);
|
|
3069
3115
|
if (record.unit_of_measure) {
|
|
3070
3116
|
this.unit_of_measure = record.unit_of_measure;
|
|
3071
3117
|
}
|
|
3072
|
-
base_price = +((
|
|
3073
|
-
base_price_with_tax = +((
|
|
3074
|
-
sell_price = +((
|
|
3075
|
-
sell_price_with_tax = +((
|
|
3118
|
+
base_price = +((_v = record.regular_sellprice) !== null && _v !== void 0 ? _v : 0);
|
|
3119
|
+
base_price_with_tax = +((_w = record.regular_sellprice_inclusive) !== null && _w !== void 0 ? _w : 0);
|
|
3120
|
+
sell_price = +((_x = record.sellprice) !== null && _x !== void 0 ? _x : 0);
|
|
3121
|
+
sell_price_with_tax = +((_y = record.sellprice_inclusive) !== null && _y !== void 0 ? _y : 0);
|
|
3076
3122
|
if ((record.tags) && (record.tags.length > 0)) {
|
|
3077
3123
|
for (const tag of record.tags) {
|
|
3078
3124
|
this.tags.push(new EsolveTag(tag));
|
|
@@ -3111,8 +3157,8 @@ class EsolveStockItemBase {
|
|
|
3111
3157
|
if (record.custom_fields) {
|
|
3112
3158
|
this.custom_fields = record.custom_fields;
|
|
3113
3159
|
}
|
|
3114
|
-
seo_title = (
|
|
3115
|
-
seo_keywords = (
|
|
3160
|
+
seo_title = (_z = record.seo_page_title) !== null && _z !== void 0 ? _z : '';
|
|
3161
|
+
seo_keywords = (_0 = record.seo_keywords) !== null && _0 !== void 0 ? _0 : '';
|
|
3116
3162
|
}
|
|
3117
3163
|
this.price = new EsolveStockPrice(base_price, base_price_with_tax, sell_price, sell_price_with_tax);
|
|
3118
3164
|
if (seo_title.trim() === '') {
|
|
@@ -3150,6 +3196,9 @@ class EsolveStockItemBase {
|
|
|
3150
3196
|
get original_image_src() {
|
|
3151
3197
|
return this.getImagePath('original');
|
|
3152
3198
|
}
|
|
3199
|
+
get available() {
|
|
3200
|
+
return (this.amount_in_stock > 0);
|
|
3201
|
+
}
|
|
3153
3202
|
getImagePath(image_size) {
|
|
3154
3203
|
if (this.image_name !== '') {
|
|
3155
3204
|
return `/images/stock/${image_size}/${this.image_name}`;
|
|
@@ -3605,9 +3654,9 @@ class EsolveStockService {
|
|
|
3605
3654
|
return this.http.get(`${this.config.api_url}/get-items.php`, { params });
|
|
3606
3655
|
}
|
|
3607
3656
|
}
|
|
3608
|
-
EsolveStockService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
3609
|
-
EsolveStockService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.
|
|
3610
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
3657
|
+
EsolveStockService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: EsolveStockService, deps: [{ token: ESOLVE_CONNECT_CONFIG }, { token: i1$2.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
3658
|
+
EsolveStockService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: EsolveStockService, providedIn: 'root' });
|
|
3659
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: EsolveStockService, decorators: [{
|
|
3611
3660
|
type: Injectable,
|
|
3612
3661
|
args: [{
|
|
3613
3662
|
providedIn: 'root',
|
|
@@ -3749,9 +3798,9 @@ class EsolveSpecialsService {
|
|
|
3749
3798
|
return new EsolveSpecial(record);
|
|
3750
3799
|
}
|
|
3751
3800
|
}
|
|
3752
|
-
EsolveSpecialsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
3753
|
-
EsolveSpecialsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.
|
|
3754
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
3801
|
+
EsolveSpecialsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: EsolveSpecialsService, deps: [{ token: ESOLVE_CONNECT_CONFIG }, { token: i1$2.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
3802
|
+
EsolveSpecialsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: EsolveSpecialsService, providedIn: 'root' });
|
|
3803
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: EsolveSpecialsService, decorators: [{
|
|
3755
3804
|
type: Injectable,
|
|
3756
3805
|
args: [{
|
|
3757
3806
|
providedIn: 'root'
|
|
@@ -3796,7 +3845,7 @@ class EsolveCartItem {
|
|
|
3796
3845
|
}
|
|
3797
3846
|
|
|
3798
3847
|
class EsolveCartStockItem {
|
|
3799
|
-
constructor(code, name, sef_name, description, active, items_in_pack, delivery_category, image_name) {
|
|
3848
|
+
constructor(code, name, sef_name, description, active, items_in_pack, delivery_category, onhand, image_name) {
|
|
3800
3849
|
this.code = code;
|
|
3801
3850
|
this.name = name;
|
|
3802
3851
|
this.sef_name = sef_name;
|
|
@@ -3804,6 +3853,7 @@ class EsolveCartStockItem {
|
|
|
3804
3853
|
this.active = active;
|
|
3805
3854
|
this.items_in_pack = items_in_pack;
|
|
3806
3855
|
this.delivery_category = delivery_category;
|
|
3856
|
+
this.onhand = onhand;
|
|
3807
3857
|
this.image_name = image_name;
|
|
3808
3858
|
}
|
|
3809
3859
|
/**
|
|
@@ -4016,7 +4066,7 @@ class EsolveCartService {
|
|
|
4016
4066
|
const cart_items = [];
|
|
4017
4067
|
if (cart_item_records) {
|
|
4018
4068
|
for (const cart_item_record of cart_item_records) {
|
|
4019
|
-
const cart_stock_item = new EsolveCartStockItem(cart_item_record.code, cart_item_record.name, cart_item_record.sef_name, cart_item_record.description, cart_item_record.is_active, +cart_item_record.items_in_pack, cart_item_record.delivery_category, cart_item_record.image_name);
|
|
4069
|
+
const cart_stock_item = new EsolveCartStockItem(cart_item_record.code, cart_item_record.name, cart_item_record.sef_name, cart_item_record.description, cart_item_record.is_active, +cart_item_record.items_in_pack, cart_item_record.delivery_category, +cart_item_record.onhand, cart_item_record.image_name);
|
|
4020
4070
|
cart_items.push(new EsolveCartItem(+cart_item_record.id, cart_stock_item, +cart_item_record.qty, cart_item_record.type, +cart_item_record.price, +cart_item_record.discount, +cart_item_record.discount_interval, cart_item_record.vat_rate, cart_item_record.allow_quotes, cart_item_record.allow_orders, cart_item_record.must_collect, cart_item_record.requested_assembly, +cart_item_record.price_incl, +cart_item_record.discount_price, +cart_item_record.discount_price_incl, +cart_item_record.discount_total, +cart_item_record.vat_total, +cart_item_record.line_total, +cart_item_record.line_total_incl));
|
|
4021
4071
|
}
|
|
4022
4072
|
}
|
|
@@ -4033,9 +4083,9 @@ class EsolveCartService {
|
|
|
4033
4083
|
return cart_totals;
|
|
4034
4084
|
}
|
|
4035
4085
|
}
|
|
4036
|
-
EsolveCartService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
4037
|
-
EsolveCartService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.
|
|
4038
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
4086
|
+
EsolveCartService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: EsolveCartService, deps: [{ token: ESOLVE_CONNECT_CONFIG }, { token: i1$2.HttpClient }, { token: EsolveErrorHandlerService }, { token: EsolveResponseHandlerService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
4087
|
+
EsolveCartService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: EsolveCartService, providedIn: 'root' });
|
|
4088
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: EsolveCartService, decorators: [{
|
|
4039
4089
|
type: Injectable,
|
|
4040
4090
|
args: [{
|
|
4041
4091
|
providedIn: 'root',
|
|
@@ -4047,6 +4097,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
|
|
|
4047
4097
|
}] }, { type: i1$2.HttpClient }, { type: EsolveErrorHandlerService }, { type: EsolveResponseHandlerService }];
|
|
4048
4098
|
} });
|
|
4049
4099
|
|
|
4100
|
+
// Only export the types that are accessible to the public API
|
|
4101
|
+
|
|
4050
4102
|
class EsolveBankingDetails {
|
|
4051
4103
|
constructor(bank_name, account_holder, account, account_type, swift_number, branch_code) {
|
|
4052
4104
|
this.bank_name = bank_name;
|
|
@@ -4058,6 +4110,78 @@ class EsolveBankingDetails {
|
|
|
4058
4110
|
}
|
|
4059
4111
|
}
|
|
4060
4112
|
|
|
4113
|
+
class EsolvePaymentMethod {
|
|
4114
|
+
constructor(record) {
|
|
4115
|
+
this.id = +record.id;
|
|
4116
|
+
this.location_id = +record.location_id;
|
|
4117
|
+
this.paymethod_name = record.paymethod_name;
|
|
4118
|
+
this.description = record.description;
|
|
4119
|
+
this.display_banking_details = record.display_banking_details;
|
|
4120
|
+
this.currency_code = record.currency_code;
|
|
4121
|
+
this.merchant_id = record.merchant_id;
|
|
4122
|
+
this.application_id = record.application_id;
|
|
4123
|
+
this.api_signature = record.api_signature;
|
|
4124
|
+
this.is_gateway = record.is_gateway;
|
|
4125
|
+
this.must_store_card_details = record.must_store_card_details;
|
|
4126
|
+
this.allow_budget = record.allow_budget;
|
|
4127
|
+
this.integration_type = record.integration_type;
|
|
4128
|
+
this.bank_gateway_id = record.bank_gateway_id;
|
|
4129
|
+
this.accepted_card_types = record.accepted_card_types;
|
|
4130
|
+
this.post_transactions_to_gateway = record.post_transactions_to_gateway;
|
|
4131
|
+
this.three_d_secure_url = record.three_d_secure_url;
|
|
4132
|
+
this.gateway_url = record.gateway_url;
|
|
4133
|
+
this.generate_token_url = record.generate_token_url;
|
|
4134
|
+
this.widget_url = record.widget_url;
|
|
4135
|
+
this.successful_url = record.successful_url;
|
|
4136
|
+
this.failed_url = record.failed_url;
|
|
4137
|
+
this.enable_callback = record.enable_callback;
|
|
4138
|
+
this.live = record.live;
|
|
4139
|
+
this.default_module_id = +record.default_module_id;
|
|
4140
|
+
this.service_provider = record.service_provider;
|
|
4141
|
+
this.on_account = record.on_account;
|
|
4142
|
+
this.sort_priority = +record.sort_priority;
|
|
4143
|
+
this.image_url = record.image_url;
|
|
4144
|
+
this.banking_details = new EsolveBankingDetails(record.bank_name, record.account_holder, record.account, record.account_type, record.swift_number, record.branch_code);
|
|
4145
|
+
}
|
|
4146
|
+
}
|
|
4147
|
+
|
|
4148
|
+
class EsolvePaymentResult extends EsolveResponseResult {
|
|
4149
|
+
constructor(response) {
|
|
4150
|
+
var _a;
|
|
4151
|
+
super(response);
|
|
4152
|
+
this.redirect_required = false;
|
|
4153
|
+
if (typeof response.service_provider !== 'undefined') {
|
|
4154
|
+
this.service_provider = response.service_provider;
|
|
4155
|
+
}
|
|
4156
|
+
if (typeof response.redirect_required !== 'undefined') {
|
|
4157
|
+
this.redirect_required = response.redirect_required;
|
|
4158
|
+
}
|
|
4159
|
+
this.gateway_error_message = (_a = response.gateway_error_message) !== null && _a !== void 0 ? _a : '';
|
|
4160
|
+
// Check if redirect settings need to be set
|
|
4161
|
+
if (this.redirect_required && this.service_provider) {
|
|
4162
|
+
if (typeof response.redirect_url !== 'undefined') {
|
|
4163
|
+
this.redirect_url = response.redirect_url;
|
|
4164
|
+
}
|
|
4165
|
+
// Check integration specific settings
|
|
4166
|
+
if (this.service_provider === 'snapscan') {
|
|
4167
|
+
// QR code scan is required
|
|
4168
|
+
if (typeof response.qr_code_url !== 'undefined') {
|
|
4169
|
+
this.qr_code_url = response.qr_code_url;
|
|
4170
|
+
}
|
|
4171
|
+
}
|
|
4172
|
+
else {
|
|
4173
|
+
// Normal form posting redirect
|
|
4174
|
+
if (typeof response.form_inputs !== 'undefined') {
|
|
4175
|
+
this.form_inputs = response.form_inputs;
|
|
4176
|
+
}
|
|
4177
|
+
if (typeof response.form_enctype !== 'undefined') {
|
|
4178
|
+
this.form_enctype = response.form_enctype;
|
|
4179
|
+
}
|
|
4180
|
+
}
|
|
4181
|
+
}
|
|
4182
|
+
}
|
|
4183
|
+
}
|
|
4184
|
+
|
|
4061
4185
|
class EsolveVaultItemResult extends EsolveResponseResult {
|
|
4062
4186
|
constructor(response) {
|
|
4063
4187
|
super(response);
|
|
@@ -4097,62 +4221,6 @@ class EsolveVaultItem {
|
|
|
4097
4221
|
}
|
|
4098
4222
|
}
|
|
4099
4223
|
|
|
4100
|
-
class EsolvePaymentResult extends EsolveResponseResult {
|
|
4101
|
-
constructor(response) {
|
|
4102
|
-
super(response);
|
|
4103
|
-
if (typeof response.gateway_error_message !== 'undefined') {
|
|
4104
|
-
this.gateway_error_message = response.gateway_error_message;
|
|
4105
|
-
}
|
|
4106
|
-
if (typeof response.three_d_secure !== 'undefined') {
|
|
4107
|
-
this.three_d_secure = response.three_d_secure;
|
|
4108
|
-
}
|
|
4109
|
-
if (typeof response.redirect_url !== 'undefined') {
|
|
4110
|
-
this.redirect_url = response.redirect_url;
|
|
4111
|
-
}
|
|
4112
|
-
if (typeof response.form_inputs !== 'undefined') {
|
|
4113
|
-
this.form_inputs = response.form_inputs;
|
|
4114
|
-
}
|
|
4115
|
-
if (typeof response.form_html !== 'undefined') {
|
|
4116
|
-
this.form_html = response.form_html;
|
|
4117
|
-
}
|
|
4118
|
-
}
|
|
4119
|
-
}
|
|
4120
|
-
|
|
4121
|
-
class EsolvePaymentMethod {
|
|
4122
|
-
constructor(record) {
|
|
4123
|
-
this.id = +record.id;
|
|
4124
|
-
this.location_id = +record.location_id;
|
|
4125
|
-
this.paymethod_name = record.paymethod_name;
|
|
4126
|
-
this.description = record.description;
|
|
4127
|
-
this.display_banking_details = record.display_banking_details;
|
|
4128
|
-
this.currency_code = record.currency_code;
|
|
4129
|
-
this.merchant_id = record.merchant_id;
|
|
4130
|
-
this.application_id = record.application_id;
|
|
4131
|
-
this.api_signature = record.api_signature;
|
|
4132
|
-
this.is_gateway = record.is_gateway;
|
|
4133
|
-
this.must_store_card_details = record.must_store_card_details;
|
|
4134
|
-
this.allow_budget = record.allow_budget;
|
|
4135
|
-
this.integration_type = record.integration_type;
|
|
4136
|
-
this.bank_gateway_id = record.bank_gateway_id;
|
|
4137
|
-
this.accepted_card_types = record.accepted_card_types;
|
|
4138
|
-
this.post_transactions_to_gateway = record.post_transactions_to_gateway;
|
|
4139
|
-
this.three_d_secure_url = record.three_d_secure_url;
|
|
4140
|
-
this.gateway_url = record.gateway_url;
|
|
4141
|
-
this.generate_token_url = record.generate_token_url;
|
|
4142
|
-
this.widget_url = record.widget_url;
|
|
4143
|
-
this.successful_url = record.successful_url;
|
|
4144
|
-
this.failed_url = record.failed_url;
|
|
4145
|
-
this.enable_callback = record.enable_callback;
|
|
4146
|
-
this.live = record.live;
|
|
4147
|
-
this.default_module_id = +record.default_module_id;
|
|
4148
|
-
this.service_provider = record.service_provider;
|
|
4149
|
-
this.on_account = record.on_account;
|
|
4150
|
-
this.sort_priority = +record.sort_priority;
|
|
4151
|
-
this.image_url = record.image_url;
|
|
4152
|
-
this.banking_details = new EsolveBankingDetails(record.bank_name, record.account_holder, record.account, record.account_type, record.swift_number, record.branch_code);
|
|
4153
|
-
}
|
|
4154
|
-
}
|
|
4155
|
-
|
|
4156
4224
|
class EsolvePaymentService {
|
|
4157
4225
|
constructor(config, http, errorHandler, responseHandler) {
|
|
4158
4226
|
this.config = config;
|
|
@@ -4162,7 +4230,9 @@ class EsolvePaymentService {
|
|
|
4162
4230
|
}
|
|
4163
4231
|
/**
|
|
4164
4232
|
* Retrieves a list of payment methods.
|
|
4233
|
+
*
|
|
4165
4234
|
* @param options Filter options
|
|
4235
|
+
*
|
|
4166
4236
|
* @returns An `Observable` with an array of payment methods
|
|
4167
4237
|
*/
|
|
4168
4238
|
getPaymentMethods(options) {
|
|
@@ -4175,9 +4245,28 @@ class EsolvePaymentService {
|
|
|
4175
4245
|
return this.processPaymentMethods(response.records);
|
|
4176
4246
|
}));
|
|
4177
4247
|
}
|
|
4248
|
+
/**
|
|
4249
|
+
* Retrieve the payment status of the specified transaction
|
|
4250
|
+
*
|
|
4251
|
+
* @param transaction_id ID of the transaction
|
|
4252
|
+
*
|
|
4253
|
+
* @returns An `Observable` with the success status of the payment
|
|
4254
|
+
*/
|
|
4255
|
+
getPaymentStatus(transaction_id) {
|
|
4256
|
+
return this.http
|
|
4257
|
+
.get(`${this.config.api_url}/get-payment-status.php`, { params: { cart_id: transaction_id } })
|
|
4258
|
+
.pipe(map((response) => {
|
|
4259
|
+
if (response.records === undefined) {
|
|
4260
|
+
throw response;
|
|
4261
|
+
}
|
|
4262
|
+
return response.records.success;
|
|
4263
|
+
}));
|
|
4264
|
+
}
|
|
4178
4265
|
/**
|
|
4179
4266
|
* Retrieves a list of saved cards from the vault.
|
|
4267
|
+
*
|
|
4180
4268
|
* @param payment_methods_id eSolve ID of a payment method
|
|
4269
|
+
*
|
|
4181
4270
|
* @returns An `Observable` with an array of saved bank cards
|
|
4182
4271
|
*/
|
|
4183
4272
|
getVault(payment_methods_id) {
|
|
@@ -4196,8 +4285,10 @@ class EsolvePaymentService {
|
|
|
4196
4285
|
}
|
|
4197
4286
|
/**
|
|
4198
4287
|
* Sets a new card in the vault OR updates an existing one.
|
|
4288
|
+
*
|
|
4199
4289
|
* @param payment_methods_id Selected payment method
|
|
4200
4290
|
* @param card_data Information of bank card
|
|
4291
|
+
*
|
|
4201
4292
|
* @returns An `Observable` with the result of the vault set.
|
|
4202
4293
|
*/
|
|
4203
4294
|
setVaultItem(payment_methods_id, card_data) {
|
|
@@ -4222,6 +4313,13 @@ class EsolvePaymentService {
|
|
|
4222
4313
|
return this.errorHandler.handleHttpPostError('set-vault', errorRes);
|
|
4223
4314
|
}));
|
|
4224
4315
|
}
|
|
4316
|
+
/**
|
|
4317
|
+
* Delete a card in the vault
|
|
4318
|
+
*
|
|
4319
|
+
* @param id ID of the vault item
|
|
4320
|
+
*
|
|
4321
|
+
* @returns An `Observable` with the result of the vault delete.
|
|
4322
|
+
*/
|
|
4225
4323
|
deleteVaultItem(id) {
|
|
4226
4324
|
return this.http
|
|
4227
4325
|
.delete(`${this.config.api_url}/delete-vault.php`, {
|
|
@@ -4247,25 +4345,28 @@ class EsolvePaymentService {
|
|
|
4247
4345
|
* @param transaction_id eSolve ID to the transaction
|
|
4248
4346
|
* @param payment_methods_id eSolve ID to the selected payment method
|
|
4249
4347
|
* @param card ID of selected card from the vault or information to a brand new card
|
|
4348
|
+
*
|
|
4250
4349
|
* @returns An `Observable` with the result of the payment
|
|
4251
4350
|
*/
|
|
4252
4351
|
setPayment(transaction_id, payment_methods_id, card) {
|
|
4253
4352
|
const body = {
|
|
4254
4353
|
payment: {
|
|
4255
4354
|
cart_id: transaction_id,
|
|
4256
|
-
payment_methods_id
|
|
4355
|
+
payment_methods_id,
|
|
4257
4356
|
},
|
|
4258
4357
|
};
|
|
4259
|
-
if (
|
|
4260
|
-
|
|
4261
|
-
|
|
4262
|
-
|
|
4263
|
-
|
|
4264
|
-
|
|
4265
|
-
|
|
4266
|
-
|
|
4267
|
-
|
|
4268
|
-
|
|
4358
|
+
if (card) {
|
|
4359
|
+
if (typeof card === 'number') {
|
|
4360
|
+
body.payment.user_vault_id = card;
|
|
4361
|
+
}
|
|
4362
|
+
else {
|
|
4363
|
+
body.card = {
|
|
4364
|
+
card_number: card.card_number,
|
|
4365
|
+
card_name: card.name,
|
|
4366
|
+
card_cvv: card.cvv,
|
|
4367
|
+
card_expiry: this.generateExpiry(card),
|
|
4368
|
+
};
|
|
4369
|
+
}
|
|
4269
4370
|
}
|
|
4270
4371
|
return this.http
|
|
4271
4372
|
.post(`${this.config.api_url}/set-payment.php`, body, {
|
|
@@ -4281,7 +4382,9 @@ class EsolvePaymentService {
|
|
|
4281
4382
|
}
|
|
4282
4383
|
/**
|
|
4283
4384
|
* Processes the eSolve payment method records.
|
|
4385
|
+
*
|
|
4284
4386
|
* @param records Records to process
|
|
4387
|
+
*
|
|
4285
4388
|
* @returns An array of processed payment methods.
|
|
4286
4389
|
*/
|
|
4287
4390
|
processPaymentMethods(records) {
|
|
@@ -4296,7 +4399,9 @@ class EsolvePaymentService {
|
|
|
4296
4399
|
}
|
|
4297
4400
|
/**
|
|
4298
4401
|
* Processes the eSolve vault records.
|
|
4402
|
+
*
|
|
4299
4403
|
* @param records Records to process
|
|
4404
|
+
*
|
|
4300
4405
|
* @returns An array of processed vault items (a.k.a. cards)
|
|
4301
4406
|
*/
|
|
4302
4407
|
processVaultItems(records) {
|
|
@@ -4309,15 +4414,22 @@ class EsolvePaymentService {
|
|
|
4309
4414
|
}
|
|
4310
4415
|
return vault;
|
|
4311
4416
|
}
|
|
4417
|
+
/**
|
|
4418
|
+
* Generate a concatenated string with the expiry month and year
|
|
4419
|
+
*
|
|
4420
|
+
* @param card_data Credit card data
|
|
4421
|
+
*
|
|
4422
|
+
* @returns Expiry string
|
|
4423
|
+
*/
|
|
4312
4424
|
generateExpiry(card_data) {
|
|
4313
4425
|
const month_string = card_data.expiry_month.padStart(2, '0');
|
|
4314
4426
|
const year_string = card_data.expiry_year.padStart(4, '0');
|
|
4315
4427
|
return `${month_string}${year_string}`;
|
|
4316
4428
|
}
|
|
4317
4429
|
}
|
|
4318
|
-
EsolvePaymentService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
4319
|
-
EsolvePaymentService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.
|
|
4320
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
4430
|
+
EsolvePaymentService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: EsolvePaymentService, deps: [{ token: ESOLVE_CONNECT_CONFIG }, { token: i1$2.HttpClient }, { token: EsolveErrorHandlerService }, { token: EsolveResponseHandlerService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
4431
|
+
EsolvePaymentService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: EsolvePaymentService, providedIn: 'root' });
|
|
4432
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: EsolvePaymentService, decorators: [{
|
|
4321
4433
|
type: Injectable,
|
|
4322
4434
|
args: [{
|
|
4323
4435
|
providedIn: 'root',
|
|
@@ -4479,9 +4591,9 @@ class EsolveShippingService {
|
|
|
4479
4591
|
return shipping_cost;
|
|
4480
4592
|
}
|
|
4481
4593
|
}
|
|
4482
|
-
EsolveShippingService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
4483
|
-
EsolveShippingService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.
|
|
4484
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
4594
|
+
EsolveShippingService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: EsolveShippingService, deps: [{ token: ESOLVE_CONNECT_CONFIG }, { token: i1$2.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
4595
|
+
EsolveShippingService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: EsolveShippingService, providedIn: 'root' });
|
|
4596
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: EsolveShippingService, decorators: [{
|
|
4485
4597
|
type: Injectable,
|
|
4486
4598
|
args: [{
|
|
4487
4599
|
providedIn: 'root',
|
|
@@ -4522,9 +4634,9 @@ class EsolveEnquiryService {
|
|
|
4522
4634
|
}));
|
|
4523
4635
|
}
|
|
4524
4636
|
}
|
|
4525
|
-
EsolveEnquiryService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.
|
|
4526
|
-
EsolveEnquiryService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.
|
|
4527
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.
|
|
4637
|
+
EsolveEnquiryService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: EsolveEnquiryService, deps: [{ token: ESOLVE_CONNECT_CONFIG }, { token: i1$2.HttpClient }, { token: EsolveErrorHandlerService }, { token: EsolveResponseHandlerService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
4638
|
+
EsolveEnquiryService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: EsolveEnquiryService, providedIn: 'root' });
|
|
4639
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: EsolveEnquiryService, decorators: [{
|
|
4528
4640
|
type: Injectable,
|
|
4529
4641
|
args: [{
|
|
4530
4642
|
providedIn: 'root',
|