@colijnit/catalog 12.1.47 → 12.1.49
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/colijnit-catalog.umd.js +49 -6
- package/bundles/colijnit-catalog.umd.js.map +1 -1
- package/colijnit-catalog.metadata.json +1 -1
- package/esm2015/lib/catalog-version.js +3 -3
- package/esm2015/lib/component/base/article-base.component.js +21 -4
- package/esm2015/lib/component/catalog-article-tile/catalog-article-tile.component.js +2 -5
- package/esm2015/lib/service/catalog-connector-adapter.service.js +12 -1
- package/esm2015/lib/service/catalog-connector.service.js +6 -1
- package/fesm2015/colijnit-catalog.js +39 -9
- package/fesm2015/colijnit-catalog.js.map +1 -1
- package/lib/component/base/article-base.component.d.ts +3 -1
- package/lib/service/catalog-connector-adapter.service.d.ts +1 -0
- package/lib/service/catalog-connector.service.d.ts +1 -0
- package/package.json +2 -2
|
@@ -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 = "12.1.
|
|
34
|
-
this.publishDate = "
|
|
33
|
+
this.symVer = "12.1.49";
|
|
34
|
+
this.publishDate = "16-10-2023 12:30:16";
|
|
35
35
|
}
|
|
36
36
|
return Version;
|
|
37
37
|
}());
|
|
@@ -1389,6 +1389,25 @@
|
|
|
1389
1389
|
});
|
|
1390
1390
|
});
|
|
1391
1391
|
};
|
|
1392
|
+
CatalogConnectorAdapterService.prototype.getArtStockStatus = function (goodId) {
|
|
1393
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
1394
|
+
var response;
|
|
1395
|
+
return __generator(this, function (_a) {
|
|
1396
|
+
switch (_a.label) {
|
|
1397
|
+
case 0: return [4 /*yield*/, this.connector.getArtStockStatus(goodId)];
|
|
1398
|
+
case 1:
|
|
1399
|
+
response = _a.sent();
|
|
1400
|
+
if (response && response.validationResult && response.validationResult.success) {
|
|
1401
|
+
return [2 /*return*/, response.resultObject];
|
|
1402
|
+
}
|
|
1403
|
+
else {
|
|
1404
|
+
return [2 /*return*/, null];
|
|
1405
|
+
}
|
|
1406
|
+
return [2 /*return*/];
|
|
1407
|
+
}
|
|
1408
|
+
});
|
|
1409
|
+
});
|
|
1410
|
+
};
|
|
1392
1411
|
CatalogConnectorAdapterService.prototype.getArticlePrice = function (goodId, type) {
|
|
1393
1412
|
return __awaiter(this, void 0, void 0, function () {
|
|
1394
1413
|
var request, response;
|
|
@@ -2058,6 +2077,13 @@
|
|
|
2058
2077
|
});
|
|
2059
2078
|
});
|
|
2060
2079
|
};
|
|
2080
|
+
CatalogConnectorService.prototype.getArtStockStatus = function (goodId) {
|
|
2081
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
2082
|
+
return __generator(this, function (_a) {
|
|
2083
|
+
return [2 /*return*/, this._adapterService.getArtStockStatus(goodId)];
|
|
2084
|
+
});
|
|
2085
|
+
});
|
|
2086
|
+
};
|
|
2061
2087
|
CatalogConnectorService.prototype.getArticlePrice = function (goodId, type) {
|
|
2062
2088
|
return __awaiter(this, void 0, void 0, function () {
|
|
2063
2089
|
return __generator(this, function (_a) {
|
|
@@ -4439,6 +4465,7 @@
|
|
|
4439
4465
|
this.configurable = false;
|
|
4440
4466
|
this.threeD = false;
|
|
4441
4467
|
this.valutaSymbol = '€';
|
|
4468
|
+
this.inStock = false;
|
|
4442
4469
|
}
|
|
4443
4470
|
Object.defineProperty(ArticleBaseComponent.prototype, "article", {
|
|
4444
4471
|
get: function () {
|
|
@@ -4451,7 +4478,7 @@
|
|
|
4451
4478
|
this.description = this._article.description + ' ' + this.added_description;
|
|
4452
4479
|
this.turnover = this._article.turnoverGroupDescr;
|
|
4453
4480
|
// this.stock_available = this._article.stockStatus ? this._article.stockStatus : this._article.standardDeliveryTimeSales + " " + this._article.standardDeliveryMethod;
|
|
4454
|
-
this.stock_available = this._article.stockStatus;
|
|
4481
|
+
// this.stock_available = this._article.stockStatus;
|
|
4455
4482
|
this.configurable = this._article.goodType === 'B';
|
|
4456
4483
|
this.threeD = this._article.homeBrandId !== undefined;
|
|
4457
4484
|
},
|
|
@@ -4461,7 +4488,7 @@
|
|
|
4461
4488
|
Object.defineProperty(ArticleBaseComponent.prototype, "showing", {
|
|
4462
4489
|
set: function (value) {
|
|
4463
4490
|
if (value) {
|
|
4464
|
-
this.
|
|
4491
|
+
this._getThumbNailImagesPriceAndStock();
|
|
4465
4492
|
}
|
|
4466
4493
|
},
|
|
4467
4494
|
enumerable: false,
|
|
@@ -4556,7 +4583,7 @@
|
|
|
4556
4583
|
ArticleBaseComponent.prototype._detectChanges = function () {
|
|
4557
4584
|
this._changeDetector.detectChanges();
|
|
4558
4585
|
};
|
|
4559
|
-
ArticleBaseComponent.prototype.
|
|
4586
|
+
ArticleBaseComponent.prototype._getThumbNailImagesPriceAndStock = function () {
|
|
4560
4587
|
var _this = this;
|
|
4561
4588
|
if (this._article) {
|
|
4562
4589
|
this._imageService.getArticleImage(this._article);
|
|
@@ -4570,6 +4597,22 @@
|
|
|
4570
4597
|
}
|
|
4571
4598
|
}
|
|
4572
4599
|
});
|
|
4600
|
+
this._iOne.getArtStockStatus(this._article.goodId).then(function (result) {
|
|
4601
|
+
switch (result) {
|
|
4602
|
+
case 1: // niet op voorraad
|
|
4603
|
+
_this.stockLabel = 'PRODUCT_LIMITED_STOCK';
|
|
4604
|
+
_this.inStock = true;
|
|
4605
|
+
break;
|
|
4606
|
+
case 2:
|
|
4607
|
+
_this.stockLabel = 'PRODUCT_IN_STOCK';
|
|
4608
|
+
_this.inStock = true;
|
|
4609
|
+
break;
|
|
4610
|
+
default:
|
|
4611
|
+
_this.stockLabel = 'PRODUCT_NOT_IN_STOCK';
|
|
4612
|
+
_this.inStock = false;
|
|
4613
|
+
break;
|
|
4614
|
+
}
|
|
4615
|
+
});
|
|
4573
4616
|
}
|
|
4574
4617
|
};
|
|
4575
4618
|
return ArticleBaseComponent;
|
|
@@ -4622,7 +4665,7 @@
|
|
|
4622
4665
|
CatalogArticleTileComponent.decorators = [
|
|
4623
4666
|
{ type: i0.Component, args: [{
|
|
4624
4667
|
selector: 'co-catalog-article-tile',
|
|
4625
|
-
template: "\n <div class=\"article-tile-wrapper\">\n <div class=\"card-wrapper\">\n <div class=\"image\">\n <co-image class=\"co-image\" [source]=\"article.imageData\"></co-image>\n </div>\n <div class=\"button-wrapper\">\n <co-icon *ngIf=\"threeD\" [iconData]=\"iconCache.getIcon(icons.ThreeD)\" class=\"pointer\"></co-icon>\n <co-icon *ngIf=\"threeD && options.showARButton\" class=\"pointer\"\n [iconData]=\"iconCache.getIcon(icons.Ar)\"\n (click)=\"handleArButtonClick($event)\"\n ></co-icon>\n </div>\n </div>\n <div class=\"description-wrapper\">\n <!--\n <div class=\"main\">\n -->\n <div class=\"main-top\">\n <div *ngIf=\"!!turnover\" class=\"turnover\" [innerText]=\"removeHtmlTags(turnover)\"></div>\n <div class=\"name\" [innerText]=\"removeHtmlTags(article.name)\"></div>\n <div class=\"description\" [innerText]=\"removeHtmlTags(article.description)\"></div>\n </div>\n <div class=\"main-bottom\">\n <div class=\"main-bottom-left\">\n <div *ngIf=\"!!article?.price\" class=\"price\" [innerText]=\"article?.price | priceDisplay:valutaSymbol\"></div>\n <div *ngIf=\"!!article?.articleNumber\" class=\"sku\">\n <span [innerText]=\"'sku' | localize\"></span>:\n <span [innerText]=\"article.articleNumber\"></span>\n </div>\n <div
|
|
4668
|
+
template: "\n <div class=\"article-tile-wrapper\">\n <div class=\"card-wrapper\">\n <div class=\"image\">\n <co-image class=\"co-image\" [source]=\"article.imageData\"></co-image>\n </div>\n <div class=\"button-wrapper\">\n <co-icon *ngIf=\"threeD\" [iconData]=\"iconCache.getIcon(icons.ThreeD)\" class=\"pointer\"></co-icon>\n <co-icon *ngIf=\"threeD && options.showARButton\" class=\"pointer\"\n [iconData]=\"iconCache.getIcon(icons.Ar)\"\n (click)=\"handleArButtonClick($event)\"\n ></co-icon>\n </div>\n </div>\n <div class=\"description-wrapper\">\n <!--\n <div class=\"main\">\n -->\n <div class=\"main-top\">\n <div *ngIf=\"!!turnover\" class=\"turnover\" [innerText]=\"removeHtmlTags(turnover)\"></div>\n <div class=\"name\" [innerText]=\"removeHtmlTags(article.name)\"></div>\n <div class=\"description\" [innerText]=\"removeHtmlTags(article.description)\"></div>\n </div>\n <div class=\"main-bottom\">\n <div class=\"main-bottom-left\">\n <div *ngIf=\"!!article?.price\" class=\"price\" [innerText]=\"article?.price | priceDisplay:valutaSymbol\"></div>\n <div *ngIf=\"!!article?.articleNumber\" class=\"sku\">\n <span [innerText]=\"'sku' | localize\"></span>:\n <span [innerText]=\"article.articleNumber\"></span>\n </div>\n <div [innerText]=\"stockLabel | localize\" [class.in-stock]=\"inStock\" (click)=\"handleStockDetailsButtonClick($event)\"></div>\n </div>\n <div *ngIf=\"options.showAddArticleButton\" class=\"on-article-buttons\">\n <co-button *ngIf=\"!configurable\"\n [label]=\"options.addArticleButtonText\"\n class=\"open-icon action pointer\"\n (onClick)=\"handleAddArticleButtonClick($event)\"\n [iconData]=\"iconCache.getIcon(icons.AddToCartDrop)\">\n </co-button>\n <co-button *ngIf=\"configurable\"\n [label]=\"options.lookAtArticleButtonText\"\n class=\"open-icon action pointer\"\n (onClick)=\"handleLookAtArticleButtonClick($event)\"\n [iconData]=\"iconCache.getIcon(icons.MagicWand)\">\n </co-button>\n <!--co-button\n [label]=\"options.stockButtonText\"\n class=\"open-icon action pointer stock\"\n (onClick)=\"handleStockDetailsButtonClick($event)\"\n [iconData]=\"iconCache.getIcon(icons.Truck)\">\n </co-button-->\n </div>\n </div>\n </div>\n </div>\n ",
|
|
4626
4669
|
encapsulation: i0.ViewEncapsulation.None
|
|
4627
4670
|
},] }
|
|
4628
4671
|
];
|