@colijnit/product 257.1.11 → 257.1.13

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.
@@ -14,6 +14,9 @@ export declare class ImageCarouselComponent implements OnDestroy {
14
14
  private _changeDetector;
15
15
  private _domSanitizer;
16
16
  carousel: ElementRef;
17
+ isPopupOpen: boolean;
18
+ selectedImage?: ImageViewModel;
19
+ onEsc(): void;
17
20
  showRefresh: boolean;
18
21
  set images(value: (CoDocument | string)[]);
19
22
  get images(): (CoDocument | string)[];
@@ -36,8 +39,10 @@ export declare class ImageCarouselComponent implements OnDestroy {
36
39
  handleThumbClick(index: number): void;
37
40
  onForceRenderImage(): void;
38
41
  handleShowImage(imageViewModel: ImageViewModel): void;
42
+ closePopup(): void;
39
43
  private _filterValidImages;
40
44
  private _loadAndRescaleImages;
41
45
  private _resizeAndSanitizeSource;
46
+ private _detectPreferredMime;
42
47
  private _scrollCarouselToIndex;
43
48
  }
@@ -36,6 +36,7 @@ export declare class ProductAddtocartComponent implements OnInit, OnDestroy {
36
36
  ngOnDestroy(): void;
37
37
  handleAddToCartClick(quantity: number): Promise<void>;
38
38
  handleAddToQuoteClick(quantity: number): Promise<void>;
39
- private _getJSONFromArticleObject;
39
+ private _handleGeneratedArticleDirectly;
40
40
  private _getGeneratedArtDirectly;
41
+ private _getJSONFromArticleObject;
41
42
  }
@@ -50,6 +50,7 @@ export declare class ProductPageComponent implements OnInit, OnDestroy, AfterVie
50
50
  private _currentView;
51
51
  private _subs;
52
52
  private _settings;
53
+ private _pageLoadedSubscription;
53
54
  constructor(_ione: ProductConnectorService, _renderer: Renderer2, _changeDetector: ChangeDetectorRef, iconCache: IconCacheService, settingsService: ProductSettingsService, appEventService: ProductEventService);
54
55
  ngOnInit(): void;
55
56
  ngAfterViewInit(): void;
@@ -13,6 +13,7 @@ export declare class ProductConnectorService implements OnDestroy {
13
13
  private _settingsService;
14
14
  get shouldShowLoader(): boolean;
15
15
  controllerInitialized: BehaviorSubject<boolean>;
16
+ articleLoaded: BehaviorSubject<boolean>;
16
17
  private _shouldShowLoader;
17
18
  private _initializing;
18
19
  private _initialized;
@@ -31,8 +31,8 @@
31
31
  function Version() {
32
32
  this.name = "@colijnit/product";
33
33
  this.description = "Product detail page project for iOne";
34
- this.symVer = "257.1.11";
35
- this.publishDate = "2-7-2025 11:03:13";
34
+ this.symVer = "257.1.13";
35
+ this.publishDate = "22-8-2025 16:12:09";
36
36
  }
37
37
  return Version;
38
38
  }());
@@ -1206,6 +1206,7 @@
1206
1206
  this._adapterService = _adapterService;
1207
1207
  this._settingsService = _settingsService;
1208
1208
  this.controllerInitialized = new rxjs.BehaviorSubject(false);
1209
+ this.articleLoaded = new rxjs.BehaviorSubject(false);
1209
1210
  this._initializing = false;
1210
1211
  this._initialized = false;
1211
1212
  this.connectorOptions = new options.Options();
@@ -1673,9 +1674,19 @@
1673
1674
  if (_this.selections.nativeElement) {
1674
1675
  _this.selections.nativeElement.forceRenderImage();
1675
1676
  }
