@esolve/ng-esolve-connect 0.31.1 → 0.32.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2020/lib/cart/esolve-cart.service.mjs +3 -2
- package/esm2020/lib/cart/interfaces/esolve-time-slot-checkout.interface.mjs +2 -0
- package/esm2020/lib/cart/interfaces/index.mjs +2 -1
- package/esm2020/lib/menu/esolve-menu-item.model.mjs +24 -6
- package/esm2020/lib/menu/esolve-menu.service.mjs +3 -3
- package/esm2020/lib/shipping/classes/esolve-shipping-cost.model.mjs +12 -0
- package/esm2020/lib/shipping/classes/esolve-shipping-method.model.mjs +33 -0
- package/esm2020/lib/shipping/classes/esolve-shipping-totals.model.mjs +8 -0
- package/esm2020/lib/shipping/classes/esolve-time-slot-config.model.mjs +17 -0
- package/esm2020/lib/shipping/classes/esolve-time-slot-date.model.mjs +14 -0
- package/esm2020/lib/shipping/classes/esolve-time-slot-days.model.mjs +21 -0
- package/esm2020/lib/shipping/classes/esolve-time-slot-times.model.mjs +11 -0
- package/esm2020/lib/shipping/classes/esolve-time-slot.model.mjs +19 -0
- package/esm2020/lib/shipping/classes/index.mjs +9 -0
- package/esm2020/lib/shipping/esolve-shipping.service.mjs +32 -3
- package/esm2020/lib/shipping/index.mjs +4 -10
- package/esm2020/lib/shipping/interfaces/esolve-shipping-cost-record.interface.mjs +2 -0
- package/esm2020/lib/shipping/interfaces/esolve-shipping-method-options.interface.mjs +2 -0
- package/esm2020/lib/shipping/interfaces/esolve-shipping-method-record.interface.mjs +2 -0
- package/esm2020/lib/shipping/interfaces/esolve-time-slot-config-record.interface.mjs +2 -0
- package/esm2020/lib/shipping/interfaces/esolve-time-slot-date-record.interface.mjs +2 -0
- package/esm2020/lib/shipping/interfaces/esolve-time-slot-days-record.interface.mjs +2 -0
- package/esm2020/lib/shipping/interfaces/esolve-time-slot-record.interface.mjs +2 -0
- package/esm2020/lib/shipping/interfaces/esolve-time-slot-times-record.interface.mjs +2 -0
- package/esm2020/lib/shipping/interfaces/index.mjs +9 -0
- package/esm2020/lib/shipping/types/esolve-insurance-calculation-method.type.mjs +2 -0
- package/esm2020/lib/shipping/types/esolve-shipping-calculation-method.type.mjs +2 -0
- package/esm2020/lib/shipping/types/esolve-shipping-location.type.mjs +2 -0
- package/esm2020/lib/shipping/types/index.mjs +4 -0
- package/fesm2015/esolve-ng-esolve-connect-survey.mjs +1 -0
- package/fesm2015/esolve-ng-esolve-connect.mjs +150 -23
- package/fesm2015/esolve-ng-esolve-connect.mjs.map +1 -1
- package/fesm2020/esolve-ng-esolve-connect-survey.mjs +1 -0
- package/fesm2020/esolve-ng-esolve-connect.mjs +149 -23
- package/fesm2020/esolve-ng-esolve-connect.mjs.map +1 -1
- package/lib/cart/esolve-cart.service.d.ts +2 -2
- package/lib/cart/interfaces/esolve-time-slot-checkout.interface.d.ts +5 -0
- package/lib/cart/interfaces/index.d.ts +1 -0
- package/lib/menu/esolve-menu-item.model.d.ts +6 -2
- package/lib/shipping/{esolve-shipping-method.model.d.ts → classes/esolve-shipping-method.model.d.ts} +1 -3
- package/lib/shipping/classes/esolve-time-slot-config.model.d.ts +8 -0
- package/lib/shipping/classes/esolve-time-slot-date.model.d.ts +7 -0
- package/lib/shipping/classes/esolve-time-slot-days.model.d.ts +11 -0
- package/lib/shipping/classes/esolve-time-slot-times.model.d.ts +6 -0
- package/lib/shipping/classes/esolve-time-slot.model.d.ts +12 -0
- package/lib/shipping/classes/index.d.ts +8 -0
- package/lib/shipping/esolve-shipping.service.d.ts +10 -3
- package/lib/shipping/index.d.ts +3 -9
- package/lib/shipping/{esolve-shipping-method-record.interface.d.ts → interfaces/esolve-shipping-method-record.interface.d.ts} +1 -3
- package/lib/shipping/interfaces/esolve-time-slot-config-record.interface.d.ts +6 -0
- package/lib/shipping/interfaces/esolve-time-slot-date-record.interface.d.ts +6 -0
- package/lib/shipping/interfaces/esolve-time-slot-days-record.interface.d.ts +9 -0
- package/lib/shipping/interfaces/esolve-time-slot-record.interface.d.ts +10 -0
- package/lib/shipping/interfaces/esolve-time-slot-times-record.interface.d.ts +4 -0
- package/lib/shipping/interfaces/index.d.ts +8 -0
- package/lib/shipping/types/index.d.ts +3 -0
- package/package.json +1 -1
- package/esm2020/lib/shipping/esolve-insurance-calculation-method.type.mjs +0 -2
- package/esm2020/lib/shipping/esolve-shipping-calculation-method.type.mjs +0 -2
- package/esm2020/lib/shipping/esolve-shipping-cost-record.interface.mjs +0 -2
- package/esm2020/lib/shipping/esolve-shipping-cost.model.mjs +0 -12
- package/esm2020/lib/shipping/esolve-shipping-location.type.mjs +0 -2
- package/esm2020/lib/shipping/esolve-shipping-method-options.interface.mjs +0 -2
- package/esm2020/lib/shipping/esolve-shipping-method-record.interface.mjs +0 -2
- package/esm2020/lib/shipping/esolve-shipping-method.model.mjs +0 -33
- package/esm2020/lib/shipping/esolve-shipping-totals.model.mjs +0 -8
- /package/lib/shipping/{esolve-shipping-cost.model.d.ts → classes/esolve-shipping-cost.model.d.ts} +0 -0
- /package/lib/shipping/{esolve-shipping-totals.model.d.ts → classes/esolve-shipping-totals.model.d.ts} +0 -0
- /package/lib/shipping/{esolve-shipping-cost-record.interface.d.ts → interfaces/esolve-shipping-cost-record.interface.d.ts} +0 -0
- /package/lib/shipping/{esolve-shipping-method-options.interface.d.ts → interfaces/esolve-shipping-method-options.interface.d.ts} +0 -0
- /package/lib/shipping/{esolve-insurance-calculation-method.type.d.ts → types/esolve-insurance-calculation-method.type.d.ts} +0 -0
- /package/lib/shipping/{esolve-shipping-calculation-method.type.d.ts → types/esolve-shipping-calculation-method.type.d.ts} +0 -0
- /package/lib/shipping/{esolve-shipping-location.type.d.ts → types/esolve-shipping-location.type.d.ts} +0 -0
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export {};
|
|
2
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXNvbHZlLXRpbWUtc2xvdC10aW1lcy1yZWNvcmQuaW50ZXJmYWNlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vbGlicy9uZy1lc29sdmUtY29ubmVjdC9zcmMvbGliL3NoaXBwaW5nL2ludGVyZmFjZXMvZXNvbHZlLXRpbWUtc2xvdC10aW1lcy1yZWNvcmQuaW50ZXJmYWNlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiIiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgaW50ZXJmYWNlIEVzb2x2ZVRpbWVTbG90VGltZXNSZWNvcmQge1xyXG4gICAgb3Blbjogc3RyaW5nO1xyXG4gICAgY2xvc2U6IHN0cmluZztcclxufVxyXG4iXX0=
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * from './esolve-shipping-cost-record.interface';
|
|
2
|
+
export * from './esolve-shipping-method-options.interface';
|
|
3
|
+
export * from './esolve-shipping-method-record.interface';
|
|
4
|
+
export * from './esolve-time-slot-config-record.interface';
|
|
5
|
+
export * from './esolve-time-slot-date-record.interface';
|
|
6
|
+
export * from './esolve-time-slot-days-record.interface';
|
|
7
|
+
export * from './esolve-time-slot-record.interface';
|
|
8
|
+
export * from './esolve-time-slot-times-record.interface';
|
|
9
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9saWJzL25nLWVzb2x2ZS1jb25uZWN0L3NyYy9saWIvc2hpcHBpbmcvaW50ZXJmYWNlcy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxjQUFjLHlDQUF5QyxDQUFDO0FBQ3hELGNBQWMsNENBQTRDLENBQUM7QUFDM0QsY0FBYywyQ0FBMkMsQ0FBQztBQUMxRCxjQUFjLDRDQUE0QyxDQUFDO0FBQzNELGNBQWMsMENBQT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ingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXNvbHZlLXNoaXBwaW5nLWxvY2F0aW9uLnR5cGUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9saWJzL25nLWVzb2x2ZS1jb25uZWN0L3NyYy9saWIvc2hpcHBpbmcvdHlwZXMvZXNvbHZlLXNoaXBwaW5nLWxvY2F0aW9uLnR5cGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCB0eXBlIEVzb2x2ZVNoaXBwaW5nTG9jYXRpb24gPVxyXG4gICAgJ0RvbWVzdGljJyB8XHJcbiAgICAnSW50ZXJuYXRpb25hbCcgfFxyXG4gICAgJ0RvbWVzdGljIGFuZCBJbnRlcm5hdGlvbmFsJztcclxuIl19
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export * from './esolve-insurance-calculation-method.type';
|
|
2
|
+
export * from './esolve-shipping-calculation-method.type';
|
|
3
|
+
export * from './esolve-shipping-location.type';
|
|
4
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9saWJzL25nLWVzb2x2ZS1jb25uZWN0L3NyYy9saWIvc2hpcHBpbmcvdHlwZXMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsY0FBYyw0Q0FBNEMsQ0FBQztBQUMzRCxjQUFjLDJDQUEyQyxDQUFDO0FBQzFELGNBQWMsaUNBQWlDLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgKiBmcm9tICcuL2Vzb2x2ZS1pbnN1cmFuY2UtY2FsY3VsYXRpb24tbWV0aG9kLnR5cGUnO1xyXG5leHBvcnQgKiBmcm9tICcuL2Vzb2x2ZS1zaGlwcGluZy1jYWxjdWxhdGlvbi1tZXRob2QudHlwZSc7XHJcbmV4cG9ydCAqIGZyb20gJy4vZXNvbHZlLXNoaXBwaW5nLWxvY2F0aW9uLnR5cGUnO1xyXG4iXX0=
|
|
@@ -321,3 +321,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.3", ngImpor
|
|
|
321
321
|
|
|
322
322
|
export { EsolveSurvey, EsolveSurveyAnswerResult, EsolveSurveyCheckQuestion, EsolveSurveyInputQuestion, EsolveSurveyOptionsQuestion, EsolveSurveyQuestion, EsolveSurveyRadioQuestion, EsolveSurveyRatingQuestion, EsolveSurveySelectQuestion, EsolveSurveyService, EsolveSurveyTextQuestion, EsolveSurveyTextareaQuestion, EsolveSurveyValuesQuestion, NgEsolveConnectSurveyModule };
|
|
323
323
|
//# sourceMappingURL=esolve-ng-esolve-connect-survey.mjs.map
|
|
324
|
+
//# sourceMappingURL=esolve-ng-esolve-connect-survey.mjs.map
|
|
@@ -3179,7 +3179,7 @@ class EsolveCartService {
|
|
|
3179
3179
|
*
|
|
3180
3180
|
* @returns An `Observable` with the transaction ID
|
|
3181
3181
|
*/
|
|
3182
|
-
checkout(type, addresses_id, shipping_id, payment_method_id = 0, location_id = 0, comments = '') {
|
|
3182
|
+
checkout(type, addresses_id, shipping_id, payment_method_id = 0, location_id = 0, comments = '', time_slot) {
|
|
3183
3183
|
const body = {
|
|
3184
3184
|
type,
|
|
3185
3185
|
addresses_id,
|
|
@@ -3188,6 +3188,7 @@ class EsolveCartService {
|
|
|
3188
3188
|
location_id,
|
|
3189
3189
|
comments,
|
|
3190
3190
|
tracking: 0,
|
|
3191
|
+
time_slot,
|
|
3191
3192
|
};
|
|
3192
3193
|
return this.getTrackingCode().pipe(switchMap((tracking) => {
|
|
3193
3194
|
if (tracking <= 0) {
|
|
@@ -3770,11 +3771,30 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.3", ngImpor
|
|
|
3770
3771
|
// Types
|
|
3771
3772
|
|
|
3772
3773
|
class EsolveMenuItem {
|
|
3773
|
-
constructor(
|
|
3774
|
-
|
|
3775
|
-
this.
|
|
3776
|
-
this.
|
|
3777
|
-
this.
|
|
3774
|
+
constructor(record) {
|
|
3775
|
+
var _a, _b, _c, _d;
|
|
3776
|
+
this.id = 0;
|
|
3777
|
+
this.url = '';
|
|
3778
|
+
this.name = '';
|
|
3779
|
+
this.module = '';
|
|
3780
|
+
this.target = '_self';
|
|
3781
|
+
this.children = [];
|
|
3782
|
+
if (record) {
|
|
3783
|
+
this.id = +((_a = record.id) !== null && _a !== void 0 ? _a : 0);
|
|
3784
|
+
this.url = (_b = record.url) !== null && _b !== void 0 ? _b : '';
|
|
3785
|
+
this.name = (_c = record.name) !== null && _c !== void 0 ? _c : '';
|
|
3786
|
+
this.module = (_d = record.module) !== null && _d !== void 0 ? _d : '';
|
|
3787
|
+
if (record.target &&
|
|
3788
|
+
(record.target === '_self' || record.target === '_blank')) {
|
|
3789
|
+
this.target = record.target;
|
|
3790
|
+
}
|
|
3791
|
+
if (typeof record.children !== 'undefined' &&
|
|
3792
|
+
Array.isArray(record.children)) {
|
|
3793
|
+
for (const child of record.children) {
|
|
3794
|
+
this.children.push(new EsolveMenuItem(child));
|
|
3795
|
+
}
|
|
3796
|
+
}
|
|
3797
|
+
}
|
|
3778
3798
|
}
|
|
3779
3799
|
}
|
|
3780
3800
|
|
|
@@ -3799,8 +3819,8 @@ class EsolveMenuService {
|
|
|
3799
3819
|
handleMenu(records) {
|
|
3800
3820
|
const menu = [];
|
|
3801
3821
|
if (typeof records !== 'undefined') {
|
|
3802
|
-
for (const
|
|
3803
|
-
menu.push(new EsolveMenuItem(
|
|
3822
|
+
for (const record of records) {
|
|
3823
|
+
menu.push(new EsolveMenuItem(record));
|
|
3804
3824
|
}
|
|
3805
3825
|
}
|
|
3806
3826
|
return menu;
|
|
@@ -5497,6 +5517,25 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.3", ngImpor
|
|
|
5497
5517
|
}] }, { type: i1$2.HttpClient }, { type: EsolveErrorHandlerService }, { type: EsolveResponseHandlerService }];
|
|
5498
5518
|
} });
|
|
5499
5519
|
|
|
5520
|
+
class EsolveShippingTotals {
|
|
5521
|
+
constructor(total, vat, savings) {
|
|
5522
|
+
this.total = total;
|
|
5523
|
+
this.vat = vat;
|
|
5524
|
+
this.savings = savings;
|
|
5525
|
+
}
|
|
5526
|
+
}
|
|
5527
|
+
|
|
5528
|
+
class EsolveShippingCost {
|
|
5529
|
+
constructor(
|
|
5530
|
+
// Shipping
|
|
5531
|
+
shipping_total = 0, shipping_vat = 0, shipping_total_savings = 0,
|
|
5532
|
+
// Insurance
|
|
5533
|
+
insurance_total = 0, insurance_vat = 0, insurance_total_savings = 0) {
|
|
5534
|
+
this.shipping = new EsolveShippingTotals(shipping_total, shipping_vat, shipping_total_savings);
|
|
5535
|
+
this.insurance = new EsolveShippingTotals(insurance_total, insurance_vat, insurance_total_savings);
|
|
5536
|
+
}
|
|
5537
|
+
}
|
|
5538
|
+
|
|
5500
5539
|
class EsolveShippingMethod {
|
|
5501
5540
|
constructor(id, carrier_name, delivery_category, description, location, pricing, link_to_carrier_website, days_to_deliver, shipping_cost_calculation_method, insurance_cost_calculation_method, insurance_cost_percentage, metric_factor, allow_immediate_payment_processing, allow_postal_address, allow_physical_address, client_to_collect, is_default, location_id, use_zones, min_distance, max_distance, shipping_surge_condition, shipping_surge_percentage, sort_priority, shipping_group, shipping_slot_identifier, shipping_slot_delay_hours, image_url) {
|
|
5502
5541
|
this.id = id;
|
|
@@ -5530,22 +5569,81 @@ class EsolveShippingMethod {
|
|
|
5530
5569
|
}
|
|
5531
5570
|
}
|
|
5532
5571
|
|
|
5533
|
-
class
|
|
5534
|
-
constructor(
|
|
5535
|
-
this.
|
|
5536
|
-
this.
|
|
5537
|
-
|
|
5572
|
+
class EsolveTimeSlotDate {
|
|
5573
|
+
constructor(record) {
|
|
5574
|
+
this.time_slots_id = 0;
|
|
5575
|
+
this.available = 0;
|
|
5576
|
+
let timestamp = 0;
|
|
5577
|
+
if (record) {
|
|
5578
|
+
this.time_slots_id = record.time_slots_id;
|
|
5579
|
+
this.available = record.available;
|
|
5580
|
+
timestamp = record.timestamp * 1000;
|
|
5581
|
+
}
|
|
5582
|
+
this.date = new Date(timestamp);
|
|
5538
5583
|
}
|
|
5539
5584
|
}
|
|
5540
5585
|
|
|
5541
|
-
class
|
|
5542
|
-
constructor(
|
|
5543
|
-
|
|
5544
|
-
|
|
5545
|
-
|
|
5546
|
-
|
|
5547
|
-
this.
|
|
5548
|
-
this.
|
|
5586
|
+
class EsolveTimeSlotDays {
|
|
5587
|
+
constructor(record) {
|
|
5588
|
+
this.mon = false;
|
|
5589
|
+
this.tue = false;
|
|
5590
|
+
this.wed = false;
|
|
5591
|
+
this.thu = false;
|
|
5592
|
+
this.fri = false;
|
|
5593
|
+
this.sat = false;
|
|
5594
|
+
this.sun = false;
|
|
5595
|
+
if (record) {
|
|
5596
|
+
this.mon = record.mon;
|
|
5597
|
+
this.tue = record.tue;
|
|
5598
|
+
this.wed = record.wed;
|
|
5599
|
+
this.thu = record.thu;
|
|
5600
|
+
this.fri = record.fri;
|
|
5601
|
+
this.sat = record.sat;
|
|
5602
|
+
this.sun = record.sun;
|
|
5603
|
+
}
|
|
5604
|
+
}
|
|
5605
|
+
}
|
|
5606
|
+
|
|
5607
|
+
class EsolveTimeSlotTimes {
|
|
5608
|
+
constructor(record) {
|
|
5609
|
+
this.open = '00:00';
|
|
5610
|
+
this.close = '23:59';
|
|
5611
|
+
if (record) {
|
|
5612
|
+
this.open = record.open;
|
|
5613
|
+
this.close = record.close;
|
|
5614
|
+
}
|
|
5615
|
+
}
|
|
5616
|
+
}
|
|
5617
|
+
|
|
5618
|
+
class EsolveTimeSlot {
|
|
5619
|
+
constructor(record) {
|
|
5620
|
+
this.id = 0;
|
|
5621
|
+
this.identifier = '';
|
|
5622
|
+
this.name = '';
|
|
5623
|
+
this.limit = 0;
|
|
5624
|
+
if (record) {
|
|
5625
|
+
this.id = record.id;
|
|
5626
|
+
this.identifier = record.identifier;
|
|
5627
|
+
this.name = record.name;
|
|
5628
|
+
this.limit = record.limit;
|
|
5629
|
+
}
|
|
5630
|
+
this.days = new EsolveTimeSlotDays(record === null || record === void 0 ? void 0 : record.days);
|
|
5631
|
+
this.times = new EsolveTimeSlotTimes(record === null || record === void 0 ? void 0 : record.times);
|
|
5632
|
+
}
|
|
5633
|
+
}
|
|
5634
|
+
|
|
5635
|
+
class EsolveTimeSlotConfig {
|
|
5636
|
+
constructor(record) {
|
|
5637
|
+
this.slots = [];
|
|
5638
|
+
this.dates = [];
|
|
5639
|
+
if (record) {
|
|
5640
|
+
for (const slot_record of record.slots) {
|
|
5641
|
+
this.slots.push(new EsolveTimeSlot(slot_record));
|
|
5642
|
+
}
|
|
5643
|
+
for (const date_record of record.dates) {
|
|
5644
|
+
this.dates.push(new EsolveTimeSlotDate(date_record));
|
|
5645
|
+
}
|
|
5646
|
+
}
|
|
5549
5647
|
}
|
|
5550
5648
|
}
|
|
5551
5649
|
|
|
@@ -5620,6 +5718,36 @@ class EsolveShippingService {
|
|
|
5620
5718
|
return throwError(() => err);
|
|
5621
5719
|
}
|
|
5622
5720
|
}
|
|
5721
|
+
/**
|
|
5722
|
+
* Retrieves the time slot config from a shipping method
|
|
5723
|
+
*
|
|
5724
|
+
* @param shipping_id
|
|
5725
|
+
*
|
|
5726
|
+
* @returns An `Observable` with the time slots configurations
|
|
5727
|
+
*/
|
|
5728
|
+
getTimeSlots(shipping_id) {
|
|
5729
|
+
try {
|
|
5730
|
+
let params = new HttpParams();
|
|
5731
|
+
if (typeof shipping_id === 'undefined') {
|
|
5732
|
+
throw new Error('Shipping ID is required');
|
|
5733
|
+
}
|
|
5734
|
+
else {
|
|
5735
|
+
params = params.set('shipping_id', shipping_id);
|
|
5736
|
+
}
|
|
5737
|
+
return this.http
|
|
5738
|
+
.get(`${this.config.api_url}/get-time-slots.php`, { params })
|
|
5739
|
+
.pipe(map((response) => {
|
|
5740
|
+
if (response.records === undefined ||
|
|
5741
|
+
Array.isArray(response.records)) {
|
|
5742
|
+
throw response;
|
|
5743
|
+
}
|
|
5744
|
+
return new EsolveTimeSlotConfig(response.records);
|
|
5745
|
+
}));
|
|
5746
|
+
}
|
|
5747
|
+
catch (err) {
|
|
5748
|
+
return throwError(() => err);
|
|
5749
|
+
}
|
|
5750
|
+
}
|
|
5623
5751
|
/**
|
|
5624
5752
|
* Processes the eSolve shipping method records.
|
|
5625
5753
|
*
|
|
@@ -5921,6 +6049,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.3", ngImpor
|
|
|
5921
6049
|
* Generated bundle index. Do not edit.
|
|
5922
6050
|
*/
|
|
5923
6051
|
|
|
5924
|
-
export { ESOLVE_CONNECT_CONFIG, EsolveAccountConfirmationResult, EsolveAccountService, EsolveAdditionalStockImage, EsolveAddress, EsolveAddressResult, EsolveAsset, EsolveAssetsService, EsolveAuthService, EsolveBankingDetails, EsolveBanner, EsolveBannerImage, EsolveBannerImageHotspot, EsolveBannerService, EsolveCartItem, EsolveCartService, EsolveCartStockItem, EsolveCartTotals, EsolveCategoryTreeItem, EsolveCategoryTreeService, EsolveChangePasswordResult, EsolveCheckoutResult, EsolveColour, 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, 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, EsolveSession, 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, EsolveTopic, EsolveTopicService, EsolveTransaction, EsolveTransactionAddress, EsolveTransactionAnalyticsData, EsolveTransactionClient, EsolveTransactionItem, EsolveTransactionItemPrice, EsolveTransactionList, EsolveTransactionLocation, EsolveTransactionPaymentMethod, EsolveTransactionShippingMethod, EsolveTransactionUser, EsolveUserAccount, EsolveUserAccountBusiness, EsolveUserAccountContact, EsolveUserAccountResult, EsolveUserClientAccount, EsolveUserClientAccountBalances, EsolveVaultItem, EsolveVaultItemResult, EsolveWishlistItem, EsolveWishlistService, NgEsolveConnectModule };
|
|
5925
|
-
//# sourceMappingURL=esolve-ng-esolve-connect.mjs.map
|
|
6052
|
+
export { ESOLVE_CONNECT_CONFIG, EsolveAccountConfirmationResult, EsolveAccountService, EsolveAdditionalStockImage, EsolveAddress, EsolveAddressResult, EsolveAsset, EsolveAssetsService, EsolveAuthService, EsolveBankingDetails, EsolveBanner, EsolveBannerImage, EsolveBannerImageHotspot, EsolveBannerService, EsolveCartItem, EsolveCartService, EsolveCartStockItem, EsolveCartTotals, EsolveCategoryTreeItem, EsolveCategoryTreeService, EsolveChangePasswordResult, EsolveCheckoutResult, EsolveColour, 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, 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, EsolveSession, 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, EsolveTopic, EsolveTopicService, EsolveTransaction, EsolveTransactionAddress, EsolveTransactionAnalyticsData, EsolveTransactionClient, EsolveTransactionItem, EsolveTransactionItemPrice, EsolveTransactionList, EsolveTransactionLocation, EsolveTransactionPaymentMethod, EsolveTransactionShippingMethod, EsolveTransactionUser, EsolveUserAccount, EsolveUserAccountBusiness, EsolveUserAccountContact, EsolveUserAccountResult, EsolveUserClientAccount, EsolveUserClientAccountBalances, EsolveVaultItem, EsolveVaultItemResult, EsolveWishlistItem, EsolveWishlistService, NgEsolveConnectModule };
|
|
5926
6053
|
//# sourceMappingURL=esolve-ng-esolve-connect.mjs.map
|