@esolve/ng-esolve-connect 0.47.2 → 0.48.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/esm2022/lib/locations/classes/esolve-location.model.mjs +4 -1
- package/esm2022/lib/locations/esolve-locations.service.mjs +1 -1
- package/esm2022/lib/locations/interfaces/esolve-location-record.interface.mjs +1 -1
- package/esm2022/lib/shipping/esolve-shipping.service.mjs +4 -1
- package/esm2022/lib/shipping/interfaces/esolve-shipping-method-options.interface.mjs +1 -1
- package/esm2022/media/lib/classes/esolve-media-layout-section.model.mjs +1 -1
- package/esm2022/media/lib/interfaces/esolve-layout-config.interface.mjs +1 -1
- package/esm2022/media/lib/interfaces/esolve-media-layout-section-record.interface.mjs +1 -1
- package/esm2022/media/lib/interfaces/esolve-media-section-data-generic.interface.mjs +2 -0
- package/esm2022/media/lib/interfaces/esolve-media-stock-section-data.interface.mjs +2 -0
- package/esm2022/media/lib/interfaces/index.mjs +3 -1
- package/esm2022/media/lib/services/esolve-media-layout.service.mjs +7 -2
- package/esm2022/media/lib/types/esolve-media-layout-section-type.type.mjs +1 -1
- package/fesm2022/esolve-ng-esolve-connect-media.mjs +6 -1
- package/fesm2022/esolve-ng-esolve-connect-media.mjs.map +1 -1
- package/fesm2022/esolve-ng-esolve-connect.mjs +6 -0
- package/fesm2022/esolve-ng-esolve-connect.mjs.map +1 -1
- package/lib/locations/classes/esolve-location.model.d.ts +8 -3
- package/lib/locations/esolve-locations.service.d.ts +6 -5
- package/lib/locations/interfaces/esolve-location-record.interface.d.ts +3 -1
- package/lib/shipping/interfaces/esolve-shipping-method-options.interface.d.ts +2 -0
- package/media/lib/classes/esolve-media-layout-section.model.d.ts +2 -2
- package/media/lib/interfaces/esolve-layout-config.interface.d.ts +4 -0
- package/media/lib/interfaces/esolve-media-layout-section-record.interface.d.ts +2 -1
- package/media/lib/interfaces/esolve-media-section-data-generic.interface.d.ts +6 -0
- package/media/lib/interfaces/esolve-media-stock-section-data.interface.d.ts +3 -0
- package/media/lib/interfaces/index.d.ts +2 -0
- package/media/lib/services/esolve-media-layout.service.d.ts +2 -0
- package/media/lib/types/esolve-media-layout-section-type.type.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { EsolveLocationRecord } from '../interfaces
|
|
1
|
+
import { EsolveLocationRecord } from '../interfaces';
|
|
2
2
|
import { EsolveLocationAddress } from './esolve-location-address.model';
|
|
3
3
|
import { EsolveLocationContactInfo } from './esolve-location-contact-info.model';
|
|
4
4
|
import { EsolveLocationPOBoxAddress } from './esolve-location-pobox-address.model';
|
|
5
5
|
import { EsolveLocationTradingTimes } from './esolve-location-trading-times.model';
|
|
6
6
|
import { EsolveLocationGEO } from './esolve-location-geo.model';
|
|
7
|
-
|
|
7
|
+
import { EsolveCustomFields } from '../../shared/custom-fields';
|
|
8
|
+
export declare class EsolveLocation<T extends EsolveCustomFields = EsolveCustomFields> {
|
|
8
9
|
id: number;
|
|
9
10
|
identifier: string;
|
|
10
11
|
description: string;
|
|
@@ -24,5 +25,9 @@ export declare class EsolveLocation {
|
|
|
24
25
|
contact_info: EsolveLocationContactInfo;
|
|
25
26
|
trading_times: EsolveLocationTradingTimes;
|
|
26
27
|
geo?: EsolveLocationGEO;
|
|
27
|
-
|
|
28
|
+
/**
|
|
29
|
+
* Location custom fields
|
|
30
|
+
*/
|
|
31
|
+
custom_fields?: T;
|
|
32
|
+
constructor(record: EsolveLocationRecord<T>);
|
|
28
33
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { Observable } from 'rxjs';
|
|
2
|
+
import { EsolveCustomFields } from '../shared/custom-fields';
|
|
2
3
|
import { EsolveLocation } from './classes/esolve-location.model';
|
|
3
4
|
import * as i0 from "@angular/core";
|
|
4
|
-
export declare class EsolveLocationsService {
|
|
5
|
+
export declare class EsolveLocationsService<T extends EsolveCustomFields = EsolveCustomFields> {
|
|
5
6
|
private readonly config;
|
|
6
7
|
private readonly http;
|
|
7
8
|
/**
|
|
@@ -9,7 +10,7 @@ export declare class EsolveLocationsService {
|
|
|
9
10
|
*
|
|
10
11
|
* @returns An `Observable` with an array of stock locations
|
|
11
12
|
*/
|
|
12
|
-
getStockLocations(): Observable<EsolveLocation[]>;
|
|
13
|
+
getStockLocations(): Observable<EsolveLocation<T>[]>;
|
|
13
14
|
/**
|
|
14
15
|
* Retrieves a list of stock locations using the address_id as parameter or the latitude and longitude.
|
|
15
16
|
* Set the addresses_id to 0 and the gps coordinates in order to retrieve the locations list when the address isn't
|
|
@@ -21,7 +22,7 @@ export declare class EsolveLocationsService {
|
|
|
21
22
|
*
|
|
22
23
|
* @returns An `Observable` with an array of stock locations
|
|
23
24
|
*/
|
|
24
|
-
getStockLocationsGeo(addresses_id?: number, latitude?: number, longitude?: number): Observable<EsolveLocation[]>;
|
|
25
|
+
getStockLocationsGeo(addresses_id?: number, latitude?: number, longitude?: number): Observable<EsolveLocation<T>[]>;
|
|
25
26
|
/**
|
|
26
27
|
* Processes the eSolve stock location records.
|
|
27
28
|
*
|
|
@@ -29,6 +30,6 @@ export declare class EsolveLocationsService {
|
|
|
29
30
|
* @returns An array of processed stock location records
|
|
30
31
|
*/
|
|
31
32
|
private processStockLocations;
|
|
32
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<EsolveLocationsService
|
|
33
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<EsolveLocationsService
|
|
33
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<EsolveLocationsService<any>, never>;
|
|
34
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<EsolveLocationsService<any>>;
|
|
34
35
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
import { EsolveCustomFields } from '../../shared/custom-fields';
|
|
2
|
+
export interface EsolveLocationRecord<T extends EsolveCustomFields = EsolveCustomFields> {
|
|
2
3
|
id: number;
|
|
3
4
|
identifier: string;
|
|
4
5
|
head_office: boolean;
|
|
@@ -50,4 +51,5 @@ export interface EsolveLocationRecord {
|
|
|
50
51
|
distance: number;
|
|
51
52
|
range: number;
|
|
52
53
|
target_description: string;
|
|
54
|
+
custom_fields?: T;
|
|
53
55
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EsolveMediaLayoutSectionRecord } from '../interfaces';
|
|
1
|
+
import { EsolveMediaLayoutSectionRecord, EsolveMediaSectionDataGeneric } from '../interfaces';
|
|
2
2
|
import { EsolveMediaLayoutSectionType } from '../types';
|
|
3
3
|
export declare class EsolveMediaLayoutSection {
|
|
4
4
|
type: EsolveMediaLayoutSectionType;
|
|
@@ -6,5 +6,5 @@ export declare class EsolveMediaLayoutSection {
|
|
|
6
6
|
identifier: string;
|
|
7
7
|
private data?;
|
|
8
8
|
constructor(record: EsolveMediaLayoutSectionRecord);
|
|
9
|
-
getData<T>(): T | null;
|
|
9
|
+
getData<T = EsolveMediaSectionDataGeneric>(): T | null;
|
|
10
10
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { EsolveMediaLayoutSectionType } from '../types';
|
|
2
|
+
import { EsolveMediaSectionDataGeneric } from './esolve-media-section-data-generic.interface';
|
|
2
3
|
export interface EsolveMediaLayoutSectionRecord {
|
|
3
4
|
type: EsolveMediaLayoutSectionType;
|
|
4
5
|
sub_type?: string;
|
|
5
6
|
identifier: string;
|
|
6
|
-
data?:
|
|
7
|
+
data?: EsolveMediaSectionDataGeneric | null;
|
|
7
8
|
}
|
|
@@ -6,3 +6,5 @@ export * from './esolve-media-group-record.interface';
|
|
|
6
6
|
export * from './esolve-media-layout-section-record.interface';
|
|
7
7
|
export * from './esolve-media-link-record.interface';
|
|
8
8
|
export * from './esolve-connect-media-config.interface';
|
|
9
|
+
export * from './esolve-media-section-data-generic.interface';
|
|
10
|
+
export * from './esolve-media-stock-section-data.interface';
|
|
@@ -3,6 +3,8 @@ import { EsolveMediaArticle, EsolveMediaLayoutSection } from '../classes';
|
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
export declare class EsolveMediaLayoutService {
|
|
5
5
|
private readonly section_key_delimiter;
|
|
6
|
+
private readonly default_section_group_key;
|
|
7
|
+
private readonly default_layout_key;
|
|
6
8
|
private media?;
|
|
7
9
|
private layout_map;
|
|
8
10
|
private section_map;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export type EsolveMediaLayoutSectionType = 'media' | 'banner' | 'linked_stock' | 'custom';
|
|
1
|
+
export type EsolveMediaLayoutSectionType = 'media' | 'banner' | 'linked_stock' | 'stock' | 'custom';
|