@colijnit/catalog 256.1.4 → 256.1.5
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 +31 -25
- 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 +6 -5
- package/esm2015/lib/component/base/catalog-search-base.component.js +2 -1
- package/esm2015/lib/component/catalog-external-source/catalog-external-source.component.js +20 -17
- package/esm2015/lib/component/catalog-search/catalog-search.component.js +5 -2
- package/esm2015/lib/component/catalog-search-result-list/catalog-search-result-list.component.js +2 -1
- package/esm2015/lib/component/catalog-search-result-tile/catalog-search-result-tile.component.js +2 -1
- package/fesm2015/colijnit-catalog.js +31 -21
- package/fesm2015/colijnit-catalog.js.map +1 -1
- package/lib/component/base/article-base.component.d.ts +3 -1
- package/lib/component/base/catalog-search-base.component.d.ts +3 -1
- package/lib/component/catalog-external-source/catalog-external-source.component.d.ts +3 -1
- package/lib/component/catalog-search/catalog-search.component.d.ts +3 -1
- 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 = "256.1.
|
|
34
|
-
this.publishDate = "
|
|
33
|
+
this.symVer = "256.1.5";
|
|
34
|
+
this.publishDate = "1-11-2024 14:45:45";
|
|
35
35
|
}
|
|
36
36
|
return Version;
|
|
37
37
|
}());
|
|
@@ -5160,7 +5160,7 @@
|
|
|
5160
5160
|
CatalogSearchComponent.decorators = [
|
|
5161
5161
|
{ type: i0.Component, args: [{
|
|
5162
5162
|
selector: 'co-catalog-search',
|
|
5163
|
-
template: "\n <div class=\"catalog-search-wrapper\">\n <ng-container *ngIf=\"tempFilter\">\n <div class=\"filter-content\" @showHideFilter>\n <div class=\"search-filter-panel-header-wrapper\">\n <div class=\"search-filter-panel-header\">\n <span [textContent]=\"'Filters'\"></span>\n <co-icon class=\"filter-reset-icon clickable\"\n [iconData]=\"iconCacheService.getIcon(icons.SyncAlt)\"\n (click)=\"handleResetButtonClick($event)\">\n </co-icon>\n <span (click)=\"handleResetButtonClick($event)\" [textContent]=\"'reset'\" class=\"reset-filter-text\"></span>\n </div>\n <co-icon class=\"clickable\"\n [iconData]=\"iconCacheService.getIcon(icons.Cancel)\"\n (click)=\"tempFilter = false\">\n </co-icon>\n </div>\n\n <!--filter-content-->\n <div class=\"search-filter-wrapper narrow-scrollbar\">\n <co-catalog-filter [showResetFilter]=\"true\"></co-catalog-filter>\n </div>\n </div>\n </ng-container>\n <div class=\"search-content-wrapper\" #contentView>\n <div class=\"search-header\">\n <div class=\"search-catalog-title-wrapper\">\n <div class=\"catalog-title-wrapper\">\n <co-icon [iconData]=\"iconCacheService.getIcon(icons.WebCatalog)\"></co-icon>\n <div class=\"catalog-title\" [textContent]=\"title\"></div>\n </div>\n <div class=\"catalog-sub-title\" [textContent]=\"subTitle\"></div>\n </div>\n <co-catalog-search-header [placeholder]=\"searchPlaceholder\"\n (filterIconClick)=\"tempFilter = !tempFilter\"></co-catalog-search-header>\n </div>\n <div class=\"view-modes-wrapper\">\n <co-button \n (click)=\"mode = 'tile'\"\n [class.selected]=\"mode === 'tile'\"\n [iconData]=\"iconCacheService.getIcon(icons.ListView)\">\n </co-button>\n <co-button \n (click)=\"mode = 'list'\"\n [class.selected]=\"mode === 'list'\"\n [iconData]=\"iconCacheService.getIcon(icons.ThinLines)\">\n </co-button>\n </div>\n <co-catalog-navigation *ngIf=\"showNavigation\"\n [view]=\"contentView\"\n (homeClick)=\"handleHomeClick($event)\"\n (categoryClick)=\"handleCategoryClick($event)\"\n (turnoverGroupClick)=\"handleTurnoverGroupClick($event)\"\n (externalSourceClick)=\"onExternalSourceClick.emit($event)\"\n ></co-catalog-navigation>\n <co-catalog-categories *ngIf=\"showLandingPage\" (categoryClick)=\"handleCategoryClick($event)\"\n (turnoverGroupClick)=\"handleTurnoverGroupClick($event)\"></co-catalog-categories>\n <div class=\"search-content\">\n <ng-container *ngIf=\"mode === 'tile'\">\n <co-catalog-search-result-tile\n [createFrozenArticle]=\"createFrozenArticle\"\n [isHomeDecoHub]=\"isHomeDecoHub\"\n ></co-catalog-search-result-tile>\n </ng-container>\n <ng-container *ngIf=\"mode === 'list'\">\n <co-catalog-search-result-list\n [createFrozenArticle]=\"createFrozenArticle\"\n [isHomeDecoHub]=\"isHomeDecoHub\"\n ></co-catalog-search-result-list>\n </ng-container>\n <ng-container *ngIf=\"mode === 'grid'\">\n <!--\n <co-catalog-search-result></co-catalog-search-result>\n -->\n </ng-container>\n </div>\n </div>\n </div>\n ",
|
|
5163
|
+
template: "\n <div class=\"catalog-search-wrapper\">\n <ng-container *ngIf=\"tempFilter\">\n <div class=\"filter-content\" @showHideFilter>\n <div class=\"search-filter-panel-header-wrapper\">\n <div class=\"search-filter-panel-header\">\n <span [textContent]=\"'Filters'\"></span>\n <co-icon class=\"filter-reset-icon clickable\"\n [iconData]=\"iconCacheService.getIcon(icons.SyncAlt)\"\n (click)=\"handleResetButtonClick($event)\">\n </co-icon>\n <span (click)=\"handleResetButtonClick($event)\" [textContent]=\"'reset'\" class=\"reset-filter-text\"></span>\n </div>\n <co-icon class=\"clickable\"\n [iconData]=\"iconCacheService.getIcon(icons.Cancel)\"\n (click)=\"tempFilter = false\">\n </co-icon>\n </div>\n\n <!--filter-content-->\n <div class=\"search-filter-wrapper narrow-scrollbar\">\n <co-catalog-filter [showResetFilter]=\"true\"></co-catalog-filter>\n </div>\n </div>\n </ng-container>\n <div class=\"search-content-wrapper\" #contentView>\n <div class=\"search-header\">\n <div class=\"search-catalog-title-wrapper\">\n <div class=\"catalog-title-wrapper\">\n <co-icon [iconData]=\"iconCacheService.getIcon(icons.WebCatalog)\"></co-icon>\n <div class=\"catalog-title\" [textContent]=\"title\"></div>\n </div>\n <div class=\"catalog-sub-title\" [textContent]=\"subTitle\"></div>\n </div>\n <co-catalog-search-header [placeholder]=\"searchPlaceholder\"\n (filterIconClick)=\"tempFilter = !tempFilter\"></co-catalog-search-header>\n </div>\n <div class=\"view-modes-wrapper\">\n <co-button \n (click)=\"mode = 'tile'\"\n [class.selected]=\"mode === 'tile'\"\n [iconData]=\"iconCacheService.getIcon(icons.ListView)\">\n </co-button>\n <co-button \n (click)=\"mode = 'list'\"\n [class.selected]=\"mode === 'list'\"\n [iconData]=\"iconCacheService.getIcon(icons.ThinLines)\">\n </co-button>\n </div>\n <co-catalog-navigation *ngIf=\"showNavigation\"\n [view]=\"contentView\"\n (homeClick)=\"handleHomeClick($event)\"\n (categoryClick)=\"handleCategoryClick($event)\"\n (turnoverGroupClick)=\"handleTurnoverGroupClick($event)\"\n (externalSourceClick)=\"onExternalSourceClick.emit($event)\"\n ></co-catalog-navigation>\n <co-catalog-categories *ngIf=\"showLandingPage\" (categoryClick)=\"handleCategoryClick($event)\"\n (turnoverGroupClick)=\"handleTurnoverGroupClick($event)\"></co-catalog-categories>\n <div class=\"search-content\">\n <ng-container *ngIf=\"mode === 'tile'\">\n <co-catalog-search-result-tile\n [createFrozenArticle]=\"createFrozenArticle\"\n [isHomeDecoHub]=\"isHomeDecoHub\"\n [externalSource]=\"externalSource\"\n ></co-catalog-search-result-tile>\n </ng-container>\n <ng-container *ngIf=\"mode === 'list'\">\n <co-catalog-search-result-list\n [createFrozenArticle]=\"createFrozenArticle\"\n [isHomeDecoHub]=\"isHomeDecoHub\"\n [externalSource]=\"externalSource\"\n ></co-catalog-search-result-list>\n </ng-container>\n <ng-container *ngIf=\"mode === 'grid'\">\n <!--\n <co-catalog-search-result></co-catalog-search-result>\n -->\n </ng-container>\n </div>\n </div>\n </div>\n ",
|
|
5164
5164
|
providers: [
|
|
5165
5165
|
CatalogSelectSingleCacheService,
|
|
5166
5166
|
CatalogSelectMultipleCacheService,
|
|
@@ -5213,6 +5213,7 @@
|
|
|
5213
5213
|
tempFilter: [{ type: i0.Input }],
|
|
5214
5214
|
showViewModes: [{ type: i0.Input }],
|
|
5215
5215
|
isHomeDecoHub: [{ type: i0.Input }],
|
|
5216
|
+
externalSource: [{ type: i0.Input }],
|
|
5216
5217
|
settingsChange: [{ type: i0.Output }],
|
|
5217
5218
|
onLookAtArticleButtonClick: [{ type: i0.Output }],
|
|
5218
5219
|
onArButtonClick: [{ type: i0.Output }],
|
|
@@ -5311,6 +5312,7 @@
|
|
|
5311
5312
|
]; };
|
|
5312
5313
|
CatalogSearchBaseComponent.propDecorators = {
|
|
5313
5314
|
createFrozenArticle: [{ type: i0.Input }],
|
|
5315
|
+
externalSource: [{ type: i0.Input }],
|
|
5314
5316
|
onLookAtArticleButtonClick: [{ type: i0.Output }],
|
|
5315
5317
|
onArButtonClick: [{ type: i0.Output }],
|
|
5316
5318
|
onAddArticleButtonClick: [{ type: i0.Output }],
|
|
@@ -5399,7 +5401,7 @@
|
|
|
5399
5401
|
case 0:
|
|
5400
5402
|
event.stopPropagation();
|
|
5401
5403
|
if (!this.createFrozenArticle) return [3 /*break*/, 2];
|
|
5402
|
-
return [4 /*yield*/, this._getJSONFromArticleObject(this.article)];
|
|
5404
|
+
return [4 /*yield*/, this._getJSONFromArticleObject(this.article, !!this.externalSource)];
|
|
5403
5405
|
case 1:
|
|
5404
5406
|
json = _a.sent();
|
|
5405
5407
|
this._appEventService.addArticleButtonClick.next(json);
|
|
@@ -5431,7 +5433,8 @@
|
|
|
5431
5433
|
desc = desc.replace(/\r?\n|\r/, '');
|
|
5432
5434
|
return desc;
|
|
5433
5435
|
};
|
|
5434
|
-
ArticleBaseComponent.prototype._getJSONFromArticleObject = function (article) {
|
|
5436
|
+
ArticleBaseComponent.prototype._getJSONFromArticleObject = function (article, externalSource) {
|
|
5437
|
+
if (externalSource === void 0) { externalSource = false; }
|
|
5435
5438
|
return __awaiter(this, void 0, void 0, function () {
|
|
5436
5439
|
return __generator(this, function (_a) {
|
|
5437
5440
|
switch (_a.label) {
|
|
@@ -5439,7 +5442,7 @@
|
|
|
5439
5442
|
if (!article) {
|
|
5440
5443
|
return [2 /*return*/, ""];
|
|
5441
5444
|
}
|
|
5442
|
-
return [4 /*yield*/, this._iOne.getJsonArticleFlatTree(article.goodId, article.goodType, 1)];
|
|
5445
|
+
return [4 /*yield*/, this._iOne.getJsonArticleFlatTree(article.goodId, article.goodType, 1, externalSource)];
|
|
5443
5446
|
case 1: return [2 /*return*/, _a.sent()];
|
|
5444
5447
|
}
|
|
5445
5448
|
});
|
|
@@ -5517,6 +5520,7 @@
|
|
|
5517
5520
|
isSmallModus: [{ type: i0.Input }, { type: i0.HostBinding, args: ['class.small-modus',] }],
|
|
5518
5521
|
hasMagnifierButton: [{ type: i0.Input }],
|
|
5519
5522
|
hasInfoButton: [{ type: i0.Input }],
|
|
5523
|
+
externalSource: [{ type: i0.Input }],
|
|
5520
5524
|
onLookAtArticleButtonClick: [{ type: i0.Output }],
|
|
5521
5525
|
onArButtonClick: [{ type: i0.Output }],
|
|
5522
5526
|
onAddArticleButtonClick: [{ type: i0.Output }],
|
|
@@ -5574,7 +5578,7 @@
|
|
|
5574
5578
|
CatalogSearchResultTileComponent.decorators = [
|
|
5575
5579
|
{ type: i0.Component, args: [{
|
|
5576
5580
|
selector: 'co-catalog-search-result-tile',
|
|
5577
|
-
template: "\n <div class=\"article-cards\" visibilityObserverMaster>\n <ng-container *ngFor=\"let article of catalogSearchService.articles\">\n <co-catalog-article-tile\n visibilityObserver\n #intersection=\"intersection\"\n [observerEnabled]=\"!article.imageData\"\n [createFrozenArticle]=\"createFrozenArticle\"\n [showing]=\"intersection.isIntersecting\"\n [article]=\"article\"\n [isHomeDecoHub]=\"isHomeDecoHub\"\n (onArticleClick)=\"onArticleClick.emit($event)\"\n (onAddArticleButtonClick)=\"onAddArticleButtonClick.emit($event)\"\n (onArButtonClick)=\"onArButtonClick.emit($event)\"\n (onLookAtArticleButtonClick)=\"onLookAtArticleButtonClick.emit($event)\"\n (onStockDetailsClick)=\"onStockDetailsClick.emit($event)\"\n >\n </co-catalog-article-tile>\n </ng-container>\n </div>\n <co-pagination-bar *ngIf=\"catalogSearchService.articles?.length > 0\"\n [currentPage]=\"catalogSearchService.currentPage\"\n [itemsPerPage]=\"catalogSearchService.articlesPerPage\"\n [totalItems]=\"catalogSearchService.resultCount\"\n [previousLabel]=\"'PREVIOUS' | localize\"\n [nextLabel]=\"'NEXT' | localize\"\n [autoHide]=\"true\"\n [directionLinks]=\"true\"\n [paginationRange]=\"8\"\n (previousClick)=\"onPreviousClick()\"\n (nextClick)=\"onNextClick()\"\n (pageClick)=\"onPageClick($event)\">\n </co-pagination-bar>\n ",
|
|
5581
|
+
template: "\n <div class=\"article-cards\" visibilityObserverMaster>\n <ng-container *ngFor=\"let article of catalogSearchService.articles\">\n <co-catalog-article-tile\n visibilityObserver\n #intersection=\"intersection\"\n [observerEnabled]=\"!article.imageData\"\n [createFrozenArticle]=\"createFrozenArticle\"\n [showing]=\"intersection.isIntersecting\"\n [article]=\"article\"\n [isHomeDecoHub]=\"isHomeDecoHub\"\n [externalSource]=\"externalSource\"\n (onArticleClick)=\"onArticleClick.emit($event)\"\n (onAddArticleButtonClick)=\"onAddArticleButtonClick.emit($event)\"\n (onArButtonClick)=\"onArButtonClick.emit($event)\"\n (onLookAtArticleButtonClick)=\"onLookAtArticleButtonClick.emit($event)\"\n (onStockDetailsClick)=\"onStockDetailsClick.emit($event)\"\n >\n </co-catalog-article-tile>\n </ng-container>\n </div>\n <co-pagination-bar *ngIf=\"catalogSearchService.articles?.length > 0\"\n [currentPage]=\"catalogSearchService.currentPage\"\n [itemsPerPage]=\"catalogSearchService.articlesPerPage\"\n [totalItems]=\"catalogSearchService.resultCount\"\n [previousLabel]=\"'PREVIOUS' | localize\"\n [nextLabel]=\"'NEXT' | localize\"\n [autoHide]=\"true\"\n [directionLinks]=\"true\"\n [paginationRange]=\"8\"\n (previousClick)=\"onPreviousClick()\"\n (nextClick)=\"onNextClick()\"\n (pageClick)=\"onPageClick($event)\">\n </co-pagination-bar>\n ",
|
|
5578
5582
|
encapsulation: i0.ViewEncapsulation.None
|
|
5579
5583
|
},] }
|
|
5580
5584
|
];
|
|
@@ -5812,7 +5816,7 @@
|
|
|
5812
5816
|
CatalogSearchResultListComponent.decorators = [
|
|
5813
5817
|
{ type: i0.Component, args: [{
|
|
5814
5818
|
selector: 'co-catalog-search-result-list',
|
|
5815
|
-
template: "\n <div class=\"article-cards\" visibilityObserverMaster>\n <ng-container *ngFor=\"let article of catalogSearchService.articles\">\n <co-catalog-article-list\n visibilityObserver\n #intersection=\"intersection\"\n [observerEnabled]=\"!article.imageData\"\n [createFrozenArticle]=\"createFrozenArticle\"\n [showing]=\"intersection.isIntersecting\"\n [article]=\"article\"\n [isHomeDecoHub]=\"isHomeDecoHub\"\n (onArticleClick)=\"onArticleClick.emit($event)\"\n (onAddArticleButtonClick)=\"onAddArticleButtonClick.emit($event)\"\n (onArButtonClick)=\"onArButtonClick.emit($event)\"\n (onLookAtArticleButtonClick)=\"onLookAtArticleButtonClick.emit($event)\"\n (onStockDetailsClick)=\"onStockDetailsClick.emit($event)\"\n >\n </co-catalog-article-list>\n </ng-container>\n </div>\n <co-pagination-bar *ngIf=\"catalogSearchService.articles?.length > 0\"\n [currentPage]=\"catalogSearchService.currentPage\"\n [itemsPerPage]=\"catalogSearchService.articlesPerPage\"\n [totalItems]=\"catalogSearchService.resultCount\"\n [previousLabel]=\"'PREVIOUS' | localize\"\n [nextLabel]=\"'NEXT' | localize\"\n [autoHide]=\"true\"\n [directionLinks]=\"true\"\n [paginationRange]=\"8\"\n (previousClick)=\"onPreviousClick()\"\n (nextClick)=\"onNextClick()\"\n (pageClick)=\"onPageClick($event)\">\n </co-pagination-bar>\n ",
|
|
5819
|
+
template: "\n <div class=\"article-cards\" visibilityObserverMaster>\n <ng-container *ngFor=\"let article of catalogSearchService.articles\">\n <co-catalog-article-list\n visibilityObserver\n #intersection=\"intersection\"\n [observerEnabled]=\"!article.imageData\"\n [createFrozenArticle]=\"createFrozenArticle\"\n [showing]=\"intersection.isIntersecting\"\n [article]=\"article\"\n [externalSource]=\"externalSource\"\n [isHomeDecoHub]=\"isHomeDecoHub\"\n (onArticleClick)=\"onArticleClick.emit($event)\"\n (onAddArticleButtonClick)=\"onAddArticleButtonClick.emit($event)\"\n (onArButtonClick)=\"onArButtonClick.emit($event)\"\n (onLookAtArticleButtonClick)=\"onLookAtArticleButtonClick.emit($event)\"\n (onStockDetailsClick)=\"onStockDetailsClick.emit($event)\"\n >\n </co-catalog-article-list>\n </ng-container>\n </div>\n <co-pagination-bar *ngIf=\"catalogSearchService.articles?.length > 0\"\n [currentPage]=\"catalogSearchService.currentPage\"\n [itemsPerPage]=\"catalogSearchService.articlesPerPage\"\n [totalItems]=\"catalogSearchService.resultCount\"\n [previousLabel]=\"'PREVIOUS' | localize\"\n [nextLabel]=\"'NEXT' | localize\"\n [autoHide]=\"true\"\n [directionLinks]=\"true\"\n [paginationRange]=\"8\"\n (previousClick)=\"onPreviousClick()\"\n (nextClick)=\"onNextClick()\"\n (pageClick)=\"onPageClick($event)\">\n </co-pagination-bar>\n ",
|
|
5816
5820
|
encapsulation: i0.ViewEncapsulation.None
|
|
5817
5821
|
},] }
|
|
5818
5822
|
];
|
|
@@ -5910,6 +5914,7 @@
|
|
|
5910
5914
|
this.isHomeDecoHub = false;
|
|
5911
5915
|
this.articleClick = new i0.EventEmitter();
|
|
5912
5916
|
this.addArticleClick = new i0.EventEmitter();
|
|
5917
|
+
this.lookAtArticleClick = new i0.EventEmitter();
|
|
5913
5918
|
this.iFrameFeedbackReceived = new i0.EventEmitter();
|
|
5914
5919
|
this.showClass = true;
|
|
5915
5920
|
this.showCatalog = false;
|
|
@@ -5935,7 +5940,7 @@
|
|
|
5935
5940
|
},
|
|
5936
5941
|
set: function (value) {
|
|
5937
5942
|
this._externalCatalogStartupInfo = value;
|
|
5938
|
-
this.
|
|
5943
|
+
this.externalSource = value.externalSource;
|
|
5939
5944
|
this.loaded = false;
|
|
5940
5945
|
this._prepareExternalSource();
|
|
5941
5946
|
},
|
|
@@ -5950,7 +5955,7 @@
|
|
|
5950
5955
|
quantity: 1,
|
|
5951
5956
|
article: article,
|
|
5952
5957
|
catalogDefinition: _this.catalogDefinition,
|
|
5953
|
-
externalSource: _this.
|
|
5958
|
+
externalSource: _this.externalSource
|
|
5954
5959
|
});
|
|
5955
5960
|
}
|
|
5956
5961
|
}));
|
|
@@ -5961,12 +5966,12 @@
|
|
|
5961
5966
|
article: article,
|
|
5962
5967
|
settings: { name: this.name, settings: this.externalSettings },
|
|
5963
5968
|
catalogDefinition: this.catalogDefinition,
|
|
5964
|
-
externalSource: this.
|
|
5969
|
+
externalSource: this.externalSource
|
|
5965
5970
|
});
|
|
5966
5971
|
}
|
|
5967
5972
|
};
|
|
5968
5973
|
CatalogExternalSourceComponent.prototype.receiveMessage = function (event) {
|
|
5969
|
-
if (this.
|
|
5974
|
+
if (this.externalSource.type !== '3DIMERCE')
|
|
5970
5975
|
if (typeof event.data === 'string') {
|
|
5971
5976
|
this.iFrameFeedbackReceived.emit(event.data);
|
|
5972
5977
|
}
|
|
@@ -5984,9 +5989,9 @@
|
|
|
5984
5989
|
var customerName, configurationUrl, priceDataUrl, configurationData_1, priceData_1;
|
|
5985
5990
|
var _this = this;
|
|
5986
5991
|
return __generator(this, function (_a) {
|
|
5987
|
-
customerName = this.
|
|
5988
|
-
configurationUrl = this.
|
|
5989
|
-
priceDataUrl = this.
|
|
5992
|
+
customerName = this.externalSource.username;
|
|
5993
|
+
configurationUrl = this.externalSource.domain + '/configurationData/' + hash;
|
|
5994
|
+
priceDataUrl = this.externalSource.domain + '/rules/api/' + customerName.toLowerCase() + '/' + hash;
|
|
5990
5995
|
//test setup for local testing
|
|
5991
5996
|
//const configurationUrl: string = "https://bertplantagie.platformapi-accept.3dimerce.com/configurationData/8eb5b35697c96716d3e253294344d98e4dcdcb68969c288189d45829164e3177";
|
|
5992
5997
|
//console.log(configurationUrl);
|
|
@@ -6081,37 +6086,37 @@
|
|
|
6081
6086
|
return __generator(this, function (_a) {
|
|
6082
6087
|
switch (_a.label) {
|
|
6083
6088
|
case 0:
|
|
6084
|
-
if (!this.
|
|
6089
|
+
if (!this.externalSource) {
|
|
6085
6090
|
return [2 /*return*/];
|
|
6086
6091
|
}
|
|
6087
6092
|
this.externalUrl = undefined;
|
|
6088
6093
|
this.externalSettings = {};
|
|
6089
|
-
if (!(this.
|
|
6090
|
-
return [4 /*yield*/, this._catalogConnectorService.getCatalogBundleSettings(this.
|
|
6094
|
+
if (!(this.externalSource.type === 'CATF')) return [3 /*break*/, 2];
|
|
6095
|
+
return [4 /*yield*/, this._catalogConnectorService.getCatalogBundleSettings(this.externalSource.url, parseInt(this.externalSource.schema))];
|
|
6091
6096
|
case 1:
|
|
6092
6097
|
bundleSettings = _a.sent();
|
|
6093
6098
|
this.externalSettings = JSON.parse(bundleSettings);
|
|
6094
6099
|
if (this.options) {
|
|
6095
6100
|
this.externalSettings.options = this.options;
|
|
6096
6101
|
}
|
|
6097
|
-
if (this.
|
|
6098
|
-
this.externalSettings.username = this.
|
|
6099
|
-
this.externalSettings.password = this.
|
|
6102
|
+
if (this.externalSource.username && this.externalSource.password) {
|
|
6103
|
+
this.externalSettings.username = this.externalSource.username;
|
|
6104
|
+
this.externalSettings.password = this.externalSource.password;
|
|
6100
6105
|
}
|
|
6101
6106
|
// finally show the catalog
|
|
6102
6107
|
this.showCatalog = true;
|
|
6103
6108
|
return [3 /*break*/, 3];
|
|
6104
6109
|
case 2:
|
|
6105
|
-
if (this.
|
|
6110
|
+
if (this.externalSource.type !== externalCatalogTypes_enum.ExternalCatalogTypes.Webshop && this.externalSource.type !== externalCatalogTypes_enum.ExternalCatalogTypes.ThreeDimerse) {
|
|
6106
6111
|
this.externalUrl = this._externalCatalogStartupInfo.apiUrl;
|
|
6107
|
-
if (this.
|
|
6112
|
+
if (this.externalSource.type === externalCatalogTypes_enum.ExternalCatalogTypes.Vadain) {
|
|
6108
6113
|
this.username = this._externalCatalogStartupInfo.username;
|
|
6109
6114
|
this.password = this._externalCatalogStartupInfo.password;
|
|
6110
6115
|
this.externalOrderNr = this._externalCatalogStartupInfo.orderId;
|
|
6111
6116
|
}
|
|
6112
6117
|
}
|
|
6113
6118
|
else {
|
|
6114
|
-
this.externalUrl = this.
|
|
6119
|
+
this.externalUrl = this.externalSource.url;
|
|
6115
6120
|
}
|
|
6116
6121
|
this.safeUrl = this._sanitizer.bypassSecurityTrustResourceUrl(this.externalUrl);
|
|
6117
6122
|
this.showCatalog = false;
|
|
@@ -6131,7 +6136,7 @@
|
|
|
6131
6136
|
CatalogExternalSourceComponent.decorators = [
|
|
6132
6137
|
{ type: i0.Component, args: [{
|
|
6133
6138
|
selector: 'co-catalog-external-source',
|
|
6134
|
-
template: "\n <ng-container *ngIf=\"loaded\">\n <ng-container *ngIf=\"showCatalog\">\n <co-catalog-search\n [(settings)]=\"externalSettings\"\n [title]=\"title\"\n [subTitle]=\"subTitle\"\n [searchPlaceholder]=\"searchPlaceholder\"\n [showFilter]=\"showFilter\"\n [tempFilter]=\"tempFilter\"\n [showNavigation]=\"showNavigation\"\n [isHomeDecoHub]=\"isHomeDecoHub\"\n (onArticleClick)=\"handleArticleClick($event)\"\n ></co-catalog-search>\n </ng-container>\n <ng-container *ngIf=\"!showCatalog\">\n <iframe #catalogFrame width=\"100%\" height=\"100%\" [src]=\"safeUrl\" frameborder=\"0\" allowfullscreen\n (load)=\"iframeLoaded($event)\"></iframe>\n </ng-container>\n </ng-container>\n ",
|
|
6139
|
+
template: "\n <ng-container *ngIf=\"loaded\">\n <ng-container *ngIf=\"showCatalog\">\n <co-catalog-search\n [(settings)]=\"externalSettings\"\n [externalSource]=\"externalSource\"\n [title]=\"title\"\n [subTitle]=\"subTitle\"\n [searchPlaceholder]=\"searchPlaceholder\"\n [showFilter]=\"showFilter\"\n [tempFilter]=\"tempFilter\"\n [showNavigation]=\"showNavigation\"\n [isHomeDecoHub]=\"isHomeDecoHub\"\n (onArticleClick)=\"handleArticleClick($event)\"\n ></co-catalog-search>\n </ng-container>\n <ng-container *ngIf=\"!showCatalog\">\n <iframe #catalogFrame width=\"100%\" height=\"100%\" [src]=\"safeUrl\" frameborder=\"0\" allowfullscreen\n (load)=\"iframeLoaded($event)\"></iframe>\n </ng-container>\n </ng-container>\n ",
|
|
6135
6140
|
encapsulation: i0.ViewEncapsulation.None
|
|
6136
6141
|
},] }
|
|
6137
6142
|
];
|
|
@@ -6156,6 +6161,7 @@
|
|
|
6156
6161
|
name: [{ type: i0.Input }],
|
|
6157
6162
|
articleClick: [{ type: i0.Output }],
|
|
6158
6163
|
addArticleClick: [{ type: i0.Output }],
|
|
6164
|
+
lookAtArticleClick: [{ type: i0.Output }],
|
|
6159
6165
|
iFrameFeedbackReceived: [{ type: i0.Output }],
|
|
6160
6166
|
showClass: [{ type: i0.HostBinding, args: ['class.co-catalog-external-source',] }]
|
|
6161
6167
|
};
|