@colijnit/catalog 12.1.25 → 12.1.26
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/README.md +10 -14
- package/bundles/colijnit-catalog.umd.js +2290 -1709
- package/bundles/colijnit-catalog.umd.js.map +1 -1
- package/colijnit-catalog.d.ts +34 -33
- package/colijnit-catalog.metadata.json +1 -1
- package/esm2015/colijnit-catalog.js +35 -34
- package/esm2015/lib/cache/cache-field.js +75 -0
- package/esm2015/lib/cache/parameter-cache-field.js +54 -0
- package/esm2015/lib/cache/service/business-object-cache-manager.service.js +150 -0
- package/esm2015/lib/cache/service/select-multiple-cache.service.js +38 -0
- package/esm2015/lib/cache/service/select-multiple-parameterized-cache.service.js +47 -0
- package/esm2015/lib/cache/service/select-single-cache.service.js +30 -0
- package/esm2015/lib/cache/service/select-single-parameterized-cache.service.js +47 -0
- package/esm2015/lib/catalog-version.js +10 -0
- package/esm2015/lib/component/base/article-base.component.js +152 -0
- package/esm2015/lib/component/base/catalog-search-base.component.js +23 -0
- package/esm2015/lib/component/catalog-article-list/catalog-article-list.component.js +86 -0
- package/esm2015/lib/component/catalog-article-list/catalog-article-list.module.js +26 -0
- package/esm2015/lib/component/catalog-article-tile/catalog-article-tile.component.js +75 -0
- package/esm2015/lib/component/catalog-article-tile/catalog-article-tile.module.js +27 -0
- package/esm2015/lib/component/catalog-categories/catalog-categories.component.js +92 -0
- package/esm2015/lib/component/catalog-categories/catalog-categories.module.js +26 -0
- package/esm2015/lib/component/catalog-external-source/catalog-external-source.component.js +57 -0
- package/esm2015/lib/component/catalog-external-source/catalog-external-source.module.js +19 -0
- package/esm2015/lib/component/catalog-external-sources/catalog-external-sources.component.js +52 -0
- package/esm2015/lib/component/catalog-external-sources/catalog-external-sources.module.js +25 -0
- package/esm2015/lib/component/catalog-filter/catalog-filter.component.js +190 -0
- package/esm2015/lib/component/catalog-filter/catalog-filter.module.js +29 -0
- package/esm2015/lib/component/catalog-navigation/catalog-navigation.component.js +200 -0
- package/esm2015/lib/component/catalog-navigation/catalog-navigation.module.js +27 -0
- package/esm2015/lib/component/catalog-search/catalog-search.component.js +106 -0
- package/esm2015/lib/component/catalog-search/catalog-search.module.js +33 -0
- package/esm2015/lib/component/catalog-search-header/catalog-search-header.component.js +36 -0
- package/esm2015/lib/component/catalog-search-header/catalog-search-header.module.js +21 -0
- package/esm2015/lib/component/catalog-search-result-list/catalog-search-result-list.component.js +44 -0
- package/esm2015/lib/component/catalog-search-result-list/catalog-search-result-list.module.js +27 -0
- package/esm2015/lib/component/catalog-search-result-tile/catalog-search-result-tile.component.js +62 -0
- package/esm2015/lib/component/catalog-search-result-tile/catalog-search-result-tile.module.js +27 -0
- package/esm2015/lib/component/responsive-text/responsive-text.component.js +24 -0
- package/esm2015/lib/component/responsive-text/responsive-text.module.js +19 -0
- package/esm2015/lib/directive/visibility-observer-master.directive.js +49 -0
- package/esm2015/lib/directive/visibility-observer.directive.js +55 -0
- package/esm2015/lib/directive/visibility-observer.module.js +18 -0
- package/esm2015/lib/enum/icon.enum.js +25 -0
- package/esm2015/lib/enum/language-code.enum.js +8 -0
- package/esm2015/lib/interface/order-by.interface.js +2 -0
- package/esm2015/lib/model/articles-search-result.js +3 -0
- package/esm2015/lib/model/external-source-viewmodel.js +7 -0
- package/esm2015/lib/model/filter-item.viewmodel.js +10 -0
- package/esm2015/lib/model/filter-viewmodel.js +12 -0
- package/esm2015/lib/model/icon.js +24 -0
- package/esm2015/lib/model/settings-options.js +20 -0
- package/esm2015/lib/model/settings.js +10 -0
- package/esm2015/lib/pipe/localize.pipe.js +27 -0
- package/esm2015/lib/service/catalog-connector-adapter.service.js +332 -0
- package/esm2015/lib/service/catalog-connector.service.js +142 -0
- package/esm2015/lib/service/catalog-event.service.js +19 -0
- package/esm2015/lib/service/catalog-filter.service.js +91 -0
- package/esm2015/lib/service/catalog-image.service.js +124 -0
- package/esm2015/lib/service/catalog-options.service.js +92 -0
- package/esm2015/lib/service/catalog-search.service.js +167 -0
- package/esm2015/lib/service/catalog-settings.service.js +111 -0
- package/esm2015/lib/service/catalog.service.js +305 -0
- package/esm2015/lib/service/dictionary.service.js +90 -0
- package/esm2015/lib/service/icon-cache.service.js +40 -0
- package/esm2015/lib/utils/json.utils.js +22 -0
- package/esm2015/public_api.js +15 -3
- package/fesm2015/colijnit-catalog.js +2262 -1380
- package/fesm2015/colijnit-catalog.js.map +1 -1
- package/lib/cache/cache-field.d.ts +25 -0
- package/lib/cache/parameter-cache-field.d.ts +11 -0
- package/lib/cache/service/business-object-cache-manager.service.d.ts +58 -0
- package/lib/cache/service/select-multiple-cache.service.d.ts +15 -0
- package/lib/cache/service/select-multiple-parameterized-cache.service.d.ts +19 -0
- package/lib/cache/service/select-single-cache.service.d.ts +12 -0
- package/lib/cache/service/select-single-parameterized-cache.service.d.ts +18 -0
- package/{app/components/catalog/article-card/article-card.component.d.ts → lib/component/base/article-base.component.d.ts} +20 -16
- package/lib/component/base/catalog-search-base.component.d.ts +8 -0
- package/lib/component/catalog-article-list/catalog-article-list.component.d.ts +4 -0
- package/lib/component/catalog-article-list/catalog-article-list.module.d.ts +2 -0
- package/lib/component/catalog-article-list/style/_layout.scss +463 -0
- package/lib/component/catalog-article-list/style/_material-definition.scss +9 -0
- package/lib/component/catalog-article-list/style/_theme.scss +4 -0
- package/lib/component/catalog-article-list/style/material.scss +4 -0
- package/lib/component/catalog-article-tile/catalog-article-tile.component.d.ts +4 -0
- package/lib/component/catalog-article-tile/catalog-article-tile.module.d.ts +2 -0
- package/lib/component/catalog-article-tile/style/_layout.scss +693 -0
- package/lib/component/catalog-article-tile/style/_material-definition.scss +11 -0
- package/lib/component/catalog-article-tile/style/_theme.scss +4 -0
- package/lib/component/catalog-article-tile/style/material.scss +4 -0
- package/lib/component/catalog-categories/catalog-categories.component.d.ts +19 -0
- package/lib/component/catalog-categories/catalog-categories.module.d.ts +2 -0
- package/lib/component/catalog-categories/style/_layout.scss +109 -0
- package/lib/component/catalog-categories/style/_material-definition.scss +29 -0
- package/lib/component/catalog-categories/style/_theme.scss +14 -0
- package/lib/component/catalog-categories/style/material.scss +5 -0
- package/lib/component/catalog-external-source/catalog-external-source.component.d.ts +18 -0
- package/lib/component/catalog-external-source/catalog-external-source.module.d.ts +2 -0
- package/lib/component/catalog-external-source/style/_layout.scss +51 -0
- package/lib/component/catalog-external-source/style/_material-definition.scss +0 -0
- package/lib/component/catalog-external-source/style/_theme.scss +4 -0
- package/lib/component/catalog-external-source/style/material.scss +4 -0
- package/lib/component/catalog-external-sources/catalog-external-sources.component.d.ts +12 -0
- package/lib/component/catalog-external-sources/catalog-external-sources.module.d.ts +2 -0
- package/lib/component/catalog-external-sources/style/_layout.scss +63 -0
- package/lib/component/catalog-external-sources/style/_material-definition.scss +18 -0
- package/lib/component/catalog-external-sources/style/_theme.scss +12 -0
- package/lib/component/catalog-external-sources/style/material.scss +5 -0
- package/lib/component/catalog-filter/catalog-filter.component.d.ts +40 -0
- package/lib/component/catalog-filter/catalog-filter.module.d.ts +2 -0
- package/lib/component/catalog-filter/style/_layout.scss +52 -0
- package/lib/component/catalog-filter/style/_material-definition.scss +8 -0
- package/lib/component/catalog-filter/style/_theme.scss +17 -0
- package/lib/component/catalog-filter/style/material.scss +4 -0
- package/lib/component/catalog-navigation/catalog-navigation.component.d.ts +51 -0
- package/lib/component/catalog-navigation/catalog-navigation.module.d.ts +2 -0
- package/lib/component/catalog-navigation/style/_layout.scss +515 -0
- package/lib/component/catalog-navigation/style/_material-definition.scss +21 -0
- package/lib/component/catalog-navigation/style/_theme.scss +4 -0
- package/lib/component/catalog-navigation/style/material.scss +4 -0
- package/lib/component/catalog-search/catalog-search.component.d.ts +25 -0
- package/lib/component/catalog-search/catalog-search.module.d.ts +2 -0
- package/lib/component/catalog-search/style/_layout.scss +30 -0
- package/lib/component/catalog-search/style/_material-definition.scss +2 -0
- package/lib/component/catalog-search/style/_theme.scss +4 -0
- package/lib/component/catalog-search/style/material.scss +4 -0
- package/lib/component/catalog-search-header/catalog-search-header.component.d.ts +7 -0
- package/lib/component/catalog-search-header/catalog-search-header.module.d.ts +2 -0
- package/lib/component/catalog-search-header/style/_layout.scss +12 -0
- package/lib/component/catalog-search-header/style/_material-definition.scss +4 -0
- package/lib/component/catalog-search-header/style/_theme.scss +4 -0
- package/lib/component/catalog-search-header/style/material.scss +4 -0
- package/lib/component/catalog-search-result-list/catalog-search-result-list.component.d.ts +4 -0
- package/lib/component/catalog-search-result-list/catalog-search-result-list.module.d.ts +2 -0
- package/lib/component/catalog-search-result-list/style/_layout.scss +4 -0
- package/lib/component/catalog-search-result-list/style/_material-definition.scss +0 -0
- package/lib/component/catalog-search-result-list/style/_theme.scss +4 -0
- package/lib/component/catalog-search-result-list/style/material.scss +4 -0
- package/lib/component/catalog-search-result-tile/catalog-search-result-tile.component.d.ts +12 -0
- package/lib/component/catalog-search-result-tile/catalog-search-result-tile.module.d.ts +2 -0
- package/lib/component/catalog-search-result-tile/style/_layout.scss +16 -0
- package/lib/component/catalog-search-result-tile/style/_material-definition.scss +0 -0
- package/lib/component/catalog-search-result-tile/style/_theme.scss +4 -0
- package/lib/component/catalog-search-result-tile/style/material.scss +4 -0
- package/lib/component/responsive-text/responsive-text.component.d.ts +4 -0
- package/lib/component/responsive-text/responsive-text.module.d.ts +2 -0
- package/lib/component/responsive-text/style/_layout.scss +9 -0
- package/lib/component/responsive-text/style/_material-definition.scss +0 -0
- package/lib/component/responsive-text/style/_theme.scss +4 -0
- package/lib/component/responsive-text/style/material.scss +4 -0
- package/lib/directive/visibility-observer.module.d.ts +2 -0
- package/{app → lib}/model/settings-options.d.ts +2 -0
- package/{app/service/i-one-controller.service.d.ts → lib/service/catalog-connector-adapter.service.d.ts} +4 -5
- package/lib/service/catalog-connector.service.d.ts +42 -0
- package/{app/service/app-event.service.d.ts → lib/service/catalog-event.service.d.ts} +2 -2
- package/{app/service/filter.service.d.ts → lib/service/catalog-filter.service.d.ts} +3 -3
- package/{app/service/image.service.d.ts → lib/service/catalog-image.service.d.ts} +3 -3
- package/{app/service/options.service.d.ts → lib/service/catalog-options.service.d.ts} +3 -3
- package/lib/service/catalog-search.service.d.ts +46 -0
- package/{app/service/settings.service.d.ts → lib/service/catalog-settings.service.d.ts} +3 -5
- package/{app → lib}/service/catalog.service.d.ts +20 -24
- package/{app → lib}/service/dictionary.service.d.ts +0 -3
- package/lib/style/_mixin.scss +15 -0
- package/lib/style/_variables.scss +10 -0
- package/lib/style/catalog-globals.scss +3 -0
- package/lib/utils/json.utils.d.ts +3 -0
- package/package.json +2 -2
- package/public_api.d.ts +14 -2
- package/app/base/base-component.d.ts +0 -2
- package/app/components/catalog/catalog/catalog.component.d.ts +0 -11
- package/app/components/catalog/catalog-external/catalog-external.component.d.ts +0 -19
- package/app/components/catalog/catalog-filter/catalog-filter.component.d.ts +0 -40
- package/app/components/catalog/catalog-home/catalog-home.component.d.ts +0 -15
- package/app/components/catalog/catalog-page/catalog-page.component.d.ts +0 -41
- package/app/components/catalog/filter-items/filter-items.component.d.ts +0 -20
- package/app/components/core/icon-handle/icon-handle.component.d.ts +0 -14
- package/app/components/core/label-field/label-field.component.d.ts +0 -4
- package/app/components/left-content/left-content.component.d.ts +0 -4
- package/app/components/main-content/main-content.component.d.ts +0 -4
- package/app/components/navigation/navigation.component.d.ts +0 -29
- package/app/components/top-content/top-content.component.d.ts +0 -16
- package/app/enum/level-indicator-level.enum.d.ts +0 -5
- package/app/interface/filter-item.d.ts +0 -7
- package/app/ione-catalog.component.d.ts +0 -46
- package/app/ione-catalog.module.d.ts +0 -4
- package/app/layout.directive.d.ts +0 -20
- package/app/pipe/greater-than-zero.pipe.d.ts +0 -4
- package/app/service/app-initializer.service.d.ts +0 -6
- package/app/service/navigation.service.d.ts +0 -27
- package/app/style/_scrollbars.mixins.scss +0 -18
- package/app/style/_variables.scss +0 -17
- package/app/style/catalog-globals.scss +0 -94
- package/app/utils/json-utils.service.d.ts +0 -3
- package/app/utils/string-utils.d.ts +0 -6
- package/app/utils/utils.service.d.ts +0 -21
- package/esm2015/app/base/base-component.js +0 -3
- package/esm2015/app/catalog-version.js +0 -10
- package/esm2015/app/components/catalog/article-card/article-card.component.js +0 -137
- package/esm2015/app/components/catalog/catalog/catalog.component.js +0 -32
- package/esm2015/app/components/catalog/catalog-external/catalog-external.component.js +0 -54
- package/esm2015/app/components/catalog/catalog-filter/catalog-filter.component.js +0 -142
- package/esm2015/app/components/catalog/catalog-home/catalog-home.component.js +0 -39
- package/esm2015/app/components/catalog/catalog-page/catalog-page.component.js +0 -124
- package/esm2015/app/components/catalog/filter-items/filter-items.component.js +0 -48
- package/esm2015/app/components/core/icon-handle/icon-handle.component.js +0 -32
- package/esm2015/app/components/core/label-field/label-field.component.js +0 -18
- package/esm2015/app/components/left-content/left-content.component.js +0 -13
- package/esm2015/app/components/main-content/main-content.component.js +0 -13
- package/esm2015/app/components/navigation/navigation.component.js +0 -94
- package/esm2015/app/components/top-content/top-content.component.js +0 -46
- package/esm2015/app/directive/visibility-observer-master.directive.js +0 -49
- package/esm2015/app/directive/visibility-observer.directive.js +0 -55
- package/esm2015/app/enum/icon.enum.js +0 -25
- package/esm2015/app/enum/language-code.enum.js +0 -8
- package/esm2015/app/enum/level-indicator-level.enum.js +0 -7
- package/esm2015/app/interface/filter-item.js +0 -2
- package/esm2015/app/interface/order-by.interface.js +0 -2
- package/esm2015/app/ione-catalog.component.js +0 -120
- package/esm2015/app/ione-catalog.module.js +0 -119
- package/esm2015/app/layout.directive.js +0 -68
- package/esm2015/app/model/articles-search-result.js +0 -3
- package/esm2015/app/model/external-source-viewmodel.js +0 -7
- package/esm2015/app/model/filter-item.viewmodel.js +0 -10
- package/esm2015/app/model/filter-viewmodel.js +0 -12
- package/esm2015/app/model/icon.js +0 -24
- package/esm2015/app/model/settings-options.js +0 -18
- package/esm2015/app/model/settings.js +0 -10
- package/esm2015/app/pipe/greater-than-zero.pipe.js +0 -16
- package/esm2015/app/pipe/localize.pipe.js +0 -27
- package/esm2015/app/service/app-event.service.js +0 -19
- package/esm2015/app/service/app-initializer.service.js +0 -25
- package/esm2015/app/service/catalog.service.js +0 -273
- package/esm2015/app/service/dictionary.service.js +0 -90
- package/esm2015/app/service/filter.service.js +0 -86
- package/esm2015/app/service/i-one-controller.service.js +0 -329
- package/esm2015/app/service/icon-cache.service.js +0 -35
- package/esm2015/app/service/image.service.js +0 -119
- package/esm2015/app/service/navigation.service.js +0 -80
- package/esm2015/app/service/options.service.js +0 -86
- package/esm2015/app/service/settings.service.js +0 -108
- package/esm2015/app/utils/json-utils.service.js +0 -26
- package/esm2015/app/utils/string-utils.js +0 -37
- package/esm2015/app/utils/utils.service.js +0 -111
- /package/{app → lib}/catalog-version.d.ts +0 -0
- /package/{app → lib}/directive/visibility-observer-master.directive.d.ts +0 -0
- /package/{app → lib}/directive/visibility-observer.directive.d.ts +0 -0
- /package/{app → lib}/enum/icon.enum.d.ts +0 -0
- /package/{app → lib}/enum/language-code.enum.d.ts +0 -0
- /package/{app → lib}/interface/order-by.interface.d.ts +0 -0
- /package/{app → lib}/model/articles-search-result.d.ts +0 -0
- /package/{app → lib}/model/external-source-viewmodel.d.ts +0 -0
- /package/{app → lib}/model/filter-item.viewmodel.d.ts +0 -0
- /package/{app → lib}/model/filter-viewmodel.d.ts +0 -0
- /package/{app → lib}/model/icon.d.ts +0 -0
- /package/{app → lib}/model/settings.d.ts +0 -0
- /package/{app → lib}/pipe/localize.pipe.d.ts +0 -0
- /package/{app → lib}/service/icon-cache.service.d.ts +0 -0
|
@@ -1,25 +1,28 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Injectable, Component,
|
|
2
|
+
import { Injectable, EventEmitter, Component, ViewEncapsulation, Input, Output, HostBinding, ChangeDetectorRef, ViewChild, Pipe, NgModule, Directive, HostListener, ElementRef, Renderer2 } from '@angular/core';
|
|
3
|
+
import { CommonModule } from '@angular/common';
|
|
3
4
|
import { __awaiter } from 'tslib';
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
5
|
+
import { Subject, BehaviorSubject } from 'rxjs';
|
|
6
|
+
import { StringUtils } from '@colijnit/ioneconnector/build/utils/string-utils';
|
|
6
7
|
import { ArticleCategory } from '@colijnit/articleapi/build/model/article-category';
|
|
7
8
|
import { CatalogDefinition } from '@colijnit/articleapi/build/model/catalog-definition.bo';
|
|
8
|
-
import { Articles } from '@colijnit/articleapi/build/articles';
|
|
9
9
|
import { ExternalSource } from '@colijnit/articleapi/build/model/external-source.bo';
|
|
10
|
+
import { BusinessObjectFactory } from '@colijnit/ioneconnector/build/factory/business-object-factory';
|
|
11
|
+
import { Articles } from '@colijnit/articleapi/build/articles';
|
|
12
|
+
import { ArticleExtended } from '@colijnit/articleapi/build/model/article-extended.bo';
|
|
10
13
|
import { ArticleSearchFilterSelections } from '@colijnit/articleapi/build/model/article-search-filter-selections';
|
|
11
14
|
import { ArticleSearchFilterMaxAndMinPrice } from '@colijnit/articleapi/build/model/article-search-filter-max-and-min-price';
|
|
12
15
|
import { ArticlePrice } from '@colijnit/articleapi/build/model/article-price';
|
|
13
16
|
import { GetArticlePriceRequest } from '@colijnit/articleapi/build/model/get-article-price-request';
|
|
14
|
-
import {
|
|
17
|
+
import { ObjectUtils } from '@colijnit/ioneconnector/build/utils/object-utils';
|
|
15
18
|
import { FileUtils } from '@colijnit/ioneconnector/build/utils/file-utils';
|
|
19
|
+
import { ArticleExtendedRequest } from '@colijnit/articleapi/build/model/article-extended-request';
|
|
16
20
|
import { PagingParameters } from '@colijnit/ioneconnector/build/model/paging-parameters';
|
|
17
|
-
import {
|
|
21
|
+
import { InputTextModule, FilterItemModule, InputDatePickerModule, IconCollapseHandleModule, ImageModule, IconModule as IconModule$1, OverlayModule, InputSearchModule, PaginationBarModule } from '@colijnit/corecomponents_v12';
|
|
18
22
|
import { trigger, state, style, transition, animate } from '@angular/animations';
|
|
19
|
-
import { SliderComponent,
|
|
20
|
-
import
|
|
21
|
-
import {
|
|
22
|
-
import { FormsModule } from '@angular/forms';
|
|
23
|
+
import { SliderComponent, IconModule, PriceDisplayPipeModule, ButtonModule, ImageModule as ImageModule$1 } from '@colijnit/corecomponents';
|
|
24
|
+
import * as i1 from '@angular/platform-browser';
|
|
25
|
+
import { DomSanitizer } from '@angular/platform-browser';
|
|
23
26
|
|
|
24
27
|
// this file is dynamically created, do not change this
|
|
25
28
|
class Version {
|
|
@@ -31,11 +34,253 @@ class Version {
|
|
|
31
34
|
}
|
|
32
35
|
}
|
|
33
36
|
|
|
37
|
+
class SettingsOptions {
|
|
38
|
+
constructor() {
|
|
39
|
+
this.showAddToCart = true;
|
|
40
|
+
this.showPriceFilter = true;
|
|
41
|
+
this.showLookAtArticleButton = true;
|
|
42
|
+
this.showStockIndication = false;
|
|
43
|
+
this.lookAtArticleButtonText = 'LOOKAT';
|
|
44
|
+
this.stockButtonText = 'STOCK';
|
|
45
|
+
this.showAddArticleButton = true;
|
|
46
|
+
this.showARButton = false;
|
|
47
|
+
this.maxItemsPerPage = 20;
|
|
48
|
+
this.addArticleButtonText = 'ADD TO CART';
|
|
49
|
+
this.collapseFilterByDefault = false;
|
|
50
|
+
this.sortTurnoverGroupsByAlphabet = true;
|
|
51
|
+
this.searchOnStart = false;
|
|
52
|
+
this.showFilter = false;
|
|
53
|
+
this.showNavigation = false;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
class Settings {
|
|
58
|
+
constructor() {
|
|
59
|
+
this.session = undefined;
|
|
60
|
+
this.useEncryption = true;
|
|
61
|
+
this.type = "V";
|
|
62
|
+
this.options = new SettingsOptions();
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
var LanguageCode;
|
|
67
|
+
(function (LanguageCode) {
|
|
68
|
+
LanguageCode["Dutch"] = "nl-NL";
|
|
69
|
+
LanguageCode["English"] = "en-GB";
|
|
70
|
+
LanguageCode["German"] = "de-DE";
|
|
71
|
+
LanguageCode["French"] = "fr-FR";
|
|
72
|
+
})(LanguageCode || (LanguageCode = {}));
|
|
73
|
+
|
|
74
|
+
class JsonUtils {
|
|
75
|
+
static ReadJsonFile(filePath) {
|
|
76
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
77
|
+
try {
|
|
78
|
+
const response = yield fetch(filePath);
|
|
79
|
+
if (!response.ok) {
|
|
80
|
+
console.error('Error getting translation:', response.statusText);
|
|
81
|
+
return '';
|
|
82
|
+
}
|
|
83
|
+
else {
|
|
84
|
+
return response.json();
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
catch (e) {
|
|
88
|
+
console.error('Error getting translation:', e.message);
|
|
89
|
+
return '';
|
|
90
|
+
}
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
// The localization service, providing peers with text translation functionality.
|
|
96
|
+
class DictionaryService {
|
|
97
|
+
constructor() {
|
|
98
|
+
this.dictionaryUrl = 'js/browser/res/dictionary/';
|
|
99
|
+
this.dictionaryLoaded = new Subject();
|
|
100
|
+
this._dictionaryPromise = new Map();
|
|
101
|
+
this._dictionaries = new Map();
|
|
102
|
+
// Some dictionary values have one or more '|~' texts in them, meant to be replaced with client-side given texts.
|
|
103
|
+
this._placeholder = '|~';
|
|
104
|
+
}
|
|
105
|
+
get language() {
|
|
106
|
+
return this._language;
|
|
107
|
+
}
|
|
108
|
+
set rootUrl(value) {
|
|
109
|
+
this._rootUrl = value;
|
|
110
|
+
this._dictBasePath = this._rootUrl + '/' + this.dictionaryUrl;
|
|
111
|
+
}
|
|
112
|
+
getLanguageCode(lc) {
|
|
113
|
+
for (const key in LanguageCode) {
|
|
114
|
+
if (LanguageCode[key] === lc) {
|
|
115
|
+
return lc;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
return LanguageCode.Dutch;
|
|
119
|
+
}
|
|
120
|
+
// Loads the dictionary for given language in memory.
|
|
121
|
+
setDictionary(language, additionalTranslationFile) {
|
|
122
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
123
|
+
this._language = language;
|
|
124
|
+
if (!this._dictionaryPromise.has(language)) {
|
|
125
|
+
this._dictionaryPromise.set(language, JsonUtils.ReadJsonFile(additionalTranslationFile ?
|
|
126
|
+
additionalTranslationFile :
|
|
127
|
+
this._dictBasePath + 'text_' + language.substr(0, 2).toLowerCase() + '.properties.json')
|
|
128
|
+
.then((data) => {
|
|
129
|
+
this._dictionaries.set(language, data);
|
|
130
|
+
this.dictionaryLoaded.next();
|
|
131
|
+
return data;
|
|
132
|
+
}));
|
|
133
|
+
}
|
|
134
|
+
else {
|
|
135
|
+
this.dictionaryLoaded.next();
|
|
136
|
+
}
|
|
137
|
+
yield this._dictionaryPromise.get(language);
|
|
138
|
+
});
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* Returns the localized text for the given dictionary key.
|
|
142
|
+
* @param {string} key
|
|
143
|
+
* @param {boolean} [upperCaseFirst = true] False for first letter lowercase, true for first letter uppercase for returned dict val
|
|
144
|
+
* @param {string[]} replacementTexts Rest params for replacement of '|~' in returned dict value
|
|
145
|
+
* @returns {string} The translated text for given dictionary key
|
|
146
|
+
*/
|
|
147
|
+
get(key, upperCaseFirst = true, ...replacementTexts) {
|
|
148
|
+
if (!StringUtils.IsStringWithLength(key)) {
|
|
149
|
+
return key || '';
|
|
150
|
+
}
|
|
151
|
+
else if (!this._dictionaryLoaded(this._language)) {
|
|
152
|
+
return key;
|
|
153
|
+
}
|
|
154
|
+
let text = this._dictionaries.get(this._language)[key];
|
|
155
|
+
text = StringUtils.IsStringWithLength(text) ? text : key;
|
|
156
|
+
if (upperCaseFirst) {
|
|
157
|
+
text = text.charAt(0).toUpperCase() + text.slice(1);
|
|
158
|
+
}
|
|
159
|
+
else {
|
|
160
|
+
text = text.charAt(0).toLowerCase() + text.slice(1);
|
|
161
|
+
}
|
|
162
|
+
if (replacementTexts.length > 0) {
|
|
163
|
+
text = StringUtils.ReplaceOccurrencesIn(text, this._placeholder, ...replacementTexts);
|
|
164
|
+
}
|
|
165
|
+
return text;
|
|
166
|
+
}
|
|
167
|
+
_dictionaryLoaded(language) {
|
|
168
|
+
return this._dictionaries.has(language);
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
DictionaryService.ɵprov = i0.ɵɵdefineInjectable({ factory: function DictionaryService_Factory() { return new DictionaryService(); }, token: DictionaryService, providedIn: "root" });
|
|
172
|
+
DictionaryService.decorators = [
|
|
173
|
+
{ type: Injectable, args: [{
|
|
174
|
+
providedIn: 'root'
|
|
175
|
+
},] }
|
|
176
|
+
];
|
|
177
|
+
|
|
178
|
+
class CatalogSettingsService {
|
|
179
|
+
constructor(_dictionaryService) {
|
|
180
|
+
this._dictionaryService = _dictionaryService;
|
|
181
|
+
this.settingsLoaded = new BehaviorSubject(false);
|
|
182
|
+
this._settings = new Settings();
|
|
183
|
+
}
|
|
184
|
+
set settings(value) {
|
|
185
|
+
this._settings = value;
|
|
186
|
+
}
|
|
187
|
+
get settings() {
|
|
188
|
+
return this._settings;
|
|
189
|
+
}
|
|
190
|
+
initializeSettings(settings) {
|
|
191
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
192
|
+
// see if there's a json file for application settings
|
|
193
|
+
if (typeof settings === 'undefined') {
|
|
194
|
+
const jsonSettings = yield JsonUtils.ReadJsonFile('catalog-settings.json');
|
|
195
|
+
this.settings = Object.assign(new Settings(), jsonSettings);
|
|
196
|
+
this.settings.options = Object.assign(new SettingsOptions(), this.settings.options);
|
|
197
|
+
this.settingsFinished();
|
|
198
|
+
}
|
|
199
|
+
else {
|
|
200
|
+
this.settings = Object.assign(new Settings(), settings);
|
|
201
|
+
this.settings.options = Object.assign(new SettingsOptions(), this.settings.options);
|
|
202
|
+
this.settingsFinished();
|
|
203
|
+
}
|
|
204
|
+
});
|
|
205
|
+
}
|
|
206
|
+
createSettingsFromObject(obj) {
|
|
207
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
208
|
+
if (!this.settings) {
|
|
209
|
+
this.settings = new Settings();
|
|
210
|
+
}
|
|
211
|
+
if (obj.hasOwnProperty('url')) {
|
|
212
|
+
this.settings.url = obj['url'];
|
|
213
|
+
}
|
|
214
|
+
if (obj.hasOwnProperty('schema')) {
|
|
215
|
+
this.settings.schema = obj['schema'];
|
|
216
|
+
}
|
|
217
|
+
if (obj.hasOwnProperty('version')) {
|
|
218
|
+
this.settings.version = obj['version'];
|
|
219
|
+
}
|
|
220
|
+
if (obj.hasOwnProperty('branch')) {
|
|
221
|
+
this.settings.branch = obj['branch'];
|
|
222
|
+
}
|
|
223
|
+
if (obj.hasOwnProperty('currency')) {
|
|
224
|
+
this.settings.currency = obj['currency'];
|
|
225
|
+
}
|
|
226
|
+
if (obj.hasOwnProperty('languageCode')) {
|
|
227
|
+
this.settings.languageCode = obj['languageCode'];
|
|
228
|
+
}
|
|
229
|
+
if (obj.hasOwnProperty('username')) {
|
|
230
|
+
this.settings.username = obj['username'];
|
|
231
|
+
}
|
|
232
|
+
if (obj.hasOwnProperty('password')) {
|
|
233
|
+
this.settings.password = obj['password'];
|
|
234
|
+
}
|
|
235
|
+
if (obj.hasOwnProperty('timeoutInMs')) {
|
|
236
|
+
this.settings.timeoutInMs = obj['timeoutInMs'];
|
|
237
|
+
}
|
|
238
|
+
if (obj.hasOwnProperty('session')) {
|
|
239
|
+
this.settings.session = obj['session'];
|
|
240
|
+
}
|
|
241
|
+
if (obj.hasOwnProperty('useEncryption')) {
|
|
242
|
+
this.settings.useEncryption = obj['useEncryption'];
|
|
243
|
+
}
|
|
244
|
+
if (obj.hasOwnProperty('additionalTranslationFile')) {
|
|
245
|
+
this.settings.additionalTranslationFile = obj['additionalTranslationFile'];
|
|
246
|
+
}
|
|
247
|
+
if (obj.hasOwnProperty('type')) {
|
|
248
|
+
this.settings.type = obj['type'];
|
|
249
|
+
}
|
|
250
|
+
if (obj.hasOwnProperty('options')) {
|
|
251
|
+
Object.assign(this.settings.options, obj['options']);
|
|
252
|
+
}
|
|
253
|
+
if (obj.hasOwnProperty('catalogParameters')) {
|
|
254
|
+
this.settings.catalogParameters = obj['catalogParameters'];
|
|
255
|
+
}
|
|
256
|
+
this.settingsFinished();
|
|
257
|
+
});
|
|
258
|
+
}
|
|
259
|
+
settingsFinished() {
|
|
260
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
261
|
+
this._dictionaryService.rootUrl = this.settings.url.replace('/ajaxservice', '');
|
|
262
|
+
if (!this.settings.additionalTranslationFile) {
|
|
263
|
+
const languageCode = this._dictionaryService.getLanguageCode(this.settings.languageCode);
|
|
264
|
+
yield this._dictionaryService.setDictionary(languageCode);
|
|
265
|
+
}
|
|
266
|
+
this.settingsLoaded.next(true);
|
|
267
|
+
});
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
CatalogSettingsService.ɵprov = i0.ɵɵdefineInjectable({ factory: function CatalogSettingsService_Factory() { return new CatalogSettingsService(i0.ɵɵinject(DictionaryService)); }, token: CatalogSettingsService, providedIn: "root" });
|
|
271
|
+
CatalogSettingsService.decorators = [
|
|
272
|
+
{ type: Injectable, args: [{
|
|
273
|
+
providedIn: 'root'
|
|
274
|
+
},] }
|
|
275
|
+
];
|
|
276
|
+
CatalogSettingsService.ctorParameters = () => [
|
|
277
|
+
{ type: DictionaryService }
|
|
278
|
+
];
|
|
279
|
+
|
|
34
280
|
class ArticlesSearchResult {
|
|
35
281
|
}
|
|
36
282
|
|
|
37
|
-
|
|
38
|
-
class IOneControllerService {
|
|
283
|
+
class CatalogConnectorAdapterService {
|
|
39
284
|
constructor() {
|
|
40
285
|
this.controllerInitialized = new BehaviorSubject(false);
|
|
41
286
|
this.connectorOptions = {};
|
|
@@ -345,401 +590,552 @@ class IOneControllerService {
|
|
|
345
590
|
this._shouldShowLoader = showLoader;
|
|
346
591
|
}
|
|
347
592
|
}
|
|
348
|
-
|
|
349
|
-
|
|
593
|
+
CatalogConnectorAdapterService.ɵprov = i0.ɵɵdefineInjectable({ factory: function CatalogConnectorAdapterService_Factory() { return new CatalogConnectorAdapterService(); }, token: CatalogConnectorAdapterService, providedIn: "root" });
|
|
594
|
+
CatalogConnectorAdapterService.decorators = [
|
|
595
|
+
{ type: Injectable, args: [{
|
|
596
|
+
providedIn: "root"
|
|
597
|
+
},] }
|
|
350
598
|
];
|
|
351
599
|
|
|
352
|
-
|
|
600
|
+
// Class represents a value that is to be loaded only once, lazily, by its .loadFunction, despite how many times or how fast its getValue() is called.
|
|
601
|
+
class CacheField {
|
|
353
602
|
constructor() {
|
|
354
|
-
this.
|
|
355
|
-
|
|
356
|
-
resizeImage(image) {
|
|
357
|
-
const ratio = Math.min(this.MAX_DIMENSION / image.width, this.MAX_DIMENSION / image.height);
|
|
358
|
-
const canvas = document.createElement('canvas');
|
|
359
|
-
canvas.width = Math.trunc(image.width * ratio);
|
|
360
|
-
canvas.height = Math.trunc(image.height * ratio);
|
|
361
|
-
const ctx = canvas.getContext('2d');
|
|
362
|
-
ctx.drawImage(image, 0, 0, image.width, image.height, 0, 0, canvas.width, canvas.height);
|
|
363
|
-
const newSrc = canvas.toDataURL('image/jpeg'); // or png
|
|
364
|
-
return newSrc;
|
|
365
|
-
}
|
|
366
|
-
readAndResizePhotoAsDataURL(file) {
|
|
367
|
-
const image = new Image();
|
|
368
|
-
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
|
369
|
-
image.onload = () => {
|
|
370
|
-
const newSrc = this.resizeImage(image);
|
|
371
|
-
resolve(newSrc);
|
|
372
|
-
};
|
|
373
|
-
image.onerror = error => reject(error);
|
|
374
|
-
image.src = yield this.readFileAsDataURL(file);
|
|
375
|
-
}));
|
|
603
|
+
this.onLoad = new EventEmitter();
|
|
604
|
+
this._isLoaded = false;
|
|
376
605
|
}
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
return
|
|
380
|
-
fileReader.onload = (e) => resolve(e.target.result);
|
|
381
|
-
fileReader.onerror = error => reject(error);
|
|
382
|
-
fileReader.readAsDataURL(file);
|
|
383
|
-
});
|
|
384
|
-
}
|
|
385
|
-
readFileAsText(file) {
|
|
386
|
-
const fileReader = new FileReader();
|
|
387
|
-
return new Promise((resolve, reject) => {
|
|
388
|
-
fileReader.onload = (e) => resolve(e.target.result);
|
|
389
|
-
fileReader.onerror = error => reject(error);
|
|
390
|
-
fileReader.readAsText(file);
|
|
391
|
-
});
|
|
392
|
-
}
|
|
393
|
-
loadImage(src, resize = true) {
|
|
394
|
-
const image = new Image();
|
|
395
|
-
return new Promise((resolve, reject) => {
|
|
396
|
-
image.onload = () => {
|
|
397
|
-
if (resize) {
|
|
398
|
-
const resizedImage = new Image();
|
|
399
|
-
resizedImage.onload = () => resolve(resizedImage);
|
|
400
|
-
resizedImage.onerror = error => reject(error);
|
|
401
|
-
const resizedImageSrc = this.resizeImage(image);
|
|
402
|
-
resizedImage.src = resizedImageSrc;
|
|
403
|
-
}
|
|
404
|
-
else {
|
|
405
|
-
resolve(image);
|
|
406
|
-
}
|
|
407
|
-
};
|
|
408
|
-
image.onerror = error => reject(error);
|
|
409
|
-
image.src = src;
|
|
410
|
-
});
|
|
606
|
+
// The value of this cache field. Warning: might not have been loaded yet. Call ensureLoaded() or getvalue() for true value.
|
|
607
|
+
get value() {
|
|
608
|
+
return this._value;
|
|
411
609
|
}
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
* @param func The function to return as a throttled version
|
|
417
|
-
* @param throttleMs Number of milliseconds for throttle: the minimum time between any two subsequent function calls of function
|
|
418
|
-
* @param [thisArg] Optionally supply the this context of the caller
|
|
419
|
-
* @returns The given function, with the above-mentioned time constraints
|
|
420
|
-
*/
|
|
421
|
-
getAsThrottledFunction(func, throttleMs = 250, thisArg) {
|
|
422
|
-
let lastCallTime;
|
|
423
|
-
let deferTimer;
|
|
424
|
-
return function () {
|
|
425
|
-
const context = thisArg || this;
|
|
426
|
-
const now = +new Date;
|
|
427
|
-
const args = arguments;
|
|
428
|
-
if (lastCallTime && now < lastCallTime + throttleMs) {
|
|
429
|
-
clearTimeout(deferTimer);
|
|
430
|
-
deferTimer = window.setTimeout(function () {
|
|
431
|
-
lastCallTime = now;
|
|
432
|
-
func.apply(context, args);
|
|
433
|
-
}, throttleMs);
|
|
434
|
-
}
|
|
435
|
-
else {
|
|
436
|
-
lastCallTime = now;
|
|
437
|
-
func.apply(context, args);
|
|
438
|
-
}
|
|
439
|
-
};
|
|
610
|
+
set value(value) {
|
|
611
|
+
this._value = value;
|
|
612
|
+
this._promiseValue = Promise.resolve(value);
|
|
613
|
+
this._isLoaded = true;
|
|
440
614
|
}
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
if (!response.ok) {
|
|
445
|
-
throw new Error(response.statusText);
|
|
446
|
-
}
|
|
447
|
-
return response.json();
|
|
448
|
-
});
|
|
615
|
+
// Whether the value has been loaded or not.
|
|
616
|
+
get isLoaded() {
|
|
617
|
+
return this._isLoaded;
|
|
449
618
|
}
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
cd.detectChanges();
|
|
454
|
-
component[propName] = value;
|
|
619
|
+
// Whether the value is currently loading or not.
|
|
620
|
+
get isLoading() {
|
|
621
|
+
return !this._isLoaded && (this._promiseValue !== null && this._promiseValue !== undefined);
|
|
455
622
|
}
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
return undefined;
|
|
623
|
+
get loadNeverCalled() {
|
|
624
|
+
return !this.isLoading && !this.isLoaded;
|
|
625
|
+
}
|
|
626
|
+
// Loads and returns the value. Only loads from db if it wasn't loaded before (or forceReload was given true)
|
|
627
|
+
getValue(forceReload) {
|
|
628
|
+
return this.ensureLoaded(forceReload);
|
|
629
|
+
}
|
|
630
|
+
setValue(value) {
|
|
631
|
+
this.value = value;
|
|
632
|
+
}
|
|
633
|
+
/**
|
|
634
|
+
* POSTCONDITION: The .value of this cache field contains the loaded value as fetched by the resolve data of its .loadFunction.
|
|
635
|
+
* Will load only once, consecutive calls will resolve immediately or wait until the first original database fetch was finished.
|
|
636
|
+
* @returns {Promise<any>} Postcondition holds after resolve
|
|
637
|
+
*/
|
|
638
|
+
ensureLoaded(forceReload) {
|
|
639
|
+
if (!forceReload && this._promiseValue) {
|
|
640
|
+
return this._promiseValue;
|
|
475
641
|
}
|
|
476
|
-
|
|
477
|
-
return
|
|
642
|
+
else {
|
|
643
|
+
return this._load();
|
|
478
644
|
}
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
645
|
+
}
|
|
646
|
+
// POSTCONDITION: The .value of this cache field contains a freshly loaded value as fetched by the resolve data of its loadFunction.
|
|
647
|
+
reload() {
|
|
648
|
+
return this.ensureLoaded(true);
|
|
649
|
+
}
|
|
650
|
+
// Resets / invaldates this cache field. Makes sure that the next load() will really perform its load function body again (e.g. visit the DB,
|
|
651
|
+
// if that's ur function)
|
|
652
|
+
reset() {
|
|
653
|
+
this._value = undefined;
|
|
654
|
+
this._promiseValue = undefined;
|
|
655
|
+
this._isLoaded = false;
|
|
656
|
+
}
|
|
657
|
+
_load() {
|
|
658
|
+
if (this.loadFunction) {
|
|
659
|
+
this._promiseValue = this.loadFunction.call(this);
|
|
660
|
+
this._promiseValue.then((value) => {
|
|
661
|
+
this._value = value;
|
|
662
|
+
this._isLoaded = true;
|
|
663
|
+
this.onLoad.emit();
|
|
664
|
+
return value;
|
|
665
|
+
});
|
|
666
|
+
return this._promiseValue;
|
|
484
667
|
}
|
|
485
668
|
else {
|
|
486
|
-
|
|
487
|
-
for (let i = 0, len = replacementTexts.length; i < len; i++) {
|
|
488
|
-
outString = outString.replace(placeholder, replacementTexts[i]);
|
|
489
|
-
}
|
|
669
|
+
return Promise.resolve(undefined);
|
|
490
670
|
}
|
|
491
|
-
return outString;
|
|
492
671
|
}
|
|
493
|
-
|
|
494
|
-
|
|
672
|
+
}
|
|
673
|
+
|
|
674
|
+
// Class represents cached values retrieved by a load function that is to be called only once per unique input parameter combination.
|
|
675
|
+
class ParameterCacheField {
|
|
676
|
+
constructor() {
|
|
677
|
+
// A map from cache params (keys: the loadFunction arguments) to their cache fields
|
|
678
|
+
this._paramsToCacheItems = new Map();
|
|
679
|
+
}
|
|
680
|
+
// Returns the value for given loadfunction parameters. Loads if not yet loaded.
|
|
681
|
+
getValue(...params) {
|
|
682
|
+
return this._getCacheField(params).getValue();
|
|
495
683
|
}
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
684
|
+
setValue(value, ...params) {
|
|
685
|
+
return this._getCacheField(params).setValue(value);
|
|
686
|
+
}
|
|
687
|
+
// Returns the freshly reloaded value for given loadfunction parameters.
|
|
688
|
+
reload(...params) {
|
|
689
|
+
return this._getCacheField(params).reload();
|
|
690
|
+
}
|
|
691
|
+
// Resets one or all cache items. If no params given, resets ALL cache items.
|
|
692
|
+
reset(...params) {
|
|
693
|
+
if (params && params.length > 0) {
|
|
694
|
+
this._getCacheField(params).reset();
|
|
695
|
+
}
|
|
696
|
+
else {
|
|
697
|
+
this._paramsToCacheItems.forEach(cacheItem => cacheItem.reset());
|
|
698
|
+
this._paramsToCacheItems.clear();
|
|
699
|
+
this._paramsToCacheItems = new Map(); // not sure if clear() is enough for garbage collector?
|
|
700
|
+
}
|
|
701
|
+
}
|
|
702
|
+
// Makes a new cache field if none existed for these params. Returns the cache field that matches given params.
|
|
703
|
+
_getCacheField(params) {
|
|
704
|
+
let existingCacheField = undefined;
|
|
705
|
+
this._paramsToCacheItems.forEach((value, key) => {
|
|
706
|
+
if (!existingCacheField && ObjectUtils.DeepEquals(params, key)) {
|
|
707
|
+
existingCacheField = value;
|
|
708
|
+
}
|
|
709
|
+
});
|
|
710
|
+
if (existingCacheField) {
|
|
711
|
+
return existingCacheField;
|
|
712
|
+
}
|
|
713
|
+
else {
|
|
714
|
+
return this._makeNewCacheField(params);
|
|
715
|
+
}
|
|
499
716
|
}
|
|
500
|
-
//
|
|
501
|
-
|
|
502
|
-
|
|
717
|
+
// Creates and returns a new loadField for given params
|
|
718
|
+
_makeNewCacheField(params) {
|
|
719
|
+
const cacheField = new CacheField();
|
|
720
|
+
cacheField.loadFunction = this.loadFunction.bind(cacheField, ...params);
|
|
721
|
+
this._paramsToCacheItems.set(params, cacheField);
|
|
722
|
+
return cacheField;
|
|
503
723
|
}
|
|
504
724
|
}
|
|
505
725
|
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
726
|
+
/**
|
|
727
|
+
* App-wide, top-level, 'dumb' BO cache manager service. It stores and returns simple and parameterized business object cache items.
|
|
728
|
+
*
|
|
729
|
+
* Several other services register cache items onto this manager, such as repositories or the more generic SelectMultipleSimpleCacheService.
|
|
730
|
+
*
|
|
731
|
+
* This is a dumb cache manager. It just functions as a point to add and retrieve generic cache items, but does not know how to actually
|
|
732
|
+
* LOAD these cache items from the database, or what exact types the items are.
|
|
733
|
+
*
|
|
734
|
+
* All caches are reset when the user logs out.
|
|
735
|
+
*/
|
|
736
|
+
class BusinessObjectCacheManagerService {
|
|
737
|
+
constructor() {
|
|
738
|
+
// emits after this BO cache manager has been reset (e.g. after user logs out)
|
|
739
|
+
this.reset = new Subject();
|
|
740
|
+
// key: global cache id's, e.g. a model classe or any other arbitrary key for cache items
|
|
741
|
+
this._selectMultipleCache = new Map();
|
|
742
|
+
// key: global cache id's, e.g. a model classe or any other arbitrary key for cache items
|
|
743
|
+
this._selectMultipleParameterizedCache = new Map();
|
|
744
|
+
this._selectSingleCache = new Map();
|
|
745
|
+
this._selectSingleParameterizedCache = new Map();
|
|
746
|
+
}
|
|
747
|
+
// constructor(private _transactionService: TransactionService) {
|
|
748
|
+
// this._logoutSub = this._transactionService.logout.subscribe(() => {
|
|
749
|
+
// this._reset();
|
|
750
|
+
// });
|
|
751
|
+
// }
|
|
752
|
+
ngOnDestroy() {
|
|
753
|
+
this._logoutSub.unsubscribe();
|
|
754
|
+
}
|
|
755
|
+
/**
|
|
756
|
+
* Creates and adds a new simple cache item for the given key with the given load function.
|
|
757
|
+
* @param key
|
|
758
|
+
* @param loadFunction e.g. () => { return this._dataService.selectMultiple(Color); }
|
|
759
|
+
* @param overrideOld Whether to allow an old cache item with the same key to become override by this newly created cache item.
|
|
760
|
+
* @returns The newly created cache item.
|
|
761
|
+
*/
|
|
762
|
+
addNewSelectMultipleCacheItem(key, loadFunction, overrideOld = false) {
|
|
763
|
+
if (!overrideOld && this._selectMultipleCache.has(key)) {
|
|
764
|
+
return;
|
|
765
|
+
}
|
|
766
|
+
const newCacheItem = new CacheField();
|
|
767
|
+
newCacheItem.loadFunction = loadFunction;
|
|
768
|
+
this._selectMultipleCache.set(key, newCacheItem);
|
|
769
|
+
return newCacheItem;
|
|
770
|
+
}
|
|
771
|
+
addNewSelectSingleCacheItem(key, id = BusinessObjectCacheManagerService._NullBoId, loadFunction, overrideOld = false) {
|
|
772
|
+
const cacheId = id.toString();
|
|
773
|
+
if (!overrideOld && this.hasSingleCacheItem(key, id)) {
|
|
774
|
+
return;
|
|
775
|
+
}
|
|
776
|
+
if (!this._selectSingleCache.has(key)) {
|
|
777
|
+
this._selectSingleCache.set(key, {});
|
|
778
|
+
}
|
|
779
|
+
const newCacheItem = new CacheField();
|
|
780
|
+
newCacheItem.loadFunction = loadFunction;
|
|
781
|
+
this._selectSingleCache.get(key)[cacheId] = newCacheItem;
|
|
782
|
+
return newCacheItem;
|
|
783
|
+
}
|
|
784
|
+
addNewSelectSingleParameterizedCacheItem(key, loadFunction, overrideOld = false) {
|
|
785
|
+
if (!overrideOld && this._selectSingleParameterizedCache.has(key)) {
|
|
786
|
+
return;
|
|
787
|
+
}
|
|
788
|
+
const newCacheItem = new ParameterCacheField();
|
|
789
|
+
newCacheItem.loadFunction = loadFunction;
|
|
790
|
+
this._selectSingleParameterizedCache.set(key, newCacheItem);
|
|
791
|
+
return newCacheItem;
|
|
792
|
+
}
|
|
793
|
+
/**
|
|
794
|
+
* Creates and adds a new parameterized cache item for the given key with the given load function.
|
|
795
|
+
* @param key
|
|
796
|
+
* @param loadFunction e.g. (category: ArticleCategory) => { return this._dataService.selectMultiple(TurnoverGroupImage, category); }
|
|
797
|
+
* @param overrideOld Whether to allow an old cache item with the same key to become override by this newly created cache item.
|
|
798
|
+
*/
|
|
799
|
+
addNewSelectMultipleParameterizedCacheItem(key, loadFunction, overrideOld = false) {
|
|
800
|
+
if (!overrideOld && this._selectMultipleParameterizedCache.has(key)) {
|
|
801
|
+
return;
|
|
802
|
+
}
|
|
803
|
+
const newCacheItem = new ParameterCacheField();
|
|
804
|
+
newCacheItem.loadFunction = loadFunction;
|
|
805
|
+
this._selectMultipleParameterizedCache.set(key, newCacheItem);
|
|
806
|
+
return newCacheItem;
|
|
807
|
+
}
|
|
808
|
+
hasSelectMultipleCacheItem(key) {
|
|
809
|
+
return this._selectMultipleCache.has(key);
|
|
810
|
+
}
|
|
811
|
+
hasSingleCacheItem(key, id = BusinessObjectCacheManagerService._NullBoId) {
|
|
812
|
+
const cacheId = id.toString();
|
|
813
|
+
return this._selectSingleCache.has(key) && !!this._selectSingleCache.get(key)[cacheId];
|
|
814
|
+
}
|
|
815
|
+
hasSelectMultipleParameterizedCacheItem(key) {
|
|
816
|
+
return this._selectMultipleParameterizedCache.has(key);
|
|
817
|
+
}
|
|
818
|
+
hasSelectSingleParameterizedCacheItem(key) {
|
|
819
|
+
return this._selectSingleParameterizedCache.has(key);
|
|
820
|
+
}
|
|
821
|
+
// Returns the simple cache item with the given key. T is the type of the cache value items requested, e.g. Color.
|
|
822
|
+
getSelectMultipleCacheItem(key) {
|
|
823
|
+
return this._selectMultipleCache.get(key);
|
|
824
|
+
}
|
|
825
|
+
getSingleCacheItem(key, id = BusinessObjectCacheManagerService._NullBoId) {
|
|
826
|
+
const cacheId = id.toString();
|
|
827
|
+
return this._selectSingleCache.has(key) && this._selectSingleCache.get(key)[cacheId];
|
|
828
|
+
}
|
|
829
|
+
// Returns the parameterized cache item with the given key. T is the type of the cache value items requested, e.g. Color.
|
|
830
|
+
getSelectMultipleParameterCacheItem(key) {
|
|
831
|
+
return this._selectMultipleParameterizedCache.get(key);
|
|
832
|
+
}
|
|
833
|
+
getSelectSingleParameterCacheItem(key) {
|
|
834
|
+
return this._selectSingleParameterizedCache.get(key);
|
|
835
|
+
}
|
|
836
|
+
_reset() {
|
|
837
|
+
this._selectMultipleCache.forEach((cacheItem) => {
|
|
838
|
+
if (cacheItem) {
|
|
839
|
+
cacheItem.reset();
|
|
518
840
|
}
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
841
|
+
});
|
|
842
|
+
this._selectSingleCache.forEach((cache) => {
|
|
843
|
+
if (cache) {
|
|
844
|
+
ObjectUtils.ForOwnProperty(cache, (cacheField) => {
|
|
845
|
+
cacheField.reset();
|
|
846
|
+
});
|
|
522
847
|
}
|
|
523
848
|
});
|
|
849
|
+
this._selectSingleParameterizedCache.forEach((selSinParamCacheItem) => {
|
|
850
|
+
if (selSinParamCacheItem) {
|
|
851
|
+
selSinParamCacheItem.reset();
|
|
852
|
+
}
|
|
853
|
+
});
|
|
854
|
+
this._selectMultipleParameterizedCache.forEach((selMulParamCacheItem) => {
|
|
855
|
+
if (selMulParamCacheItem) {
|
|
856
|
+
selMulParamCacheItem.reset();
|
|
857
|
+
}
|
|
858
|
+
});
|
|
859
|
+
this.reset.next();
|
|
524
860
|
}
|
|
525
861
|
}
|
|
526
|
-
|
|
527
|
-
|
|
862
|
+
BusinessObjectCacheManagerService._NullBoId = -1;
|
|
863
|
+
BusinessObjectCacheManagerService.ɵprov = i0.ɵɵdefineInjectable({ factory: function BusinessObjectCacheManagerService_Factory() { return new BusinessObjectCacheManagerService(); }, token: BusinessObjectCacheManagerService, providedIn: "root" });
|
|
864
|
+
BusinessObjectCacheManagerService.decorators = [
|
|
865
|
+
{ type: Injectable, args: [{
|
|
866
|
+
providedIn: "root"
|
|
867
|
+
},] }
|
|
528
868
|
];
|
|
529
869
|
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
this._jsonUtils = _jsonUtils;
|
|
534
|
-
this.dictionaryUrl = 'js/browser/res/dictionary/';
|
|
535
|
-
this.dictionaryLoaded = new Subject();
|
|
536
|
-
this._dictionaryPromise = new Map();
|
|
537
|
-
this._dictionaries = new Map();
|
|
538
|
-
// Some dictionary values have one or more '|~' texts in them, meant to be replaced with client-side given texts.
|
|
539
|
-
this._placeholder = '|~';
|
|
870
|
+
class SelectSingleCacheService {
|
|
871
|
+
constructor(_boCacheManager) {
|
|
872
|
+
this._boCacheManager = _boCacheManager;
|
|
540
873
|
}
|
|
541
|
-
|
|
542
|
-
|
|
874
|
+
requestCache(clazz, sourceId, loadFunction) {
|
|
875
|
+
if (!this._boCacheManager.hasSingleCacheItem(clazz, sourceId)) {
|
|
876
|
+
this._createCacheItem(clazz, sourceId, loadFunction);
|
|
877
|
+
}
|
|
878
|
+
// noinspection TypeScriptValidateTypes
|
|
879
|
+
return this._boCacheManager.getSingleCacheItem(clazz, sourceId);
|
|
543
880
|
}
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
881
|
+
_createCacheItem(clazz, sourceId, loadFunction) {
|
|
882
|
+
// noinspection TypeScriptValidateTypes
|
|
883
|
+
return this._boCacheManager.addNewSelectSingleCacheItem(clazz, sourceId, loadFunction);
|
|
547
884
|
}
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
885
|
+
}
|
|
886
|
+
SelectSingleCacheService.ɵprov = i0.ɵɵdefineInjectable({ factory: function SelectSingleCacheService_Factory() { return new SelectSingleCacheService(i0.ɵɵinject(BusinessObjectCacheManagerService)); }, token: SelectSingleCacheService, providedIn: "root" });
|
|
887
|
+
SelectSingleCacheService.decorators = [
|
|
888
|
+
{ type: Injectable, args: [{
|
|
889
|
+
providedIn: "root"
|
|
890
|
+
},] }
|
|
891
|
+
];
|
|
892
|
+
SelectSingleCacheService.ctorParameters = () => [
|
|
893
|
+
{ type: BusinessObjectCacheManagerService }
|
|
894
|
+
];
|
|
895
|
+
|
|
896
|
+
class SelectMultipleCacheService {
|
|
897
|
+
constructor(_boCacheManager) {
|
|
898
|
+
this._boCacheManager = _boCacheManager;
|
|
899
|
+
}
|
|
900
|
+
/**
|
|
901
|
+
* Returns the global cache item for the select multiple of the given business object class. Creates a new cache item if not yet exists.
|
|
902
|
+
* @param clazz The BO class, e.g. CustomerFullObject
|
|
903
|
+
* @returns {CacheField<T[]>}
|
|
904
|
+
*/
|
|
905
|
+
requestCache(clazz, loadFunction) {
|
|
906
|
+
if (!this._boCacheManager.hasSelectMultipleCacheItem(clazz)) {
|
|
907
|
+
this._createCacheItem(clazz, loadFunction);
|
|
553
908
|
}
|
|
554
|
-
|
|
909
|
+
// noinspection TypeScriptValidateTypes
|
|
910
|
+
return this._boCacheManager.getSelectMultipleCacheItem(clazz);
|
|
555
911
|
}
|
|
556
|
-
//
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
912
|
+
// Creates and returns a new select multiple cache item into the global business object cache manager for given business object class.
|
|
913
|
+
_createCacheItem(clazz, loadFunction) {
|
|
914
|
+
// noinspection TypeScriptValidateTypes
|
|
915
|
+
return this._boCacheManager.addNewSelectMultipleCacheItem(clazz, loadFunction);
|
|
916
|
+
}
|
|
917
|
+
}
|
|
918
|
+
SelectMultipleCacheService._NullCache = new CacheField();
|
|
919
|
+
SelectMultipleCacheService.ɵprov = i0.ɵɵdefineInjectable({ factory: function SelectMultipleCacheService_Factory() { return new SelectMultipleCacheService(i0.ɵɵinject(BusinessObjectCacheManagerService)); }, token: SelectMultipleCacheService, providedIn: "root" });
|
|
920
|
+
SelectMultipleCacheService.decorators = [
|
|
921
|
+
{ type: Injectable, args: [{
|
|
922
|
+
providedIn: "root"
|
|
923
|
+
},] }
|
|
924
|
+
];
|
|
925
|
+
SelectMultipleCacheService.ctorParameters = () => [
|
|
926
|
+
{ type: BusinessObjectCacheManagerService }
|
|
927
|
+
];
|
|
928
|
+
|
|
929
|
+
// service resonsible for filling the global BO cache manager service with parameterized select multiple cache items
|
|
930
|
+
class SelectMultipleParameterizedCacheService {
|
|
931
|
+
constructor(_boCacheManager) {
|
|
932
|
+
this._boCacheManager = _boCacheManager;
|
|
933
|
+
// emits after this select multiple parameterized cache service has been reset (e.g. after user logs out)
|
|
934
|
+
this.reset = new Subject();
|
|
935
|
+
this._subs = [];
|
|
936
|
+
this._subs.push(this._boCacheManager.reset.subscribe(() => {
|
|
937
|
+
this.reset.next();
|
|
938
|
+
}));
|
|
939
|
+
}
|
|
940
|
+
ngOnDestroy() {
|
|
941
|
+
this._subs.forEach(sub => sub.unsubscribe());
|
|
575
942
|
}
|
|
576
943
|
/**
|
|
577
|
-
* Returns the
|
|
578
|
-
* @param
|
|
579
|
-
* @
|
|
580
|
-
* @param {string[]} replacementTexts Rest params for replacement of '|~' in returned dict value
|
|
581
|
-
* @returns {string} The translated text for given dictionary key
|
|
944
|
+
* Returns the global cache item for the parameterized select multiple of the given business object class. Creates a new cache item if not yet exists.
|
|
945
|
+
* @param clazz The BO class, used for undeflying dataService.selectMultiple(clazz) call.
|
|
946
|
+
* @returns {CacheField<T[]>}
|
|
582
947
|
*/
|
|
583
|
-
|
|
584
|
-
if (!
|
|
585
|
-
|
|
586
|
-
}
|
|
587
|
-
else if (!this._dictionaryLoaded(this._language)) {
|
|
588
|
-
return key;
|
|
948
|
+
requestCache(clazz, loadFunction) {
|
|
949
|
+
if (!this._boCacheManager.hasSelectMultipleParameterizedCacheItem(clazz)) {
|
|
950
|
+
this._createParameterizedCacheItem(clazz, loadFunction);
|
|
589
951
|
}
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
if (upperCaseFirst) {
|
|
593
|
-
text = text.charAt(0).toUpperCase() + text.slice(1);
|
|
594
|
-
}
|
|
595
|
-
else {
|
|
596
|
-
text = text.charAt(0).toLowerCase() + text.slice(1);
|
|
597
|
-
}
|
|
598
|
-
if (replacementTexts.length > 0) {
|
|
599
|
-
text = StringUtils.ReplaceOccurrencesIn(text, this._placeholder, ...replacementTexts);
|
|
600
|
-
}
|
|
601
|
-
return text;
|
|
952
|
+
// noinspection TypeScriptValidateTypes
|
|
953
|
+
return this._boCacheManager.getSelectMultipleParameterCacheItem(clazz);
|
|
602
954
|
}
|
|
603
|
-
|
|
604
|
-
|
|
955
|
+
// Creates and returns a new parameterized select multiple cache item into the global business object cache manager for given business object class.
|
|
956
|
+
_createParameterizedCacheItem(clazz, loadFunction) {
|
|
957
|
+
// noinspection TypeScriptValidateTypes
|
|
958
|
+
return this._boCacheManager.addNewSelectMultipleParameterizedCacheItem(clazz, loadFunction);
|
|
605
959
|
}
|
|
606
960
|
}
|
|
607
|
-
|
|
608
|
-
|
|
961
|
+
SelectMultipleParameterizedCacheService.ɵprov = i0.ɵɵdefineInjectable({ factory: function SelectMultipleParameterizedCacheService_Factory() { return new SelectMultipleParameterizedCacheService(i0.ɵɵinject(BusinessObjectCacheManagerService)); }, token: SelectMultipleParameterizedCacheService, providedIn: "root" });
|
|
962
|
+
SelectMultipleParameterizedCacheService.decorators = [
|
|
963
|
+
{ type: Injectable, args: [{
|
|
964
|
+
providedIn: "root"
|
|
965
|
+
},] }
|
|
609
966
|
];
|
|
610
|
-
|
|
611
|
-
{ type:
|
|
967
|
+
SelectMultipleParameterizedCacheService.ctorParameters = () => [
|
|
968
|
+
{ type: BusinessObjectCacheManagerService }
|
|
612
969
|
];
|
|
613
970
|
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
this.
|
|
618
|
-
this.
|
|
619
|
-
this.
|
|
620
|
-
this.
|
|
621
|
-
this.
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
this.maxItemsPerPage = 20;
|
|
625
|
-
this.addArticleButtonText = 'ADD TO CART';
|
|
626
|
-
this.collapseFilterByDefault = false;
|
|
627
|
-
this.sortTurnoverGroupsByAlphabet = true;
|
|
628
|
-
this.searchOnStart = false;
|
|
971
|
+
// service resonsible for filling the global BO cache manager service with parameterized select single cache items
|
|
972
|
+
class SelectSingleParameterizedCacheService {
|
|
973
|
+
constructor(_boCacheManager) {
|
|
974
|
+
this._boCacheManager = _boCacheManager;
|
|
975
|
+
// emits after this select single parameterized cache service has been reset (e.g. after user logs out)
|
|
976
|
+
this.reset = new Subject();
|
|
977
|
+
this._subs = [];
|
|
978
|
+
this._subs.push(this._boCacheManager.reset.subscribe(() => {
|
|
979
|
+
this.reset.next();
|
|
980
|
+
}));
|
|
629
981
|
}
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
class Settings {
|
|
633
|
-
constructor() {
|
|
634
|
-
this.session = undefined;
|
|
635
|
-
this.useEncryption = true;
|
|
636
|
-
this.type = "V";
|
|
637
|
-
this.options = new SettingsOptions();
|
|
982
|
+
ngOnDestroy() {
|
|
983
|
+
this._subs.forEach(sub => sub.unsubscribe());
|
|
638
984
|
}
|
|
639
|
-
|
|
985
|
+
/**
|
|
986
|
+
* Returns the global cache item for the parameterized select single of the given business object class. Creates a new cache item if not yet exists.
|
|
987
|
+
* @param clazz The BO class, used for undeflying dataService.selectSingle(clazz) call.
|
|
988
|
+
* @returns {CacheField<T>}
|
|
989
|
+
*/
|
|
990
|
+
requestCache(clazz, loadFunction) {
|
|
991
|
+
if (!this._boCacheManager.hasSelectSingleParameterizedCacheItem(clazz)) {
|
|
992
|
+
this._createParameterizedCacheItem(clazz, loadFunction);
|
|
993
|
+
}
|
|
994
|
+
// noinspection TypeScriptValidateTypes
|
|
995
|
+
return this._boCacheManager.getSelectSingleParameterCacheItem(clazz);
|
|
996
|
+
}
|
|
997
|
+
// Creates and returns a new parameterized select single cache item into the global business object cache manager for given business object class.
|
|
998
|
+
_createParameterizedCacheItem(clazz, loadFunction) {
|
|
999
|
+
// noinspection TypeScriptValidateTypes
|
|
1000
|
+
return this._boCacheManager.addNewSelectSingleParameterizedCacheItem(clazz, loadFunction);
|
|
1001
|
+
}
|
|
1002
|
+
}
|
|
1003
|
+
SelectSingleParameterizedCacheService.ɵprov = i0.ɵɵdefineInjectable({ factory: function SelectSingleParameterizedCacheService_Factory() { return new SelectSingleParameterizedCacheService(i0.ɵɵinject(BusinessObjectCacheManagerService)); }, token: SelectSingleParameterizedCacheService, providedIn: "root" });
|
|
1004
|
+
SelectSingleParameterizedCacheService.decorators = [
|
|
1005
|
+
{ type: Injectable, args: [{
|
|
1006
|
+
providedIn: "root"
|
|
1007
|
+
},] }
|
|
1008
|
+
];
|
|
1009
|
+
SelectSingleParameterizedCacheService.ctorParameters = () => [
|
|
1010
|
+
{ type: BusinessObjectCacheManagerService }
|
|
1011
|
+
];
|
|
640
1012
|
|
|
641
|
-
class
|
|
642
|
-
constructor(
|
|
643
|
-
this.
|
|
644
|
-
this.
|
|
645
|
-
this.
|
|
646
|
-
this.
|
|
1013
|
+
class CatalogConnectorService {
|
|
1014
|
+
constructor(_adapterService, _selectSingleCacheService, _selectMultipleCacheService, _selectMultipleParameterizedCacheService, _selectSingleParameterizedCacheService) {
|
|
1015
|
+
this._adapterService = _adapterService;
|
|
1016
|
+
this._selectSingleCacheService = _selectSingleCacheService;
|
|
1017
|
+
this._selectMultipleCacheService = _selectMultipleCacheService;
|
|
1018
|
+
this._selectMultipleParameterizedCacheService = _selectMultipleParameterizedCacheService;
|
|
1019
|
+
this._selectSingleParameterizedCacheService = _selectSingleParameterizedCacheService;
|
|
1020
|
+
this._boFactory = new BusinessObjectFactory();
|
|
647
1021
|
}
|
|
648
|
-
|
|
649
|
-
this
|
|
1022
|
+
initConnector(settings, forceReload) {
|
|
1023
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1024
|
+
yield this._adapterService.initConnector(settings, forceReload);
|
|
1025
|
+
});
|
|
650
1026
|
}
|
|
651
|
-
|
|
652
|
-
return this
|
|
1027
|
+
getArticlesForCatalog(params, showLoader = true) {
|
|
1028
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1029
|
+
return this._adapterService.getArticlesForCatalog(params, showLoader);
|
|
1030
|
+
});
|
|
653
1031
|
}
|
|
654
|
-
|
|
1032
|
+
getArticleCategories(publicationCode) {
|
|
655
1033
|
return __awaiter(this, void 0, void 0, function* () {
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
this.settings = Object.assign(new Settings(), jsonSettings);
|
|
660
|
-
this.settings.options = Object.assign(new SettingsOptions(), this.settings.options);
|
|
661
|
-
this.settingsFinished();
|
|
662
|
-
}
|
|
663
|
-
else {
|
|
664
|
-
this.settings = Object.assign(new Settings(), settings);
|
|
665
|
-
this.settings.options = Object.assign(new SettingsOptions(), this.settings.options);
|
|
666
|
-
this.settingsFinished();
|
|
667
|
-
}
|
|
1034
|
+
return this._selectMultipleParameterizedCacheService.requestCache(ArticleCategory, (publicationCode) => {
|
|
1035
|
+
return this._adapterService.getArticleCategories(publicationCode);
|
|
1036
|
+
}).getValue(publicationCode);
|
|
668
1037
|
});
|
|
669
1038
|
}
|
|
670
|
-
|
|
1039
|
+
getCatalogDefinitions(showLoader = true) {
|
|
671
1040
|
return __awaiter(this, void 0, void 0, function* () {
|
|
672
|
-
|
|
673
|
-
this.
|
|
674
|
-
}
|
|
675
|
-
if (obj.hasOwnProperty('url')) {
|
|
676
|
-
this.settings.url = obj['url'];
|
|
677
|
-
}
|
|
678
|
-
if (obj.hasOwnProperty('schema')) {
|
|
679
|
-
this.settings.schema = obj['schema'];
|
|
680
|
-
}
|
|
681
|
-
if (obj.hasOwnProperty('version')) {
|
|
682
|
-
this.settings.version = obj['version'];
|
|
683
|
-
}
|
|
684
|
-
if (obj.hasOwnProperty('branch')) {
|
|
685
|
-
this.settings.branch = obj['branch'];
|
|
686
|
-
}
|
|
687
|
-
if (obj.hasOwnProperty('currency')) {
|
|
688
|
-
this.settings.currency = obj['currency'];
|
|
689
|
-
}
|
|
690
|
-
if (obj.hasOwnProperty('languageCode')) {
|
|
691
|
-
this.settings.languageCode = obj['languageCode'];
|
|
692
|
-
}
|
|
693
|
-
if (obj.hasOwnProperty('username')) {
|
|
694
|
-
this.settings.username = obj['username'];
|
|
695
|
-
}
|
|
696
|
-
if (obj.hasOwnProperty('password')) {
|
|
697
|
-
this.settings.password = obj['password'];
|
|
698
|
-
}
|
|
699
|
-
if (obj.hasOwnProperty('timeoutInMs')) {
|
|
700
|
-
this.settings.timeoutInMs = obj['timeoutInMs'];
|
|
701
|
-
}
|
|
702
|
-
if (obj.hasOwnProperty('session')) {
|
|
703
|
-
this.settings.session = obj['session'];
|
|
704
|
-
}
|
|
705
|
-
if (obj.hasOwnProperty('useEncryption')) {
|
|
706
|
-
this.settings.useEncryption = obj['useEncryption'];
|
|
707
|
-
}
|
|
708
|
-
if (obj.hasOwnProperty('additionalTranslationFile')) {
|
|
709
|
-
this.settings.additionalTranslationFile = obj['additionalTranslationFile'];
|
|
710
|
-
}
|
|
711
|
-
if (obj.hasOwnProperty('type')) {
|
|
712
|
-
this.settings.type = obj['type'];
|
|
713
|
-
}
|
|
714
|
-
if (obj.hasOwnProperty('options')) {
|
|
715
|
-
Object.assign(this.settings.options, obj['options']);
|
|
716
|
-
}
|
|
717
|
-
if (obj.hasOwnProperty('catalogParameters')) {
|
|
718
|
-
this.settings.catalogParameters = obj['catalogParameters'];
|
|
719
|
-
}
|
|
720
|
-
this.settingsFinished();
|
|
1041
|
+
return this._selectMultipleCacheService.requestCache(CatalogDefinition, () => {
|
|
1042
|
+
return this._adapterService.getCatalogDefinitions(showLoader);
|
|
1043
|
+
}).getValue();
|
|
721
1044
|
});
|
|
722
1045
|
}
|
|
723
|
-
|
|
1046
|
+
getExternalSource(externalSourceId, showLoader = true) {
|
|
724
1047
|
return __awaiter(this, void 0, void 0, function* () {
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
1048
|
+
return this._selectSingleCacheService.requestCache(ExternalSource, externalSourceId, () => {
|
|
1049
|
+
return this._adapterService.getExternalSource(externalSourceId, showLoader);
|
|
1050
|
+
}).getValue();
|
|
1051
|
+
});
|
|
1052
|
+
}
|
|
1053
|
+
getCatalogFilter(params) {
|
|
1054
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1055
|
+
return this._adapterService.getCatalogFilter(params);
|
|
1056
|
+
});
|
|
1057
|
+
}
|
|
1058
|
+
getPriceFilter(params) {
|
|
1059
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1060
|
+
return this._adapterService.getPriceFilter(params);
|
|
1061
|
+
});
|
|
1062
|
+
}
|
|
1063
|
+
getArticleGroupsFilter(params) {
|
|
1064
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1065
|
+
return this._adapterService.getArticleGroupsFilter(params);
|
|
731
1066
|
});
|
|
732
1067
|
}
|
|
1068
|
+
getAtmosphereFilter(params) {
|
|
1069
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1070
|
+
return this._adapterService.getAtmosphereFilter(params);
|
|
1071
|
+
});
|
|
1072
|
+
}
|
|
1073
|
+
getColorFilter(params) {
|
|
1074
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1075
|
+
return this._adapterService.getColorFilter(params);
|
|
1076
|
+
});
|
|
1077
|
+
}
|
|
1078
|
+
getConceptFilter(params) {
|
|
1079
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1080
|
+
return this._adapterService.getConceptFilter(params);
|
|
1081
|
+
});
|
|
1082
|
+
}
|
|
1083
|
+
getDesignFilter(params) {
|
|
1084
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1085
|
+
return this._adapterService.getDesignFilter(params);
|
|
1086
|
+
});
|
|
1087
|
+
}
|
|
1088
|
+
getMainArticleFilter(params) {
|
|
1089
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1090
|
+
return this._adapterService.getMainArticleFilter(params);
|
|
1091
|
+
});
|
|
1092
|
+
}
|
|
1093
|
+
getMaterialFilter(params) {
|
|
1094
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1095
|
+
return this._adapterService.getMaterialFilter(params);
|
|
1096
|
+
});
|
|
1097
|
+
}
|
|
1098
|
+
getTagsFilter(params) {
|
|
1099
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1100
|
+
return this._adapterService.getTagsFilter(params);
|
|
1101
|
+
});
|
|
1102
|
+
}
|
|
1103
|
+
getTurnoverGroupFilter(params) {
|
|
1104
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1105
|
+
return this._adapterService.getTurnoverGroupFilter(params);
|
|
1106
|
+
});
|
|
1107
|
+
}
|
|
1108
|
+
getArticlePrice(goodId, type) {
|
|
1109
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1110
|
+
return this._adapterService.getArticlePrice(goodId, type);
|
|
1111
|
+
});
|
|
1112
|
+
}
|
|
1113
|
+
getDocumentContent(docId, thumbnail = true) {
|
|
1114
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1115
|
+
return this._selectSingleParameterizedCacheService.requestCache(String, (docId, thumbnail) => {
|
|
1116
|
+
return this._adapterService.getDocumentContent(docId, thumbnail);
|
|
1117
|
+
}).getValue(docId, thumbnail);
|
|
1118
|
+
});
|
|
1119
|
+
}
|
|
1120
|
+
getJsonArticleFlatTree(goodId, goodType, quantity, showLoader = true, instanceId = undefined, configuratorStatistics) {
|
|
1121
|
+
return this._adapterService.getJsonArticleFlatTree(goodId, goodType, quantity, showLoader, undefined, configuratorStatistics);
|
|
1122
|
+
}
|
|
733
1123
|
}
|
|
734
|
-
|
|
735
|
-
|
|
1124
|
+
CatalogConnectorService.ɵprov = i0.ɵɵdefineInjectable({ factory: function CatalogConnectorService_Factory() { return new CatalogConnectorService(i0.ɵɵinject(CatalogConnectorAdapterService), i0.ɵɵinject(SelectSingleCacheService), i0.ɵɵinject(SelectMultipleCacheService), i0.ɵɵinject(SelectMultipleParameterizedCacheService), i0.ɵɵinject(SelectSingleParameterizedCacheService)); }, token: CatalogConnectorService, providedIn: "root" });
|
|
1125
|
+
CatalogConnectorService.decorators = [
|
|
1126
|
+
{ type: Injectable, args: [{
|
|
1127
|
+
providedIn: 'root'
|
|
1128
|
+
},] }
|
|
736
1129
|
];
|
|
737
|
-
|
|
738
|
-
{ type:
|
|
739
|
-
{ type:
|
|
1130
|
+
CatalogConnectorService.ctorParameters = () => [
|
|
1131
|
+
{ type: CatalogConnectorAdapterService },
|
|
1132
|
+
{ type: SelectSingleCacheService },
|
|
1133
|
+
{ type: SelectMultipleCacheService },
|
|
1134
|
+
{ type: SelectMultipleParameterizedCacheService },
|
|
1135
|
+
{ type: SelectSingleParameterizedCacheService }
|
|
740
1136
|
];
|
|
741
1137
|
|
|
742
|
-
class
|
|
1138
|
+
class CatalogOptionsService {
|
|
743
1139
|
constructor(_dictionary, _settingsService) {
|
|
744
1140
|
this._dictionary = _dictionary;
|
|
745
1141
|
this._settingsService = _settingsService;
|
|
@@ -813,15 +1209,18 @@ class OptionsService {
|
|
|
813
1209
|
return this._parameters;
|
|
814
1210
|
}
|
|
815
1211
|
}
|
|
816
|
-
|
|
817
|
-
|
|
1212
|
+
CatalogOptionsService.ɵprov = i0.ɵɵdefineInjectable({ factory: function CatalogOptionsService_Factory() { return new CatalogOptionsService(i0.ɵɵinject(DictionaryService), i0.ɵɵinject(CatalogSettingsService)); }, token: CatalogOptionsService, providedIn: "root" });
|
|
1213
|
+
CatalogOptionsService.decorators = [
|
|
1214
|
+
{ type: Injectable, args: [{
|
|
1215
|
+
providedIn: 'root'
|
|
1216
|
+
},] }
|
|
818
1217
|
];
|
|
819
|
-
|
|
1218
|
+
CatalogOptionsService.ctorParameters = () => [
|
|
820
1219
|
{ type: DictionaryService },
|
|
821
|
-
{ type:
|
|
1220
|
+
{ type: CatalogSettingsService }
|
|
822
1221
|
];
|
|
823
1222
|
|
|
824
|
-
class
|
|
1223
|
+
class CatalogImageService {
|
|
825
1224
|
constructor(_iOneController) {
|
|
826
1225
|
this._iOneController = _iOneController;
|
|
827
1226
|
this._articleImages = new Map();
|
|
@@ -930,20 +1329,16 @@ class ImageService {
|
|
|
930
1329
|
}
|
|
931
1330
|
}
|
|
932
1331
|
}
|
|
933
|
-
|
|
934
|
-
|
|
1332
|
+
CatalogImageService.ɵprov = i0.ɵɵdefineInjectable({ factory: function CatalogImageService_Factory() { return new CatalogImageService(i0.ɵɵinject(CatalogConnectorService)); }, token: CatalogImageService, providedIn: "root" });
|
|
1333
|
+
CatalogImageService.decorators = [
|
|
1334
|
+
{ type: Injectable, args: [{
|
|
1335
|
+
providedIn: 'root'
|
|
1336
|
+
},] }
|
|
935
1337
|
];
|
|
936
|
-
|
|
937
|
-
{ type:
|
|
1338
|
+
CatalogImageService.ctorParameters = () => [
|
|
1339
|
+
{ type: CatalogConnectorService }
|
|
938
1340
|
];
|
|
939
1341
|
|
|
940
|
-
class ExternalSourceViewmodel {
|
|
941
|
-
constructor(catalog, source) {
|
|
942
|
-
this.catalogDefinition = catalog;
|
|
943
|
-
this.externalSource = source;
|
|
944
|
-
}
|
|
945
|
-
}
|
|
946
|
-
|
|
947
1342
|
class FilterItemViewmodel {
|
|
948
1343
|
constructor(code, description, count, filter) {
|
|
949
1344
|
this.checked = false;
|
|
@@ -965,7 +1360,7 @@ class FilterViewmodel {
|
|
|
965
1360
|
}
|
|
966
1361
|
}
|
|
967
1362
|
|
|
968
|
-
class
|
|
1363
|
+
class CatalogFilterService {
|
|
969
1364
|
constructor(_iOneController) {
|
|
970
1365
|
this._iOneController = _iOneController;
|
|
971
1366
|
this.priceMinFilter = 0;
|
|
@@ -1041,21 +1436,181 @@ class FilterService {
|
|
|
1041
1436
|
return this.filterItemMap.get(key);
|
|
1042
1437
|
}
|
|
1043
1438
|
}
|
|
1044
|
-
|
|
1045
|
-
|
|
1439
|
+
CatalogFilterService.ɵprov = i0.ɵɵdefineInjectable({ factory: function CatalogFilterService_Factory() { return new CatalogFilterService(i0.ɵɵinject(CatalogConnectorService)); }, token: CatalogFilterService, providedIn: "root" });
|
|
1440
|
+
CatalogFilterService.decorators = [
|
|
1441
|
+
{ type: Injectable, args: [{
|
|
1442
|
+
providedIn: 'root'
|
|
1443
|
+
},] }
|
|
1444
|
+
];
|
|
1445
|
+
CatalogFilterService.ctorParameters = () => [
|
|
1446
|
+
{ type: CatalogConnectorService }
|
|
1447
|
+
];
|
|
1448
|
+
|
|
1449
|
+
class CatalogSearchService {
|
|
1450
|
+
constructor(_filterService, _catalogConnectorService, _settingsService, _optionService) {
|
|
1451
|
+
this._filterService = _filterService;
|
|
1452
|
+
this._catalogConnectorService = _catalogConnectorService;
|
|
1453
|
+
this._settingsService = _settingsService;
|
|
1454
|
+
this._optionService = _optionService;
|
|
1455
|
+
this.searchRequest = new ArticleExtendedRequest();
|
|
1456
|
+
this.previousSearchRequest = new ArticleExtendedRequest();
|
|
1457
|
+
// public activeSearchViewMode: SearchViewMode = SearchViewMode.FullScreen;
|
|
1458
|
+
// public activeSearchBarViewMode: SearchbarViewMode = SearchbarViewMode.Expanded;
|
|
1459
|
+
this.showFilterSidebar = false;
|
|
1460
|
+
this.articles = [];
|
|
1461
|
+
this.articlesPerPage = 20;
|
|
1462
|
+
this._currentPage = 1;
|
|
1463
|
+
this._filterText = [];
|
|
1464
|
+
this._subs = [];
|
|
1465
|
+
this._subs.push(this._optionService.parametersSet.subscribe((isSet) => {
|
|
1466
|
+
if (isSet) {
|
|
1467
|
+
if (this._settingsService.settings.options.searchOnStart) {
|
|
1468
|
+
this.searchArticles();
|
|
1469
|
+
}
|
|
1470
|
+
}
|
|
1471
|
+
}));
|
|
1472
|
+
}
|
|
1473
|
+
set filterText(value) {
|
|
1474
|
+
this._setRequestParametersAndProps(null, null, value);
|
|
1475
|
+
// this.searchTextChanged.next(this.filterText);
|
|
1476
|
+
this.searchArticles();
|
|
1477
|
+
}
|
|
1478
|
+
get filterText() {
|
|
1479
|
+
return this._filterText;
|
|
1480
|
+
}
|
|
1481
|
+
set turnoverGroup(value) {
|
|
1482
|
+
this._setRequestParametersAndProps(null, value, null);
|
|
1483
|
+
// this.turnoverGroupChanged.next(this.turnoverGroup);
|
|
1484
|
+
this.searchArticles();
|
|
1485
|
+
}
|
|
1486
|
+
get turnoverGroup() {
|
|
1487
|
+
return this._turnoverGroup;
|
|
1488
|
+
}
|
|
1489
|
+
set category(value) {
|
|
1490
|
+
this._setRequestParametersAndProps(value, null, null);
|
|
1491
|
+
// this.categoryChanged.next(this.category);
|
|
1492
|
+
this.searchArticles();
|
|
1493
|
+
}
|
|
1494
|
+
get category() {
|
|
1495
|
+
return this._category;
|
|
1496
|
+
}
|
|
1497
|
+
get currentPage() {
|
|
1498
|
+
return this._currentPage;
|
|
1499
|
+
}
|
|
1500
|
+
set currentPage(value) {
|
|
1501
|
+
this._currentPage = value;
|
|
1502
|
+
this.searchArticles();
|
|
1503
|
+
}
|
|
1504
|
+
ngOnDestroy() {
|
|
1505
|
+
this._subs.forEach(s => s.unsubscribe());
|
|
1506
|
+
}
|
|
1507
|
+
filterOnCollection(collection) {
|
|
1508
|
+
if (!collection || collection.length === 0) {
|
|
1509
|
+
return;
|
|
1510
|
+
}
|
|
1511
|
+
let cleared = false;
|
|
1512
|
+
let filterRange = [];
|
|
1513
|
+
const searchFilterProp = this._filterService.getFilterItemMap(collection[0].filter.filterName);
|
|
1514
|
+
if (searchFilterProp) {
|
|
1515
|
+
collection.forEach((viewModel) => {
|
|
1516
|
+
if (!cleared) {
|
|
1517
|
+
this.searchRequest[searchFilterProp] = '';
|
|
1518
|
+
cleared = true;
|
|
1519
|
+
}
|
|
1520
|
+
if (viewModel.checked) {
|
|
1521
|
+
filterRange.push(`?='${viewModel.code}'`);
|
|
1522
|
+
}
|
|
1523
|
+
});
|
|
1524
|
+
this.searchRequest[searchFilterProp] = filterRange.join(',');
|
|
1525
|
+
this.searchArticles();
|
|
1526
|
+
}
|
|
1527
|
+
}
|
|
1528
|
+
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
|
+
const lowerBound = ((this.currentPage - 1) * this.articlesPerPage) + 1;
|
|
1536
|
+
this.searchRequest.paging = new PagingParameters(lowerBound, lowerBound + this.articlesPerPage - 1, this.articlesPerPage);
|
|
1537
|
+
this._catalogConnectorService.getArticlesForCatalog(this.searchRequest).then((result) => {
|
|
1538
|
+
var _a, _b;
|
|
1539
|
+
this.articles = (_a = result.articles) !== null && _a !== void 0 ? _a : [];
|
|
1540
|
+
this.resultCount = (_b = result.count) !== null && _b !== void 0 ? _b : undefined;
|
|
1541
|
+
if (this._settingsService.settings.options.showFilter && getFilters) {
|
|
1542
|
+
this._filterService.getFilters(this.searchRequest);
|
|
1543
|
+
}
|
|
1544
|
+
});
|
|
1545
|
+
this.setPreviousSearchRequest();
|
|
1546
|
+
}
|
|
1547
|
+
resetFilters() {
|
|
1548
|
+
this.setPreviousSearchRequest();
|
|
1549
|
+
this._resetRequest();
|
|
1550
|
+
this.searchRequest.general = this.previousSearchRequest.general;
|
|
1551
|
+
this.searchArticles();
|
|
1552
|
+
}
|
|
1553
|
+
_resetRequest() {
|
|
1554
|
+
this.searchRequest = new ArticleExtendedRequest();
|
|
1555
|
+
}
|
|
1556
|
+
setPreviousSearchRequest() {
|
|
1557
|
+
this.previousSearchRequest = Object.assign({}, this.searchRequest);
|
|
1558
|
+
}
|
|
1559
|
+
isNewGeneralSearch() {
|
|
1560
|
+
return this.previousSearchRequest && this.previousSearchRequest.general !== this.searchRequest.general;
|
|
1561
|
+
}
|
|
1562
|
+
// public get fullscreen(): boolean {
|
|
1563
|
+
// return this.activeSearchViewMode === SearchViewMode.FullScreen;
|
|
1564
|
+
// }
|
|
1565
|
+
//
|
|
1566
|
+
// public get collapsed(): boolean {
|
|
1567
|
+
// return this.activeSearchBarViewMode === SearchbarViewMode.Collapsed;
|
|
1568
|
+
// }
|
|
1569
|
+
toggleFilter() {
|
|
1570
|
+
this.showFilterSidebar = !this.showFilterSidebar;
|
|
1571
|
+
}
|
|
1572
|
+
handleHideFilter() {
|
|
1573
|
+
this.showFilterSidebar = false;
|
|
1574
|
+
}
|
|
1575
|
+
handleResetFilter() {
|
|
1576
|
+
this.resetFilters();
|
|
1577
|
+
this.showFilterSidebar = false;
|
|
1578
|
+
setTimeout(() => {
|
|
1579
|
+
this.showFilterSidebar = true;
|
|
1580
|
+
}, 10);
|
|
1581
|
+
}
|
|
1582
|
+
_setRequestParametersAndProps(category, turnoverGroup, searchText) {
|
|
1583
|
+
this.searchRequest.category = category;
|
|
1584
|
+
this.searchRequest.turnoverGroup = turnoverGroup;
|
|
1585
|
+
this.searchRequest.general = searchText ? searchText.join(' ') : null;
|
|
1586
|
+
// this._category = category;
|
|
1587
|
+
// this._turnoverGroup = turnoverGroup;
|
|
1588
|
+
// this._filterText = searchText;
|
|
1589
|
+
}
|
|
1590
|
+
}
|
|
1591
|
+
CatalogSearchService.ɵprov = i0.ɵɵdefineInjectable({ factory: function CatalogSearchService_Factory() { return new CatalogSearchService(i0.ɵɵinject(CatalogFilterService), i0.ɵɵinject(CatalogConnectorService), i0.ɵɵinject(CatalogSettingsService), i0.ɵɵinject(CatalogOptionsService)); }, token: CatalogSearchService, providedIn: "root" });
|
|
1592
|
+
CatalogSearchService.decorators = [
|
|
1593
|
+
{ type: Injectable, args: [{
|
|
1594
|
+
providedIn: "root"
|
|
1595
|
+
},] }
|
|
1046
1596
|
];
|
|
1047
|
-
|
|
1048
|
-
{ type:
|
|
1597
|
+
CatalogSearchService.ctorParameters = () => [
|
|
1598
|
+
{ type: CatalogFilterService },
|
|
1599
|
+
{ type: CatalogConnectorService },
|
|
1600
|
+
{ type: CatalogSettingsService },
|
|
1601
|
+
{ type: CatalogOptionsService }
|
|
1049
1602
|
];
|
|
1050
1603
|
|
|
1051
1604
|
class CatalogService {
|
|
1052
|
-
constructor(
|
|
1053
|
-
this.
|
|
1054
|
-
this.
|
|
1605
|
+
constructor(connector, connectorAdapter, settingsService, optionsService, _imageService, _settingsService, _filterService, _catalogSearchService) {
|
|
1606
|
+
this.connector = connector;
|
|
1607
|
+
this.connectorAdapter = connectorAdapter;
|
|
1608
|
+
this.settingsService = settingsService;
|
|
1055
1609
|
this.optionsService = optionsService;
|
|
1056
1610
|
this._imageService = _imageService;
|
|
1057
1611
|
this._settingsService = _settingsService;
|
|
1058
1612
|
this._filterService = _filterService;
|
|
1613
|
+
this._catalogSearchService = _catalogSearchService;
|
|
1059
1614
|
this.externalSourceChanged = new BehaviorSubject(undefined);
|
|
1060
1615
|
this.articleSearchFilters = {};
|
|
1061
1616
|
this.articlesOnShowcase = [];
|
|
@@ -1079,10 +1634,10 @@ class CatalogService {
|
|
|
1079
1634
|
this._controllerInitialized = false;
|
|
1080
1635
|
this._subs = [];
|
|
1081
1636
|
this._currentOrderBy = 1;
|
|
1082
|
-
this._subs.push(this.
|
|
1637
|
+
this._subs.push(this.connectorAdapter.controllerInitialized.subscribe((initialized) => __awaiter(this, void 0, void 0, function* () {
|
|
1083
1638
|
if (initialized) {
|
|
1084
1639
|
this._controllerInitialized = true;
|
|
1085
|
-
this.ensureDataListsLoaded();
|
|
1640
|
+
// this.ensureDataListsLoaded();
|
|
1086
1641
|
this.articlesPerPage = this._settingsService.settings.options.maxItemsPerPage;
|
|
1087
1642
|
if (this._settingsService.settings.options.searchOnStart) {
|
|
1088
1643
|
this.searchArticles();
|
|
@@ -1091,41 +1646,47 @@ class CatalogService {
|
|
|
1091
1646
|
})), this.optionsService.parametersSet.subscribe((set) => {
|
|
1092
1647
|
if (set) {
|
|
1093
1648
|
this.defaultOptions = this.optionsService.parameters;
|
|
1094
|
-
this._createDefaultRequest();
|
|
1095
|
-
if (this.optionsService.parameters.general && this._settingsService.settings.options.searchOnStart) {
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
}
|
|
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
|
+
// }
|
|
1099
1654
|
}
|
|
1100
1655
|
}));
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
}
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1656
|
+
/*
|
|
1657
|
+
this.doArticleSearchThrottledFunc = this.utils.getAsThrottledFunction(() => {
|
|
1658
|
+
return this.doSearchArticles();
|
|
1659
|
+
}, this.minMillisBetweenArticleSearches, this);
|
|
1660
|
+
*/
|
|
1661
|
+
}
|
|
1662
|
+
// public set filterText(value: string[]) {
|
|
1663
|
+
// this._setRequestParametersAndProps(null, null, value);
|
|
1664
|
+
// this.searchTextChanged.next(this.filterText);
|
|
1665
|
+
// this.searchArticles();
|
|
1666
|
+
// }
|
|
1667
|
+
//
|
|
1668
|
+
// public get filterText(): string[] {
|
|
1669
|
+
// return this._filterText;
|
|
1670
|
+
// }
|
|
1671
|
+
// public set turnoverGroup(value: string) {
|
|
1672
|
+
// this._setRequestParametersAndProps(null, value, null);
|
|
1673
|
+
// this.turnoverGroupChanged.next(this.turnoverGroup);
|
|
1674
|
+
// this.searchArticles();
|
|
1675
|
+
// }
|
|
1676
|
+
//
|
|
1677
|
+
// public get turnoverGroup(): string {
|
|
1678
|
+
// return this._turnoverGroup;
|
|
1679
|
+
// }
|
|
1680
|
+
//
|
|
1681
|
+
// public set category(value: string) {
|
|
1682
|
+
// this._setRequestParametersAndProps(value, null, null);
|
|
1683
|
+
// this.categoryChanged.next(this.category);
|
|
1684
|
+
// this.searchArticles();
|
|
1685
|
+
// }
|
|
1686
|
+
//
|
|
1687
|
+
// public get category(): string {
|
|
1688
|
+
// return this._category;
|
|
1689
|
+
// }
|
|
1129
1690
|
set externalSourceUrl(url) {
|
|
1130
1691
|
this._externalSourceUrl = url;
|
|
1131
1692
|
this.showExternalSource = true;
|
|
@@ -1162,27 +1723,60 @@ class CatalogService {
|
|
|
1162
1723
|
ngOnDestroy() {
|
|
1163
1724
|
this._subs.forEach(s => s.unsubscribe());
|
|
1164
1725
|
}
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1726
|
+
init(settings) {
|
|
1727
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1728
|
+
yield this.settingsService.initializeSettings(settings);
|
|
1729
|
+
yield this.connector.initConnector(this.settingsService.settings);
|
|
1730
|
+
});
|
|
1731
|
+
}
|
|
1732
|
+
getCategories() {
|
|
1733
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1734
|
+
const categories = yield this.connector.getArticleCategories(this._catalogSearchService.searchRequest.publicationCode);
|
|
1735
|
+
if (categories && categories.length > 0) {
|
|
1736
|
+
for (let i = 0; i < categories.length; i++) {
|
|
1737
|
+
let articleCategory = categories[i];
|
|
1738
|
+
this._imageService.getCategoryImage(articleCategory);
|
|
1739
|
+
articleCategory.turnoverGroups.sort((a, b) => {
|
|
1740
|
+
if (this.optionsService.sortTurnoverGroupsByAlphabet) {
|
|
1741
|
+
return (/[A-Za-z]/.test(a.description)) - (/[A-Za-z]/.test(b.description)) ||
|
|
1742
|
+
(a.description.toUpperCase() < b.description.toUpperCase() ? -1 :
|
|
1743
|
+
a.description.toUpperCase() > b.description.toUpperCase() ? 1 : 0);
|
|
1744
|
+
}
|
|
1745
|
+
else {
|
|
1746
|
+
return +a.turnovergroupNr < +b.turnovergroupNr ? -1 : +a.turnovergroupNr > +b.turnovergroupNr ? 1 : 0;
|
|
1747
|
+
}
|
|
1748
|
+
});
|
|
1180
1749
|
}
|
|
1181
|
-
}
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1750
|
+
}
|
|
1751
|
+
return categories;
|
|
1752
|
+
});
|
|
1753
|
+
}
|
|
1754
|
+
prepareTurnoverGroupImage(group) {
|
|
1755
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1756
|
+
return this._imageService.getTurnoverGroupImage(group);
|
|
1757
|
+
});
|
|
1185
1758
|
}
|
|
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
|
+
// }
|
|
1186
1780
|
changeOrderBy(orderBy) {
|
|
1187
1781
|
this._currentOrderBy = orderBy.id;
|
|
1188
1782
|
this._sortArticleList();
|
|
@@ -1200,13 +1794,13 @@ class CatalogService {
|
|
|
1200
1794
|
});
|
|
1201
1795
|
}
|
|
1202
1796
|
resetFilters() {
|
|
1203
|
-
this._createDefaultRequest();
|
|
1204
|
-
this.category = null;
|
|
1205
|
-
this.turnoverGroup = null;
|
|
1206
|
-
if (this.filterText !== null) {
|
|
1207
|
-
|
|
1208
|
-
}
|
|
1209
|
-
this.onResetFilters.next();
|
|
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();
|
|
1210
1804
|
}
|
|
1211
1805
|
reset() {
|
|
1212
1806
|
this.showCatOrTurnoverGroupArticles = false;
|
|
@@ -1214,55 +1808,43 @@ class CatalogService {
|
|
|
1214
1808
|
}
|
|
1215
1809
|
ensureDataListsLoaded() {
|
|
1216
1810
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1217
|
-
this.externalSourceViewModels.length = 0;
|
|
1218
|
-
this.iOne.getCatalogDefinitions().then((defs) =>
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
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
|
+
// });
|
|
1225
1822
|
});
|
|
1226
1823
|
}
|
|
1227
1824
|
// POST: this.articlesOnShowcase contains all articles for given search parameters.
|
|
1228
1825
|
doSearchArticles(getFilters = true) {
|
|
1229
1826
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1230
|
-
const lowerBound = ((this.currentPage - 1) * this.articlesPerPage) + 1;
|
|
1231
|
-
this.articleSearchFilters.paging = new PagingParameters(lowerBound, lowerBound + this.articlesPerPage - 1, this.articlesPerPage);
|
|
1232
|
-
this.iOne.getArticlesForCatalog(this.articleSearchFilters, false).then((result) => {
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
})
|
|
1242
|
-
if (getFilters) {
|
|
1243
|
-
|
|
1244
|
-
}
|
|
1245
|
-
// todo: get total count of result based on same request to build paging
|
|
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
|
|
1246
1843
|
});
|
|
1247
1844
|
}
|
|
1248
|
-
sortTurnoverGroups(categories) {
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
articleCategory.turnoverGroups.sort((a, b) => {
|
|
1252
|
-
return (/[A-Za-z]/.test(a.description)) - (/[A-Za-z]/.test(b.description)) ||
|
|
1253
|
-
(a.description.toUpperCase() < b.description.toUpperCase() ? -1 :
|
|
1254
|
-
a.description.toUpperCase() > b.description.toUpperCase() ? 1 : 0);
|
|
1255
|
-
});
|
|
1256
|
-
});
|
|
1257
|
-
}
|
|
1258
|
-
else {
|
|
1259
|
-
categories.forEach((articleCategory) => {
|
|
1260
|
-
articleCategory.turnoverGroups.sort((a, b) => {
|
|
1261
|
-
return +a.turnovergroupNr < +b.turnovergroupNr ? -1 : +a.turnovergroupNr > +b.turnovergroupNr ? 1 : 0;
|
|
1262
|
-
});
|
|
1263
|
-
});
|
|
1264
|
-
}
|
|
1265
|
-
}
|
|
1845
|
+
// public sortTurnoverGroups(categories: ArticleCategory[]): void {
|
|
1846
|
+
// }
|
|
1847
|
+
//
|
|
1266
1848
|
_sortArticleList() {
|
|
1267
1849
|
switch (this._currentOrderBy) {
|
|
1268
1850
|
case 1:
|
|
@@ -1288,27 +1870,113 @@ class CatalogService {
|
|
|
1288
1870
|
_createDefaultRequest() {
|
|
1289
1871
|
this.articleSearchFilters = Object.assign({}, this.defaultOptions);
|
|
1290
1872
|
}
|
|
1291
|
-
_setRequestParametersAndProps(category, turnoverGroup, searchText) {
|
|
1292
|
-
this.articleSearchFilters.category = category;
|
|
1293
|
-
this.articleSearchFilters.turnoverGroup = turnoverGroup;
|
|
1294
|
-
this.articleSearchFilters.general = searchText ? searchText.join(' ') : null;
|
|
1295
|
-
this._category = category;
|
|
1296
|
-
this._turnoverGroup = turnoverGroup;
|
|
1297
|
-
this._filterText = searchText;
|
|
1298
|
-
}
|
|
1299
1873
|
}
|
|
1874
|
+
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" });
|
|
1300
1875
|
CatalogService.decorators = [
|
|
1301
|
-
{ type: Injectable
|
|
1876
|
+
{ type: Injectable, args: [{
|
|
1877
|
+
providedIn: 'root'
|
|
1878
|
+
},] }
|
|
1302
1879
|
];
|
|
1303
1880
|
CatalogService.ctorParameters = () => [
|
|
1304
|
-
{ type:
|
|
1305
|
-
{ type:
|
|
1306
|
-
{ type:
|
|
1307
|
-
{ type:
|
|
1308
|
-
{ type:
|
|
1309
|
-
{ type:
|
|
1881
|
+
{ type: CatalogConnectorService },
|
|
1882
|
+
{ type: CatalogConnectorAdapterService },
|
|
1883
|
+
{ type: CatalogSettingsService },
|
|
1884
|
+
{ type: CatalogOptionsService },
|
|
1885
|
+
{ type: CatalogImageService },
|
|
1886
|
+
{ type: CatalogSettingsService },
|
|
1887
|
+
{ type: CatalogFilterService },
|
|
1888
|
+
{ type: CatalogSearchService }
|
|
1310
1889
|
];
|
|
1311
1890
|
|
|
1891
|
+
class CatalogCategoriesComponent {
|
|
1892
|
+
constructor(_catalogService) {
|
|
1893
|
+
this._catalogService = _catalogService;
|
|
1894
|
+
this.showTurnoverGroups = true;
|
|
1895
|
+
this.categoryClick = new EventEmitter();
|
|
1896
|
+
this.turnoverGroupClick = new EventEmitter();
|
|
1897
|
+
this.categories = [];
|
|
1898
|
+
this.turnoverGroups = [];
|
|
1899
|
+
}
|
|
1900
|
+
showClass() {
|
|
1901
|
+
return true;
|
|
1902
|
+
}
|
|
1903
|
+
ngOnInit() {
|
|
1904
|
+
this.categories.length = 0;
|
|
1905
|
+
this.turnoverGroups.length = 0;
|
|
1906
|
+
this.getCategories();
|
|
1907
|
+
}
|
|
1908
|
+
getCategories() {
|
|
1909
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1910
|
+
try {
|
|
1911
|
+
this._catalogService.getCategories().then((cats) => {
|
|
1912
|
+
this.categories = cats;
|
|
1913
|
+
this.prepareTurnoverGroups();
|
|
1914
|
+
});
|
|
1915
|
+
}
|
|
1916
|
+
catch (e) {
|
|
1917
|
+
}
|
|
1918
|
+
});
|
|
1919
|
+
}
|
|
1920
|
+
prepareTurnoverGroups() {
|
|
1921
|
+
this.categories.forEach((category) => {
|
|
1922
|
+
category.turnoverGroups.forEach(tog => this._catalogService.prepareTurnoverGroupImage(tog));
|
|
1923
|
+
this.turnoverGroups.push(...category.turnoverGroups);
|
|
1924
|
+
});
|
|
1925
|
+
}
|
|
1926
|
+
handleCategoryClick(event, category) {
|
|
1927
|
+
this.categoryClick.emit(category);
|
|
1928
|
+
}
|
|
1929
|
+
handleTurnoverGroupClick(event, turnovergroupNr) {
|
|
1930
|
+
this.turnoverGroupClick.emit(turnovergroupNr);
|
|
1931
|
+
}
|
|
1932
|
+
}
|
|
1933
|
+
CatalogCategoriesComponent.decorators = [
|
|
1934
|
+
{ type: Component, args: [{
|
|
1935
|
+
selector: 'co-catalog-categories',
|
|
1936
|
+
template: `
|
|
1937
|
+
<div class="catalog-categories-wrapper">
|
|
1938
|
+
<ng-container *ngIf="categories && categories.length > 0">
|
|
1939
|
+
<div class="categories-wrapper">
|
|
1940
|
+
<div class="category-item" *ngFor="let category of categories" (click)="handleCategoryClick($event, category.category)">
|
|
1941
|
+
<co-image [source]="category.imageData"></co-image>
|
|
1942
|
+
<div class="category-description">
|
|
1943
|
+
<co-responsive-text [text]="category.category | localize"></co-responsive-text>
|
|
1944
|
+
</div>
|
|
1945
|
+
<!--
|
|
1946
|
+
<span [textContent]="category.category | localize"></span>
|
|
1947
|
+
-->
|
|
1948
|
+
</div>
|
|
1949
|
+
</div>
|
|
1950
|
+
<ng-container *ngIf="showTurnoverGroups">
|
|
1951
|
+
<div class="turnovergroup-wrapper" *ngFor="let category of categories">
|
|
1952
|
+
<div class="turnovergroup-items-wrapper" *ngIf="category.turnoverGroups && category.turnoverGroups.length > 0">
|
|
1953
|
+
<div class="category-title" [textContent]="category.category | localize"></div>
|
|
1954
|
+
<div class="turnovergroup-item-wrapper">
|
|
1955
|
+
<div class="turnovergroup-item" *ngFor="let turnoverGroup of category.turnoverGroups"
|
|
1956
|
+
(click)="handleTurnoverGroupClick($event, turnoverGroup.turnovergroupNr)">
|
|
1957
|
+
<co-image [source]="turnoverGroup.imageData"></co-image>
|
|
1958
|
+
<div class="turnovergroup-description" [textContent]="turnoverGroup.description | localize"></div>
|
|
1959
|
+
</div>
|
|
1960
|
+
</div>
|
|
1961
|
+
</div>
|
|
1962
|
+
</div>
|
|
1963
|
+
</ng-container>
|
|
1964
|
+
</ng-container>
|
|
1965
|
+
</div>
|
|
1966
|
+
`,
|
|
1967
|
+
encapsulation: ViewEncapsulation.None
|
|
1968
|
+
},] }
|
|
1969
|
+
];
|
|
1970
|
+
CatalogCategoriesComponent.ctorParameters = () => [
|
|
1971
|
+
{ type: CatalogService }
|
|
1972
|
+
];
|
|
1973
|
+
CatalogCategoriesComponent.propDecorators = {
|
|
1974
|
+
showTurnoverGroups: [{ type: Input }],
|
|
1975
|
+
categoryClick: [{ type: Output }],
|
|
1976
|
+
turnoverGroupClick: [{ type: Output }],
|
|
1977
|
+
showClass: [{ type: HostBinding, args: ['class.co-catalog-categories',] }]
|
|
1978
|
+
};
|
|
1979
|
+
|
|
1312
1980
|
/** AUTO GENERATED FILE. DO NOT CHANGE.. **/
|
|
1313
1981
|
var IconEnum;
|
|
1314
1982
|
(function (IconEnum) {
|
|
@@ -1383,87 +2051,25 @@ class IconCacheService {
|
|
|
1383
2051
|
}
|
|
1384
2052
|
}
|
|
1385
2053
|
}
|
|
2054
|
+
IconCacheService.ɵprov = i0.ɵɵdefineInjectable({ factory: function IconCacheService_Factory() { return new IconCacheService(i0.ɵɵinject(i1.DomSanitizer)); }, token: IconCacheService, providedIn: "root" });
|
|
1386
2055
|
IconCacheService.decorators = [
|
|
1387
|
-
{ type: Injectable
|
|
2056
|
+
{ type: Injectable, args: [{
|
|
2057
|
+
providedIn: 'root'
|
|
2058
|
+
},] }
|
|
1388
2059
|
];
|
|
1389
2060
|
IconCacheService.ctorParameters = () => [
|
|
1390
2061
|
{ type: DomSanitizer }
|
|
1391
2062
|
];
|
|
1392
2063
|
|
|
1393
|
-
class TopContentComponent {
|
|
1394
|
-
constructor(catalog, iconCache) {
|
|
1395
|
-
this.catalog = catalog;
|
|
1396
|
-
this.iconCache = iconCache;
|
|
1397
|
-
this.Icons = IconEnum;
|
|
1398
|
-
this.collapsed = true;
|
|
1399
|
-
}
|
|
1400
|
-
ngOnInit() {
|
|
1401
|
-
}
|
|
1402
|
-
onHandleClick(event) {
|
|
1403
|
-
this.collapsed = !this.collapsed;
|
|
1404
|
-
}
|
|
1405
|
-
onSubmitSearch(event) {
|
|
1406
|
-
// this.catalog.articleSearchFilters.general = this.searchedText.length > 0 ? this.searchedText.join(' ') : null;
|
|
1407
|
-
// this.catalog.articleSearchFilters.description = this.searchedText.length > 0 ? this.searchedText[0] : null;
|
|
1408
|
-
this.catalog.searchArticles();
|
|
1409
|
-
}
|
|
1410
|
-
}
|
|
1411
|
-
TopContentComponent.decorators = [
|
|
1412
|
-
{ type: Component, args: [{
|
|
1413
|
-
selector: 'app-top-content',
|
|
1414
|
-
template: "<div class=\"search-wrapper\">\n <div class=\"main-search\">\n <co-input-text-chips class=\"search-text\" [placeholder]=\"'Zoek op nummer of naam' | localize\" [(value)]=\"catalog.filterText\" (submit)=\"onSubmitSearch($event)\"></co-input-text-chips>\n </div>\n <div *ngIf=\"!collapsed\" @showAdvancedSearch class=\"advanced-search-wrapper\">\n <h2 [textContent]=\"'ADVANCED_SEARCH_OPTIONS' | localize\"></h2>\n <div class=\"advanced-search\">\n <div class=\"flex-column\">\n <co-input-text [label]=\"'NAME' | localize\" [(model)]=\"catalog.articleSearchFilters.name\"></co-input-text>\n </div>\n <div class=\"flex-column\">\n <co-input-yes-no [label]=\"'3D artikel'\" [(model)]=\"catalog.articleSearchFilters.showCompositionArticles\" [trueValue]=\"'Ja'\" [falseValue]=\"'Nee'\"></co-input-yes-no>\n <co-input-yes-no [label]=\"'Inactieve artikelen'\" [(model)]=\"catalog.articleSearchFilters.showInactiveArticles\" [trueValue]=\"'Ja'\" [falseValue]=\"'Nee'\"></co-input-yes-no>\n <co-input-yes-no [label]=\"'Automatisch updaten'\" [(model)]=\"catalog.articleSearchFilters.doSync\" [trueValue]=\"'Ja'\" [falseValue]=\"'Nee'\"></co-input-yes-no>\n </div>\n <div class=\"flex-column\">\n <co-input-text [label]=\"'Inkoopomschrijving'\" [(model)]=\"catalog.articleSearchFilters.purchaseDescription\"></co-input-text>\n <co-input-text [label]=\"'Artikelnummer leverancier'\" [(model)]=\"catalog.articleSearchFilters.artNrSupplier\"></co-input-text>\n <co-input-text [label]=\"'Referentie'\" [(model)]=\"catalog.articleSearchFilters.simpleReference\"></co-input-text>\n </div>\n </div>\n </div>\n</div>\n<div class=\"button-bar\" *ngIf=\"false\">\n <div class=\"reset-filter flex-row\" (click)=\"catalog.resetFilters()\">\n <co-icon class=\"tiny no-border\" [icon]=\"Icons.Refresh\"></co-icon>\n <span [textContent]=\"'Alles leegmaken'\"></span>\n </div>\n <co-button [label]=\"'Zoeken'\" [iconData]=\"iconCache.getIcon(Icons.Search)\" (onClick)=\"catalog.searchArticles()\"></co-button>\n</div>\n<app-icon-handle *ngIf=\"false\" [icon]=\"Icons.ArrowScrollLeft\" (onHandleClick)=\"onHandleClick($event)\" [horizontal]=\"true\"></app-icon-handle>\n",
|
|
1415
|
-
animations: [
|
|
1416
|
-
trigger('showAdvancedSearch', [
|
|
1417
|
-
state('void', style({ height: '0' })),
|
|
1418
|
-
state('*', style({ height: '*' })),
|
|
1419
|
-
transition('void <=> *', animate(200))
|
|
1420
|
-
])
|
|
1421
|
-
],
|
|
1422
|
-
styles: [":host{display:flex;position:relative;flex-direction:column;max-width:100%}app-icon-handle{position:absolute;top:calc(100% - 17px);left:50%}app-icon-handle ::ng-deep co-icon{transform:rotate(90deg)}.search-wrapper{display:flex;flex-direction:column;padding-right:0}.main-search{display:flex;width:100%;flex-direction:row;align-items:center}.search-title{padding-left:0;margin:15px 0;width:380px;box-sizing:border-box}.search-text{justify-self:center;width:440px;border-radius:0}.search-text ::ng-deep div.chips-wrap{height:31px}.search-text ::ng-deep co-input-text{height:32px!important;width:440px!important;margin:0;border-style:solid;border-width:0 0 2px 0;border-color:#dce4ea;border-radius:10px;background:#f5f5fc}.search-text ::ng-deep co-input-text input{height:42px!important;width:100%}.search-text ::ng-deep co-input-text co-icon{width:45px;height:45px}.search-text ::ng-deep co-input-text .vertical-divider{position:relative;top:-2px}.search-text ::ng-deep co-chip-render{height:24px}.advanced-search-wrapper{overflow:hidden}.advanced-search{display:flex;flex-direction:row;flex-wrap:wrap}.advanced-search>div:not(:last-child){margin-right:10px}.button-bar{padding:30px 0;display:flex;align-items:center;justify-content:center}.reset-filter{cursor:pointer;font-size:13px}.flex-column{display:flex;flex-grow:1;flex-direction:column;max-width:340px}.flex-row{display:flex;flex-direction:row}@media screen and (max-width: 550px){.search-wrapper{padding:10px 0}.search-title{display:none;margin:15px 15px 15px 0;font-size:18px;padding:0}}\n"]
|
|
1423
|
-
},] }
|
|
1424
|
-
];
|
|
1425
|
-
TopContentComponent.ctorParameters = () => [
|
|
1426
|
-
{ type: CatalogService },
|
|
1427
|
-
{ type: IconCacheService }
|
|
1428
|
-
];
|
|
1429
|
-
TopContentComponent.propDecorators = {
|
|
1430
|
-
label: [{ type: Input }],
|
|
1431
|
-
description: [{ type: Input }]
|
|
1432
|
-
};
|
|
1433
|
-
|
|
1434
|
-
class MainContentComponent {
|
|
1435
|
-
ngOnInit() {
|
|
1436
|
-
}
|
|
1437
|
-
}
|
|
1438
|
-
MainContentComponent.decorators = [
|
|
1439
|
-
{ type: Component, args: [{
|
|
1440
|
-
selector: 'app-main-content',
|
|
1441
|
-
template: "<app-catalog-page></app-catalog-page>\n",
|
|
1442
|
-
styles: [""]
|
|
1443
|
-
},] }
|
|
1444
|
-
];
|
|
1445
|
-
|
|
1446
|
-
class LeftContentComponent {
|
|
1447
|
-
ngOnInit() {
|
|
1448
|
-
}
|
|
1449
|
-
}
|
|
1450
|
-
LeftContentComponent.decorators = [
|
|
1451
|
-
{ type: Component, args: [{
|
|
1452
|
-
selector: 'app-left-content',
|
|
1453
|
-
template: "<app-catalog-filter></app-catalog-filter>\r\n",
|
|
1454
|
-
styles: [""]
|
|
1455
|
-
},] }
|
|
1456
|
-
];
|
|
1457
|
-
|
|
1458
2064
|
class CatalogFilterComponent {
|
|
1459
|
-
constructor(
|
|
1460
|
-
this.
|
|
2065
|
+
constructor(catalogSearchService, filterService, iconCache, optionsService, changeDetector) {
|
|
2066
|
+
this.catalogSearchService = catalogSearchService;
|
|
1461
2067
|
this.filterService = filterService;
|
|
1462
2068
|
this.iconCache = iconCache;
|
|
1463
2069
|
this.optionsService = optionsService;
|
|
1464
2070
|
this.changeDetector = changeDetector;
|
|
1465
2071
|
this.icons = IconEnum;
|
|
1466
|
-
this.
|
|
2072
|
+
this.showResetFilter = true;
|
|
1467
2073
|
this.collapsed = false;
|
|
1468
2074
|
this._subs = [];
|
|
1469
2075
|
this._min = 0;
|
|
@@ -1475,9 +2081,11 @@ class CatalogFilterComponent {
|
|
|
1475
2081
|
// })
|
|
1476
2082
|
// ];
|
|
1477
2083
|
}
|
|
2084
|
+
showClass() {
|
|
2085
|
+
return true;
|
|
2086
|
+
}
|
|
1478
2087
|
ngOnInit() {
|
|
1479
2088
|
// because our <co-checkbox-select> components will output a selectionStringChange on their init, which effectively changes this.filters
|
|
1480
|
-
this.catalog.catalogShown = true;
|
|
1481
2089
|
this.collapsed = this.optionsService.collapseFilterByDefault;
|
|
1482
2090
|
if (window.innerWidth <= 950) {
|
|
1483
2091
|
this.collapsed = true;
|
|
@@ -1496,7 +2104,7 @@ class CatalogFilterComponent {
|
|
|
1496
2104
|
this._max = this.filterService.priceMaxFilter;
|
|
1497
2105
|
}
|
|
1498
2106
|
resetFilters(event) {
|
|
1499
|
-
this.
|
|
2107
|
+
this.catalogSearchService.resetFilters();
|
|
1500
2108
|
}
|
|
1501
2109
|
onHandleClick(event) {
|
|
1502
2110
|
this.collapsed = !this.collapsed;
|
|
@@ -1527,34 +2135,13 @@ class CatalogFilterComponent {
|
|
|
1527
2135
|
this.filterService.priceMinFilter = !!this.filterService.priceMinFilter ? this.filterService.priceMinFilter : this._min;
|
|
1528
2136
|
this.filterService.priceMaxFilter = !!this.filterService.priceMaxFilter ? this.filterService.priceMaxFilter : this._max;
|
|
1529
2137
|
// some user error protection
|
|
1530
|
-
let trueLowerBound = Math.min(this.filterService.priceMinFilter, this.filterService.priceMaxFilter);
|
|
1531
|
-
let trueUpperBound = Math.max(this.filterService.priceMinFilter, this.filterService.priceMaxFilter);
|
|
1532
|
-
this.
|
|
1533
|
-
this.
|
|
1534
|
-
}
|
|
1535
|
-
handleCollectionChange(collection) {
|
|
1536
|
-
this.
|
|
1537
|
-
}
|
|
1538
|
-
filterOnItem(item) {
|
|
1539
|
-
// todo: fix this crappy map
|
|
1540
|
-
const mapFilterName = this.filterService.filterItemMap.get(item.filter.filterName);
|
|
1541
|
-
if (!mapFilterName) {
|
|
1542
|
-
return;
|
|
1543
|
-
}
|
|
1544
|
-
const filterItemOfRequest = this.catalog.articleSearchFilters[mapFilterName] || "";
|
|
1545
|
-
const arr = filterItemOfRequest ? filterItemOfRequest.split(',') : [];
|
|
1546
|
-
if (item.checked) { // add
|
|
1547
|
-
if (arr.indexOf(item.code) < 0) {
|
|
1548
|
-
arr.push(`?='${item.code}'`);
|
|
1549
|
-
}
|
|
1550
|
-
}
|
|
1551
|
-
else { // remove
|
|
1552
|
-
if (arr.indexOf(item.code) < 0) {
|
|
1553
|
-
arr.splice(arr.indexOf(item.code), 1);
|
|
1554
|
-
}
|
|
1555
|
-
}
|
|
1556
|
-
this.catalog.articleSearchFilters[mapFilterName] = arr.join(',');
|
|
1557
|
-
this.catalog.searchArticles();
|
|
2138
|
+
let trueLowerBound = Math.min(this.filterService.priceMinFilter, this.filterService.priceMaxFilter);
|
|
2139
|
+
let trueUpperBound = Math.max(this.filterService.priceMinFilter, this.filterService.priceMaxFilter);
|
|
2140
|
+
this.catalogSearchService.searchRequest.rangePrice = `${trueLowerBound} - ${trueUpperBound}`;
|
|
2141
|
+
this.catalogSearchService.searchArticles();
|
|
2142
|
+
}
|
|
2143
|
+
handleCollectionChange(collection) {
|
|
2144
|
+
this.catalogSearchService.filterOnCollection(collection);
|
|
1558
2145
|
}
|
|
1559
2146
|
detectChanges() {
|
|
1560
2147
|
if (!this._destroyed) {
|
|
@@ -1564,8 +2151,74 @@ class CatalogFilterComponent {
|
|
|
1564
2151
|
}
|
|
1565
2152
|
CatalogFilterComponent.decorators = [
|
|
1566
2153
|
{ type: Component, args: [{
|
|
1567
|
-
selector: '
|
|
1568
|
-
template:
|
|
2154
|
+
selector: 'co-catalog-filter',
|
|
2155
|
+
template: `
|
|
2156
|
+
<div class="catalog-filter-wrapper">
|
|
2157
|
+
<div *ngIf="showResetFilter" class="reset-filter-wrapper">
|
|
2158
|
+
<div class="reset-title-wrapper">
|
|
2159
|
+
<div class="reset-title">
|
|
2160
|
+
<div class="reset-filter-title" [textContent]="'FILTER' | localize"></div>
|
|
2161
|
+
<co-icon class="reset-filter-icon" [iconData]="iconCache.getIcon(icons.SyncAlt)"></co-icon>
|
|
2162
|
+
</div>
|
|
2163
|
+
<co-icon-collapse-handle (click)="onHandleClick($event)"></co-icon-collapse-handle>
|
|
2164
|
+
</div>
|
|
2165
|
+
<div class="filter-reset" [textContent]="'RESET_FILTER' | localize" (click)="resetFilters($event)"></div>
|
|
2166
|
+
</div>
|
|
2167
|
+
<div class="filter-items-wrapper co-small-scrollbar">
|
|
2168
|
+
<div class="filter-item-wrapper">
|
|
2169
|
+
<label class="temp">Price</label>
|
|
2170
|
+
<div class="price-inputs">
|
|
2171
|
+
<co-input-text
|
|
2172
|
+
class="price-from"
|
|
2173
|
+
[type]="'number'"
|
|
2174
|
+
[digitsOnly]="true"
|
|
2175
|
+
[hideArrowButtons]="true"
|
|
2176
|
+
[excludePlusMinus]="true"
|
|
2177
|
+
[label]="'BASELINE_PRICE' | localize"
|
|
2178
|
+
[(model)]="filterService.priceMinFilter"
|
|
2179
|
+
(modelChange)="updatePriceFrom()"
|
|
2180
|
+
customWidth
|
|
2181
|
+
></co-input-text>
|
|
2182
|
+
<co-input-text
|
|
2183
|
+
class="price-to"
|
|
2184
|
+
[type]="'number'"
|
|
2185
|
+
[digitsOnly]="true"
|
|
2186
|
+
[hideArrowButtons]="true"
|
|
2187
|
+
[excludePlusMinus]="true"
|
|
2188
|
+
[label]="'PRICE_TO' | localize"
|
|
2189
|
+
[(model)]="filterService.priceMaxFilter"
|
|
2190
|
+
(modelChange)="updatePriceTo()"
|
|
2191
|
+
customWidth
|
|
2192
|
+
></co-input-text>
|
|
2193
|
+
<co-icon [iconData]="iconCache.getIcon(icons.Check)" (click)="filterOnPrice()"></co-icon>
|
|
2194
|
+
</div>
|
|
2195
|
+
</div>
|
|
2196
|
+
<div class="filter-item-wrapper">
|
|
2197
|
+
<co-filter-item [placeholder]="'MODIFIED_DATE' | localize"
|
|
2198
|
+
[expanded]="true"
|
|
2199
|
+
[customContent]="true"
|
|
2200
|
+
>
|
|
2201
|
+
<co-input-date
|
|
2202
|
+
[(model)]="catalogSearchService.searchRequest.dateModified"
|
|
2203
|
+
(modelChange)="catalogSearchService.searchArticles()"
|
|
2204
|
+
></co-input-date>
|
|
2205
|
+
</co-filter-item>
|
|
2206
|
+
</div>
|
|
2207
|
+
<div class="filter-item-wrapper" *ngFor="let filter of filterService.filters">
|
|
2208
|
+
<co-filter-item
|
|
2209
|
+
[placeholder]="filter.filterName"
|
|
2210
|
+
[collection]="filter.filterItems"
|
|
2211
|
+
[showLessLabel]="'Bekijk minder...'"
|
|
2212
|
+
[showMoreLabel]="'Bekijk meer...'"
|
|
2213
|
+
[searchPlaceholder]="'Zoeken...'"
|
|
2214
|
+
[expanded]=true
|
|
2215
|
+
[initialLimit]=5
|
|
2216
|
+
(collectionChange)="handleCollectionChange($event)"
|
|
2217
|
+
></co-filter-item>
|
|
2218
|
+
</div>
|
|
2219
|
+
</div>
|
|
2220
|
+
</div>
|
|
2221
|
+
`,
|
|
1569
2222
|
animations: [
|
|
1570
2223
|
trigger('showFilterItem', [
|
|
1571
2224
|
state('closed', style({ height: '80px' })),
|
|
@@ -1573,97 +2226,131 @@ CatalogFilterComponent.decorators = [
|
|
|
1573
2226
|
transition('closed <=> open', animate(200))
|
|
1574
2227
|
])
|
|
1575
2228
|
],
|
|
1576
|
-
|
|
2229
|
+
encapsulation: ViewEncapsulation.None
|
|
1577
2230
|
},] }
|
|
1578
2231
|
];
|
|
1579
2232
|
CatalogFilterComponent.ctorParameters = () => [
|
|
1580
|
-
{ type:
|
|
1581
|
-
{ type:
|
|
2233
|
+
{ type: CatalogSearchService },
|
|
2234
|
+
{ type: CatalogFilterService },
|
|
1582
2235
|
{ type: IconCacheService },
|
|
1583
|
-
{ type:
|
|
2236
|
+
{ type: CatalogOptionsService },
|
|
1584
2237
|
{ type: ChangeDetectorRef }
|
|
1585
2238
|
];
|
|
1586
2239
|
CatalogFilterComponent.propDecorators = {
|
|
1587
2240
|
priceSlider: [{ type: ViewChild, args: [SliderComponent, { static: true },] }],
|
|
1588
|
-
|
|
2241
|
+
showResetFilter: [{ type: Input }],
|
|
2242
|
+
showClass: [{ type: HostBinding, args: ['class.co-catalog-filter',] }],
|
|
1589
2243
|
collapsed: [{ type: HostBinding, args: ['class.collapsed',] }]
|
|
1590
2244
|
};
|
|
1591
2245
|
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
this.
|
|
1596
|
-
this._optionsService = _optionsService;
|
|
1597
|
-
this._imageService = _imageService;
|
|
1598
|
-
this._subs = [];
|
|
1599
|
-
this._connectionMade = false;
|
|
1600
|
-
this._optionsSet = false;
|
|
1601
|
-
this.navigationCategories = [];
|
|
1602
|
-
this.allTurnoverGroups = [];
|
|
1603
|
-
this._subs.push(this._iOne.controllerInitialized.subscribe((initialized) => {
|
|
1604
|
-
if (initialized) {
|
|
1605
|
-
this._connectionMade = true;
|
|
1606
|
-
this.getCategories();
|
|
1607
|
-
}
|
|
1608
|
-
}), this._optionsService.parametersSet.subscribe((set) => {
|
|
1609
|
-
if (set) {
|
|
1610
|
-
this._optionsSet = true;
|
|
1611
|
-
this.getCategories();
|
|
1612
|
-
}
|
|
1613
|
-
}));
|
|
1614
|
-
}
|
|
1615
|
-
ngOnDestroy() {
|
|
1616
|
-
this._subs.forEach(s => s.unsubscribe());
|
|
1617
|
-
}
|
|
1618
|
-
setCategory(category) {
|
|
1619
|
-
this._catalog.category = category;
|
|
1620
|
-
}
|
|
1621
|
-
setTurnoverGroup(turnoverGroup) {
|
|
1622
|
-
this._catalog.turnoverGroup = turnoverGroup;
|
|
1623
|
-
}
|
|
1624
|
-
setExternalSourceUrl(url) {
|
|
1625
|
-
this._catalog.externalSourceUrl = url;
|
|
1626
|
-
}
|
|
1627
|
-
setIoneSourceUrl(url, ioneUrl, id, username, password) {
|
|
1628
|
-
this._catalog.ioneSourceUrl = url + '?url=' + ioneUrl + '&id=' + id + '&user=' + username + '&pass=' + password;
|
|
1629
|
-
}
|
|
1630
|
-
navigateToHome() {
|
|
1631
|
-
this._catalog.reset();
|
|
2246
|
+
// A pipe for localizing string values in view templates.
|
|
2247
|
+
class LocalizePipe {
|
|
2248
|
+
constructor(_dictionaryService) {
|
|
2249
|
+
this._dictionaryService = _dictionaryService;
|
|
1632
2250
|
}
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
});
|
|
1643
|
-
}
|
|
1644
|
-
catch (e) {
|
|
1645
|
-
}
|
|
1646
|
-
}
|
|
1647
|
-
});
|
|
2251
|
+
transform(value, upperCaseFirst = true, replace = []) {
|
|
2252
|
+
if (!value) {
|
|
2253
|
+
return '';
|
|
2254
|
+
}
|
|
2255
|
+
replace = replace ? replace : [];
|
|
2256
|
+
if (!Array.isArray(replace)) {
|
|
2257
|
+
replace = [replace];
|
|
2258
|
+
}
|
|
2259
|
+
return this._dictionaryService.get(value, upperCaseFirst, ...replace);
|
|
1648
2260
|
}
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
2261
|
+
}
|
|
2262
|
+
LocalizePipe.decorators = [
|
|
2263
|
+
{ type: Pipe, args: [{
|
|
2264
|
+
name: 'localize'
|
|
2265
|
+
},] }
|
|
2266
|
+
];
|
|
2267
|
+
LocalizePipe.ctorParameters = () => [
|
|
2268
|
+
{ type: DictionaryService }
|
|
2269
|
+
];
|
|
2270
|
+
|
|
2271
|
+
class CatalogFilterModule {
|
|
2272
|
+
}
|
|
2273
|
+
CatalogFilterModule.decorators = [
|
|
2274
|
+
{ type: NgModule, args: [{
|
|
2275
|
+
imports: [
|
|
2276
|
+
CommonModule,
|
|
2277
|
+
IconModule,
|
|
2278
|
+
InputTextModule,
|
|
2279
|
+
FilterItemModule,
|
|
2280
|
+
InputDatePickerModule,
|
|
2281
|
+
IconCollapseHandleModule
|
|
2282
|
+
],
|
|
2283
|
+
declarations: [
|
|
2284
|
+
CatalogFilterComponent,
|
|
2285
|
+
LocalizePipe
|
|
2286
|
+
],
|
|
2287
|
+
exports: [
|
|
2288
|
+
CatalogFilterComponent,
|
|
2289
|
+
LocalizePipe
|
|
2290
|
+
]
|
|
2291
|
+
},] }
|
|
2292
|
+
];
|
|
2293
|
+
|
|
2294
|
+
class ResponsiveTextComponent {
|
|
2295
|
+
showClass() {
|
|
2296
|
+
return true;
|
|
1654
2297
|
}
|
|
1655
2298
|
}
|
|
1656
|
-
|
|
1657
|
-
{ type:
|
|
2299
|
+
ResponsiveTextComponent.decorators = [
|
|
2300
|
+
{ type: Component, args: [{
|
|
2301
|
+
selector: 'co-responsive-text',
|
|
2302
|
+
template: `
|
|
2303
|
+
<svg viewBox="0 0 100 100">
|
|
2304
|
+
<foreignObject height="100%" width="100%">
|
|
2305
|
+
<div class="text" [textContent]="text"></div>
|
|
2306
|
+
</foreignObject>
|
|
2307
|
+
</svg>
|
|
2308
|
+
`,
|
|
2309
|
+
encapsulation: ViewEncapsulation.None
|
|
2310
|
+
},] }
|
|
1658
2311
|
];
|
|
1659
|
-
|
|
1660
|
-
{ type:
|
|
1661
|
-
{ type:
|
|
1662
|
-
|
|
1663
|
-
|
|
2312
|
+
ResponsiveTextComponent.propDecorators = {
|
|
2313
|
+
text: [{ type: Input }],
|
|
2314
|
+
showClass: [{ type: HostBinding, args: ['class.co-responsive-text',] }]
|
|
2315
|
+
};
|
|
2316
|
+
|
|
2317
|
+
class ResponsiveTextModule {
|
|
2318
|
+
}
|
|
2319
|
+
ResponsiveTextModule.decorators = [
|
|
2320
|
+
{ type: NgModule, args: [{
|
|
2321
|
+
imports: [
|
|
2322
|
+
CommonModule
|
|
2323
|
+
],
|
|
2324
|
+
declarations: [
|
|
2325
|
+
ResponsiveTextComponent
|
|
2326
|
+
],
|
|
2327
|
+
exports: [
|
|
2328
|
+
ResponsiveTextComponent
|
|
2329
|
+
]
|
|
2330
|
+
},] }
|
|
2331
|
+
];
|
|
2332
|
+
|
|
2333
|
+
class CatalogCategoriesModule {
|
|
2334
|
+
}
|
|
2335
|
+
CatalogCategoriesModule.decorators = [
|
|
2336
|
+
{ type: NgModule, args: [{
|
|
2337
|
+
imports: [
|
|
2338
|
+
CommonModule,
|
|
2339
|
+
ImageModule,
|
|
2340
|
+
IconModule$1,
|
|
2341
|
+
CatalogFilterModule,
|
|
2342
|
+
ResponsiveTextModule
|
|
2343
|
+
],
|
|
2344
|
+
declarations: [
|
|
2345
|
+
CatalogCategoriesComponent
|
|
2346
|
+
],
|
|
2347
|
+
exports: [
|
|
2348
|
+
CatalogCategoriesComponent
|
|
2349
|
+
]
|
|
2350
|
+
},] }
|
|
1664
2351
|
];
|
|
1665
2352
|
|
|
1666
|
-
class
|
|
2353
|
+
class CatalogEventService {
|
|
1667
2354
|
constructor() {
|
|
1668
2355
|
this.lookAtArticleButtonClick = new Subject();
|
|
1669
2356
|
this.addArticleButtonClick = new Subject();
|
|
@@ -1672,766 +2359,769 @@ class AppEventService {
|
|
|
1672
2359
|
this.stockDetailsClick = new Subject();
|
|
1673
2360
|
}
|
|
1674
2361
|
}
|
|
1675
|
-
|
|
1676
|
-
|
|
2362
|
+
CatalogEventService.ɵprov = i0.ɵɵdefineInjectable({ factory: function CatalogEventService_Factory() { return new CatalogEventService(); }, token: CatalogEventService, providedIn: "root" });
|
|
2363
|
+
CatalogEventService.decorators = [
|
|
1677
2364
|
{ type: Injectable, args: [{
|
|
1678
2365
|
providedIn: 'root'
|
|
1679
2366
|
},] }
|
|
1680
2367
|
];
|
|
1681
2368
|
|
|
1682
|
-
class
|
|
1683
|
-
constructor(
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
2369
|
+
class CatalogNavigationComponent {
|
|
2370
|
+
constructor(iconCache,
|
|
2371
|
+
/*
|
|
2372
|
+
public navigationService: CatalogNavigationService,
|
|
2373
|
+
*/
|
|
2374
|
+
catalogService, _appEventService) {
|
|
1688
2375
|
this.iconCache = iconCache;
|
|
2376
|
+
this.catalogService = catalogService;
|
|
1689
2377
|
this._appEventService = _appEventService;
|
|
1690
2378
|
this.icons = IconEnum;
|
|
1691
|
-
this.
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
this.
|
|
1696
|
-
this.
|
|
1697
|
-
this.
|
|
1698
|
-
this.
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
this.
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
}
|
|
1706
|
-
ngOnDestroy() {
|
|
1707
|
-
this._subs.forEach(s => s.unsubscribe());
|
|
1708
|
-
this.destroyed = true;
|
|
1709
|
-
this.catalog.listMode = false;
|
|
1710
|
-
this.catalog.webMode = true;
|
|
1711
|
-
}
|
|
1712
|
-
onArticleCardAdd3DButtonClick(event, article) {
|
|
1713
|
-
// if (article) {
|
|
1714
|
-
// this.messageBus.emit(MessageType.LoadIOneFurnitureIntoSceneBySKU, {
|
|
1715
|
-
// sku: article.articleNumber,
|
|
1716
|
-
// position: { x: event.clientX, y: event.clientY }
|
|
1717
|
-
// });
|
|
1718
|
-
// this.catalog.catalogShown = false;
|
|
1719
|
-
// }
|
|
1720
|
-
}
|
|
1721
|
-
handleArticleRowClick(event) {
|
|
1722
|
-
this._appEventService.lookAtArticleButtonClick.next(this.article);
|
|
1723
|
-
}
|
|
1724
|
-
onPreviousClick() {
|
|
1725
|
-
this.catalog.currentPage -= 1;
|
|
1726
|
-
}
|
|
1727
|
-
onNextClick() {
|
|
1728
|
-
this.catalog.currentPage += 1;
|
|
1729
|
-
}
|
|
1730
|
-
onPageClick(pageNr) {
|
|
1731
|
-
this.catalog.currentPage = pageNr;
|
|
1732
|
-
}
|
|
1733
|
-
onArticlesPageChange(qty) {
|
|
1734
|
-
this.catalog.articlesPerPage = qty;
|
|
1735
|
-
this.detectChanges();
|
|
1736
|
-
}
|
|
1737
|
-
handleOrderBy(orderBy) {
|
|
1738
|
-
this.catalog.changeOrderBy(orderBy);
|
|
1739
|
-
this.detectChanges();
|
|
1740
|
-
}
|
|
1741
|
-
handleViewChange(event) {
|
|
1742
|
-
const viewWrapper = event.currentTarget.closest('.view-mode-wrapper');
|
|
1743
|
-
const currentView = event.currentTarget;
|
|
1744
|
-
const currentClasses = currentView.classList;
|
|
1745
|
-
const parentClasses = viewWrapper.classList;
|
|
1746
|
-
if (currentClasses.contains('grid')) {
|
|
1747
|
-
parentClasses.add('grid');
|
|
1748
|
-
parentClasses.remove('list');
|
|
1749
|
-
parentClasses.remove('tile');
|
|
1750
|
-
this.catalog.listMode = false;
|
|
1751
|
-
this.catalog.webMode = false;
|
|
1752
|
-
}
|
|
1753
|
-
if (currentClasses.contains('list')) {
|
|
1754
|
-
parentClasses.add('list');
|
|
1755
|
-
parentClasses.remove('grid');
|
|
1756
|
-
parentClasses.remove('tile');
|
|
1757
|
-
this.catalog.listMode = true;
|
|
1758
|
-
this.catalog.webMode = true;
|
|
1759
|
-
}
|
|
1760
|
-
if (currentClasses.contains('tile')) {
|
|
1761
|
-
parentClasses.add('tile');
|
|
1762
|
-
parentClasses.remove('grid');
|
|
1763
|
-
parentClasses.remove('list');
|
|
1764
|
-
this.catalog.listMode = false;
|
|
1765
|
-
this.catalog.webMode = true;
|
|
1766
|
-
}
|
|
1767
|
-
}
|
|
1768
|
-
_navigationChanged() {
|
|
1769
|
-
this.catalog.currentPage = 1;
|
|
1770
|
-
}
|
|
1771
|
-
detectChanges() {
|
|
1772
|
-
if (!this.destroyed) {
|
|
1773
|
-
this.changeDetector.detectChanges();
|
|
1774
|
-
}
|
|
2379
|
+
this.homeLabel = 'Home';
|
|
2380
|
+
this.collectionLabel = 'Collection';
|
|
2381
|
+
this.externalSourcesLabel = 'External sources';
|
|
2382
|
+
this.showTurnoverGroups = true;
|
|
2383
|
+
this.homeClick = new EventEmitter();
|
|
2384
|
+
this.categoryClick = new EventEmitter();
|
|
2385
|
+
this.turnoverGroupClick = new EventEmitter();
|
|
2386
|
+
this.minified = false;
|
|
2387
|
+
this.showClass = true;
|
|
2388
|
+
this.mobileMenuToggle = false;
|
|
2389
|
+
this.categories = [];
|
|
2390
|
+
this.turnoverGroups = [];
|
|
2391
|
+
this.showCollectionOverlay = false;
|
|
2392
|
+
this.showExternalOverlay = false;
|
|
1775
2393
|
}
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
styles: [":host{width:100%;height:100%;display:flex;flex-direction:column}ul.slides{display:block;list-style:none;padding-left:0;width:100%;float:left;margin:0}ul.slides span{float:left;width:100%;margin-top:30px}ul.slides li{float:left;margin:10px 10px 0 0;font-size:12px;position:relative;width:150px;height:100px;text-align:center;background:#ececec;cursor:pointer}ul.slides li span{transform:translateY(-50%);top:50%;position:absolute;left:0}ul.slides li.active{border:1px solid #3E7EFF;color:#3e7eff;font-weight:600}.catalog-toolbar{display:flex;align-items:center;grid-gap:15px;gap:15px}.view-mode-wrapper{display:flex;flex-direction:row;grid-gap:5px;gap:5px}.view-mode-wrapper co-button{padding:5px!important;height:30px;width:30px;border-radius:3px;cursor:pointer;background:#fff;border:1px solid #dce4ea;justify-content:center;align-items:center;display:flex}.view-mode-wrapper co-button ::ng-deep co-icon{width:20px;height:20px}.view-mode-wrapper co-button ::ng-deep co-icon [fill]{fill:#000}.view-mode-wrapper.list co-button.list{background:#3E7EFF}.view-mode-wrapper.list co-button.list ::ng-deep co-icon [fill]{fill:#fff}.view-mode-wrapper.grid co-button.grid{background:#3E7EFF}.view-mode-wrapper.grid co-button.grid ::ng-deep co-icon [fill]{fill:#fff}.view-mode-wrapper.tile co-button.tile{background:#3E7EFF}.view-mode-wrapper.tile co-button.tile ::ng-deep co-icon [fill]{fill:#fff}.order-by-desc{font-size:11px;margin-right:10px}.order-by-select{font-family:iOneMontserrat;font-size:11px;border:1px solid #e4edf4;border-radius:5px;background-color:#fff;height:38px;padding:5px;max-width:100%}.page-title{justify-content:space-between;display:flex}.page-title span{font-size:13px}.article-cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,.5fr));grid-gap:20px;gap:20px;flex-basis:100%;padding:40px 0;z-index:1}.article-cards.list-view{grid-template-columns:none}::ng-deep co-pagination{height:auto!important;padding:30px 20px;border-style:solid;border-color:#dce4ea;border-width:1px 0 0 0}::ng-deep co-pagination .pagination-component-main-wrapper{padding:0!important}::ng-deep co-pagination ul{margin:0;justify-content:center!important}::ng-deep co-pagination ul li{border-radius:5px!important;border-color:#fff!important;color:#22313c!important;cursor:pointer!important;margin-right:8px!important}::ng-deep co-pagination ul li:hover{background:#DCE4EA!important;border:2px solid #DCE4EA}::ng-deep co-pagination ul li.pagination-previous,::ng-deep co-pagination ul li.pagination-next,::ng-deep co-pagination ul li.pagination-previous a,::ng-deep co-pagination ul li.pagination-next a{font-size:0!important;padding:0!important;line-height:0}::ng-deep co-pagination ul li.pagination-previous a:before,::ng-deep co-pagination ul li.pagination-next a:after{margin:0!important;border-color:#22313c!important;border-width:0 2px 2px 0!important}::ng-deep co-pagination ul li.current{background:#DCE4EA!important;border-color:#3e7eff!important;color:#222!important;border-width:2px!important}::ng-deep co-pagination ul li a{color:#22313c!important;width:40px!important}@media screen and (max-width: 940px){.article-cards{grid-gap:15px 0;gap:15px 0;grid-template-columns:repeat(auto-fill,minmax(220px,.5fr))}}@media screen and (max-width: 480px){.article-cards{grid-template-columns:1fr}.page-title{display:block;padding-left:0}.page-title .order-by-wrapper{margin-top:15px}}\n"]
|
|
1782
|
-
},] }
|
|
1783
|
-
];
|
|
1784
|
-
CatalogPageComponent.ctorParameters = () => [
|
|
1785
|
-
{ type: CatalogService },
|
|
1786
|
-
{ type: OptionsService },
|
|
1787
|
-
{ type: ChangeDetectorRef },
|
|
1788
|
-
{ type: NavigationService },
|
|
1789
|
-
{ type: IconCacheService },
|
|
1790
|
-
{ type: AppEventService }
|
|
1791
|
-
];
|
|
1792
|
-
CatalogPageComponent.propDecorators = {
|
|
1793
|
-
pagination: [{ type: ViewChild, args: [PaginationComponent, { static: true },] }],
|
|
1794
|
-
content: [{ type: ContentChildren, args: [SimpleGridColumnDirective,] }]
|
|
1795
|
-
};
|
|
1796
|
-
|
|
1797
|
-
class CatalogExternalComponent {
|
|
1798
|
-
constructor(catalog, _appEventService, _sanitizer, _ref, _renderer) {
|
|
1799
|
-
this.catalog = catalog;
|
|
1800
|
-
this._appEventService = _appEventService;
|
|
1801
|
-
this._sanitizer = _sanitizer;
|
|
1802
|
-
this._ref = _ref;
|
|
1803
|
-
this._renderer = _renderer;
|
|
1804
|
-
this.layout = {};
|
|
1805
|
-
this._subs = [];
|
|
1806
|
-
this._renderer.addClass(document.body, 'external');
|
|
1807
|
-
this._subs.push(this.catalog.externalSourceChanged.subscribe(changed => {
|
|
1808
|
-
if (changed) {
|
|
1809
|
-
if (this.externalSourceFrame && this.externalSourceFrame.nativeElement) {
|
|
1810
|
-
this.externalSourceFrame.nativeElement.src = '';
|
|
1811
|
-
this.externalSourceFrame.nativeElement.src = this.catalog.externalSourceUrl;
|
|
1812
|
-
}
|
|
2394
|
+
get internalList() {
|
|
2395
|
+
let list = [];
|
|
2396
|
+
this.catalogService.externalSourceViewModels.forEach(element => {
|
|
2397
|
+
if (element.catalogDefinition.useCatalogPage && element.externalSource.url !== '') {
|
|
2398
|
+
list.push(element);
|
|
1813
2399
|
}
|
|
1814
|
-
})
|
|
2400
|
+
});
|
|
2401
|
+
return list;
|
|
1815
2402
|
}
|
|
1816
|
-
|
|
1817
|
-
|
|
2403
|
+
get externalList() {
|
|
2404
|
+
let list = [];
|
|
2405
|
+
this.catalogService.externalSourceViewModels.forEach(element => {
|
|
2406
|
+
if (!element.catalogDefinition.useCatalogPage && element.externalSource.url !== '') {
|
|
2407
|
+
list.push(element);
|
|
2408
|
+
}
|
|
2409
|
+
});
|
|
2410
|
+
return list;
|
|
1818
2411
|
}
|
|
1819
2412
|
ngOnInit() {
|
|
2413
|
+
this.categories.length = 0;
|
|
2414
|
+
this.turnoverGroups.length = 0;
|
|
2415
|
+
this.getCategories();
|
|
1820
2416
|
}
|
|
1821
|
-
|
|
1822
|
-
this
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
}
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
template: "<iframe #externalSourceFrame class=\"external-iframe\" [src]=\"getSafeUrl()\"></iframe>\r\n\r\n",
|
|
1833
|
-
styles: ["body{overflow:hidden!important}:host{transform:translate(0)}:host iframe{width:100%;height:100vh;border:none}\n"]
|
|
1834
|
-
},] }
|
|
1835
|
-
];
|
|
1836
|
-
CatalogExternalComponent.ctorParameters = () => [
|
|
1837
|
-
{ type: CatalogService },
|
|
1838
|
-
{ type: AppEventService },
|
|
1839
|
-
{ type: DomSanitizer },
|
|
1840
|
-
{ type: ChangeDetectorRef },
|
|
1841
|
-
{ type: Renderer2 }
|
|
1842
|
-
];
|
|
1843
|
-
CatalogExternalComponent.propDecorators = {
|
|
1844
|
-
externalSourceFrame: [{ type: ViewChild, args: ['externalSourceFrame', { read: ElementRef },] }]
|
|
1845
|
-
};
|
|
1846
|
-
|
|
1847
|
-
class CatalogHomeComponent {
|
|
1848
|
-
constructor(iconCache, navigationService, catalogService) {
|
|
1849
|
-
this.iconCache = iconCache;
|
|
1850
|
-
this.navigationService = navigationService;
|
|
1851
|
-
this.catalogService = catalogService;
|
|
1852
|
-
this.icons = IconEnum;
|
|
1853
|
-
this.minified = false;
|
|
1854
|
-
}
|
|
1855
|
-
onSetCategory(event, category) {
|
|
1856
|
-
this.navigationService.setCategory(category);
|
|
1857
|
-
}
|
|
1858
|
-
onSetTurnoverGroup(event, turnoverGroup) {
|
|
1859
|
-
this.navigationService.setTurnoverGroup(turnoverGroup);
|
|
2417
|
+
getCategories() {
|
|
2418
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2419
|
+
try {
|
|
2420
|
+
this.catalogService.getCategories().then((cats) => {
|
|
2421
|
+
this.categories = cats;
|
|
2422
|
+
this.prepareTurnoverGroups();
|
|
2423
|
+
});
|
|
2424
|
+
}
|
|
2425
|
+
catch (e) {
|
|
2426
|
+
}
|
|
2427
|
+
});
|
|
1860
2428
|
}
|
|
1861
|
-
|
|
1862
|
-
this.
|
|
2429
|
+
prepareTurnoverGroups() {
|
|
2430
|
+
if (this.categories && this.categories.length > 0) {
|
|
2431
|
+
this.categories.forEach((category) => {
|
|
2432
|
+
category.turnoverGroups.forEach(tog => this.catalogService.prepareTurnoverGroupImage(tog));
|
|
2433
|
+
this.turnoverGroups.push(...category.turnoverGroups);
|
|
2434
|
+
});
|
|
2435
|
+
}
|
|
1863
2436
|
}
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
{ type: Component, args: [{
|
|
1867
|
-
selector: 'app-home-catalog',
|
|
1868
|
-
template: "<div class=\"component-wrapper\">\r\n <div class=\"page-wrapper\">\r\n <div class=\"home-wrapper\">\r\n <div class=\"category-wrapper home-block\" *ngIf=\"navigationService.navigationCategories && navigationService.navigationCategories.length > 0\">\r\n <ul class=\"slides\">\r\n <li class=\"carousel-cell\" *ngFor=\"let category of navigationService.navigationCategories\" (click)=\"onSetCategory($event, category.category)\">\r\n <co-image *ngIf=\"category.imageData\" [source]=\"category.imageData\"></co-image>\r\n <div class=\"no-image-wrapper\" *ngIf=\"!category.imageData\">\r\n <co-icon class=\"no-image\" [iconData]=\"iconCache.getIcon(icons.Camera)\"></co-icon>\r\n </div>\r\n <span [textContent]=\"category.category | localize\"></span>\r\n </li>\r\n </ul>\r\n </div>\r\n <div class=\"turnover-wrapper home-block\" *ngIf=\"navigationService.navigationCategories && navigationService.navigationCategories.length > 0\">\r\n <div class=\"slide-wrapper\" *ngFor=\"let category of navigationService.navigationCategories\">\r\n <div class=\"slide-condition\" *ngIf=\"category.turnoverGroups && category.turnoverGroups.length > 0\">\r\n <span class=\"slide-title\">\r\n <span class=\"inner-title\" [textContent]=\"category.category | localize\"></span>\r\n </span>\r\n <ul class=\"slides\">\r\n <li class=\"carousel-cell\" *ngFor=\"let turnoverGroup of category.turnoverGroups\" (click)=\"onSetTurnoverGroup($event, turnoverGroup.turnovergroupNr)\">\r\n <co-image *ngIf=\"turnoverGroup.imageData\" [source]=\"turnoverGroup.imageData\"></co-image>\r\n <div class=\"no-image-wrapper\" *ngIf=\"!turnoverGroup.imageData\">\r\n <co-icon class=\"no-image\" [iconData]=\"iconCache.getIcon(icons.Camera)\"></co-icon>\r\n </div>\r\n <span [textContent]=\"turnoverGroup.description | localize\"></span>\r\n </li>\r\n </ul>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n",
|
|
1869
|
-
styles: [":host .component-wrapper{display:flex;flex-direction:column;height:100%}:host .component-wrapper .page-wrapper{display:flex;flex-direction:row;padding:0 15px;margin:0 auto;width:100%}:host .component-wrapper .page-wrapper .home-wrapper{padding-bottom:60px}:host .component-wrapper .page-wrapper .home-wrapper .home-block{padding:15px 0;overflow:hidden}:host .slide-condition{display:block;margin:30px 0 60px;float:left;width:100%}:host .slide-condition .slide-title{position:relative}:host .slide-condition .slide-title .inner-title{text-transform:capitalize;font-weight:700;font-size:16px}:host .slide-condition ul.slides{display:flex;list-style:none;padding-left:0;width:100%;float:left;margin:0}:host .slide-condition ul.slides span{float:left;width:100%;margin-top:10px;position:absolute;text-align:left;transform:none;bottom:-25px;left:0;font-weight:600;font-size:12px}:host .slide-condition ul.slides li{float:left;margin:0 10px 0 0;font-size:12px;position:relative;width:calc(25% - 9px);max-width:200px;min-height:150px;max-height:200px;text-align:center;cursor:pointer}:host .slide-condition ul.slides li:hover{opacity:.9}:host .slide-condition ul.slides li co-image ::ng-deep{display:block;height:100%}:host .slide-condition ul.slides li co-image ::ng-deep img{object-fit:cover}:host .slide-condition ul.slides li.active{border:1px solid #3E7EFF;color:#3e7eff;font-weight:600}:host .slide-condition ul.slides li:last-child{margin-right:0}:host .slide-condition ul.slides li .no-image-wrapper{background:#ececec;width:100%;height:100%;display:flex;text-align:center;align-items:center}:host .slide-condition ul.slides li .no-image-wrapper co-icon{width:60px;height:60px;margin:0 auto;opacity:.3}:host .category-wrapper ul.slides{display:block;list-style:none;padding-left:0;width:100%;float:left;margin:0}:host .category-wrapper ul.slides li{width:calc(20% - 8px);height:auto;background:transparent;float:left;margin:10px 10px 0 0;font-size:12px;position:relative;text-align:center;cursor:pointer}:host .category-wrapper ul.slides li span{margin-top:0;font-size:24px;text-transform:capitalize;font-weight:700;text-shadow:0 2px 3px rgba(1,1,1,.55);color:#fff;transform:translateY(-50%);top:50%;position:absolute;left:0;text-align:center;width:100%}:host .category-wrapper ul.slides li:hover{opacity:.9}:host .category-wrapper ul.slides li co-image ::ng-deep{width:100%}:host .category-wrapper ul.slides li co-image ::ng-deep img{filter:brightness(80%);width:100%}:host .category-wrapper ul.slides li:nth-child(5n){margin-right:0}\n"]
|
|
1870
|
-
},] }
|
|
1871
|
-
];
|
|
1872
|
-
CatalogHomeComponent.ctorParameters = () => [
|
|
1873
|
-
{ type: IconCacheService },
|
|
1874
|
-
{ type: NavigationService },
|
|
1875
|
-
{ type: CatalogService }
|
|
1876
|
-
];
|
|
1877
|
-
CatalogHomeComponent.propDecorators = {
|
|
1878
|
-
minified: [{ type: Input }]
|
|
1879
|
-
};
|
|
1880
|
-
|
|
1881
|
-
class ArticleCardComponent {
|
|
1882
|
-
constructor(iconCache, catalog, options, _iOne, _changeDetector, _appEventService, _imageService, _settingsService) {
|
|
1883
|
-
this.iconCache = iconCache;
|
|
1884
|
-
this.catalog = catalog;
|
|
1885
|
-
this.options = options;
|
|
1886
|
-
this._iOne = _iOne;
|
|
1887
|
-
this._changeDetector = _changeDetector;
|
|
1888
|
-
this._appEventService = _appEventService;
|
|
1889
|
-
this._imageService = _imageService;
|
|
1890
|
-
this._settingsService = _settingsService;
|
|
1891
|
-
this.icons = IconEnum;
|
|
1892
|
-
this.isSelected = false;
|
|
1893
|
-
this.isSmallModus = false;
|
|
1894
|
-
this.hasMagnifierButton = false;
|
|
1895
|
-
this.hasInfoButton = false;
|
|
1896
|
-
// does not emit when you click one of the predefined buttons, but emits on a click on any of our other content
|
|
1897
|
-
this.contentClick = new EventEmitter();
|
|
1898
|
-
this.infoButtonClick = new EventEmitter();
|
|
1899
|
-
this.magnifierButtonClick = new EventEmitter();
|
|
1900
|
-
this.threeDButtonClick = new EventEmitter();
|
|
1901
|
-
this.configurable = false;
|
|
1902
|
-
this.threeD = false;
|
|
1903
|
-
this.valutaSymbol = '€';
|
|
2437
|
+
handleCategoryClick(event, category) {
|
|
2438
|
+
this.categoryClick.emit(category);
|
|
1904
2439
|
}
|
|
1905
|
-
|
|
1906
|
-
this.
|
|
1907
|
-
this.name = this._article.name ? this._article.name : this._article.description;
|
|
1908
|
-
this.added_description = this._article.additionalDescription ? this._article.additionalDescription : '';
|
|
1909
|
-
this.description = this._article.description + ' ' + this.added_description;
|
|
1910
|
-
this.turnover = this._article.turnoverGroupDescr;
|
|
1911
|
-
// this.stock_available = this._article.stockStatus ? this._article.stockStatus : this._article.standardDeliveryTimeSales + " " + this._article.standardDeliveryMethod;
|
|
1912
|
-
this.stock_available = this._article.stockStatus;
|
|
1913
|
-
this.configurable = this._article.goodType === 'B';
|
|
1914
|
-
this.threeD = this._article.homeBrandId !== undefined;
|
|
2440
|
+
handleTurnoverGroupClick(event, turnovergroupNr) {
|
|
2441
|
+
this.turnoverGroupClick.emit(turnovergroupNr);
|
|
1915
2442
|
}
|
|
1916
|
-
|
|
1917
|
-
|
|
2443
|
+
onToggleMobileMenu() {
|
|
2444
|
+
this.mobileMenuToggle = !this.mobileMenuToggle;
|
|
1918
2445
|
}
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
|
|
2446
|
+
onSubMenuToggle(event) {
|
|
2447
|
+
event.preventDefault();
|
|
2448
|
+
const parentItem = event.currentTarget.closest('li');
|
|
2449
|
+
const parentClasses = parentItem.classList;
|
|
2450
|
+
if (parentClasses.contains('open')) {
|
|
2451
|
+
parentClasses.remove('open');
|
|
2452
|
+
}
|
|
2453
|
+
else {
|
|
2454
|
+
parentClasses.add('open');
|
|
1922
2455
|
}
|
|
1923
2456
|
}
|
|
1924
|
-
|
|
1925
|
-
event.
|
|
1926
|
-
|
|
2457
|
+
onOpenSubMenu(event) {
|
|
2458
|
+
const listItem = event.target;
|
|
2459
|
+
const rect = listItem.getBoundingClientRect();
|
|
2460
|
+
const rectParent = listItem.parentNode.getBoundingClientRect();
|
|
2461
|
+
this.popupHeight = rectParent.height;
|
|
2462
|
+
this.popupLeft = rectParent.width;
|
|
1927
2463
|
}
|
|
1928
|
-
|
|
1929
|
-
event.
|
|
1930
|
-
this.
|
|
2464
|
+
onSetCategory(event, category) {
|
|
2465
|
+
// if (!event.target.closest('.toggle_sub_menu') && !event.target.classList.contains('toggle_sub_menu')) {
|
|
2466
|
+
// this.navigationService.setCategory(category);
|
|
2467
|
+
// this.mobileMenuToggle = false;
|
|
2468
|
+
// }
|
|
1931
2469
|
}
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
}
|
|
2470
|
+
onSetTurnoverGroup(event, turnoverGroup) {
|
|
2471
|
+
// if (!event.target.closest('.toggle_sub_menu') && !event.target.classList.contains('toggle_sub_menu')) {
|
|
2472
|
+
// this.navigationService.setTurnoverGroup(turnoverGroup);
|
|
2473
|
+
// this.mobileMenuToggle = false;
|
|
2474
|
+
// }
|
|
1937
2475
|
}
|
|
1938
|
-
|
|
1939
|
-
|
|
1940
|
-
this._appEventService.stockDetailsClick.next(this.article);
|
|
2476
|
+
onOpenExternalCatalog(event, webviewUrl) {
|
|
2477
|
+
// this.navigationService.setExternalSourceUrl(webviewUrl);
|
|
1941
2478
|
}
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
this._appEventService.arButtonClick.next(this.article);
|
|
2479
|
+
onOpenIoneCatalog(event, webviewUrl, ioneUrl, upId, userName, passWord) {
|
|
2480
|
+
// this.navigationService.setIoneSourceUrl(webviewUrl, ioneUrl, upId, userName, passWord);
|
|
1945
2481
|
}
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
return desc;
|
|
2482
|
+
handleHomeClick(event) {
|
|
2483
|
+
this.homeClick.emit();
|
|
1949
2484
|
}
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
});
|
|
2485
|
+
handleShowCollectionOverlay() {
|
|
2486
|
+
this.showExternalOverlay = false;
|
|
2487
|
+
this.showCollectionOverlay = true;
|
|
1954
2488
|
}
|
|
1955
|
-
|
|
1956
|
-
this.
|
|
2489
|
+
handleShowExternalOverlay() {
|
|
2490
|
+
this.showCollectionOverlay = false;
|
|
2491
|
+
this.showExternalOverlay = true;
|
|
1957
2492
|
}
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
this._article.baselinePrice = price.baselinePrice;
|
|
1964
|
-
this._article.price = price.basePrice;
|
|
1965
|
-
this._article.suppliedPrice = price.suppliedPrice;
|
|
1966
|
-
if (price.articleDescription !== undefined && price.articleDescription !== '') {
|
|
1967
|
-
this._article.description = price.articleDescription;
|
|
1968
|
-
}
|
|
1969
|
-
}
|
|
1970
|
-
});
|
|
1971
|
-
}
|
|
2493
|
+
handleHideCollectionOverlay() {
|
|
2494
|
+
this.showCollectionOverlay = false;
|
|
2495
|
+
}
|
|
2496
|
+
handleHideExternalOverlay() {
|
|
2497
|
+
this.showExternalOverlay = false;
|
|
1972
2498
|
}
|
|
1973
2499
|
}
|
|
1974
|
-
|
|
2500
|
+
CatalogNavigationComponent.decorators = [
|
|
1975
2501
|
{ type: Component, args: [{
|
|
1976
|
-
selector: '
|
|
1977
|
-
template:
|
|
1978
|
-
|
|
2502
|
+
selector: 'co-catalog-navigation',
|
|
2503
|
+
template: `
|
|
2504
|
+
<div class="navigation-wrapper" [class.minified]="minified">
|
|
2505
|
+
<div class="navigation-item-wrapper">
|
|
2506
|
+
<a class="navigation-link" (click)="handleHomeClick($event)" [textContent]="homeLabel"></a>
|
|
2507
|
+
</div>
|
|
2508
|
+
<div class="navigation-item-wrapper" [class.active]="mobileMenuToggle" (click)="onToggleMobileMenu()"
|
|
2509
|
+
(mouseover)="handleShowCollectionOverlay()"
|
|
2510
|
+
(mouseleave)="handleHideCollectionOverlay()"
|
|
2511
|
+
overlayParent #collectionParentForOverlay="overlayParent">
|
|
2512
|
+
<co-icon class="hamburger-icon" [iconData]="iconCache.getIcon(icons.Hamburger)"></co-icon>
|
|
2513
|
+
<span [textContent]="collectionLabel"></span>
|
|
2514
|
+
<div class="navigation-overlay-wrapper" [overlay]="collectionParentForOverlay" *ngIf="showCollectionOverlay" @showHideOverlay>
|
|
2515
|
+
<div class="navigation-category-column-wrapper" *ngFor="let category of categories">
|
|
2516
|
+
<div class="navigation-category" [textContent]="category.category"></div>
|
|
2517
|
+
<div class="navigation-turnovergroup-wrapper">
|
|
2518
|
+
<div class="navigation-turnovergroup" *ngFor="let turnoverGroup of category.turnoverGroups" [textContent]="turnoverGroup.description"></div>
|
|
2519
|
+
</div>
|
|
2520
|
+
</div>
|
|
2521
|
+
</div>
|
|
2522
|
+
</div>
|
|
2523
|
+
<div class="navigation-item-wrapper" [class.active]="mobileMenuToggle" (click)="onToggleMobileMenu()"
|
|
2524
|
+
(mouseover)="handleShowExternalOverlay()"
|
|
2525
|
+
(mouseleave)="handleHideExternalOverlay()"
|
|
2526
|
+
overlayParent #externalParentForOverlay="overlayParent">
|
|
2527
|
+
<co-icon class="hamburger-icon" [iconData]="iconCache.getIcon(icons.Ar)"></co-icon>
|
|
2528
|
+
<span [textContent]="externalSourcesLabel"></span>
|
|
2529
|
+
<div class="navigation-overlay-wrapper" [overlay]="externalParentForOverlay" @showHideOverlay>
|
|
2530
|
+
<co-catalog-external-sources></co-catalog-external-sources>
|
|
2531
|
+
</div>
|
|
2532
|
+
</div>
|
|
2533
|
+
</div>
|
|
2534
|
+
`,
|
|
2535
|
+
animations: [
|
|
2536
|
+
trigger('showHideOverlay', [
|
|
2537
|
+
state('void', style({ height: '0' })),
|
|
2538
|
+
state('*', style({ height: '*' })),
|
|
2539
|
+
transition('void <=> *', animate(100))
|
|
2540
|
+
])
|
|
2541
|
+
],
|
|
2542
|
+
encapsulation: ViewEncapsulation.None
|
|
1979
2543
|
},] }
|
|
1980
2544
|
];
|
|
1981
|
-
|
|
2545
|
+
CatalogNavigationComponent.ctorParameters = () => [
|
|
1982
2546
|
{ type: IconCacheService },
|
|
1983
2547
|
{ type: CatalogService },
|
|
1984
|
-
{ type:
|
|
1985
|
-
{ type: IOneControllerService },
|
|
1986
|
-
{ type: ChangeDetectorRef },
|
|
1987
|
-
{ type: AppEventService },
|
|
1988
|
-
{ type: ImageService },
|
|
1989
|
-
{ type: SettingsService }
|
|
2548
|
+
{ type: CatalogEventService }
|
|
1990
2549
|
];
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
contentClick: [{ type: Output }],
|
|
2002
|
-
infoButtonClick: [{ type: Output }],
|
|
2003
|
-
magnifierButtonClick: [{ type: Output }],
|
|
2004
|
-
threeDButtonClick: [{ type: Output }],
|
|
2005
|
-
onHostClick: [{ type: HostListener, args: ['click', ['$event'],] }]
|
|
2550
|
+
CatalogNavigationComponent.propDecorators = {
|
|
2551
|
+
homeLabel: [{ type: Input }],
|
|
2552
|
+
collectionLabel: [{ type: Input }],
|
|
2553
|
+
externalSourcesLabel: [{ type: Input }],
|
|
2554
|
+
showTurnoverGroups: [{ type: Input }],
|
|
2555
|
+
homeClick: [{ type: Output }],
|
|
2556
|
+
categoryClick: [{ type: Output }],
|
|
2557
|
+
turnoverGroupClick: [{ type: Output }],
|
|
2558
|
+
minified: [{ type: Input }],
|
|
2559
|
+
showClass: [{ type: HostBinding, args: ['class.co-catalog-navigation',] }]
|
|
2006
2560
|
};
|
|
2007
2561
|
|
|
2008
|
-
class
|
|
2009
|
-
constructor() {
|
|
2010
|
-
this.
|
|
2562
|
+
class ExternalSourceViewmodel {
|
|
2563
|
+
constructor(catalog, source) {
|
|
2564
|
+
this.catalogDefinition = catalog;
|
|
2565
|
+
this.externalSource = source;
|
|
2011
2566
|
}
|
|
2012
|
-
}
|
|
2013
|
-
LabelFieldComponent.decorators = [
|
|
2014
|
-
{ type: Component, args: [{
|
|
2015
|
-
selector: 'app-label-field',
|
|
2016
|
-
template: "<div *ngIf=\"label\" class=\"label\" [textContent]=\"label\"></div>\n<div class=\"description\" [textContent]=\"description\"></div>\n",
|
|
2017
|
-
styles: [":host{display:flex;flex-direction:column}.label{font-size:11px}.description{font-size:13px}\n"]
|
|
2018
|
-
},] }
|
|
2019
|
-
];
|
|
2020
|
-
LabelFieldComponent.propDecorators = {
|
|
2021
|
-
label: [{ type: Input }],
|
|
2022
|
-
description: [{ type: Input }]
|
|
2023
|
-
};
|
|
2567
|
+
}
|
|
2024
2568
|
|
|
2025
|
-
class
|
|
2026
|
-
constructor(
|
|
2027
|
-
this.
|
|
2028
|
-
this.
|
|
2029
|
-
this.
|
|
2030
|
-
this.onHandleClick = new EventEmitter();
|
|
2569
|
+
class CatalogExternalSourcesComponent {
|
|
2570
|
+
constructor(_catalogConnectorService, _imageService) {
|
|
2571
|
+
this._catalogConnectorService = _catalogConnectorService;
|
|
2572
|
+
this._imageService = _imageService;
|
|
2573
|
+
this.externalSourceViewModels = [];
|
|
2031
2574
|
}
|
|
2032
|
-
|
|
2033
|
-
|
|
2575
|
+
showClass() {
|
|
2576
|
+
return true;
|
|
2034
2577
|
}
|
|
2035
2578
|
ngOnInit() {
|
|
2579
|
+
this.externalSourceViewModels.length = 0;
|
|
2580
|
+
this._catalogConnectorService.getCatalogDefinitions().then((defs) => __awaiter(this, void 0, void 0, function* () {
|
|
2581
|
+
for (let i = 0; i < defs.length; i++) {
|
|
2582
|
+
this._imageService.getExternalSourceImage(defs[i]);
|
|
2583
|
+
const viewModel = new ExternalSourceViewmodel(defs[i], defs[i].externalSourceId ? yield this._catalogConnectorService.getExternalSource(defs[i].externalSourceId, false) : new ExternalSource());
|
|
2584
|
+
this.externalSourceViewModels.push(viewModel);
|
|
2585
|
+
}
|
|
2586
|
+
}));
|
|
2036
2587
|
}
|
|
2037
2588
|
}
|
|
2038
|
-
|
|
2589
|
+
CatalogExternalSourcesComponent.decorators = [
|
|
2039
2590
|
{ type: Component, args: [{
|
|
2040
|
-
selector: '
|
|
2041
|
-
template:
|
|
2042
|
-
|
|
2591
|
+
selector: 'co-catalog-external-sources',
|
|
2592
|
+
template: `
|
|
2593
|
+
<ng-container *ngIf="externalSourceViewModels && externalSourceViewModels.length > 0">
|
|
2594
|
+
<div class="catalog-external-sources-wrapper">
|
|
2595
|
+
<div class="external-source-item" *ngFor="let externalSourceViewModel of externalSourceViewModels">
|
|
2596
|
+
<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
|
+
</div>
|
|
2601
|
+
</div>
|
|
2602
|
+
</ng-container>
|
|
2603
|
+
`,
|
|
2604
|
+
encapsulation: ViewEncapsulation.None
|
|
2043
2605
|
},] }
|
|
2044
2606
|
];
|
|
2045
|
-
|
|
2046
|
-
{ type:
|
|
2607
|
+
CatalogExternalSourcesComponent.ctorParameters = () => [
|
|
2608
|
+
{ type: CatalogConnectorService },
|
|
2609
|
+
{ type: CatalogImageService }
|
|
2047
2610
|
];
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
horizontal: [{ type: HostBinding, args: ['class.horizontal',] }, { type: Input }],
|
|
2051
|
-
onHandleClick: [{ type: Output }]
|
|
2611
|
+
CatalogExternalSourcesComponent.propDecorators = {
|
|
2612
|
+
showClass: [{ type: HostBinding, args: ['class.co-catalog-external-sources',] }]
|
|
2052
2613
|
};
|
|
2053
2614
|
|
|
2054
|
-
class
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2615
|
+
class CatalogExternalSourcesModule {
|
|
2616
|
+
}
|
|
2617
|
+
CatalogExternalSourcesModule.decorators = [
|
|
2618
|
+
{ type: NgModule, args: [{
|
|
2619
|
+
imports: [
|
|
2620
|
+
CommonModule,
|
|
2621
|
+
CatalogFilterModule,
|
|
2622
|
+
ImageModule,
|
|
2623
|
+
ResponsiveTextModule
|
|
2624
|
+
],
|
|
2625
|
+
declarations: [
|
|
2626
|
+
CatalogExternalSourcesComponent
|
|
2627
|
+
],
|
|
2628
|
+
exports: [
|
|
2629
|
+
CatalogExternalSourcesComponent
|
|
2630
|
+
]
|
|
2631
|
+
},] }
|
|
2632
|
+
];
|
|
2633
|
+
|
|
2634
|
+
class CatalogNavigationModule {
|
|
2635
|
+
}
|
|
2636
|
+
CatalogNavigationModule.decorators = [
|
|
2637
|
+
{ type: NgModule, args: [{
|
|
2638
|
+
imports: [
|
|
2639
|
+
CommonModule,
|
|
2640
|
+
IconModule,
|
|
2641
|
+
CatalogFilterModule,
|
|
2642
|
+
OverlayModule,
|
|
2643
|
+
CatalogExternalSourcesModule
|
|
2644
|
+
],
|
|
2645
|
+
declarations: [
|
|
2646
|
+
CatalogNavigationComponent
|
|
2647
|
+
],
|
|
2648
|
+
exports: [
|
|
2649
|
+
CatalogNavigationComponent
|
|
2650
|
+
]
|
|
2651
|
+
},] }
|
|
2652
|
+
];
|
|
2653
|
+
|
|
2654
|
+
class CatalogSearchComponent {
|
|
2655
|
+
constructor(_catalogSearchService, _catalogEventService) {
|
|
2656
|
+
this._catalogSearchService = _catalogSearchService;
|
|
2657
|
+
this._catalogEventService = _catalogEventService;
|
|
2658
|
+
this.showNavigation = false;
|
|
2659
|
+
this.showFilter = false;
|
|
2660
|
+
this.showViewModes = false;
|
|
2661
|
+
this.onLookAtArticleButtonClick = new EventEmitter();
|
|
2662
|
+
this.onArButtonClick = new EventEmitter();
|
|
2663
|
+
this.onAddArticleButtonClick = new EventEmitter();
|
|
2664
|
+
this.onArticleClick = new EventEmitter();
|
|
2665
|
+
this.onStockDetailsClick = new EventEmitter();
|
|
2666
|
+
this.mode = 'tile';
|
|
2667
|
+
this.showCategories = true;
|
|
2058
2668
|
this._subs = [];
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
|
|
2669
|
+
}
|
|
2670
|
+
showClass() {
|
|
2671
|
+
return true;
|
|
2062
2672
|
}
|
|
2063
2673
|
ngOnInit() {
|
|
2064
|
-
|
|
2674
|
+
this._subs.push(this._catalogEventService.addArticleButtonClick.subscribe((json) => {
|
|
2675
|
+
this.onAddArticleButtonClick.emit(json);
|
|
2676
|
+
}), this._catalogEventService.arButtonClick.subscribe((article) => {
|
|
2677
|
+
this.onArButtonClick.emit(article);
|
|
2678
|
+
}), this._catalogEventService.articleClick.subscribe((article) => {
|
|
2679
|
+
this.onArticleClick.emit(article);
|
|
2680
|
+
}), this._catalogEventService.lookAtArticleButtonClick.subscribe((article) => {
|
|
2681
|
+
this.onLookAtArticleButtonClick.emit(article);
|
|
2682
|
+
}), this._catalogEventService.stockDetailsClick.subscribe((article) => {
|
|
2683
|
+
this.onStockDetailsClick.emit(article);
|
|
2684
|
+
}));
|
|
2065
2685
|
}
|
|
2066
2686
|
ngOnDestroy() {
|
|
2067
|
-
this._subs.forEach(
|
|
2687
|
+
this._subs.forEach(s => s.unsubscribe());
|
|
2688
|
+
}
|
|
2689
|
+
handleCategoryClick(category) {
|
|
2690
|
+
this._catalogSearchService.category = category;
|
|
2691
|
+
}
|
|
2692
|
+
handleTurnoverGroupClick(turnoverGroup) {
|
|
2693
|
+
this._catalogSearchService.turnoverGroup = turnoverGroup;
|
|
2068
2694
|
}
|
|
2069
2695
|
}
|
|
2070
|
-
|
|
2696
|
+
CatalogSearchComponent.decorators = [
|
|
2071
2697
|
{ type: Component, args: [{
|
|
2072
|
-
selector: '
|
|
2073
|
-
template:
|
|
2074
|
-
|
|
2698
|
+
selector: 'co-catalog-search',
|
|
2699
|
+
template: `
|
|
2700
|
+
<co-catalog-navigation *ngIf="showNavigation"></co-catalog-navigation>
|
|
2701
|
+
<div class="catalog-search-wrapper">
|
|
2702
|
+
<ng-container *ngIf="showFilter">
|
|
2703
|
+
<div class="filter-content">
|
|
2704
|
+
<co-catalog-filter [showResetFilter]="true"></co-catalog-filter>
|
|
2705
|
+
</div>
|
|
2706
|
+
</ng-container>
|
|
2707
|
+
<div class="search-content-wrapper">
|
|
2708
|
+
<div class="search-header">
|
|
2709
|
+
<!--
|
|
2710
|
+
<co-catalog-external-sources></co-catalog-external-sources>
|
|
2711
|
+
-->
|
|
2712
|
+
<co-catalog-search-header [placeholder]="'Zoeken naar artikelen'"></co-catalog-search-header>
|
|
2713
|
+
</div>
|
|
2714
|
+
<ng-container *ngIf="showViewModes">
|
|
2715
|
+
<button (click)="mode = 'tile'">tile</button>
|
|
2716
|
+
<button (click)="mode = 'list'">list</button>
|
|
2717
|
+
<button (click)="mode = 'grid'">grid</button>
|
|
2718
|
+
</ng-container>
|
|
2719
|
+
<!--
|
|
2720
|
+
<co-catalog-categories (categoryClick)="handleCategoryClick($event)" (turnoverGroupClick)="handleTurnoverGroupClick($event)"></co-catalog-categories>
|
|
2721
|
+
-->
|
|
2722
|
+
<div class="search-content">
|
|
2723
|
+
<ng-container *ngIf="mode === 'tile'">
|
|
2724
|
+
<co-catalog-search-result-tile></co-catalog-search-result-tile>
|
|
2725
|
+
</ng-container>
|
|
2726
|
+
<ng-container *ngIf="mode === 'list'">
|
|
2727
|
+
<co-catalog-search-result-list></co-catalog-search-result-list>
|
|
2728
|
+
</ng-container>
|
|
2729
|
+
<ng-container *ngIf="mode === 'grid'">
|
|
2730
|
+
<!--
|
|
2731
|
+
<co-catalog-search-result></co-catalog-search-result>
|
|
2732
|
+
-->
|
|
2733
|
+
</ng-container>
|
|
2734
|
+
</div>
|
|
2735
|
+
</div>
|
|
2736
|
+
</div>
|
|
2737
|
+
`,
|
|
2738
|
+
encapsulation: ViewEncapsulation.None
|
|
2075
2739
|
},] }
|
|
2076
2740
|
];
|
|
2077
|
-
|
|
2078
|
-
{ type:
|
|
2741
|
+
CatalogSearchComponent.ctorParameters = () => [
|
|
2742
|
+
{ type: CatalogSearchService },
|
|
2743
|
+
{ type: CatalogEventService }
|
|
2079
2744
|
];
|
|
2080
|
-
|
|
2081
|
-
|
|
2745
|
+
CatalogSearchComponent.propDecorators = {
|
|
2746
|
+
showNavigation: [{ type: Input }],
|
|
2747
|
+
showFilter: [{ type: Input }],
|
|
2748
|
+
showViewModes: [{ type: Input }],
|
|
2749
|
+
onLookAtArticleButtonClick: [{ type: Output }],
|
|
2750
|
+
onArButtonClick: [{ type: Output }],
|
|
2751
|
+
onAddArticleButtonClick: [{ type: Output }],
|
|
2752
|
+
onArticleClick: [{ type: Output }],
|
|
2753
|
+
onStockDetailsClick: [{ type: Output }],
|
|
2754
|
+
showClass: [{ type: HostBinding, args: ['class.co-catalog-search',] }]
|
|
2082
2755
|
};
|
|
2083
2756
|
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
this._dictionaryService = _dictionaryService;
|
|
2757
|
+
class CatalogSearchHeaderComponent {
|
|
2758
|
+
constructor(catalogSearchService) {
|
|
2759
|
+
this.catalogSearchService = catalogSearchService;
|
|
2088
2760
|
}
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
return '';
|
|
2092
|
-
}
|
|
2093
|
-
replace = replace ? replace : [];
|
|
2094
|
-
if (!Array.isArray(replace)) {
|
|
2095
|
-
replace = [replace];
|
|
2096
|
-
}
|
|
2097
|
-
return this._dictionaryService.get(value, upperCaseFirst, ...replace);
|
|
2761
|
+
showClass() {
|
|
2762
|
+
return true;
|
|
2098
2763
|
}
|
|
2099
2764
|
}
|
|
2100
|
-
|
|
2101
|
-
{ type:
|
|
2102
|
-
|
|
2765
|
+
CatalogSearchHeaderComponent.decorators = [
|
|
2766
|
+
{ type: Component, args: [{
|
|
2767
|
+
selector: 'co-catalog-search-header',
|
|
2768
|
+
template: `
|
|
2769
|
+
<div class="catalog-search-header-wrapper">
|
|
2770
|
+
<co-input-search class="catalog-search-general"
|
|
2771
|
+
[useRightIcon]="true"
|
|
2772
|
+
[centerLabel]="true"
|
|
2773
|
+
[(model)]="catalogSearchService.searchRequest.general"
|
|
2774
|
+
[placeholder]="placeholder"
|
|
2775
|
+
[initFocus]="true"
|
|
2776
|
+
(search)="catalogSearchService.searchArticles()">
|
|
2777
|
+
</co-input-search>
|
|
2778
|
+
</div>
|
|
2779
|
+
`,
|
|
2780
|
+
encapsulation: ViewEncapsulation.None
|
|
2103
2781
|
},] }
|
|
2104
2782
|
];
|
|
2105
|
-
|
|
2106
|
-
{ type:
|
|
2107
|
-
];
|
|
2783
|
+
CatalogSearchHeaderComponent.ctorParameters = () => [
|
|
2784
|
+
{ type: CatalogSearchService }
|
|
2785
|
+
];
|
|
2786
|
+
CatalogSearchHeaderComponent.propDecorators = {
|
|
2787
|
+
placeholder: [{ type: Input }],
|
|
2788
|
+
showClass: [{ type: HostBinding, args: ['class.co-catalog-search-header',] }]
|
|
2789
|
+
};
|
|
2108
2790
|
|
|
2109
|
-
class
|
|
2110
|
-
}
|
|
2791
|
+
class CatalogSearchHeaderModule {
|
|
2792
|
+
}
|
|
2793
|
+
CatalogSearchHeaderModule.decorators = [
|
|
2794
|
+
{ type: NgModule, args: [{
|
|
2795
|
+
imports: [
|
|
2796
|
+
CommonModule,
|
|
2797
|
+
InputSearchModule
|
|
2798
|
+
],
|
|
2799
|
+
declarations: [
|
|
2800
|
+
CatalogSearchHeaderComponent
|
|
2801
|
+
],
|
|
2802
|
+
exports: [
|
|
2803
|
+
CatalogSearchHeaderComponent
|
|
2804
|
+
]
|
|
2805
|
+
},] }
|
|
2806
|
+
];
|
|
2111
2807
|
|
|
2112
|
-
class
|
|
2113
|
-
constructor(
|
|
2114
|
-
this.
|
|
2115
|
-
this._containerRef = _containerRef;
|
|
2116
|
-
this._changeDetector = _changeDetector;
|
|
2117
|
-
}
|
|
2118
|
-
set layout(value) {
|
|
2119
|
-
if (value) {
|
|
2120
|
-
this._layout = value;
|
|
2121
|
-
this._setLayout();
|
|
2122
|
-
}
|
|
2123
|
-
}
|
|
2124
|
-
set layoutLayoutId(value) {
|
|
2125
|
-
this._layoutId = value;
|
|
2126
|
-
}
|
|
2127
|
-
get layoutId() {
|
|
2128
|
-
return this._layoutId;
|
|
2129
|
-
}
|
|
2130
|
-
test() {
|
|
2131
|
-
this._changeDetector.detectChanges();
|
|
2132
|
-
}
|
|
2133
|
-
ngOnDestroy() {
|
|
2134
|
-
this._containerRef = undefined;
|
|
2135
|
-
this._templateRef = undefined;
|
|
2808
|
+
class CatalogSearchBaseComponent {
|
|
2809
|
+
constructor(catalogSearchService) {
|
|
2810
|
+
this.catalogSearchService = catalogSearchService;
|
|
2136
2811
|
}
|
|
2137
|
-
|
|
2138
|
-
|
|
2139
|
-
this._setLayout();
|
|
2812
|
+
onPreviousClick() {
|
|
2813
|
+
this.catalogSearchService.currentPage -= 1;
|
|
2140
2814
|
}
|
|
2141
|
-
|
|
2815
|
+
onNextClick() {
|
|
2816
|
+
this.catalogSearchService.currentPage += 1;
|
|
2142
2817
|
}
|
|
2143
|
-
|
|
2144
|
-
|
|
2145
|
-
if (this._layout.hasOwnProperty(key) && this.layoutId === key) {
|
|
2146
|
-
// found a layout for this element
|
|
2147
|
-
this._resetView(this._layout[key]);
|
|
2148
|
-
}
|
|
2149
|
-
}
|
|
2818
|
+
onPageClick(pageNr) {
|
|
2819
|
+
this.catalogSearchService.currentPage = pageNr;
|
|
2150
2820
|
}
|
|
2151
|
-
|
|
2152
|
-
|
|
2153
|
-
|
|
2154
|
-
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
|
|
2158
|
-
|
|
2821
|
+
}
|
|
2822
|
+
CatalogSearchBaseComponent.decorators = [
|
|
2823
|
+
{ type: Directive }
|
|
2824
|
+
];
|
|
2825
|
+
CatalogSearchBaseComponent.ctorParameters = () => [
|
|
2826
|
+
{ type: CatalogSearchService }
|
|
2827
|
+
];
|
|
2828
|
+
|
|
2829
|
+
class CatalogSearchResultTileComponent extends CatalogSearchBaseComponent {
|
|
2830
|
+
constructor() {
|
|
2831
|
+
super(...arguments);
|
|
2832
|
+
this.onLookAtArticleButtonClick = new EventEmitter();
|
|
2833
|
+
this.onArButtonClick = new EventEmitter();
|
|
2834
|
+
this.onAddArticleButtonClick = new EventEmitter();
|
|
2835
|
+
this.onArticleClick = new EventEmitter();
|
|
2836
|
+
this.onStockDetailsClick = new EventEmitter();
|
|
2837
|
+
this.showClass = true;
|
|
2838
|
+
this.smallScrollbar = true;
|
|
2159
2839
|
}
|
|
2160
2840
|
}
|
|
2161
|
-
|
|
2162
|
-
{ type:
|
|
2163
|
-
selector: '
|
|
2841
|
+
CatalogSearchResultTileComponent.decorators = [
|
|
2842
|
+
{ type: Component, args: [{
|
|
2843
|
+
selector: 'co-catalog-search-result-tile',
|
|
2844
|
+
template: `
|
|
2845
|
+
<div class="article-cards" visibilityObserverMaster>
|
|
2846
|
+
<ng-container *ngFor="let article of catalogSearchService.articles">
|
|
2847
|
+
<co-catalog-article-tile
|
|
2848
|
+
visibilityObserver
|
|
2849
|
+
#intersection="intersection"
|
|
2850
|
+
[observerEnabled]="!article.imageData"
|
|
2851
|
+
[showing]="intersection.isIntersecting"
|
|
2852
|
+
[article]="article"
|
|
2853
|
+
(onArticleClick)="onArticleClick.emit($event)"
|
|
2854
|
+
(onAddArticleButtonClick)="onAddArticleButtonClick.emit($event)"
|
|
2855
|
+
(onArButtonClick)="onArButtonClick.emit($event)"
|
|
2856
|
+
(onLookAtArticleButtonClick)="onLookAtArticleButtonClick.emit($event)"
|
|
2857
|
+
(onStockDetailsClick)="onStockDetailsClick.emit($event)"
|
|
2858
|
+
>
|
|
2859
|
+
</co-catalog-article-tile>
|
|
2860
|
+
</ng-container>
|
|
2861
|
+
</div>
|
|
2862
|
+
<co-pagination-bar *ngIf="catalogSearchService.articles?.length > 0"
|
|
2863
|
+
[currentPage]="catalogSearchService.currentPage"
|
|
2864
|
+
[itemsPerPage]="catalogSearchService.articlesPerPage"
|
|
2865
|
+
[totalItems]="catalogSearchService.resultCount"
|
|
2866
|
+
[previousLabel]="'PREVIOUS' | localize"
|
|
2867
|
+
[nextLabel]="'NEXT' | localize"
|
|
2868
|
+
[autoHide]="true"
|
|
2869
|
+
[directionLinks]="true"
|
|
2870
|
+
[paginationRange]="8"
|
|
2871
|
+
(previousClick)="onPreviousClick()"
|
|
2872
|
+
(nextClick)="onNextClick()"
|
|
2873
|
+
(pageClick)="onPageClick($event)">
|
|
2874
|
+
</co-pagination-bar>
|
|
2875
|
+
`,
|
|
2876
|
+
encapsulation: ViewEncapsulation.None
|
|
2164
2877
|
},] }
|
|
2165
2878
|
];
|
|
2166
|
-
|
|
2167
|
-
{ type:
|
|
2168
|
-
{ type:
|
|
2169
|
-
{ type:
|
|
2170
|
-
]
|
|
2171
|
-
|
|
2172
|
-
|
|
2173
|
-
|
|
2174
|
-
layoutLayoutId: [{ type: Input }],
|
|
2175
|
-
test: [{ type: HostListener, args: ['click',] }]
|
|
2879
|
+
CatalogSearchResultTileComponent.propDecorators = {
|
|
2880
|
+
onLookAtArticleButtonClick: [{ type: Output }],
|
|
2881
|
+
onArButtonClick: [{ type: Output }],
|
|
2882
|
+
onAddArticleButtonClick: [{ type: Output }],
|
|
2883
|
+
onArticleClick: [{ type: Output }],
|
|
2884
|
+
onStockDetailsClick: [{ type: Output }],
|
|
2885
|
+
showClass: [{ type: HostBinding, args: ['class.co-catalog-search-result-tile',] }],
|
|
2886
|
+
smallScrollbar: [{ type: HostBinding, args: ['class.co-small-scrollbar',] }]
|
|
2176
2887
|
};
|
|
2177
2888
|
|
|
2178
|
-
class
|
|
2179
|
-
constructor(
|
|
2889
|
+
class ArticleBaseComponent {
|
|
2890
|
+
constructor(iconCache, catalogService, options, _iOne, _changeDetector, _appEventService, _imageService, _settingsService) {
|
|
2891
|
+
this.iconCache = iconCache;
|
|
2180
2892
|
this.catalogService = catalogService;
|
|
2181
|
-
this.
|
|
2182
|
-
this.
|
|
2183
|
-
this._jsonUtils = _jsonUtils;
|
|
2184
|
-
this._ione = _ione;
|
|
2893
|
+
this.options = options;
|
|
2894
|
+
this._iOne = _iOne;
|
|
2185
2895
|
this._changeDetector = _changeDetector;
|
|
2186
|
-
this._optionsService = _optionsService;
|
|
2187
|
-
this._elementRef = _elementRef;
|
|
2188
2896
|
this._appEventService = _appEventService;
|
|
2897
|
+
this._imageService = _imageService;
|
|
2189
2898
|
this._settingsService = _settingsService;
|
|
2190
|
-
this.
|
|
2191
|
-
this.
|
|
2899
|
+
this.icons = IconEnum;
|
|
2900
|
+
this.isSelected = false;
|
|
2901
|
+
this.isSmallModus = false;
|
|
2902
|
+
this.hasMagnifierButton = false;
|
|
2903
|
+
this.hasInfoButton = false;
|
|
2192
2904
|
this.onLookAtArticleButtonClick = new EventEmitter();
|
|
2905
|
+
this.onArButtonClick = new EventEmitter();
|
|
2193
2906
|
this.onAddArticleButtonClick = new EventEmitter();
|
|
2194
2907
|
this.onArticleClick = new EventEmitter();
|
|
2195
|
-
this.onArButtonClick = new EventEmitter();
|
|
2196
2908
|
this.onStockDetailsClick = new EventEmitter();
|
|
2197
|
-
|
|
2198
|
-
this.
|
|
2199
|
-
this.
|
|
2200
|
-
this.
|
|
2201
|
-
this.
|
|
2202
|
-
this.
|
|
2203
|
-
this.
|
|
2204
|
-
this.
|
|
2205
|
-
if (loaded) {
|
|
2206
|
-
this._initConnection();
|
|
2207
|
-
}
|
|
2208
|
-
}));
|
|
2909
|
+
// does not emit when you click one of the predefined buttons, but emits on a click on any of our other content
|
|
2910
|
+
this.contentClick = new EventEmitter();
|
|
2911
|
+
this.infoButtonClick = new EventEmitter();
|
|
2912
|
+
this.magnifierButtonClick = new EventEmitter();
|
|
2913
|
+
this.threeDButtonClick = new EventEmitter();
|
|
2914
|
+
this.configurable = false;
|
|
2915
|
+
this.threeD = false;
|
|
2916
|
+
this.valutaSymbol = '€';
|
|
2209
2917
|
}
|
|
2210
|
-
set
|
|
2918
|
+
set article(value) {
|
|
2919
|
+
this._article = value;
|
|
2920
|
+
this.name = this._article.name ? this._article.name : this._article.description;
|
|
2921
|
+
this.added_description = this._article.additionalDescription ? this._article.additionalDescription : '';
|
|
2922
|
+
this.description = this._article.description + ' ' + this.added_description;
|
|
2923
|
+
this.turnover = this._article.turnoverGroupDescr;
|
|
2924
|
+
// this.stock_available = this._article.stockStatus ? this._article.stockStatus : this._article.standardDeliveryTimeSales + " " + this._article.standardDeliveryMethod;
|
|
2925
|
+
this.stock_available = this._article.stockStatus;
|
|
2926
|
+
this.configurable = this._article.goodType === 'B';
|
|
2927
|
+
this.threeD = this._article.homeBrandId !== undefined;
|
|
2928
|
+
}
|
|
2929
|
+
get article() {
|
|
2930
|
+
return this._article;
|
|
2931
|
+
}
|
|
2932
|
+
set showing(value) {
|
|
2211
2933
|
if (value) {
|
|
2212
|
-
|
|
2213
|
-
if (typeof value === 'string') {
|
|
2214
|
-
settings = JSON.parse(value);
|
|
2215
|
-
}
|
|
2216
|
-
else {
|
|
2217
|
-
settings = value;
|
|
2218
|
-
}
|
|
2219
|
-
this._settingsService.createSettingsFromObject(settings);
|
|
2934
|
+
this._getThumbNailImagesAndPrice();
|
|
2220
2935
|
}
|
|
2221
2936
|
}
|
|
2222
|
-
|
|
2223
|
-
return
|
|
2937
|
+
showClass() {
|
|
2938
|
+
return true;
|
|
2939
|
+
}
|
|
2940
|
+
onHostClick(event) {
|
|
2941
|
+
event.stopPropagation();
|
|
2942
|
+
this._appEventService.articleClick.next(this.article);
|
|
2943
|
+
this.onArticleClick.emit(this.article);
|
|
2944
|
+
}
|
|
2945
|
+
handleLookAtArticleButtonClick(event) {
|
|
2946
|
+
event.stopPropagation();
|
|
2947
|
+
this._appEventService.lookAtArticleButtonClick.next(this.article);
|
|
2948
|
+
this.onLookAtArticleButtonClick.emit(this.article);
|
|
2224
2949
|
}
|
|
2225
|
-
|
|
2226
|
-
this
|
|
2950
|
+
handleAddArticleButtonClick(event) {
|
|
2951
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2952
|
+
event.stopPropagation();
|
|
2953
|
+
const json = yield this._getJSONFromArticleObject(this.article);
|
|
2954
|
+
this._appEventService.addArticleButtonClick.next(json);
|
|
2955
|
+
this.onAddArticleButtonClick.emit(json);
|
|
2956
|
+
});
|
|
2227
2957
|
}
|
|
2228
|
-
|
|
2229
|
-
|
|
2958
|
+
handleStockDetailsButtonClick(event) {
|
|
2959
|
+
event.stopPropagation();
|
|
2960
|
+
this._appEventService.stockDetailsClick.next(this.article);
|
|
2961
|
+
this.onStockDetailsClick.emit(this.article);
|
|
2230
2962
|
}
|
|
2231
|
-
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
|
|
2963
|
+
handleArButtonClick(event) {
|
|
2964
|
+
event.stopPropagation();
|
|
2965
|
+
this._appEventService.arButtonClick.next(this.article);
|
|
2966
|
+
this.onArButtonClick.emit(this.article);
|
|
2967
|
+
}
|
|
2968
|
+
removeHtmlTags(desc) {
|
|
2969
|
+
desc = desc.replace(/\r?\n|\r/, '');
|
|
2970
|
+
return desc;
|
|
2235
2971
|
}
|
|
2236
|
-
|
|
2972
|
+
_getJSONFromArticleObject(article) {
|
|
2237
2973
|
return __awaiter(this, void 0, void 0, function* () {
|
|
2238
|
-
|
|
2974
|
+
return yield this._iOne.getJsonArticleFlatTree(article.goodId, article.goodType, 1);
|
|
2239
2975
|
});
|
|
2240
2976
|
}
|
|
2241
|
-
|
|
2242
|
-
|
|
2243
|
-
|
|
2244
|
-
|
|
2245
|
-
|
|
2246
|
-
|
|
2247
|
-
|
|
2248
|
-
|
|
2977
|
+
_detectChanges() {
|
|
2978
|
+
this._changeDetector.detectChanges();
|
|
2979
|
+
}
|
|
2980
|
+
_getThumbNailImagesAndPrice() {
|
|
2981
|
+
if (this._article) {
|
|
2982
|
+
this._imageService.getArticleImage(this._article);
|
|
2983
|
+
this._iOne.getArticlePrice(this._article.goodId, this._settingsService.settings.type).then(price => {
|
|
2984
|
+
if (price) {
|
|
2985
|
+
this._article.baselinePrice = price.baselinePrice;
|
|
2986
|
+
this._article.price = price.basePrice;
|
|
2987
|
+
this._article.suppliedPrice = price.suppliedPrice;
|
|
2988
|
+
if (price.articleDescription !== undefined && price.articleDescription !== '') {
|
|
2989
|
+
this._article.description = price.articleDescription;
|
|
2990
|
+
}
|
|
2991
|
+
}
|
|
2249
2992
|
});
|
|
2250
|
-
|
|
2251
|
-
// const defs = this._ione.connector.connector.getCatalogDefinitions();
|
|
2252
|
-
this._connectionSet = true;
|
|
2253
|
-
});
|
|
2993
|
+
}
|
|
2254
2994
|
}
|
|
2255
2995
|
}
|
|
2256
|
-
|
|
2257
|
-
{ type:
|
|
2258
|
-
selector: 'app-ione-catalog',
|
|
2259
|
-
template: "<app-catalog *ngIf=\"!catalogService.showExternalSource && upAndLoaded && catalogService.showCatOrTurnoverGroupArticles\"></app-catalog>\r\n<app-external-catalog *ngIf=\"catalogService.showExternalSource && !catalogService.showCatOrTurnoverGroupArticles\"></app-external-catalog>\r\n<app-home-catalog *ngIf=\"!catalogService.showExternalSource && !catalogService.showCatOrTurnoverGroupArticles\"></app-home-catalog>\r\n",
|
|
2260
|
-
encapsulation: ViewEncapsulation.None,
|
|
2261
|
-
styles: [":host{display:flex;overflow:auto;flex-direction:column;height:calc(100% - 55px);color:#22313c}::ng-deep app-catalog{display:flex;height:100%;flex-direction:column}\n"]
|
|
2262
|
-
},] }
|
|
2996
|
+
ArticleBaseComponent.decorators = [
|
|
2997
|
+
{ type: Directive }
|
|
2263
2998
|
];
|
|
2264
|
-
|
|
2999
|
+
ArticleBaseComponent.ctorParameters = () => [
|
|
3000
|
+
{ type: IconCacheService },
|
|
2265
3001
|
{ type: CatalogService },
|
|
2266
|
-
{ type:
|
|
2267
|
-
{ type:
|
|
2268
|
-
{ type: JsonUtilsService },
|
|
2269
|
-
{ type: IOneControllerService },
|
|
3002
|
+
{ type: CatalogOptionsService },
|
|
3003
|
+
{ type: CatalogConnectorService },
|
|
2270
3004
|
{ type: ChangeDetectorRef },
|
|
2271
|
-
{ type:
|
|
2272
|
-
{ type:
|
|
2273
|
-
{ type:
|
|
2274
|
-
{ type: SettingsService }
|
|
3005
|
+
{ type: CatalogEventService },
|
|
3006
|
+
{ type: CatalogImageService },
|
|
3007
|
+
{ type: CatalogSettingsService }
|
|
2275
3008
|
];
|
|
2276
|
-
|
|
2277
|
-
|
|
2278
|
-
|
|
2279
|
-
|
|
2280
|
-
|
|
3009
|
+
ArticleBaseComponent.propDecorators = {
|
|
3010
|
+
article: [{ type: Input }],
|
|
3011
|
+
showing: [{ type: Input }],
|
|
3012
|
+
imageData: [{ type: Input }],
|
|
3013
|
+
price: [{ type: Input }],
|
|
3014
|
+
isSelected: [{ type: Input }],
|
|
3015
|
+
isSmallModus: [{ type: Input }, { type: HostBinding, args: ['class.small-modus',] }],
|
|
3016
|
+
hasMagnifierButton: [{ type: Input }],
|
|
3017
|
+
hasInfoButton: [{ type: Input }],
|
|
2281
3018
|
onLookAtArticleButtonClick: [{ type: Output }],
|
|
3019
|
+
onArButtonClick: [{ type: Output }],
|
|
2282
3020
|
onAddArticleButtonClick: [{ type: Output }],
|
|
2283
3021
|
onArticleClick: [{ type: Output }],
|
|
2284
|
-
|
|
2285
|
-
|
|
3022
|
+
onStockDetailsClick: [{ type: Output }],
|
|
3023
|
+
contentClick: [{ type: Output }],
|
|
3024
|
+
infoButtonClick: [{ type: Output }],
|
|
3025
|
+
magnifierButtonClick: [{ type: Output }],
|
|
3026
|
+
threeDButtonClick: [{ type: Output }],
|
|
3027
|
+
showClass: [{ type: HostBinding, args: ['class.co-catalog-article-tile',] }],
|
|
3028
|
+
onHostClick: [{ type: HostListener, args: ['click', ['$event'],] }]
|
|
2286
3029
|
};
|
|
2287
3030
|
|
|
2288
|
-
class
|
|
2289
|
-
|
|
2290
|
-
|
|
2291
|
-
this._productCatalogControllerService = _productCatalogControllerService;
|
|
2292
|
-
this.icons = IconEnum;
|
|
2293
|
-
this.filterCollection = [];
|
|
2294
|
-
this.customColors = false;
|
|
2295
|
-
this.filterCollectionChange = new EventEmitter();
|
|
2296
|
-
this._subs = [];
|
|
2297
|
-
this.collapseIconData = this._iconCache.getIcon(this.icons.ArrowScrollLeft);
|
|
2298
|
-
this._subs.push(this._productCatalogControllerService.onResetFilters.subscribe(() => {
|
|
2299
|
-
this.resetFilterItems();
|
|
2300
|
-
}));
|
|
2301
|
-
}
|
|
2302
|
-
handleInputClick(item, checked) {
|
|
2303
|
-
item.active = checked;
|
|
2304
|
-
this.filterCollectionChange.next();
|
|
2305
|
-
}
|
|
2306
|
-
resetFilterItems() {
|
|
2307
|
-
if (this.filterCollection !== undefined && this.filterCollection.length > 0) {
|
|
2308
|
-
this.filterCollection.forEach((x) => {
|
|
2309
|
-
x.active = false;
|
|
2310
|
-
});
|
|
2311
|
-
}
|
|
3031
|
+
class CatalogArticleTileComponent extends ArticleBaseComponent {
|
|
3032
|
+
showClass() {
|
|
3033
|
+
return true;
|
|
2312
3034
|
}
|
|
2313
3035
|
}
|
|
2314
|
-
|
|
3036
|
+
CatalogArticleTileComponent.decorators = [
|
|
2315
3037
|
{ type: Component, args: [{
|
|
2316
|
-
selector: '
|
|
2317
|
-
template:
|
|
2318
|
-
|
|
3038
|
+
selector: 'co-catalog-article-tile',
|
|
3039
|
+
template: `
|
|
3040
|
+
<div class="article-tile-wrapper">
|
|
3041
|
+
<div class="card-wrapper">
|
|
3042
|
+
<div class="image">
|
|
3043
|
+
<co-image class="co-image" [source]="article.imageData"></co-image>
|
|
3044
|
+
</div>
|
|
3045
|
+
<div class="button-wrapper">
|
|
3046
|
+
<co-icon *ngIf="threeD" [iconData]="iconCache.getIcon(icons.ThreeD)" class="pointer"></co-icon>
|
|
3047
|
+
<co-icon *ngIf="threeD && options.showARButton" class="pointer"
|
|
3048
|
+
[iconData]="iconCache.getIcon(icons.Ar)"
|
|
3049
|
+
(click)="handleArButtonClick($event)"
|
|
3050
|
+
></co-icon>
|
|
3051
|
+
</div>
|
|
3052
|
+
</div>
|
|
3053
|
+
<div class="description-wrapper">
|
|
3054
|
+
<!--
|
|
3055
|
+
<div class="main">
|
|
3056
|
+
-->
|
|
3057
|
+
<div class="main-top">
|
|
3058
|
+
<div *ngIf="!!turnover" class="turnover" [innerText]="removeHtmlTags(turnover)"></div>
|
|
3059
|
+
<div *ngIf="!!name" class="description" [innerText]="removeHtmlTags(name)"></div>
|
|
3060
|
+
</div>
|
|
3061
|
+
<div class="main-bottom">
|
|
3062
|
+
<div class="main-bottom-left">
|
|
3063
|
+
<div *ngIf="!!article?.price" class="price" [innerText]="article?.price | priceDisplay:valutaSymbol"></div>
|
|
3064
|
+
<div *ngIf="!!article?.articleNumber" class="sku">
|
|
3065
|
+
<span [innerText]="'sku' | localize"></span>:
|
|
3066
|
+
<span [innerText]="article.articleNumber"></span>
|
|
3067
|
+
</div>
|
|
3068
|
+
<div *ngIf="stock_available" (click)="handleStockDetailsButtonClick($event)" class="stock"
|
|
3069
|
+
[innerText]="stock_available"></div>
|
|
3070
|
+
<div *ngIf="!stock_available" (click)="handleStockDetailsButtonClick($event)" class="stock not-in-stock"
|
|
3071
|
+
[innerText]="'Niet op voorraad'"></div>
|
|
3072
|
+
</div>
|
|
3073
|
+
<div *ngIf="options.showAddArticleButton" class="on-article-buttons">
|
|
3074
|
+
<co-button *ngIf="!configurable"
|
|
3075
|
+
[label]="options.addArticleButtonText"
|
|
3076
|
+
class="open-icon action pointer"
|
|
3077
|
+
(onClick)="handleAddArticleButtonClick($event)"
|
|
3078
|
+
[iconData]="iconCache.getIcon(icons.AddToCartDrop)">
|
|
3079
|
+
</co-button>
|
|
3080
|
+
<co-button *ngIf="configurable"
|
|
3081
|
+
[label]="options.lookAtArticleButtonText"
|
|
3082
|
+
class="open-icon action pointer"
|
|
3083
|
+
(onClick)="handleLookAtArticleButtonClick($event)"
|
|
3084
|
+
[iconData]="iconCache.getIcon(icons.MagicWand)">
|
|
3085
|
+
</co-button>
|
|
3086
|
+
<!--co-button
|
|
3087
|
+
[label]="options.stockButtonText"
|
|
3088
|
+
class="open-icon action pointer stock"
|
|
3089
|
+
(onClick)="handleStockDetailsButtonClick($event)"
|
|
3090
|
+
[iconData]="iconCache.getIcon(icons.Truck)">
|
|
3091
|
+
</co-button-->
|
|
3092
|
+
</div>
|
|
3093
|
+
</div>
|
|
3094
|
+
</div>
|
|
3095
|
+
</div>
|
|
3096
|
+
`,
|
|
3097
|
+
encapsulation: ViewEncapsulation.None
|
|
2319
3098
|
},] }
|
|
2320
3099
|
];
|
|
2321
|
-
|
|
2322
|
-
{ type:
|
|
2323
|
-
{ type: CatalogService }
|
|
2324
|
-
];
|
|
2325
|
-
FilterItemsComponent.propDecorators = {
|
|
2326
|
-
filterCollection: [{ type: Input }],
|
|
2327
|
-
description: [{ type: Input }],
|
|
2328
|
-
customColors: [{ type: Input }],
|
|
2329
|
-
filterCollectionChange: [{ type: Output }]
|
|
3100
|
+
CatalogArticleTileComponent.propDecorators = {
|
|
3101
|
+
showClass: [{ type: HostBinding, args: ['class.co-catalog-article-tile',] }]
|
|
2330
3102
|
};
|
|
2331
3103
|
|
|
2332
|
-
class
|
|
2333
|
-
transform(items, field) {
|
|
2334
|
-
if (!items || !field) {
|
|
2335
|
-
return items;
|
|
2336
|
-
}
|
|
2337
|
-
return items.filter(item => item[field] > 0);
|
|
2338
|
-
}
|
|
3104
|
+
class CatalogArticleTileModule {
|
|
2339
3105
|
}
|
|
2340
|
-
|
|
2341
|
-
{ type:
|
|
2342
|
-
|
|
2343
|
-
|
|
3106
|
+
CatalogArticleTileModule.decorators = [
|
|
3107
|
+
{ type: NgModule, args: [{
|
|
3108
|
+
imports: [
|
|
3109
|
+
CommonModule,
|
|
3110
|
+
IconModule,
|
|
3111
|
+
CatalogFilterModule,
|
|
3112
|
+
PriceDisplayPipeModule,
|
|
3113
|
+
ButtonModule,
|
|
3114
|
+
ImageModule
|
|
3115
|
+
],
|
|
3116
|
+
declarations: [
|
|
3117
|
+
CatalogArticleTileComponent
|
|
3118
|
+
],
|
|
3119
|
+
exports: [
|
|
3120
|
+
CatalogArticleTileComponent
|
|
3121
|
+
]
|
|
2344
3122
|
},] }
|
|
2345
3123
|
];
|
|
2346
3124
|
|
|
2347
|
-
class NavigationComponent {
|
|
2348
|
-
constructor(iconCache, navigationService, catalogController, _appEventService) {
|
|
2349
|
-
this.iconCache = iconCache;
|
|
2350
|
-
this.navigationService = navigationService;
|
|
2351
|
-
this.catalogController = catalogController;
|
|
2352
|
-
this._appEventService = _appEventService;
|
|
2353
|
-
this.icons = IconEnum;
|
|
2354
|
-
this.minified = false;
|
|
2355
|
-
this.mobileMenuToggle = false;
|
|
2356
|
-
}
|
|
2357
|
-
get internalList() {
|
|
2358
|
-
let list = [];
|
|
2359
|
-
this.catalogController.externalSourceViewModels.forEach(element => {
|
|
2360
|
-
if (element.catalogDefinition.useCatalogPage && element.externalSource.url !== '') {
|
|
2361
|
-
list.push(element);
|
|
2362
|
-
}
|
|
2363
|
-
});
|
|
2364
|
-
return list;
|
|
2365
|
-
}
|
|
2366
|
-
get externalList() {
|
|
2367
|
-
let list = [];
|
|
2368
|
-
this.catalogController.externalSourceViewModels.forEach(element => {
|
|
2369
|
-
if (!element.catalogDefinition.useCatalogPage && element.externalSource.url !== '') {
|
|
2370
|
-
list.push(element);
|
|
2371
|
-
}
|
|
2372
|
-
});
|
|
2373
|
-
return list;
|
|
2374
|
-
}
|
|
2375
|
-
onToggleMobileMenu() {
|
|
2376
|
-
this.mobileMenuToggle = !this.mobileMenuToggle;
|
|
2377
|
-
}
|
|
2378
|
-
onSubMenuToggle(event) {
|
|
2379
|
-
event.preventDefault();
|
|
2380
|
-
const parentItem = event.currentTarget.closest('li');
|
|
2381
|
-
const parentClasses = parentItem.classList;
|
|
2382
|
-
if (parentClasses.contains('open')) {
|
|
2383
|
-
parentClasses.remove('open');
|
|
2384
|
-
}
|
|
2385
|
-
else {
|
|
2386
|
-
parentClasses.add('open');
|
|
2387
|
-
}
|
|
2388
|
-
}
|
|
2389
|
-
onOpenSubMenu(event) {
|
|
2390
|
-
const listItem = event.target;
|
|
2391
|
-
const rect = listItem.getBoundingClientRect();
|
|
2392
|
-
const rectParent = listItem.parentNode.getBoundingClientRect();
|
|
2393
|
-
this.popupHeight = rectParent.height;
|
|
2394
|
-
this.popupLeft = rectParent.width;
|
|
2395
|
-
}
|
|
2396
|
-
onSetCategory(event, category) {
|
|
2397
|
-
if (!event.target.closest('.toggle_sub_menu') && !event.target.classList.contains('toggle_sub_menu')) {
|
|
2398
|
-
this.navigationService.setCategory(category);
|
|
2399
|
-
this.mobileMenuToggle = false;
|
|
2400
|
-
}
|
|
2401
|
-
}
|
|
2402
|
-
onSetTurnoverGroup(event, turnoverGroup) {
|
|
2403
|
-
if (!event.target.closest('.toggle_sub_menu') && !event.target.classList.contains('toggle_sub_menu')) {
|
|
2404
|
-
this.navigationService.setTurnoverGroup(turnoverGroup);
|
|
2405
|
-
this.mobileMenuToggle = false;
|
|
2406
|
-
}
|
|
2407
|
-
}
|
|
2408
|
-
onOpenExternalCatalog(event, webviewUrl) {
|
|
2409
|
-
this.navigationService.setExternalSourceUrl(webviewUrl);
|
|
2410
|
-
}
|
|
2411
|
-
onOpenIoneCatalog(event, webviewUrl, ioneUrl, upId, userName, passWord) {
|
|
2412
|
-
this.navigationService.setIoneSourceUrl(webviewUrl, ioneUrl, upId, userName, passWord);
|
|
2413
|
-
}
|
|
2414
|
-
onOpenHomePage(event) {
|
|
2415
|
-
this.navigationService.navigateToHome();
|
|
2416
|
-
}
|
|
2417
|
-
}
|
|
2418
|
-
NavigationComponent.decorators = [
|
|
2419
|
-
{ type: Component, args: [{
|
|
2420
|
-
selector: 'app-ione-catalog-navigation',
|
|
2421
|
-
template: "<div class=\"component-wrapper\">\r\n <div class=\"header-wrapper\">\r\n <div class=\"header\">\r\n <div class=\"navigation-container\" [class.minified]=\"minified\">\r\n <div class=\"home\">\r\n <a class=\"navigation-link\" (click)=\"onOpenHomePage($event)\" [textContent]=\"'Home' | localize\"></a>\r\n </div>\r\n <div class=\"navigation\">\r\n <button type=\"button\" class=\"menu-toggle\" [class.active]=\"mobileMenuToggle\" (click)=\"onToggleMobileMenu()\">\r\n <co-icon class=\"hamburger-icon\" [iconData]=\"iconCache.getIcon(icons.Hamburger)\"></co-icon>\r\n <span [textContent]=\"'Collectie' | localize\"></span>\r\n </button>\r\n <div class=\"navigation-dropdown\" [class.active]=\"mobileMenuToggle\">\r\n <ul class=\"navigation-menu narrow-scrollbar\" *ngIf=\"navigationService.navigationCategories.length > 0\">\r\n\r\n <button type=\"button\" class=\"menu-close\" (click)=\"onToggleMobileMenu()\">\r\n <co-icon [iconData]=\"iconCache.getIcon(icons.Close)\"></co-icon>\r\n </button>\r\n\r\n\r\n\r\n <li *ngFor=\"let category of navigationService.navigationCategories\" [class.has-children]=\"category.turnoverGroups && category.turnoverGroups.length > 0\" (mouseenter)=\"onOpenSubMenu($event)\">\r\n <a (click)=\"onSetCategory($event, category.category)\">\r\n <span [textContent]=\"category.description | localize\"></span>\r\n </a>\r\n <button type=\"button\" class=\"toggle-sub-menu\" (click)=\"onSubMenuToggle($event)\" *ngIf=\"category.turnoverGroups && category.turnoverGroups.length > 0\">\r\n <co-icon [iconData]=\"iconCache.getIcon(icons.ArrowScrollDown)\"></co-icon>\r\n </button>\r\n <ul *ngIf=\"category.turnoverGroups && category.turnoverGroups.length > 0\">\r\n <li *ngFor=\"let turnoverGroup of category.turnoverGroups\">\r\n <a (click)=\"onSetTurnoverGroup($event, turnoverGroup.turnovergroupNr)\">\r\n <span [textContent]=\"turnoverGroup.description | localize\"></span>\r\n </a>\r\n </li>\r\n </ul>\r\n </li>\r\n </ul>\r\n </div>\r\n </div>\r\n <div class=\"navigation external-source\">\r\n <button class=\"menu-toggle\">\r\n <co-icon class=\"hamburger-icon\" [iconData]=\"iconCache.getIcon(icons.Ar)\"></co-icon>\r\n <span [textContent]=\"'Externe Catalogus' | localize\"></span>\r\n </button>\r\n <div class=\"navigation-dropdown\">\r\n <ul class=\"navigation-menu narrow-scrollbar external\">\r\n <li class=\"internal-header\" *ngIf=\"internalList && internalList.length > 0\">\r\n <a href=\"#\">\r\n <span>Externe Catalogus</span>\r\n </a>\r\n <ul>\r\n <li *ngFor=\"let definition of internalList\">\r\n <a *ngIf=\"definition.catalogDefinition.useCatalogPage\"\r\n (click)=\"onOpenIoneCatalog(\r\n $event,\r\n definition.catalogDefinition.webviewUrl,\r\n definition.externalSource.url,\r\n definition.externalSource.schema,\r\n definition.externalSource.username,\r\n definition.externalSource.password\r\n )\">\r\n <!--co-image *ngIf=\"definition.catalogDefinition.imageData\" [source]=\"definition.catalogDefinition.imageData\"></co-image>\r\n <div class=\"no-image-wrapper\" *ngIf=\"!definition.catalogDefinition.imageData\">\r\n <co-icon class=\"no-image\" [iconData]=\"iconCache.getIcon(icons.Camera)\"></co-icon>\r\n <span [textContent]=\"'NO_IMAGE' | localize\"></span>\r\n </div-->\r\n <span [textContent]=\"definition.catalogDefinition.name\"></span>\r\n </a>\r\n </li>\r\n </ul>\r\n </li>\r\n <li class=\"external-header\" *ngIf=\"externalList && externalList.length > 0\">\r\n <a href=\"#\">\r\n <span>Externe Web URL</span>\r\n </a>\r\n <ul>\r\n <li *ngFor=\"let definition of externalList\">\r\n <a (click)=\"onOpenExternalCatalog($event, definition.externalSource.url)\">\r\n <!--co-image *ngIf=\"definition.catalogDefinition.imageData\" [source]=\"definition.catalogDefinition.imageData\"></co-image>\r\n <div class=\"no-image-wrapper\" *ngIf=\"!definition.catalogDefinition.imageData\">\r\n <co-icon class=\"no-image\" [iconData]=\"iconCache.getIcon(icons.Camera)\"></co-icon>\r\n <span [textContent]=\"'NO_IMAGE' | localize\"></span>\r\n </div-->\r\n <span [textContent]=\"definition.catalogDefinition.name\"></span>\r\n </a>\r\n </li>\r\n </ul>\r\n </li>\r\n </ul>\r\n </div>\r\n </div>\r\n </div>\r\n <div id=\"top_content\">\r\n <div class=\"search-wrapper\">\r\n <app-top-content></app-top-content>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n",
|
|
2422
|
-
styles: ["*:focus{outline:none}ul{list-style:none}a{text-decoration:none;cursor:pointer}.component-wrapper .header-wrapper{margin:0 auto;position:relative;padding:0 15px;width:100%}.component-wrapper .header-wrapper .header{display:flex;flex-direction:row;justify-content:space-between;align-items:center;border-bottom:1px solid #ececec;padding:0 0 15px}.component-wrapper .header-wrapper .header .logo img{max-height:70px;max-width:70px}.navigation-container{background:#c8d8e6;text-align:center;font-family:iOneMontserrat;font-size:15px;min-height:50px;width:100%}.navigation-container.minified{min-height:30px;font-size:11px}.menu-toggle{cursor:pointer;border-radius:5px;height:40px;padding:5px 20px 5px 5px;float:left;margin:0;border:none;font-family:iOneMontserrat;box-sizing:border-box;display:flex;background:#FFF}.menu-toggle span{line-height:31px;display:inline-block;vertical-align:top;font-size:15px}.menu-toggle .hamburger-icon{fill:#222!important;margin:0 5px 0 0}.menu-close{position:absolute;right:0;top:0;height:50px;width:50px;background:transparent;color:#22313c;border:none;cursor:pointer;display:none}.navigation-container.minified .menu-toggle{height:30px;padding:0 20px 0 5px;font-size:11px;margin:0;border-radius:0}.toggle-sub-menu{display:none;float:left;width:50px;height:40px;text-align:center;border:none;background:transparent;color:#5a6875;position:absolute;right:0;top:5px;padding:0;cursor:pointer}.toggle-sub-menu co-icon{transition:.3s ease-in-out;width:20px;height:20px;margin:5px 0 0}li.open>.toggle-sub-menu co-icon{transform:rotate(180deg)}@media screen and (min-width: 941px){.navigation:hover .navigation-dropdown{height:auto;width:calc(100% - 60px);visibility:visible;opacity:1}.navigation:hover .menu-toggle{background:#3E7EFF;color:#fff}.navigation:hover .menu-toggle co-icon ::ng-deep{fill:#fff!important}.navigation:hover .menu-toggle co-icon ::ng-deep svg{fill:#fff!important}.navigation:hover .menu-toggle co-icon ::ng-deep svg g{fill:#fff!important}.navigation:hover .menu-toggle co-icon ::ng-deep svg g path{fill:#fff!important}.navigation:hover .menu-toggle co-icon ::ng-deep svg rect:not(:first-child){fill:#fff!important}.navigation-container{background:#FFF;display:flex;align-items:center;grid-gap:20px;gap:20px;padding-left:10px}.navigation-container .navigation-link{font-size:16px;font-weight:600}.menu-toggle{margin-left:0;border-radius:0}.menu-toggle span{font-size:16px;font-weight:600}.navigation-dropdown{position:absolute;width:calc(100% - 60px);top:calc(100% - 33px);left:30px;background:#fff;box-shadow:0 5px 5px 2px #0000004d;overflow:hidden;visibility:hidden;z-index:9;opacity:0;transform:translateY(10px);transition:opacity .2s ease-in,transform .2s ease-in,visibility .2s ease-in}.navigation-menu{display:inline-block;text-align:left;margin:0;padding:0;background:#FFF;width:100%}.navigation-menu>li{display:block;padding:13px 30px;float:left;width:20%}.navigation-menu>li.external-menu{width:12.5%;height:180px;position:relative;margin:10px 0}.navigation-menu>li.external-menu a{align-items:center;height:150px;font-size:12px;color:#222}.navigation-menu>li.external-menu a span{margin-top:0;display:block;position:absolute;bottom:5px;width:100%;text-align:center}.navigation-menu>li.external-menu a co-image{height:100px;width:100%}.navigation-menu>li.external-menu .no-image-wrapper{height:100px;width:100%;text-align:center;position:relative;background:#ececec}.navigation-menu>li.external-menu .no-image-wrapper co-icon ::ng-deep{height:100px;width:100%;position:absolute;left:0;top:0}.navigation-menu>li.external-menu .no-image-wrapper co-icon ::ng-deep svg{max-height:50px;position:absolute;top:50%;left:0;transform:translateY(-50%)}.navigation-menu>li.external-menu .no-image-wrapper co-icon ::ng-deep svg rect,.navigation-menu>li.external-menu .no-image-wrapper co-icon ::ng-deep svg path{fill:#fff}.navigation-menu>li.external-menu .no-image-wrapper span{color:#fff}.navigation-menu>li>a{display:inline-block;line-height:20px;border-bottom:1px solid #ececec;position:relative;z-index:12;width:100%;font-size:15px;padding-bottom:10px;font-weight:600;color:#222}.navigation-menu>li>a span{font-size:15px;font-weight:600;color:#222}.navigation-menu>li:hover>a{color:#3e7eff;border-bottom:1px solid #3E7EFF;z-index:12;text-decoration:none}.navigation-menu>li:hover>a span{color:#3e7eff}.navigation-menu>li>ul{padding-left:0;padding-top:15px}.navigation-menu>li>ul>li{padding:3px;margin:0}.navigation-menu>li>ul>li>a{line-height:24px;color:#22313c;font-size:13px;font-weight:normal}.navigation-menu>li>ul>li>a span{color:#22313c;font-size:13px;font-weight:normal}.navigation-menu>li>ul>li>a:hover{color:#3e7eff;text-decoration:underline}.navigation-menu>li>ul>li>a:hover span{color:#3e7eff}.navigation-menu>li>ul ul{display:none}.navigation-container.minified .navigation-menu{font-size:13px}.navigation-container.minified .navigation-menu>li{padding:7px 10px}.navigation-container.minified .navigation-menu>li>a{line-height:16px}.navigation-container.minified .navigation-menu>li>ul{padding:25px 30px}.navigation-container.minified .navigation-menu>li>ul>li>a{font-size:13px;line-height:24px}}@media screen and (max-width: 940px){.menu-close,.menu-toggle{display:flex}.navigation-menu{position:absolute;left:0;top:0;background:#fff;margin:0 0 0 -500px;overflow:auto;width:350px;height:100vh;max-width:100%;text-align:left;padding:50px 15px 30px;box-shadow:1px 0 8px #484f6040;transition:.3s ease-in-out;font-size:14px;box-sizing:border-box}.navigation-dropdown.active .navigation-menu{margin:0}.navigation-menu>li{display:block;width:100%;margin:0 0 15px;position:relative}.navigation-menu li.open>ul{display:block;height:auto!important}.navigation-menu>li>a{display:block;padding:15px 20px;border:1px solid #DCE4EA;border-radius:5px;color:#22313c;position:relative}.navigation-menu li.open>a,.navigation-menu>li>a:hover{background:#c8d8e6}.navigation-menu>li ul{display:none;padding:0 0 0 15px;font-size:93%;margin:-1px 0 0}.navigation-menu>li ul li{display:block;width:100%;margin:5px 0}.navigation-menu>li ul li a{display:block;padding:10px;color:#22313c;border:1px solid #DCE4EA;border-radius:5px;position:relative}.navigation-menu>li ul li a:hover{background:#DCE4EA}.toggle-sub-menu{display:block}.navigation-container.minified .navigation-menu{height:calc(100% - 30px);top:30px}}@media screen and (max-width: 480px){.navigation-menu{width:100%}}\n"]
|
|
2423
|
-
},] }
|
|
2424
|
-
];
|
|
2425
|
-
NavigationComponent.ctorParameters = () => [
|
|
2426
|
-
{ type: IconCacheService },
|
|
2427
|
-
{ type: NavigationService },
|
|
2428
|
-
{ type: CatalogService },
|
|
2429
|
-
{ type: AppEventService }
|
|
2430
|
-
];
|
|
2431
|
-
NavigationComponent.propDecorators = {
|
|
2432
|
-
minified: [{ type: Input }]
|
|
2433
|
-
};
|
|
2434
|
-
|
|
2435
3125
|
class VisibilityObserverMasterDirective {
|
|
2436
3126
|
// I initialize the intersection observer parent directive.
|
|
2437
3127
|
constructor() {
|
|
@@ -2533,104 +3223,296 @@ VisibilityObserverDirective.propDecorators = {
|
|
|
2533
3223
|
observerEnabled: [{ type: Input }]
|
|
2534
3224
|
};
|
|
2535
3225
|
|
|
2536
|
-
class
|
|
2537
|
-
|
|
2538
|
-
|
|
2539
|
-
|
|
2540
|
-
|
|
2541
|
-
|
|
2542
|
-
|
|
2543
|
-
|
|
3226
|
+
class VisibilityObserverModule {
|
|
3227
|
+
}
|
|
3228
|
+
VisibilityObserverModule.decorators = [
|
|
3229
|
+
{ type: NgModule, args: [{
|
|
3230
|
+
declarations: [
|
|
3231
|
+
VisibilityObserverMasterDirective,
|
|
3232
|
+
VisibilityObserverDirective
|
|
3233
|
+
],
|
|
3234
|
+
exports: [
|
|
3235
|
+
VisibilityObserverMasterDirective,
|
|
3236
|
+
VisibilityObserverDirective
|
|
3237
|
+
]
|
|
3238
|
+
},] }
|
|
3239
|
+
];
|
|
3240
|
+
|
|
3241
|
+
class CatalogSearchResultTileModule {
|
|
3242
|
+
}
|
|
3243
|
+
CatalogSearchResultTileModule.decorators = [
|
|
3244
|
+
{ type: NgModule, args: [{
|
|
3245
|
+
imports: [
|
|
3246
|
+
CommonModule,
|
|
3247
|
+
CatalogArticleTileModule,
|
|
3248
|
+
VisibilityObserverModule,
|
|
3249
|
+
PaginationBarModule,
|
|
3250
|
+
CatalogFilterModule
|
|
3251
|
+
],
|
|
3252
|
+
declarations: [
|
|
3253
|
+
CatalogSearchResultTileComponent
|
|
3254
|
+
],
|
|
3255
|
+
exports: [
|
|
3256
|
+
CatalogSearchResultTileComponent
|
|
3257
|
+
]
|
|
3258
|
+
},] }
|
|
3259
|
+
];
|
|
3260
|
+
|
|
3261
|
+
class CatalogSearchResultListComponent extends CatalogSearchBaseComponent {
|
|
3262
|
+
showClass() {
|
|
3263
|
+
return true;
|
|
2544
3264
|
}
|
|
2545
3265
|
}
|
|
2546
|
-
|
|
2547
|
-
|
|
2548
|
-
|
|
2549
|
-
|
|
3266
|
+
CatalogSearchResultListComponent.decorators = [
|
|
3267
|
+
{ type: Component, args: [{
|
|
3268
|
+
selector: 'co-catalog-search-result-list',
|
|
3269
|
+
template: `
|
|
3270
|
+
<div class="article-cards" visibilityObserverMaster>
|
|
3271
|
+
<ng-container *ngFor="let article of catalogSearchService.articles">
|
|
3272
|
+
<co-catalog-article-list
|
|
3273
|
+
visibilityObserver
|
|
3274
|
+
#intersection="intersection"
|
|
3275
|
+
[observerEnabled]="!article.imageData"
|
|
3276
|
+
[showing]="intersection.isIntersecting"
|
|
3277
|
+
[article]="article"
|
|
3278
|
+
>
|
|
3279
|
+
</co-catalog-article-list>
|
|
3280
|
+
</ng-container>
|
|
3281
|
+
</div>
|
|
3282
|
+
<co-pagination-bar *ngIf="catalogSearchService.articles?.length > 0"
|
|
3283
|
+
[currentPage]="catalogSearchService.currentPage"
|
|
3284
|
+
[itemsPerPage]="catalogSearchService.articlesPerPage"
|
|
3285
|
+
[totalItems]="catalogSearchService.resultCount"
|
|
3286
|
+
[previousLabel]="'PREVIOUS' | localize"
|
|
3287
|
+
[nextLabel]="'NEXT' | localize"
|
|
3288
|
+
[autoHide]="true"
|
|
3289
|
+
[directionLinks]="true"
|
|
3290
|
+
[paginationRange]="8"
|
|
3291
|
+
(previousClick)="onPreviousClick()"
|
|
3292
|
+
(nextClick)="onNextClick()"
|
|
3293
|
+
(pageClick)="onPageClick($event)">
|
|
3294
|
+
</co-pagination-bar>
|
|
3295
|
+
`,
|
|
3296
|
+
encapsulation: ViewEncapsulation.None
|
|
2550
3297
|
},] }
|
|
2551
3298
|
];
|
|
2552
|
-
|
|
2553
|
-
{ type:
|
|
2554
|
-
|
|
3299
|
+
CatalogSearchResultListComponent.propDecorators = {
|
|
3300
|
+
showClass: [{ type: HostBinding, args: ['class.co-catalog-search-result-list',] }]
|
|
3301
|
+
};
|
|
2555
3302
|
|
|
2556
|
-
|
|
2557
|
-
|
|
2558
|
-
|
|
3303
|
+
class CatalogArticleListComponent extends ArticleBaseComponent {
|
|
3304
|
+
showClass() {
|
|
3305
|
+
return true;
|
|
3306
|
+
}
|
|
2559
3307
|
}
|
|
2560
|
-
|
|
3308
|
+
CatalogArticleListComponent.decorators = [
|
|
3309
|
+
{ type: Component, args: [{
|
|
3310
|
+
selector: 'co-catalog-article-list',
|
|
3311
|
+
template: `
|
|
3312
|
+
<div class="card-wrapper">
|
|
3313
|
+
<div class="left">
|
|
3314
|
+
<div class="image">
|
|
3315
|
+
<co-image *ngIf="article && article.imageData" [source]="article.imageData"></co-image>
|
|
3316
|
+
<div class="no-image-wrapper" *ngIf="!article || !article.imageData">
|
|
3317
|
+
<co-icon class="no-image" [iconData]="iconCache.getIcon(icons.Camera)"></co-icon>
|
|
3318
|
+
<span [textContent]="'NO_IMAGE' | localize"></span>
|
|
3319
|
+
</div>
|
|
3320
|
+
</div>
|
|
3321
|
+
<div class="button-wrapper">
|
|
3322
|
+
<co-icon *ngIf="threeD" [iconData]="iconCache.getIcon(icons.ThreeD)" class="pointer"></co-icon>
|
|
3323
|
+
<co-icon *ngIf="threeD && options.showARButton" class="pointer"
|
|
3324
|
+
[iconData]="iconCache.getIcon(icons.Ar)"
|
|
3325
|
+
(click)="handleArButtonClick($event)"
|
|
3326
|
+
></co-icon>
|
|
3327
|
+
</div>
|
|
3328
|
+
</div>
|
|
3329
|
+
<div class="description-wrapper">
|
|
3330
|
+
<div class="main">
|
|
3331
|
+
<div class="main-top">
|
|
3332
|
+
<div *ngIf="!!turnover" class="turnover" [innerText]="removeHtmlTags(turnover)"></div>
|
|
3333
|
+
<div *ngIf="!!name" class="description" [innerText]="removeHtmlTags(name)"></div>
|
|
3334
|
+
</div>
|
|
3335
|
+
<div class="main-bottom">
|
|
3336
|
+
<div class="main-bottom-left">
|
|
3337
|
+
<div *ngIf="!!article?.articleNumber" class="sku">
|
|
3338
|
+
<span [innerText]="'sku' | localize"></span>:
|
|
3339
|
+
<span [innerText]="article.articleNumber"></span>
|
|
3340
|
+
</div>
|
|
3341
|
+
<div class="description">
|
|
3342
|
+
<span class="label" [innerText]="'description' | localize"></span>
|
|
3343
|
+
<span class="text" *ngIf="!!article?.description"
|
|
3344
|
+
[innerText]="removeHtmlTags(article.description)"></span>
|
|
3345
|
+
<span class="text" *ngIf="!!added_description" [innerText]="removeHtmlTags(added_description)"></span>
|
|
3346
|
+
</div>
|
|
3347
|
+
</div>
|
|
3348
|
+
</div>
|
|
3349
|
+
</div>
|
|
3350
|
+
</div>
|
|
3351
|
+
<div class="right">
|
|
3352
|
+
<div *ngIf="!!article?.price" class="price" [innerText]="article?.price | priceDisplay:valutaSymbol"></div>
|
|
3353
|
+
<div *ngIf="options.showAddArticleButton" class="on-article-buttons">
|
|
3354
|
+
<co-button *ngIf="!configurable"
|
|
3355
|
+
[label]="options.addArticleButtonText"
|
|
3356
|
+
class="open-icon action pointer"
|
|
3357
|
+
(onClick)="handleAddArticleButtonClick($event)"
|
|
3358
|
+
[iconData]="iconCache.getIcon(icons.AddToCartDrop)">
|
|
3359
|
+
</co-button>
|
|
3360
|
+
<co-button *ngIf="configurable"
|
|
3361
|
+
[label]="options.lookAtArticleButtonText"
|
|
3362
|
+
class="open-icon action pointer"
|
|
3363
|
+
(onClick)="handleLookAtArticleButtonClick($event)"
|
|
3364
|
+
[iconData]="iconCache.getIcon(icons.MagicWand)">
|
|
3365
|
+
</co-button>
|
|
3366
|
+
<!--co-button
|
|
3367
|
+
[label]="options.stockButtonText"
|
|
3368
|
+
class="open-icon action pointer stock"
|
|
3369
|
+
(onClick)="handleStockDetailsButtonClick($event)"
|
|
3370
|
+
[iconData]="iconCache.getIcon(icons.Truck)">
|
|
3371
|
+
</co-button-->
|
|
3372
|
+
</div>
|
|
3373
|
+
<div *ngIf="stock_available" (click)="handleStockDetailsButtonClick($event)" class="stock"
|
|
3374
|
+
[innerText]="stock_available"></div>
|
|
3375
|
+
<div *ngIf="!stock_available" (click)="handleStockDetailsButtonClick($event)" class="stock not-in-stock"
|
|
3376
|
+
[innerText]="'Niet op voorraad'"></div>
|
|
3377
|
+
</div>
|
|
3378
|
+
</div>
|
|
3379
|
+
`,
|
|
3380
|
+
encapsulation: ViewEncapsulation.None
|
|
3381
|
+
},] }
|
|
3382
|
+
];
|
|
3383
|
+
CatalogArticleListComponent.propDecorators = {
|
|
3384
|
+
showClass: [{ type: HostBinding, args: ['class.co-catalog-article-list',] }]
|
|
3385
|
+
};
|
|
3386
|
+
|
|
3387
|
+
class CatalogArticleListModule {
|
|
2561
3388
|
}
|
|
2562
|
-
|
|
3389
|
+
CatalogArticleListModule.decorators = [
|
|
2563
3390
|
{ type: NgModule, args: [{
|
|
2564
3391
|
imports: [
|
|
2565
|
-
// BrowserAnimationsModule,
|
|
2566
3392
|
CommonModule,
|
|
2567
|
-
|
|
2568
|
-
PaginationModule,
|
|
2569
|
-
CardModule,
|
|
2570
|
-
ButtonModule,
|
|
2571
|
-
LevelIndicatorModule,
|
|
2572
|
-
ImageModule,
|
|
3393
|
+
ImageModule$1,
|
|
2573
3394
|
IconModule,
|
|
3395
|
+
CatalogFilterModule,
|
|
2574
3396
|
PriceDisplayPipeModule,
|
|
2575
|
-
|
|
2576
|
-
SliderModule,
|
|
2577
|
-
InputTextChipsModule,
|
|
2578
|
-
InputCheckboxModule,
|
|
2579
|
-
FormsModule,
|
|
2580
|
-
FilterItemModule,
|
|
2581
|
-
InputDatePickerModule,
|
|
2582
|
-
InputTextModule,
|
|
2583
|
-
InputTextModule,
|
|
2584
|
-
SimpleGridModule,
|
|
2585
|
-
PaginationBarModule
|
|
3397
|
+
ButtonModule
|
|
2586
3398
|
],
|
|
2587
3399
|
declarations: [
|
|
2588
|
-
|
|
2589
|
-
TopContentComponent,
|
|
2590
|
-
LeftContentComponent,
|
|
2591
|
-
MainContentComponent,
|
|
2592
|
-
LayoutDirective,
|
|
2593
|
-
CatalogFilterComponent,
|
|
2594
|
-
CatalogPageComponent,
|
|
2595
|
-
CatalogExternalComponent,
|
|
2596
|
-
CatalogHomeComponent,
|
|
2597
|
-
ArticleCardComponent,
|
|
2598
|
-
LabelFieldComponent,
|
|
2599
|
-
IconHandleComponent,
|
|
2600
|
-
CatalogComponent,
|
|
2601
|
-
LocalizePipe,
|
|
2602
|
-
GreaterThanZeroPipe,
|
|
2603
|
-
FilterItemsComponent,
|
|
2604
|
-
NavigationComponent,
|
|
2605
|
-
VisibilityObserverDirective,
|
|
2606
|
-
VisibilityObserverMasterDirective
|
|
3400
|
+
CatalogArticleListComponent
|
|
2607
3401
|
],
|
|
2608
|
-
|
|
2609
|
-
|
|
2610
|
-
|
|
2611
|
-
|
|
2612
|
-
|
|
2613
|
-
|
|
2614
|
-
|
|
2615
|
-
|
|
2616
|
-
|
|
2617
|
-
|
|
2618
|
-
|
|
2619
|
-
|
|
2620
|
-
|
|
2621
|
-
|
|
2622
|
-
|
|
2623
|
-
|
|
2624
|
-
|
|
2625
|
-
|
|
3402
|
+
exports: [
|
|
3403
|
+
CatalogArticleListComponent
|
|
3404
|
+
]
|
|
3405
|
+
},] }
|
|
3406
|
+
];
|
|
3407
|
+
|
|
3408
|
+
class CatalogSearchResultListModule {
|
|
3409
|
+
}
|
|
3410
|
+
CatalogSearchResultListModule.decorators = [
|
|
3411
|
+
{ type: NgModule, args: [{
|
|
3412
|
+
imports: [
|
|
3413
|
+
CommonModule,
|
|
3414
|
+
VisibilityObserverModule,
|
|
3415
|
+
CatalogArticleListModule,
|
|
3416
|
+
PaginationBarModule,
|
|
3417
|
+
CatalogFilterModule
|
|
3418
|
+
],
|
|
3419
|
+
declarations: [
|
|
3420
|
+
CatalogSearchResultListComponent
|
|
3421
|
+
],
|
|
3422
|
+
exports: [
|
|
3423
|
+
CatalogSearchResultListComponent
|
|
3424
|
+
]
|
|
3425
|
+
},] }
|
|
3426
|
+
];
|
|
3427
|
+
|
|
3428
|
+
class CatalogSearchModule {
|
|
3429
|
+
}
|
|
3430
|
+
CatalogSearchModule.decorators = [
|
|
3431
|
+
{ type: NgModule, args: [{
|
|
3432
|
+
imports: [
|
|
3433
|
+
CommonModule,
|
|
3434
|
+
CatalogFilterModule,
|
|
3435
|
+
CatalogSearchHeaderModule,
|
|
3436
|
+
CatalogSearchResultTileModule,
|
|
3437
|
+
CatalogSearchResultListModule,
|
|
3438
|
+
CatalogCategoriesModule,
|
|
3439
|
+
CatalogExternalSourcesModule,
|
|
3440
|
+
CatalogNavigationModule
|
|
3441
|
+
],
|
|
3442
|
+
declarations: [
|
|
3443
|
+
CatalogSearchComponent
|
|
2626
3444
|
],
|
|
2627
3445
|
exports: [
|
|
2628
|
-
|
|
2629
|
-
|
|
3446
|
+
CatalogSearchComponent
|
|
3447
|
+
]
|
|
3448
|
+
},] }
|
|
3449
|
+
];
|
|
3450
|
+
|
|
3451
|
+
class CatalogExternalSourceComponent {
|
|
3452
|
+
constructor(catalogService, _appEventService, _sanitizer, _ref, _renderer) {
|
|
3453
|
+
this.catalogService = catalogService;
|
|
3454
|
+
this._appEventService = _appEventService;
|
|
3455
|
+
this._sanitizer = _sanitizer;
|
|
3456
|
+
this._ref = _ref;
|
|
3457
|
+
this._renderer = _renderer;
|
|
3458
|
+
this._subs = [];
|
|
3459
|
+
this._renderer.addClass(document.body, 'external');
|
|
3460
|
+
this._subs.push(this.catalogService.externalSourceChanged.subscribe(changed => {
|
|
3461
|
+
if (changed) {
|
|
3462
|
+
if (this.externalSourceFrame && this.externalSourceFrame.nativeElement) {
|
|
3463
|
+
this.externalSourceFrame.nativeElement.src = '';
|
|
3464
|
+
this.externalSourceFrame.nativeElement.src = this.catalogService.externalSourceUrl;
|
|
3465
|
+
}
|
|
3466
|
+
}
|
|
3467
|
+
}));
|
|
3468
|
+
}
|
|
3469
|
+
showClass() {
|
|
3470
|
+
return true;
|
|
3471
|
+
}
|
|
3472
|
+
ngAfterViewInit() {
|
|
3473
|
+
this._ref.detach();
|
|
3474
|
+
}
|
|
3475
|
+
ngOnDestroy() {
|
|
3476
|
+
this._renderer.removeClass(document.body, 'external');
|
|
3477
|
+
this._subs.forEach(s => s.unsubscribe());
|
|
3478
|
+
}
|
|
3479
|
+
getSafeUrl() {
|
|
3480
|
+
return this._sanitizer.bypassSecurityTrustResourceUrl(this.catalogService.externalSourceUrl);
|
|
3481
|
+
}
|
|
3482
|
+
}
|
|
3483
|
+
CatalogExternalSourceComponent.decorators = [
|
|
3484
|
+
{ type: Component, args: [{
|
|
3485
|
+
selector: 'co-catalog-external-source',
|
|
3486
|
+
template: `
|
|
3487
|
+
<iframe #externalSourceFrame class="external-iframe" [src]="getSafeUrl()"></iframe>
|
|
3488
|
+
`,
|
|
3489
|
+
encapsulation: ViewEncapsulation.None
|
|
3490
|
+
},] }
|
|
3491
|
+
];
|
|
3492
|
+
CatalogExternalSourceComponent.ctorParameters = () => [
|
|
3493
|
+
{ type: CatalogService },
|
|
3494
|
+
{ type: CatalogEventService },
|
|
3495
|
+
{ type: DomSanitizer },
|
|
3496
|
+
{ type: ChangeDetectorRef },
|
|
3497
|
+
{ type: Renderer2 }
|
|
3498
|
+
];
|
|
3499
|
+
CatalogExternalSourceComponent.propDecorators = {
|
|
3500
|
+
externalSourceFrame: [{ type: ViewChild, args: ['externalSourceFrame', { read: ElementRef },] }],
|
|
3501
|
+
showClass: [{ type: HostBinding, args: ['class.co-catalog-external-source',] }]
|
|
3502
|
+
};
|
|
3503
|
+
|
|
3504
|
+
class CatalogExternalSourceModule {
|
|
3505
|
+
}
|
|
3506
|
+
CatalogExternalSourceModule.decorators = [
|
|
3507
|
+
{ type: NgModule, args: [{
|
|
3508
|
+
imports: [
|
|
3509
|
+
CommonModule
|
|
3510
|
+
],
|
|
3511
|
+
declarations: [
|
|
3512
|
+
CatalogExternalSourceComponent
|
|
2630
3513
|
],
|
|
2631
|
-
|
|
2632
|
-
|
|
2633
|
-
NavigationComponent
|
|
3514
|
+
exports: [
|
|
3515
|
+
CatalogExternalSourceComponent
|
|
2634
3516
|
]
|
|
2635
3517
|
},] }
|
|
2636
3518
|
];
|
|
@@ -2639,5 +3521,5 @@ IoneCatalogModule.decorators = [
|
|
|
2639
3521
|
* Generated bundle index. Do not edit.
|
|
2640
3522
|
*/
|
|
2641
3523
|
|
|
2642
|
-
export {
|
|
3524
|
+
export { CatalogArticleListModule, CatalogArticleTileModule, CatalogCategoriesModule, CatalogExternalSourceModule, CatalogExternalSourcesModule, CatalogFilterModule, CatalogNavigationModule, CatalogSearchHeaderModule, CatalogSearchModule, CatalogSearchResultListModule, CatalogSearchResultTileModule, CatalogSearchService, CatalogService, Version, CatalogFilterComponent as ɵa, CatalogFilterService as ɵb, VisibilityObserverMasterDirective as ɵba, VisibilityObserverDirective as ɵbb, CatalogSearchResultTileComponent as ɵbc, CatalogSearchBaseComponent as ɵbd, CatalogArticleListComponent as ɵbe, CatalogSearchResultListComponent as ɵbf, CatalogSearchComponent as ɵbg, CatalogExternalSourceComponent as ɵbh, 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, CatalogEventService as ɵv, CatalogSearchHeaderComponent as ɵw, CatalogArticleTileComponent as ɵx, ArticleBaseComponent as ɵy, VisibilityObserverModule as ɵz };
|
|
2643
3525
|
//# sourceMappingURL=colijnit-catalog.js.map
|