@colijnit/catalog 259.1.0 → 259.1.1

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.
@@ -30,8 +30,8 @@
30
30
  function Version() {
31
31
  this.name = "@colijnit/catalog";
32
32
  this.description = "iOne Catalog module based on Angular 12";
33
- this.symVer = "259.1.0";
34
- this.publishDate = "7/9/2025, 9:55:45 AM";
33
+ this.symVer = "259.1.1";
34
+ this.publishDate = "9-7-2025 11:50:01";
35
35
  }
36
36
  return Version;
37
37
  }());
@@ -2304,6 +2304,15 @@
2304
2304
  CatalogConnectorAdapterService.prototype.onShowLoaderChange = function (showLoader) {
2305
2305
  this._shouldShowLoader = showLoader;
2306
2306
  };
2307
+ CatalogConnectorAdapterService.prototype.getGeneratedArtDirectly = function (goodId, showLoader) {
2308
+ return __awaiter(this, void 0, void 0, function () {
2309
+ return __generator(this, function (_a) {
2310
+ return [2 /*return*/, this.connector.getGeneratedArtDirectly(goodId, showLoader).catch(function (messages) {
2311
+ return null;
2312
+ })];
2313
+ });
2314
+ });
2315
+ };
2307
2316
  return CatalogConnectorAdapterService;
2308
2317
  }());
2309
2318
  CatalogConnectorAdapterService.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function CatalogConnectorAdapterService_Factory() { return new CatalogConnectorAdapterService(i0__namespace.ɵɵinject(CatalogRootService), i0__namespace.ɵɵinject(CatalogExternalSourcesService)); }, token: CatalogConnectorAdapterService, providedIn: "root" });
@@ -3159,6 +3168,10 @@
3159
3168
  });
3160
3169
  });
3161
3170
  };
3171
+ CatalogConnectorService.prototype.getGeneratedArtDirectly = function (goodId, showLoader) {
3172
+ if (showLoader === void 0) { showLoader = true; }
3173
+ return this._adapterService.getGeneratedArtDirectly(goodId, showLoader);
3174
+ };
3162
3175
  return CatalogConnectorService;
3163
3176
  }());
3164
3177
  CatalogConnectorService.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function CatalogConnectorService_Factory() { return new CatalogConnectorService(i0__namespace.ɵɵinject(CatalogConnectorAdapterService), i0__namespace.ɵɵinject(CatalogSelectSingleCacheService), i0__namespace.ɵɵinject(CatalogSelectMultipleCacheService), i0__namespace.ɵɵinject(CatalogSelectMultipleParameterizedCacheService), i0__namespace.ɵɵinject(CatalogSelectSingleParameterizedCacheService)); }, token: CatalogConnectorService, providedIn: "root" });
@@ -6210,23 +6223,41 @@
6210
6223
  ArticleBaseComponent.prototype.handleAddArticleButtonClick = function (event, isRetour) {
6211
6224
  if (isRetour === void 0) { isRetour = false; }
6212
6225
  return __awaiter(this, void 0, void 0, function () {
6213
- var json;
6226
+ var json, generatedGoodId, params, searchArticles, article;
6214
6227
  return __generator(this, function (_b) {
6215
6228
  switch (_b.label) {
6216
6229
  case 0:
6217
6230
  event.stopPropagation();
6218
- if (!this.createFrozenArticle) return [3 /*break*/, 2];
6231
+ if (!this.createFrozenArticle) return [3 /*break*/, 6];
6232
+ if (!this.article.isConfigurable) return [3 /*break*/, 2];
6219
6233
  return [4 /*yield*/, this._getJSONFromArticleObject(this.article, !!this.externalSource, isRetour)];
6220
6234
  case 1:
6221
6235
  json = _b.sent();
6222
6236
  this._appEventService.addArticleButtonClick.next(json);
6223
6237
  this.onAddArticleButtonClick.emit(json);
6224
- return [3 /*break*/, 3];
6225
- case 2:
6238
+ return [3 /*break*/, 5];
6239
+ case 2: return [4 /*yield*/, this._getGeneratedArtDirectly(this.article.goodId)];
6240
+ case 3:
6241
+ generatedGoodId = _b.sent();
6242
+ if (!generatedGoodId) return [3 /*break*/, 5];
6243
+ params = new articleExtendedRequest.ArticleExtendedRequest();
6244
+ params.goodId = generatedGoodId;
6245
+ return [4 /*yield*/, this._iOne.getArticlesForCatalog(params, true)];
6246
+ case 4:
6247
+ searchArticles = _b.sent();
6248
+ // We should have a single result here
6249
+ if (searchArticles && searchArticles.articles.length > 0) {
6250
+ article = searchArticles.articles[0];
6251
+ this._appEventService.addArticleButtonClick.next(article);
6252
+ this.onAddArticleButtonClick.emit(article);
6253
+ }
6254
+ _b.label = 5;
6255
+ case 5: return [3 /*break*/, 7];
6256
+ case 6:
6226
6257
  this._appEventService.addArticleButtonClick.next(this.article);
6227
6258
  this.onAddArticleButtonClick.emit(this.article);
6228
- _b.label = 3;
6229
- case 3: return [2 /*return*/];
6259
+ _b.label = 7;
6260
+ case 7: return [2 /*return*/];
6230
6261
  }
6231
6262
  });
6232
6263
  });
@@ -6327,6 +6358,16 @@
6327
6358
  + ' ' + this._dictionaryService.get('DAYS', false);
6328
6359
  }
6329
6360
  };
6361
+ ArticleBaseComponent.prototype._getGeneratedArtDirectly = function (goodId) {
6362
+ return __awaiter(this, void 0, void 0, function () {
6363
+ return __generator(this, function (_b) {
6364
+ switch (_b.label) {
6365
+ case 0: return [4 /*yield*/, this._iOne.getGeneratedArtDirectly(goodId, true)];
6366
+ case 1: return [2 /*return*/, _b.sent()];
6367
+ }
6368
+ });
6369
+ });
6370
+ };
6330
6371
  return ArticleBaseComponent;
6331
6372
  }());
6332
6373
  ArticleBaseComponent.decorators = [