@colijnit/catalog 12.1.28 → 12.1.30
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 +70 -33
- package/bundles/colijnit-catalog.umd.js.map +1 -1
- package/colijnit-catalog.d.ts +12 -13
- package/colijnit-catalog.metadata.json +1 -1
- package/esm2015/colijnit-catalog.js +13 -14
- package/esm2015/lib/catalog-version.js +3 -3
- package/esm2015/lib/component/base/article-base.component.js +7 -1
- package/esm2015/lib/component/catalog-search/catalog-search.component.js +5 -3
- package/esm2015/lib/service/catalog-filter.service.js +24 -11
- package/esm2015/lib/service/catalog.service.js +6 -6
- package/esm2015/public_api.js +2 -1
- package/fesm2015/colijnit-catalog.js +41 -20
- package/fesm2015/colijnit-catalog.js.map +1 -1
- package/lib/component/catalog-search/catalog-search.component.d.ts +1 -0
- package/lib/service/catalog-filter.service.d.ts +2 -0
- package/lib/service/catalog.service.d.ts +1 -1
- package/package.json +1 -1
- package/public_api.d.ts +1 -0
|
@@ -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.30";
|
|
33
|
+
this.publishDate = "29-4-2023 10:53:53";
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
36
|
|
|
@@ -1388,43 +1388,43 @@ class CatalogFilterService {
|
|
|
1388
1388
|
const filterProms = [];
|
|
1389
1389
|
filterProms.push(this._iOneController.getCatalogFilter(filters).then((filter) => {
|
|
1390
1390
|
if (filter.selectionDTOS && filter.selectionDTOS.length > 0) {
|
|
1391
|
-
newFilters.push(
|
|
1391
|
+
newFilters.push(this.createNewFiltersAndCopySelections(filter, 'Catalog'));
|
|
1392
1392
|
}
|
|
1393
1393
|
}), this._iOneController.getArticleGroupsFilter(filters).then((filter) => {
|
|
1394
1394
|
if (filter.selectionDTOS && filter.selectionDTOS.length > 0) {
|
|
1395
|
-
newFilters.push(
|
|
1395
|
+
newFilters.push(this.createNewFiltersAndCopySelections(filter, 'Product group'));
|
|
1396
1396
|
}
|
|
1397
1397
|
}), this._iOneController.getAtmosphereFilter(filters).then((filter) => {
|
|
1398
1398
|
if (filter.selectionDTOS && filter.selectionDTOS.length > 0) {
|
|
1399
|
-
newFilters.push(
|
|
1399
|
+
newFilters.push(this.createNewFiltersAndCopySelections(filter, 'Atmosphere'));
|
|
1400
1400
|
}
|
|
1401
1401
|
}), this._iOneController.getColorFilter(filters).then((filter) => {
|
|
1402
1402
|
if (filter.selectionDTOS && filter.selectionDTOS.length > 0) {
|
|
1403
|
-
newFilters.push(
|
|
1403
|
+
newFilters.push(this.createNewFiltersAndCopySelections(filter, 'Colour'));
|
|
1404
1404
|
}
|
|
1405
1405
|
}), this._iOneController.getConceptFilter(filters).then((filter) => {
|
|
1406
1406
|
if (filter.selectionDTOS && filter.selectionDTOS.length > 0) {
|
|
1407
|
-
newFilters.push(
|
|
1407
|
+
newFilters.push(this.createNewFiltersAndCopySelections(filter, 'Concept'));
|
|
1408
1408
|
}
|
|
1409
1409
|
}), this._iOneController.getDesignFilter(filters).then((filter) => {
|
|
1410
1410
|
if (filter.selectionDTOS && filter.selectionDTOS.length > 0) {
|
|
1411
|
-
newFilters.push(
|
|
1411
|
+
newFilters.push(this.createNewFiltersAndCopySelections(filter, 'Design'));
|
|
1412
1412
|
}
|
|
1413
1413
|
}), this._iOneController.getMainArticleFilter(filters).then((filter) => {
|
|
1414
1414
|
if (filter.selectionDTOS && filter.selectionDTOS.length > 0) {
|
|
1415
|
-
newFilters.push(
|
|
1415
|
+
newFilters.push(this.createNewFiltersAndCopySelections(filter, 'Main article'));
|
|
1416
1416
|
}
|
|
1417
1417
|
}), this._iOneController.getMaterialFilter(filters).then((filter) => {
|
|
1418
1418
|
if (filter.selectionDTOS && filter.selectionDTOS.length > 0) {
|
|
1419
|
-
newFilters.push(
|
|
1419
|
+
newFilters.push(this.createNewFiltersAndCopySelections(filter, 'Material'));
|
|
1420
1420
|
}
|
|
1421
1421
|
}), this._iOneController.getTagsFilter(filters).then((filter) => {
|
|
1422
1422
|
if (filter.selectionDTOS && filter.selectionDTOS.length > 0) {
|
|
1423
|
-
newFilters.push(
|
|
1423
|
+
newFilters.push(this.createNewFiltersAndCopySelections(filter, 'Tag'));
|
|
1424
1424
|
}
|
|
1425
1425
|
}), this._iOneController.getTurnoverGroupFilter(filters).then((filter) => {
|
|
1426
1426
|
if (filter.selectionDTOS && filter.selectionDTOS.length > 0) {
|
|
1427
|
-
newFilters.push(
|
|
1427
|
+
newFilters.push(this.createNewFiltersAndCopySelections(filter, 'Turnover group'));
|
|
1428
1428
|
}
|
|
1429
1429
|
}));
|
|
1430
1430
|
Promise.all(filterProms).then(() => {
|
|
@@ -1432,6 +1432,19 @@ class CatalogFilterService {
|
|
|
1432
1432
|
this.filters = newFilters;
|
|
1433
1433
|
});
|
|
1434
1434
|
}
|
|
1435
|
+
createNewFiltersAndCopySelections(filter, key) {
|
|
1436
|
+
let newModel = new FilterViewmodel(filter);
|
|
1437
|
+
let oldModel = this.filters.find(element => element.filterName === key);
|
|
1438
|
+
if (oldModel) {
|
|
1439
|
+
for (const oldFilter of oldModel.filterItems) {
|
|
1440
|
+
let newFilter = newModel.filterItems.find(element => element.code === oldFilter.code);
|
|
1441
|
+
if (newFilter) {
|
|
1442
|
+
newFilter.checked = oldFilter.checked;
|
|
1443
|
+
}
|
|
1444
|
+
}
|
|
1445
|
+
}
|
|
1446
|
+
return newModel;
|
|
1447
|
+
}
|
|
1435
1448
|
getFilterItemMap(key) {
|
|
1436
1449
|
return this.filterItemMap.get(key);
|
|
1437
1450
|
}
|
|
@@ -1629,9 +1642,9 @@ class CatalogService {
|
|
|
1629
1642
|
this._controllerInitialized = true;
|
|
1630
1643
|
// this.ensureDataListsLoaded();
|
|
1631
1644
|
this.articlesPerPage = this._settingsService.settings.options.maxItemsPerPage;
|
|
1632
|
-
if (this._settingsService.settings.options.searchOnStart) {
|
|
1633
|
-
|
|
1634
|
-
}
|
|
1645
|
+
// if (this._settingsService.settings.options.searchOnStart) {
|
|
1646
|
+
// this._catalogSearchService.searchArticles();
|
|
1647
|
+
// }
|
|
1635
1648
|
}
|
|
1636
1649
|
})), this.optionsService.parametersSet.subscribe((set) => {
|
|
1637
1650
|
if (set) {
|
|
@@ -1699,10 +1712,10 @@ class CatalogService {
|
|
|
1699
1712
|
ngOnDestroy() {
|
|
1700
1713
|
this._subs.forEach(s => s.unsubscribe());
|
|
1701
1714
|
}
|
|
1702
|
-
init(settings) {
|
|
1715
|
+
init(settings, forceReload = false) {
|
|
1703
1716
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1704
1717
|
yield this.settingsService.initializeSettings(settings);
|
|
1705
|
-
yield this.connector.initConnector(this.settingsService.settings);
|
|
1718
|
+
yield this.connector.initConnector(this.settingsService.settings, forceReload);
|
|
1706
1719
|
});
|
|
1707
1720
|
}
|
|
1708
1721
|
getCategories() {
|
|
@@ -2527,8 +2540,9 @@ class CatalogSearchComponent {
|
|
|
2527
2540
|
this._catalogSearchService = _catalogSearchService;
|
|
2528
2541
|
this._catalogEventService = _catalogEventService;
|
|
2529
2542
|
this.showNavigation = false;
|
|
2543
|
+
this.showLandingPage = false;
|
|
2530
2544
|
this.showFilter = false;
|
|
2531
|
-
this.showViewModes =
|
|
2545
|
+
this.showViewModes = false;
|
|
2532
2546
|
this.onLookAtArticleButtonClick = new EventEmitter();
|
|
2533
2547
|
this.onArButtonClick = new EventEmitter();
|
|
2534
2548
|
this.onAddArticleButtonClick = new EventEmitter();
|
|
@@ -2587,7 +2601,7 @@ CatalogSearchComponent.decorators = [
|
|
|
2587
2601
|
<button (click)="mode = 'grid'">grid</button>
|
|
2588
2602
|
</ng-container>
|
|
2589
2603
|
<co-catalog-navigation *ngIf="showNavigation" (categoryClick)="handleCategoryClick($event)" (turnoverGroupClick)="handleTurnoverGroupClick($event)"></co-catalog-navigation>
|
|
2590
|
-
<co-catalog-categories (categoryClick)="handleCategoryClick($event)" (turnoverGroupClick)="handleTurnoverGroupClick($event)"></co-catalog-categories>
|
|
2604
|
+
<co-catalog-categories *ngIf="showLandingPage" (categoryClick)="handleCategoryClick($event)" (turnoverGroupClick)="handleTurnoverGroupClick($event)"></co-catalog-categories>
|
|
2591
2605
|
<div class="search-content">
|
|
2592
2606
|
<ng-container *ngIf="mode === 'tile'">
|
|
2593
2607
|
<co-catalog-search-result-tile></co-catalog-search-result-tile>
|
|
@@ -2613,6 +2627,7 @@ CatalogSearchComponent.ctorParameters = () => [
|
|
|
2613
2627
|
];
|
|
2614
2628
|
CatalogSearchComponent.propDecorators = {
|
|
2615
2629
|
showNavigation: [{ type: Input }],
|
|
2630
|
+
showLandingPage: [{ type: Input }],
|
|
2616
2631
|
showFilter: [{ type: Input }],
|
|
2617
2632
|
showViewModes: [{ type: Input }],
|
|
2618
2633
|
onLookAtArticleButtonClick: [{ type: Output }],
|
|
@@ -2835,11 +2850,17 @@ class ArticleBaseComponent {
|
|
|
2835
2850
|
this.onArButtonClick.emit(this.article);
|
|
2836
2851
|
}
|
|
2837
2852
|
removeHtmlTags(desc) {
|
|
2853
|
+
if (!desc) {
|
|
2854
|
+
return "";
|
|
2855
|
+
}
|
|
2838
2856
|
desc = desc.replace(/\r?\n|\r/, '');
|
|
2839
2857
|
return desc;
|
|
2840
2858
|
}
|
|
2841
2859
|
_getJSONFromArticleObject(article) {
|
|
2842
2860
|
return __awaiter(this, void 0, void 0, function* () {
|
|
2861
|
+
if (!article) {
|
|
2862
|
+
return "";
|
|
2863
|
+
}
|
|
2843
2864
|
return yield this._iOne.getJsonArticleFlatTree(article.goodId, article.goodType, 1);
|
|
2844
2865
|
});
|
|
2845
2866
|
}
|
|
@@ -3391,5 +3412,5 @@ CatalogExternalSourceModule.decorators = [
|
|
|
3391
3412
|
* Generated bundle index. Do not edit.
|
|
3392
3413
|
*/
|
|
3393
3414
|
|
|
3394
|
-
export { CatalogArticleListModule, CatalogArticleTileModule, CatalogCategoriesModule, CatalogExternalSourceModule, CatalogExternalSourcesModule, CatalogFilterModule, CatalogNavigationModule, CatalogSearchHeaderModule, CatalogSearchModule, CatalogSearchResultListModule, CatalogSearchResultTileModule, CatalogSearchService, CatalogService, Version, CatalogFilterComponent as ɵa, CatalogFilterService as ɵb,
|
|
3415
|
+
export { CatalogArticleListModule, CatalogArticleTileModule, CatalogCategoriesModule, CatalogEventService, CatalogExternalSourceModule, CatalogExternalSourcesModule, CatalogFilterModule, CatalogNavigationModule, CatalogSearchHeaderModule, CatalogSearchModule, CatalogSearchResultListModule, CatalogSearchResultTileModule, CatalogSearchService, CatalogService, Version, CatalogFilterComponent as ɵa, CatalogFilterService as ɵb, VisibilityObserverDirective as ɵba, CatalogSearchResultTileComponent as ɵbb, CatalogSearchBaseComponent as ɵbc, CatalogArticleListComponent as ɵbd, CatalogSearchResultListComponent as ɵbe, CatalogSearchComponent as ɵbf, CatalogExternalSourceComponent as ɵbg, CatalogConnectorService as ɵc, CatalogConnectorAdapterService as ɵd, SelectSingleCacheService as ɵe, BusinessObjectCacheManagerService as ɵf, SelectMultipleCacheService as ɵg, CacheField as ɵh, SelectMultipleParameterizedCacheService as ɵi, SelectSingleParameterizedCacheService as ɵj, CatalogSettingsService as ɵk, DictionaryService as ɵl, CatalogOptionsService as ɵm, IconCacheService as ɵn, LocalizePipe as ɵo, ResponsiveTextModule as ɵp, ResponsiveTextComponent as ɵq, CatalogCategoriesComponent as ɵr, CatalogImageService as ɵs, CatalogExternalSourcesComponent as ɵt, CatalogNavigationComponent as ɵu, CatalogSearchHeaderComponent as ɵv, CatalogArticleTileComponent as ɵw, ArticleBaseComponent as ɵx, VisibilityObserverModule as ɵy, VisibilityObserverMasterDirective as ɵz };
|
|
3395
3416
|
//# sourceMappingURL=colijnit-catalog.js.map
|