@colijnit/catalog 12.1.0 → 12.1.3

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.
Files changed (47) hide show
  1. package/app/components/catalog/article-card/article-card.component.d.ts +4 -1
  2. package/app/components/catalog/catalog-external/catalog-external.component.d.ts +7 -3
  3. package/app/components/catalog/catalog-filter/catalog-filter.component.d.ts +10 -13
  4. package/app/directive/visibility-observer-master.directive.d.ts +9 -0
  5. package/app/directive/visibility-observer.directive.d.ts +13 -0
  6. package/app/ione-catalog.component.d.ts +10 -10
  7. package/app/model/filter-item.viewmodel.d.ts +9 -0
  8. package/app/model/filter-viewmodel.d.ts +8 -0
  9. package/app/model/settings-options.d.ts +1 -0
  10. package/app/service/catalog.service.d.ts +5 -1
  11. package/app/service/filter.service.d.ts +12 -0
  12. package/app/service/i-one-controller.service.d.ts +15 -2
  13. package/app/service/image.service.d.ts +3 -0
  14. package/bundles/colijnit-catalog.umd.js +591 -135
  15. package/bundles/colijnit-catalog.umd.js.map +1 -1
  16. package/colijnit-catalog.d.ts +23 -20
  17. package/colijnit-catalog.metadata.json +1 -1
  18. package/esm2015/app/components/catalog/article-card/article-card.component.js +17 -15
  19. package/esm2015/app/components/catalog/catalog/catalog.component.js +1 -1
  20. package/esm2015/app/components/catalog/catalog-external/catalog-external.component.js +15 -4
  21. package/esm2015/app/components/catalog/catalog-filter/catalog-filter.component.js +41 -47
  22. package/esm2015/app/components/catalog/catalog-home/catalog-home.component.js +1 -1
  23. package/esm2015/app/components/catalog/catalog-page/catalog-page.component.js +3 -3
  24. package/esm2015/app/components/catalog/filter-items/filter-items.component.js +1 -1
  25. package/esm2015/app/components/core/icon-handle/icon-handle.component.js +1 -1
  26. package/esm2015/app/components/navigation/navigation.component.js +1 -1
  27. package/esm2015/app/components/top-content/top-content.component.js +1 -1
  28. package/esm2015/app/directive/visibility-observer-master.directive.js +49 -0
  29. package/esm2015/app/directive/visibility-observer.directive.js +55 -0
  30. package/esm2015/app/ione-catalog.component.js +10 -10
  31. package/esm2015/app/ione-catalog.module.js +21 -5
  32. package/esm2015/app/model/filter-item.viewmodel.js +10 -0
  33. package/esm2015/app/model/filter-viewmodel.js +12 -0
  34. package/esm2015/app/model/settings-options.js +2 -1
  35. package/esm2015/app/service/catalog.service.js +13 -5
  36. package/esm2015/app/service/dictionary.service.js +2 -7
  37. package/esm2015/app/service/filter.service.js +63 -0
  38. package/esm2015/app/service/i-one-controller.service.js +137 -6
  39. package/esm2015/app/service/image.service.js +28 -7
  40. package/esm2015/app/service/navigation.service.js +2 -10
  41. package/esm2015/app/service/options.service.js +2 -8
  42. package/esm2015/colijnit-catalog.js +24 -21
  43. package/fesm2015/colijnit-catalog.js +449 -110
  44. package/fesm2015/colijnit-catalog.js.map +1 -1
  45. package/package.json +22 -3
  46. package/app/enum/catalog-product-filter.enum.d.ts +0 -7
  47. package/esm2015/app/enum/catalog-product-filter.enum.js +0 -9
@@ -7,6 +7,7 @@ import { CatalogService } from '../../../service/catalog.service';
7
7
  import { OptionsService } from '../../../service/options.service';
8
8
  import { AppEventService } from '../../../service/app-event.service';
9
9
  import { ArticleExtended } from '@colijnit/articleapi/build/model/article-extended.bo';
