@colijnit/product 257.1.3 → 257.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.
@@ -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';
@@ -17,6 +17,7 @@ import * as i1 from '@angular/common/http';
17
17
  import { HttpClient } from '@angular/common/http';
18
18
  import { StringUtils } from '@colijnit/ioneconnector/build/utils/string-utils';
19
19
  import { CommonModule, isPlatformBrowser } from '@angular/common';
20
+ import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
20
21
  import { trigger, state, style, transition, animate } from '@angular/animations';
21
22
  import * as i1$1 from '@angular/platform-browser';
22
23
  import { DomSanitizer } from '@angular/platform-browser';
@@ -30,8 +31,8 @@ class Version {
30
31
  constructor() {
31
32
  this.name = "@colijnit/product";
32
33
  this.description = "Product detail page project for iOne";
33
- this.symVer = "257.1.3";
34
- this.publishDate = "04/02/2025, 08:44:04";
34
+ this.symVer = "257.1.5";
35
+ this.publishDate = "15-3-2025 11:59:15";
35
36
  }
36
37
  }
37
38
 
@@ -117,6 +118,7 @@ class ProductEventService {
117
118
  this.onRenderImageReceived = new Subject();
118
119
  this.onDraftRenderImageReceived = new Subject();
119
120
  this.onArticleInfoReceived = new Subject();
121
+ this.onAnswersAvailable = new Subject();
120
122
  this.onUpdateProductInfoTab = new Subject();
121
123
  this.errorMessage = new Subject();
122
124
  }
