@veloceapps/api 6.0.0-6 → 6.0.0-8
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/bundles/veloceapps-api.umd.js +22 -0
- package/bundles/veloceapps-api.umd.js.map +1 -1
- package/esm2015/index.js +2 -1
- package/esm2015/lib/api.module.js +4 -1
- package/esm2015/lib/services/shopping-cart-settings-api.service.js +22 -0
- package/fesm2015/veloceapps-api.js +21 -1
- package/fesm2015/veloceapps-api.js.map +1 -1
- package/index.d.ts +1 -0
- package/lib/services/shopping-cart-settings-api.service.d.ts +13 -0
- package/package.json +1 -1
@@ -2196,6 +2196,25 @@
|
|
2196
2196
|
type: i0.Injectable
|
2197
2197
|
}], ctorParameters: function () { return [{ type: i1__namespace.BaseHttpService }]; } });
|
2198
2198
|
|
2199
|
+
var ShoppingCartSettingsApiService = /** @class */ (function () {
|
2200
|
+
function ShoppingCartSettingsApiService(configurationSettingsApiService) {
|
2201
|
+
this.configurationSettingsApiService = configurationSettingsApiService;
|
2202
|
+
this.shoppingCartSettingsKey = 'shopping-cart';
|
2203
|
+
}
|
2204
|
+
ShoppingCartSettingsApiService.prototype.getSetting = function (id) {
|
2205
|
+
return this.fetchSettings().pipe(operators.map(function (setting) { return ((setting === null || setting === void 0 ? void 0 : setting.value) ? JSON.parse(setting.value) : []); }), operators.map(function (settings) { return settings.find(function (setting) { return setting.id == id; }); }));
|
2206
|
+
};
|
2207
|
+
ShoppingCartSettingsApiService.prototype.fetchSettings = function () {
|
2208
|
+
return this.configurationSettingsApiService.fetchSetting(this.shoppingCartSettingsKey, { skipErrorHandler: true });
|
2209
|
+
};
|
2210
|
+
return ShoppingCartSettingsApiService;
|
2211
|
+
}());
|
2212
|
+
ShoppingCartSettingsApiService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ShoppingCartSettingsApiService, deps: [{ token: ConfigurationSettingsApiService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
2213
|
+
ShoppingCartSettingsApiService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ShoppingCartSettingsApiService });
|
2214
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ShoppingCartSettingsApiService, decorators: [{
|
2215
|
+
type: i0.Injectable
|
2216
|
+
}], ctorParameters: function () { return [{ type: ConfigurationSettingsApiService }]; } });
|
2217
|
+
|
2199
2218
|
var fromUIComponentStoryDTO = function (dto, attachments) {
|
2200
2219
|
return {
|
2201
2220
|
id: dto.id,
|
@@ -2518,6 +2537,7 @@
|
|
2518
2537
|
RulesApiService,
|
2519
2538
|
RuleGroupsApiService,
|
2520
2539
|
FlowsApiService,
|
2540
|
+
ShoppingCartSettingsApiService,
|
2521
2541
|
ProductApiService,
|
2522
2542
|
CatalogAdminApiService,
|
2523
2543
|
CatalogApiService,
|
@@ -2550,6 +2570,7 @@
|
|
2550
2570
|
RulesApiService,
|
2551
2571
|
RuleGroupsApiService,
|
2552
2572
|
FlowsApiService,
|
2573
|
+
ShoppingCartSettingsApiService,
|
2553
2574
|
ProductApiService,
|
2554
2575
|
CatalogAdminApiService,
|
2555
2576
|
CatalogApiService,
|
@@ -2590,6 +2611,7 @@
|
|
2590
2611
|
exports.RulesApiService = RulesApiService;
|
2591
2612
|
exports.SalesforceApiService = SalesforceApiService;
|
2592
2613
|
exports.ScriptsApiService = ScriptsApiService;
|
2614
|
+
exports.ShoppingCartSettingsApiService = ShoppingCartSettingsApiService;
|
2593
2615
|
exports.UITemplatesApiService = UITemplatesApiService;
|
2594
2616
|
|
2595
2617
|
Object.defineProperty(exports, '__esModule', { value: true });
|