1676
- }), this.settingsService.settingsLoaded.subscribe(function (loaded) { return _this._handleSettingsLoaded(loaded); }), this._ione.controllerInitialized.subscribe(function (initialized) {
1677
- _this.settingsLoaded = initialized;
1678
- }), this.appEventService.onAnswersAvailable.subscribe(function (answers) {
1677
+ }), this.settingsService.settingsLoaded.subscribe(function (loaded) { return _this._handleSettingsLoaded(loaded); }), this._pageLoadedSubscription = rxjs.combineLatest([
1678
+ this._ione.controllerInitialized,
1679
+ this._ione.articleLoaded
1680
+ ]).subscribe(function (_a) {
1681
+ var _b = __read(_a, 2), initialized = _b[0], articleLoaded = _b[1];
1682
+ if (initialized && articleLoaded) {
1683
+ _this.settingsLoaded = initialized;
1684
+ }
1685
+ }),
1686
+ // this._ione.controllerInitialized.subscribe((initialized: boolean) => {
1687
+ // this.settingsLoaded = initialized;
1688
+ // }),
1689
+ this.appEventService.onAnswersAvailable.subscribe(function (answers) {
1679
1690
  if (answers && _this.configurable) {
1680
1691
  _this.showAddToCart = false;
1681
1692
  }
@@ -1771,6 +1782,7 @@
1771
1782
  if (this._initializedSub) {
1772
1783
  this._initializedSub.unsubscribe();
1773
1784
  }
1785
+ this._pageLoadedSubscription.unsubscribe();
1774
1786
  this.configurator = undefined;
1775
1787
  this.selections = undefined;
1776
1788
  this.fullscreenbutton = undefined;
@@ -1807,6 +1819,7 @@
1807
1819
  _this.article = article;
1808
1820
  if (_this.article) {
1809
1821
  _this.configurable = _this.article.goodType === 'B' && (_this.article.isConfigurable || _this.article.isConfigurable === undefined);
1822
+ // this.configurable = this.article.goodType === 'B';
1810
1823
  if (_this.configurable) {
1811
1824
  _this.showAddToCart = false;
1812
1825
  _this.currentView = SelectorType.TwoD;
@@ -1823,6 +1836,7 @@
1823
1836
  });
1824
1837
  _this._changeDetector.detectChanges();
1825
1838
  }
1839
+ _this._ione.articleLoaded.next(true);
1826
1840
  });
1827
1841
  }
1828
1842
  return [2 /*return*/];
