@veloceapps/sdk 3.1.27 → 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.
@@ -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;