@esolve/ng-esolve-connect 0.38.1 → 0.40.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/index.mjs +3 -3
- package/esm2020/lib/account/esolve-account.service.mjs +14 -16
- package/esm2020/lib/account/password/esolve-forgot-password-response.interface.mjs +1 -1
- package/esm2020/lib/account/registration/esolve-registration-post-response-item.interface.mjs +1 -1
- package/esm2020/lib/auth/esolve-auth-interceptor.service.mjs +11 -14
- package/esm2020/lib/auth/esolve-auth.service.mjs +111 -85
- package/esm2020/lib/auth/index.mjs +5 -3
- package/esm2020/lib/auth/interfaces/esolve-auth-check-data.interface.mjs +2 -0
- package/esm2020/lib/auth/interfaces/esolve-auth-data.interface.mjs +2 -0
- package/esm2020/lib/auth/interfaces/esolve-auth-get-data.interface.mjs +2 -0
- package/esm2020/lib/auth/interfaces/esolve-auth-response.interface.mjs +2 -0
- package/esm2020/lib/auth/interfaces/esolve-login-post-response-item.interface.mjs +2 -0
- package/esm2020/lib/auth/interfaces/index.mjs +6 -0
- package/esm2020/lib/auth/providers/esolve-eurus-auto-login.provider.mjs +12 -0
- package/esm2020/lib/auth/providers/index.mjs +2 -0
- package/esm2020/lib/auth/types/esolve-auth-check-response.type.mjs +2 -0
- package/esm2020/lib/auth/types/esolve-auth-get-response.type.mjs +2 -0
- package/esm2020/lib/auth/types/esolve-auth-response-data.type.mjs +2 -0
- package/esm2020/lib/auth/types/esolve-auth-result.type.mjs +2 -0
- package/esm2020/lib/auth/types/index.mjs +5 -0
- package/esm2020/lib/banners/esolve-banner.service.mjs +7 -9
- package/esm2020/lib/cart/esolve-cart.service.mjs +2 -2
- package/esm2020/lib/category-tree/esolve-category-tree.service.mjs +7 -9
- package/esm2020/lib/core/esolve-config.service.mjs +51 -0
- package/esm2020/lib/core/esolve-connect-config.constant.mjs +3 -0
- package/esm2020/lib/core/esolve-connect.config.mjs +2 -0
- package/esm2020/lib/core/index.mjs +4 -0
- package/esm2020/lib/coupons/esolve-coupons.service.mjs +2 -2
- package/esm2020/lib/enquiry/esolve-enquiry.service.mjs +9 -11
- package/esm2020/lib/images/directives/cdn-src.directive.mjs +72 -0
- package/esm2020/lib/images/directives/index.mjs +2 -0
- package/esm2020/lib/images/esolve-image-loader.provider.mjs +13 -0
- package/esm2020/lib/images/functions/index.mjs +4 -0
- package/esm2020/lib/images/functions/is-esolve-cdn-path.function.mjs +5 -0
- package/esm2020/lib/images/functions/is-legacy-esolve-cdn-path.function.mjs +5 -0
- package/esm2020/lib/images/functions/process-image-src.function.mjs +33 -0
- package/esm2020/lib/images/index.mjs +4 -0
- package/esm2020/lib/locations/esolve-locations.service.mjs +2 -2
- package/esm2020/lib/manufacturers/esolve-manufacturers.service.mjs +7 -9
- package/esm2020/lib/menu/esolve-menu.service.mjs +7 -9
- package/esm2020/lib/news/esolve-news.service.mjs +7 -9
- package/esm2020/lib/ng-esolve-connect.module.mjs +24 -20
- package/esm2020/lib/payment/esolve-payment.service.mjs +2 -2
- package/esm2020/lib/ranges/esolve-ranges.service.mjs +2 -2
- package/esm2020/lib/session/esolve-session-metadata.service.mjs +11 -13
- package/esm2020/lib/session/esolve-session.service.mjs +133 -109
- package/esm2020/lib/session/index.mjs +2 -4
- package/esm2020/lib/session/interfaces/esolve-session-data.interface.mjs +2 -0
- package/esm2020/lib/session/interfaces/esolve-session.interface.mjs +2 -0
- package/esm2020/lib/session/interfaces/index.mjs +3 -0
- package/esm2020/lib/shared/assets/esolve-assets.service.mjs +2 -2
- package/esm2020/lib/shared/cookie/esolve-cookie.service.mjs +12 -93
- package/esm2020/lib/shared/geocoder/esolve-geocoder.service.mjs +2 -2
- package/esm2020/lib/shared/response/esolve-get-response.interface.mjs +1 -1
- package/esm2020/lib/shared/response/esolve-response.interface.mjs +1 -1
- package/esm2020/lib/shared/response/esolve-set-response.interface.mjs +1 -1
- package/esm2020/lib/shared/seo/esolve-seo.service.mjs +13 -27
- package/esm2020/lib/shipping/esolve-shipping.service.mjs +2 -2
- package/esm2020/lib/specials/esolve-specials.service.mjs +2 -2
- package/esm2020/lib/stock/esolve-stock.service.mjs +2 -2
- package/esm2020/lib/suppliers/esolve-suppliers.service.mjs +2 -2
- package/esm2020/lib/tags/esolve-tags.service.mjs +2 -2
- package/esm2020/lib/topics/esolve-topic.service.mjs +2 -2
- package/esm2020/lib/transactions/esolve-transactions.service.mjs +15 -20
- package/esm2020/lib/wishlist/esolve-wishlist.service.mjs +2 -2
- package/fesm2015/esolve-ng-esolve-connect.mjs +1045 -999
- package/fesm2015/esolve-ng-esolve-connect.mjs.map +1 -1
- package/fesm2020/esolve-ng-esolve-connect.mjs +913 -846
- package/fesm2020/esolve-ng-esolve-connect.mjs.map +1 -1
- package/index.d.ts +2 -2
- package/lib/account/esolve-account.service.d.ts +2 -2
- package/lib/account/password/esolve-forgot-password-response.interface.d.ts +1 -1
- package/lib/account/registration/esolve-registration-post-response-item.interface.d.ts +1 -1
- package/lib/auth/esolve-auth-interceptor.service.d.ts +3 -3
- package/lib/auth/esolve-auth.service.d.ts +6 -8
- package/lib/auth/index.d.ts +4 -2
- package/lib/auth/interfaces/esolve-auth-check-data.interface.d.ts +4 -0
- package/lib/auth/{esolve-auth-data.interface.d.ts → interfaces/esolve-auth-data.interface.d.ts} +2 -0
- package/lib/auth/{esolve-auth-response.interface.d.ts → interfaces/esolve-auth-response.interface.d.ts} +1 -1
- package/lib/auth/interfaces/esolve-login-post-response-item.interface.d.ts +6 -0
- package/lib/auth/interfaces/index.d.ts +5 -0
- package/lib/auth/providers/esolve-eurus-auto-login.provider.d.ts +2 -0
- package/lib/auth/providers/index.d.ts +1 -0
- package/lib/auth/types/esolve-auth-check-response.type.d.ts +2 -0
- package/lib/auth/types/esolve-auth-get-response.type.d.ts +2 -0
- package/lib/auth/types/esolve-auth-response-data.type.d.ts +2 -0
- package/lib/auth/{esolve-auth-result.type.d.ts → types/esolve-auth-result.type.d.ts} +1 -1
- package/lib/auth/types/index.d.ts +4 -0
- package/lib/banners/esolve-banner.service.d.ts +2 -2
- package/lib/cart/esolve-cart.service.d.ts +1 -1
- package/lib/category-tree/esolve-category-tree.service.d.ts +2 -2
- package/lib/core/esolve-config.service.d.ts +22 -0
- package/lib/{esolve-connect.config.d.ts → core/esolve-connect.config.d.ts} +20 -2
- package/lib/core/index.d.ts +3 -0
- package/lib/coupons/esolve-coupons.service.d.ts +1 -1
- package/lib/enquiry/esolve-enquiry.service.d.ts +2 -2
- package/lib/images/directives/cdn-src.directive.d.ts +22 -0
- package/lib/images/directives/index.d.ts +1 -0
- package/lib/images/esolve-image-loader.provider.d.ts +2 -0
- package/lib/images/functions/index.d.ts +3 -0
- package/lib/images/functions/is-esolve-cdn-path.function.d.ts +1 -0
- package/lib/images/functions/is-legacy-esolve-cdn-path.function.d.ts +1 -0
- package/lib/images/functions/process-image-src.function.d.ts +1 -0
- package/lib/images/index.d.ts +3 -0
- package/lib/locations/esolve-locations.service.d.ts +1 -1
- package/lib/manufacturers/esolve-manufacturers.service.d.ts +2 -2
- package/lib/menu/esolve-menu.service.d.ts +2 -2
- package/lib/news/esolve-news.service.d.ts +2 -2
- package/lib/ng-esolve-connect.module.d.ts +2 -2
- package/lib/payment/esolve-payment.service.d.ts +1 -1
- package/lib/ranges/esolve-ranges.service.d.ts +1 -1
- package/lib/session/esolve-session-metadata.service.d.ts +3 -3
- package/lib/session/esolve-session.service.d.ts +37 -16
- package/lib/session/index.d.ts +1 -3
- package/lib/session/interfaces/esolve-session.interface.d.ts +5 -0
- package/lib/session/interfaces/index.d.ts +2 -0
- package/lib/shared/assets/esolve-assets.service.d.ts +1 -1
- package/lib/shared/cookie/esolve-cookie.service.d.ts +4 -28
- package/lib/shared/geocoder/esolve-geocoder.service.d.ts +1 -1
- package/lib/shared/response/esolve-get-response.interface.d.ts +1 -1
- package/lib/shared/response/esolve-response.interface.d.ts +2 -2
- package/lib/shared/response/esolve-set-response.interface.d.ts +1 -1
- package/lib/shared/seo/esolve-seo.service.d.ts +2 -2
- package/lib/shipping/esolve-shipping.service.d.ts +1 -1
- package/lib/specials/esolve-specials.service.d.ts +1 -1
- package/lib/stock/esolve-stock.service.d.ts +1 -1
- package/lib/suppliers/esolve-suppliers.service.d.ts +1 -1
- package/lib/tags/esolve-tags.service.d.ts +1 -1
- package/lib/topics/esolve-topic.service.d.ts +1 -1
- package/lib/transactions/esolve-transactions.service.d.ts +4 -6
- package/lib/wishlist/esolve-wishlist.service.d.ts +2 -3
- package/package.json +4 -8
- package/esm2020/lib/auth/esolve-auth-check-data.interface.mjs +0 -2
- package/esm2020/lib/auth/esolve-auth-check-response.type.mjs +0 -2
- package/esm2020/lib/auth/esolve-auth-data.interface.mjs +0 -2
- package/esm2020/lib/auth/esolve-auth-get-data.interface.mjs +0 -2
- package/esm2020/lib/auth/esolve-auth-get-response.type.mjs +0 -2
- package/esm2020/lib/auth/esolve-auth-response-data.type.mjs +0 -2
- package/esm2020/lib/auth/esolve-auth-response.interface.mjs +0 -2
- package/esm2020/lib/auth/esolve-auth-result.type.mjs +0 -2
- package/esm2020/lib/auth/esolve-login-post-response-item.interface.mjs +0 -2
- package/esm2020/lib/esolve-connect-config.constant.mjs +0 -3
- package/esm2020/lib/esolve-connect.config.mjs +0 -2
- package/esm2020/lib/session/esolve-session-data.interface.mjs +0 -2
- package/esm2020/lib/session/esolve-session.model.mjs +0 -37
- package/esm2020/lib/session/esolve-stored-session.interface.mjs +0 -2
- package/lib/auth/esolve-auth-check-data.interface.d.ts +0 -3
- package/lib/auth/esolve-auth-check-response.type.d.ts +0 -3
- package/lib/auth/esolve-auth-get-response.type.d.ts +0 -3
- package/lib/auth/esolve-auth-response-data.type.d.ts +0 -3
- package/lib/auth/esolve-login-post-response-item.interface.d.ts +0 -6
- package/lib/session/esolve-session.model.d.ts +0 -15
- package/lib/session/esolve-stored-session.interface.d.ts +0 -6
- /package/lib/auth/{esolve-auth-get-data.interface.d.ts → interfaces/esolve-auth-get-data.interface.d.ts} +0 -0
- /package/lib/{esolve-connect-config.constant.d.ts → core/esolve-connect-config.constant.d.ts} +0 -0
- /package/lib/session/{esolve-session-data.interface.d.ts → interfaces/esolve-session-data.interface.d.ts} +0 -0
package/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export * from './lib/ng-esolve-connect.module';
|
|
2
|
-
export * from './lib/
|
|
3
|
-
export * from './lib/
|
|
2
|
+
export * from './lib/core';
|
|
3
|
+
export * from './lib/images';
|
|
4
4
|
export * from './lib/shared/esolve-list.model';
|
|
5
5
|
export * from './lib/shared/esolve-result.model';
|
|
6
6
|
export * from './lib/shared/esolve-url-target.type';
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { HttpClient } from '@angular/common/http';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
|
-
import { EsolveConnectConfig } from '../esolve-connect.config';
|
|
4
3
|
import { EsolveResult } from '../shared/esolve-result.model';
|
|
5
4
|
import { EsolveErrorHandlerService } from '../shared/errors';
|
|
6
5
|
import { EsolveResponseHandlerService } from '../shared/response';
|
|
@@ -12,6 +11,7 @@ import { EsolveTransaction, EsolveTransactionOptions, EsolveTransactionList } fr
|
|
|
12
11
|
import { EsolveUserAccount, EsolveUserAccountData, EsolveUserAccountResult, EsolveUserClientAccountBalances } from './user-account';
|
|
13
12
|
import { EsolveAccountConfirmationResult } from './confirmation';
|
|
14
13
|
import { EsolveLocationUpdateResult } from './location';
|
|
14
|
+
import { EsolveConfigService } from '../core';
|
|
15
15
|
import * as i0 from "@angular/core";
|
|
16
16
|
export declare class EsolveAccountService {
|
|
17
17
|
private config;
|
|
@@ -22,7 +22,7 @@ export declare class EsolveAccountService {
|
|
|
22
22
|
private _user_id;
|
|
23
23
|
get user_id(): number;
|
|
24
24
|
set user_id(value: number);
|
|
25
|
-
constructor(config:
|
|
25
|
+
constructor(config: EsolveConfigService, http: HttpClient, sessionService: EsolveSessionService, errorHandler: EsolveErrorHandlerService, responseHandler: EsolveResponseHandlerService);
|
|
26
26
|
updateUserAccount(user_account_data: EsolveUserAccountData): Observable<EsolveUserAccountResult>;
|
|
27
27
|
getUserAccount(): Observable<EsolveUserAccount>;
|
|
28
28
|
deleteUserAccount(): Observable<EsolveResult>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EsolveSessionData } from '../../session
|
|
1
|
+
import { EsolveSessionData } from '../../session';
|
|
2
2
|
import { EsolvePostResponseItem } from '../../shared/response';
|
|
3
3
|
export interface EsolveForgotPasswordResponse extends EsolvePostResponseItem {
|
|
4
4
|
esolve_id: number;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EsolveSessionData } from '../../session
|
|
1
|
+
import { EsolveSessionData } from '../../session';
|
|
2
2
|
import { EsolvePostResponseItem } from '../../shared/response';
|
|
3
3
|
export interface EsolveRegistrationPostResponseItem extends EsolvePostResponseItem {
|
|
4
4
|
esolve_id: number;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { HttpInterceptor, HttpRequest, HttpHandler, HttpEvent } from '@angular/common/http';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { EsolveSessionService } from '../session';
|
|
4
|
+
import { EsolveConfigService } from '../core';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
6
|
export declare class EsolveAuthInterceptorService implements HttpInterceptor {
|
|
7
7
|
private config;
|
|
8
8
|
private session;
|
|
9
|
-
constructor(config:
|
|
9
|
+
constructor(config: EsolveConfigService, session: EsolveSessionService);
|
|
10
10
|
intercept(req: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>>;
|
|
11
11
|
static ɵfac: i0.ɵɵFactoryDeclaration<EsolveAuthInterceptorService, never>;
|
|
12
12
|
static ɵprov: i0.ɵɵInjectableDeclaration<EsolveAuthInterceptorService>;
|
|
@@ -1,26 +1,24 @@
|
|
|
1
1
|
import { HttpClient } from '@angular/common/http';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
|
-
import {
|
|
4
|
-
import { EsolveCookieService } from '../shared/cookie/esolve-cookie.service';
|
|
3
|
+
import { EsolveConfigService } from '../core';
|
|
5
4
|
import { EsolveErrorHandlerService } from '../shared/errors/esolve-error-handler.service';
|
|
6
|
-
import { EsolveSessionService } from '../session
|
|
7
|
-
import { EsolveAuthGetResponse } from './
|
|
5
|
+
import { EsolveSessionService } from '../session';
|
|
6
|
+
import { EsolveAuthGetResponse } from './types';
|
|
8
7
|
import * as i0 from "@angular/core";
|
|
9
8
|
export declare class EsolveAuthService {
|
|
10
9
|
private config;
|
|
11
10
|
private http;
|
|
12
11
|
private session;
|
|
13
12
|
private errorHandler;
|
|
14
|
-
|
|
15
|
-
constructor(config: EsolveConnectConfig, http: HttpClient, session: EsolveSessionService, errorHandler: EsolveErrorHandlerService, cookieService: EsolveCookieService);
|
|
16
|
-
static preValidate(auth: EsolveAuthService): () => Promise<boolean>;
|
|
13
|
+
constructor(config: EsolveConfigService, http: HttpClient, session: EsolveSessionService, errorHandler: EsolveErrorHandlerService);
|
|
17
14
|
getAccessToken(email: string, password: string, anonymous?: boolean): Observable<EsolveAuthGetResponse>;
|
|
15
|
+
getAnonymousSession(): Observable<EsolveAuthGetResponse>;
|
|
18
16
|
autoLogin(): Promise<void>;
|
|
19
17
|
login(email: string, password: string): Observable<number>;
|
|
20
18
|
logout(): Promise<EsolveAuthGetResponse>;
|
|
21
19
|
validateCachedTokens(): Promise<boolean>;
|
|
22
20
|
private checkAccessToken;
|
|
23
|
-
private
|
|
21
|
+
private restore;
|
|
24
22
|
private handleAuthentication;
|
|
25
23
|
private handleError;
|
|
26
24
|
static ɵfac: i0.ɵɵFactoryDeclaration<EsolveAuthService, never>;
|
package/lib/auth/index.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
export * from './esolve-auth.service';
|
|
2
|
-
export * from './esolve-auth-
|
|
3
|
-
export * from './
|
|
2
|
+
export * from './esolve-auth-interceptor.service';
|
|
3
|
+
export * from './types';
|
|
4
|
+
export * from './interfaces';
|
|
5
|
+
export * from './providers';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './esolve-eurus-auto-login.provider';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
+
import { EsolveAuthGetData } from '../interfaces';
|
|
1
2
|
import { EsolveAuthResponseData } from './esolve-auth-response-data.type';
|
|
2
|
-
import { EsolveAuthGetData } from './esolve-auth-get-data.interface';
|
|
3
3
|
export type EsolveAuthResult = EsolveAuthResponseData<EsolveAuthGetData>;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { HttpClient } from '@angular/common/http';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
|
-
import {
|
|
3
|
+
import { EsolveConfigService } from '../core';
|
|
4
4
|
import { EsolveBanner } from './esolve-banner.model';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
6
|
export declare class EsolveBannerService {
|
|
7
7
|
private config;
|
|
8
8
|
private http;
|
|
9
|
-
constructor(config:
|
|
9
|
+
constructor(config: EsolveConfigService, http: HttpClient);
|
|
10
10
|
/**
|
|
11
11
|
* Retrieves banners records from eSolve instance
|
|
12
12
|
*
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HttpClient } from '@angular/common/http';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
|
-
import { EsolveConnectConfig } from '../esolve-connect.config';
|
|
3
|
+
import { EsolveConnectConfig } from '../core/esolve-connect.config';
|
|
4
4
|
import { EsolveErrorHandlerService } from '../shared/errors/esolve-error-handler.service';
|
|
5
5
|
import { EsolveResponseHandlerService } from '../shared/response';
|
|
6
6
|
import { EsolveCouponsService } from '../coupons';
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { HttpClient } from '@angular/common/http';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
|
-
import {
|
|
3
|
+
import { EsolveConfigService } from '../core';
|
|
4
4
|
import { EsolveCategoryTreeItem } from './esolve-category-tree-item.model';
|
|
5
5
|
import { EsolveCategoryTreeItemOptions } from './esolve-category-tree-item-options.interface';
|
|
6
6
|
import * as i0 from "@angular/core";
|
|
7
7
|
export declare class EsolveCategoryTreeService {
|
|
8
8
|
private config;
|
|
9
9
|
private http;
|
|
10
|
-
constructor(config:
|
|
10
|
+
constructor(config: EsolveConfigService, http: HttpClient);
|
|
11
11
|
/**
|
|
12
12
|
* Retrieves the category tree from eSolve instance and coverts it to the correct format.
|
|
13
13
|
*/
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { EsolveConnectConfig } from './esolve-connect.config';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class EsolveConfigService implements EsolveConnectConfig {
|
|
4
|
+
api_url: string;
|
|
5
|
+
wsid: string;
|
|
6
|
+
title_prefix: string;
|
|
7
|
+
title_suffix: string;
|
|
8
|
+
title_separator: string;
|
|
9
|
+
default_seo_title: string;
|
|
10
|
+
default_seo_description: string;
|
|
11
|
+
default_seo_keywords: string;
|
|
12
|
+
native: boolean;
|
|
13
|
+
session_storage_key: string;
|
|
14
|
+
coupon_storage_key: string;
|
|
15
|
+
device_designation: string;
|
|
16
|
+
legacy_cdn?: string;
|
|
17
|
+
cdn?: string;
|
|
18
|
+
error_image_path?: string;
|
|
19
|
+
constructor(config: EsolveConnectConfig);
|
|
20
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<EsolveConfigService, never>;
|
|
21
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<EsolveConfigService>;
|
|
22
|
+
}
|
|
@@ -35,9 +35,9 @@ export interface EsolveConnectConfig {
|
|
|
35
35
|
*/
|
|
36
36
|
default_seo_keywords?: string;
|
|
37
37
|
/**
|
|
38
|
-
* Key for user session local storage (Default is `
|
|
38
|
+
* Key for user session local storage (Default is `_ng_eslv_token`)
|
|
39
39
|
*/
|
|
40
|
-
|
|
40
|
+
session_storage_key?: string;
|
|
41
41
|
/**
|
|
42
42
|
* Key for coupon local storage (Default is `_ng_eslv_coupons`)
|
|
43
43
|
*/
|
|
@@ -52,4 +52,22 @@ export interface EsolveConnectConfig {
|
|
|
52
52
|
* `web`. If none is provided, then the value is assumed to be `web`
|
|
53
53
|
*/
|
|
54
54
|
device_designation?: string;
|
|
55
|
+
/**
|
|
56
|
+
* It is used to specify the URL of a legacy content delivery network (CDN) that may be
|
|
57
|
+
* used for serving static assets such as images, videos, and other media files. This property is
|
|
58
|
+
* optional and may not be used if the application does not require a legacy CDN.
|
|
59
|
+
* @deprecated
|
|
60
|
+
*/
|
|
61
|
+
legacy_cdn?: string;
|
|
62
|
+
/**
|
|
63
|
+
* This property is used to specify the URL of a content delivery network (CDN)
|
|
64
|
+
* that may be used for serving static assets such as images, videos, and other media
|
|
65
|
+
* files. If this property is not provided, the application may not use a CDN.
|
|
66
|
+
*/
|
|
67
|
+
cdn?: string;
|
|
68
|
+
/**
|
|
69
|
+
* Specifies the path to an error image that can be displayed in case of errors or failures in
|
|
70
|
+
* the application. If this property is not provided, `/assets/no_image.jpg` is used instead.
|
|
71
|
+
*/
|
|
72
|
+
error_image_path?: string;
|
|
55
73
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HttpClient } from '@angular/common/http';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
|
-
import { EsolveConnectConfig } from '../esolve-connect.config';
|
|
3
|
+
import { EsolveConnectConfig } from '../core/esolve-connect.config';
|
|
4
4
|
import { EsolveCookieService } from '../shared/cookie/esolve-cookie.service';
|
|
5
5
|
import { EsolveCoupon } from './classes';
|
|
6
6
|
import { EsolveCouponValidationError, EsolveCouponValidationResult } from './interfaces';
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { HttpClient } from '@angular/common/http';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
|
-
import { EsolveConnectConfig } from '../esolve-connect.config';
|
|
4
3
|
import { EsolveErrorHandlerService } from '../shared/errors';
|
|
5
4
|
import { EsolveResponseHandlerService } from '../shared/response';
|
|
6
5
|
import { EsolveEnquiryResult } from './esolve-enquiry-result.model';
|
|
6
|
+
import { EsolveConfigService } from '../core';
|
|
7
7
|
import * as i0 from "@angular/core";
|
|
8
8
|
export declare class EsolveEnquiryService {
|
|
9
9
|
private config;
|
|
10
10
|
private http;
|
|
11
11
|
private errorHandler;
|
|
12
12
|
private responseHandler;
|
|
13
|
-
constructor(config:
|
|
13
|
+
constructor(config: EsolveConfigService, http: HttpClient, errorHandler: EsolveErrorHandlerService, responseHandler: EsolveResponseHandlerService);
|
|
14
14
|
send(form_data: FormData): Observable<EsolveEnquiryResult>;
|
|
15
15
|
static ɵfac: i0.ɵɵFactoryDeclaration<EsolveEnquiryService, never>;
|
|
16
16
|
static ɵprov: i0.ɵɵInjectableDeclaration<EsolveEnquiryService>;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ElementRef, OnChanges } from '@angular/core';
|
|
2
|
+
import { EsolveConfigService } from '../../core';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
/**
|
|
5
|
+
* An alternative to optimised images to load a new image
|
|
6
|
+
*/
|
|
7
|
+
export declare class EsolveCdnSrcDirective implements OnChanges {
|
|
8
|
+
private el;
|
|
9
|
+
private config;
|
|
10
|
+
src: string;
|
|
11
|
+
private no_image;
|
|
12
|
+
private error_image_path;
|
|
13
|
+
constructor(el: ElementRef<HTMLImageElement | HTMLSourceElement>, config: EsolveConfigService);
|
|
14
|
+
ngOnChanges(): void;
|
|
15
|
+
onError(): void;
|
|
16
|
+
init(): void;
|
|
17
|
+
private setSrc;
|
|
18
|
+
private setErrorImage;
|
|
19
|
+
private isImage;
|
|
20
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<EsolveCdnSrcDirective, never>;
|
|
21
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<EsolveCdnSrcDirective, "[eslvCdnSrc]", never, { "src": "eslvCdnSrc"; }, {}, never, never, true, never>;
|
|
22
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './cdn-src.directive';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function isEsolveCdnPath(path: string): boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function isLegacyEsolveCdnPath(path: string): boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function processEsolveImageSrc(src: string, cdn_url?: string, legacy_cdn_url?: string): string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HttpClient } from '@angular/common/http';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
|
-
import { EsolveConnectConfig } from '../esolve-connect.config';
|
|
3
|
+
import { EsolveConnectConfig } from '../core/esolve-connect.config';
|
|
4
4
|
import { EsolveLocation } from './classes/esolve-location.model';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
6
|
export declare class EsolveLocationsService {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { HttpClient } from '@angular/common/http';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
|
-
import {
|
|
3
|
+
import { EsolveConfigService } from '../core';
|
|
4
4
|
import { EsolveManufacturer } from './esolve-manufacturer.model';
|
|
5
5
|
import { EsolveManufacturerOptions } from './esolve-manufacturer-options.interface';
|
|
6
6
|
import * as i0 from "@angular/core";
|
|
7
7
|
export declare class EsolveManufacturersService {
|
|
8
8
|
private config;
|
|
9
9
|
private http;
|
|
10
|
-
constructor(config:
|
|
10
|
+
constructor(config: EsolveConfigService, http: HttpClient);
|
|
11
11
|
getManufacturer(id: number): Observable<EsolveManufacturer>;
|
|
12
12
|
getManufacturerFromSEF(sef_manufacturer: string): Observable<EsolveManufacturer>;
|
|
13
13
|
getManufacturers(options?: EsolveManufacturerOptions): Observable<EsolveManufacturer[]>;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { HttpClient } from '@angular/common/http';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
|
-
import {
|
|
3
|
+
import { EsolveConfigService } from '../core';
|
|
4
4
|
import { EsolveMenu } from './types';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
6
|
export declare class EsolveMenuService {
|
|
7
7
|
private config;
|
|
8
8
|
private http;
|
|
9
|
-
constructor(config:
|
|
9
|
+
constructor(config: EsolveConfigService, http: HttpClient);
|
|
10
10
|
getMenuTree(identifier: string): Observable<EsolveMenu>;
|
|
11
11
|
private handleMenu;
|
|
12
12
|
static ɵfac: i0.ɵɵFactoryDeclaration<EsolveMenuService, never>;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { HttpClient } from '@angular/common/http';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
|
-
import { EsolveConnectConfig } from '../esolve-connect.config';
|
|
4
3
|
import { EsolveNewsArticle } from './esolve-news-article.model';
|
|
5
4
|
import { EsolveNewsGroup } from './esolve-news-group.model';
|
|
6
5
|
import { EsolveNewsArticleList } from './esolve-news-article-list.model';
|
|
7
6
|
import { EsolveNewsArticleOptions } from './esolve-news-article-options.interface';
|
|
7
|
+
import { EsolveConfigService } from '../core';
|
|
8
8
|
import * as i0 from "@angular/core";
|
|
9
9
|
export declare class EsolveNewsService {
|
|
10
10
|
private config;
|
|
11
11
|
private http;
|
|
12
|
-
constructor(config:
|
|
12
|
+
constructor(config: EsolveConfigService, http: HttpClient);
|
|
13
13
|
getNewsArticle(identifier: string): Observable<EsolveNewsArticle>;
|
|
14
14
|
getNewsArticles(options?: EsolveNewsArticleOptions): Observable<EsolveNewsArticleList>;
|
|
15
15
|
getNewsGroups(enable_images?: boolean): Observable<EsolveNewsGroup[]>;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { ModuleWithProviders } from '@angular/core';
|
|
2
|
-
import { EsolveConnectConfig } from './
|
|
2
|
+
import { EsolveConnectConfig } from './core';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
import * as i1 from "@angular/common";
|
|
5
5
|
import * as i2 from "@angular/common/http";
|
|
6
6
|
export declare class NgEsolveConnectModule {
|
|
7
|
-
static forRoot(config: EsolveConnectConfig): ModuleWithProviders<NgEsolveConnectModule>;
|
|
7
|
+
static forRoot(config: EsolveConnectConfig, auto_login?: boolean): ModuleWithProviders<NgEsolveConnectModule>;
|
|
8
8
|
static ɵfac: i0.ɵɵFactoryDeclaration<NgEsolveConnectModule, never>;
|
|
9
9
|
static ɵmod: i0.ɵɵNgModuleDeclaration<NgEsolveConnectModule, never, [typeof i1.CommonModule, typeof i2.HttpClientModule], never>;
|
|
10
10
|
static ɵinj: i0.ɵɵInjectorDeclaration<NgEsolveConnectModule>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HttpClient } from '@angular/common/http';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
|
-
import { EsolveConnectConfig } from '../esolve-connect.config';
|
|
3
|
+
import { EsolveConnectConfig } from '../core/esolve-connect.config';
|
|
4
4
|
import { EsolveErrorHandlerService } from '../shared/errors/esolve-error-handler.service';
|
|
5
5
|
import { EsolveResult } from '../shared/esolve-result.model';
|
|
6
6
|
import { EsolveResponseHandlerService } from '../shared/response';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HttpClient } from '@angular/common/http';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
|
-
import { EsolveConnectConfig } from '../esolve-connect.config';
|
|
3
|
+
import { EsolveConnectConfig } from '../core/esolve-connect.config';
|
|
4
4
|
import { EsolveRange } from './esolve-range.model';
|
|
5
5
|
import { EsolveRangeOptions } from './esolve-range-options.interface';
|
|
6
6
|
import * as i0 from "@angular/core";
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { HttpClient } from '@angular/common/http';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
|
-
import {
|
|
3
|
+
import { EsolveConfigService } from '../core';
|
|
4
4
|
import { EsolveErrorHandlerService } from '../shared/errors';
|
|
5
5
|
import { EsolveResult } from '../shared/esolve-result.model';
|
|
6
|
-
import {
|
|
6
|
+
import { EsolveResponseHandlerService, EsolveResponseResult } from '../shared/response';
|
|
7
7
|
import * as i0 from "@angular/core";
|
|
8
8
|
export declare class EsolveSessionMetadataService {
|
|
9
9
|
private config;
|
|
10
10
|
private http;
|
|
11
11
|
private errorHandler;
|
|
12
12
|
private responseHandler;
|
|
13
|
-
constructor(config:
|
|
13
|
+
constructor(config: EsolveConfigService, http: HttpClient, errorHandler: EsolveErrorHandlerService, responseHandler: EsolveResponseHandlerService);
|
|
14
14
|
set(type: string, metadata: any): Observable<EsolveResponseResult>;
|
|
15
15
|
get<T>(type: string): Observable<T>;
|
|
16
16
|
delete(type: string): Observable<EsolveResult>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Observable } from 'rxjs';
|
|
2
|
+
import { EsolveConfigService } from '../core';
|
|
2
3
|
import { EsolveCookieService } from '../shared/cookie/esolve-cookie.service';
|
|
3
|
-
import {
|
|
4
|
-
import { EsolveSession } from './esolve-session.model';
|
|
4
|
+
import { EsolveSession } from './interfaces';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
6
|
interface SessionUpdateOptions {
|
|
7
7
|
user_id?: number;
|
|
@@ -11,24 +11,45 @@ export declare class EsolveSessionService {
|
|
|
11
11
|
private platformId;
|
|
12
12
|
private config;
|
|
13
13
|
private cookieService;
|
|
14
|
-
|
|
14
|
+
private token$;
|
|
15
|
+
private user_id$;
|
|
16
|
+
private location_id$;
|
|
17
|
+
private state_hash;
|
|
15
18
|
private _session;
|
|
16
|
-
private key_expiration_timer;
|
|
17
19
|
private storage_key;
|
|
18
20
|
private is_browser;
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
21
|
+
private timer_start;
|
|
22
|
+
private timer_stop;
|
|
23
|
+
private expire;
|
|
24
|
+
private session_end;
|
|
25
|
+
constructor(platformId: object, config: EsolveConfigService, cookieService: EsolveCookieService);
|
|
26
|
+
private initSession;
|
|
27
|
+
isValid(): boolean;
|
|
28
|
+
getSession(): Observable<EsolveSession>;
|
|
29
|
+
getSessionValue(): EsolveSession;
|
|
30
|
+
onSessionEnd(): Observable<void>;
|
|
31
|
+
onExpire(): Observable<void>;
|
|
32
|
+
expireSession(): void;
|
|
33
|
+
getToken(): string;
|
|
34
|
+
onTokenUpdate(): Observable<string>;
|
|
35
|
+
updateToken(token: string): void;
|
|
36
|
+
getUserId(): number;
|
|
37
|
+
onUserIdUpdate(): Observable<number>;
|
|
38
|
+
updateUserId(user_id: number): void;
|
|
39
|
+
getLocationId(): number;
|
|
40
|
+
onLocationIdUpdate(): Observable<number>;
|
|
41
|
+
updateLocationId(location_id: number): void;
|
|
42
|
+
getStateHash(): string;
|
|
43
|
+
stopTimer(): void;
|
|
44
|
+
startTimer(time: number | Date): void;
|
|
45
|
+
getCachedSession(): string | null;
|
|
46
|
+
reset(): void;
|
|
47
|
+
handleSession(session: EsolveSession, expiry_date_unix: number, grace_unix: number): void;
|
|
48
|
+
handleUpdateSession({ user_id, location_id, }: SessionUpdateOptions): void;
|
|
27
49
|
private setStorageKey;
|
|
28
|
-
private
|
|
29
|
-
private
|
|
30
|
-
private
|
|
31
|
-
private removeBackup;
|
|
50
|
+
private getCache;
|
|
51
|
+
private setCache;
|
|
52
|
+
private removeCache;
|
|
32
53
|
static ɵfac: i0.ɵɵFactoryDeclaration<EsolveSessionService, never>;
|
|
33
54
|
static ɵprov: i0.ɵɵInjectableDeclaration<EsolveSessionService>;
|
|
34
55
|
}
|
package/lib/session/index.d.ts
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
export * from './esolve-session.model';
|
|
2
|
-
export * from './esolve-session-data.interface';
|
|
3
|
-
export * from './esolve-stored-session.interface';
|
|
4
1
|
export * from './esolve-session.service';
|
|
5
2
|
export * from './esolve-session-metadata.service';
|
|
3
|
+
export * from './interfaces';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HttpClient } from '@angular/common/http';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
|
-
import { EsolveConnectConfig } from '../../esolve-connect.config';
|
|
3
|
+
import { EsolveConnectConfig } from '../../core/esolve-connect.config';
|
|
4
4
|
import { EsolveAssetOptions } from './esolve-asset-options.interface';
|
|
5
5
|
import { EsolveAsset } from './esolve-asset.model';
|
|
6
6
|
import { EsolveAssetList } from './esolve-asset-list.type';
|
|
@@ -1,36 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { CookieService } from 'ngx-cookie-service';
|
|
1
|
+
import { SsrCookieService } from 'ngx-cookie-service-ssr';
|
|
3
2
|
import * as i0 from "@angular/core";
|
|
4
3
|
export declare class EsolveCookieService {
|
|
5
|
-
private
|
|
6
|
-
|
|
7
|
-
private request;
|
|
8
|
-
private response;
|
|
9
|
-
private is_browser;
|
|
10
|
-
constructor(ngxCookies: CookieService, platformId: object, request: Request, response: Response);
|
|
4
|
+
private cookieService;
|
|
5
|
+
constructor(cookieService: SsrCookieService);
|
|
11
6
|
check(name: string): boolean;
|
|
12
7
|
get(name: string): string;
|
|
13
8
|
set(name: string, value: string, expires?: Date, path?: string, domain?: string, secure?: boolean): void;
|
|
14
9
|
delete(name: string, path?: string, domain?: string, secure?: boolean): void;
|
|
15
|
-
|
|
16
|
-
* Get cookie Regular Expression
|
|
17
|
-
*
|
|
18
|
-
* @param name Cookie name
|
|
19
|
-
* @returns property RegExp
|
|
20
|
-
*
|
|
21
|
-
* @link https://github.com/stevermeister/ngx-cookie-service/blob/bcb6ac203487c487fcd126896bffaa14981c709c/projects/ngx-cookie-service/src/lib/cookie.service.ts#L31
|
|
22
|
-
*/
|
|
23
|
-
private getCookieRegExp;
|
|
24
|
-
/**
|
|
25
|
-
* Gets the unencoded version of an encoded component of a Uniform Resource Identifier (URI).
|
|
26
|
-
*
|
|
27
|
-
* @param encodedURIComponent A value representing an encoded URI component.
|
|
28
|
-
*
|
|
29
|
-
* @returns The unencoded version of an encoded component of a Uniform Resource Identifier (URI).
|
|
30
|
-
*
|
|
31
|
-
* @link https://github.com/stevermeister/ngx-cookie-service/blob/bcb6ac203487c487fcd126896bffaa14981c709c/projects/ngx-cookie-service/src/lib/cookie.service.ts#L47
|
|
32
|
-
*/
|
|
33
|
-
private safeDecodeURIComponent;
|
|
34
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<EsolveCookieService, [null, null, { optional: true; }, { optional: true; }]>;
|
|
10
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<EsolveCookieService, never>;
|
|
35
11
|
static ɵprov: i0.ɵɵInjectableDeclaration<EsolveCookieService>;
|
|
36
12
|
}
|