@@ -1844,37 +1858,37 @@
1844
1858
  ProductPageComponent.decorators = [
1845
1859
  { type: i0.Component, args: [{
1846
1860
  selector: 'app-product-page',
1847
- 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 && this.configurable\">\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",
1861
+ 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 && this.configurable\">\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\" *ngIf=\"article\">\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",
1848
1862
  animations: [
1849
1863
  animations.trigger('toggleFullScreen', [
1850
1864
  animations.state('fullscreen', animations.style({ 'position': 'fixed', 'top': '0', 'left': '0', 'width': '100%', 'height': '100%' })),
1851
1865
  animations.state('halfscreen', animations.style({ 'position': '*', 'top': '*', 'left': '*', 'width': '*', 'height': '*' })),
1852
- animations.transition('halfscreen <=> fullscreen', animations.animate('200ms ease-in-out')),
1866
+ animations.transition('halfscreen <=> fullscreen', animations.animate('200ms ease-in-out'))
1853
1867
  ]),
1854
1868
  animations.trigger('toggleTopLeft', [
1855
1869
  animations.state('fullscreen', animations.style({ 'position': 'fixed', 'top': '0', 'left': '0' })),
1856
1870
  animations.state('halfscreen', animations.style({ 'position': 'absolute', 'top': '*', 'left': '*' })),
1857
- animations.transition('halfscreen <=> fullscreen', animations.animate('200ms ease-in-out')),
1871
+ animations.transition('halfscreen <=> fullscreen', animations.animate('200ms ease-in-out'))
1858
1872
  ]),
1859
1873
  animations.trigger('toggleTopRight', [
1860
1874
  animations.state('fullscreen', animations.style({ 'position': 'fixed', 'top': '0', 'right': '0' })),
1861
1875
  animations.state('halfscreen', animations.style({ 'position': '*', 'top': '*', 'right': '*' })),
1862
- animations.transition('halfscreen <=> fullscreen', animations.animate('200ms ease-in-out')),
1876
+ animations.transition('halfscreen <=> fullscreen', animations.animate('200ms ease-in-out'))
1863
1877
  ]),
1864
1878
  animations.trigger('toggleFullScreenRight', [
1865
1879
  animations.state('fullscreen', animations.style({ 'position': 'fixed', 'width': '400px', 'top': '0', 'right': '0' })),
1866
1880
  animations.state('halfscreen', animations.style({ 'position': '*', 'width': '*', 'top': '*', 'right': '*' })),
1867
- animations.transition('halfscreen <=> fullscreen', animations.animate('200ms ease-in-out')),
1881
+ animations.transition('halfscreen <=> fullscreen', animations.animate('200ms ease-in-out'))
1868
1882
  ]),
1869
1883
  animations.trigger('toggleVisibilityByState', [
1870
1884
  animations.state('hide', animations.style({ 'opacity': '0', 'display': 'none' })),
1871
1885
  animations.state('show', animations.style({ 'display': 'block', 'opacity': '1' })),
1872
- animations.transition('hide <=> show', animations.animate('200ms 100ms ease-in-out')),
1886
+ animations.transition('hide <=> show', animations.animate('200ms 100ms ease-in-out'))
1873
1887
  ]),
1874
1888
  animations.trigger('toggleVisibility', [
1875
1889
  animations.state('void', animations.style({ 'opacity': '0' })),
1876
1890
  animations.state('*', animations.style({ 'opacity': '1' })),
1877
- animations.transition('void => *', animations.animate('200ms ease-in-out')),
1891
+ animations.transition('void => *', animations.animate('200ms ease-in-out'))
1878
1892
  ])
1879
1893
  ],
1880
1894
  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"]
@@ -2025,6 +2039,7 @@
2025
2039
  this._appEventService = _appEventService;
2026
2040
  this._changeDetector = _changeDetector;
2027
2041
  this._domSanitizer = _domSanitizer;
2042
+ this.isPopupOpen = false;
2028
2043
  this.showRefresh = false;
2029
2044
  this.resizing = false;
2030
2045
  this.imageViewModels = [];
@@ -2054,6 +2069,12 @@
2054
2069
  _this._changeDetector.detectChanges();
2055
2070
  }));
2056
2071
  }
