@esolve/ng-esolve-connect 0.46.3 → 0.47.1
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/esm2022/index.mjs +3 -1
- package/esm2022/lib/account/esolve-account.service.mjs +12 -17
- package/esm2022/lib/auth/esolve-auth-interceptor.service.mjs +9 -11
- package/esm2022/lib/auth/esolve-auth.service.mjs +11 -15
- package/esm2022/lib/banners/esolve-banner.service.mjs +9 -11
- package/esm2022/lib/cart/classes/esolve-cart-totals.model.mjs +11 -3
- package/esm2022/lib/cart/esolve-cart.service.mjs +29 -22
- package/esm2022/lib/cart/interfaces/esolve-cart-totals-record.interface.mjs +1 -1
- package/esm2022/lib/cart/interfaces/esolve-checkout-body.interface.mjs +2 -0
- package/esm2022/lib/cart/interfaces/index.mjs +2 -1
- package/esm2022/lib/category-tree/esolve-category-tree.service.mjs +9 -11
- package/esm2022/lib/core/esolve-config.service.mjs +8 -4
- package/esm2022/lib/core/esolve-connect-config.interface.mjs +1 -1
- package/esm2022/lib/coupons/esolve-coupons.service.mjs +21 -28
- package/esm2022/lib/enquiry/esolve-enquiry.service.mjs +11 -15
- package/esm2022/lib/images/directives/cdn-src.directive.mjs +9 -10
- package/esm2022/lib/locations/esolve-locations.service.mjs +9 -11
- package/esm2022/lib/manufacturers/esolve-manufacturers.service.mjs +9 -11
- package/esm2022/lib/menu/esolve-menu.service.mjs +9 -11
- package/esm2022/lib/news/esolve-news.service.mjs +9 -11
- package/esm2022/lib/ng-esolve-connect.module.mjs +4 -4
- package/esm2022/lib/payment/esolve-payment.service.mjs +11 -15
- package/esm2022/lib/ranges/esolve-ranges.service.mjs +9 -11
- package/esm2022/lib/session/esolve-session-metadata.service.mjs +11 -15
- package/esm2022/lib/session/esolve-session.service.mjs +3 -3
- package/esm2022/lib/shared/assets/esolve-assets.service.mjs +9 -11
- package/esm2022/lib/shared/cookie/esolve-cookie.service.mjs +3 -3
- package/esm2022/lib/shared/errors/esolve-error-handler.service.mjs +3 -3
- package/esm2022/lib/shared/geocoder/esolve-geocoder.service.mjs +9 -11
- package/esm2022/lib/shared/response/esolve-response-handler.service.mjs +3 -3
- package/esm2022/lib/shared/seo/esolve-seo.service.mjs +9 -11
- package/esm2022/lib/shipping/esolve-shipping.service.mjs +9 -11
- package/esm2022/lib/specials/esolve-specials.service.mjs +9 -11
- package/esm2022/lib/stock/esolve-stock.service.mjs +9 -11
- package/esm2022/lib/suppliers/esolve-suppliers.service.mjs +9 -11
- package/esm2022/lib/tags/esolve-tags.service.mjs +9 -11
- package/esm2022/lib/topics/esolve-topic.service.mjs +9 -11
- package/esm2022/lib/transactions/esolve-transactions.service.mjs +11 -15
- package/esm2022/lib/vouchers/classes/esolve-voucher.model.mjs +18 -0
- package/esm2022/lib/vouchers/classes/index.mjs +2 -0
- package/esm2022/lib/vouchers/esolve-vouchers.service.mjs +221 -0
- package/esm2022/lib/vouchers/index.mjs +9 -0
- package/esm2022/lib/vouchers/interfaces/esolve-voucher-record.interface.mjs +2 -0
- package/esm2022/lib/vouchers/interfaces/esolve-voucher-validation-error.interface.mjs +2 -0
- package/esm2022/lib/vouchers/interfaces/esolve-voucher-validation-result.interface.mjs +2 -0
- package/esm2022/lib/vouchers/interfaces/esolve-voucher-validation.interface.mjs +2 -0
- package/esm2022/lib/vouchers/interfaces/index.mjs +5 -0
- package/esm2022/lib/vouchers/types/esolve-vouchers-cache.type.mjs +2 -0
- package/esm2022/lib/vouchers/types/index.mjs +2 -0
- package/esm2022/lib/wishlist/esolve-wishlist.service.mjs +11 -15
- package/esm2022/media/lib/components/media-layout/esolve-media-layout.component.mjs +3 -3
- package/esm2022/media/lib/components/media-section/esolve-media-section.component.mjs +3 -3
- package/esm2022/media/lib/ng-esolve-connect-media.module.mjs +4 -4
- package/esm2022/media/lib/services/esolve-media-layout.service.mjs +3 -3
- package/esm2022/media/lib/services/esolve-media.service.mjs +3 -3
- package/esm2022/notifications/lib/services/esolve-notifications.service.mjs +10 -14
- package/esm2022/survey/lib/services/esolve-survey.service.mjs +12 -17
- package/fesm2022/esolve-ng-esolve-connect-media.mjs +16 -16
- package/fesm2022/esolve-ng-esolve-connect-notifications.mjs +10 -14
- package/fesm2022/esolve-ng-esolve-connect-notifications.mjs.map +1 -1
- package/fesm2022/esolve-ng-esolve-connect-survey.mjs +12 -17
- package/fesm2022/esolve-ng-esolve-connect-survey.mjs.map +1 -1
- package/fesm2022/esolve-ng-esolve-connect.mjs +505 -255
- package/fesm2022/esolve-ng-esolve-connect.mjs.map +1 -1
- package/index.d.ts +1 -0
- package/lib/account/esolve-account.service.d.ts +6 -11
- package/lib/auth/esolve-auth-interceptor.service.d.ts +2 -5
- package/lib/auth/esolve-auth.service.d.ts +5 -9
- package/lib/banners/esolve-banner.service.d.ts +2 -5
- package/lib/cart/classes/esolve-cart-totals.model.d.ts +9 -1
- package/lib/cart/esolve-cart.service.d.ts +7 -12
- package/lib/cart/interfaces/esolve-cart-totals-record.interface.d.ts +2 -0
- package/lib/cart/interfaces/esolve-checkout-body.interface.d.ts +13 -0
- package/lib/cart/interfaces/index.d.ts +1 -0
- package/lib/category-tree/esolve-category-tree.service.d.ts +2 -5
- package/lib/core/esolve-config.service.d.ts +1 -0
- package/lib/core/esolve-connect-config.interface.d.ts +4 -0
- package/lib/coupons/esolve-coupons.service.d.ts +6 -10
- package/lib/enquiry/esolve-enquiry.service.d.ts +4 -9
- package/lib/images/directives/cdn-src.directive.d.ts +4 -5
- package/lib/locations/esolve-locations.service.d.ts +2 -5
- package/lib/manufacturers/esolve-manufacturers.service.d.ts +2 -5
- package/lib/menu/esolve-menu.service.d.ts +2 -5
- package/lib/news/esolve-news.service.d.ts +2 -5
- package/lib/payment/esolve-payment.service.d.ts +4 -9
- package/lib/ranges/esolve-ranges.service.d.ts +2 -5
- package/lib/session/esolve-session-metadata.service.d.ts +5 -9
- package/lib/shared/assets/esolve-assets.service.d.ts +2 -5
- package/lib/shared/geocoder/esolve-geocoder.service.d.ts +2 -5
- package/lib/shared/seo/esolve-seo.service.d.ts +5 -7
- package/lib/shipping/esolve-shipping.service.d.ts +2 -5
- package/lib/specials/esolve-specials.service.d.ts +2 -5
- package/lib/stock/esolve-stock.service.d.ts +2 -5
- package/lib/suppliers/esolve-suppliers.service.d.ts +2 -5
- package/lib/tags/esolve-tags.service.d.ts +2 -5
- package/lib/topics/esolve-topic.service.d.ts +2 -5
- package/lib/transactions/esolve-transactions.service.d.ts +5 -9
- package/lib/vouchers/classes/esolve-voucher.model.d.ts +11 -0
- package/lib/vouchers/classes/index.d.ts +1 -0
- package/lib/vouchers/esolve-vouchers.service.d.ts +36 -0
- package/lib/vouchers/index.d.ts +4 -0
- package/lib/vouchers/interfaces/esolve-voucher-record.interface.d.ts +6 -0
- package/lib/vouchers/interfaces/esolve-voucher-validation-error.interface.d.ts +4 -0
- package/lib/vouchers/interfaces/esolve-voucher-validation-result.interface.d.ts +4 -0
- package/lib/vouchers/interfaces/esolve-voucher-validation.interface.d.ts +6 -0
- package/lib/vouchers/interfaces/index.d.ts +4 -0
- package/lib/vouchers/types/esolve-vouchers-cache.type.d.ts +1 -0
- package/lib/vouchers/types/index.d.ts +1 -0
- package/lib/wishlist/esolve-wishlist.service.d.ts +4 -9
- package/notifications/lib/services/esolve-notifications.service.d.ts +2 -5
- package/package.json +1 -1
- package/survey/lib/services/esolve-survey.service.d.ts +4 -7
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import { isPlatformBrowser, CommonModule, IMAGE_LOADER, DOCUMENT } from '@angular/common';
|
|
2
|
-
import
|
|
3
|
-
import { HttpErrorResponse, HttpParams, HttpHeaders, HTTP_INTERCEPTORS, provideHttpClient, withInterceptorsFromDi, HttpClientModule } from '@angular/common/http';
|
|
2
|
+
import { HttpErrorResponse, HttpClient, HttpParams, HttpHeaders, HTTP_INTERCEPTORS, provideHttpClient, withInterceptorsFromDi, HttpClientModule } from '@angular/common/http';
|
|
4
3
|
import * as i0 from '@angular/core';
|
|
5
|
-
import { InjectionToken, inject, Injectable, PLATFORM_ID, APP_INITIALIZER, NgModule, Directive, Input, HostListener
|
|
4
|
+
import { InjectionToken, inject, Injectable, PLATFORM_ID, APP_INITIALIZER, NgModule, ElementRef, Directive, Input, HostListener } from '@angular/core';
|
|
6
5
|
import * as i1 from 'ngx-cookie-service-ssr';
|
|
7
6
|
import { SsrCookieService } from 'ngx-cookie-service-ssr';
|
|
8
7
|
import { throwError, BehaviorSubject, Subject, map, switchMap, timer, takeUntil, combineLatest, debounceTime, shareReplay, filter, distinctUntilChanged, of, firstValueFrom, iif } from 'rxjs';
|
|
9
8
|
import { map as map$1, catchError, switchMap as switchMap$1, tap } from 'rxjs/operators';
|
|
10
9
|
import { fromUnixTime } from 'date-fns';
|
|
11
|
-
import
|
|
10
|
+
import { Title, Meta } from '@angular/platform-browser';
|
|
12
11
|
|
|
13
12
|
const ESOLVE_CONNECT_CONFIG = new InjectionToken('esolve.connect.config');
|
|
14
13
|
|
|
@@ -20,6 +19,7 @@ class EsolveConfigService {
|
|
|
20
19
|
this.title_separator = '|';
|
|
21
20
|
this.session_storage_key = '_ng_eslv_token';
|
|
22
21
|
this.coupon_storage_key = '_ng_eslv_coupons';
|
|
22
|
+
this.voucher_storage_key = '_ng_eslv_vouchers';
|
|
23
23
|
this.device_designation = 'web';
|
|
24
24
|
const config = inject(ESOLVE_CONNECT_CONFIG);
|
|
25
25
|
if (config.api_url === '' || config.wsid === '') {
|
|
@@ -43,6 +43,9 @@ class EsolveConfigService {
|
|
|
43
43
|
if (config.coupon_storage_key) {
|
|
44
44
|
this.coupon_storage_key = config.coupon_storage_key;
|
|
45
45
|
}
|
|
46
|
+
if (config.voucher_storage_key) {
|
|
47
|
+
this.voucher_storage_key = config.voucher_storage_key;
|
|
48
|
+
}
|
|
46
49
|
if (this.native && config.device_designation) {
|
|
47
50
|
this.device_designation = config.device_designation;
|
|
48
51
|
}
|
|
@@ -53,10 +56,10 @@ class EsolveConfigService {
|
|
|
53
56
|
}
|
|
54
57
|
this.error_image_path = config.error_image_path;
|
|
55
58
|
}
|
|
56
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.
|
|
57
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.
|
|
59
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: EsolveConfigService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
60
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: EsolveConfigService, providedIn: 'root' }); }
|
|
58
61
|
}
|
|
59
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.
|
|
62
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: EsolveConfigService, decorators: [{
|
|
60
63
|
type: Injectable,
|
|
61
64
|
args: [{
|
|
62
65
|
providedIn: 'root',
|
|
@@ -157,10 +160,10 @@ class EsolveErrorHandlerService {
|
|
|
157
160
|
parseDeleteError(result) {
|
|
158
161
|
return new EsolveHttpError('error', result.code, result.message);
|
|
159
162
|
}
|
|
160
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.
|
|
161
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.
|
|
163
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: EsolveErrorHandlerService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
164
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: EsolveErrorHandlerService, providedIn: 'root' }); }
|
|
162
165
|
}
|
|
163
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.
|
|
166
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: EsolveErrorHandlerService, decorators: [{
|
|
164
167
|
type: Injectable,
|
|
165
168
|
args: [{
|
|
166
169
|
providedIn: 'root',
|
|
@@ -183,10 +186,10 @@ class EsolveCookieService {
|
|
|
183
186
|
delete(name, path, domain, secure) {
|
|
184
187
|
this.cookieService.delete(name, path, domain, secure);
|
|
185
188
|
}
|
|
186
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.
|
|
187
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.
|
|
189
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: EsolveCookieService, deps: [{ token: i1.SsrCookieService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
190
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: EsolveCookieService, providedIn: 'root' }); }
|
|
188
191
|
}
|
|
189
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.
|
|
192
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: EsolveCookieService, decorators: [{
|
|
190
193
|
type: Injectable,
|
|
191
194
|
args: [{
|
|
192
195
|
providedIn: 'root',
|
|
@@ -379,10 +382,10 @@ class EsolveSessionService {
|
|
|
379
382
|
}
|
|
380
383
|
localStorage.removeItem(this.storage_key);
|
|
381
384
|
}
|
|
382
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.
|
|
383
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.
|
|
385
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: EsolveSessionService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
386
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: EsolveSessionService, providedIn: 'root' }); }
|
|
384
387
|
}
|
|
385
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.
|
|
388
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: EsolveSessionService, decorators: [{
|
|
386
389
|
type: Injectable,
|
|
387
390
|
args: [{
|
|
388
391
|
providedIn: 'root',
|
|
@@ -427,10 +430,10 @@ class EsolveResponseHandlerService {
|
|
|
427
430
|
}
|
|
428
431
|
return resultHandler(response);
|
|
429
432
|
}
|
|
430
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.
|
|
431
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.
|
|
433
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: EsolveResponseHandlerService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
434
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: EsolveResponseHandlerService, providedIn: 'root' }); }
|
|
432
435
|
}
|
|
433
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.
|
|
436
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: EsolveResponseHandlerService, decorators: [{
|
|
434
437
|
type: Injectable,
|
|
435
438
|
args: [{
|
|
436
439
|
providedIn: 'root',
|
|
@@ -438,11 +441,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.6", ngImpor
|
|
|
438
441
|
}] });
|
|
439
442
|
|
|
440
443
|
class EsolveSessionMetadataService {
|
|
441
|
-
constructor(
|
|
442
|
-
this.config =
|
|
443
|
-
this.http =
|
|
444
|
-
this.errorHandler =
|
|
445
|
-
this.responseHandler =
|
|
444
|
+
constructor() {
|
|
445
|
+
this.config = inject(EsolveConfigService);
|
|
446
|
+
this.http = inject(HttpClient);
|
|
447
|
+
this.errorHandler = inject(EsolveErrorHandlerService);
|
|
448
|
+
this.responseHandler = inject(EsolveResponseHandlerService);
|
|
446
449
|
}
|
|
447
450
|
set(type, metadata) {
|
|
448
451
|
return this.http
|
|
@@ -490,22 +493,22 @@ class EsolveSessionMetadataService {
|
|
|
490
493
|
return this.errorHandler.handleHttpDeleteError('delete-sessions-metadata', errorRes);
|
|
491
494
|
}));
|
|
492
495
|
}
|
|
493
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.
|
|
494
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.
|
|
496
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: EsolveSessionMetadataService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
497
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: EsolveSessionMetadataService, providedIn: 'root' }); }
|
|
495
498
|
}
|
|
496
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.
|
|
499
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: EsolveSessionMetadataService, decorators: [{
|
|
497
500
|
type: Injectable,
|
|
498
501
|
args: [{
|
|
499
502
|
providedIn: 'root',
|
|
500
503
|
}]
|
|
501
|
-
}]
|
|
504
|
+
}] });
|
|
502
505
|
|
|
503
506
|
class EsolveAuthService {
|
|
504
|
-
constructor(
|
|
505
|
-
this.config =
|
|
506
|
-
this.http =
|
|
507
|
-
this.session =
|
|
508
|
-
this.errorHandler =
|
|
507
|
+
constructor() {
|
|
508
|
+
this.config = inject(EsolveConfigService);
|
|
509
|
+
this.http = inject(HttpClient);
|
|
510
|
+
this.session = inject(EsolveSessionService);
|
|
511
|
+
this.errorHandler = inject(EsolveErrorHandlerService);
|
|
509
512
|
this.session
|
|
510
513
|
.onSessionEnd()
|
|
511
514
|
.pipe(switchMap$1(() => this.checkAccessToken()), catchError(() => of(null)))
|
|
@@ -713,20 +716,20 @@ class EsolveAuthService {
|
|
|
713
716
|
}
|
|
714
717
|
return throwError(() => error);
|
|
715
718
|
}
|
|
716
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.
|
|
717
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.
|
|
719
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: EsolveAuthService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
720
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: EsolveAuthService, providedIn: 'root' }); }
|
|
718
721
|
}
|
|
719
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.
|
|
722
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: EsolveAuthService, decorators: [{
|
|
720
723
|
type: Injectable,
|
|
721
724
|
args: [{
|
|
722
725
|
providedIn: 'root',
|
|
723
726
|
}]
|
|
724
|
-
}], ctorParameters: function () { return [
|
|
727
|
+
}], ctorParameters: function () { return []; } });
|
|
725
728
|
|
|
726
729
|
class EsolveAuthInterceptorService {
|
|
727
|
-
constructor(
|
|
728
|
-
this.config =
|
|
729
|
-
this.session =
|
|
730
|
+
constructor() {
|
|
731
|
+
this.config = inject(EsolveConfigService);
|
|
732
|
+
this.session = inject(EsolveSessionService);
|
|
730
733
|
}
|
|
731
734
|
intercept(req, next) {
|
|
732
735
|
if (req.url.startsWith(`${this.config.api_url}/`)) {
|
|
@@ -754,12 +757,12 @@ class EsolveAuthInterceptorService {
|
|
|
754
757
|
}
|
|
755
758
|
return next.handle(req);
|
|
756
759
|
}
|
|
757
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.
|
|
758
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.
|
|
760
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: EsolveAuthInterceptorService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
761
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: EsolveAuthInterceptorService }); }
|
|
759
762
|
}
|
|
760
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.
|
|
763
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: EsolveAuthInterceptorService, decorators: [{
|
|
761
764
|
type: Injectable
|
|
762
|
-
}]
|
|
765
|
+
}] });
|
|
763
766
|
|
|
764
767
|
const ESOLVE_EURUS_AUTO_LOGIN = {
|
|
765
768
|
provide: APP_INITIALIZER,
|
|
@@ -798,11 +801,11 @@ class NgEsolveConnectModule {
|
|
|
798
801
|
providers: provideNgEsolveConnect(config, auto_login),
|
|
799
802
|
};
|
|
800
803
|
}
|
|
801
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.
|
|
802
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.
|
|
803
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.
|
|
804
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: NgEsolveConnectModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
805
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.8", ngImport: i0, type: NgEsolveConnectModule, imports: [CommonModule, HttpClientModule] }); }
|
|
806
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: NgEsolveConnectModule, imports: [CommonModule, HttpClientModule] }); }
|
|
804
807
|
}
|
|
805
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.
|
|
808
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: NgEsolveConnectModule, decorators: [{
|
|
806
809
|
type: NgModule,
|
|
807
810
|
args: [{
|
|
808
811
|
imports: [CommonModule, HttpClientModule],
|
|
@@ -876,9 +879,9 @@ function provideEsolveImageLoader() {
|
|
|
876
879
|
* An alternative to optimised images to load a new image
|
|
877
880
|
*/
|
|
878
881
|
class EsolveCdnSrcDirective {
|
|
879
|
-
constructor(
|
|
880
|
-
this.el =
|
|
881
|
-
this.config =
|
|
882
|
+
constructor() {
|
|
883
|
+
this.el = inject((ElementRef));
|
|
884
|
+
this.config = inject(EsolveConfigService);
|
|
882
885
|
this.src = '';
|
|
883
886
|
this.no_image = false;
|
|
884
887
|
this.error_image_path = '/assets/no_image.jpg';
|
|
@@ -922,16 +925,16 @@ class EsolveCdnSrcDirective {
|
|
|
922
925
|
isImage(el) {
|
|
923
926
|
return 'loading' in this.el.nativeElement;
|
|
924
927
|
}
|
|
925
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.
|
|
926
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.1.
|
|
928
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: EsolveCdnSrcDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
929
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.1.8", type: EsolveCdnSrcDirective, isStandalone: true, selector: "[eslvCdnSrc]", inputs: { src: ["eslvCdnSrc", "src"] }, host: { listeners: { "error": "onError()" } }, usesOnChanges: true, ngImport: i0 }); }
|
|
927
930
|
}
|
|
928
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.
|
|
931
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: EsolveCdnSrcDirective, decorators: [{
|
|
929
932
|
type: Directive,
|
|
930
933
|
args: [{
|
|
931
934
|
selector: '[eslvCdnSrc]',
|
|
932
935
|
standalone: true,
|
|
933
936
|
}]
|
|
934
|
-
}], ctorParameters: function () { return [
|
|
937
|
+
}], ctorParameters: function () { return []; }, propDecorators: { src: [{
|
|
935
938
|
type: Input,
|
|
936
939
|
args: ['eslvCdnSrc']
|
|
937
940
|
}], onError: [{
|
|
@@ -1166,10 +1169,10 @@ class EsolveSeoInfo {
|
|
|
1166
1169
|
}
|
|
1167
1170
|
|
|
1168
1171
|
class EsolveSeoService {
|
|
1169
|
-
constructor(
|
|
1170
|
-
this.config =
|
|
1171
|
-
this.title =
|
|
1172
|
-
this.meta =
|
|
1172
|
+
constructor() {
|
|
1173
|
+
this.config = inject(EsolveConfigService);
|
|
1174
|
+
this.title = inject(Title);
|
|
1175
|
+
this.meta = inject(Meta);
|
|
1173
1176
|
this.dom = inject(DOCUMENT);
|
|
1174
1177
|
this.title_prefix = '';
|
|
1175
1178
|
this.title_suffix = '';
|
|
@@ -1271,15 +1274,15 @@ class EsolveSeoService {
|
|
|
1271
1274
|
}
|
|
1272
1275
|
return pageSeo;
|
|
1273
1276
|
}
|
|
1274
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.
|
|
1275
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.
|
|
1277
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: EsolveSeoService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1278
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: EsolveSeoService, providedIn: 'root' }); }
|
|
1276
1279
|
}
|
|
1277
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.
|
|
1280
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: EsolveSeoService, decorators: [{
|
|
1278
1281
|
type: Injectable,
|
|
1279
1282
|
args: [{
|
|
1280
1283
|
providedIn: 'root',
|
|
1281
1284
|
}]
|
|
1282
|
-
}], ctorParameters: function () { return [
|
|
1285
|
+
}], ctorParameters: function () { return []; } });
|
|
1283
1286
|
|
|
1284
1287
|
class EsolveGeocodeAddressResult {
|
|
1285
1288
|
constructor(street_number, street, suburb, city, province, country, postal_code) {
|
|
@@ -1312,9 +1315,9 @@ class EsolveGeocodeResult {
|
|
|
1312
1315
|
}
|
|
1313
1316
|
|
|
1314
1317
|
class EsolveGeocoderService {
|
|
1315
|
-
constructor(
|
|
1316
|
-
this.config =
|
|
1317
|
-
this.http =
|
|
1318
|
+
constructor() {
|
|
1319
|
+
this.config = inject(EsolveConfigService);
|
|
1320
|
+
this.http = inject(HttpClient);
|
|
1318
1321
|
}
|
|
1319
1322
|
geocode(street_number, street, suburb, city, province, country, postal_code) {
|
|
1320
1323
|
return this.http
|
|
@@ -1361,15 +1364,15 @@ class EsolveGeocoderService {
|
|
|
1361
1364
|
const geocode_result = new EsolveGeocodeResult(record.formatted_address, geocode_address, geocode_coords, record.status, record.checksum, record.cached);
|
|
1362
1365
|
return geocode_result;
|
|
1363
1366
|
}
|
|
1364
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.
|
|
1365
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.
|
|
1367
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: EsolveGeocoderService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1368
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: EsolveGeocoderService, providedIn: 'root' }); }
|
|
1366
1369
|
}
|
|
1367
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.
|
|
1370
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: EsolveGeocoderService, decorators: [{
|
|
1368
1371
|
type: Injectable,
|
|
1369
1372
|
args: [{
|
|
1370
1373
|
providedIn: 'root',
|
|
1371
1374
|
}]
|
|
1372
|
-
}]
|
|
1375
|
+
}] });
|
|
1373
1376
|
|
|
1374
1377
|
class EsolveLinkedAsset {
|
|
1375
1378
|
constructor(record) {
|
|
@@ -1429,9 +1432,9 @@ class EsolveCategoryTreeItem {
|
|
|
1429
1432
|
}
|
|
1430
1433
|
|
|
1431
1434
|
class EsolveCategoryTreeService {
|
|
1432
|
-
constructor(
|
|
1433
|
-
this.config =
|
|
1434
|
-
this.http =
|
|
1435
|
+
constructor() {
|
|
1436
|
+
this.config = inject(EsolveConfigService);
|
|
1437
|
+
this.http = inject(HttpClient);
|
|
1435
1438
|
}
|
|
1436
1439
|
/**
|
|
1437
1440
|
* Retrieves the category tree from eSolve instance and coverts it to the correct format.
|
|
@@ -1562,15 +1565,15 @@ class EsolveCategoryTreeService {
|
|
|
1562
1565
|
}
|
|
1563
1566
|
return null;
|
|
1564
1567
|
}
|
|
1565
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.
|
|
1566
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.
|
|
1568
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: EsolveCategoryTreeService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1569
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: EsolveCategoryTreeService, providedIn: 'root' }); }
|
|
1567
1570
|
}
|
|
1568
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.
|
|
1571
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: EsolveCategoryTreeService, decorators: [{
|
|
1569
1572
|
type: Injectable,
|
|
1570
1573
|
args: [{
|
|
1571
1574
|
providedIn: 'root',
|
|
1572
1575
|
}]
|
|
1573
|
-
}]
|
|
1576
|
+
}] });
|
|
1574
1577
|
|
|
1575
1578
|
class EsolveManufacturer {
|
|
1576
1579
|
get original_image_src() {
|
|
@@ -1633,9 +1636,9 @@ class EsolveManufacturer {
|
|
|
1633
1636
|
}
|
|
1634
1637
|
|
|
1635
1638
|
class EsolveManufacturersService {
|
|
1636
|
-
constructor(
|
|
1637
|
-
this.config =
|
|
1638
|
-
this.http =
|
|
1639
|
+
constructor() {
|
|
1640
|
+
this.config = inject(EsolveConfigService);
|
|
1641
|
+
this.http = inject(HttpClient);
|
|
1639
1642
|
}
|
|
1640
1643
|
getManufacturer(id) {
|
|
1641
1644
|
const params = new HttpParams({
|
|
@@ -1684,15 +1687,15 @@ class EsolveManufacturersService {
|
|
|
1684
1687
|
processManufacturer(record) {
|
|
1685
1688
|
return new EsolveManufacturer(record);
|
|
1686
1689
|
}
|
|
1687
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.
|
|
1688
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.
|
|
1690
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: EsolveManufacturersService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1691
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: EsolveManufacturersService, providedIn: 'root' }); }
|
|
1689
1692
|
}
|
|
1690
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.
|
|
1693
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: EsolveManufacturersService, decorators: [{
|
|
1691
1694
|
type: Injectable,
|
|
1692
1695
|
args: [{
|
|
1693
1696
|
providedIn: 'root',
|
|
1694
1697
|
}]
|
|
1695
|
-
}]
|
|
1698
|
+
}] });
|
|
1696
1699
|
|
|
1697
1700
|
// Types
|
|
1698
1701
|
|
|
@@ -1750,9 +1753,9 @@ class EsolveRange {
|
|
|
1750
1753
|
}
|
|
1751
1754
|
|
|
1752
1755
|
class EsolveRangesService {
|
|
1753
|
-
constructor(
|
|
1754
|
-
this.config =
|
|
1755
|
-
this.http =
|
|
1756
|
+
constructor() {
|
|
1757
|
+
this.config = inject(EsolveConfigService);
|
|
1758
|
+
this.http = inject(HttpClient);
|
|
1756
1759
|
}
|
|
1757
1760
|
getRange(id) {
|
|
1758
1761
|
const params = new HttpParams({
|
|
@@ -1804,15 +1807,15 @@ class EsolveRangesService {
|
|
|
1804
1807
|
processRange(record) {
|
|
1805
1808
|
return new EsolveRange(record);
|
|
1806
1809
|
}
|
|
1807
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.
|
|
1808
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.
|
|
1810
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: EsolveRangesService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1811
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: EsolveRangesService, providedIn: 'root' }); }
|
|
1809
1812
|
}
|
|
1810
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.
|
|
1813
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: EsolveRangesService, decorators: [{
|
|
1811
1814
|
type: Injectable,
|
|
1812
1815
|
args: [{
|
|
1813
1816
|
providedIn: 'root',
|
|
1814
1817
|
}]
|
|
1815
|
-
}]
|
|
1818
|
+
}] });
|
|
1816
1819
|
|
|
1817
1820
|
class EsolveTag {
|
|
1818
1821
|
/**
|
|
@@ -1850,9 +1853,9 @@ class EsolveTag {
|
|
|
1850
1853
|
}
|
|
1851
1854
|
|
|
1852
1855
|
class EsolveTagsService {
|
|
1853
|
-
constructor(
|
|
1854
|
-
this.config =
|
|
1855
|
-
this.http =
|
|
1856
|
+
constructor() {
|
|
1857
|
+
this.config = inject(EsolveConfigService);
|
|
1858
|
+
this.http = inject(HttpClient);
|
|
1856
1859
|
}
|
|
1857
1860
|
/**
|
|
1858
1861
|
* Retrieves active topics from the list of topic ID's. Note that inactive or expired
|
|
@@ -1907,15 +1910,15 @@ class EsolveTagsService {
|
|
|
1907
1910
|
}
|
|
1908
1911
|
return tags;
|
|
1909
1912
|
}
|
|
1910
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.
|
|
1911
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.
|
|
1913
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: EsolveTagsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1914
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: EsolveTagsService, providedIn: 'root' }); }
|
|
1912
1915
|
}
|
|
1913
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.
|
|
1916
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: EsolveTagsService, decorators: [{
|
|
1914
1917
|
type: Injectable,
|
|
1915
1918
|
args: [{
|
|
1916
1919
|
providedIn: 'root',
|
|
1917
1920
|
}]
|
|
1918
|
-
}]
|
|
1921
|
+
}] });
|
|
1919
1922
|
|
|
1920
1923
|
// Types
|
|
1921
1924
|
|
|
@@ -1935,9 +1938,9 @@ class EsolveTopic {
|
|
|
1935
1938
|
}
|
|
1936
1939
|
|
|
1937
1940
|
class EsolveTopicService {
|
|
1938
|
-
constructor(
|
|
1939
|
-
this.config =
|
|
1940
|
-
this.http =
|
|
1941
|
+
constructor() {
|
|
1942
|
+
this.config = inject(EsolveConfigService);
|
|
1943
|
+
this.http = inject(HttpClient);
|
|
1941
1944
|
}
|
|
1942
1945
|
/**
|
|
1943
1946
|
* Retrieves active topics from the list of topic ID's. Note that inactive or expired
|
|
@@ -1969,15 +1972,15 @@ class EsolveTopicService {
|
|
|
1969
1972
|
}
|
|
1970
1973
|
return topics;
|
|
1971
1974
|
}
|
|
1972
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.
|
|
1973
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.
|
|
1975
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: EsolveTopicService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1976
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: EsolveTopicService, providedIn: 'root' }); }
|
|
1974
1977
|
}
|
|
1975
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.
|
|
1978
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: EsolveTopicService, decorators: [{
|
|
1976
1979
|
type: Injectable,
|
|
1977
1980
|
args: [{
|
|
1978
1981
|
providedIn: 'root',
|
|
1979
1982
|
}]
|
|
1980
|
-
}]
|
|
1983
|
+
}] });
|
|
1981
1984
|
|
|
1982
1985
|
class EsolveAsset {
|
|
1983
1986
|
/**
|
|
@@ -2052,9 +2055,9 @@ class EsolveAsset {
|
|
|
2052
2055
|
}
|
|
2053
2056
|
|
|
2054
2057
|
class EsolveAssetsService {
|
|
2055
|
-
constructor(
|
|
2056
|
-
this.config =
|
|
2057
|
-
this.http =
|
|
2058
|
+
constructor() {
|
|
2059
|
+
this.config = inject(EsolveConfigService);
|
|
2060
|
+
this.http = inject(HttpClient);
|
|
2058
2061
|
}
|
|
2059
2062
|
getAsset(id) {
|
|
2060
2063
|
const params = new HttpParams({ fromObject: { assets_id: id } });
|
|
@@ -2162,15 +2165,15 @@ class EsolveAssetsService {
|
|
|
2162
2165
|
const total = total_records;
|
|
2163
2166
|
return new EsolveList(assets, page, rows, total);
|
|
2164
2167
|
}
|
|
2165
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.
|
|
2166
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.
|
|
2168
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: EsolveAssetsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2169
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: EsolveAssetsService, providedIn: 'root' }); }
|
|
2167
2170
|
}
|
|
2168
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.
|
|
2171
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: EsolveAssetsService, decorators: [{
|
|
2169
2172
|
type: Injectable,
|
|
2170
2173
|
args: [{
|
|
2171
2174
|
providedIn: 'root',
|
|
2172
2175
|
}]
|
|
2173
|
-
}]
|
|
2176
|
+
}] });
|
|
2174
2177
|
|
|
2175
2178
|
// Types
|
|
2176
2179
|
|
|
@@ -2642,9 +2645,9 @@ class EsolveLocation {
|
|
|
2642
2645
|
// Classes
|
|
2643
2646
|
|
|
2644
2647
|
class EsolveLocationsService {
|
|
2645
|
-
constructor(
|
|
2646
|
-
this.config =
|
|
2647
|
-
this.http =
|
|
2648
|
+
constructor() {
|
|
2649
|
+
this.config = inject(EsolveConfigService);
|
|
2650
|
+
this.http = inject(HttpClient);
|
|
2648
2651
|
}
|
|
2649
2652
|
/**
|
|
2650
2653
|
* Retrieves a list of stock locations
|
|
@@ -2703,15 +2706,15 @@ class EsolveLocationsService {
|
|
|
2703
2706
|
}
|
|
2704
2707
|
return stock_locations;
|
|
2705
2708
|
}
|
|
2706
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.
|
|
2707
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.
|
|
2709
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: EsolveLocationsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2710
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: EsolveLocationsService, providedIn: 'root' }); }
|
|
2708
2711
|
}
|
|
2709
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.
|
|
2712
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: EsolveLocationsService, decorators: [{
|
|
2710
2713
|
type: Injectable,
|
|
2711
2714
|
args: [{
|
|
2712
2715
|
providedIn: 'root',
|
|
2713
2716
|
}]
|
|
2714
|
-
}]
|
|
2717
|
+
}] });
|
|
2715
2718
|
|
|
2716
2719
|
class EsolveTransactionLocation extends EsolveLocation {
|
|
2717
2720
|
}
|
|
@@ -2807,11 +2810,11 @@ class EsolveTransactionsService {
|
|
|
2807
2810
|
this._user_id = value;
|
|
2808
2811
|
}
|
|
2809
2812
|
}
|
|
2810
|
-
constructor(
|
|
2811
|
-
this.config =
|
|
2812
|
-
this.http =
|
|
2813
|
-
this.sessionService =
|
|
2814
|
-
this.errorHandler =
|
|
2813
|
+
constructor() {
|
|
2814
|
+
this.config = inject(EsolveConfigService);
|
|
2815
|
+
this.http = inject(HttpClient);
|
|
2816
|
+
this.sessionService = inject(EsolveSessionService);
|
|
2817
|
+
this.errorHandler = inject(EsolveErrorHandlerService);
|
|
2815
2818
|
this._user_id = 0;
|
|
2816
2819
|
this.sessionService.getSession().subscribe((session) => {
|
|
2817
2820
|
if (session.token !== '') {
|
|
@@ -2906,15 +2909,15 @@ class EsolveTransactionsService {
|
|
|
2906
2909
|
}
|
|
2907
2910
|
return transactions;
|
|
2908
2911
|
}
|
|
2909
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.
|
|
2910
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.
|
|
2912
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: EsolveTransactionsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2913
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: EsolveTransactionsService, providedIn: 'root' }); }
|
|
2911
2914
|
}
|
|
2912
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.
|
|
2915
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: EsolveTransactionsService, decorators: [{
|
|
2913
2916
|
type: Injectable,
|
|
2914
2917
|
args: [{
|
|
2915
2918
|
providedIn: 'root',
|
|
2916
2919
|
}]
|
|
2917
|
-
}], ctorParameters: function () { return [
|
|
2920
|
+
}], ctorParameters: function () { return []; } });
|
|
2918
2921
|
|
|
2919
2922
|
class EsolveEmptyCartResult extends EsolveResponseResult {
|
|
2920
2923
|
}
|
|
@@ -3013,7 +3016,10 @@ class EsolveCartTotals {
|
|
|
3013
3016
|
* Grand total of cart which includes discount and VAT (NOTE: shipping and insurance is not included)
|
|
3014
3017
|
*/
|
|
3015
3018
|
get total() {
|
|
3016
|
-
return this.sub_total +
|
|
3019
|
+
return (this.sub_total +
|
|
3020
|
+
this.vat_total -
|
|
3021
|
+
this.discount_total -
|
|
3022
|
+
this.voucher_total);
|
|
3017
3023
|
}
|
|
3018
3024
|
constructor(
|
|
3019
3025
|
/**
|
|
@@ -3035,12 +3041,17 @@ class EsolveCartTotals {
|
|
|
3035
3041
|
/**
|
|
3036
3042
|
* Total discount of all the item in the cart
|
|
3037
3043
|
*/
|
|
3038
|
-
discount_total = 0
|
|
3044
|
+
discount_total = 0,
|
|
3045
|
+
/**
|
|
3046
|
+
* Total of all vouchers used
|
|
3047
|
+
*/
|
|
3048
|
+
voucher_total = 0) {
|
|
3039
3049
|
this.records = records;
|
|
3040
3050
|
this.items = items;
|
|
3041
3051
|
this.sub_total = sub_total;
|
|
3042
3052
|
this.vat_total = vat_total;
|
|
3043
3053
|
this.discount_total = discount_total;
|
|
3054
|
+
this.voucher_total = voucher_total;
|
|
3044
3055
|
}
|
|
3045
3056
|
}
|
|
3046
3057
|
|
|
@@ -3088,18 +3099,17 @@ class EsolveCoupon {
|
|
|
3088
3099
|
}
|
|
3089
3100
|
|
|
3090
3101
|
class EsolveCouponsService {
|
|
3091
|
-
constructor(
|
|
3092
|
-
this.
|
|
3093
|
-
this.
|
|
3094
|
-
this.
|
|
3095
|
-
this.cookieService =
|
|
3102
|
+
constructor() {
|
|
3103
|
+
this.is_browser = isPlatformBrowser(inject(PLATFORM_ID));
|
|
3104
|
+
this.http = inject(HttpClient);
|
|
3105
|
+
this.config = inject(EsolveConfigService);
|
|
3106
|
+
this.cookieService = inject(EsolveCookieService);
|
|
3096
3107
|
this.storage_key = '_ng_eslv_coupons';
|
|
3097
|
-
this.
|
|
3108
|
+
this.cache = new Map();
|
|
3098
3109
|
this.applied = new BehaviorSubject(undefined);
|
|
3099
3110
|
this.validation_error = new Subject();
|
|
3100
3111
|
this.setStorageKey();
|
|
3101
|
-
this.
|
|
3102
|
-
this.is_browser = isPlatformBrowser(this.platformId);
|
|
3112
|
+
this.cache = this.retrieveCache();
|
|
3103
3113
|
}
|
|
3104
3114
|
onValidationError() {
|
|
3105
3115
|
return this.validation_error.asObservable();
|
|
@@ -3152,15 +3162,15 @@ class EsolveCouponsService {
|
|
|
3152
3162
|
}
|
|
3153
3163
|
}
|
|
3154
3164
|
removeCoupon(id) {
|
|
3155
|
-
this.
|
|
3165
|
+
this.cache.delete(id);
|
|
3156
3166
|
this.cacheCoupons();
|
|
3157
3167
|
this.applied.next();
|
|
3158
3168
|
}
|
|
3159
3169
|
getAppliedCouponKeys() {
|
|
3160
|
-
return [...this.
|
|
3170
|
+
return [...this.cache.values()];
|
|
3161
3171
|
}
|
|
3162
3172
|
getAppliedCoupons() {
|
|
3163
|
-
const coupon_ids = [...this.
|
|
3173
|
+
const coupon_ids = [...this.cache.keys()];
|
|
3164
3174
|
return this.http
|
|
3165
3175
|
.get(`${this.config.api_url}/get-applied-coupons.php`, {
|
|
3166
3176
|
params: {
|
|
@@ -3196,8 +3206,8 @@ class EsolveCouponsService {
|
|
|
3196
3206
|
return new Map();
|
|
3197
3207
|
}
|
|
3198
3208
|
cacheCoupons() {
|
|
3199
|
-
if (this.
|
|
3200
|
-
const coupons_json = this.jsonEncodeMap(this.
|
|
3209
|
+
if (this.cache.size > 0) {
|
|
3210
|
+
const coupons_json = this.jsonEncodeMap(this.cache);
|
|
3201
3211
|
this.cookieService.set(this.storage_key, coupons_json, undefined, '/');
|
|
3202
3212
|
this.setBackup(coupons_json);
|
|
3203
3213
|
}
|
|
@@ -3206,7 +3216,7 @@ class EsolveCouponsService {
|
|
|
3206
3216
|
}
|
|
3207
3217
|
}
|
|
3208
3218
|
deleteCoupons() {
|
|
3209
|
-
this.
|
|
3219
|
+
this.cache.clear();
|
|
3210
3220
|
this.cookieService.delete(this.storage_key, '/');
|
|
3211
3221
|
this.removeBackup();
|
|
3212
3222
|
}
|
|
@@ -3238,8 +3248,8 @@ class EsolveCouponsService {
|
|
|
3238
3248
|
localStorage.removeItem(this.storage_key);
|
|
3239
3249
|
}
|
|
3240
3250
|
addCoupon(id, key) {
|
|
3241
|
-
if (!this.
|
|
3242
|
-
this.
|
|
3251
|
+
if (!this.cache.has(id)) {
|
|
3252
|
+
this.cache.set(id, key);
|
|
3243
3253
|
this.cacheCoupons();
|
|
3244
3254
|
}
|
|
3245
3255
|
this.applied.next();
|
|
@@ -3290,28 +3300,258 @@ class EsolveCouponsService {
|
|
|
3290
3300
|
}
|
|
3291
3301
|
return coupons;
|
|
3292
3302
|
}
|
|
3293
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.
|
|
3294
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.
|
|
3303
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: EsolveCouponsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
3304
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: EsolveCouponsService, providedIn: 'root' }); }
|
|
3305
|
+
}
|
|
3306
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: EsolveCouponsService, decorators: [{
|
|
3307
|
+
type: Injectable,
|
|
3308
|
+
args: [{
|
|
3309
|
+
providedIn: 'root',
|
|
3310
|
+
}]
|
|
3311
|
+
}], ctorParameters: function () { return []; } });
|
|
3312
|
+
|
|
3313
|
+
// Classes
|
|
3314
|
+
|
|
3315
|
+
class EsolveVoucher {
|
|
3316
|
+
constructor(record) {
|
|
3317
|
+
this.id = 0;
|
|
3318
|
+
this.identifier = '';
|
|
3319
|
+
this.value = 0;
|
|
3320
|
+
/**
|
|
3321
|
+
* Shows either the short code or the coupon key (if short code is not set)
|
|
3322
|
+
*/
|
|
3323
|
+
this.voucher_code = '';
|
|
3324
|
+
if (record) {
|
|
3325
|
+
this.id = +record.id;
|
|
3326
|
+
this.identifier = record.identifier;
|
|
3327
|
+
this.value = +record.value;
|
|
3328
|
+
this.voucher_code = record.voucher_code;
|
|
3329
|
+
}
|
|
3330
|
+
}
|
|
3331
|
+
}
|
|
3332
|
+
|
|
3333
|
+
class EsolveVouchersService {
|
|
3334
|
+
constructor() {
|
|
3335
|
+
this.is_browser = isPlatformBrowser(inject(PLATFORM_ID));
|
|
3336
|
+
this.http = inject(HttpClient);
|
|
3337
|
+
this.config = inject(EsolveConfigService);
|
|
3338
|
+
this.cookieService = inject(EsolveCookieService);
|
|
3339
|
+
this.storage_key = '_ng_eslv_vouchers';
|
|
3340
|
+
this.cache = new Map();
|
|
3341
|
+
this.applied = new BehaviorSubject(undefined);
|
|
3342
|
+
this.validation_error = new Subject();
|
|
3343
|
+
this.setStorageKey();
|
|
3344
|
+
this.cache = this.retrieveCache();
|
|
3345
|
+
}
|
|
3346
|
+
onValidationError() {
|
|
3347
|
+
return this.validation_error.asObservable();
|
|
3348
|
+
}
|
|
3349
|
+
onApplied() {
|
|
3350
|
+
return this.applied.asObservable();
|
|
3351
|
+
}
|
|
3352
|
+
validate(voucher_key) {
|
|
3353
|
+
return this.http
|
|
3354
|
+
.get(`${this.config.api_url}/get-validate-voucher.php`, {
|
|
3355
|
+
params: {
|
|
3356
|
+
voucher_key,
|
|
3357
|
+
},
|
|
3358
|
+
})
|
|
3359
|
+
.pipe(map$1((response) => {
|
|
3360
|
+
if (response.records === undefined ||
|
|
3361
|
+
Array.isArray(response.records)) {
|
|
3362
|
+
throw response;
|
|
3363
|
+
}
|
|
3364
|
+
const valid = response.records.valid;
|
|
3365
|
+
const result = {
|
|
3366
|
+
valid,
|
|
3367
|
+
};
|
|
3368
|
+
if (!valid) {
|
|
3369
|
+
const error = response.records.error;
|
|
3370
|
+
this.validation_error.next(error);
|
|
3371
|
+
}
|
|
3372
|
+
else if (valid) {
|
|
3373
|
+
result.id = response.records.id;
|
|
3374
|
+
}
|
|
3375
|
+
return result;
|
|
3376
|
+
}), catchError(() => {
|
|
3377
|
+
this.validation_error.next(undefined);
|
|
3378
|
+
return [{ valid: false }];
|
|
3379
|
+
}));
|
|
3380
|
+
}
|
|
3381
|
+
async applyVoucher(voucher_key) {
|
|
3382
|
+
try {
|
|
3383
|
+
if (voucher_key.trim() === '') {
|
|
3384
|
+
return false;
|
|
3385
|
+
}
|
|
3386
|
+
const result = await firstValueFrom(this.validate(voucher_key));
|
|
3387
|
+
if (result.valid && result.id) {
|
|
3388
|
+
this.addVoucher(result.id, voucher_key);
|
|
3389
|
+
}
|
|
3390
|
+
return result.valid;
|
|
3391
|
+
}
|
|
3392
|
+
catch (error) {
|
|
3393
|
+
return false;
|
|
3394
|
+
}
|
|
3395
|
+
}
|
|
3396
|
+
removeVoucher(id) {
|
|
3397
|
+
this.cache.delete(id);
|
|
3398
|
+
this.cacheVouchers();
|
|
3399
|
+
this.applied.next();
|
|
3400
|
+
}
|
|
3401
|
+
getAppliedVoucherKeys() {
|
|
3402
|
+
return [...this.cache.values()];
|
|
3403
|
+
}
|
|
3404
|
+
getAppliedVouchers() {
|
|
3405
|
+
const voucher_ids = [...this.cache.keys()];
|
|
3406
|
+
return this.http
|
|
3407
|
+
.get(`${this.config.api_url}/get-applied-vouchers.php`, {
|
|
3408
|
+
params: {
|
|
3409
|
+
vouchers: voucher_ids.join(','),
|
|
3410
|
+
},
|
|
3411
|
+
})
|
|
3412
|
+
.pipe(map$1((response) => {
|
|
3413
|
+
if (response.records === undefined) {
|
|
3414
|
+
throw response;
|
|
3415
|
+
}
|
|
3416
|
+
return this.processVouchers(response.records);
|
|
3417
|
+
}));
|
|
3418
|
+
}
|
|
3419
|
+
reset() {
|
|
3420
|
+
this.deleteVouchers();
|
|
3421
|
+
}
|
|
3422
|
+
retrieveCache() {
|
|
3423
|
+
if (this.cookieService.check(this.storage_key) || this.getBackup()) {
|
|
3424
|
+
let vouchers_json = this.cookieService.get(this.storage_key);
|
|
3425
|
+
if (vouchers_json === '') {
|
|
3426
|
+
const local_store_data = this.getBackup();
|
|
3427
|
+
if (local_store_data) {
|
|
3428
|
+
vouchers_json = local_store_data;
|
|
3429
|
+
}
|
|
3430
|
+
}
|
|
3431
|
+
try {
|
|
3432
|
+
return this.jsonDecodeMap(vouchers_json);
|
|
3433
|
+
}
|
|
3434
|
+
catch (error) {
|
|
3435
|
+
// soft error
|
|
3436
|
+
}
|
|
3437
|
+
}
|
|
3438
|
+
return new Map();
|
|
3439
|
+
}
|
|
3440
|
+
cacheVouchers() {
|
|
3441
|
+
if (this.cache.size > 0) {
|
|
3442
|
+
const vouchers_json = this.jsonEncodeMap(this.cache);
|
|
3443
|
+
this.cookieService.set(this.storage_key, vouchers_json, undefined, '/');
|
|
3444
|
+
this.setBackup(vouchers_json);
|
|
3445
|
+
}
|
|
3446
|
+
else {
|
|
3447
|
+
this.deleteVouchers();
|
|
3448
|
+
}
|
|
3449
|
+
}
|
|
3450
|
+
deleteVouchers() {
|
|
3451
|
+
this.cache.clear();
|
|
3452
|
+
this.cookieService.delete(this.storage_key, '/');
|
|
3453
|
+
this.removeBackup();
|
|
3454
|
+
}
|
|
3455
|
+
getBackup() {
|
|
3456
|
+
if (!this.is_browser) {
|
|
3457
|
+
return null;
|
|
3458
|
+
}
|
|
3459
|
+
if (!localStorage) {
|
|
3460
|
+
return null;
|
|
3461
|
+
}
|
|
3462
|
+
return localStorage.getItem(this.storage_key);
|
|
3463
|
+
}
|
|
3464
|
+
setBackup(data) {
|
|
3465
|
+
if (!this.is_browser) {
|
|
3466
|
+
return;
|
|
3467
|
+
}
|
|
3468
|
+
if (!localStorage) {
|
|
3469
|
+
return;
|
|
3470
|
+
}
|
|
3471
|
+
localStorage.setItem(this.storage_key, data);
|
|
3472
|
+
}
|
|
3473
|
+
removeBackup() {
|
|
3474
|
+
if (!this.is_browser) {
|
|
3475
|
+
return;
|
|
3476
|
+
}
|
|
3477
|
+
if (!localStorage) {
|
|
3478
|
+
return;
|
|
3479
|
+
}
|
|
3480
|
+
localStorage.removeItem(this.storage_key);
|
|
3481
|
+
}
|
|
3482
|
+
addVoucher(id, key) {
|
|
3483
|
+
if (!this.cache.has(id)) {
|
|
3484
|
+
this.cache.set(id, key);
|
|
3485
|
+
this.cacheVouchers();
|
|
3486
|
+
}
|
|
3487
|
+
this.applied.next();
|
|
3488
|
+
}
|
|
3489
|
+
setStorageKey() {
|
|
3490
|
+
if (typeof this.config.voucher_storage_key === 'string' &&
|
|
3491
|
+
this.config.voucher_storage_key !== '') {
|
|
3492
|
+
this.storage_key = this.config.voucher_storage_key;
|
|
3493
|
+
}
|
|
3494
|
+
}
|
|
3495
|
+
jsonEncodeMap(data) {
|
|
3496
|
+
if (!(data instanceof Map)) {
|
|
3497
|
+
throw new Error('Invalid map type');
|
|
3498
|
+
}
|
|
3499
|
+
return JSON.stringify(data, (key, value) => {
|
|
3500
|
+
if (value instanceof Map) {
|
|
3501
|
+
return {
|
|
3502
|
+
dataType: 'Map',
|
|
3503
|
+
value: [...value],
|
|
3504
|
+
};
|
|
3505
|
+
}
|
|
3506
|
+
else {
|
|
3507
|
+
return value;
|
|
3508
|
+
}
|
|
3509
|
+
});
|
|
3510
|
+
}
|
|
3511
|
+
jsonDecodeMap(json_data) {
|
|
3512
|
+
const data = JSON.parse(json_data, (key, value) => {
|
|
3513
|
+
if (typeof value === 'object' && value !== null) {
|
|
3514
|
+
if (value.dataType === 'Map') {
|
|
3515
|
+
return new Map(value.value);
|
|
3516
|
+
}
|
|
3517
|
+
}
|
|
3518
|
+
return value;
|
|
3519
|
+
});
|
|
3520
|
+
if (data instanceof Map) {
|
|
3521
|
+
return data;
|
|
3522
|
+
}
|
|
3523
|
+
throw new Error('Invalid map type');
|
|
3524
|
+
}
|
|
3525
|
+
processVouchers(records) {
|
|
3526
|
+
const vouchers = [];
|
|
3527
|
+
if (records) {
|
|
3528
|
+
for (const record of records) {
|
|
3529
|
+
const voucher = new EsolveVoucher(record);
|
|
3530
|
+
vouchers.push(voucher);
|
|
3531
|
+
}
|
|
3532
|
+
}
|
|
3533
|
+
return vouchers;
|
|
3534
|
+
}
|
|
3535
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: EsolveVouchersService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
3536
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: EsolveVouchersService, providedIn: 'root' }); }
|
|
3295
3537
|
}
|
|
3296
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.
|
|
3538
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: EsolveVouchersService, decorators: [{
|
|
3297
3539
|
type: Injectable,
|
|
3298
3540
|
args: [{
|
|
3299
3541
|
providedIn: 'root',
|
|
3300
3542
|
}]
|
|
3301
|
-
}], ctorParameters: function () { return [
|
|
3302
|
-
type: Inject,
|
|
3303
|
-
args: [PLATFORM_ID]
|
|
3304
|
-
}] }, { type: EsolveConfigService }, { type: i2.HttpClient }, { type: EsolveCookieService }]; } });
|
|
3543
|
+
}], ctorParameters: function () { return []; } });
|
|
3305
3544
|
|
|
3306
3545
|
// Classes
|
|
3307
3546
|
|
|
3308
3547
|
class EsolveCartService {
|
|
3309
|
-
constructor(
|
|
3310
|
-
this.config =
|
|
3311
|
-
this.http =
|
|
3312
|
-
this.errorHandler =
|
|
3313
|
-
this.responseHandler =
|
|
3314
|
-
this.coupons =
|
|
3548
|
+
constructor() {
|
|
3549
|
+
this.config = inject(EsolveConfigService);
|
|
3550
|
+
this.http = inject(HttpClient);
|
|
3551
|
+
this.errorHandler = inject(EsolveErrorHandlerService);
|
|
3552
|
+
this.responseHandler = inject(EsolveResponseHandlerService);
|
|
3553
|
+
this.coupons = inject(EsolveCouponsService);
|
|
3554
|
+
this.vouchers = inject(EsolveVouchersService);
|
|
3315
3555
|
this._cached_tracking = 0;
|
|
3316
3556
|
}
|
|
3317
3557
|
/**
|
|
@@ -3388,12 +3628,17 @@ class EsolveCartService {
|
|
|
3388
3628
|
* @returns An `Observable` with an object containing cart totals
|
|
3389
3629
|
*/
|
|
3390
3630
|
getTotals(type) {
|
|
3391
|
-
|
|
3392
|
-
|
|
3393
|
-
params: {
|
|
3631
|
+
let params = new HttpParams({
|
|
3632
|
+
fromObject: {
|
|
3394
3633
|
type: type ?? '',
|
|
3395
3634
|
},
|
|
3396
|
-
})
|
|
3635
|
+
});
|
|
3636
|
+
const vouchers = this.vouchers.getAppliedVoucherKeys();
|
|
3637
|
+
if (vouchers.length > 0) {
|
|
3638
|
+
params = params.set('vouchers', vouchers.join(','));
|
|
3639
|
+
}
|
|
3640
|
+
return this.http
|
|
3641
|
+
.get(`${this.config.api_url}/get-cart-totals.php`, { params })
|
|
3397
3642
|
.pipe(map$1((response) => {
|
|
3398
3643
|
if (response.records === undefined ||
|
|
3399
3644
|
Array.isArray(response.records)) {
|
|
@@ -3469,6 +3714,10 @@ class EsolveCartService {
|
|
|
3469
3714
|
throw tracking;
|
|
3470
3715
|
}
|
|
3471
3716
|
body.tracking = tracking;
|
|
3717
|
+
const voucher_keys = this.vouchers.getAppliedVoucherKeys();
|
|
3718
|
+
if (voucher_keys.length > 0) {
|
|
3719
|
+
body.vouchers = voucher_keys;
|
|
3720
|
+
}
|
|
3472
3721
|
return this.http
|
|
3473
3722
|
.post(`${this.config.api_url}/set-checkout.php`, body, {
|
|
3474
3723
|
headers: {
|
|
@@ -3480,6 +3729,7 @@ class EsolveCartService {
|
|
|
3480
3729
|
.pipe(map$1((http_response) => this.responseHandler.validateSingleHttpResponse(http_response, (response) => {
|
|
3481
3730
|
this._cached_tracking = 0;
|
|
3482
3731
|
this.coupons.reset();
|
|
3732
|
+
this.vouchers.reset();
|
|
3483
3733
|
return new EsolveCheckoutResult(response);
|
|
3484
3734
|
})), catchError((errorRes) => {
|
|
3485
3735
|
return this.errorHandler.handleHttpPostError('set-checkout', errorRes);
|
|
@@ -3508,18 +3758,18 @@ class EsolveCartService {
|
|
|
3508
3758
|
* @returns Processed cart totals
|
|
3509
3759
|
*/
|
|
3510
3760
|
processCartTotals(record) {
|
|
3511
|
-
const cart_totals = new EsolveCartTotals(+record.records, +record.items, +record.total, +record.vat, +record.discount);
|
|
3761
|
+
const cart_totals = new EsolveCartTotals(+record.records, +record.items, +record.total, +record.vat, +record.discount, +record.vouchers);
|
|
3512
3762
|
return cart_totals;
|
|
3513
3763
|
}
|
|
3514
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.
|
|
3515
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.
|
|
3764
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: EsolveCartService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
3765
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: EsolveCartService, providedIn: 'root' }); }
|
|
3516
3766
|
}
|
|
3517
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.
|
|
3767
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: EsolveCartService, decorators: [{
|
|
3518
3768
|
type: Injectable,
|
|
3519
3769
|
args: [{
|
|
3520
3770
|
providedIn: 'root',
|
|
3521
3771
|
}]
|
|
3522
|
-
}]
|
|
3772
|
+
}] });
|
|
3523
3773
|
|
|
3524
3774
|
class EsolveAccountService {
|
|
3525
3775
|
get user_id() {
|
|
@@ -3531,12 +3781,12 @@ class EsolveAccountService {
|
|
|
3531
3781
|
this._user_id = value;
|
|
3532
3782
|
}
|
|
3533
3783
|
}
|
|
3534
|
-
constructor(
|
|
3535
|
-
this.config =
|
|
3536
|
-
this.http =
|
|
3537
|
-
this.sessionService =
|
|
3538
|
-
this.errorHandler =
|
|
3539
|
-
this.responseHandler =
|
|
3784
|
+
constructor() {
|
|
3785
|
+
this.config = inject(EsolveConfigService);
|
|
3786
|
+
this.http = inject(HttpClient);
|
|
3787
|
+
this.sessionService = inject(EsolveSessionService);
|
|
3788
|
+
this.errorHandler = inject(EsolveErrorHandlerService);
|
|
3789
|
+
this.responseHandler = inject(EsolveResponseHandlerService);
|
|
3540
3790
|
this._user_id = 0;
|
|
3541
3791
|
this.sessionService.getSession().subscribe((session) => {
|
|
3542
3792
|
if (session.token !== '') {
|
|
@@ -3915,15 +4165,15 @@ class EsolveAccountService {
|
|
|
3915
4165
|
return new EsolveLocationUpdateResult(response);
|
|
3916
4166
|
})));
|
|
3917
4167
|
}
|
|
3918
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.
|
|
3919
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.
|
|
4168
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: EsolveAccountService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
4169
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: EsolveAccountService, providedIn: 'root' }); }
|
|
3920
4170
|
}
|
|
3921
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.
|
|
4171
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: EsolveAccountService, decorators: [{
|
|
3922
4172
|
type: Injectable,
|
|
3923
4173
|
args: [{
|
|
3924
4174
|
providedIn: 'root',
|
|
3925
4175
|
}]
|
|
3926
|
-
}], ctorParameters: function () { return [
|
|
4176
|
+
}], ctorParameters: function () { return []; } });
|
|
3927
4177
|
|
|
3928
4178
|
class EsolveBanner {
|
|
3929
4179
|
constructor(id, banner_display_container, identifier, type, title, article, sort_priority, link, images) {
|
|
@@ -3974,9 +4224,9 @@ class EsolveBannerImageHotspot {
|
|
|
3974
4224
|
}
|
|
3975
4225
|
|
|
3976
4226
|
class EsolveBannerService {
|
|
3977
|
-
constructor(
|
|
3978
|
-
this.config =
|
|
3979
|
-
this.http =
|
|
4227
|
+
constructor() {
|
|
4228
|
+
this.config = inject(EsolveConfigService);
|
|
4229
|
+
this.http = inject(HttpClient);
|
|
3980
4230
|
}
|
|
3981
4231
|
/**
|
|
3982
4232
|
* Retrieves banners records from eSolve instance
|
|
@@ -4054,15 +4304,15 @@ class EsolveBannerService {
|
|
|
4054
4304
|
}
|
|
4055
4305
|
return banners;
|
|
4056
4306
|
}
|
|
4057
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.
|
|
4058
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.
|
|
4307
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: EsolveBannerService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
4308
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: EsolveBannerService, providedIn: 'root' }); }
|
|
4059
4309
|
}
|
|
4060
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.
|
|
4310
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: EsolveBannerService, decorators: [{
|
|
4061
4311
|
type: Injectable,
|
|
4062
4312
|
args: [{
|
|
4063
4313
|
providedIn: 'root',
|
|
4064
4314
|
}]
|
|
4065
|
-
}]
|
|
4315
|
+
}] });
|
|
4066
4316
|
|
|
4067
4317
|
// Types
|
|
4068
4318
|
|
|
@@ -4098,9 +4348,9 @@ class EsolveMenuItem {
|
|
|
4098
4348
|
}
|
|
4099
4349
|
|
|
4100
4350
|
class EsolveMenuService {
|
|
4101
|
-
constructor(
|
|
4102
|
-
this.config =
|
|
4103
|
-
this.http =
|
|
4351
|
+
constructor() {
|
|
4352
|
+
this.config = inject(EsolveConfigService);
|
|
4353
|
+
this.http = inject(HttpClient);
|
|
4104
4354
|
}
|
|
4105
4355
|
getMenuTree(identifier) {
|
|
4106
4356
|
return this.http
|
|
@@ -4124,15 +4374,15 @@ class EsolveMenuService {
|
|
|
4124
4374
|
}
|
|
4125
4375
|
return menu;
|
|
4126
4376
|
}
|
|
4127
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.
|
|
4128
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.
|
|
4377
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: EsolveMenuService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
4378
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: EsolveMenuService, providedIn: 'root' }); }
|
|
4129
4379
|
}
|
|
4130
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.
|
|
4380
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: EsolveMenuService, decorators: [{
|
|
4131
4381
|
type: Injectable,
|
|
4132
4382
|
args: [{
|
|
4133
4383
|
providedIn: 'root',
|
|
4134
4384
|
}]
|
|
4135
|
-
}]
|
|
4385
|
+
}] });
|
|
4136
4386
|
|
|
4137
4387
|
class EsolveNewsGroup {
|
|
4138
4388
|
get image_src() {
|
|
@@ -4243,9 +4493,9 @@ class EsolveNewsArticleList {
|
|
|
4243
4493
|
}
|
|
4244
4494
|
|
|
4245
4495
|
class EsolveNewsService {
|
|
4246
|
-
constructor(
|
|
4247
|
-
this.config =
|
|
4248
|
-
this.http =
|
|
4496
|
+
constructor() {
|
|
4497
|
+
this.config = inject(EsolveConfigService);
|
|
4498
|
+
this.http = inject(HttpClient);
|
|
4249
4499
|
}
|
|
4250
4500
|
getNewsArticle(identifier) {
|
|
4251
4501
|
const params = new HttpParams({
|
|
@@ -4339,15 +4589,15 @@ class EsolveNewsService {
|
|
|
4339
4589
|
}
|
|
4340
4590
|
return params;
|
|
4341
4591
|
}
|
|
4342
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.
|
|
4343
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.
|
|
4592
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: EsolveNewsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
4593
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: EsolveNewsService, providedIn: 'root' }); }
|
|
4344
4594
|
}
|
|
4345
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.
|
|
4595
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: EsolveNewsService, decorators: [{
|
|
4346
4596
|
type: Injectable,
|
|
4347
4597
|
args: [{
|
|
4348
4598
|
providedIn: 'root',
|
|
4349
4599
|
}]
|
|
4350
|
-
}]
|
|
4600
|
+
}] });
|
|
4351
4601
|
|
|
4352
4602
|
// Types
|
|
4353
4603
|
|
|
@@ -4937,9 +5187,9 @@ class EsolveStockImageCollection {
|
|
|
4937
5187
|
// Interfaces
|
|
4938
5188
|
|
|
4939
5189
|
class EsolveStockService {
|
|
4940
|
-
constructor(
|
|
4941
|
-
this.config =
|
|
4942
|
-
this.http =
|
|
5190
|
+
constructor() {
|
|
5191
|
+
this.config = inject(EsolveConfigService);
|
|
5192
|
+
this.http = inject(HttpClient);
|
|
4943
5193
|
}
|
|
4944
5194
|
/**
|
|
4945
5195
|
* Retrieves the stock record from the eSolve instance using the code.
|
|
@@ -5332,15 +5582,15 @@ class EsolveStockService {
|
|
|
5332
5582
|
getStockHistoryRecords(params) {
|
|
5333
5583
|
return this.http.get(`${this.config.api_url}/get-items-transaction-history.php`, { params });
|
|
5334
5584
|
}
|
|
5335
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.
|
|
5336
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.
|
|
5585
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: EsolveStockService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
5586
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: EsolveStockService, providedIn: 'root' }); }
|
|
5337
5587
|
}
|
|
5338
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.
|
|
5588
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: EsolveStockService, decorators: [{
|
|
5339
5589
|
type: Injectable,
|
|
5340
5590
|
args: [{
|
|
5341
5591
|
providedIn: 'root',
|
|
5342
5592
|
}]
|
|
5343
|
-
}]
|
|
5593
|
+
}] });
|
|
5344
5594
|
|
|
5345
5595
|
class EsolveSpecialImage {
|
|
5346
5596
|
constructor(record) {
|
|
@@ -5419,9 +5669,9 @@ class EsolveSpecial {
|
|
|
5419
5669
|
}
|
|
5420
5670
|
|
|
5421
5671
|
class EsolveSpecialsService {
|
|
5422
|
-
constructor(
|
|
5423
|
-
this.config =
|
|
5424
|
-
this.http =
|
|
5672
|
+
constructor() {
|
|
5673
|
+
this.config = inject(EsolveConfigService);
|
|
5674
|
+
this.http = inject(HttpClient);
|
|
5425
5675
|
}
|
|
5426
5676
|
getSpecial(specials_id) {
|
|
5427
5677
|
const params = new HttpParams({
|
|
@@ -5479,15 +5729,15 @@ class EsolveSpecialsService {
|
|
|
5479
5729
|
processSpecial(record) {
|
|
5480
5730
|
return new EsolveSpecial(record);
|
|
5481
5731
|
}
|
|
5482
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.
|
|
5483
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.
|
|
5732
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: EsolveSpecialsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
5733
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: EsolveSpecialsService, providedIn: 'root' }); }
|
|
5484
5734
|
}
|
|
5485
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.
|
|
5735
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: EsolveSpecialsService, decorators: [{
|
|
5486
5736
|
type: Injectable,
|
|
5487
5737
|
args: [{
|
|
5488
5738
|
providedIn: 'root',
|
|
5489
5739
|
}]
|
|
5490
|
-
}]
|
|
5740
|
+
}] });
|
|
5491
5741
|
|
|
5492
5742
|
class EsolveBankingDetails {
|
|
5493
5743
|
constructor(bank_name, account_holder, account, account_type, swift_number, branch_code) {
|
|
@@ -5612,11 +5862,11 @@ class EsolveVaultItem {
|
|
|
5612
5862
|
}
|
|
5613
5863
|
|
|
5614
5864
|
class EsolvePaymentService {
|
|
5615
|
-
constructor(
|
|
5616
|
-
this.config =
|
|
5617
|
-
this.http =
|
|
5618
|
-
this.errorHandler =
|
|
5619
|
-
this.responseHandler =
|
|
5865
|
+
constructor() {
|
|
5866
|
+
this.config = inject(EsolveConfigService);
|
|
5867
|
+
this.http = inject(HttpClient);
|
|
5868
|
+
this.errorHandler = inject(EsolveErrorHandlerService);
|
|
5869
|
+
this.responseHandler = inject(EsolveResponseHandlerService);
|
|
5620
5870
|
}
|
|
5621
5871
|
/**
|
|
5622
5872
|
* Retrieves a list of payment methods.
|
|
@@ -5820,15 +6070,15 @@ class EsolvePaymentService {
|
|
|
5820
6070
|
const year_string = card_data.expiry_year.padStart(4, '0');
|
|
5821
6071
|
return `${month_string}${year_string}`;
|
|
5822
6072
|
}
|
|
5823
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.
|
|
5824
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.
|
|
6073
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: EsolvePaymentService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
6074
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: EsolvePaymentService, providedIn: 'root' }); }
|
|
5825
6075
|
}
|
|
5826
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.
|
|
6076
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: EsolvePaymentService, decorators: [{
|
|
5827
6077
|
type: Injectable,
|
|
5828
6078
|
args: [{
|
|
5829
6079
|
providedIn: 'root',
|
|
5830
6080
|
}]
|
|
5831
|
-
}]
|
|
6081
|
+
}] });
|
|
5832
6082
|
|
|
5833
6083
|
class EsolveShippingTotals {
|
|
5834
6084
|
constructor(total, vat, savings) {
|
|
@@ -5961,9 +6211,9 @@ class EsolveTimeSlotConfig {
|
|
|
5961
6211
|
}
|
|
5962
6212
|
|
|
5963
6213
|
class EsolveShippingService {
|
|
5964
|
-
constructor(
|
|
5965
|
-
this.config =
|
|
5966
|
-
this.http =
|
|
6214
|
+
constructor() {
|
|
6215
|
+
this.config = inject(EsolveConfigService);
|
|
6216
|
+
this.http = inject(HttpClient);
|
|
5967
6217
|
}
|
|
5968
6218
|
/**
|
|
5969
6219
|
* Retrieves a list of shipping methods
|
|
@@ -6090,15 +6340,15 @@ class EsolveShippingService {
|
|
|
6090
6340
|
const shipping_cost = new EsolveShippingCost(+record.shipping_total, +record.vat_on_shipping, +record.total_saving_on_shipping, +record.insurance_total, +record.vat_on_insurance, +record.total_saving_on_insurance);
|
|
6091
6341
|
return shipping_cost;
|
|
6092
6342
|
}
|
|
6093
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.
|
|
6094
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.
|
|
6343
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: EsolveShippingService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
6344
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: EsolveShippingService, providedIn: 'root' }); }
|
|
6095
6345
|
}
|
|
6096
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.
|
|
6346
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: EsolveShippingService, decorators: [{
|
|
6097
6347
|
type: Injectable,
|
|
6098
6348
|
args: [{
|
|
6099
6349
|
providedIn: 'root',
|
|
6100
6350
|
}]
|
|
6101
|
-
}]
|
|
6351
|
+
}] });
|
|
6102
6352
|
|
|
6103
6353
|
class EsolveEnquiryResult extends EsolveResponseResult {
|
|
6104
6354
|
constructor(response) {
|
|
@@ -6109,11 +6359,11 @@ class EsolveEnquiryResult extends EsolveResponseResult {
|
|
|
6109
6359
|
}
|
|
6110
6360
|
|
|
6111
6361
|
class EsolveEnquiryService {
|
|
6112
|
-
constructor(
|
|
6113
|
-
this.config =
|
|
6114
|
-
this.http =
|
|
6115
|
-
this.errorHandler =
|
|
6116
|
-
this.responseHandler =
|
|
6362
|
+
constructor() {
|
|
6363
|
+
this.config = inject(EsolveConfigService);
|
|
6364
|
+
this.http = inject(HttpClient);
|
|
6365
|
+
this.errorHandler = inject(EsolveErrorHandlerService);
|
|
6366
|
+
this.responseHandler = inject(EsolveResponseHandlerService);
|
|
6117
6367
|
}
|
|
6118
6368
|
send(form_data) {
|
|
6119
6369
|
if (!form_data.has('email')) {
|
|
@@ -6128,15 +6378,15 @@ class EsolveEnquiryService {
|
|
|
6128
6378
|
return this.errorHandler.handleHttpPostError('set-enquiry', errorRes);
|
|
6129
6379
|
}));
|
|
6130
6380
|
}
|
|
6131
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.
|
|
6132
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.
|
|
6381
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: EsolveEnquiryService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
6382
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: EsolveEnquiryService, providedIn: 'root' }); }
|
|
6133
6383
|
}
|
|
6134
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.
|
|
6384
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: EsolveEnquiryService, decorators: [{
|
|
6135
6385
|
type: Injectable,
|
|
6136
6386
|
args: [{
|
|
6137
6387
|
providedIn: 'root',
|
|
6138
6388
|
}]
|
|
6139
|
-
}]
|
|
6389
|
+
}] });
|
|
6140
6390
|
|
|
6141
6391
|
class EsolveWishlistItem {
|
|
6142
6392
|
constructor(id, qty, vat_rate, price, price_incl, vat_total, total, total_incl, stock_item) {
|
|
@@ -6156,11 +6406,11 @@ class EsolveEmptyWishlistResult extends EsolveResponseResult {
|
|
|
6156
6406
|
}
|
|
6157
6407
|
|
|
6158
6408
|
class EsolveWishlistService {
|
|
6159
|
-
constructor(
|
|
6160
|
-
this.config =
|
|
6161
|
-
this.http =
|
|
6162
|
-
this.errorHandler =
|
|
6163
|
-
this.responseHandler =
|
|
6409
|
+
constructor() {
|
|
6410
|
+
this.config = inject(EsolveConfigService);
|
|
6411
|
+
this.http = inject(HttpClient);
|
|
6412
|
+
this.errorHandler = inject(EsolveErrorHandlerService);
|
|
6413
|
+
this.responseHandler = inject(EsolveResponseHandlerService);
|
|
6164
6414
|
}
|
|
6165
6415
|
/**
|
|
6166
6416
|
* Retrieves the current wishlist
|
|
@@ -6249,15 +6499,15 @@ class EsolveWishlistService {
|
|
|
6249
6499
|
getWishlistRecords(params) {
|
|
6250
6500
|
return this.http.get(`${this.config.api_url}/get-wishlist.php`, { params });
|
|
6251
6501
|
}
|
|
6252
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.
|
|
6253
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.
|
|
6502
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: EsolveWishlistService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
6503
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: EsolveWishlistService, providedIn: 'root' }); }
|
|
6254
6504
|
}
|
|
6255
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.
|
|
6505
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: EsolveWishlistService, decorators: [{
|
|
6256
6506
|
type: Injectable,
|
|
6257
6507
|
args: [{
|
|
6258
6508
|
providedIn: 'root',
|
|
6259
6509
|
}]
|
|
6260
|
-
}]
|
|
6510
|
+
}] });
|
|
6261
6511
|
|
|
6262
6512
|
class EsolveSupplier {
|
|
6263
6513
|
constructor(record) {
|
|
@@ -6287,9 +6537,9 @@ class EsolveSupplier {
|
|
|
6287
6537
|
}
|
|
6288
6538
|
|
|
6289
6539
|
class EsolveSuppliersService {
|
|
6290
|
-
constructor(
|
|
6291
|
-
this.config =
|
|
6292
|
-
this.http =
|
|
6540
|
+
constructor() {
|
|
6541
|
+
this.config = inject(EsolveConfigService);
|
|
6542
|
+
this.http = inject(HttpClient);
|
|
6293
6543
|
}
|
|
6294
6544
|
getSuppliers(options) {
|
|
6295
6545
|
let params = new HttpParams();
|
|
@@ -6323,15 +6573,15 @@ class EsolveSuppliersService {
|
|
|
6323
6573
|
processSuppliers(record) {
|
|
6324
6574
|
return new EsolveSupplier(record);
|
|
6325
6575
|
}
|
|
6326
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.
|
|
6327
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.
|
|
6576
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: EsolveSuppliersService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
6577
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: EsolveSuppliersService, providedIn: 'root' }); }
|
|
6328
6578
|
}
|
|
6329
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.
|
|
6579
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: EsolveSuppliersService, decorators: [{
|
|
6330
6580
|
type: Injectable,
|
|
6331
6581
|
args: [{
|
|
6332
6582
|
providedIn: 'root',
|
|
6333
6583
|
}]
|
|
6334
|
-
}]
|
|
6584
|
+
}] });
|
|
6335
6585
|
|
|
6336
6586
|
/*
|
|
6337
6587
|
* Public API Surface of ng-esolve-connect
|
|
@@ -6341,5 +6591,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.6", ngImpor
|
|
|
6341
6591
|
* Generated bundle index. Do not edit.
|
|
6342
6592
|
*/
|
|
6343
6593
|
|
|
6344
|
-
export { ESOLVE_CONNECT_CONFIG, ESOLVE_EURUS_AUTO_LOGIN, EsolveAccountConfirmationResult, EsolveAccountService, EsolveAdditionalStockImage, EsolveAddress, EsolveAddressResult, EsolveAsset, EsolveAssetsService, EsolveAuthInterceptorService, EsolveAuthService, EsolveBankingDetails, EsolveBanner, EsolveBannerImage, EsolveBannerImageHotspot, EsolveBannerService, EsolveCartItem, EsolveCartService, EsolveCartStockItem, EsolveCartTotals, EsolveCategoryTreeItem, EsolveCategoryTreeService, EsolveCdnSrcDirective, EsolveChangePasswordResult, EsolveCheckoutResult, EsolveColour, EsolveConfigService, EsolveCookieService, EsolveCoupon, EsolveCouponsService, EsolveDependantItem, EsolveEmptyCartResult, EsolveEmptyWishlistResult, EsolveEnquiryResult, EsolveEnquiryService, EsolveErrorHandlerService, esolveFilterFactory as EsolveFilterFactory, EsolveGeocodeAddressResult, EsolveGeocodeCoordsResult, EsolveGeocodeResult, EsolveGeocoderService, EsolveHttpError, EsolveLinkedAsset, EsolveLinkedStockItem, EsolveList, EsolveLocation, EsolveLocationAddress, EsolveLocationContactInfo, EsolveLocationGEO, EsolveLocationPOBoxAddress, EsolveLocationTradingDay, EsolveLocationTradingTimes, EsolveLocationUpdateResult, EsolveLocationsService, EsolveManufacturer, EsolveManufacturersService, EsolveMediaStockItem, EsolveMenuItem, EsolveMenuService, EsolveMultipleSelectFilter, EsolveNewsArticle, EsolveNewsArticleAuthor, EsolveNewsArticleList, EsolveNewsGroup, EsolveNewsService, EsolvePaymentMethod, EsolvePaymentResult, EsolvePaymentService, EsolveRange, EsolveRangeFilter, EsolveRangesService, EsolveRecipeStockItem, EsolveRegistrationResult, EsolveResetPasswordResult, EsolveResponseHandlerService, EsolveResponseResult, EsolveResult, EsolveSeoInfo, EsolveSeoService, EsolveSessionMetadataService, EsolveSessionService, EsolveShippingCost, EsolveShippingMethod, EsolveShippingService, EsolveShippingTotals, EsolveSingleSelectFilter, EsolveSpecial, EsolveSpecialDates, EsolveSpecialImage, EsolveSpecialImageCollection, EsolveSpecialsService, EsolveStatement, EsolveStatementAgeing, EsolveStatementBalances, EsolveStatementTransaction, EsolveStockBadge, EsolveStockGroup, EsolveStockGroupItem, EsolveStockImage, EsolveStockImageCollection, EsolveStockItem, EsolveStockItemBase, EsolveStockItemList, EsolveStockLeadTimes, EsolveStockPrice, EsolveStockService, EsolveSupplier, EsolveSuppliersService, EsolveTag, EsolveTagsService, EsolveTimeSlot, EsolveTimeSlotConfig, EsolveTimeSlotDate, EsolveTimeSlotDays, EsolveTimeSlotTimes, EsolveToggleFilter, EsolveTopic, EsolveTopicService, EsolveTransaction, EsolveTransactionAddress, EsolveTransactionAnalyticsData, EsolveTransactionClient, EsolveTransactionItem, EsolveTransactionItemPrice, EsolveTransactionList, EsolveTransactionLocation, EsolveTransactionPaymentMethod, EsolveTransactionShippingMethod, EsolveTransactionUser, EsolveTransactionsService, EsolveUserAccount, EsolveUserAccountBusiness, EsolveUserAccountContact, EsolveUserAccountResult, EsolveUserClientAccount, EsolveUserClientAccountBalances, EsolveVaultItem, EsolveVaultItemResult, EsolveWishlistItem, EsolveWishlistService, NgEsolveConnectModule, esolveHexHash, isEsolveCdnPath, isFtgCdnPath, isLegacyEsolveCdnPath, processEsolveImageSrc, provideEsolveImageLoader, provideNgEsolveConnect };
|
|
6594
|
+
export { ESOLVE_CONNECT_CONFIG, ESOLVE_EURUS_AUTO_LOGIN, EsolveAccountConfirmationResult, EsolveAccountService, EsolveAdditionalStockImage, EsolveAddress, EsolveAddressResult, EsolveAsset, EsolveAssetsService, EsolveAuthInterceptorService, EsolveAuthService, EsolveBankingDetails, EsolveBanner, EsolveBannerImage, EsolveBannerImageHotspot, EsolveBannerService, EsolveCartItem, EsolveCartService, EsolveCartStockItem, EsolveCartTotals, EsolveCategoryTreeItem, EsolveCategoryTreeService, EsolveCdnSrcDirective, EsolveChangePasswordResult, EsolveCheckoutResult, EsolveColour, EsolveConfigService, EsolveCookieService, EsolveCoupon, EsolveCouponsService, EsolveDependantItem, EsolveEmptyCartResult, EsolveEmptyWishlistResult, EsolveEnquiryResult, EsolveEnquiryService, EsolveErrorHandlerService, esolveFilterFactory as EsolveFilterFactory, EsolveGeocodeAddressResult, EsolveGeocodeCoordsResult, EsolveGeocodeResult, EsolveGeocoderService, EsolveHttpError, EsolveLinkedAsset, EsolveLinkedStockItem, EsolveList, EsolveLocation, EsolveLocationAddress, EsolveLocationContactInfo, EsolveLocationGEO, EsolveLocationPOBoxAddress, EsolveLocationTradingDay, EsolveLocationTradingTimes, EsolveLocationUpdateResult, EsolveLocationsService, EsolveManufacturer, EsolveManufacturersService, EsolveMediaStockItem, EsolveMenuItem, EsolveMenuService, EsolveMultipleSelectFilter, EsolveNewsArticle, EsolveNewsArticleAuthor, EsolveNewsArticleList, EsolveNewsGroup, EsolveNewsService, EsolvePaymentMethod, EsolvePaymentResult, EsolvePaymentService, EsolveRange, EsolveRangeFilter, EsolveRangesService, EsolveRecipeStockItem, EsolveRegistrationResult, EsolveResetPasswordResult, EsolveResponseHandlerService, EsolveResponseResult, EsolveResult, EsolveSeoInfo, EsolveSeoService, EsolveSessionMetadataService, EsolveSessionService, EsolveShippingCost, EsolveShippingMethod, EsolveShippingService, EsolveShippingTotals, EsolveSingleSelectFilter, EsolveSpecial, EsolveSpecialDates, EsolveSpecialImage, EsolveSpecialImageCollection, EsolveSpecialsService, EsolveStatement, EsolveStatementAgeing, EsolveStatementBalances, EsolveStatementTransaction, EsolveStockBadge, EsolveStockGroup, EsolveStockGroupItem, EsolveStockImage, EsolveStockImageCollection, EsolveStockItem, EsolveStockItemBase, EsolveStockItemList, EsolveStockLeadTimes, EsolveStockPrice, EsolveStockService, EsolveSupplier, EsolveSuppliersService, EsolveTag, EsolveTagsService, EsolveTimeSlot, EsolveTimeSlotConfig, EsolveTimeSlotDate, EsolveTimeSlotDays, EsolveTimeSlotTimes, EsolveToggleFilter, EsolveTopic, EsolveTopicService, EsolveTransaction, EsolveTransactionAddress, EsolveTransactionAnalyticsData, EsolveTransactionClient, EsolveTransactionItem, EsolveTransactionItemPrice, EsolveTransactionList, EsolveTransactionLocation, EsolveTransactionPaymentMethod, EsolveTransactionShippingMethod, EsolveTransactionUser, EsolveTransactionsService, EsolveUserAccount, EsolveUserAccountBusiness, EsolveUserAccountContact, EsolveUserAccountResult, EsolveUserClientAccount, EsolveUserClientAccountBalances, EsolveVaultItem, EsolveVaultItemResult, EsolveVoucher, EsolveVouchersService, EsolveWishlistItem, EsolveWishlistService, NgEsolveConnectModule, esolveHexHash, isEsolveCdnPath, isFtgCdnPath, isLegacyEsolveCdnPath, processEsolveImageSrc, provideEsolveImageLoader, provideNgEsolveConnect };
|
|
6345
6595
|
//# sourceMappingURL=esolve-ng-esolve-connect.mjs.map
|