@colijnit/product 257.1.4 → 257.1.6
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/app/components/image-carousel/image-carousel.component.d.ts +16 -13
- package/app/components/product-addtocart/product-addtocart.component.d.ts +1 -0
- package/app/components/product-page/product-page.component.d.ts +1 -0
- package/app/ione-product.component.d.ts +2 -0
- package/app/service/product-event.service.d.ts +2 -1
- package/bundles/colijnit-product.umd.js +128 -45
- package/bundles/colijnit-product.umd.js.map +1 -1
- package/colijnit-product.metadata.json +1 -1
- package/esm2015/app/components/image-carousel/image-carousel.component.js +127 -70
- package/esm2015/app/components/product-addtocart/product-addtocart.component.js +9 -5
- package/esm2015/app/components/product-page/product-page.component.js +15 -3
- package/esm2015/app/ione-product.component.js +8 -3
- package/esm2015/app/product-version.js +3 -3
- package/esm2015/app/service/product-event.service.js +2 -1
- package/esm2015/assets/dictionary/text.properties.js +3 -1
- package/fesm2015/colijnit-product.js +159 -77
- package/fesm2015/colijnit-product.js.map +1 -1
- package/package.json +1 -1
- package/colijnit-product-257.1.4.tgz +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Injectable, Directive, EventEmitter, Component, ViewEncapsulation, ChangeDetectorRef, Input, Output, Renderer2, ViewChild, ElementRef, Pipe, NgModule, HostListener, HostBinding, SecurityContext, CUSTOM_ELEMENTS_SCHEMA, Inject, PLATFORM_ID, NO_ERRORS_SCHEMA } from '@angular/core';
|
|
2
|
+
import { Injectable, Directive, EventEmitter, Component, ViewEncapsulation, ChangeDetectorRef, Input, Output, Renderer2, ViewChild, ElementRef, Pipe, NgModule, ChangeDetectionStrategy, HostListener, HostBinding, SecurityContext, CUSTOM_ELEMENTS_SCHEMA, Inject, PLATFORM_ID, NO_ERRORS_SCHEMA } from '@angular/core';
|
|
3
3
|
import { __awaiter } from 'tslib';
|
|
4
4
|
import { Subject, BehaviorSubject } from 'rxjs';
|
|
5
5
|
import { Options } from '@colijnit/ioneconnector/build/model/options';
|
|
@@ -30,8 +30,8 @@ class Version {
|
|
|
30
30
|
constructor() {
|
|
31
31
|
this.name = "@colijnit/product";
|
|
32
32
|
this.description = "Product detail page project for iOne";
|
|
33
|
-
this.symVer = "257.1.
|
|
34
|
-
this.publishDate = "
|
|
33
|
+
this.symVer = "257.1.6";
|
|
34
|
+
this.publishDate = "17-3-2025 08:31:39";
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
37
|
|
|
@@ -117,6 +117,7 @@ class ProductEventService {
|
|
|
117
117
|
this.onRenderImageReceived = new Subject();
|
|
118
118
|
this.onDraftRenderImageReceived = new Subject();
|
|
119
119
|
this.onArticleInfoReceived = new Subject();
|
|
120
|
+
this.onAnswersAvailable = new Subject();
|
|
120
121
|
this.onUpdateProductInfoTab = new Subject();
|
|
121
122
|
this.errorMessage = new Subject();
|
|
122
123
|
}
|
|
@@ -307,6 +308,7 @@ class Dictionary {
|
|
|
307
308
|
"ADDITIONAL_DATA": "Additional information",
|
|
308
309
|
"ALTERNATIVE_PRODUCTS": "Alternative products",
|
|
309
310
|
"ARTICLE_NUMBER": "Productnumber",
|
|
311
|
+
"AS_CONFIGURED": "As configured",
|
|
310
312
|
"CATEGORY": "Category",
|
|
311
313
|
"CATEGORY_TYPE": "Category type",
|
|
312
314
|
"CONFIGURE": "Configure",
|
|
@@ -338,6 +340,7 @@ class Dictionary {
|
|
|
338
340
|
"ADDITIONAL_DATA": "Extra informatie",
|
|
339
341
|
"ALTERNATIVE_PRODUCTS": "Alternatieve producten",
|
|
340
342
|
"ARTICLE_NUMBER": "Artikel nummer",
|
|
343
|
+
"AS_CONFIGURED": "Zoals samengesteld",
|
|
341
344
|
"CATEGORY": "Categorie",
|
|
342
345
|
"CATEGORY_TYPE": "Categorie type",
|
|
343
346
|
"CONFIGURE": "Configureren",
|
|
@@ -692,6 +695,7 @@ class IoneProductComponent {
|
|
|
692
695
|
this.onSelectionsReceived = new EventEmitter();
|
|
693
696
|
this.onAddToQuote = new EventEmitter();
|
|
694
697
|
this.openStockEvent = new EventEmitter();
|
|
698
|
+
this.onAnswersAvailable = new EventEmitter();
|
|
695
699
|
this.settingsLoaded = false;
|
|
696
700
|
this.showHD = false;
|
|
697
701
|
this._subs = [];
|
|
@@ -699,7 +703,7 @@ class IoneProductComponent {
|
|
|
699
703
|
// this._dictionary.dictionaryLoaded.subscribe(d => this.upAndLoaded = true),
|
|
700
704
|
this._appEventService.onAddToCart.subscribe((data) => {
|
|
701
705
|
this._handleAddToCart(data);
|
|
702
|
-
}), this._appEventService.onAddToQuote.subscribe(json => this.onAddToQuote.emit(json)), this._appEventService.onAlternativeClick.subscribe(article => this.onAlternativeClick.emit(article)), this._appEventService.onArticleInfoReceived.subscribe(info => this._handleAnswerInfoReceived(info)), this._appEventService.onArticleReceived.subscribe(article => this.onArticleReceived.emit(article)), this._appEventService.onSelectionsReceived.subscribe(selections => this.onSelectionsReceived.emit(selections)), this._settingsService.settingsLoaded.subscribe(loaded => {
|
|
706
|
+
}), this._appEventService.onAddToQuote.subscribe(json => this.onAddToQuote.emit(json)), this._appEventService.onAlternativeClick.subscribe(article => this.onAlternativeClick.emit(article)), this._appEventService.onArticleInfoReceived.subscribe(info => this._handleAnswerInfoReceived(info)), this._appEventService.onArticleReceived.subscribe(article => this.onArticleReceived.emit(article)), this._appEventService.onSelectionsReceived.subscribe(selections => this.onSelectionsReceived.emit(selections)), this._appEventService.onAnswersAvailable.subscribe(answers => this._handleAnswersAvailable(answers)), this._settingsService.settingsLoaded.subscribe(loaded => {
|
|
703
707
|
this.settingsLoaded = loaded;
|
|
704
708
|
}));
|
|
705
709
|
}
|
|
@@ -733,6 +737,9 @@ class IoneProductComponent {
|
|
|
733
737
|
_handleAnswerInfoReceived(info) {
|
|
734
738
|
this.onArticleInfoReceived.next(info);
|
|
735
739
|
}
|
|
740
|
+
_handleAnswersAvailable(answers) {
|
|
741
|
+
this.onAnswersAvailable.next(answers);
|
|
742
|
+
}
|
|
736
743
|
_handleAddToCart(data) {
|
|
737
744
|
return __awaiter(this, void 0, void 0, function* () {
|
|
738
745
|
this.onAddToCart.emit(data);
|
|
@@ -781,7 +788,8 @@ IoneProductComponent.propDecorators = {
|
|
|
781
788
|
onArticleReceived: [{ type: Output }],
|
|
782
789
|
onSelectionsReceived: [{ type: Output }],
|
|
783
790
|
onAddToQuote: [{ type: Output }],
|
|
784
|
-
openStockEvent: [{ type: Output }]
|
|
791
|
+
openStockEvent: [{ type: Output }],
|
|
792
|
+
onAnswersAvailable: [{ type: Output }]
|
|
785
793
|
};
|
|
786
794
|
|
|
787
795
|
class StockAndDelivery {
|
|
@@ -895,6 +903,7 @@ class ProductPageComponent {
|
|
|
895
903
|
this.show2D = true;
|
|
896
904
|
this.show3D = false;
|
|
897
905
|
this.configuring = false;
|
|
906
|
+
this.showAddToCart = false;
|
|
898
907
|
this.fullscreenAnimationEnd = false;
|
|
899
908
|
this.settingsLoaded = false;
|
|
900
909
|
this._fullScreen = false;
|
|
@@ -905,6 +914,13 @@ class ProductPageComponent {
|
|
|
905
914
|
}
|
|
906
915
|
}), this.settingsService.settingsLoaded.subscribe(loaded => this._handleSettingsLoaded(loaded)), this._ione.controllerInitialized.subscribe((initialized) => {
|
|
907
916
|
this.settingsLoaded = initialized;
|
|
917
|
+
}), this.appEventService.onAnswersAvailable.subscribe((answers) => {
|
|
918
|
+
if (answers && this.configurable) {
|
|
919
|
+
this.showAddToCart = false;
|
|
920
|
+
}
|
|
921
|
+
else {
|
|
922
|
+
this.showAddToCart = true;
|
|
923
|
+
}
|
|
908
924
|
}));
|
|
909
925
|
}
|
|
910
926
|
set sku(value) {
|
|
@@ -1007,8 +1023,12 @@ class ProductPageComponent {
|
|
|
1007
1023
|
if (this.article) {
|
|
1008
1024
|
this.configurable = this.article.goodType === 'B';
|
|
1009
1025
|
if (this.configurable) {
|
|
1026
|
+
this.showAddToCart = false;
|
|
1010
1027
|
this.currentView = SelectorType.TwoD;
|
|
1011
1028
|
}
|
|
1029
|
+
else {
|
|
1030
|
+
this.showAddToCart = true;
|
|
1031
|
+
}
|
|
1012
1032
|
this.threeD = this.article.is3D;
|
|
1013
1033
|
this.selectorType = this.article.selectorTypeCustomer;
|
|
1014
1034
|
this._ione.getDeliveryPrognosis(this.article.goodId).then((stockInfo) => {
|
|
@@ -1034,7 +1054,7 @@ class ProductPageComponent {
|
|
|
1034
1054
|
ProductPageComponent.decorators = [
|
|
1035
1055
|
{ type: Component, args: [{
|
|
1036
1056
|
selector: 'app-product-page',
|
|
1037
|
-
template: "<ng-container *ngIf=\"settingsLoaded\">\r\n <div class=\"page-wrapper\">\r\n <div class=\"page-wrapper-content\">\r\n <div class=\"page-wrapper-left\">\r\n <div class=\"product-image-container\">\r\n <div class=\"product-page-block-selector-type\">\r\n <app-product-selector-type class=\"default-padding\"\r\n [(currentType)]=\"currentView\"\r\n [show2D]=\"configurable\"\r\n [show3D]=\"threeD\"\r\n ></app-product-selector-type>\r\n </div>\r\n <div class=\"product-page-block-image default-padding\" [class.full]=\"fullScreen\">\r\n <app-image-carousel [@toggleVisibilityByState]=\"show2D ? 'show' : 'hide'\" [images]=\"article?.images\" [showRefresh]=\"configurable && threeD\"></app-image-carousel>\r\n <ng-container *ngIf=\"settingsLoaded\">\r\n <threed-configurator #configurator class=\"threed-configurator\"\r\n [class.configurator-full-screen]=\"fullScreen\"\r\n [@toggleVisibilityByState]=\"show3D ? 'show' : 'hide'\"\r\n [@toggleFullScreen]=\"fullScreen ? 'fullscreen' : 'halfscreen'\"\r\n ></threed-configurator>\r\n </ng-container>\r\n <co-icon #fullscreenbutton class=\"fullscreen-button\" *ngIf=\"show3D\"\r\n [@toggleTopLeft]=\"fullScreen ? 'fullscreen' : 'halfscreen'\"\r\n [iconData]=\"iconCache.getIcon(fullScreenIcon)\"\r\n (click)=\"showFullScreen()\"></co-icon>\r\n <co-icon class=\"threed-watermark\" *ngIf=\"show3D && fullScreen\"\r\n [iconData]=\"iconCache.getIcon(icon.Logo)\"></co-icon>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"page-wrapper-right\">\r\n <div class=\"product-page-block-description\">\r\n <app-product-description class=\"default-padding\" [article]=\"article\"></app-product-description>\r\n </div>\r\n <div class=\"product-page-block-additional\">\r\n <div class=\"product-page-block-additional-description\">\r\n <app-product-additional-description class=\"default-padding\" [article]=\"article\"></app-product-additional-description>\r\n </div>\r\n <div class=\"product-page-block-price\" [class.full]=\"configuring\">\r\n <app-product-price class=\"s-padding\" *ngIf=\"!configuring\"\r\n [pricing]=\"article?.pricing\"\r\n [configurable]=\"configurable\"\r\n ></app-product-price>\r\n <ng-container *ngIf=\"settingsLoaded\">\r\n <threed-selections #selections class=\"threed-selections\" [class.show-selections]=\"configuring\" [@toggleFullScreenRight]=\"fullScreen ? 'fullscreen' : 'halfscreen'\"\r\n [class.default-padding]=\"!fullScreen\"\r\n [class.show-full-screen]=\"fullScreen\"\r\n [class.mini-scrollbar]=\"fullScreen\"\r\n [sku]=\"sku\"\r\n [settings]=\"settings\"\r\n (onUserActionFromThreeD)=\"configuring = true\"\r\n (instanceSet)=\"setInstance($event)\"\r\n (onImageReceived)=\"appEventService.onImageReceived.next($event)\"\r\n (onRenderStarted)=\"appEventService.onRenderStarted.next()\"\r\n (onDraftRenderImageReceived)=\"appEventService.onDraftRenderImageReceived.next($event)\"\r\n (onArticleReceived)=\"appEventService.onArticleReceived.next($event.detail)\"\r\n (onSelectionsReceived)=\"appEventService.onSelectionsReceived.next($event.detail)\"\r\n (onArticleInfoReceived)=\"appEventService.onArticleInfoReceived.next($event.detail)\"\r\n ></threed-selections>\r\n </ng-container>\r\n </div>\r\n <div class=\"product-page-block-addtocart no-padding product-action-buttons\" *ngIf=\"!configuring\" [@toggleTopRight]=\"fullScreen ? 'fullscreen' : 'halfscreen'\">\r\n <app-product-addtocart\r\n [configurable]=\"configurable\"\r\n [createFrozenArticle]=\"createFrozenArticle\"\r\n [configuring]=\"configuring\"\r\n [article]=\"article\"\r\n [externalSource]=\"externalSource\"\r\n [isReturn]=\"isReturn\"\r\n (startConfiguration)=\"handleStartConfiguration()\"\r\n (showRelatedPopup)=\"handlePopUpChange($event)\"\r\n ></app-product-addtocart>\r\n </div>\r\n <div class=\"addtocart-reserved product-action-buttons\" *ngIf=\"configuring\" [class.full-screen]=\"fullScreen\">\r\n <app-product-addtocart class=\"default-padding\"\r\n [configurable]=\"false\"\r\n [fullscreen]=\"fullScreen\"\r\n [configuring]=\"configuring\"\r\n [article]=\"article\"\r\n [externalSource]=\"externalSource\"\r\n [isReturn]=\"isReturn\"\r\n (startConfiguration)=\"handleStartConfiguration()\"\r\n ></app-product-addtocart>\r\n </div>\r\n <div class=\"product-page-block-variants\">\r\n <app-product-related class=\"no-padding\" *ngIf=\"article?.relatedArticles && article?.relatedArticles.length > 0\"\r\n [externalSource]=\"externalSource\"\r\n [articles]=\"article?.relatedArticles\" [refType]=\"64\" [label]=\"'VARIANTS' | localize\"></app-product-related>\r\n </div>\r\n <div class=\"product-page-block-stock\">\r\n <app-product-stock class=\"no-padding\" [goodId]=\"article?.goodId\" (openStockEvent)=\"openStock()\"></app-product-stock>\r\n </div>\r\n <div class=\"product-page-block-delivery\">\r\n <app-product-delivery class=\"no-padding\" [stockAndDelivery]=\"stockAndDelivery\"></app-product-delivery>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"page-wrapper-content\">\r\n <div class=\"page-wrapper-left\">\r\n <app-product-info-tabs class=\"no-padding\" [article]=\"article\"></app-product-info-tabs>\r\n </div>\r\n <div class=\"page-wrapper-right\">\r\n <div class=\"product-page-block-related s-padding\">\r\n <app-product-related\r\n *ngIf=\"article?.relatedArticles && article?.relatedArticles.length > 0\"\r\n [externalSource]=\"externalSource\"\r\n [articles]=\"article?.relatedArticles\"\r\n [refType]=\"1\"\r\n [label]=\"'RELATED_PRODUCTS' | localize\">\r\n </app-product-related>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"page-wrapper-content no-top-margin\">\r\n <div class=\"page-wrapper-full\">\r\n <div class=\"product-page-block-alternatives s-padding\">\r\n <app-product-related\r\n *ngIf=\"article?.relatedArticles && article?.relatedArticles.length > 0\"\r\n [externalSource]=\"externalSource\"\r\n [articles]=\"article?.relatedArticles\"\r\n [refType]=\"4\"\r\n [isSmallModus]=\"false\"\r\n [label]=\"'ALTERNATIVE_PRODUCTS' | localize\">\r\n </app-product-related>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n\r\n <div *ngIf=\"showRelatedProductsPopup\">\r\n <co-product-dialog\r\n [mainArticle]=\"article\"\r\n [articles]=\"article?.relatedArticles\"\r\n [refType]=\"1\"\r\n (closeRelatedPopup)=\"handlePopUpChange($event)\"\r\n >\r\n </co-product-dialog>\r\n\r\n<!-- <app-product-related class=\"no-padding\" *ngIf=\"article?.relatedArticles && article?.relatedArticles.length > 0\"-->\r\n<!-- [articles]=\"article?.relatedArticles\" [refType]=\"64\" [label]=\"'VARIANTS' | localize\"></app-product-related>-->\r\n </div>\r\n\r\n\r\n </div>\r\n</ng-container>\r\n",
|
|
1057
|
+
template: "<ng-container *ngIf=\"settingsLoaded\">\r\n <div class=\"page-wrapper\">\r\n <div class=\"page-wrapper-content\">\r\n <div class=\"page-wrapper-left\">\r\n <div class=\"product-image-container\">\r\n <div class=\"product-page-block-selector-type\">\r\n <app-product-selector-type class=\"default-padding\"\r\n [(currentType)]=\"currentView\"\r\n [show2D]=\"configurable\"\r\n [show3D]=\"threeD\"\r\n ></app-product-selector-type>\r\n </div>\r\n <div class=\"product-page-block-image default-padding\" [class.full]=\"fullScreen\">\r\n <app-image-carousel [@toggleVisibilityByState]=\"show2D ? 'show' : 'hide'\" [images]=\"article?.images\" [showRefresh]=\"configurable && threeD\"></app-image-carousel>\r\n <ng-container *ngIf=\"settingsLoaded\">\r\n <threed-configurator #configurator class=\"threed-configurator\"\r\n [class.configurator-full-screen]=\"fullScreen\"\r\n [@toggleVisibilityByState]=\"show3D ? 'show' : 'hide'\"\r\n [@toggleFullScreen]=\"fullScreen ? 'fullscreen' : 'halfscreen'\"\r\n ></threed-configurator>\r\n </ng-container>\r\n <co-icon #fullscreenbutton class=\"fullscreen-button\" *ngIf=\"show3D\"\r\n [@toggleTopLeft]=\"fullScreen ? 'fullscreen' : 'halfscreen'\"\r\n [iconData]=\"iconCache.getIcon(fullScreenIcon)\"\r\n (click)=\"showFullScreen()\"></co-icon>\r\n <co-icon class=\"threed-watermark\" *ngIf=\"show3D && fullScreen\"\r\n [iconData]=\"iconCache.getIcon(icon.Logo)\"></co-icon>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"page-wrapper-right\">\r\n <div class=\"product-page-block-description\">\r\n <app-product-description class=\"default-padding\" [article]=\"article\"></app-product-description>\r\n </div>\r\n <div class=\"product-page-block-additional\">\r\n <div class=\"product-page-block-additional-description\">\r\n <app-product-additional-description class=\"default-padding\" [article]=\"article\"></app-product-additional-description>\r\n </div>\r\n <div class=\"product-page-block-price\" [class.full]=\"configuring\">\r\n <app-product-price class=\"s-padding\" *ngIf=\"!configuring\"\r\n [pricing]=\"article?.pricing\"\r\n [configurable]=\"configurable\"\r\n ></app-product-price>\r\n <ng-container *ngIf=\"settingsLoaded\">\r\n <threed-selections #selections class=\"threed-selections\" [class.show-selections]=\"configuring\" [@toggleFullScreenRight]=\"fullScreen ? 'fullscreen' : 'halfscreen'\"\r\n [class.default-padding]=\"!fullScreen\"\r\n [class.show-full-screen]=\"fullScreen\"\r\n [class.mini-scrollbar]=\"fullScreen\"\r\n [sku]=\"sku\"\r\n [settings]=\"settings\"\r\n (onUserActionFromThreeD)=\"configuring = true\"\r\n (instanceSet)=\"setInstance($event)\"\r\n (onImageReceived)=\"appEventService.onImageReceived.next($event)\"\r\n (onRenderStarted)=\"appEventService.onRenderStarted.next()\"\r\n (onDraftRenderImageReceived)=\"appEventService.onDraftRenderImageReceived.next($event)\"\r\n (onArticleReceived)=\"appEventService.onArticleReceived.next($event.detail)\"\r\n (onSelectionsReceived)=\"appEventService.onSelectionsReceived.next($event.detail)\"\r\n (onArticleInfoReceived)=\"appEventService.onArticleInfoReceived.next($event.detail)\"\r\n (onAnswersAvailable)=\"appEventService.onAnswersAvailable.next($event.detail)\"\r\n ></threed-selections>\r\n </ng-container>\r\n </div>\r\n <div class=\"product-page-block-addtocart no-padding product-action-buttons\" *ngIf=\"!configuring\" [@toggleTopRight]=\"fullScreen ? 'fullscreen' : 'halfscreen'\">\r\n <app-product-addtocart\r\n [configurable]=\"configurable\"\r\n [createFrozenArticle]=\"createFrozenArticle\"\r\n [configuring]=\"configuring\"\r\n [showAddToCart]=\"showAddToCart\"\r\n [article]=\"article\"\r\n [externalSource]=\"externalSource\"\r\n [isReturn]=\"isReturn\"\r\n (startConfiguration)=\"handleStartConfiguration()\"\r\n (showRelatedPopup)=\"handlePopUpChange($event)\"\r\n ></app-product-addtocart>\r\n </div>\r\n <div class=\"addtocart-reserved product-action-buttons\" *ngIf=\"configuring\" [class.full-screen]=\"fullScreen\">\r\n <app-product-addtocart class=\"default-padding\"\r\n [configurable]=\"false\"\r\n [fullscreen]=\"fullScreen\"\r\n [showAddToCart]=\"showAddToCart\"\r\n [configuring]=\"configuring\"\r\n [article]=\"article\"\r\n [externalSource]=\"externalSource\"\r\n [isReturn]=\"isReturn\"\r\n (startConfiguration)=\"handleStartConfiguration()\"\r\n ></app-product-addtocart>\r\n </div>\r\n <div class=\"product-page-block-variants\">\r\n <app-product-related class=\"no-padding\" *ngIf=\"article?.relatedArticles && article?.relatedArticles.length > 0\"\r\n [externalSource]=\"externalSource\"\r\n [articles]=\"article?.relatedArticles\" [refType]=\"64\" [label]=\"'VARIANTS' | localize\"></app-product-related>\r\n </div>\r\n <div class=\"product-page-block-stock\">\r\n <app-product-stock class=\"no-padding\" [goodId]=\"article?.goodId\" (openStockEvent)=\"openStock()\"></app-product-stock>\r\n </div>\r\n <div class=\"product-page-block-delivery\">\r\n <app-product-delivery class=\"no-padding\" [stockAndDelivery]=\"stockAndDelivery\"></app-product-delivery>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"page-wrapper-content\">\r\n <div class=\"page-wrapper-left\">\r\n <app-product-info-tabs class=\"no-padding\" [article]=\"article\"></app-product-info-tabs>\r\n </div>\r\n <div class=\"page-wrapper-right\">\r\n <div class=\"product-page-block-related s-padding\">\r\n <app-product-related\r\n *ngIf=\"article?.relatedArticles && article?.relatedArticles.length > 0\"\r\n [externalSource]=\"externalSource\"\r\n [articles]=\"article?.relatedArticles\"\r\n [refType]=\"1\"\r\n [label]=\"'RELATED_PRODUCTS' | localize\">\r\n </app-product-related>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"page-wrapper-content no-top-margin\">\r\n <div class=\"page-wrapper-full\">\r\n <div class=\"product-page-block-alternatives s-padding\">\r\n <app-product-related\r\n *ngIf=\"article?.relatedArticles && article?.relatedArticles.length > 0\"\r\n [externalSource]=\"externalSource\"\r\n [articles]=\"article?.relatedArticles\"\r\n [refType]=\"4\"\r\n [isSmallModus]=\"false\"\r\n [label]=\"'ALTERNATIVE_PRODUCTS' | localize\">\r\n </app-product-related>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n\r\n <div *ngIf=\"showRelatedProductsPopup\">\r\n <co-product-dialog\r\n [mainArticle]=\"article\"\r\n [articles]=\"article?.relatedArticles\"\r\n [refType]=\"1\"\r\n (closeRelatedPopup)=\"handlePopUpChange($event)\"\r\n >\r\n </co-product-dialog>\r\n\r\n<!-- <app-product-related class=\"no-padding\" *ngIf=\"article?.relatedArticles && article?.relatedArticles.length > 0\"-->\r\n<!-- [articles]=\"article?.relatedArticles\" [refType]=\"64\" [label]=\"'VARIANTS' | localize\"></app-product-related>-->\r\n </div>\r\n\r\n\r\n </div>\r\n</ng-container>\r\n",
|
|
1038
1058
|
animations: [
|
|
1039
1059
|
trigger('toggleFullScreen', [
|
|
1040
1060
|
state('fullscreen', style({ 'position': 'fixed', 'top': '0', 'left': '0', 'width': '100%', 'height': '100%' })),
|
|
@@ -1067,7 +1087,7 @@ ProductPageComponent.decorators = [
|
|
|
1067
1087
|
transition('void => *', animate('200ms ease-in-out')),
|
|
1068
1088
|
])
|
|
1069
1089
|
],
|
|
1070
|
-
styles: [".page-wrapper{font-family:iOneMontserrat;font-size:12px;display:flex;flex-direction:column;max-width:1400px;padding:0 15px;margin:0 auto}.page-wrapper-content{display:flex;flex-direction:row;margin:40px 0}.page-wrapper-content:first-child{margin-top:0}.page-wrapper-content.no-top-margin{margin-top:0}.page-wrapper-left{display:flex;width:55%;flex-direction:column}.page-wrapper-right{display:flex;width:45%;flex-direction:column}.page-wrapper-full{display:flex;width:100%;flex-direction:column}.page-wrapper-66{display:flex;width:60%;flex-direction:column}.page-wrapper-33{display:flex;width:40%;flex-direction:column}.threed-selections{display:none}.threed-selections.show-selections{display:block}.threed-selections ::ng-deep .rp-lite-selector .rp-answers-slideout ::ng-deep co-slideout{width:480px;z-index:3}.product-action-buttons{position:relative}.product-action-buttons.full-screen{z-index:10}.product-image-container{grid-column:1/7;grid-row:1/6;position:relative}.product-page-block-selector-type{width:auto;position:absolute;top:10px;right:10px;z-index:2}.product-page-block-image{box-sizing:border-box;width:100%;z-index:1;position:relative}.product-page-block-image .threed-configurator{border:1px solid #efefef}.product-page-block-image .threed-configurator .layer .viewer canvas{height:100%;width:100%}.product-page-block-image .threed-configurator ::ng-deep .rp-element-toolbar{top:30px}.product-page-block-image app-image-carousel.show-animated,.product-page-block-image threed-configurator.show-animated{opacity:1;z-index:0;transition:all .2s ease-in-out}.product-page-block-image .fullscreen-button{cursor:pointer;height:50px;width:50px;position:absolute;left:30px;z-index:100;top:30px}.product-page-block-image.full{grid-column:1/11;grid-row:2/span 10;z-index:3}.product-page-block-description{grid-column:7/12;grid-row:1/1}.product-page-block-additional{width:100%}.product-page-block-additional-description{width:100%}.product-page-block-price{grid-column:1/3;grid-row:2/2;align-self:center}.product-page-block-price.full{grid-column:1/5}.product-page-block-addtocart{grid-column:3/5;grid-row:2/2;align-self:center;padding-top:30px!important}.product-page-block-addtocart ::ng-deep co-number-picker ::ng-deep co-button{cursor:pointer}.product-page-block-addtocart ::ng-deep co-number-picker ::ng-deep co-button:hover div.rippler{background:#f6f5f4}.product-page-block-addtocart ::ng-deep co-number-picker ::ng-deep co-button ::ng-deep co-icon{position:relative;z-index:2}.product-page-block-addtocart ::ng-deep co-button.cart-button{cursor:pointer}.product-page-block-addtocart ::ng-deep co-button.cart-button:hover{background:#74B77F}.addtocart-reserved{grid-column:1/3;grid-row:3/3}.product-page-block-stock{grid-column:1/3;grid-row:4/4}.product-page-block-delivery{grid-column:3/5;grid-row:4/4}::ng-deep co-scroll-container{overflow:hidden;position:relative}::ng-deep co-scroll-container .content-wrapper{padding:0}::ng-deep co-scroll-container .scroll-layer{left:0;top:0}::ng-deep co-scroll-container .scroll-layer .scroller{width:34px;height:34px;border-radius:36px;background:#fff;cursor:pointer;box-shadow:0 0 5px #0003}::ng-deep co-scroll-container .scroll-layer .scroller:hover{background:#f6f5f4}::ng-deep co-scroll-container .scroll-layer .scroller.left-scroll{left:5px}::ng-deep co-scroll-container .scroll-layer .scroller.left-scroll:before{border-width:0 3px 3px 0;padding:4px;margin-left:13px;margin-top:11px}::ng-deep co-scroll-container .scroll-layer .scroller.right-scroll{right:5px}::ng-deep co-scroll-container .scroll-layer .scroller.right-scroll:after{border-width:0 3px 3px 0;padding:4px;margin-left:9px;margin-top:11px}.product-page-block-variants{margin:20px 0 0}.product-page-block-variants ::ng-deep app-product-related>div{display:flex;grid-gap:15px;gap:15px;align-items:center;border-top:1px solid #f6f5f4;padding:5px 0 7px 15px}.product-page-block-variants ::ng-deep app-product-related>div ::ng-deep app-header h3{font-size:14px}.product-page-block-variants ::ng-deep app-product-related>div ::ng-deep co-scroll-container{width:320px;max-width:100%;padding:0 16px}.product-page-block-variants ::ng-deep app-product-related>div ::ng-deep co-scroll-container .scroller{width:26px;height:26px}.product-page-block-variants ::ng-deep app-product-related>div ::ng-deep co-scroll-container .scroller.left-scroll{left:5px}.product-page-block-variants ::ng-deep app-product-related>div ::ng-deep co-scroll-container .scroller.left-scroll:before{border-width:0 2px 2px 0;margin-left:9px;margin-top:9px}.product-page-block-variants ::ng-deep app-product-related>div ::ng-deep co-scroll-container .scroller.right-scroll{right:5px}.product-page-block-variants ::ng-deep app-product-related>div ::ng-deep co-scroll-container .scroller.right-scroll:after{border-width:0 2px 2px 0;margin-left:6px;margin-top:9px}.product-page-block-variants ::ng-deep co-tile.small{min-width:50px!important;max-width:50px!important;border:1px solid #f6f5f4;margin:0 10px 0 0;border-radius:4px}.product-page-block-variants ::ng-deep co-tile.small:hover{border-color:#22313c}.product-page-block-variants ::ng-deep co-tile.small .tile-wrapper{padding:0}.product-page-block-variants ::ng-deep co-tile.small .tile-wrapper .tile-top{display:none}.product-page-block-variants ::ng-deep co-tile.small .tile-wrapper .image{height:40px!important;padding:5px;margin-bottom:10px}.product-page-block-variants ::ng-deep co-tile.small .tile-wrapper .image .no-image-wrapper .no-image{width:40px;height:40px}.product-page-block-variants ::ng-deep co-tile.small .tile-wrapper .image .no-image-wrapper span{display:none!important}.product-page-block-variants ::ng-deep co-tile.small .tile-wrapper .tile-bottom{display:none}.product-page-block-variants ::ng-deep co-tile.small .tile-extra-bottom{display:none}.product-page-block-alternatives ::ng-deep .article-wrapper{margin:0 20px 0 0}.product-page-block-alternatives ::ng-deep .article-wrapper:last-child{margin:0}.product-page-block-alternatives ::ng-deep co-tile{cursor:pointer;transition:all .14s ease-out;border:1px solid transparent;border-bottom-color:#f6f5f4;padding:15px 10px 0;width:319px;max-width:none;min-width:0;box-sizing:border-box}.product-page-block-alternatives ::ng-deep co-tile:hover{box-shadow:none;border-color:#f6f5f4}.product-page-block-alternatives ::ng-deep co-tile:hover .tile-wrapper div.image co-image{transform:scale(1.05)}.product-page-block-alternatives ::ng-deep co-tile:hover .tile-wrapper .tile-bottom{margin:0}.product-page-block-alternatives ::ng-deep co-tile:hover .tile-extra-bottom .main .description{text-decoration:underline}.product-page-block-alternatives ::ng-deep co-tile .tile-wrapper{padding:0;position:relative;outline:none;overflow:hidden}.product-page-block-alternatives ::ng-deep co-tile .tile-wrapper .tile-top{position:absolute;left:0;top:0;width:100%}.product-page-block-alternatives ::ng-deep co-tile .tile-wrapper div.image{position:relative;padding:1px;display:flex;align-items:center;justify-content:center;overflow:hidden;max-width:250px;margin:0 auto 10px;height:auto}.product-page-block-alternatives ::ng-deep co-tile .tile-wrapper div.image:after{content:\"\";padding:100% 0 0;float:left;width:100%}.product-page-block-alternatives ::ng-deep co-tile .tile-wrapper div.image co-image{position:absolute;left:0;top:0;overflow:hidden;width:100%;height:100%;-o-object-fit:contain;object-fit:contain;z-index:-1;transition:all .2s ease}.product-page-block-alternatives ::ng-deep co-tile .tile-wrapper div.image .no-image-wrapper{position:absolute;display:flex;left:50%;top:50%;margin:-48px 0 0 -54px;flex-direction:column;align-items:center;opacity:.25}.product-page-block-alternatives ::ng-deep co-tile .tile-wrapper .tile-bottom{transition:all .2s ease;height:auto}.product-page-block-alternatives ::ng-deep co-tile .tile-wrapper .tile-bottom ::ng-deep co-button{margin:0 0 5px!important;width:36px;height:36px;border:1px solid #22313C;cursor:pointer;border-radius:4px;padding:0!important;font-size:0}.product-page-block-alternatives ::ng-deep co-tile .tile-wrapper .tile-bottom ::ng-deep co-button co-icon{width:32px;height:32px;margin:0 2px}.product-page-block-alternatives ::ng-deep co-tile .tile-extra-bottom{outline:none;padding:15px 0;background:transparent!important;min-height:60px}.product-page-block-alternatives ::ng-deep co-tile .tile-extra-bottom .main{padding:0 10px}.product-page-block-alternatives ::ng-deep co-tile .tile-extra-bottom .main .description{font-size:15px;font-weight:bold;margin:0 0 2px}.product-page-block-alternatives ::ng-deep co-tile .tile-extra-bottom .main .price{font-size:16px;margin:15px 0 0;font-weight:bold;color:#2b60a7}.product-page-block-additional-information{grid-column:1/6;grid-row:4/4}.product-page-block-properties{grid-column:7/10;grid-row:3/3}.product-page-block-related-articles{grid-column:2/6;grid-row:4/4}.product-page-block-alternative-articles{grid-column:6/10;grid-row:4/4}.product-page-block-documents{grid-column:2/6;grid-row:5/5}.product-page-block-symbols{grid-column:6/10;grid-row:5/5}@media screen and (max-width: 950px){.default-padding{padding-top:20px;padding-bottom:20px}.m-padding{padding-top:15px;padding-bottom:15px}.s-padding{padding-top:5px;padding-bottom:5px}.page-wrapper{max-width:650px}.page-wrapper .page-wrapper-content{flex-direction:column;margin:30px 0}.page-wrapper .page-wrapper-content .page-wrapper-left{width:100%}.page-wrapper .page-wrapper-content .page-wrapper-right{width:100%}.product-page-block-alternatives ::ng-deep co-tile{width:284px!important}}@media screen and (max-width: 650px){[class*=-padding]{padding-left:0!important;padding-right:0!important}.product-page-block-addtocart ::ng-deep co-number-picker co-button{height:38px!important}.product-page-block-addtocart ::ng-deep co-number-picker co-input-text{height:38px!important;width:36px!important}.product-page-block-addtocart ::ng-deep co-button.cart-button{height:40px;font-size:13px}}\n"]
|
|
1090
|
+
styles: [".page-wrapper{font-family:iOneMontserrat;font-size:12px;display:flex;flex-direction:column;max-width:1400px;padding:0 15px;margin:0 auto}.page-wrapper-content{display:flex;flex-direction:row;margin:40px 0}.page-wrapper-content:first-child{margin-top:0}.page-wrapper-content.no-top-margin{margin-top:0}.page-wrapper-left{display:flex;width:55%;flex-direction:column}.page-wrapper-right{display:flex;width:45%;flex-direction:column}.page-wrapper-full{display:flex;width:100%;flex-direction:column}.page-wrapper-66{display:flex;width:60%;flex-direction:column}.page-wrapper-33{display:flex;width:40%;flex-direction:column}.threed-selections{display:none}.threed-selections.show-selections{display:block}.threed-selections ::ng-deep .rp-lite-selector .rp-answers-slideout ::ng-deep co-slideout{width:480px;z-index:3}.threed-selections ::ng-deep .co-summary-line{cursor:pointer}.product-action-buttons{position:relative}.product-action-buttons.full-screen{z-index:10}.product-image-container{grid-column:1/7;grid-row:1/6;position:relative}.product-page-block-selector-type{width:auto;position:absolute;top:10px;right:10px;z-index:2}.product-page-block-image{box-sizing:border-box;width:100%;z-index:1;position:relative}.product-page-block-image .threed-configurator{border:1px solid #efefef}.product-page-block-image .threed-configurator .layer .viewer canvas{height:100%;width:100%}.product-page-block-image .threed-configurator ::ng-deep .rp-element-toolbar{top:30px}.product-page-block-image app-image-carousel.show-animated,.product-page-block-image threed-configurator.show-animated{opacity:1;z-index:0;transition:all .2s ease-in-out}.product-page-block-image .fullscreen-button{cursor:pointer;height:50px;width:50px;position:absolute;left:30px;z-index:100;top:30px}.product-page-block-image.full{grid-column:1/11;grid-row:2/span 10;z-index:3}.product-page-block-description{grid-column:7/12;grid-row:1/1}.product-page-block-additional{width:100%}.product-page-block-additional-description{width:100%}.product-page-block-price{grid-column:1/3;grid-row:2/2;align-self:center}.product-page-block-price.full{grid-column:1/5}.product-page-block-addtocart{grid-column:3/5;grid-row:2/2;align-self:center;padding-top:30px!important}.product-page-block-addtocart ::ng-deep co-number-picker ::ng-deep co-button{cursor:pointer}.product-page-block-addtocart ::ng-deep co-number-picker ::ng-deep co-button:hover div.rippler{background:#f6f5f4}.product-page-block-addtocart ::ng-deep co-number-picker ::ng-deep co-button ::ng-deep co-icon{position:relative;z-index:2}.product-page-block-addtocart ::ng-deep co-button.cart-button{cursor:pointer}.product-page-block-addtocart ::ng-deep co-button.cart-button:hover{background:#74B77F}.addtocart-reserved{grid-column:1/3;grid-row:3/3}.product-page-block-stock{grid-column:1/3;grid-row:4/4}.product-page-block-delivery{grid-column:3/5;grid-row:4/4}::ng-deep co-scroll-container{overflow:hidden;position:relative}::ng-deep co-scroll-container .content-wrapper{padding:0}::ng-deep co-scroll-container .scroll-layer{left:0;top:0}::ng-deep co-scroll-container .scroll-layer .scroller{width:34px;height:34px;border-radius:36px;background:#fff;cursor:pointer;box-shadow:0 0 5px #0003}::ng-deep co-scroll-container .scroll-layer .scroller:hover{background:#f6f5f4}::ng-deep co-scroll-container .scroll-layer .scroller.left-scroll{left:5px}::ng-deep co-scroll-container .scroll-layer .scroller.left-scroll:before{border-width:0 3px 3px 0;padding:4px;margin-left:13px;margin-top:11px}::ng-deep co-scroll-container .scroll-layer .scroller.right-scroll{right:5px}::ng-deep co-scroll-container .scroll-layer .scroller.right-scroll:after{border-width:0 3px 3px 0;padding:4px;margin-left:9px;margin-top:11px}.product-page-block-variants{margin:20px 0 0}.product-page-block-variants ::ng-deep app-product-related>div{display:flex;grid-gap:15px;gap:15px;align-items:center;border-top:1px solid #f6f5f4;padding:5px 0 7px 15px}.product-page-block-variants ::ng-deep app-product-related>div ::ng-deep app-header h3{font-size:14px}.product-page-block-variants ::ng-deep app-product-related>div ::ng-deep co-scroll-container{width:320px;max-width:100%;padding:0 16px}.product-page-block-variants ::ng-deep app-product-related>div ::ng-deep co-scroll-container .scroller{width:26px;height:26px}.product-page-block-variants ::ng-deep app-product-related>div ::ng-deep co-scroll-container .scroller.left-scroll{left:5px}.product-page-block-variants ::ng-deep app-product-related>div ::ng-deep co-scroll-container .scroller.left-scroll:before{border-width:0 2px 2px 0;margin-left:9px;margin-top:9px}.product-page-block-variants ::ng-deep app-product-related>div ::ng-deep co-scroll-container .scroller.right-scroll{right:5px}.product-page-block-variants ::ng-deep app-product-related>div ::ng-deep co-scroll-container .scroller.right-scroll:after{border-width:0 2px 2px 0;margin-left:6px;margin-top:9px}.product-page-block-variants ::ng-deep co-tile.small{min-width:50px!important;max-width:50px!important;border:1px solid #f6f5f4;margin:0 10px 0 0;border-radius:4px}.product-page-block-variants ::ng-deep co-tile.small:hover{border-color:#22313c}.product-page-block-variants ::ng-deep co-tile.small .tile-wrapper{padding:0}.product-page-block-variants ::ng-deep co-tile.small .tile-wrapper .tile-top{display:none}.product-page-block-variants ::ng-deep co-tile.small .tile-wrapper .image{height:40px!important;padding:5px;margin-bottom:10px}.product-page-block-variants ::ng-deep co-tile.small .tile-wrapper .image .no-image-wrapper .no-image{width:40px;height:40px}.product-page-block-variants ::ng-deep co-tile.small .tile-wrapper .image .no-image-wrapper span{display:none!important}.product-page-block-variants ::ng-deep co-tile.small .tile-wrapper .tile-bottom{display:none}.product-page-block-variants ::ng-deep co-tile.small .tile-extra-bottom{display:none}.product-page-block-alternatives ::ng-deep .article-wrapper{margin:0 20px 0 0}.product-page-block-alternatives ::ng-deep .article-wrapper:last-child{margin:0}.product-page-block-alternatives ::ng-deep co-tile{cursor:pointer;transition:all .14s ease-out;border:1px solid transparent;border-bottom-color:#f6f5f4;padding:15px 10px 0;width:319px;max-width:none;min-width:0;box-sizing:border-box}.product-page-block-alternatives ::ng-deep co-tile:hover{box-shadow:none;border-color:#f6f5f4}.product-page-block-alternatives ::ng-deep co-tile:hover .tile-wrapper div.image co-image{transform:scale(1.05)}.product-page-block-alternatives ::ng-deep co-tile:hover .tile-wrapper .tile-bottom{margin:0}.product-page-block-alternatives ::ng-deep co-tile:hover .tile-extra-bottom .main .description{text-decoration:underline}.product-page-block-alternatives ::ng-deep co-tile .tile-wrapper{padding:0;position:relative;outline:none;overflow:hidden}.product-page-block-alternatives ::ng-deep co-tile .tile-wrapper .tile-top{position:absolute;left:0;top:0;width:100%}.product-page-block-alternatives ::ng-deep co-tile .tile-wrapper div.image{position:relative;padding:1px;display:flex;align-items:center;justify-content:center;overflow:hidden;max-width:250px;margin:0 auto 10px;height:auto}.product-page-block-alternatives ::ng-deep co-tile .tile-wrapper div.image:after{content:\"\";padding:100% 0 0;float:left;width:100%}.product-page-block-alternatives ::ng-deep co-tile .tile-wrapper div.image co-image{position:absolute;left:0;top:0;overflow:hidden;width:100%;height:100%;-o-object-fit:contain;object-fit:contain;z-index:-1;transition:all .2s ease}.product-page-block-alternatives ::ng-deep co-tile .tile-wrapper div.image .no-image-wrapper{position:absolute;display:flex;left:50%;top:50%;margin:-48px 0 0 -54px;flex-direction:column;align-items:center;opacity:.25}.product-page-block-alternatives ::ng-deep co-tile .tile-wrapper .tile-bottom{transition:all .2s ease;height:auto}.product-page-block-alternatives ::ng-deep co-tile .tile-wrapper .tile-bottom ::ng-deep co-button{margin:0 0 5px!important;width:36px;height:36px;border:1px solid #22313C;cursor:pointer;border-radius:4px;padding:0!important;font-size:0}.product-page-block-alternatives ::ng-deep co-tile .tile-wrapper .tile-bottom ::ng-deep co-button co-icon{width:32px;height:32px;margin:0 2px}.product-page-block-alternatives ::ng-deep co-tile .tile-extra-bottom{outline:none;padding:15px 0;background:transparent!important;min-height:60px}.product-page-block-alternatives ::ng-deep co-tile .tile-extra-bottom .main{padding:0 10px}.product-page-block-alternatives ::ng-deep co-tile .tile-extra-bottom .main .description{font-size:15px;font-weight:bold;margin:0 0 2px}.product-page-block-alternatives ::ng-deep co-tile .tile-extra-bottom .main .price{font-size:16px;margin:15px 0 0;font-weight:bold;color:#2b60a7}.product-page-block-additional-information{grid-column:1/6;grid-row:4/4}.product-page-block-properties{grid-column:7/10;grid-row:3/3}.product-page-block-related-articles{grid-column:2/6;grid-row:4/4}.product-page-block-alternative-articles{grid-column:6/10;grid-row:4/4}.product-page-block-documents{grid-column:2/6;grid-row:5/5}.product-page-block-symbols{grid-column:6/10;grid-row:5/5}@media screen and (max-width: 950px){.default-padding{padding-top:20px;padding-bottom:20px}.m-padding{padding-top:15px;padding-bottom:15px}.s-padding{padding-top:5px;padding-bottom:5px}.page-wrapper{max-width:650px}.page-wrapper .page-wrapper-content{flex-direction:column;margin:30px 0}.page-wrapper .page-wrapper-content .page-wrapper-left{width:100%}.page-wrapper .page-wrapper-content .page-wrapper-right{width:100%}.product-page-block-alternatives ::ng-deep co-tile{width:284px!important}}@media screen and (max-width: 650px){[class*=-padding]{padding-left:0!important;padding-right:0!important}.product-page-block-addtocart ::ng-deep co-number-picker co-button{height:38px!important}.product-page-block-addtocart ::ng-deep co-number-picker co-input-text{height:38px!important;width:36px!important}.product-page-block-addtocart ::ng-deep co-button.cart-button{height:40px;font-size:13px}}\n"]
|
|
1071
1091
|
},] }
|
|
1072
1092
|
];
|
|
1073
1093
|
ProductPageComponent.ctorParameters = () => [
|
|
@@ -1204,39 +1224,53 @@ ProductSelectorTypeModule.decorators = [
|
|
|
1204
1224
|
},] }
|
|
1205
1225
|
];
|
|
1206
1226
|
|
|
1227
|
+
class ImageViewModel {
|
|
1228
|
+
}
|
|
1207
1229
|
class ImageCarouselComponent {
|
|
1208
|
-
constructor(_ione, _appEventService, _changeDetector, _domSanitizer
|
|
1230
|
+
constructor(_ione, _appEventService, _changeDetector, _domSanitizer) {
|
|
1209
1231
|
this._ione = _ione;
|
|
1210
1232
|
this._appEventService = _appEventService;
|
|
1211
1233
|
this._changeDetector = _changeDetector;
|
|
1212
1234
|
this._domSanitizer = _domSanitizer;
|
|
1213
|
-
this.iconCache = iconCache;
|
|
1214
|
-
this.icons = IconEnum;
|
|
1215
|
-
this.showLoader = false;
|
|
1216
1235
|
this.showRefresh = false;
|
|
1217
1236
|
this.resizing = false;
|
|
1237
|
+
this.imageViewModels = [];
|
|
1238
|
+
this.showLoader = false;
|
|
1218
1239
|
this._currentIndex = 0;
|
|
1219
1240
|
this._images = [];
|
|
1220
1241
|
this._subs = [];
|
|
1242
|
+
this._resizeCanvasHeight = 500;
|
|
1221
1243
|
this._subs.push(this._appEventService.onRenderStarted.subscribe(() => {
|
|
1222
1244
|
this.showLoader = true;
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
this.
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1245
|
+
this._changeDetector.detectChanges();
|
|
1246
|
+
setTimeout(() => {
|
|
1247
|
+
this.showLoader = false;
|
|
1248
|
+
this._changeDetector.detectChanges();
|
|
1249
|
+
}, 10000);
|
|
1250
|
+
}), this._appEventService.onDraftRenderImageReceived.subscribe((event) => {
|
|
1251
|
+
if (event && event.detail) {
|
|
1252
|
+
if (this._images[0] instanceof CoDocument) {
|
|
1253
|
+
this._images.unshift(event.detail);
|
|
1254
|
+
}
|
|
1255
|
+
else {
|
|
1256
|
+
this._images[0] = event.detail;
|
|
1257
|
+
}
|
|
1258
|
+
this._loadAndRescaleImages();
|
|
1229
1259
|
}
|
|
1230
1260
|
this.showLoader = false;
|
|
1261
|
+
this._changeDetector.detectChanges();
|
|
1231
1262
|
}));
|
|
1232
1263
|
}
|
|
1233
1264
|
set images(value) {
|
|
1234
1265
|
if (value && value.length > 0) {
|
|
1235
1266
|
this._images = this._filterValidImages(value);
|
|
1236
|
-
this.
|
|
1267
|
+
this._loadAndRescaleImages();
|
|
1237
1268
|
this._changeDetector.detectChanges();
|
|
1238
1269
|
}
|
|
1239
1270
|
}
|
|
1271
|
+
get images() {
|
|
1272
|
+
return this._images;
|
|
1273
|
+
}
|
|
1240
1274
|
handleWindowResize() {
|
|
1241
1275
|
this.resizing = true;
|
|
1242
1276
|
this._scrollCarouselToIndex();
|
|
@@ -1261,11 +1295,6 @@ class ImageCarouselComponent {
|
|
|
1261
1295
|
this._currentIndex = value;
|
|
1262
1296
|
this._scrollCarouselToIndex();
|
|
1263
1297
|
}
|
|
1264
|
-
get images() {
|
|
1265
|
-
return this._images;
|
|
1266
|
-
}
|
|
1267
|
-
ngOnInit() {
|
|
1268
|
-
}
|
|
1269
1298
|
ngOnDestroy() {
|
|
1270
1299
|
this.carousel = undefined;
|
|
1271
1300
|
this._subs.forEach(s => s.unsubscribe());
|
|
@@ -1276,43 +1305,90 @@ class ImageCarouselComponent {
|
|
|
1276
1305
|
onForceRenderImage() {
|
|
1277
1306
|
this._appEventService.onForceRenderImage.next();
|
|
1278
1307
|
}
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
}
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1308
|
+
handleShowImage(imageViewModel) {
|
|
1309
|
+
if (imageViewModel && imageViewModel.originalSource) {
|
|
1310
|
+
let popupWindow = window.open('', 'Image zoom', 'width=600,height=400');
|
|
1311
|
+
// Set the content of the popup window
|
|
1312
|
+
popupWindow.document.write('<html><head><title>Image zoom</title></head><body>');
|
|
1313
|
+
popupWindow.document.write(`<img src=${imageViewModel.originalSource} alt="Image" style="width:100%; height:auto;">`);
|
|
1314
|
+
popupWindow.document.write('</body></html>');
|
|
1315
|
+
// Close the document to render the popup window
|
|
1316
|
+
popupWindow.document.close();
|
|
1288
1317
|
}
|
|
1289
|
-
else if (image.detail !== undefined) {
|
|
1290
|
-
source = image.detail;
|
|
1291
|
-
}
|
|
1292
|
-
return this._domSanitizer.bypassSecurityTrustUrl(source);
|
|
1293
1318
|
}
|
|
1294
1319
|
_filterValidImages(value) {
|
|
1295
1320
|
if (!value) {
|
|
1296
1321
|
return [];
|
|
1297
1322
|
}
|
|
1298
|
-
return value.filter(doc => {
|
|
1323
|
+
return value.filter((doc) => {
|
|
1299
1324
|
const pattern = /\.(jpg|jpeg|png|gif|bmp|tiff|webp)$/i;
|
|
1300
|
-
return pattern.test(doc.fileName) || !!doc.filePath;
|
|
1325
|
+
return typeof doc === 'string' || (pattern.test(doc.fileName) || !!doc.filePath);
|
|
1301
1326
|
});
|
|
1302
1327
|
}
|
|
1303
|
-
|
|
1328
|
+
_loadAndRescaleImages() {
|
|
1329
|
+
this.imageViewModels.length = 0;
|
|
1304
1330
|
if (this._images) {
|
|
1305
1331
|
this._images.forEach((i) => {
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1332
|
+
let imageViewModel = new ImageViewModel();
|
|
1333
|
+
imageViewModel.image = i;
|
|
1334
|
+
if (typeof i === 'string') { // is a rendered image coming from configurator
|
|
1335
|
+
this._resizeAndSanitizeSource(i, imageViewModel);
|
|
1336
|
+
}
|
|
1337
|
+
else {
|
|
1338
|
+
if (i.filePath) {
|
|
1339
|
+
this._resizeAndSanitizeSource(i.filePath, imageViewModel);
|
|
1340
|
+
}
|
|
1341
|
+
else if (i.documentBody) {
|
|
1342
|
+
this._resizeAndSanitizeSource(i.documentBodyAsDataUri, imageViewModel);
|
|
1343
|
+
}
|
|
1344
|
+
else {
|
|
1345
|
+
this._ione.getDocumentContent(i.documentId, false).then((content) => {
|
|
1346
|
+
if (content) {
|
|
1347
|
+
i.documentBody = content.documentContent;
|
|
1348
|
+
this._resizeAndSanitizeSource(i.documentBodyAsDataUri, imageViewModel);
|
|
1349
|
+
this._changeDetector.detectChanges();
|
|
1350
|
+
}
|
|
1351
|
+
});
|
|
1352
|
+
}
|
|
1312
1353
|
}
|
|
1354
|
+
this.imageViewModels.push(imageViewModel);
|
|
1355
|
+
this._changeDetector.detectChanges();
|
|
1313
1356
|
});
|
|
1314
1357
|
}
|
|
1315
1358
|
}
|
|
1359
|
+
_resizeAndSanitizeSource(source, imageViewModel) {
|
|
1360
|
+
const resizeCanvas = document.createElement('canvas');
|
|
1361
|
+
const resizeCanvasContext = resizeCanvas.getContext('2d');
|
|
1362
|
+
const resizeImage = document.createElement('img');
|
|
1363
|
+
resizeImage.onload = () => __awaiter(this, void 0, void 0, function* () {
|
|
1364
|
+
resizeCanvasContext.imageSmoothingEnabled = true;
|
|
1365
|
+
resizeCanvasContext.imageSmoothingQuality = 'high';
|
|
1366
|
+
// Get the original image dimensions
|
|
1367
|
+
const originalWidth = resizeImage.width;
|
|
1368
|
+
const originalHeight = resizeImage.height;
|
|
1369
|
+
// Calculate the aspect ratio
|
|
1370
|
+
const aspectRatio = originalWidth / originalHeight;
|
|
1371
|
+
// Calculate the new width and height while maintaining the aspect ratio
|
|
1372
|
+
let newWidth = this._resizeCanvasHeight;
|
|
1373
|
+
let newHeight = this._resizeCanvasHeight;
|
|
1374
|
+
if (originalWidth > originalHeight) {
|
|
1375
|
+
newHeight = this._resizeCanvasHeight / aspectRatio;
|
|
1376
|
+
}
|
|
1377
|
+
else {
|
|
1378
|
+
newWidth = this._resizeCanvasHeight * aspectRatio;
|
|
1379
|
+
}
|
|
1380
|
+
// Set the canvas size to the new width and height
|
|
1381
|
+
resizeCanvas.width = newWidth;
|
|
1382
|
+
resizeCanvas.height = newHeight;
|
|
1383
|
+
const imageWidth = this._resizeCanvasHeight * (resizeImage.height / resizeImage.width);
|
|
1384
|
+
resizeCanvasContext.drawImage(resizeImage, 0, 0, newWidth, newHeight);
|
|
1385
|
+
const resizedSource = resizeCanvas.toDataURL('image/jpeg');
|
|
1386
|
+
imageViewModel.source = this._domSanitizer.bypassSecurityTrustUrl(resizedSource);
|
|
1387
|
+
imageViewModel.originalSource = source;
|
|
1388
|
+
});
|
|
1389
|
+
// @ts-ignore
|
|
1390
|
+
resizeImage.src = source;
|
|
1391
|
+
}
|
|
1316
1392
|
_scrollCarouselToIndex() {
|
|
1317
1393
|
if (this.currentIndex > -1 && this.currentIndex <= this.images.length) {
|
|
1318
1394
|
const movePx = this.currentIndex * this.carousel.nativeElement.clientWidth;
|
|
@@ -1330,45 +1406,47 @@ ImageCarouselComponent.decorators = [
|
|
|
1330
1406
|
{ type: Component, args: [{
|
|
1331
1407
|
selector: 'app-image-carousel',
|
|
1332
1408
|
template: `
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1409
|
+
<div id="product_page_carousel">
|
|
1410
|
+
<div id="product_page_carousel_items">
|
|
1411
|
+
<co-loader [isShown]="true" *ngIf="showLoader"></co-loader>
|
|
1412
|
+
<div #carousel class="inner-carousel">
|
|
1413
|
+
<!-- This has been taken out of the for loop to prevent flashing images when updating. -->
|
|
1414
|
+
<div *ngIf="imageViewModels[0]" class="carousel-item" [id]="'slide-0'" [class.active]="isCurrentIndex(0)" (click)="handleShowImage(imageViewModels[0])">
|
|
1415
|
+
<img [src]="imageViewModels[0].source">
|
|
1416
|
+
</div>
|
|
1417
|
+
<div *ngFor="let imageViewModel of imageViewModels.slice(1); let index = index" class="carousel-item"
|
|
1418
|
+
[id]="'slide-' + (index + 1)" [class.active]="isCurrentIndex((index + 1))" (click)="handleShowImage(imageViewModel)">
|
|
1419
|
+
<img [src]="imageViewModel.source">
|
|
1420
|
+
</div>
|
|
1421
|
+
<div class="carousel-scroller-layer" *ngIf="imageViewModels && imageViewModels.length > 1">
|
|
1422
|
+
<div class="carousel-item-scroller prev" (click)="gotoPrevSlide()" *ngIf="currentIndex > 0"></div>
|
|
1423
|
+
<div class="carousel-item-scroller next" (click)="gotoNextSlide()" *ngIf="currentIndex < images.length - 1"></div>
|
|
1424
|
+
</div>
|
|
1425
|
+
</div>
|
|
1426
|
+
<!--
|
|
1427
|
+
<co-icon class="selector-type-icon refresh-button" [iconData]="iconCache.getIcon(icons.Refresh)" (click)="onForceRenderImage()" [class.loading]="showLoader" *ngIf="showRefresh"></co-icon>
|
|
1428
|
+
-->
|
|
1347
1429
|
</div>
|
|
1348
|
-
</div>
|
|
1349
|
-
<!--
|
|
1350
|
-
<co-icon class="selector-type-icon refresh-button" [iconData]="iconCache.getIcon(icons.Refresh)" (click)="onForceRenderImage()" [class.loading]="showLoader" *ngIf="showRefresh"></co-icon>
|
|
1351
|
-
-->
|
|
1352
|
-
</div>
|
|
1353
1430
|
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1431
|
+
<div id="product_page_carousel_thumbs">
|
|
1432
|
+
<co-scroll-container class="scroll-container" *ngIf="imageViewModels && imageViewModels.length > 1">
|
|
1433
|
+
<div *ngFor="let imageViewModel of imageViewModels; let index = index" class="carousel-thumb"
|
|
1434
|
+
[class.active]="index === currentIndex">
|
|
1435
|
+
<img [src]="imageViewModel.source" (click)="handleThumbClick(index)"/>
|
|
1436
|
+
</div>
|
|
1437
|
+
</co-scroll-container>
|
|
1358
1438
|
</div>
|
|
1359
|
-
</co-scroll-container>
|
|
1360
1439
|
</div>
|
|
1361
|
-
</div>
|
|
1362
1440
|
`,
|
|
1363
|
-
|
|
1441
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1442
|
+
styles: [":host{max-height:540px;height:100%;position:relative}:host:not(.resizing) .inner-carousel{scroll-behavior:smooth;-webkit-overflow-scrolling:touch;scroll-snap-type:x mandatory}#product_page_carousel{position:relative}#product_page_carousel .refresh-button{position:absolute;bottom:10px;right:10px;background:#fff}#product_page_carousel .refresh-button.loading{animation:spin 1s linear infinite}#product_page_carousel .refresh-button:hover{box-shadow:none;background:#74B77F;transition:all .2s ease-in-out}#product_page_carousel .refresh-button:hover ::ng-deep svg path{fill:#fff!important}#product_page_carousel #product_page_carousel_items{position:relative;margin-bottom:10px}#product_page_carousel #product_page_carousel_items ::ng-deep co-loader{position:absolute}#product_page_carousel .inner-carousel{display:flex;flex-direction:row;align-items:center;overflow:hidden;max-height:500px;border:1px solid #efefef}#product_page_carousel .carousel-item{max-height:500px;width:100%;display:flex;cursor:zoom-in;flex-shrink:0;flex-grow:0}#product_page_carousel .carousel-item img{width:100%;height:auto;-o-object-fit:contain;object-fit:contain}#product_page_carousel .carousel-scroller-layer{height:100%;width:100%;position:absolute;pointer-events:none;top:0;left:0}#product_page_carousel #product_page_carousel_thumbs{display:flex;justify-content:flex-start;height:80px;margin-left:auto;margin-right:auto}#product_page_carousel #product_page_carousel_thumbs ::ng-deep co-scroll-container{padding:0 22px}#product_page_carousel #product_page_carousel_thumbs ::ng-deep co-scroll-container .content-wrapper{padding:0}#product_page_carousel #product_page_carousel_thumbs .carousel-thumb{opacity:1;cursor:pointer;transition:all .2s ease;padding:4px;border:1px solid #f6f5f4}#product_page_carousel #product_page_carousel_thumbs .carousel-thumb.active,#product_page_carousel #product_page_carousel_thumbs .carousel-thumb:hover{border-color:#22313c}#product_page_carousel #product_page_carousel_thumbs .carousel-thumb:not(:last-child){margin-right:10px}#product_page_carousel #product_page_carousel_thumbs .carousel-thumb img{height:68px}@media screen and (max-width: 650px){#product_page_carousel_thumbs{height:57px!important}#product_page_carousel_thumbs .carousel-thumb img{height:50px!important}}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}\n"]
|
|
1364
1443
|
},] }
|
|
1365
1444
|
];
|
|
1366
1445
|
ImageCarouselComponent.ctorParameters = () => [
|
|
1367
1446
|
{ type: ProductConnectorService },
|
|
1368
1447
|
{ type: ProductEventService },
|
|
1369
1448
|
{ type: ChangeDetectorRef },
|
|
1370
|
-
{ type: DomSanitizer }
|
|
1371
|
-
{ type: IconCacheService }
|
|
1449
|
+
{ type: DomSanitizer }
|
|
1372
1450
|
];
|
|
1373
1451
|
ImageCarouselComponent.propDecorators = {
|
|
1374
1452
|
carousel: [{ type: ViewChild, args: ['carousel', { read: ElementRef },] }],
|
|
@@ -1626,6 +1704,7 @@ class ProductAddtocartComponent {
|
|
|
1626
1704
|
this.createFrozenArticle = true;
|
|
1627
1705
|
this.configurable = false;
|
|
1628
1706
|
this.configuring = false;
|
|
1707
|
+
this.showAddToCart = false;
|
|
1629
1708
|
this.isReturn = false;
|
|
1630
1709
|
this.fullscreen = false;
|
|
1631
1710
|
this.startConfiguration = new EventEmitter();
|
|
@@ -1715,18 +1794,20 @@ ProductAddtocartComponent.decorators = [
|
|
|
1715
1794
|
<co-number-picker *ngIf="!configurable && !configuring" class="quantity-select" [(model)]="quantity" [min]="1" horizontal></co-number-picker>
|
|
1716
1795
|
</ng-container>
|
|
1717
1796
|
|
|
1718
|
-
<div class="button-wrapper">
|
|
1719
|
-
<co-button class="configure-button"
|
|
1797
|
+
<div class="button-wrapper" *ngIf="configurable">
|
|
1798
|
+
<co-button class="configure-button"
|
|
1720
1799
|
[iconData]="iconCache.getIcon(icon.MagicWand)"
|
|
1721
1800
|
[label]="'CONFIGURE' | localize"
|
|
1722
1801
|
(onClick)="startConfiguration.emit()"
|
|
1723
1802
|
></co-button>
|
|
1724
|
-
|
|
1803
|
+
</div>
|
|
1804
|
+
<div class="button-wrapper" *ngIf="showAddToCart && !configurable">
|
|
1805
|
+
<co-button #addtocartbutton class="cart-button"
|
|
1725
1806
|
[iconData]="iconCache.getIcon(icon.AddToCartDrop)"
|
|
1726
1807
|
[label]="'SHOPPING_CART_IN' | localize"
|
|
1727
1808
|
(onClick)="handleAddToCartClick(quantity)"
|
|
1728
1809
|
></co-button>
|
|
1729
|
-
<co-button class="cart-button quote" *ngIf="
|
|
1810
|
+
<co-button class="cart-button quote" *ngIf="showQuoteButton"
|
|
1730
1811
|
[iconData]="iconCache.getIcon(icon.Quote)"
|
|
1731
1812
|
[label]="'QUOTATION' | localize"
|
|
1732
1813
|
(onClick)="handleAddToQuoteClick(quantity)"
|
|
@@ -1750,6 +1831,7 @@ ProductAddtocartComponent.propDecorators = {
|
|
|
1750
1831
|
createFrozenArticle: [{ type: Input }],
|
|
1751
1832
|
configurable: [{ type: Input }],
|
|
1752
1833
|
configuring: [{ type: Input }],
|
|
1834
|
+
showAddToCart: [{ type: Input }],
|
|
1753
1835
|
isReturn: [{ type: Input }],
|
|
1754
1836
|
fullscreen: [{ type: HostBinding, args: ['class.full-screen',] }, { type: Input }],
|
|
1755
1837
|
quantity: [{ type: Input }],
|