2072
+ // Close on ESC
2073
+ ImageCarouselComponent.prototype.onEsc = function () {
2074
+ if (this.isPopupOpen) {
2075
+ this.closePopup();
2076
+ }
2077
+ };
2057
2078
  Object.defineProperty(ImageCarouselComponent.prototype, "images", {
2058
2079
  get: function () {
2059
2080
  return this._images;
@@ -2109,15 +2130,16 @@
2109
2130
  };
2110
2131
  ImageCarouselComponent.prototype.handleShowImage = function (imageViewModel) {
2111
2132
  if (imageViewModel && imageViewModel.originalSource) {
2112
- var popupWindow = window.open('', 'Image zoom', 'width=600,height=400');
2113
- // Set the content of the popup window
2114
- popupWindow.document.write('<html><head><title>Image zoom</title></head><body>');
2115
- popupWindow.document.write("<img src=" + imageViewModel.originalSource + " alt=\"Image\" style=\"width:100%; height:auto;\">");
2116
- popupWindow.document.write('</body></html>');
2117
- // Close the document to render the popup window
2118
- popupWindow.document.close();
2133
+ this.selectedImage = imageViewModel;
2134
+ this.isPopupOpen = true;
2135
+ this._changeDetector.markForCheck();
2119
2136
  }
2120
2137
  };
2138
+ ImageCarouselComponent.prototype.closePopup = function () {
2139
+ this.isPopupOpen = false;
2140
+ this.selectedImage = undefined;
2141
+ this._changeDetector.markForCheck();
2142
+ };
2121
2143
  ImageCarouselComponent.prototype._filterValidImages = function (value) {
2122
2144
  if (!value) {
2123
2145
  return [];
@@ -2162,39 +2184,54 @@
2162
2184
  ImageCarouselComponent.prototype._resizeAndSanitizeSource = function (source, imageViewModel) {
2163
2185
  var _this = this;
2164
2186
  var resizeCanvas = document.createElement('canvas');
2165
- var resizeCanvasContext = resizeCanvas.getContext('2d');
2166
- var resizeImage = document.createElement('img');
2167
- resizeImage.crossOrigin = 'anonymous';
2168
- resizeImage.onload = function () { return __awaiter(_this, void 0, void 0, function () {
2169
- var originalWidth, originalHeight, aspectRatio, newWidth, newHeight, imageWidth, resizedSource;
2170
- return __generator(this, function (_a) {
2171
- resizeCanvasContext.imageSmoothingEnabled = true;
2172
- resizeCanvasContext.imageSmoothingQuality = 'high';
2173
- originalWidth = resizeImage.width;
2174
- originalHeight = resizeImage.height;
2175
- aspectRatio = originalWidth / originalHeight;
2176
- newWidth = this._resizeCanvasHeight;
2177
- newHeight = this._resizeCanvasHeight;
2178
- if (originalWidth > originalHeight) {
2179
- newHeight = this._resizeCanvasHeight / aspectRatio;
2180
- }
2181
- else {
2182
- newWidth = this._resizeCanvasHeight * aspectRatio;
2183
- }
2184
- // Set the canvas size to the new width and height
2185
- resizeCanvas.width = newWidth;
2186
- resizeCanvas.height = newHeight;
2187
- imageWidth = this._resizeCanvasHeight * (resizeImage.height / resizeImage.width);
2188
- resizeCanvasContext.drawImage(resizeImage, 0, 0, newWidth, newHeight);
2189
- resizedSource = resizeCanvas.toDataURL('image/jpeg');
2190
- imageViewModel.source = this._domSanitizer.bypassSecurityTrustUrl(resizedSource);
2191
- imageViewModel.originalSource = source;
2192
- this._changeDetector.detectChanges();
2193
- return [2 /*return*/];
2194
- });
2195
- }); };
2196
- // @ts-ignore
2197
- resizeImage.src = source;
2187
+ var ctx = resizeCanvas.getContext('2d');
2188
+ var img = document.createElement('img');
2189
+ img.crossOrigin = 'anonymous';
2190
+ img.onload = function () {
2191
+ ctx.imageSmoothingEnabled = true;
2192
+ ctx.imageSmoothingQuality = 'high';
2193
+ var ow = img.width;
2194
+ var oh = img.height;
2195
+ var aspect = ow / oh;
2196
+ var newW = _this._resizeCanvasHeight;
2197
+ var newH = _this._resizeCanvasHeight;
2198
+ if (ow > oh) {
2199
+ newH = _this._resizeCanvasHeight / aspect;
2200
+ }
2201
+ else {
2202
+ newW = _this._resizeCanvasHeight * aspect;
2203
+ }
2204
+ resizeCanvas.width = Math.round(newW);
2205
+ resizeCanvas.height = Math.round(newH);
2206
+ // Ensure transparent background before drawing
2207
+ ctx.clearRect(0, 0, resizeCanvas.width, resizeCanvas.height);
2208
+ ctx.drawImage(img, 0, 0, resizeCanvas.width, resizeCanvas.height);
2209
+ var mime = _this._detectPreferredMime(source);
2210
+ var resizedSource = mime === 'image/jpeg'
2211
+ ? resizeCanvas.toDataURL('image/jpeg', 0.92) // only if original was JPEG
2212
+ : resizeCanvas.toDataURL(mime); // PNG/WebP keep alpha
2213
+ imageViewModel.source = _this._domSanitizer.bypassSecurityTrustUrl(resizedSource);
2214
+ imageViewModel.originalSource = source;
2215
+ _this._changeDetector.detectChanges();
2216
+ };
2217
+ img.src = source;
2218
+ };
2219
+ ImageCarouselComponent.prototype._detectPreferredMime = function (source) {
2220
+ // Data URI check
2221
+ var m = source.match(/^data:(image\/[a-zA-Z+.-]+);base64,/);
2222
+ if (m) {
2223
+ var t = m[1].toLowerCase();
2224
+ if (t === 'image/png' || t === 'image/webp' || t === 'image/jpeg')
2225
+ return t;
2226
+ }
2227
+ var lower = source.toLowerCase();
2228
+ if (lower.endsWith('.png'))
2229
+ return 'image/png';
2230
+ if (lower.endsWith('.webp'))
2231
+ return 'image/webp';
2232
+ if (lower.endsWith('.jpg') || lower.endsWith('.jpeg'))
2233
+ return 'image/jpeg';
2234
+ return 'image/png';
2198
2235
  };
2199
2236
  ImageCarouselComponent.prototype._scrollCarouselToIndex = function () {
2200
2237
  if (this.currentIndex > -1 && this.currentIndex <= this.images.length) {
@@ -2213,9 +2250,9 @@
2213
2250
  ImageCarouselComponent.decorators = [
2214
2251
  { type: i0.Component, args: [{
2215
2252
  selector: 'app-image-carousel',
2216
- template: "\n <div id=\"product_page_carousel\">\n <div id=\"product_page_carousel_items\">\n <co-loader [isShown]=\"true\" *ngIf=\"showLoader\"></co-loader>\n <div #carousel class=\"inner-carousel\">\n <!-- This has been taken out of the for loop to prevent flashing images when updating. -->\n <div *ngIf=\"imageViewModels[0]\" class=\"carousel-item\" [id]=\"'slide-0'\" [class.active]=\"isCurrentIndex(0)\" (click)=\"handleShowImage(imageViewModels[0])\">\n <img [src]=\"imageViewModels[0].source\">\n </div>\n <div *ngFor=\"let imageViewModel of imageViewModels.slice(1); let index = index\" class=\"carousel-item\"\n [id]=\"'slide-' + (index + 1)\" [class.active]=\"isCurrentIndex((index + 1))\" (click)=\"handleShowImage(imageViewModel)\">\n <img [src]=\"imageViewModel.source\">\n </div>\n <div class=\"carousel-scroller-layer\" *ngIf=\"imageViewModels && imageViewModels.length > 1\">\n <div class=\"carousel-item-scroller prev\" (click)=\"gotoPrevSlide()\" *ngIf=\"currentIndex > 0\"></div>\n <div class=\"carousel-item-scroller next\" (click)=\"gotoNextSlide()\" *ngIf=\"currentIndex < images.length - 1\"></div>\n </div>\n </div>\n <!--\n <co-icon class=\"selector-type-icon refresh-button\" [iconData]=\"iconCache.getIcon(icons.Refresh)\" (click)=\"onForceRenderImage()\" [class.loading]=\"showLoader\" *ngIf=\"showRefresh\"></co-icon>\n -->\n </div>\n\n <div id=\"product_page_carousel_thumbs\">\n <co-scroll-container class=\"scroll-container\" *ngIf=\"imageViewModels && imageViewModels.length > 1\">\n <div *ngFor=\"let imageViewModel of imageViewModels; let index = index\" class=\"carousel-thumb\"\n [class.active]=\"index === currentIndex\">\n <img [src]=\"imageViewModel.source\" (click)=\"handleThumbClick(index)\"/>\n </div>\n </co-scroll-container>\n </div>\n </div>\n ",
2253
+ template: "\n <div id=\"product_page_carousel\">\n <div id=\"product_page_carousel_items\">\n <co-loader [isShown]=\"true\" *ngIf=\"showLoader\"></co-loader>\n <div #carousel class=\"inner-carousel\">\n <!-- This has been taken out of the for loop to prevent flashing images when updating. -->\n <div *ngIf=\"imageViewModels[0]\" class=\"carousel-item\" [id]=\"'slide-0'\" [class.active]=\"isCurrentIndex(0)\" (click)=\"handleShowImage(imageViewModels[0])\">\n <img [src]=\"imageViewModels[0].source\">\n </div>\n <div *ngFor=\"let imageViewModel of imageViewModels.slice(1); let index = index\" class=\"carousel-item\"\n [id]=\"'slide-' + (index + 1)\" [class.active]=\"isCurrentIndex((index + 1))\" (click)=\"handleShowImage(imageViewModel)\">\n <img [src]=\"imageViewModel.source\">\n </div>\n <div class=\"carousel-scroller-layer\" *ngIf=\"imageViewModels && imageViewModels.length > 1\">\n <div class=\"carousel-item-scroller prev\" (click)=\"gotoPrevSlide()\" *ngIf=\"currentIndex > 0\"></div>\n <div class=\"carousel-item-scroller next\" (click)=\"gotoNextSlide()\" *ngIf=\"currentIndex < images.length - 1\"></div>\n </div>\n </div>\n <!--\n <co-icon class=\"selector-type-icon refresh-button\" [iconData]=\"iconCache.getIcon(icons.Refresh)\" (click)=\"onForceRenderImage()\" [class.loading]=\"showLoader\" *ngIf=\"showRefresh\"></co-icon>\n -->\n </div>\n\n <div id=\"product_page_carousel_thumbs\">\n <co-scroll-container class=\"scroll-container\" *ngIf=\"imageViewModels && imageViewModels.length > 1\">\n <div *ngFor=\"let imageViewModel of imageViewModels; let index = index\" class=\"carousel-thumb\"\n [class.active]=\"index === currentIndex\">\n <img [src]=\"imageViewModel.source\" (click)=\"handleThumbClick(index)\"/>\n </div>\n </co-scroll-container>\n </div>\n </div>\n <!-- Modal (real popup) -->\n <div\n class=\"image-modal\"\n *ngIf=\"isPopupOpen\"\n (click)=\"closePopup()\"\n role=\"dialog\"\n aria-modal=\"true\"\n aria-label=\"Image preview\"\n >\n <div class=\"image-modal__content\" (click)=\"$event.stopPropagation()\">\n <button\n class=\"image-modal__close\"\n type=\"button\"\n aria-label=\"Close\"\n (click)=\"closePopup()\"\n >\n \u00D7\n </button>\n\n <img [src]=\"selectedImage?.originalSource\" alt=\"Image preview\" />\n </div>\n </div>\n ",
2217
2254
  changeDetection: i0.ChangeDetectionStrategy.OnPush,
2218
- 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"]
2255
+ 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}.image-modal{position:fixed;inset:0;background:rgba(0,0,0,.8);display:flex;align-items:center;justify-content:center;z-index:1000}.image-modal__content{position:relative;max-width:90vw;max-height:90vh}.image-modal__content img{max-width:90vw;max-height:90vh;-o-object-fit:contain;object-fit:contain;display:block}.image-modal__close{position:fixed;top:15px;right:30px;background:transparent;border:none;color:#fff;font-size:60px;line-height:1;cursor:pointer}@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"]
2219
2256
  },] }
2220
2257
  ];
2221
2258
  ImageCarouselComponent.ctorParameters = function () { return [
@@ -2226,6 +2263,7 @@
2226
2263
  ]; };
2227
2264
  ImageCarouselComponent.propDecorators = {
2228
2265
  carousel: [{ type: i0.ViewChild, args: ['carousel', { read: i0.ElementRef },] }],
2266
+ onEsc: [{ type: i0.HostListener, args: ['document:keydown.escape',] }],
2229
2267
  showRefresh: [{ type: i0.Input }],
2230
2268
  images: [{ type: i0.Input }],
2231
2269
  handleWindowResize: [{ type: i0.HostListener, args: ['window:resize',] }],
@@ -2530,12 +2568,12 @@
2530
2568
  };
2531
2569
  ProductAddtocartComponent.prototype.handleAddToCartClick = function (quantity) {
2532
2570
  return __awaiter(this, void 0, void 0, function () {
2533
- var article, generatedGoodId, articleFull, article, article, article;
2571
+ var article, article, article;
2534
2572
  return __generator(this, function (_a) {
2535
2573
  switch (_a.label) {
2536
2574
  case 0:
2537
- if (!this.createFrozenArticle) return [3 /*break*/, 11];
2538
- if (!(this.article.goodType === 'B')) return [3 /*break*/, 6];
2575
+ if (!this.createFrozenArticle) return [3 /*break*/, 10];
2576
+ if (!(this.article.goodType === 'B')) return [3 /*break*/, 5];
2539
2577
  if (!this.article.isConfigurable) return [3 /*break*/, 2];
2540
2578
  return [4 /*yield*/, this._getJSONFromArticleObject({ article: this.article, quantity: quantity })];
2541
2579
  case 1:
@@ -2543,39 +2581,41 @@
2543
2581
  if (article) {
2544
2582
  this._appEventService.onAddToCart.next({ article: article, quantity: quantity });
2545
2583
  }
2546
- return [3 /*break*/, 5];
2547
- case 2: return [4 /*yield*/, this._getGeneratedArtDirectly(this.article.goodId)];
2584
+ return [3 /*break*/, 4];
2585
+ case 2: return [4 /*yield*/, this._handleGeneratedArticleDirectly(quantity)];
2548
2586
  case 3:
2549
- generatedGoodId = _a.sent();
2550
- if (!generatedGoodId) return [3 /*break*/, 5];
2551
- return [4 /*yield*/, this._productConnectorAdapterService.getArticleFullObject(generatedGoodId, true)];
2552
- case 4:
2553
- articleFull = _a.sent();
2554
- article = this._ioneControllerService.convertArticleFullObjectToArticleExtended(articleFull);
2555
- this._appEventService.onAddToCart.next({ article: article, quantity: quantity });
2556
- _a.label = 5;
2557
- case 5: return [3 /*break*/, 10];
2558
- case 6:
2587
+ _a.sent();
2588
+ _a.label = 4;
2589
+ case 4: return [3 /*break*/, 9];
2590
+ case 5:
2559
2591
  article = void 0;
2560
- if (!!!this.externalSource) return [3 /*break*/, 8];
2592
+ if (!!!this.externalSource) return [3 /*break*/, 7];
2561
2593
  return [4 /*yield*/, this._getJSONFromArticleObject({ article: this.article, quantity: quantity })];
2562
- case 7:
2594
+ case 6:
2563
2595
  article = _a.sent();
2564
- return [3 /*break*/, 9];
2565
- case 8:
2596
+ return [3 /*break*/, 8];
2597
+ case 7:
2566
2598
  article = this._ioneControllerService.convertArticleFullObjectToArticleExtended(this.article);
2567
- _a.label = 9;
2568
- case 9:
2599
+ _a.label = 8;
2600
+ case 8:
2569
2601
  if (article) {
2570
2602
  this._appEventService.onAddToCart.next({ article: article, quantity: quantity });
2571
2603
  }
2572
- _a.label = 10;
2573
- case 10: return [3 /*break*/, 12];
2604
+ _a.label = 9;
2605
+ case 9: return [3 /*break*/, 14];
2606
+ case 10:
2607
+ if (!(this.article.goodType === 'B')) return [3 /*break*/, 13];
2608
+ if (!!this.article.isConfigurable) return [3 /*break*/, 12];
2609
+ return [4 /*yield*/, this._handleGeneratedArticleDirectly(quantity)];
2574
2610
  case 11:
2611
+ _a.sent();
2612
+ _a.label = 12;
2613
+ case 12: return [3 /*break*/, 14];
2614
+ case 13:
2575
2615
  article = this._ioneControllerService.convertArticleFullObjectToArticleExtended(this.article);
2576
2616
  this._appEventService.onAddToCart.next({ article: article, quantity: quantity });
2577
- _a.label = 12;
2578
- case 12: return [2 /*return*/];
2617
+ _a.label = 14;
2618
+ case 14: return [2 /*return*/];
2579
2619
  }
2580
2620
  });
2581
2621
  });
@@ -2595,6 +2635,36 @@
2595
2635
  });
2596
2636
  });
2597
2637
  };
2638
+ ProductAddtocartComponent.prototype._handleGeneratedArticleDirectly = function (quantity) {
2639
+ return __awaiter(this, void 0, void 0, function () {
2640
+ var generatedGoodId, articleFull, article;
2641
+ return __generator(this, function (_a) {
2642
+ switch (_a.label) {
2643
+ case 0: return [4 /*yield*/, this._getGeneratedArtDirectly(this.article.goodId)];
2644
+ case 1:
2645
+ generatedGoodId = _a.sent();
2646
+ if (!generatedGoodId) return [3 /*break*/, 3];
2647
+ return [4 /*yield*/, this._productConnectorAdapterService.getArticleFullObject(generatedGoodId, true)];
2648
+ case 2:
2649
+ articleFull = _a.sent();
2650
+ article = this._ioneControllerService.convertArticleFullObjectToArticleExtended(articleFull);
2651
+ this._appEventService.onAddToCart.next({ article: article, quantity: quantity });
2652
+ _a.label = 3;
2653
+ case 3: return [2 /*return*/];
2654
+ }
2655
+ });
2656
+ });
2657
+ };
2658
+ ProductAddtocartComponent.prototype._getGeneratedArtDirectly = function (goodId) {
2659
+ return __awaiter(this, void 0, void 0, function () {
2660
+ return __generator(this, function (_a) {
2661
+ switch (_a.label) {
2662
+ case 0: return [4 /*yield*/, this._ioneControllerService.getGeneratedArtDirectly(goodId, true)];
2663
+ case 1: return [2 /*return*/, _a.sent()];
2664
+ }
2665
+ });
2666
+ });
2667
+ };
2598
2668
  ProductAddtocartComponent.prototype._getJSONFromArticleObject = function (article) {
2599
2669
  return __awaiter(this, void 0, void 0, function () {
2600
2670
  var configuratorStatistics;
@@ -2614,16 +2684,6 @@
2614
2684
  });
2615
2685
  });
2616
2686
  };
2617
- ProductAddtocartComponent.prototype._getGeneratedArtDirectly = function (goodId) {
2618
- return __awaiter(this, void 0, void 0, function () {
2619
- return __generator(this, function (_a) {
2620
- switch (_a.label) {
2621
- case 0: return [4 /*yield*/, this._ioneControllerService.getGeneratedArtDirectly(goodId, true)];
2622
- case 1: return [2 /*return*/, _a.sent()];
2623
- }
2624
- });
2625
- });
2626
- };
2627
2687
  return ProductAddtocartComponent;
2628
2688
  }());
2629
2689
  ProductAddtocartComponent.decorators = [
@@ -3039,7 +3099,7 @@
3039
3099
  this.updateHeight(tabIndex);
3040
3100
  };
3041
3101
  ProductInfoTabsComponent.prototype.updateHeight = function (tabIndex) {
3042
- if (this.tabContent.nativeElement.children.length > 0) {
3102
+ if (this.tabContent && this.tabContent.nativeElement.children.length > 0) {
3043
3103
  if (this.tabContent.nativeElement.children[tabIndex] !== undefined) {
3044
3104
  this.activeTabHeight = this.tabContent.nativeElement.children[tabIndex].offsetHeight;
3045
3105
  }