10
+ import { ImageService } from '../../../service/image.service';
10
11
  export declare class ArticleCardComponent {
11
12
  iconCache: IconCacheService;
12
13
  catalog: CatalogService;
@@ -14,9 +15,11 @@ export declare class ArticleCardComponent {
14
15
  private _iOne;
15
16
  private _changeDetector;
16
17
  private _appEventService;
18
+ private _imageService;
17
19
  readonly icons: typeof IconEnum;
18
20
  set article(value: ArticleExtended);
19
21
  get article(): ArticleExtended;
22
+ set showing(value: boolean);
20
23
  imageData: string;
21
24
  price: number | string;
22
25
  level: LevelIndicatorLevel;
@@ -35,7 +38,7 @@ export declare class ArticleCardComponent {
35
38
  valutaSymbol: string;
36
39
  stockDetails: boolean;
37
40
  onHostClick(event: MouseEvent): void;
38
- constructor(iconCache: IconCacheService, catalog: CatalogService, options: OptionsService, _iOne: IOneControllerService, _changeDetector: ChangeDetectorRef, _appEventService: AppEventService);
41
+ constructor(iconCache: IconCacheService, catalog: CatalogService, options: OptionsService, _iOne: IOneControllerService, _changeDetector: ChangeDetectorRef, _appEventService: AppEventService, _imageService: ImageService);
39
42
  handleLookAtArticleButtonClick(event: MouseEvent): void;
40
43
  handleAddArticleButtonClick(event: MouseEvent): Promise<void>;
41
44
  handleStockDetailsButtonClick(event: MouseEvent): void;
@@ -1,13 +1,17 @@
1
- import { Renderer2 } from '@angular/core';
1
+ import { OnDestroy, OnInit, ChangeDetectorRef, AfterViewInit, Renderer2 } from '@angular/core';
2
2
  import { CatalogService } from '../../../service/catalog.service';
3
3
  import { AppEventService } from "../../../service/app-event.service";
4
4
  import { DomSanitizer, SafeUrl } from "@angular/platform-browser";
5
- export declare class CatalogExternalComponent {
5
+ export declare class CatalogExternalComponent implements OnInit, OnDestroy, AfterViewInit {
6
6
  catalog: CatalogService;
7
7
  private _appEventService;
8
8
  private _sanitizer;
9
+ private _ref;
9
10
  private _renderer;
10
11
  layout: {};
11
- constructor(catalog: CatalogService, _appEventService: AppEventService, _sanitizer: DomSanitizer, _renderer: Renderer2);
12
+ constructor(catalog: CatalogService, _appEventService: AppEventService, _sanitizer: DomSanitizer, _ref: ChangeDetectorRef, _renderer: Renderer2);
13
+ ngAfterViewInit(): void;
14
+ ngOnInit(): void;
15
+ ngOnDestroy(): void;
12
16
  getSafeUrl(): SafeUrl;
13
17
  }
@@ -1,37 +1,34 @@
1
1
  import { ChangeDetectorRef, OnDestroy, OnInit } from '@angular/core';
2
2
  import { CatalogService } from '../../../service/catalog.service';
3
3
  import { IconEnum } from '../../../enum/icon.enum';
4
- import { CatalogProductFilter } from '../../../enum/catalog-product-filter.enum';
5
4
  import { SliderComponent } from '@colijnit/corecomponents';
5
+ import { NumericalRange } from '@colijnit/corecomponents/lib/core/model/numerical-range';
6
6
  import { IconCacheService } from '../../../service/icon-cache.service';
7
7
  import { OptionsService } from '../../../service/options.service';
8
- import { ArticleExtendedRequest } from "@colijnit/articleapi/build/model/article-extended-request";
8
+ import { FilterService } from '../../../service/filter.service';
9
+ import { FilterItemViewmodel } from '../../../model/filter-item.viewmodel';
9
10
  export declare class CatalogFilterComponent implements OnInit, OnDestroy {
10
11
  catalog: CatalogService;
12
+ filterService: FilterService;
11
13
  iconCache: IconCacheService;
12
14
  optionsService: OptionsService;
13
15
  private changeDetector;
14
16
  readonly icons: typeof IconEnum;
15
- readonly productFilter: typeof CatalogProductFilter;
16
- readonly maxItemsForSearch: number;
17
- ownClass: boolean;
18
- filterItems: any[];
19
- showFilterItemToggle: any;
20
17
  priceSlider: SliderComponent;
21
- get filters(): ArticleExtendedRequest;
18
+ ownClass: boolean;
22
19
  collapsed: boolean;
23
- private destroyed;
20
+ private _destroyed;
24
21
  private _subs;
25
- constructor(catalog: CatalogService, iconCache: IconCacheService, optionsService: OptionsService, changeDetector: ChangeDetectorRef);
22
+ constructor(catalog: CatalogService, filterService: FilterService, iconCache: IconCacheService, optionsService: OptionsService, changeDetector: ChangeDetectorRef);
26
23
  ngOnInit(): void;
27
24
  ngOnDestroy(): void;
28
25
  resetFilters(event: MouseEvent): void;
29
26
  onHandleClick(event: MouseEvent): void;
27
+ updatePriceInputs(range: NumericalRange): void;
30
28
  updateSliderRange(): void;
31
29
  updatePriceFrom(value: string): void;
32
30
  updatePriceTo(value: string): void;
33
- removeFilterItem(item: any): void;
34
- showSelectedFilters(): boolean;
35
- setupFilters(): void;
31
+ filterOnPrice(): void;
32
+ filterOnItem(item: FilterItemViewmodel): void;
36
33
  private detectChanges;
37
34
  }
@@ -0,0 +1,9 @@
1
+ import { OnDestroy } from '@angular/core';
2
+ export declare class VisibilityObserverMasterDirective implements OnDestroy {
3
+ private _mapping;
4
+ private _observer;
5
+ constructor();
6
+ ngOnDestroy(): void;
7
+ add(element: HTMLElement, callback: Function): void;
8
+ remove(element: HTMLElement): void;
9
+ }
@@ -0,0 +1,13 @@
1
+ import { ElementRef, OnDestroy, OnInit } from '@angular/core';
2
+ import { VisibilityObserverMasterDirective } from './visibility-observer-master.directive';
3
+ export declare class VisibilityObserverDirective implements OnDestroy, OnInit {
4
+ observerEnabled: boolean;
5
+ isIntersecting: boolean;
6
+ IS_INTERSECTING: boolean;
7
+ IS_NOT_INTERSECTING: boolean;
8
+ private _elementRef;
9
+ private _parent;
10
+ constructor(parent: VisibilityObserverMasterDirective, elementRef: ElementRef);
11
+ ngOnDestroy(): void;
12
+ ngOnInit(): void;
13
+ }
@@ -1,13 +1,13 @@
1
- import { ChangeDetectorRef, ComponentFactoryResolver, ElementRef, EventEmitter, OnDestroy, OnInit } from "@angular/core";
2
- import { JsonUtilsService } from "./utils/json-utils.service";
3
- import { IOneControllerService } from "./service/i-one-controller.service";
4
- import { DictionaryService } from "./service/dictionary.service";
5
- import { OptionsService } from "./service/options.service";
6
- import { AppEventService } from "./service/app-event.service";
7
- import { Subscription } from "rxjs";
8
- import { SettingsService } from "./service/settings.service";
9
- import { ArticleExtendedRequest } from "@colijnit/articleapi/build/model/article-extended-request";
10
- import { ArticleExtended } from "@colijnit/articleapi/build/model/article-extended.bo";
1
+ import { ChangeDetectorRef, ComponentFactoryResolver, ElementRef, EventEmitter, OnDestroy, OnInit } from '@angular/core';
2
+ import { JsonUtilsService } from './utils/json-utils.service';
3
+ import { IOneControllerService } from './service/i-one-controller.service';
4
+ import { DictionaryService } from './service/dictionary.service';
5
+ import { OptionsService } from './service/options.service';
6
+ import { AppEventService } from './service/app-event.service';
7
+ import { Subscription } from 'rxjs';
8
+ import { SettingsService } from './service/settings.service';
9
+ import { ArticleExtendedRequest } from '@colijnit/articleapi/build/model/article-extended-request';
10
+ import { ArticleExtended } from '@colijnit/articleapi/build/model/article-extended.bo';
11
11
  import { CatalogService } from './service/catalog.service';
12
12
  export declare class IoneCatalogComponent implements OnInit, OnDestroy {
13
13
  catalogService: CatalogService;
@@ -0,0 +1,9 @@
1
+ import { ArticleSearchFilterSelections } from '@colijnit/articleapi/build/model/article-search-filter-selections';
2
+ export declare class FilterItemViewmodel {
3
+ checked: boolean;
4
+ code: string;
5
+ description: string;
6
+ count: number;
7
+ filter: ArticleSearchFilterSelections;
8
+ constructor(code: string, description: string, count: number, filter: ArticleSearchFilterSelections);
9
+ }
@@ -0,0 +1,8 @@
1
+ import { FilterItemViewmodel } from './filter-item.viewmodel';
2
+ import { ArticleSearchFilterSelections } from '@colijnit/articleapi/build/model/article-search-filter-selections';
3
+ export declare class FilterViewmodel {
4
+ expanded: boolean;
5
+ filterName: string;
6
+ filterItems: FilterItemViewmodel[];
7
+ constructor(filter: ArticleSearchFilterSelections);
8
+ }
@@ -8,6 +8,7 @@ export declare class SettingsOptions {
8
8
  stockButtonText: string;
9
9
  showAddArticleButton: boolean;
10
10
  showARButton: boolean;
11
+ maxItemsPerPage: number;
11
12
  addArticleButtonText: string;
12
13
  collapseFilterByDefault: boolean;
13
14
  sortTurnoverGroupsByAlphabet: boolean;
@@ -9,11 +9,15 @@ import { ArticleExtended } from '@colijnit/articleapi/build/model/article-extend
9
9
  import { ArticleCategory } from '@colijnit/articleapi/build/model/article-category';
10
10
  import { ImageService } from './image.service';
11
11
  import { ExternalSourceViewmodel } from '../model/external-source-viewmodel';
12
+ import { SettingsService } from './settings.service';
13
+ import { FilterService } from './filter.service';
12
14
  export declare class CatalogService implements OnDestroy {
13
15
  private iOne;
14
16
  private utils;
15
17
  private optionsService;
16
18
  private _imageService;
19
+ private _settingsService;
20
+ private _filterService;
17
21
  set filterText(value: string[]);
18
22
  get filterText(): string[];
19
23
  set turnoverGroup(value: string);
@@ -54,7 +58,7 @@ export declare class CatalogService implements OnDestroy {
54
58
  private _subs;
55
59
  private defaultOptions;
56
60
  private _currentOrderBy;
57
- constructor(iOne: IOneControllerService, utils: UtilsService, optionsService: OptionsService, _imageService: ImageService);
61
+ constructor(iOne: IOneControllerService, utils: UtilsService, optionsService: OptionsService, _imageService: ImageService, _settingsService: SettingsService, _filterService: FilterService);
58
62
  ngOnDestroy(): void;
59
63
  changeOrderBy(orderBy: OrderByInterface): void;
60
64
  searchArticles(): Promise<void>;
@@ -0,0 +1,12 @@
1
+ import { IOneControllerService } from './i-one-controller.service';
2
+ import { ArticleExtendedRequest } from '@colijnit/articleapi/build/model/article-extended-request';
3
+ import { FilterViewmodel } from '../model/filter-viewmodel';
4
+ export declare class FilterService {
5
+ private _iOneController;
6
+ priceMinFilter: number;
7
+ priceMaxFilter: number;
8
+ filters: FilterViewmodel[];
9
+ readonly filterItemMap: Map<string, string>;
10
+ constructor(_iOneController: IOneControllerService);
11
+ getFilters(filters: ArticleExtendedRequest): void;
12
+ }
@@ -1,13 +1,14 @@
1
1
  import { OnDestroy } from '@angular/core';
2
2
  import { BehaviorSubject } from 'rxjs';
3
3
  import { ArticleExtendedRequest } from '@colijnit/articleapi/build/model/article-extended-request';
4
- import { PagingParameters } from '@colijnit/articleapi/build/model/paging-parameters';
5
4
  import { ArticleExtended } from '@colijnit/articleapi/build/model/article-extended.bo';
6
5
  import { ArticleCategory } from '@colijnit/articleapi/build/model/article-category';
7
6
  import { CatalogDefinition } from '@colijnit/articleapi/build/model/catalog-definition.bo';
8
7
  import { ConfiguratorStatisticsEnvironment } from '@colijnit/articleapi/build/model/configurator-statistics-environment';
9
8
  import { Articles } from '@colijnit/articleapi/build/articles';
10
9
  import { ExternalSource } from '@colijnit/articleapi/build/model/external-source.bo';
10
+ import { ArticleSearchFilterSelections } from '@colijnit/articleapi/build/model/article-search-filter-selections';
11
+ import { ArticleSearchFilterMaxAndMinPrice } from '@colijnit/articleapi/build/model/article-search-filter-max-and-min-price';
11
12
  export declare class IOneControllerService implements OnDestroy {
12
13
  get shouldShowLoader(): boolean;
13
14
  controllerInitialized: BehaviorSubject<boolean>;
@@ -20,10 +21,22 @@ export declare class IOneControllerService implements OnDestroy {
20
21
  private _initialized;
21
22
  ngOnDestroy(): void;
22
23
  initConnector(settings?: any, forceReload?: boolean): Promise<void>;
23
- getArticlesForCatalog(params: ArticleExtendedRequest, paging?: PagingParameters, showLoader?: boolean): Promise<ArticleExtended[]>;
24
+ getArticlesForCatalog(params: ArticleExtendedRequest, showLoader?: boolean): Promise<ArticleExtended[]>;
24
25
  getArticleCategories(publicationCode: number): Promise<ArticleCategory[]>;
25
26
  getCatalogDefinitions(showLoader?: boolean): Promise<CatalogDefinition[]>;
26
27
  getExternalSource(externalSourceId: number, showLoader?: boolean): Promise<ExternalSource>;
28
+ getCatalogFilter(params: ArticleExtendedRequest): Promise<ArticleSearchFilterSelections>;
29
+ getPriceFilter(params: ArticleExtendedRequest): Promise<ArticleSearchFilterMaxAndMinPrice>;
30
+ getArticleGroupsFilter(params: ArticleExtendedRequest): Promise<ArticleSearchFilterSelections>;
31
+ getAtmosphereFilter(params: ArticleExtendedRequest): Promise<ArticleSearchFilterSelections>;
32
+ getColorFilter(params: ArticleExtendedRequest): Promise<ArticleSearchFilterSelections>;
33
+ getConceptFilter(params: ArticleExtendedRequest): Promise<ArticleSearchFilterSelections>;
34
+ getDesignFilter(params: ArticleExtendedRequest): Promise<ArticleSearchFilterSelections>;
35
+ getMainArticleFilter(params: ArticleExtendedRequest): Promise<ArticleSearchFilterSelections>;
36
+ getMaterialFilter(params: ArticleExtendedRequest): Promise<ArticleSearchFilterSelections>;
37
+ getTagsFilter(params: ArticleExtendedRequest): Promise<ArticleSearchFilterSelections>;
38
+ getTurnoverGroupFilter(params: ArticleExtendedRequest): Promise<ArticleSearchFilterSelections>;
39
+ getSelectorArticleThumbnail(documentId: number): Promise<string>;
27
40
  getDocumentContent(docId: number, thumbnail?: boolean): Promise<string>;
28
41
  getJsonArticleFlatTree(goodId: number, goodType: string, quantity: number, showLoader?: boolean, instanceId?: number, configuratorStatistics?: ConfiguratorStatisticsEnvironment): Promise<string>;
29
42
  onShowLoaderChange(showLoader: boolean): void;
@@ -2,8 +2,10 @@ import { CatalogDefinition } from '@colijnit/articleapi/build/model/catalog-defi
2
2
  import { IOneControllerService } from './i-one-controller.service';
3
3
  import { ArticleCategory } from '@colijnit/articleapi/build/model/article-category';
4
4
  import { TurnoverGroupImage } from '@colijnit/articleapi/build/model/turnover-group-image.bo';
5
+ import { ArticleExtended } from '@colijnit/articleapi/build/model/article-extended.bo';
5
6
  export declare class ImageService {
6
7
  private _iOneController;
8
+ private _articleImages;
7
9
  private _externalSourceImages;
8
10
  private _categoryImages;
9
11
  private _turnoverGroupImages;
@@ -11,4 +13,5 @@ export declare class ImageService {
11
13
  getExternalSourceImage(catalogDef: CatalogDefinition): void;
12
14
  getCategoryImage(category: ArticleCategory): void;
13
15
  getTurnoverGroupImage(turnoverGroup: TurnoverGroupImage): void;
16
+ getArticleImage(article: ArticleExtended): void;
14
17
  }