@colijnit/catalog 12.1.52 → 12.1.54
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/colijnit-catalog.umd.js +129 -63
- package/bundles/colijnit-catalog.umd.js.map +1 -1
- package/colijnit-catalog.metadata.json +1 -1
- package/esm2015/lib/catalog-version.js +3 -3
- package/esm2015/lib/component/base/article-base.component.js +12 -4
- package/esm2015/lib/component/base/catalog-search-base.component.js +15 -2
- package/esm2015/lib/component/catalog-external-source/catalog-external-source.component.js +8 -5
- package/esm2015/lib/component/catalog-navigation/catalog-navigation.component.js +45 -32
- package/esm2015/lib/component/catalog-search/catalog-search.component.js +16 -6
- package/esm2015/lib/component/catalog-search-result-list/catalog-search-result-list.component.js +10 -2
- package/esm2015/lib/component/catalog-search-result-tile/catalog-search-result-tile.component.js +12 -2
- package/esm2015/lib/service/catalog-event.service.js +1 -1
- package/fesm2015/colijnit-catalog.js +207 -145
- package/fesm2015/colijnit-catalog.js.map +1 -1
- package/lib/component/base/article-base.component.d.ts +2 -1
- package/lib/component/base/catalog-search-base.component.d.ts +4 -0
- package/lib/component/catalog-external-source/catalog-external-source.component.d.ts +2 -2
- package/lib/component/catalog-navigation/catalog-navigation.component.d.ts +3 -0
- package/lib/component/catalog-search/catalog-search.component.d.ts +3 -1
- package/lib/component/catalog-search-result-list/catalog-search-result-list.component.d.ts +1 -0
- package/lib/component/catalog-search-result-tile/catalog-search-result-tile.component.d.ts +3 -1
- package/lib/service/catalog-event.service.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Injectable, EventEmitter, Component, ViewEncapsulation, Input, Output, HostBinding, ChangeDetectorRef, ViewChild, ElementRef, Pipe, NgModule, Host, Directive, HostListener } from '@angular/core';
|
|
2
|
+
import { Injectable, EventEmitter, Component, ViewEncapsulation, Input, Output, HostBinding, ChangeDetectorRef, ViewChild, ElementRef, Pipe, NgModule, Host, Directive, HostListener, ViewChildren } from '@angular/core';
|
|
3
3
|
import { CommonModule } from '@angular/common';
|
|
4
4
|
import { __awaiter } from 'tslib';
|
|
5
5
|
import { Subject, BehaviorSubject, Observable } from 'rxjs';
|
|
@@ -49,8 +49,8 @@ class Version {
|
|
|
49
49
|
constructor() {
|
|
50
50
|
this.name = "@colijnit/catalog";
|
|
51
51
|
this.description = "iOne Catalog module based on Angular 12";
|
|
52
|
-
this.symVer = "12.1.
|
|
53
|
-
this.publishDate = "
|
|
52
|
+
this.symVer = "12.1.54";
|
|
53
|
+
this.publishDate = "6-12-2023 16:40:16";
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
56
|
|
|
@@ -3131,6 +3131,7 @@ class CatalogNavigationComponent {
|
|
|
3131
3131
|
this.showClass = true;
|
|
3132
3132
|
this.mobileMenuToggle = false;
|
|
3133
3133
|
this.categories = [];
|
|
3134
|
+
this.externalSources = [];
|
|
3134
3135
|
this.turnoverGroups = [];
|
|
3135
3136
|
this.showCollectionOverlay = false;
|
|
3136
3137
|
this.showExternalOverlay = false;
|
|
@@ -3156,6 +3157,7 @@ class CatalogNavigationComponent {
|
|
|
3156
3157
|
}
|
|
3157
3158
|
ngOnInit() {
|
|
3158
3159
|
this.categories.length = 0;
|
|
3160
|
+
this.externalSources.length = 0;
|
|
3159
3161
|
this.turnoverGroups.length = 0;
|
|
3160
3162
|
this._subs.push(this._adapterService.controllerInitialized.subscribe((initialized) => {
|
|
3161
3163
|
if (initialized) {
|
|
@@ -3178,6 +3180,13 @@ class CatalogNavigationComponent {
|
|
|
3178
3180
|
}
|
|
3179
3181
|
});
|
|
3180
3182
|
}
|
|
3183
|
+
getExternalSources() {
|
|
3184
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
3185
|
+
this._adapterService.getCatalogDefinitions().then((defs) => __awaiter(this, void 0, void 0, function* () {
|
|
3186
|
+
this.externalSources = defs;
|
|
3187
|
+
}));
|
|
3188
|
+
});
|
|
3189
|
+
}
|
|
3181
3190
|
prepareTurnoverGroups() {
|
|
3182
3191
|
if (this.categories && this.categories.length > 0) {
|
|
3183
3192
|
this.categories.forEach((category) => {
|
|
@@ -3260,41 +3269,45 @@ CatalogNavigationComponent.decorators = [
|
|
|
3260
3269
|
<div class="navigation-item-wrapper">
|
|
3261
3270
|
<a class="home-link" (click)="handleHomeClick($event)" [textContent]="homeLabel"></a>
|
|
3262
3271
|
</div>
|
|
3263
|
-
<
|
|
3264
|
-
|
|
3265
|
-
|
|
3266
|
-
|
|
3267
|
-
|
|
3268
|
-
|
|
3269
|
-
|
|
3270
|
-
|
|
3271
|
-
|
|
3272
|
-
|
|
3273
|
-
|
|
3274
|
-
|
|
3275
|
-
|
|
3276
|
-
<div class="navigation-category"
|
|
3277
|
-
|
|
3278
|
-
<div class="navigation-turnovergroup"
|
|
3272
|
+
<ng-container *ngIf="categories && categories.length > 0">
|
|
3273
|
+
<div class="navigation-item-wrapper" [class.active]="mobileMenuToggle" (click)="onToggleMobileMenu()"
|
|
3274
|
+
(mouseover)="handleShowCollectionOverlay()"
|
|
3275
|
+
(mouseleave)="handleHideCollectionOverlay()"
|
|
3276
|
+
overlayParent #collectionParentForOverlay="overlayParent">
|
|
3277
|
+
<co-icon class="hamburger-icon" [iconData]="iconCache.getIcon(icons.Hamburger)"></co-icon>
|
|
3278
|
+
<span [textContent]="collectionLabel"></span>
|
|
3279
|
+
<div class="navigation-overlay-wrapper" *ngIf="showCollectionOverlay" @showHideOverlay
|
|
3280
|
+
[overlay]="collectionParentForOverlay"
|
|
3281
|
+
[inline]="true"
|
|
3282
|
+
[keepInView]="true"
|
|
3283
|
+
[view]="view"
|
|
3284
|
+
[fullSize]="true">
|
|
3285
|
+
<div class="navigation-category-column-wrapper" *ngFor="let category of categories">
|
|
3286
|
+
<div class="navigation-category" [textContent]="category.category" (click)="handleCategoryClick($event, category.category)"></div>
|
|
3287
|
+
<div class="navigation-turnovergroup-wrapper">
|
|
3288
|
+
<div class="navigation-turnovergroup" *ngFor="let turnoverGroup of category.turnoverGroups" [textContent]="turnoverGroup.description" (click)="handleTurnoverGroupClick($event, turnoverGroup.turnovergroupNr)"></div>
|
|
3289
|
+
</div>
|
|
3279
3290
|
</div>
|
|
3280
3291
|
</div>
|
|
3281
3292
|
</div>
|
|
3282
|
-
</
|
|
3283
|
-
<
|
|
3284
|
-
|
|
3285
|
-
|
|
3286
|
-
|
|
3287
|
-
|
|
3288
|
-
|
|
3289
|
-
|
|
3290
|
-
|
|
3291
|
-
|
|
3292
|
-
|
|
3293
|
-
|
|
3294
|
-
|
|
3295
|
-
|
|
3293
|
+
</ng-container>
|
|
3294
|
+
<ng-container *ngIf="externalSources && externalSources.length > 0">
|
|
3295
|
+
<div class="navigation-item-wrapper" [class.active]="mobileMenuToggle" (click)="onToggleMobileMenu()"
|
|
3296
|
+
(mouseover)="handleShowExternalOverlay()"
|
|
3297
|
+
(mouseleave)="handleHideExternalOverlay()"
|
|
3298
|
+
overlayParent #externalParentForOverlay="overlayParent">
|
|
3299
|
+
<co-icon class="hamburger-icon" [iconData]="iconCache.getIcon(icons.Ar)"></co-icon>
|
|
3300
|
+
<span [textContent]="externalSourcesLabel"></span>
|
|
3301
|
+
<div class="navigation-overlay-wrapper" *ngIf="showExternalOverlay" @showHideOverlay
|
|
3302
|
+
[overlay]="externalParentForOverlay"
|
|
3303
|
+
[inline]="true"
|
|
3304
|
+
[keepInView]="true"
|
|
3305
|
+
[view]="view"
|
|
3306
|
+
[fullSize]="true">
|
|
3307
|
+
<co-catalog-external-sources (externalSourceClick)="handleExternalSourceClick($event)"></co-catalog-external-sources>
|
|
3308
|
+
</div>
|
|
3296
3309
|
</div>
|
|
3297
|
-
</
|
|
3310
|
+
</ng-container>
|
|
3298
3311
|
</div>
|
|
3299
3312
|
`,
|
|
3300
3313
|
providers: [
|
|
@@ -3507,6 +3520,7 @@ class CatalogSearchComponent {
|
|
|
3507
3520
|
this._catalogEventService = _catalogEventService;
|
|
3508
3521
|
this.iconCacheService = iconCacheService;
|
|
3509
3522
|
this.icons = IconEnum;
|
|
3523
|
+
this.createFrozenArticle = true;
|
|
3510
3524
|
this.showNavigation = false;
|
|
3511
3525
|
this.showLandingPage = false;
|
|
3512
3526
|
this.showFilter = false;
|
|
@@ -3538,9 +3552,9 @@ class CatalogSearchComponent {
|
|
|
3538
3552
|
ngOnInit() {
|
|
3539
3553
|
return __awaiter(this, void 0, void 0, function* () {
|
|
3540
3554
|
yield this._settingsService.initializeSettings();
|
|
3541
|
-
this._catalogService.init(this._settings);
|
|
3542
|
-
this._subs.push(this._catalogEventService.addArticleButtonClick.subscribe((
|
|
3543
|
-
this.onAddArticleButtonClick.emit(
|
|
3555
|
+
this._catalogService.init(this._settings, true);
|
|
3556
|
+
this._subs.push(this._catalogEventService.addArticleButtonClick.subscribe((article) => {
|
|
3557
|
+
this.onAddArticleButtonClick.emit(article);
|
|
3544
3558
|
}), this._catalogEventService.arButtonClick.subscribe((article) => {
|
|
3545
3559
|
this.onArButtonClick.emit(article);
|
|
3546
3560
|
}), this._catalogEventService.articleClick.subscribe((article) => {
|
|
@@ -3555,6 +3569,9 @@ class CatalogSearchComponent {
|
|
|
3555
3569
|
ngOnDestroy() {
|
|
3556
3570
|
this._subs.forEach(s => s.unsubscribe());
|
|
3557
3571
|
}
|
|
3572
|
+
handleHomeClick($event) {
|
|
3573
|
+
this._catalogSearchService.resetFilters();
|
|
3574
|
+
}
|
|
3558
3575
|
handleCategoryClick(category) {
|
|
3559
3576
|
this._catalogSearchService.category = category;
|
|
3560
3577
|
}
|
|
@@ -3611,6 +3628,7 @@ CatalogSearchComponent.decorators = [
|
|
|
3611
3628
|
</ng-container>
|
|
3612
3629
|
<co-catalog-navigation *ngIf="showNavigation"
|
|
3613
3630
|
[view]="contentView"
|
|
3631
|
+
(homeClick)="handleHomeClick($event)"
|
|
3614
3632
|
(categoryClick)="handleCategoryClick($event)"
|
|
3615
3633
|
(turnoverGroupClick)="handleTurnoverGroupClick($event)"
|
|
3616
3634
|
(externalSourceClick)="onExternalSourceClick.emit($event)"
|
|
@@ -3619,10 +3637,14 @@ CatalogSearchComponent.decorators = [
|
|
|
3619
3637
|
(turnoverGroupClick)="handleTurnoverGroupClick($event)"></co-catalog-categories>
|
|
3620
3638
|
<div class="search-content">
|
|
3621
3639
|
<ng-container *ngIf="mode === 'tile'">
|
|
3622
|
-
<co-catalog-search-result-tile
|
|
3640
|
+
<co-catalog-search-result-tile
|
|
3641
|
+
[createFrozenArticle]="createFrozenArticle"
|
|
3642
|
+
></co-catalog-search-result-tile>
|
|
3623
3643
|
</ng-container>
|
|
3624
3644
|
<ng-container *ngIf="mode === 'list'">
|
|
3625
|
-
<co-catalog-search-result-list
|
|
3645
|
+
<co-catalog-search-result-list
|
|
3646
|
+
[createFrozenArticle]="createFrozenArticle"
|
|
3647
|
+
></co-catalog-search-result-list>
|
|
3626
3648
|
</ng-container>
|
|
3627
3649
|
<ng-container *ngIf="mode === 'grid'">
|
|
3628
3650
|
<!--
|
|
@@ -3671,6 +3693,7 @@ CatalogSearchComponent.propDecorators = {
|
|
|
3671
3693
|
title: [{ type: Input }],
|
|
3672
3694
|
subTitle: [{ type: Input }],
|
|
3673
3695
|
searchPlaceholder: [{ type: Input }],
|
|
3696
|
+
createFrozenArticle: [{ type: Input }],
|
|
3674
3697
|
showNavigation: [{ type: Input }],
|
|
3675
3698
|
showLandingPage: [{ type: Input }],
|
|
3676
3699
|
showFilter: [{ type: Input }],
|
|
@@ -3749,82 +3772,35 @@ CatalogSearchHeaderModule.decorators = [
|
|
|
3749
3772
|
class CatalogSearchBaseComponent {
|
|
3750
3773
|
constructor(catalogSearchService) {
|
|
3751
3774
|
this.catalogSearchService = catalogSearchService;
|
|
3775
|
+
this.createFrozenArticle = true;
|
|
3776
|
+
this.elements = [];
|
|
3752
3777
|
}
|
|
3753
3778
|
onPreviousClick() {
|
|
3779
|
+
this._scrollIntoView();
|
|
3754
3780
|
this.catalogSearchService.currentPage -= 1;
|
|
3755
3781
|
}
|
|
3756
3782
|
onNextClick() {
|
|
3783
|
+
this._scrollIntoView();
|
|
3757
3784
|
this.catalogSearchService.currentPage += 1;
|
|
3758
3785
|
}
|
|
3759
3786
|
onPageClick(pageNr) {
|
|
3787
|
+
this._scrollIntoView();
|
|
3760
3788
|
this.catalogSearchService.currentPage = pageNr;
|
|
3761
3789
|
}
|
|
3790
|
+
_scrollIntoView() {
|
|
3791
|
+
if (this.elements && this.elements.length > 0) {
|
|
3792
|
+
this.elements[0].nativeElement.scrollIntoView({ block: 'start', inline: 'nearest', behavior: 'smooth' });
|
|
3793
|
+
}
|
|
3794
|
+
}
|
|
3762
3795
|
}
|
|
3763
3796
|
CatalogSearchBaseComponent.decorators = [
|
|
3764
3797
|
{ type: Directive }
|
|
3765
3798
|
];
|
|
3766
3799
|
CatalogSearchBaseComponent.ctorParameters = () => [
|
|
3767
3800
|
{ type: CatalogSearchService }
|
|
3768
|
-
];
|
|
3769
|
-
|
|
3770
|
-
class CatalogSearchResultTileComponent extends CatalogSearchBaseComponent {
|
|
3771
|
-
constructor() {
|
|
3772
|
-
super(...arguments);
|
|
3773
|
-
this.onLookAtArticleButtonClick = new EventEmitter();
|
|
3774
|
-
this.onArButtonClick = new EventEmitter();
|
|
3775
|
-
this.onAddArticleButtonClick = new EventEmitter();
|
|
3776
|
-
this.onArticleClick = new EventEmitter();
|
|
3777
|
-
this.onStockDetailsClick = new EventEmitter();
|
|
3778
|
-
this.showClass = true;
|
|
3779
|
-
this.smallScrollbar = true;
|
|
3780
|
-
}
|
|
3781
|
-
}
|
|
3782
|
-
CatalogSearchResultTileComponent.decorators = [
|
|
3783
|
-
{ type: Component, args: [{
|
|
3784
|
-
selector: 'co-catalog-search-result-tile',
|
|
3785
|
-
template: `
|
|
3786
|
-
<div class="article-cards" visibilityObserverMaster>
|
|
3787
|
-
<ng-container *ngFor="let article of catalogSearchService.articles">
|
|
3788
|
-
<co-catalog-article-tile
|
|
3789
|
-
visibilityObserver
|
|
3790
|
-
#intersection="intersection"
|
|
3791
|
-
[observerEnabled]="!article.imageData"
|
|
3792
|
-
[showing]="intersection.isIntersecting"
|
|
3793
|
-
[article]="article"
|
|
3794
|
-
(onArticleClick)="onArticleClick.emit($event)"
|
|
3795
|
-
(onAddArticleButtonClick)="onAddArticleButtonClick.emit($event)"
|
|
3796
|
-
(onArButtonClick)="onArButtonClick.emit($event)"
|
|
3797
|
-
(onLookAtArticleButtonClick)="onLookAtArticleButtonClick.emit($event)"
|
|
3798
|
-
(onStockDetailsClick)="onStockDetailsClick.emit($event)"
|
|
3799
|
-
>
|
|
3800
|
-
</co-catalog-article-tile>
|
|
3801
|
-
</ng-container>
|
|
3802
|
-
</div>
|
|
3803
|
-
<co-pagination-bar *ngIf="catalogSearchService.articles?.length > 0"
|
|
3804
|
-
[currentPage]="catalogSearchService.currentPage"
|
|
3805
|
-
[itemsPerPage]="catalogSearchService.articlesPerPage"
|
|
3806
|
-
[totalItems]="catalogSearchService.resultCount"
|
|
3807
|
-
[previousLabel]="'PREVIOUS' | localize"
|
|
3808
|
-
[nextLabel]="'NEXT' | localize"
|
|
3809
|
-
[autoHide]="true"
|
|
3810
|
-
[directionLinks]="true"
|
|
3811
|
-
[paginationRange]="8"
|
|
3812
|
-
(previousClick)="onPreviousClick()"
|
|
3813
|
-
(nextClick)="onNextClick()"
|
|
3814
|
-
(pageClick)="onPageClick($event)">
|
|
3815
|
-
</co-pagination-bar>
|
|
3816
|
-
`,
|
|
3817
|
-
encapsulation: ViewEncapsulation.None
|
|
3818
|
-
},] }
|
|
3819
3801
|
];
|
|
3820
|
-
|
|
3821
|
-
|
|
3822
|
-
onArButtonClick: [{ type: Output }],
|
|
3823
|
-
onAddArticleButtonClick: [{ type: Output }],
|
|
3824
|
-
onArticleClick: [{ type: Output }],
|
|
3825
|
-
onStockDetailsClick: [{ type: Output }],
|
|
3826
|
-
showClass: [{ type: HostBinding, args: ['class.co-catalog-search-result-tile',] }],
|
|
3827
|
-
smallScrollbar: [{ type: HostBinding, args: ['class.co-small-scrollbar',] }]
|
|
3802
|
+
CatalogSearchBaseComponent.propDecorators = {
|
|
3803
|
+
createFrozenArticle: [{ type: Input }]
|
|
3828
3804
|
};
|
|
3829
3805
|
|
|
3830
3806
|
class ArticleBaseComponent {
|
|
@@ -3838,6 +3814,7 @@ class ArticleBaseComponent {
|
|
|
3838
3814
|
this._imageService = _imageService;
|
|
3839
3815
|
this._settingsService = _settingsService;
|
|
3840
3816
|
this.icons = IconEnum;
|
|
3817
|
+
this.createFrozenArticle = true;
|
|
3841
3818
|
this.isSelected = false;
|
|
3842
3819
|
this.isSmallModus = false;
|
|
3843
3820
|
this.hasMagnifierButton = false;
|
|
@@ -3892,9 +3869,15 @@ class ArticleBaseComponent {
|
|
|
3892
3869
|
handleAddArticleButtonClick(event) {
|
|
3893
3870
|
return __awaiter(this, void 0, void 0, function* () {
|
|
3894
3871
|
event.stopPropagation();
|
|
3895
|
-
|
|
3896
|
-
|
|
3897
|
-
|
|
3872
|
+
if (this.createFrozenArticle) {
|
|
3873
|
+
const json = yield this._getJSONFromArticleObject(this.article);
|
|
3874
|
+
this._appEventService.addArticleButtonClick.next(json);
|
|
3875
|
+
this.onAddArticleButtonClick.emit(json);
|
|
3876
|
+
}
|
|
3877
|
+
else {
|
|
3878
|
+
this._appEventService.addArticleButtonClick.next(this.article);
|
|
3879
|
+
this.onAddArticleButtonClick.emit(this.article);
|
|
3880
|
+
}
|
|
3898
3881
|
});
|
|
3899
3882
|
}
|
|
3900
3883
|
handleStockDetailsButtonClick(event) {
|
|
@@ -3974,6 +3957,7 @@ ArticleBaseComponent.propDecorators = {
|
|
|
3974
3957
|
article: [{ type: Input }],
|
|
3975
3958
|
showing: [{ type: Input }],
|
|
3976
3959
|
imageData: [{ type: Input }],
|
|
3960
|
+
createFrozenArticle: [{ type: Input }],
|
|
3977
3961
|
price: [{ type: Input }],
|
|
3978
3962
|
isSelected: [{ type: Input }],
|
|
3979
3963
|
isSmallModus: [{ type: Input }, { type: HostBinding, args: ['class.small-modus',] }],
|
|
@@ -4063,6 +4047,75 @@ CatalogArticleTileComponent.propDecorators = {
|
|
|
4063
4047
|
showClass: [{ type: HostBinding, args: ['class.co-catalog-article-tile',] }]
|
|
4064
4048
|
};
|
|
4065
4049
|
|
|
4050
|
+
class CatalogSearchResultTileComponent extends CatalogSearchBaseComponent {
|
|
4051
|
+
constructor() {
|
|
4052
|
+
super(...arguments);
|
|
4053
|
+
this.createFrozenArticle = true;
|
|
4054
|
+
this.onLookAtArticleButtonClick = new EventEmitter();
|
|
4055
|
+
this.onArButtonClick = new EventEmitter();
|
|
4056
|
+
this.onAddArticleButtonClick = new EventEmitter();
|
|
4057
|
+
this.onArticleClick = new EventEmitter();
|
|
4058
|
+
this.onStockDetailsClick = new EventEmitter();
|
|
4059
|
+
this.showClass = true;
|
|
4060
|
+
this.smallScrollbar = true;
|
|
4061
|
+
}
|
|
4062
|
+
set viewChildren(children) {
|
|
4063
|
+
if (children) {
|
|
4064
|
+
this.elements = children.toArray();
|
|
4065
|
+
}
|
|
4066
|
+
}
|
|
4067
|
+
}
|
|
4068
|
+
CatalogSearchResultTileComponent.decorators = [
|
|
4069
|
+
{ type: Component, args: [{
|
|
4070
|
+
selector: 'co-catalog-search-result-tile',
|
|
4071
|
+
template: `
|
|
4072
|
+
<div class="article-cards" visibilityObserverMaster>
|
|
4073
|
+
<ng-container *ngFor="let article of catalogSearchService.articles">
|
|
4074
|
+
<co-catalog-article-tile
|
|
4075
|
+
visibilityObserver
|
|
4076
|
+
#intersection="intersection"
|
|
4077
|
+
[observerEnabled]="!article.imageData"
|
|
4078
|
+
[createFrozenArticle]="createFrozenArticle"
|
|
4079
|
+
[showing]="intersection.isIntersecting"
|
|
4080
|
+
[article]="article"
|
|
4081
|
+
(onArticleClick)="onArticleClick.emit($event)"
|
|
4082
|
+
(onAddArticleButtonClick)="onAddArticleButtonClick.emit($event)"
|
|
4083
|
+
(onArButtonClick)="onArButtonClick.emit($event)"
|
|
4084
|
+
(onLookAtArticleButtonClick)="onLookAtArticleButtonClick.emit($event)"
|
|
4085
|
+
(onStockDetailsClick)="onStockDetailsClick.emit($event)"
|
|
4086
|
+
>
|
|
4087
|
+
</co-catalog-article-tile>
|
|
4088
|
+
</ng-container>
|
|
4089
|
+
</div>
|
|
4090
|
+
<co-pagination-bar *ngIf="catalogSearchService.articles?.length > 0"
|
|
4091
|
+
[currentPage]="catalogSearchService.currentPage"
|
|
4092
|
+
[itemsPerPage]="catalogSearchService.articlesPerPage"
|
|
4093
|
+
[totalItems]="catalogSearchService.resultCount"
|
|
4094
|
+
[previousLabel]="'PREVIOUS' | localize"
|
|
4095
|
+
[nextLabel]="'NEXT' | localize"
|
|
4096
|
+
[autoHide]="true"
|
|
4097
|
+
[directionLinks]="true"
|
|
4098
|
+
[paginationRange]="8"
|
|
4099
|
+
(previousClick)="onPreviousClick()"
|
|
4100
|
+
(nextClick)="onNextClick()"
|
|
4101
|
+
(pageClick)="onPageClick($event)">
|
|
4102
|
+
</co-pagination-bar>
|
|
4103
|
+
`,
|
|
4104
|
+
encapsulation: ViewEncapsulation.None
|
|
4105
|
+
},] }
|
|
4106
|
+
];
|
|
4107
|
+
CatalogSearchResultTileComponent.propDecorators = {
|
|
4108
|
+
viewChildren: [{ type: ViewChildren, args: [CatalogArticleTileComponent, { read: ElementRef },] }],
|
|
4109
|
+
createFrozenArticle: [{ type: Input }],
|
|
4110
|
+
onLookAtArticleButtonClick: [{ type: Output }],
|
|
4111
|
+
onArButtonClick: [{ type: Output }],
|
|
4112
|
+
onAddArticleButtonClick: [{ type: Output }],
|
|
4113
|
+
onArticleClick: [{ type: Output }],
|
|
4114
|
+
onStockDetailsClick: [{ type: Output }],
|
|
4115
|
+
showClass: [{ type: HostBinding, args: ['class.co-catalog-search-result-tile',] }],
|
|
4116
|
+
smallScrollbar: [{ type: HostBinding, args: ['class.co-small-scrollbar',] }]
|
|
4117
|
+
};
|
|
4118
|
+
|
|
4066
4119
|
class CatalogArticleTileModule {
|
|
4067
4120
|
}
|
|
4068
4121
|
CatalogArticleTileModule.decorators = [
|
|
@@ -4222,48 +4275,6 @@ CatalogSearchResultTileModule.decorators = [
|
|
|
4222
4275
|
},] }
|
|
4223
4276
|
];
|
|
4224
4277
|
|
|
4225
|
-
class CatalogSearchResultListComponent extends CatalogSearchBaseComponent {
|
|
4226
|
-
showClass() {
|
|
4227
|
-
return true;
|
|
4228
|
-
}
|
|
4229
|
-
}
|
|
4230
|
-
CatalogSearchResultListComponent.decorators = [
|
|
4231
|
-
{ type: Component, args: [{
|
|
4232
|
-
selector: 'co-catalog-search-result-list',
|
|
4233
|
-
template: `
|
|
4234
|
-
<div class="article-cards" visibilityObserverMaster>
|
|
4235
|
-
<ng-container *ngFor="let article of catalogSearchService.articles">
|
|
4236
|
-
<co-catalog-article-list
|
|
4237
|
-
visibilityObserver
|
|
4238
|
-
#intersection="intersection"
|
|
4239
|
-
[observerEnabled]="!article.imageData"
|
|
4240
|
-
[showing]="intersection.isIntersecting"
|
|
4241
|
-
[article]="article"
|
|
4242
|
-
>
|
|
4243
|
-
</co-catalog-article-list>
|
|
4244
|
-
</ng-container>
|
|
4245
|
-
</div>
|
|
4246
|
-
<co-pagination-bar *ngIf="catalogSearchService.articles?.length > 0"
|
|
4247
|
-
[currentPage]="catalogSearchService.currentPage"
|
|
4248
|
-
[itemsPerPage]="catalogSearchService.articlesPerPage"
|
|
4249
|
-
[totalItems]="catalogSearchService.resultCount"
|
|
4250
|
-
[previousLabel]="'PREVIOUS' | localize"
|
|
4251
|
-
[nextLabel]="'NEXT' | localize"
|
|
4252
|
-
[autoHide]="true"
|
|
4253
|
-
[directionLinks]="true"
|
|
4254
|
-
[paginationRange]="8"
|
|
4255
|
-
(previousClick)="onPreviousClick()"
|
|
4256
|
-
(nextClick)="onNextClick()"
|
|
4257
|
-
(pageClick)="onPageClick($event)">
|
|
4258
|
-
</co-pagination-bar>
|
|
4259
|
-
`,
|
|
4260
|
-
encapsulation: ViewEncapsulation.None
|
|
4261
|
-
},] }
|
|
4262
|
-
];
|
|
4263
|
-
CatalogSearchResultListComponent.propDecorators = {
|
|
4264
|
-
showClass: [{ type: HostBinding, args: ['class.co-catalog-search-result-list',] }]
|
|
4265
|
-
};
|
|
4266
|
-
|
|
4267
4278
|
class CatalogArticleListComponent extends ArticleBaseComponent {
|
|
4268
4279
|
showClass() {
|
|
4269
4280
|
return true;
|
|
@@ -4348,6 +4359,55 @@ CatalogArticleListComponent.propDecorators = {
|
|
|
4348
4359
|
showClass: [{ type: HostBinding, args: ['class.co-catalog-article-list',] }]
|
|
4349
4360
|
};
|
|
4350
4361
|
|
|
4362
|
+
class CatalogSearchResultListComponent extends CatalogSearchBaseComponent {
|
|
4363
|
+
set viewChildren(children) {
|
|
4364
|
+
if (children) {
|
|
4365
|
+
this.elements = children.toArray();
|
|
4366
|
+
}
|
|
4367
|
+
}
|
|
4368
|
+
showClass() {
|
|
4369
|
+
return true;
|
|
4370
|
+
}
|
|
4371
|
+
}
|
|
4372
|
+
CatalogSearchResultListComponent.decorators = [
|
|
4373
|
+
{ type: Component, args: [{
|
|
4374
|
+
selector: 'co-catalog-search-result-list',
|
|
4375
|
+
template: `
|
|
4376
|
+
<div class="article-cards" visibilityObserverMaster>
|
|
4377
|
+
<ng-container *ngFor="let article of catalogSearchService.articles">
|
|
4378
|
+
<co-catalog-article-list
|
|
4379
|
+
visibilityObserver
|
|
4380
|
+
#intersection="intersection"
|
|
4381
|
+
[observerEnabled]="!article.imageData"
|
|
4382
|
+
[createFrozenArticle]="createFrozenArticle"
|
|
4383
|
+
[showing]="intersection.isIntersecting"
|
|
4384
|
+
[article]="article"
|
|
4385
|
+
>
|
|
4386
|
+
</co-catalog-article-list>
|
|
4387
|
+
</ng-container>
|
|
4388
|
+
</div>
|
|
4389
|
+
<co-pagination-bar *ngIf="catalogSearchService.articles?.length > 0"
|
|
4390
|
+
[currentPage]="catalogSearchService.currentPage"
|
|
4391
|
+
[itemsPerPage]="catalogSearchService.articlesPerPage"
|
|
4392
|
+
[totalItems]="catalogSearchService.resultCount"
|
|
4393
|
+
[previousLabel]="'PREVIOUS' | localize"
|
|
4394
|
+
[nextLabel]="'NEXT' | localize"
|
|
4395
|
+
[autoHide]="true"
|
|
4396
|
+
[directionLinks]="true"
|
|
4397
|
+
[paginationRange]="8"
|
|
4398
|
+
(previousClick)="onPreviousClick()"
|
|
4399
|
+
(nextClick)="onNextClick()"
|
|
4400
|
+
(pageClick)="onPageClick($event)">
|
|
4401
|
+
</co-pagination-bar>
|
|
4402
|
+
`,
|
|
4403
|
+
encapsulation: ViewEncapsulation.None
|
|
4404
|
+
},] }
|
|
4405
|
+
];
|
|
4406
|
+
CatalogSearchResultListComponent.propDecorators = {
|
|
4407
|
+
viewChildren: [{ type: ViewChildren, args: [CatalogArticleListComponent, { read: ElementRef },] }],
|
|
4408
|
+
showClass: [{ type: HostBinding, args: ['class.co-catalog-search-result-list',] }]
|
|
4409
|
+
};
|
|
4410
|
+
|
|
4351
4411
|
class CatalogArticleListModule {
|
|
4352
4412
|
}
|
|
4353
4413
|
CatalogArticleListModule.decorators = [
|
|
@@ -4476,8 +4536,10 @@ class CatalogExternalSourceComponent {
|
|
|
4476
4536
|
return this._externalCatalogStartupInfo;
|
|
4477
4537
|
}
|
|
4478
4538
|
ngOnInit() {
|
|
4479
|
-
this._subs.push(this._appEventService.addArticleButtonClick.subscribe((
|
|
4480
|
-
|
|
4539
|
+
this._subs.push(this._appEventService.addArticleButtonClick.subscribe((article) => {
|
|
4540
|
+
if (!(article instanceof ArticleExtended)) {
|
|
4541
|
+
this.addArticleClick.next(article);
|
|
4542
|
+
}
|
|
4481
4543
|
}));
|
|
4482
4544
|
}
|
|
4483
4545
|
handleArticleClick(article) {
|