@veloceapps/sdk 3.1.28 → 3.1.29
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/veloce-sdk-core.umd.js +10 -19
- package/bundles/veloce-sdk-core.umd.js.map +1 -1
- package/bundles/veloce-sdk.umd.js +12 -1
- package/bundles/veloce-sdk.umd.js.map +1 -1
- package/cms/vendor-map.d.ts +124 -116
- package/core/modules/configuration/services/runtime-context.service.d.ts +1 -3
- package/esm2015/core/modules/configuration/services/runtime-context.service.js +4 -14
- package/esm2015/src/pages/product/product.component.js +13 -3
- package/fesm2015/veloce-sdk-core.js +6 -15
- package/fesm2015/veloce-sdk-core.js.map +1 -1
- package/fesm2015/veloce-sdk.js +12 -2
- package/fesm2015/veloce-sdk.js.map +1 -1
- package/package.json +1 -1
- package/src/pages/product/product.component.d.ts +1 -0
@@ -1827,7 +1827,7 @@
|
|
1827
1827
|
var offeringId = (currentStateItem !== null && currentStateItem !== void 0 ? currentStateItem : {}).offeringId;
|
1828
1828
|
this.runtimeService
|
1829
1829
|
.init({ productId: productId, offeringId: offeringId })
|
1830
|
-
.pipe(rxjs.tap(function (context) { return (_this.uiDefinition = context === null || context === void 0 ? void 0 : context.uiDefinition); }), rxjs.switchMap(function () { return _this.customize(productId); }), rxjs.switchMap(function () { return _this.configurationService.configure(); }), rxjs.tap(function () { return _this.state$.next({ loading: false, failure: false }); }), rxjs.catchError(function (error) {
|
1830
|
+
.pipe(rxjs.tap(function (context) { return (_this.uiDefinition = context === null || context === void 0 ? void 0 : context.uiDefinition); }), rxjs.switchMap(function () { return _this.customize(productId); }), this.throwIfNoUIDefinition(), rxjs.switchMap(function () { return _this.configurationService.configure(); }), rxjs.tap(function () { return _this.state$.next({ loading: false, failure: false }); }), rxjs.catchError(function (error) {
|
1831
1831
|
var _a, _b;
|
1832
1832
|
if (!((_b = (_a = _this.uiDefinition) === null || _a === void 0 ? void 0 : _a.properties) === null || _b === void 0 ? void 0 : _b.suppressToastMessages)) {
|
1833
1833
|
_this.messageService.add({ severity: 'error', summary: error });
|
@@ -1837,6 +1837,17 @@
|
|
1837
1837
|
}), rxjs.takeUntil(this.destroy$))
|
1838
1838
|
.subscribe();
|
1839
1839
|
};
|
1840
|
+
ProductComponent.prototype.throwIfNoUIDefinition = function () {
|
1841
|
+
var _this = this;
|
1842
|
+
return function (source$) {
|
1843
|
+
return source$.pipe(rxjs.switchMap(function () {
|
1844
|
+
if (!_this.uiDefinition) {
|
1845
|
+
return rxjs.throwError(function () { return 'Product does not have Configuration UI'; });
|
1846
|
+
}
|
1847
|
+
return source$;
|
1848
|
+
}));
|
1849
|
+
};
|
1850
|
+
};
|
1840
1851
|
ProductComponent.prototype.getLineItemId = function (quote, lineItemId) {
|
1841
1852
|
var _a;
|
1842
1853
|
return (_a = quote.currentState.find(function (li) { return li.id === lineItemId; })) === null || _a === void 0 ? void 0 : _a.id;
|