@@ -307,6 +309,7 @@ class Dictionary {
307
309
  "ADDITIONAL_DATA": "Additional information",
308
310
  "ALTERNATIVE_PRODUCTS": "Alternative products",
309
311
  "ARTICLE_NUMBER": "Productnumber",
312
+ "AS_CONFIGURED": "As configured",
310
313
  "CATEGORY": "Category",
311
314
  "CATEGORY_TYPE": "Category type",
312
315
  "CONFIGURE": "Configure",
@@ -338,6 +341,7 @@ class Dictionary {
338
341
  "ADDITIONAL_DATA": "Extra informatie",
339
342
  "ALTERNATIVE_PRODUCTS": "Alternatieve producten",
340
343
  "ARTICLE_NUMBER": "Artikel nummer",
344
+ "AS_CONFIGURED": "Zoals samengesteld",
341
345
  "CATEGORY": "Categorie",
342
346
  "CATEGORY_TYPE": "Categorie type",
343
347
  "CONFIGURE": "Configureren",
@@ -665,18 +669,6 @@ ProductConnectorService.ctorParameters = () => [
665
669
 
666
670
  class IoneProductComponent {
667
671
  constructor(_dictionary, _jsonUtils, _ione, _changeDetector, _appEventService, _settingsService) {
668
- // this.sku = 'CF-HILL';
669
- // this.sku = 'CF-ALMADA';
670
- // this.sku = 'CF-39904ANT';
671
- // this.sku = 'CF-22346001';
672
- // this.sku = '104';
673
- // this.sku = '1000561986';
674
- // this.sku = '1000567768';
675
- // this.sku = '1000234793';
676
- // this.sku = '1066';
677
- // this.sku = '104';
678
- // this.sku = "70000107";
679
- // this.sku = "grover";
680
672
  this._dictionary = _dictionary;
681
673
  this._jsonUtils = _jsonUtils;
682
674
  this._ione = _ione;
@@ -692,14 +684,28 @@ class IoneProductComponent {
692
684
  this.onSelectionsReceived = new EventEmitter();
693
685
  this.onAddToQuote = new EventEmitter();
694
686
  this.openStockEvent = new EventEmitter();
687
+ this.onAnswersAvailable = new EventEmitter();
695
688
  this.settingsLoaded = false;
696
689
  this.showHD = false;
697
690
  this._subs = [];
691
+ // this.sku = 'CF-HILL';
692
+ // this.sku = 'CF-ALMADA';
693
+ // this.sku = 'CF-39904ANT';
694
+ // this.sku = 'CF-22346001';
695
+ // this.sku = '104';
696
+ // this.sku = '1000561986';
697
+ // this.sku = '1000567768';
698
+ // this.sku = '1000234793';
699
+ // this.sku = '1066';
700
+ // this.sku = '104';
701
+ // this.sku = "70000107";
702
+ // this.sku = "grover";
703
+ this.sku = "1292";
698
704
  this._subs.push(
699
705
  // this._dictionary.dictionaryLoaded.subscribe(d => this.upAndLoaded = true),
700
706
  this._appEventService.onAddToCart.subscribe((data) => {
701
707
  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 => {
708
+ }), 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
709
  this.settingsLoaded = loaded;
704
710
  }));
705
711
  }
@@ -733,6 +739,9 @@ class IoneProductComponent {
733
739
  _handleAnswerInfoReceived(info) {
734
740
  this.onArticleInfoReceived.next(info);
735
741
  }
742
+ _handleAnswersAvailable(answers) {
743
+ this.onAnswersAvailable.next(answers);
744
+ }
736
745
  _handleAddToCart(data) {
737
746
  return __awaiter(this, void 0, void 0, function* () {
738
747
  this.onAddToCart.emit(data);
@@ -746,14 +755,14 @@ IoneProductComponent.decorators = [
746
755
  { type: Component, args: [{
747
756
  selector: 'app-ione-product',
748
757
  template: `
749
- <app-product-page *ngIf="settingsLoaded"
758
+ <app-product-page *ngIf="settingsLoaded"
750
759
  [createFrozenArticle]="handleAddArticleInternally"
751
760
  [isReturn]="isReturn"
752
761
  (openStockEvent)="openStock()"
753
762
  [sku]="sku"
754
763
  [showRelatedProductsPopup]="showRelatedProductsPopup"
755
764
  ></app-product-page>
756
- <!-- <co-button [label]="'click'" (click)="showHD = !showHD"></co-button>
765
+ <!-- <co-button [label]="'click'" (click)="showHD = !showHD"></co-button>
757
766
  <co-product-hd [sku]="'657946ca-e1e1-41fd-7ae0-08dbf7df0cef'" *ngIf="showHD"></co-product-hd>-->
758
767
  `,
759
768
  encapsulation: ViewEncapsulation.Emulated,
@@ -781,7 +790,8 @@ IoneProductComponent.propDecorators = {
781
790
  onArticleReceived: [{ type: Output }],
782
791
  onSelectionsReceived: [{ type: Output }],
783
792
  onAddToQuote: [{ type: Output }],
784
- openStockEvent: [{ type: Output }]
793
+ openStockEvent: [{ type: Output }],
794
+ onAnswersAvailable: [{ type: Output }]
785
795
  };
786
796
 
787
797
  class StockAndDelivery {
@@ -895,6 +905,7 @@ class ProductPageComponent {
895
905
  this.show2D = true;
896
906
  this.show3D = false;
897
907
  this.configuring = false;
908
+ this.showAddToCart = false;
898
909
  this.fullscreenAnimationEnd = false;
899
910
  this.settingsLoaded = false;
900
911
  this._fullScreen = false;
@@ -905,6 +916,13 @@ class ProductPageComponent {
905
916
  }
906
917
  }), this.settingsService.settingsLoaded.subscribe(loaded => this._handleSettingsLoaded(loaded)), this._ione.controllerInitialized.subscribe((initialized) => {
907
918
  this.settingsLoaded = initialized;
919
+ }), this.appEventService.onAnswersAvailable.subscribe((answers) => {
920
+ if (answers && this.configurable) {
921
+ this.showAddToCart = false;
922
+ }
923
+ else {
924
+ this.showAddToCart = true;
925
+ }
908
926
  }));
909
927
  }
910
928
  set sku(value) {
@@ -1007,8 +1025,12 @@ class ProductPageComponent {
1007
1025
  if (this.article) {
1008
1026
  this.configurable = this.article.goodType === 'B';
1009
1027
  if (this.configurable) {
1028
+ this.showAddToCart = false;
1010
1029
  this.currentView = SelectorType.TwoD;
1011
1030
  }
1031
+ else {
1032
+ this.showAddToCart = true;
1033
+ }
1012
1034
  this.threeD = this.article.is3D;
1013
1035
  this.selectorType = this.article.selectorTypeCustomer;
1014
1036
  this._ione.getDeliveryPrognosis(this.article.goodId).then((stockInfo) => {
@@ -1034,7 +1056,7 @@ class ProductPageComponent {
1034
1056
  ProductPageComponent.decorators = [
1035
1057
  { type: Component, args: [{
1036
1058
  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",
1059
+ 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
1060
  animations: [
1039
1061
  trigger('toggleFullScreen', [
1040
1062
  state('fullscreen', style({ 'position': 'fixed', 'top': '0', 'left': '0', 'width': '100%', 'height': '100%' })),
@@ -1067,7 +1089,7 @@ ProductPageComponent.decorators = [
1067
1089
  transition('void => *', animate('200ms ease-in-out')),
1068
1090
  ])
1069
1091
  ],
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"]
1092
+ 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
1093
  },] }
1072
1094
  ];
1073
1095
  ProductPageComponent.ctorParameters = () => [
@@ -1204,39 +1226,53 @@ ProductSelectorTypeModule.decorators = [
1204
1226
  },] }
1205
1227
  ];
1206
1228
 
1229
+ class ImageViewModel {
1230
+ }
1207
1231
  class ImageCarouselComponent {
1208
- constructor(_ione, _appEventService, _changeDetector, _domSanitizer, iconCache) {
1232
+ constructor(_ione, _appEventService, _changeDetector, _domSanitizer) {
1209
1233
  this._ione = _ione;
1210
1234
  this._appEventService = _appEventService;
1211
1235
  this._changeDetector = _changeDetector;
1212
1236
  this._domSanitizer = _domSanitizer;
1213
- this.iconCache = iconCache;
1214
- this.icons = IconEnum;
1215
- this.showLoader = false;
1216
1237
  this.showRefresh = false;
1217
1238
  this.resizing = false;
1239
+ this.imageViewModels = [];
1240
+ this.showLoader = false;
1218
1241
  this._currentIndex = 0;
1219
1242
  this._images = [];
1220
1243
  this._subs = [];
1244
+ this._resizeCanvasHeight = 500;
1221
1245
  this._subs.push(this._appEventService.onRenderStarted.subscribe(() => {
1222
1246
  this.showLoader = true;
1223
- }), this._appEventService.onDraftRenderImageReceived.subscribe((url) => {
1224
- if (this._images[0] instanceof CoDocument) {
1225
- this._images.unshift(url);
1226
- }
1227
- else {
1228
- this._images[0] = url;
1247
+ this._changeDetector.detectChanges();
1248
+ setTimeout(() => {
1249
+ this.showLoader = false;
1250
+ this._changeDetector.detectChanges();
1251
+ }, 10000);
1252
+ }), this._appEventService.onDraftRenderImageReceived.subscribe((event) => {
1253
+ if (event && event.detail) {
1254
+ if (this._images[0] instanceof CoDocument) {
1255
+ this._images.unshift(event.detail);
1256
+ }
1257
+ else {
1258
+ this._images[0] = event.detail;
1259
+ }
1260
+ this._loadAndRescaleImages();
1229
1261
  }
1230
1262
  this.showLoader = false;
1263
+ this._changeDetector.detectChanges();
1231
1264
  }));
1232
1265
  }
1233
1266
  set images(value) {
1234
1267
  if (value && value.length > 0) {
1235
1268
  this._images = this._filterValidImages(value);
1236
- this._loadImages();
1269
+ this._loadAndRescaleImages();
1237
1270
  this._changeDetector.detectChanges();
1238
1271
  }
1239
1272
  }
1273
+ get images() {
1274
+ return this._images;
1275
+ }
1240
1276
  handleWindowResize() {
1241
1277
  this.resizing = true;
1242
1278
  this._scrollCarouselToIndex();
@@ -1261,11 +1297,6 @@ class ImageCarouselComponent {
1261
1297
  this._currentIndex = value;
1262
1298
  this._scrollCarouselToIndex();
1263
1299
  }
1264
- get images() {
1265
- return this._images;
1266
- }
1267
- ngOnInit() {
1268
- }
1269
1300
  ngOnDestroy() {
1270
1301
  this.carousel = undefined;
1271
1302
  this._subs.forEach(s => s.unsubscribe());
@@ -1276,43 +1307,90 @@ class ImageCarouselComponent {
1276
1307
  onForceRenderImage() {
1277
1308
  this._appEventService.onForceRenderImage.next();
1278
1309
  }
1279
- getImageSrc(image) {
1280
- let source = '';
1281
- if (image instanceof CoDocument) {
1282
- if (image.filePath) {
1283
- source = image.filePath;
1284
- }
1285
- else {
1286
- source = image.documentBodyAsDataUri;
1287
- }
1288
- }
1289
- else if (image.detail !== undefined) {
1290
- source = image.detail;
1310
+ handleShowImage(imageViewModel) {
1311
+ if (imageViewModel && imageViewModel.originalSource) {
1312
+ let popupWindow = window.open('', 'Image zoom', 'width=600,height=400');
1313
+ // Set the content of the popup window
1314
+ popupWindow.document.write('<html><head><title>Image zoom</title></head><body>');
1315
+ popupWindow.document.write(`<img src=${imageViewModel.originalSource} alt="Image" style="width:100%; height:auto;">`);
1316
+ popupWindow.document.write('</body></html>');
1317
+ // Close the document to render the popup window
1318
+ popupWindow.document.close();
1291
1319
  }
1292
- return this._domSanitizer.bypassSecurityTrustUrl(source);
1293
1320
  }
1294
1321
  _filterValidImages(value) {
1295
1322
  if (!value) {
1296
1323
  return [];
1297
1324
  }
1298
- return value.filter(doc => {
1325
+ return value.filter((doc) => {
1299
1326
  const pattern = /\.(jpg|jpeg|png|gif|bmp|tiff|webp)$/i;
1300
- return pattern.test(doc.fileName) || !!doc.filePath;
1327
+ return typeof doc === 'string' || (pattern.test(doc.fileName) || !!doc.filePath);
1301
1328
  });
1302
1329
  }
1303
- _loadImages() {
1330
+ _loadAndRescaleImages() {
1331
+ this.imageViewModels.length = 0;
1304
1332
  if (this._images) {
1305
1333
  this._images.forEach((i) => {
1306
- if (!i.documentBody && !i.filePath) {
1307
- this._ione.getDocumentContent(i.documentId, false).then((content) => {
1308
- if (content) {
1309
- i.documentBody = content.documentContent;
1310
- }
1311
- });
1334
+ let imageViewModel = new ImageViewModel();
1335
+ imageViewModel.image = i;
1336
+ if (typeof i === 'string') { // is a rendered image coming from configurator
1337
+ this._resizeAndSanitizeSource(i, imageViewModel);
1338
+ }
1339
+ else {
1340
+ if (i.filePath) {
1341
+ this._resizeAndSanitizeSource(i.filePath, imageViewModel);
1342
+ }
1343
+ else if (i.documentBody) {
1344
+ this._resizeAndSanitizeSource(i.documentBodyAsDataUri, imageViewModel);
1345
+ }
1346
+ else {
1347
+ this._ione.getDocumentContent(i.documentId, false).then((content) => {
1348
+ if (content) {
1349
+ i.documentBody = content.documentContent;
1350
+ this._resizeAndSanitizeSource(i.documentBodyAsDataUri, imageViewModel);
1351
+ this._changeDetector.detectChanges();
1352
+ }
1353
+ });
1354
+ }
1312
1355
  }
1356
+ this.imageViewModels.push(imageViewModel);
1357
+ this._changeDetector.detectChanges();
1313
1358
  });
1314
1359
  }
1315
1360
  }
1361
+ _resizeAndSanitizeSource(source, imageViewModel) {
1362
+ const resizeCanvas = document.createElement('canvas');
1363
+ const resizeCanvasContext = resizeCanvas.getContext('2d');
1364
+ const resizeImage = document.createElement('img');
1365
+ resizeImage.onload = () => __awaiter(this, void 0, void 0, function* () {
1366
+ resizeCanvasContext.imageSmoothingEnabled = true;
1367
+ resizeCanvasContext.imageSmoothingQuality = 'high';
1368
+ // Get the original image dimensions
1369
+ const originalWidth = resizeImage.width;
1370
+ const originalHeight = resizeImage.height;
1371
+ // Calculate the aspect ratio
1372
+ const aspectRatio = originalWidth / originalHeight;
1373
+ // Calculate the new width and height while maintaining the aspect ratio
1374
+ let newWidth = this._resizeCanvasHeight;
1375
+ let newHeight = this._resizeCanvasHeight;
1376
+ if (originalWidth > originalHeight) {
1377
+ newHeight = this._resizeCanvasHeight / aspectRatio;
1378
+ }
1379
+ else {
1380
+ newWidth = this._resizeCanvasHeight * aspectRatio;
1381
+ }
1382
+ // Set the canvas size to the new width and height
1383
+ resizeCanvas.width = newWidth;
1384
+ resizeCanvas.height = newHeight;
1385
+ const imageWidth = this._resizeCanvasHeight * (resizeImage.height / resizeImage.width);
1386
+ resizeCanvasContext.drawImage(resizeImage, 0, 0, newWidth, newHeight);
1387
+ const resizedSource = resizeCanvas.toDataURL('image/jpeg');
1388
+ imageViewModel.source = this._domSanitizer.bypassSecurityTrustUrl(resizedSource);
1389
+ imageViewModel.originalSource = source;
1390
+ });
1391
+ // @ts-ignore
1392
+ resizeImage.src = source;
1393
+ }
1316
1394
  _scrollCarouselToIndex() {
1317
1395
  if (this.currentIndex > -1 && this.currentIndex <= this.images.length) {
1318
1396
  const movePx = this.currentIndex * this.carousel.nativeElement.clientWidth;
@@ -1330,45 +1408,47 @@ ImageCarouselComponent.decorators = [
1330
1408
  { type: Component, args: [{
1331
1409
  selector: 'app-image-carousel',
1332
1410
  template: `
1333
- <div id="product_page_carousel">
1334
- <div id="product_page_carousel_items">
1335
- <co-loader [isShown]="showLoader"></co-loader>
1336
- <div #carousel class="inner-carousel">
1337
- <!-- This has been taken out of the for loop to prevent flashing images when updating. -->
1338
- <div *ngIf="images[0]" class="carousel-item" [id]="'slide-0'" [class.active]="isCurrentIndex(0)">
1339
- <img [src]="getImageSrc(images[0])">
1340
- </div>
1341
- <div *ngFor="let image of images.slice(1); let index = index" class="carousel-item" [id]="'slide-' + (index + 1)" [class.active]="isCurrentIndex((index + 1))">
1342
- <img [src]="getImageSrc(image)">
1411
+ <div id="product_page_carousel">
1412
+ <div id="product_page_carousel_items">
1413
+ <co-loader [isShown]="true" *ngIf="showLoader"></co-loader>
1414
+ <div #carousel class="inner-carousel">
1415
+ <!-- This has been taken out of the for loop to prevent flashing images when updating. -->
1416
+ <div *ngIf="imageViewModels[0]" class="carousel-item" [id]="'slide-0'" [class.active]="isCurrentIndex(0)" (click)="handleShowImage(imageViewModels[0])">
1417
+ <img [src]="imageViewModels[0].source">
1418
+ </div>
1419
+ <div *ngFor="let imageViewModel of imageViewModels.slice(1); let index = index" class="carousel-item"
1420
+ [id]="'slide-' + (index + 1)" [class.active]="isCurrentIndex((index + 1))" (click)="handleShowImage(imageViewModel)">
1421
+ <img [src]="imageViewModel.source">
1422
+ </div>
1423
+ <div class="carousel-scroller-layer" *ngIf="imageViewModels && imageViewModels.length > 1">
1424
+ <div class="carousel-item-scroller prev" (click)="gotoPrevSlide()" *ngIf="currentIndex > 0"></div>
1425
+ <div class="carousel-item-scroller next" (click)="gotoNextSlide()" *ngIf="currentIndex < images.length - 1"></div>
1426
+ </div>
1427
+ </div>
1428
+ <!--
1429
+ <co-icon class="selector-type-icon refresh-button" [iconData]="iconCache.getIcon(icons.Refresh)" (click)="onForceRenderImage()" [class.loading]="showLoader" *ngIf="showRefresh"></co-icon>
1430
+ -->
1343
1431
  </div>
1344
- <div class="carousel-scroller-layer" *ngIf="images && images.length > 1">
1345
- <div class="carousel-item-scroller prev" (click)="gotoPrevSlide()" *ngIf="currentIndex > 0"></div>
1346
- <div class="carousel-item-scroller next" (click)="gotoNextSlide()" *ngIf="currentIndex < images.length - 1"></div>
1347
- </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
1432
 
1354
- <div id="product_page_carousel_thumbs">
1355
- <co-scroll-container class="scroll-container" *ngIf="images && images.length > 1">
1356
- <div *ngFor="let image of images; let index = index" class="carousel-thumb" [class.active]="index === currentIndex">
1357
- <img [src]="getImageSrc(image)" (click)="handleThumbClick(index)"/>
1433
+ <div id="product_page_carousel_thumbs">
1434
+ <co-scroll-container class="scroll-container" *ngIf="imageViewModels && imageViewModels.length > 1">
1435
+ <div *ngFor="let imageViewModel of imageViewModels; let index = index" class="carousel-thumb"
1436
+ [class.active]="index === currentIndex">
1437
+ <img [src]="imageViewModel.source" (click)="handleThumbClick(index)"/>
1438
+ </div>
1439
+ </co-scroll-container>
1358
1440
  </div>
1359
- </co-scroll-container>
1360
1441
  </div>
1361
- </div>
1362
1442
  `,
1363
- 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;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"]
1443
+ changeDetection: ChangeDetectionStrategy.OnPush,
1444
+ 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
1445
  },] }
1365
1446
  ];
1366
1447
  ImageCarouselComponent.ctorParameters = () => [
1367
1448
  { type: ProductConnectorService },
1368
1449
  { type: ProductEventService },
1369
1450
  { type: ChangeDetectorRef },
1370
- { type: DomSanitizer },
1371
- { type: IconCacheService }
1451
+ { type: DomSanitizer }
1372
1452
  ];
1373
1453
  ImageCarouselComponent.propDecorators = {
1374
1454
  carousel: [{ type: ViewChild, args: ['carousel', { read: ElementRef },] }],
@@ -1626,6 +1706,7 @@ class ProductAddtocartComponent {
1626
1706
  this.createFrozenArticle = true;
1627
1707
  this.configurable = false;
1628
1708
  this.configuring = false;
1709
+ this.showAddToCart = false;
1629
1710
  this.isReturn = false;
1630
1711
  this.fullscreen = false;
1631
1712
  this.startConfiguration = new EventEmitter();
@@ -1715,18 +1796,20 @@ ProductAddtocartComponent.decorators = [
1715
1796
  <co-number-picker *ngIf="!configurable && !configuring" class="quantity-select" [(model)]="quantity" [min]="1" horizontal></co-number-picker>
1716
1797
  </ng-container>
1717
1798
 
1718
- <div class="button-wrapper">
1719
- <co-button class="configure-button" *ngIf="configurable"
1799
+ <div class="button-wrapper" *ngIf="configurable">
1800
+ <co-button class="configure-button"
1720
1801
  [iconData]="iconCache.getIcon(icon.MagicWand)"
1721
1802
  [label]="'CONFIGURE' | localize"
1722
1803
  (onClick)="startConfiguration.emit()"
1723
1804
  ></co-button>
1724
- <co-button #addtocartbutton class="cart-button" *ngIf="!configurable"
1805
+ </div>
1806
+ <div class="button-wrapper" *ngIf="showAddToCart && !configurable">
1807
+ <co-button #addtocartbutton class="cart-button"
1725
1808
  [iconData]="iconCache.getIcon(icon.AddToCartDrop)"
1726
1809
  [label]="'SHOPPING_CART_IN' | localize"
1727
1810
  (onClick)="handleAddToCartClick(quantity)"
1728
1811
  ></co-button>
1729
- <co-button class="cart-button quote" *ngIf="!configurable && showQuoteButton"
1812
+ <co-button class="cart-button quote" *ngIf="showQuoteButton"
1730
1813
  [iconData]="iconCache.getIcon(icon.Quote)"
1731
1814
  [label]="'QUOTATION' | localize"
1732
1815
  (onClick)="handleAddToQuoteClick(quantity)"
@@ -1750,6 +1833,7 @@ ProductAddtocartComponent.propDecorators = {
1750
1833
  createFrozenArticle: [{ type: Input }],
1751
1834
  configurable: [{ type: Input }],
1752
1835
  configuring: [{ type: Input }],
1836
+ showAddToCart: [{ type: Input }],
1753
1837
  isReturn: [{ type: Input }],
1754
1838
  fullscreen: [{ type: HostBinding, args: ['class.full-screen',] }, { type: Input }],
1755
1839
  quantity: [{ type: Input }],
@@ -2716,6 +2800,7 @@ class ProductHdComponent {
2716
2800
  this._scriptLoader = _scriptLoader;
2717
2801
  this._renderer = _renderer;
2718
2802
  this.variant = '';
2803
+ this.urlParams = [];
2719
2804
  this.configuratorFinished = new EventEmitter();
2720
2805
  this.configurationError = new EventEmitter();
2721
2806
  this.showClass = true;
@@ -2746,7 +2831,10 @@ class ProductHdComponent {
2746
2831
  this.configurationError.emit(event.detail.status);
2747
2832
  }
2748
2833
  _prepareAttributes() {
2749
- if (this.hdeConfigurator && this.hdeConfigurator.nativeElement && this.token && (this.sku || this.variant)) {
2834
+ if (this.hdeConfigurator && this.hdeConfigurator.nativeElement && this.urlParams && this.token && (this.sku || this.variant)) {
2835
+ //for local testing please turn off for packing and publishing!
2836
+ //this.prepareTestingUrlparams();
2837
+ this._prepareConfiguratorUrls();
2750
2838
  this.hdeConfigurator.nativeElement.setAttribute('bearerToken', this.token);
2751
2839
  if (this._sku) {
2752
2840
  this.hdeConfigurator.nativeElement.setAttribute('data-productId', this._sku);
@@ -2757,19 +2845,43 @@ class ProductHdComponent {
2757
2845
  this._loadTheScripts();
2758
2846
  }
2759
2847
  }
2760
- // load external scripts
2848
+ //set necessary references to configurator.
2849
+ _prepareConfiguratorUrls() {
2850
+ //fetch the setting from the external source
2851
+ let apiurl = this.urlParams.find((item) => item.key === 'apiurl').value;
2852
+ let productVariantCommandApiUrl = this.urlParams.find((item) => item.key === 'productVariantCommandApiUrl').value;
2853
+ let productVariantQueryApiUrl = this.urlParams.find((item) => item.key === 'productVariantQueryApiUrl').value;
2854
+ let localizationApiUrl = this.urlParams.find((item) => item.key === 'localizationApiUrl').value;
2855
+ //apply to configurator
2856
+ this.hdeConfigurator.nativeElement.setAttribute('apiurl', apiurl);
2857
+ this.hdeConfigurator.nativeElement.setAttribute('productVariantCommandApiUrl', productVariantCommandApiUrl);
2858
+ this.hdeConfigurator.nativeElement.setAttribute('productVariantQueryApiUrl', productVariantQueryApiUrl);
2859
+ this.hdeConfigurator.nativeElement.setAttribute('localizationApiUrl', localizationApiUrl);
2860
+ }
2861
+ // load external scripts into client
2761
2862
  _loadTheScripts() {
2762
2863
  return __awaiter(this, void 0, void 0, function* () {
2763
- const scripts = [
2764
- // hard-coded for now, should come from the external source
2765
- 'https://hde-cdn.azureedge.net/libs/components/Configurator/1.0.33/polyfills.js',
2766
- 'https://hde-cdn.azureedge.net/libs/components/Configurator/1.0.33/runtime.js',
2767
- 'https://hde-cdn.azureedge.net/libs/components/Configurator/1.0.33/main.js'
2768
- ];
2864
+ let headerUrls = this.urlParams.find((item) => item.key === 'header').value;
2865
+ let headerArray = headerUrls.replace(/\s+/g, '').split(',');
2866
+ for (let i = 0; i < headerArray.length; i++) {
2867
+ yield this._scriptLoader.loadScript(headerArray[i], this._renderer).catch((error) => console.error(error));
2868
+ }
2869
+ let styles = this.urlParams.find((item) => item.key === 'stylesheet').value;
2870
+ let stylesArray = styles.replace(/\s+/g, '').split(',');
2871
+ for (let j = 0; j < stylesArray.length; j++) {
2872
+ yield this._scriptLoader.addStyleSheet(stylesArray[j], this._renderer);
2873
+ }
2874
+ //for local testing please turn off for packing and publishing!
2875
+ /*const scripts: string[] = [
2876
+ // hard-coded for now, should come from the external source
2877
+ 'https://hde-cdn.azureedge.net/libs/components/Configurator/1.0.33/polyfills.js',
2878
+ 'https://hde-cdn.azureedge.net/libs/components/Configurator/1.0.33/runtime.js',
2879
+ 'https://hde-cdn.azureedge.net/libs/components/Configurator/1.0.33/main.js'
2880
+ ]
2769
2881
  for (let i = 0; i < scripts.length; i++) {
2770
- yield this._scriptLoader.loadScript(scripts[i], this._renderer).catch((error) => console.error(error));
2882
+ await this._scriptLoader.loadScript(scripts[i], this._renderer).catch((error) => console.error(error));
2771
2883
  }
2772
- yield this._scriptLoader.addStyleSheet('https://hde-cdn.azureedge.net/libs/components/Configurator/1.0.33/styles.css', this._renderer);
2884
+ await this._scriptLoader.addStyleSheet('https://hde-cdn.azureedge.net/libs/components/Configurator/1.0.33/styles.css', this._renderer);*/
2773
2885
  });
2774
2886
  }
2775
2887
  }
@@ -2778,11 +2890,7 @@ ProductHdComponent.decorators = [
2778
2890
  selector: 'co-product-hd',
2779
2891
  template: `
2780
2892
  <hde-configurator #hdeConfigurator
2781
- apiurl="https://bmsproductconfigurator-acceptance.azurewebsites.net/api/configurator/"
2782
- productVariantCommandApiUrl="https://bmsproductvariantcommand-acceptance.azurewebsites.net/"
2783
- productVariantQueryApiUrl="https://bmsproductvariantquery-acceptance.azurewebsites.net/"
2784
2893
  language="nl"
2785
- localizationApiUrl="https://hde-cdn.azureedge.net/libs/BMS.DST.Localization/"
2786
2894
  localizationFileExtension=".json"
2787
2895
  (configurationFinished)="handleConfigurationFinished($event)"
2788
2896
  (configurationFailed)="handleError($event)"
@@ -2802,6 +2910,7 @@ ProductHdComponent.propDecorators = {
2802
2910
  sku: [{ type: Input }],
2803
2911
  token: [{ type: Input }],
2804
2912
  variant: [{ type: Input }],
2913
+ urlParams: [{ type: Input }],
2805
2914
  configuratorFinished: [{ type: Output }],
2806
2915
  configurationError: [{ type: Output }],
2807
2916
  showClass: [{ type: HostBinding, args: ['class.co-product-hd',] }]
@@ -2843,6 +2952,7 @@ class ProductExternalSourceComponent {
2843
2952
  this.externalSettings = {};
2844
2953
  this.token = ""; //= "eyJhbGciOiJSUzI1NiIsImtpZCI6IkYxOThERkVEOEUwQTQ1MzY3M0M1MUE2Rjk1QUVDQzU3RTM0NjM4RkRSUzI1NiIsInR5cCI6ImF0K2p3dCIsIng1dCI6IjhaamY3WTRLUlRaenhScHZsYTdNVi1OR09QMCJ9.eyJuYmYiOjE3MzIxOTkyOTUsImV4cCI6MTczMjIwMjg5NSwiaXNzIjoiaHR0cHM6Ly9ibXNpZGVudGl0eS1hY2NlcHRhbmNlLmF6dXJld2Vic2l0ZXMubmV0IiwiYXVkIjpbImNhdGFsb2dxdWVyeWFwaSIsImNvbmZpZ3VyYXRvcmFwaSIsInByb2R1Y3R2YXJpYW50Y29tbWFuZGFwaSIsInByb2R1Y3R2YXJpYW50cXVlcnlhcGkiXSwiY2xpZW50X2lkIjoiaW1wZXJzb25hdGlvbi5jbGllbnQiLCJzdWIiOiIwOTMwZDI4Mi05NGU4LTQ5MGEtOGI2NC1mYTk1YmIyYzE1ODIiLCJhdXRoX3RpbWUiOjE3MzIxOTkyOTUsImlkcCI6ImxvY2FsIiwiZW52aXJvbm1lbnQiOiJNU0wiLCJzZWxsZXIiOiJTRTAwMDA5NiIsInNlbGxlcmd1aWQiOiIxMDk1MWJjNS1hZmMzLTQ1MGEtNmVkMS0wOGQ4NDNlNmE5OTQiLCJwZXJtaXNzaW9uIjpbInNhbGVzLmV4cG9ydHRlbXBsYXRlcy5yZWFkIiwiZG9jdW1lbnRsaWJyYXJ5LnRhZy5yZWFkIiwiZG9jdW1lbnRsaWJyYXJ5LmRvY3VtZW50LnJlYWQiLCJkb2N1bWVudGxpYnJhcnkudGFnZ3JvdXAucmVhZCIsInNhbGVzLm9yZGVyLndyaXRlIiwic2FsZXMuY3VzdG9tZXIucmVhZCIsInNhbGVzLm9yZGVyLmRlbGl2ZXJ5YWRkcmVzcy53cml0ZSIsInNlcnZpY2UucmVxdWVzdC5yZWFkIiwiY2F0YWxvZy50YWcucmVhZCIsInNhbGVzLm9yZGVyLnJlYWQiLCJzYWxlcy5jdXN0b21lci53cml0ZSIsInJlcXVlc3Rmb3JxdW90ZS53cml0ZSIsInNhbGVzLm9yZGVyLmJvb2siLCJyZXF1ZXN0Zm9ycXVvdGUucmVhZCIsInNhbGVzLmxlYWQucmVhZCIsInB1cmNoYXNlLm9yZGVyLnJlYWQiLCJzYWxlcy5xdW90ZS5yZWFkIiwic2FsZXMucXVvdGUud3JpdGUiLCJjYXRhbG9nLml0ZW0ucmVhZCIsInNhbGVzLmxlYWQud3JpdGUiLCJzZXJ2aWNlLnJlcXVlc3Quc3VibWl0Iiwic2FsZXMub3JkZXIuZGVsaXZlcnlhZGRyZXNzLnJlYWQiLCJwdXJjaGFzZS5vcmRlci53cml0ZSIsInB1cmNoYXNlLm9yZGVyLnByaWNlcy53cml0ZSIsInB1cmNoYXNlLm9yZGVyLnByaWNlcy5yZWFkIiwic2VydmljZS5yZXF1ZXN0LndyaXRlIiwiY2F0YWxvZy5jYXRhbG9nLnJlYWQiLCJjYXRhbG9nLmNhdGFsb2cud3JpdGUiLCJjYXRhbG9nLmN1cnJlbmN5LnJlYWQiLCJjYXRhbG9nLmN1cnJlbmN5LndyaXRlIiwiY2F0YWxvZy5pdGVtLndyaXRlIiwiY2F0YWxvZy5sb2NhbGl6YXRpb24ucmVhZCIsImNhdGFsb2cubG9jYWxpemF0aW9uLndyaXRlIiwiY2F0YWxvZy5wcm9kdWN0LnJlYWQiLCJjYXRhbG9nLnByb2R1Y3Qud3JpdGUiLCJjYXRhbG9nLnByb2R1Y3RzZXR0aW5nLnJlYWQiLCJjYXRhbG9nLnByb2R1Y3RzZXR0aW5nLndyaXRlIiwiY2F0YWxvZy5zZWxsZXIucmVhZCIsImNhdGFsb2cuc2VsbGVyLndyaXRlIiwiY2F0YWxvZy50YWcud3JpdGUiLCJjYXRhbG9nLnVvbS5yZWFkIiwiY2F0YWxvZy51b20ud3JpdGUiLCJjYXRhbG9nLnZhdGNhdGVnb3J5LnJlYWQiLCJjYXRhbG9nLnZhdGNhdGVnb3J5LndyaXRlIiwiY2F0YWxvZy52ZW5kb3IucmVhZCIsImNhdGFsb2cudmVuZG9yLndyaXRlIiwicHVyY2hhc2Uuc2VsbGVyLnJlYWQiLCJwdXJjaGFzZS5zZWxsZXIud3JpdGUiLCJjYXRhbG9nLmFydGljbGUucmVhZCIsImNhdGFsb2cuYXJ0aWNsZS53cml0ZSIsInNhbGVzLnF1b3RlLmxpbmVzLnJlYWQiLCJzYWxlcy5xdW90ZS5saW5lcy53cml0ZSIsInNhbGVzLnNlbGxlci5yZWFkIiwic2FsZXMuc2VsbGVyLndyaXRlIiwiYWNjb3VudGluZy52ZW5kb3JpbnZvaWNlLnJlYWQiLCJpZGVudGl0eS51c2VyLnJlYWQiLCJpZGVudGl0eS51c2VyLndyaXRlIiwiaWRlbnRpdHkucm9sZS5yZWFkIiwic2VsbGVyLnByb2R1Y3RwcmljZS5zZXR0aW5ncy5yZWFkIiwic2VsbGVyLnByb2R1Y3RwcmljZS5zZXR0aW5ncy53cml0ZSIsImNvbmZpZ3VyYXRvci5wdXJjaGFzZXByaWNlLnJlYWQiLCJzdG9jay5mYWJyaWMucmVhZCJdLCJuYW1lIjoiUm9iaW4iLCJmYW1pbHlfbmFtZSI6ImRlIFdpbnRlciAoQ29saWpuLUlUKSIsInJvbGUiOlsic2VsbGVyIiwiZGVhbGVyX21hbmFnZXIiXSwiaWF0IjoxNzMyMTk5Mjk1LCJzY29wZSI6WyJjYXRhbG9ncXVlcnlhcGkiLCJjb25maWd1cmF0b3JhcGkiLCJwcm9kdWN0dmFyaWFudGNvbW1hbmRhcGkiLCJwcm9kdWN0dmFyaWFudHF1ZXJ5YXBpIl0sImFtciI6WyJpbXBlcnNvbmF0aW9uIl19.rbguVPnkXXDzsM6QKgXulhrF41jIjCuGDV13ig1GC8MewLCJ7wA038OSwT26sx2mCexjvuGYt45YScfPwfTkDy3ErPmHRods64X1dJWZnf-23NTP2iI32K_1vMZH5GOGbMzuFtbKAFQv4hgFAxoyWqFVWyJvuOtQcWyZStROyPHwjAnpnj-x1cVQpOhbO-kQUFvy_VUrPpF3aYVCcO2cFirQTXR6kxSGcYGGcsPY-_eiAd93UdG2EM6xLAocDLaFV72CQI6XEs0WQG1f4SqvH52v3OTkgWBLgYV35gpyIe0-2nazGL0R8pTNuDqrOb7OGmuTRMoTIiRi67-wTxx8cQ";
2845
2954
  this.variant = "";
2955
+ this.urlParams = [];
2846
2956
  this._subs = [];
2847
2957
  }
2848
2958
  set externalSource(value) {
@@ -2854,10 +2964,12 @@ class ProductExternalSourceComponent {
2854
2964
  return this._externalSource;
2855
2965
  }
2856
2966
  set externalCatalogStartupInfo(value) {
2857
- this._externalCatalogStartupInfo = value;
2858
- this.externalSource = value.externalSource;
2859
- this.loaded = false;
2860
- this._prepareExternalSource();
2967
+ if (value) {
2968
+ this._externalCatalogStartupInfo = value;
2969
+ this.externalSource = value.externalSource;
2970
+ this.loaded = false;
2971
+ this._prepareExternalSource();
2972
+ }
2861
2973
  }
2862
2974
  get externalCatalogStartupInfo() {
2863
2975
  return this._externalCatalogStartupInfo;
@@ -2931,6 +3043,7 @@ class ProductExternalSourceComponent {
2931
3043
  this.token = this.externalCatalogStartupInfo.token;
2932
3044
  this.sku = this.externalCatalogStartupInfo.externalGoodId;
2933
3045
  this.variant = this.externalCatalogStartupInfo.flattenedGoodId;
3046
+ this.urlParams = this.externalCatalogStartupInfo.externalSource.parameters;
2934
3047
  this.switchToConfigurator();
2935
3048
  this.loaded = true;
2936
3049
  }
@@ -2977,6 +3090,7 @@ ProductExternalSourceComponent.decorators = [
2977
3090
  [sku]="sku"
2978
3091
  [variant]="variant"
2979
3092
  [token]="token"
3093
+ [urlParams]="urlParams"
2980
3094
  (configuratorFinished)="handleConfigurationFinished($event)"></co-product-hd>
2981
3095
  </ng-container>
2982
3096
  </ng-container>
@@ -3030,7 +3144,7 @@ class IoneProductModule {
3030
3144
  IoneProductModule.decorators = [
3031
3145
  { type: NgModule, args: [{
3032
3146
  imports: [
3033
- //BrowserAnimationsModule,
3147
+ BrowserAnimationsModule,
3034
3148
  CommonModule,
3035
3149
  ProductPageModule,
3036
3150
  ProductHdModule,