@veloceapps/api 6.0.0-6 → 6.0.0-7
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 +24 -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 +24 -0
- package/fesm2015/veloceapps-api.js +23 -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,27 @@
|
|
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 (settings) { return settings.find(function (setting) { return setting.id == id; }); }));
|
2206
|
+
};
|
2207
|
+
ShoppingCartSettingsApiService.prototype.fetchSettings = function () {
|
2208
|
+
return this.configurationSettingsApiService
|
2209
|
+
.fetchSetting(this.shoppingCartSettingsKey)
|
2210
|
+
.pipe(operators.map(function (setting) { return ((setting === null || setting === void 0 ? void 0 : setting.value) ? JSON.parse(setting.value) : []); }));
|
2211
|
+
};
|
2212
|
+
return ShoppingCartSettingsApiService;
|
2213
|
+
}());
|
2214
|
+
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 });
|
2215
|
+
ShoppingCartSettingsApiService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ShoppingCartSettingsApiService });
|
2216
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ShoppingCartSettingsApiService, decorators: [{
|
2217
|
+
type: i0.Injectable
|
2218
|
+
}], ctorParameters: function () { return [{ type: ConfigurationSettingsApiService }]; } });
|
2219
|
+
|
2199
2220
|
var fromUIComponentStoryDTO = function (dto, attachments) {
|
2200
2221
|
return {
|
2201
2222
|
id: dto.id,
|
@@ -2518,6 +2539,7 @@
|
|
2518
2539
|
RulesApiService,
|
2519
2540
|
RuleGroupsApiService,
|
2520
2541
|
FlowsApiService,
|
2542
|
+
ShoppingCartSettingsApiService,
|
2521
2543
|
ProductApiService,
|
2522
2544
|
CatalogAdminApiService,
|
2523
2545
|
CatalogApiService,
|
@@ -2550,6 +2572,7 @@
|
|
2550
2572
|
RulesApiService,
|
2551
2573
|
RuleGroupsApiService,
|
2552
2574
|
FlowsApiService,
|
2575
|
+
ShoppingCartSettingsApiService,
|
2553
2576
|
ProductApiService,
|
2554
2577
|
CatalogAdminApiService,
|
2555
2578
|
CatalogApiService,
|
@@ -2590,6 +2613,7 @@
|
|
2590
2613
|
exports.RulesApiService = RulesApiService;
|
2591
2614
|
exports.SalesforceApiService = SalesforceApiService;
|
2592
2615
|
exports.ScriptsApiService = ScriptsApiService;
|
2616
|
+
exports.ShoppingCartSettingsApiService = ShoppingCartSettingsApiService;
|
2593
2617
|
exports.UITemplatesApiService = UITemplatesApiService;
|
2594
2618
|
|
2595
2619
|
Object.defineProperty(exports, '__esModule', { value: true });
|