@colijnit/catalog 12.1.26 → 12.1.28
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 +27 -137
- package/bundles/colijnit-catalog.umd.js.map +1 -1
- package/colijnit-catalog.metadata.json +1 -1
- package/esm2015/lib/cache/cache-field.js +2 -2
- package/esm2015/lib/cache/parameter-cache-field.js +3 -3
- package/esm2015/lib/cache/service/select-multiple-cache.service.js +4 -4
- package/esm2015/lib/cache/service/select-multiple-parameterized-cache.service.js +4 -4
- package/esm2015/lib/cache/service/select-single-cache.service.js +3 -3
- package/esm2015/lib/catalog-version.js +3 -3
- package/esm2015/lib/component/catalog-article-tile/catalog-article-tile.component.js +3 -2
- package/esm2015/lib/component/catalog-external-sources/catalog-external-sources.component.js +6 -6
- package/esm2015/lib/component/catalog-navigation/catalog-navigation.component.js +12 -7
- package/esm2015/lib/component/catalog-navigation/catalog-navigation.module.js +4 -4
- package/esm2015/lib/component/catalog-search/catalog-search.component.js +3 -5
- package/esm2015/lib/pipe/localize.pipe.js +1 -1
- package/esm2015/lib/service/catalog-connector.service.js +1 -1
- package/esm2015/lib/service/catalog-options.service.js +1 -1
- package/esm2015/lib/service/catalog-search.service.js +9 -19
- package/esm2015/lib/service/catalog.service.js +3 -127
- package/esm2015/lib/service/dictionary.service.js +4 -4
- package/esm2015/lib/service/icon-cache.service.js +4 -4
- package/fesm2015/colijnit-catalog.js +33 -163
- package/fesm2015/colijnit-catalog.js.map +1 -1
- package/lib/cache/cache-field.d.ts +1 -1
- package/lib/cache/service/select-multiple-cache.service.d.ts +3 -3
- package/lib/cache/service/select-multiple-parameterized-cache.service.d.ts +5 -5
- package/lib/cache/service/select-single-cache.service.d.ts +4 -4
- package/lib/component/catalog-article-tile/style/_layout.scss +13 -8
- package/lib/component/catalog-article-tile/style/_material-definition.scss +1 -0
- package/lib/component/catalog-article-tile/style/_theme.scss +1 -0
- package/lib/component/catalog-categories/style/_layout.scss +3 -0
- package/lib/component/catalog-categories/style/_material-definition.scss +3 -0
- package/lib/component/catalog-external-sources/catalog-external-sources.component.d.ts +2 -1
- package/lib/component/catalog-external-sources/style/_layout.scss +13 -21
- package/lib/component/catalog-external-sources/style/_material-definition.scss +5 -4
- package/lib/component/catalog-external-sources/style/_theme.scss +3 -1
- package/lib/component/catalog-navigation/catalog-navigation.component.d.ts +3 -0
- package/lib/component/catalog-navigation/style/_layout.scss +8 -0
- package/lib/component/catalog-navigation/style/_material-definition.scss +8 -3
- package/lib/component/catalog-navigation/style/_theme.scss +3 -0
- package/lib/service/catalog-options.service.d.ts +1 -1
- package/lib/service/catalog-search.service.d.ts +1 -4
- package/lib/service/catalog.service.d.ts +0 -11
- package/lib/service/dictionary.service.d.ts +1 -1
- package/lib/service/icon-cache.service.d.ts +2 -2
- package/package.json +2 -2
- package/esm2015/lib/interface/order-by.interface.js +0 -2
- package/lib/interface/order-by.interface.d.ts +0 -4
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Injectable } from
|
|
2
|
-
import { IconSvg } from
|
|
3
|
-
import { DomSanitizer } from
|
|
1
|
+
import { Injectable } from '@angular/core';
|
|
2
|
+
import { IconSvg } from '../model/icon';
|
|
3
|
+
import { DomSanitizer } from '@angular/platform-browser';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
5
|
import * as i1 from "@angular/platform-browser";
|
|
6
6
|
export class IconCacheService {
|
|
@@ -37,4 +37,4 @@ IconCacheService.decorators = [
|
|
|
37
37
|
IconCacheService.ctorParameters = () => [
|
|
38
38
|
{ type: DomSanitizer }
|
|
39
39
|
];
|
|
40
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
40
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaWNvbi1jYWNoZS5zZXJ2aWNlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vcHJvamVjdHM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nM6IGFueTtcclxuXHJcbiAgICBjb25zdHJ1Y3Rvcihwcml2YXRlIF9zYW5pdGl6ZXI6IERvbVNhbml0aXplcikge1xyXG4gICAgICAgIHRoaXMuX2FsbEljb25zID0gSWNvblN2ZztcclxuICAgICAgICB0aGlzLnNldEljb25DYWNoZSgpO1xyXG4gICAgfVxyXG5cclxuICAgIHB1YmxpYyBnZXRJY29uKGljb25OYW1lOiBJY29uRW51bSk6IFNhZmVIdG1sIHtcclxuICAgICAgICByZXR1cm4gdGhpcy5faWNvbkNhY2hlW2ljb25OYW1lLnRvTG93ZXJDYXNlKCldO1xyXG4gICAgfVxyXG5cclxuICAgIHB1YmxpYyBzZXRJY29uQ2FjaGUoKTogdm9pZCB7XHJcbiAgICAgICAgZm9yIChjb25zdCBrZXkgaW4gdGhpcy5fYWxsSWNvbnMpIHtcclxuICAgICAgICAgICAgaWYgKHRoaXMuX2FsbEljb25zLmhhc093blByb3BlcnR5KGtleSkpIHtcclxuICAgICAgICAgICAgICAgIHRoaXMuX2ljb25DYWNoZVtrZXkudG9Mb3dlckNhc2UoKV0gPSB0aGlzLl9zYW5pdGl6ZXIuYnlwYXNzU2VjdXJpdHlUcnVzdEh0bWwodGhpcy5fYWxsSWNvbnNba2V5XSk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9XHJcbiAgICB9XHJcbn1cclxuIl19
|
|
@@ -29,8 +29,8 @@ class Version {
|
|
|
29
29
|
constructor() {
|
|
30
30
|
this.name = "@colijnit/catalog";
|
|
31
31
|
this.description = "iOne Catalog module based on Angular 12";
|
|
32
|
-
this.symVer = "12.1.
|
|
33
|
-
this.publishDate = "
|
|
32
|
+
this.symVer = "12.1.28";
|
|
33
|
+
this.publishDate = "21-4-2023 16:40:30";
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
36
|
|
|
@@ -1453,7 +1453,6 @@ class CatalogSearchService {
|
|
|
1453
1453
|
this._settingsService = _settingsService;
|
|
1454
1454
|
this._optionService = _optionService;
|
|
1455
1455
|
this.searchRequest = new ArticleExtendedRequest();
|
|
1456
|
-
this.previousSearchRequest = new ArticleExtendedRequest();
|
|
1457
1456
|
// public activeSearchViewMode: SearchViewMode = SearchViewMode.FullScreen;
|
|
1458
1457
|
// public activeSearchBarViewMode: SearchbarViewMode = SearchbarViewMode.Expanded;
|
|
1459
1458
|
this.showFilterSidebar = false;
|
|
@@ -1464,6 +1463,9 @@ class CatalogSearchService {
|
|
|
1464
1463
|
this._subs = [];
|
|
1465
1464
|
this._subs.push(this._optionService.parametersSet.subscribe((isSet) => {
|
|
1466
1465
|
if (isSet) {
|
|
1466
|
+
if (this._settingsService.settings.catalogParameters) {
|
|
1467
|
+
this.searchRequest = this._settingsService.settings.catalogParameters;
|
|
1468
|
+
}
|
|
1467
1469
|
if (this._settingsService.settings.options.searchOnStart) {
|
|
1468
1470
|
this.searchArticles();
|
|
1469
1471
|
}
|
|
@@ -1526,12 +1528,6 @@ class CatalogSearchService {
|
|
|
1526
1528
|
}
|
|
1527
1529
|
}
|
|
1528
1530
|
searchArticles(getFilters = true) {
|
|
1529
|
-
if (this._settingsService.settings.catalogParameters) {
|
|
1530
|
-
this.searchRequest.publicationCode = this._settingsService.settings.catalogParameters.publicationCode;
|
|
1531
|
-
}
|
|
1532
|
-
if (this.isNewGeneralSearch()) {
|
|
1533
|
-
this._currentPage = 1;
|
|
1534
|
-
}
|
|
1535
1531
|
const lowerBound = ((this.currentPage - 1) * this.articlesPerPage) + 1;
|
|
1536
1532
|
this.searchRequest.paging = new PagingParameters(lowerBound, lowerBound + this.articlesPerPage - 1, this.articlesPerPage);
|
|
1537
1533
|
this._catalogConnectorService.getArticlesForCatalog(this.searchRequest).then((result) => {
|
|
@@ -1542,23 +1538,17 @@ class CatalogSearchService {
|
|
|
1542
1538
|
this._filterService.getFilters(this.searchRequest);
|
|
1543
1539
|
}
|
|
1544
1540
|
});
|
|
1545
|
-
this.setPreviousSearchRequest();
|
|
1546
1541
|
}
|
|
1547
|
-
resetFilters() {
|
|
1548
|
-
this.setPreviousSearchRequest();
|
|
1542
|
+
resetFilters(search = true) {
|
|
1549
1543
|
this._resetRequest();
|
|
1550
|
-
this.
|
|
1551
|
-
|
|
1544
|
+
this.articles.length = 0;
|
|
1545
|
+
if (search) {
|
|
1546
|
+
this.searchArticles();
|
|
1547
|
+
}
|
|
1552
1548
|
}
|
|
1553
1549
|
_resetRequest() {
|
|
1554
1550
|
this.searchRequest = new ArticleExtendedRequest();
|
|
1555
1551
|
}
|
|
1556
|
-
setPreviousSearchRequest() {
|
|
1557
|
-
this.previousSearchRequest = Object.assign({}, this.searchRequest);
|
|
1558
|
-
}
|
|
1559
|
-
isNewGeneralSearch() {
|
|
1560
|
-
return this.previousSearchRequest && this.previousSearchRequest.general !== this.searchRequest.general;
|
|
1561
|
-
}
|
|
1562
1552
|
// public get fullscreen(): boolean {
|
|
1563
1553
|
// return this.activeSearchViewMode === SearchViewMode.FullScreen;
|
|
1564
1554
|
// }
|
|
@@ -1640,24 +1630,14 @@ class CatalogService {
|
|
|
1640
1630
|
// this.ensureDataListsLoaded();
|
|
1641
1631
|
this.articlesPerPage = this._settingsService.settings.options.maxItemsPerPage;
|
|
1642
1632
|
if (this._settingsService.settings.options.searchOnStart) {
|
|
1643
|
-
this.searchArticles();
|
|
1633
|
+
this._catalogSearchService.searchArticles();
|
|
1644
1634
|
}
|
|
1645
1635
|
}
|
|
1646
1636
|
})), this.optionsService.parametersSet.subscribe((set) => {
|
|
1647
1637
|
if (set) {
|
|
1648
1638
|
this.defaultOptions = this.optionsService.parameters;
|
|
1649
|
-
// this._createDefaultRequest();
|
|
1650
|
-
// if (this.optionsService.parameters.general && this._settingsService.settings.options.searchOnStart) {
|
|
1651
|
-
// this._setRequestParametersAndProps(null, null, this.optionsService.parameters.general.split(' '));
|
|
1652
|
-
// this.searchArticles();
|
|
1653
|
-
// }
|
|
1654
1639
|
}
|
|
1655
1640
|
}));
|
|
1656
|
-
/*
|
|
1657
|
-
this.doArticleSearchThrottledFunc = this.utils.getAsThrottledFunction(() => {
|
|
1658
|
-
return this.doSearchArticles();
|
|
1659
|
-
}, this.minMillisBetweenArticleSearches, this);
|
|
1660
|
-
*/
|
|
1661
1641
|
}
|
|
1662
1642
|
// public set filterText(value: string[]) {
|
|
1663
1643
|
// this._setRequestParametersAndProps(null, null, value);
|
|
@@ -1716,10 +1696,6 @@ class CatalogService {
|
|
|
1716
1696
|
get currentPage() {
|
|
1717
1697
|
return this._currentPage;
|
|
1718
1698
|
}
|
|
1719
|
-
set currentPage(value) {
|
|
1720
|
-
this._currentPage = value;
|
|
1721
|
-
this.doSearchArticles(false);
|
|
1722
|
-
}
|
|
1723
1699
|
ngOnDestroy() {
|
|
1724
1700
|
this._subs.forEach(s => s.unsubscribe());
|
|
1725
1701
|
}
|
|
@@ -1731,7 +1707,7 @@ class CatalogService {
|
|
|
1731
1707
|
}
|
|
1732
1708
|
getCategories() {
|
|
1733
1709
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1734
|
-
const categories = yield this.connector.getArticleCategories(this.
|
|
1710
|
+
const categories = yield this.connector.getArticleCategories(this.settingsService.settings.catalogParameters.publicationCode);
|
|
1735
1711
|
if (categories && categories.length > 0) {
|
|
1736
1712
|
for (let i = 0; i < categories.length; i++) {
|
|
1737
1713
|
let articleCategory = categories[i];
|
|
@@ -1756,120 +1732,10 @@ class CatalogService {
|
|
|
1756
1732
|
return this._imageService.getTurnoverGroupImage(group);
|
|
1757
1733
|
});
|
|
1758
1734
|
}
|
|
1759
|
-
// public filterOnCollection(collection: FilterItemViewmodel[]): void {
|
|
1760
|
-
// if (!collection || collection.length === 0) {
|
|
1761
|
-
// return;
|
|
1762
|
-
// }
|
|
1763
|
-
// let cleared: boolean = false;
|
|
1764
|
-
// let filterRange: string[] = [];
|
|
1765
|
-
// const searchFilterProp: string = this._filterService.getFilterItemMap(collection[0].filter.filterName);
|
|
1766
|
-
// if (searchFilterProp) {
|
|
1767
|
-
// collection.forEach((viewModel: FilterItemViewmodel) => {
|
|
1768
|
-
// if (!cleared) {
|
|
1769
|
-
// this.articleSearchFilters[searchFilterProp] = '';
|
|
1770
|
-
// cleared = true;
|
|
1771
|
-
// }
|
|
1772
|
-
// if (viewModel.checked) {
|
|
1773
|
-
// filterRange.push(`?='${viewModel.code}'`);
|
|
1774
|
-
// }
|
|
1775
|
-
// });
|
|
1776
|
-
// this.articleSearchFilters[searchFilterProp] = filterRange.join(',');
|
|
1777
|
-
// this.searchArticles();
|
|
1778
|
-
// }
|
|
1779
|
-
// }
|
|
1780
|
-
changeOrderBy(orderBy) {
|
|
1781
|
-
this._currentOrderBy = orderBy.id;
|
|
1782
|
-
this._sortArticleList();
|
|
1783
|
-
}
|
|
1784
|
-
searchArticles() {
|
|
1785
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
1786
|
-
if (!this._controllerInitialized) {
|
|
1787
|
-
return;
|
|
1788
|
-
}
|
|
1789
|
-
clearTimeout(this._searchTimer);
|
|
1790
|
-
this._searchTimer = setTimeout(() => {
|
|
1791
|
-
this.searchTextChanged.next(this._filterText);
|
|
1792
|
-
this.doArticleSearchThrottledFunc.call(this);
|
|
1793
|
-
}, 400);
|
|
1794
|
-
});
|
|
1795
|
-
}
|
|
1796
|
-
resetFilters() {
|
|
1797
|
-
// this._createDefaultRequest();
|
|
1798
|
-
// this.category = null;
|
|
1799
|
-
// this.turnoverGroup = null;
|
|
1800
|
-
// if (this.filterText !== null) {
|
|
1801
|
-
// this.filterText = this.filterText.slice();
|
|
1802
|
-
// }
|
|
1803
|
-
// this.onResetFilters.next();
|
|
1804
|
-
}
|
|
1805
1735
|
reset() {
|
|
1806
1736
|
this.showCatOrTurnoverGroupArticles = false;
|
|
1807
1737
|
this.showExternalSource = false;
|
|
1808
1738
|
}
|
|
1809
|
-
ensureDataListsLoaded() {
|
|
1810
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
1811
|
-
// this.externalSourceViewModels.length = 0;
|
|
1812
|
-
// this.iOne.getCatalogDefinitions().then(async (defs: CatalogDefinition[]) => {
|
|
1813
|
-
// for (let i = 0; i < defs.length; i++) {
|
|
1814
|
-
// this._imageService.getExternalSourceImage(defs[i]);
|
|
1815
|
-
// const viewModel: ExternalSourceViewmodel = new ExternalSourceViewmodel(
|
|
1816
|
-
// defs[i],
|
|
1817
|
-
// defs[i].externalSourceId ? await this.iOne.getExternalSource(defs[i].externalSourceId, false) : new ExternalSource()
|
|
1818
|
-
// )
|
|
1819
|
-
// this.externalSourceViewModels.push(viewModel);
|
|
1820
|
-
// }
|
|
1821
|
-
// });
|
|
1822
|
-
});
|
|
1823
|
-
}
|
|
1824
|
-
// POST: this.articlesOnShowcase contains all articles for given search parameters.
|
|
1825
|
-
doSearchArticles(getFilters = true) {
|
|
1826
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
1827
|
-
// const lowerBound: number = ((this.currentPage - 1) * this.articlesPerPage) + 1;
|
|
1828
|
-
// this.articleSearchFilters.paging = new PagingParameters(lowerBound, lowerBound + this.articlesPerPage - 1, this.articlesPerPage);
|
|
1829
|
-
// this.iOne.getArticlesForCatalog(this.articleSearchFilters, false).then((result: ArticlesSearchResult) => {
|
|
1830
|
-
// this.resultCount = result.count;
|
|
1831
|
-
// this.articlesOnShowcase = result.articles;
|
|
1832
|
-
// this.filteredArticlesOnShowcase = this.articlesOnShowcase.slice(0);
|
|
1833
|
-
// this._sortArticleList();
|
|
1834
|
-
// this.showExternalSource = false;
|
|
1835
|
-
// this.showIoneSource = false;
|
|
1836
|
-
// this.showCatOrTurnoverGroupArticles = true;
|
|
1837
|
-
// this.showPageChanged.next(this.currentPage);
|
|
1838
|
-
// })
|
|
1839
|
-
// if (getFilters) {
|
|
1840
|
-
// this._filterService.getFilters(this.articleSearchFilters);
|
|
1841
|
-
// }
|
|
1842
|
-
// // todo: get total count of result based on same request to build paging
|
|
1843
|
-
});
|
|
1844
|
-
}
|
|
1845
|
-
// public sortTurnoverGroups(categories: ArticleCategory[]): void {
|
|
1846
|
-
// }
|
|
1847
|
-
//
|
|
1848
|
-
_sortArticleList() {
|
|
1849
|
-
switch (this._currentOrderBy) {
|
|
1850
|
-
case 1:
|
|
1851
|
-
this._sortArticleListByArticleNr();
|
|
1852
|
-
break;
|
|
1853
|
-
case 2:
|
|
1854
|
-
this._sortArticleListByArticleName();
|
|
1855
|
-
break;
|
|
1856
|
-
}
|
|
1857
|
-
}
|
|
1858
|
-
_sortArticleListByArticleNr() {
|
|
1859
|
-
const newList = this.filteredArticlesOnShowcase.sort((a, b) => a.articleNumber > b.articleNumber ? 1 : -1);
|
|
1860
|
-
this.filteredArticlesOnShowcase = newList.slice();
|
|
1861
|
-
}
|
|
1862
|
-
_sortArticleListByArticleName() {
|
|
1863
|
-
const newList = this.filteredArticlesOnShowcase.sort((a, b) => {
|
|
1864
|
-
const first = a.name ? a.name : a.description;
|
|
1865
|
-
const second = b.name ? b.name : b.description;
|
|
1866
|
-
return first > second ? 1 : -1;
|
|
1867
|
-
});
|
|
1868
|
-
this.filteredArticlesOnShowcase = newList.slice();
|
|
1869
|
-
}
|
|
1870
|
-
_createDefaultRequest() {
|
|
1871
|
-
this.articleSearchFilters = Object.assign({}, this.defaultOptions);
|
|
1872
|
-
}
|
|
1873
1739
|
}
|
|
1874
1740
|
CatalogService.ɵprov = i0.ɵɵdefineInjectable({ factory: function CatalogService_Factory() { return new CatalogService(i0.ɵɵinject(CatalogConnectorService), i0.ɵɵinject(CatalogConnectorAdapterService), i0.ɵɵinject(CatalogSettingsService), i0.ɵɵinject(CatalogOptionsService), i0.ɵɵinject(CatalogImageService), i0.ɵɵinject(CatalogSettingsService), i0.ɵɵinject(CatalogFilterService), i0.ɵɵinject(CatalogSearchService)); }, token: CatalogService, providedIn: "root" });
|
|
1875
1741
|
CatalogService.decorators = [
|
|
@@ -2383,6 +2249,7 @@ class CatalogNavigationComponent {
|
|
|
2383
2249
|
this.homeClick = new EventEmitter();
|
|
2384
2250
|
this.categoryClick = new EventEmitter();
|
|
2385
2251
|
this.turnoverGroupClick = new EventEmitter();
|
|
2252
|
+
this.externalSourceClick = new EventEmitter();
|
|
2386
2253
|
this.minified = false;
|
|
2387
2254
|
this.showClass = true;
|
|
2388
2255
|
this.mobileMenuToggle = false;
|
|
@@ -2440,6 +2307,9 @@ class CatalogNavigationComponent {
|
|
|
2440
2307
|
handleTurnoverGroupClick(event, turnovergroupNr) {
|
|
2441
2308
|
this.turnoverGroupClick.emit(turnovergroupNr);
|
|
2442
2309
|
}
|
|
2310
|
+
handleExternalSourceClick(externalSource) {
|
|
2311
|
+
this.externalSourceClick.emit(externalSource);
|
|
2312
|
+
}
|
|
2443
2313
|
onToggleMobileMenu() {
|
|
2444
2314
|
this.mobileMenuToggle = !this.mobileMenuToggle;
|
|
2445
2315
|
}
|
|
@@ -2503,7 +2373,7 @@ CatalogNavigationComponent.decorators = [
|
|
|
2503
2373
|
template: `
|
|
2504
2374
|
<div class="navigation-wrapper" [class.minified]="minified">
|
|
2505
2375
|
<div class="navigation-item-wrapper">
|
|
2506
|
-
<a class="
|
|
2376
|
+
<a class="home-link" (click)="handleHomeClick($event)" [textContent]="homeLabel"></a>
|
|
2507
2377
|
</div>
|
|
2508
2378
|
<div class="navigation-item-wrapper" [class.active]="mobileMenuToggle" (click)="onToggleMobileMenu()"
|
|
2509
2379
|
(mouseover)="handleShowCollectionOverlay()"
|
|
@@ -2511,11 +2381,11 @@ CatalogNavigationComponent.decorators = [
|
|
|
2511
2381
|
overlayParent #collectionParentForOverlay="overlayParent">
|
|
2512
2382
|
<co-icon class="hamburger-icon" [iconData]="iconCache.getIcon(icons.Hamburger)"></co-icon>
|
|
2513
2383
|
<span [textContent]="collectionLabel"></span>
|
|
2514
|
-
<div class="navigation-overlay-wrapper" [overlay]="collectionParentForOverlay" *ngIf="showCollectionOverlay" @showHideOverlay>
|
|
2384
|
+
<div class="navigation-overlay-wrapper" [overlay]="collectionParentForOverlay" [keepInView]="true" *ngIf="showCollectionOverlay" @showHideOverlay>
|
|
2515
2385
|
<div class="navigation-category-column-wrapper" *ngFor="let category of categories">
|
|
2516
|
-
<div class="navigation-category" [textContent]="category.category"></div>
|
|
2386
|
+
<div class="navigation-category" [textContent]="category.category" (click)="handleCategoryClick($event, category.category)"></div>
|
|
2517
2387
|
<div class="navigation-turnovergroup-wrapper">
|
|
2518
|
-
<div class="navigation-turnovergroup" *ngFor="let turnoverGroup of category.turnoverGroups" [textContent]="turnoverGroup.description"></div>
|
|
2388
|
+
<div class="navigation-turnovergroup" *ngFor="let turnoverGroup of category.turnoverGroups" [textContent]="turnoverGroup.description" (click)="handleTurnoverGroupClick($event, turnoverGroup.turnovergroupNr)"></div>
|
|
2519
2389
|
</div>
|
|
2520
2390
|
</div>
|
|
2521
2391
|
</div>
|
|
@@ -2526,8 +2396,8 @@ CatalogNavigationComponent.decorators = [
|
|
|
2526
2396
|
overlayParent #externalParentForOverlay="overlayParent">
|
|
2527
2397
|
<co-icon class="hamburger-icon" [iconData]="iconCache.getIcon(icons.Ar)"></co-icon>
|
|
2528
2398
|
<span [textContent]="externalSourcesLabel"></span>
|
|
2529
|
-
<div class="navigation-overlay-wrapper" [overlay]="externalParentForOverlay" @showHideOverlay>
|
|
2530
|
-
<co-catalog-external-sources></co-catalog-external-sources>
|
|
2399
|
+
<div class="navigation-overlay-wrapper" [overlay]="externalParentForOverlay" [keepInView]="true" *ngIf="showExternalOverlay" @showHideOverlay>
|
|
2400
|
+
<co-catalog-external-sources (externalSourceClick)="handleExternalSourceClick($event)"></co-catalog-external-sources>
|
|
2531
2401
|
</div>
|
|
2532
2402
|
</div>
|
|
2533
2403
|
</div>
|
|
@@ -2555,6 +2425,7 @@ CatalogNavigationComponent.propDecorators = {
|
|
|
2555
2425
|
homeClick: [{ type: Output }],
|
|
2556
2426
|
categoryClick: [{ type: Output }],
|
|
2557
2427
|
turnoverGroupClick: [{ type: Output }],
|
|
2428
|
+
externalSourceClick: [{ type: Output }],
|
|
2558
2429
|
minified: [{ type: Input }],
|
|
2559
2430
|
showClass: [{ type: HostBinding, args: ['class.co-catalog-navigation',] }]
|
|
2560
2431
|
};
|
|
@@ -2570,6 +2441,7 @@ class CatalogExternalSourcesComponent {
|
|
|
2570
2441
|
constructor(_catalogConnectorService, _imageService) {
|
|
2571
2442
|
this._catalogConnectorService = _catalogConnectorService;
|
|
2572
2443
|
this._imageService = _imageService;
|
|
2444
|
+
this.externalSourceClick = new EventEmitter();
|
|
2573
2445
|
this.externalSourceViewModels = [];
|
|
2574
2446
|
}
|
|
2575
2447
|
showClass() {
|
|
@@ -2592,11 +2464,9 @@ CatalogExternalSourcesComponent.decorators = [
|
|
|
2592
2464
|
template: `
|
|
2593
2465
|
<ng-container *ngIf="externalSourceViewModels && externalSourceViewModels.length > 0">
|
|
2594
2466
|
<div class="catalog-external-sources-wrapper">
|
|
2595
|
-
<div class="external-source-item" *ngFor="let externalSourceViewModel of externalSourceViewModels">
|
|
2467
|
+
<div class="external-source-item" *ngFor="let externalSourceViewModel of externalSourceViewModels" (click)="externalSourceClick.emit(externalSourceViewModel)">
|
|
2468
|
+
<div class="external-source-description" [textContent]="externalSourceViewModel.catalogDefinition.name"></div>
|
|
2596
2469
|
<co-image [source]="externalSourceViewModel.catalogDefinition.imageData"></co-image>
|
|
2597
|
-
<div class="external-source-description">
|
|
2598
|
-
<co-responsive-text [text]="externalSourceViewModel.catalogDefinition.name | localize"></co-responsive-text>
|
|
2599
|
-
</div>
|
|
2600
2470
|
</div>
|
|
2601
2471
|
</div>
|
|
2602
2472
|
</ng-container>
|
|
@@ -2609,6 +2479,7 @@ CatalogExternalSourcesComponent.ctorParameters = () => [
|
|
|
2609
2479
|
{ type: CatalogImageService }
|
|
2610
2480
|
];
|
|
2611
2481
|
CatalogExternalSourcesComponent.propDecorators = {
|
|
2482
|
+
externalSourceClick: [{ type: Output }],
|
|
2612
2483
|
showClass: [{ type: HostBinding, args: ['class.co-catalog-external-sources',] }]
|
|
2613
2484
|
};
|
|
2614
2485
|
|
|
@@ -2639,8 +2510,8 @@ CatalogNavigationModule.decorators = [
|
|
|
2639
2510
|
CommonModule,
|
|
2640
2511
|
IconModule,
|
|
2641
2512
|
CatalogFilterModule,
|
|
2642
|
-
|
|
2643
|
-
|
|
2513
|
+
CatalogExternalSourcesModule,
|
|
2514
|
+
OverlayModule
|
|
2644
2515
|
],
|
|
2645
2516
|
declarations: [
|
|
2646
2517
|
CatalogNavigationComponent
|
|
@@ -2657,7 +2528,7 @@ class CatalogSearchComponent {
|
|
|
2657
2528
|
this._catalogEventService = _catalogEventService;
|
|
2658
2529
|
this.showNavigation = false;
|
|
2659
2530
|
this.showFilter = false;
|
|
2660
|
-
this.showViewModes =
|
|
2531
|
+
this.showViewModes = true;
|
|
2661
2532
|
this.onLookAtArticleButtonClick = new EventEmitter();
|
|
2662
2533
|
this.onArButtonClick = new EventEmitter();
|
|
2663
2534
|
this.onAddArticleButtonClick = new EventEmitter();
|
|
@@ -2697,7 +2568,6 @@ CatalogSearchComponent.decorators = [
|
|
|
2697
2568
|
{ type: Component, args: [{
|
|
2698
2569
|
selector: 'co-catalog-search',
|
|
2699
2570
|
template: `
|
|
2700
|
-
<co-catalog-navigation *ngIf="showNavigation"></co-catalog-navigation>
|
|
2701
2571
|
<div class="catalog-search-wrapper">
|
|
2702
2572
|
<ng-container *ngIf="showFilter">
|
|
2703
2573
|
<div class="filter-content">
|
|
@@ -2716,9 +2586,8 @@ CatalogSearchComponent.decorators = [
|
|
|
2716
2586
|
<button (click)="mode = 'list'">list</button>
|
|
2717
2587
|
<button (click)="mode = 'grid'">grid</button>
|
|
2718
2588
|
</ng-container>
|
|
2719
|
-
|
|
2589
|
+
<co-catalog-navigation *ngIf="showNavigation" (categoryClick)="handleCategoryClick($event)" (turnoverGroupClick)="handleTurnoverGroupClick($event)"></co-catalog-navigation>
|
|
2720
2590
|
<co-catalog-categories (categoryClick)="handleCategoryClick($event)" (turnoverGroupClick)="handleTurnoverGroupClick($event)"></co-catalog-categories>
|
|
2721
|
-
-->
|
|
2722
2591
|
<div class="search-content">
|
|
2723
2592
|
<ng-container *ngIf="mode === 'tile'">
|
|
2724
2593
|
<co-catalog-search-result-tile></co-catalog-search-result-tile>
|
|
@@ -3056,7 +2925,8 @@ CatalogArticleTileComponent.decorators = [
|
|
|
3056
2925
|
-->
|
|
3057
2926
|
<div class="main-top">
|
|
3058
2927
|
<div *ngIf="!!turnover" class="turnover" [innerText]="removeHtmlTags(turnover)"></div>
|
|
3059
|
-
<div
|
|
2928
|
+
<div class="name" [innerText]="removeHtmlTags(article.name)"></div>
|
|
2929
|
+
<div class="description" [innerText]="removeHtmlTags(article.description)"></div>
|
|
3060
2930
|
</div>
|
|
3061
2931
|
<div class="main-bottom">
|
|
3062
2932
|
<div class="main-bottom-left">
|