@colijnit/catalog 12.1.35 → 12.1.37

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 (36) hide show
  1. package/bundles/colijnit-catalog.umd.js +261 -209
  2. package/bundles/colijnit-catalog.umd.js.map +1 -1
  3. package/colijnit-catalog.metadata.json +1 -1
  4. package/esm2015/lib/cache/service/business-object-cache-manager.service.js +1 -1
  5. package/esm2015/lib/catalog-version.js +3 -3
  6. package/esm2015/lib/component/catalog-categories/catalog-categories.component.js +15 -4
  7. package/esm2015/lib/component/catalog-categories/catalog-categories.module.js +2 -2
  8. package/esm2015/lib/component/catalog-filter/catalog-filter.component.js +60 -18
  9. package/esm2015/lib/component/catalog-filter/catalog-filter.module.js +9 -4
  10. package/esm2015/lib/component/catalog-filter-content/catalog-filter-content-general/catalog-filter-content-general.component.js +65 -218
  11. package/esm2015/lib/component/catalog-filter-content/catalog-filter-content-logistics/catalog-filter-content-logistics.component.js +43 -85
  12. package/esm2015/lib/component/catalog-filter-content/catalog-filter-content-purchase/catalog-filter-content-purchase.component.js +14 -24
  13. package/esm2015/lib/component/catalog-navigation/catalog-navigation.component.js +18 -5
  14. package/esm2015/lib/component/catalog-search/catalog-search.component.js +5 -1
  15. package/esm2015/lib/model/settings.js +2 -2
  16. package/esm2015/lib/service/catalog-connector-adapter.service.js +75 -6
  17. package/esm2015/lib/service/catalog-connector.service.js +26 -1
  18. package/esm2015/lib/service/catalog-filter.service.js +1 -1
  19. package/esm2015/lib/service/catalog-search.service.js +1 -68
  20. package/esm2015/lib/service/catalog.service.js +14 -1
  21. package/fesm2015/colijnit-catalog.js +320 -412
  22. package/fesm2015/colijnit-catalog.js.map +1 -1
  23. package/lib/component/catalog-categories/catalog-categories.component.d.ts +7 -3
  24. package/lib/component/catalog-filter/catalog-filter.component.d.ts +11 -1
  25. package/lib/component/catalog-filter/style/_layout.scss +29 -0
  26. package/lib/component/catalog-filter-content/catalog-filter-content-general/catalog-filter-content-general.component.d.ts +9 -21
  27. package/lib/component/catalog-filter-content/catalog-filter-content-logistics/catalog-filter-content-logistics.component.d.ts +2 -2
  28. package/lib/component/catalog-filter-content/catalog-filter-content-purchase/catalog-filter-content-purchase.component.d.ts +2 -5
  29. package/lib/component/catalog-navigation/catalog-navigation.component.d.ts +5 -1
  30. package/lib/component/catalog-search/catalog-search.component.d.ts +1 -0
  31. package/lib/model/settings.d.ts +1 -1
  32. package/lib/service/catalog-connector-adapter.service.d.ts +13 -2
  33. package/lib/service/catalog-connector.service.d.ts +8 -0
  34. package/lib/service/catalog-search.service.d.ts +0 -9
  35. package/lib/service/catalog.service.d.ts +4 -0
  36. package/package.json +7 -7
@@ -17,29 +17,35 @@ import { RelationApi } from '@colijnit/relationapi';
17
17
  import { MainApi } from '@colijnit/mainapi';
18
18
  import { StoreGroup } from '@colijnit/mainapi/build/model/store-group.bo';
19
19
  import { CoDomainValue } from '@colijnit/mainapi/build/model/co-domain-value.bo';
20
+ import { RelationListObject } from '@colijnit/relationapi/build/model/relation-list-object.bo';
20
21
  import { RelationRequest } from '@colijnit/relationapi/build/model/relation-request';
21
22
  import { RelationKind } from '@colijnit/relationapi/build/enum/relation-kind.enum';
22
23
  import { CoRVDomainValue } from '@colijnit/mainapi/build/model/co-rv-domain-value.bo';
23
24
  import { Category } from '@colijnit/mainapi/build/model/category.bo';
24
25
  import { BusinessObjectFactory } from '@colijnit/ioneconnector/build/service/business-object-factory';
26
+ import { Preset } from '@colijnit/mainapi/build/model/preset.bo';
27
+ import { UserGroup } from '@colijnit/mainapi/build/model/user-group.bo';
28
+ import { PriceList } from '@colijnit/transactionapi/build/model/price-list';
29
+ import { Transaction } from '@colijnit/transactionapi/build/transaction';
25
30
  import { ObjectUtils } from '@colijnit/ioneconnector/build/utils/object-utils';
26
31
  import { FileUtils } from '@colijnit/ioneconnector/build/utils/file-utils';
27
- import { FilterViewmodel, FilterItemViewmodel, FilterItemModule, InputTextModule, ButtonModule, IconModule, InputDatePickerModule, IconCollapseHandleModule, ImageModule, OverlayModule, OverlayService, InputSearchModule, PaginationBarModule } from '@colijnit/corecomponents_v12';
32
+ import { FilterViewmodel, FilterItemViewmodel, FilterItemModule, InputTextModule, ButtonModule, IconModule, FilterItemMode as FilterItemMode$1, InputDatePickerModule, IconCollapseHandleModule, CoDialogModule, ListOfValuesModule, CheckmarkOverlayModule, ImageModule, OverlayModule, OverlayService, InputSearchModule, PaginationBarModule } from '@colijnit/corecomponents_v12';
28
33
  import { ArticleExtendedRequest } from '@colijnit/articleapi/build/model/article-extended-request';
29
34
  import { PagingParameters } from '@colijnit/ioneconnector/build/model/paging-parameters';
30
35
  import { trigger, state, style, transition, animate } from '@angular/animations';
31
36
  import * as i1 from '@angular/platform-browser';
32
37
  import { DomSanitizer } from '@angular/platform-browser';
33
- import { SliderComponent, InputCheckboxModule, IconModule as IconModule$1, PriceDisplayPipeModule, ButtonModule as ButtonModule$1, ImageModule as ImageModule$1 } from '@colijnit/corecomponents';
38
+ import { InputCheckboxModule, SliderComponent, IconModule as IconModule$1, CheckboxSelectModule, PriceDisplayPipeModule, ButtonModule as ButtonModule$1, ImageModule as ImageModule$1 } from '@colijnit/corecomponents';
34
39
  import { DomainName } from '@colijnit/mainapi/build/enum/domain-name.enum';
40
+ import { FilterItemMode } from '@colijnit/corecomponents_v12/';
35
41
 
36
42
  // this file is dynamically created, do not change this
37
43
  class Version {
38
44
  constructor() {
39
45
  this.name = "@colijnit/catalog";
40
46
  this.description = "iOne Catalog module based on Angular 12";
41
- this.symVer = "12.1.35";
42
- this.publishDate = "20-7-2023 17:36:18";
47
+ this.symVer = "12.1.37";
48
+ this.publishDate = "28-7-2023 11:07:47";
43
49
  }
44
50
  }
45
51
 
@@ -69,7 +75,7 @@ class Settings {
69
75
  this.useLoginEncryption = true;
70
76
  this.type = "V";
71
77
  this.options = new SettingsOptions();
72
- this.withCredentials = true;
78
+ this.jwtEnabled = false;
73
79
  }
74
80
  }
75
81
 
@@ -319,9 +325,10 @@ class CatalogConnectorAdapterService {
319
325
  this.connectorOptions.options = Object.assign(new SettingsOptions(), this.connectorOptions.options);
320
326
  this.assetPath = settings.assetPath;
321
327
  this.connector = new Articles(this.connectorOptions);
322
- this.connectorOptions.session = this.connector.session;
328
+ yield this.connector.connect();
323
329
  this.relationConnector = new RelationApi(this.connectorOptions);
324
330
  this.mainConnector = new MainApi(this.connectorOptions);
331
+ this.transactionConnector = new Transaction(this.connectorOptions);
325
332
  this.connector.showLoader.subscribe(showLoader => this.onShowLoaderChange(showLoader));
326
333
  this.controllerInitialized.next(true);
327
334
  this._initialized = true;
@@ -572,7 +579,18 @@ class CatalogConnectorAdapterService {
572
579
  return __awaiter(this, void 0, void 0, function* () {
573
580
  const response = yield this.mainConnector.getPriceLists();
574
581
  if (response && response.validationResult && response.validationResult.success) {
575
- return this._boFactory.makeBOArrayFromRawBackendDataArray(CoDomainValue, response.resultObjects);
582
+ return this._boFactory.makeBOArrayFromRawBackendDataArray(PriceList, response.resultObjects);
583
+ }
584
+ else {
585
+ console.error(response.validationMessagesAsString);
586
+ }
587
+ });
588
+ }
589
+ getUserGroups() {
590
+ return __awaiter(this, void 0, void 0, function* () {
591
+ const response = yield this.mainConnector.getUserGroups();
592
+ if (response && response.validationResult && response.validationResult.success) {
593
+ return this._boFactory.makeBOArrayFromRawBackendDataArray(UserGroup, response.resultObjects);
576
594
  }
577
595
  else {
578
596
  console.error(response.validationMessagesAsString);
@@ -585,7 +603,51 @@ class CatalogConnectorAdapterService {
585
603
  request.relationType = RelationKind.Supplier;
586
604
  const response = yield this.relationConnector.getRelationListObjects(request);
587
605
  if (response && response.validationResult && response.validationResult.success) {
588
- return this._boFactory.makeBOArrayFromRawBackendDataArray(CoDomainValue, response.resultObjects);
606
+ return this._boFactory.makeBOArrayFromRawBackendDataArray(RelationListObject, response.resultObjects);
607
+ }
608
+ else {
609
+ console.error(response.validationMessagesAsString);
610
+ }
611
+ });
612
+ }
613
+ getPresets(module, user) {
614
+ return __awaiter(this, void 0, void 0, function* () {
615
+ const response = yield this.mainConnector.getPresets(module, user);
616
+ if (response && response.validationResult && response.validationResult.success) {
617
+ return this._boFactory.makeBOArrayFromRawBackendDataArray(Preset, response.resultObjects);
618
+ }
619
+ else {
620
+ console.error(response.validationMessagesAsString);
621
+ }
622
+ });
623
+ }
624
+ getPreset(presetId) {
625
+ return __awaiter(this, void 0, void 0, function* () {
626
+ const response = yield this.mainConnector.getPreset(presetId);
627
+ if (response && response.validationResult && response.validationResult.success) {
628
+ return this._boFactory.makeWithRawBackendData(Preset, response.resultObjects);
629
+ }
630
+ else {
631
+ console.error(response.validationMessagesAsString);
632
+ }
633
+ });
634
+ }
635
+ savePreset(preset) {
636
+ return __awaiter(this, void 0, void 0, function* () {
637
+ const response = yield this.mainConnector.savePreset(preset);
638
+ if (response && response.validationResult && response.validationResult.success) {
639
+ return true;
640
+ }
641
+ else {
642
+ console.error(response.validationMessagesAsString);
643
+ }
644
+ });
645
+ }
646
+ updatePreset(presetName) {
647
+ return __awaiter(this, void 0, void 0, function* () {
648
+ const response = yield this.mainConnector.updatePreset(presetName);
649
+ if (response && response.validationResult && response.validationResult.success) {
650
+ return true;
589
651
  }
590
652
  else {
591
653
  console.error(response.validationMessagesAsString);
@@ -679,6 +741,14 @@ class CatalogConnectorAdapterService {
679
741
  }
680
742
  });
681
743
  }
744
+ addWebSessionTransactionLine(sku, quantity) {
745
+ this.transactionConnector.addWebSessionTransactionLine(sku, quantity);
746
+ }
747
+ getWebTransaction() {
748
+ this.transactionConnector.getWebSessionSalesOrder().then((response) => {
749
+ console.log(response);
750
+ });
751
+ }
682
752
  getJsonArticleFlatTree(goodId, goodType, quantity, showLoader = true, instanceId = undefined, configuratorStatistics) {
683
753
  return this.connector.getJsonArticleFlatTree(goodId, goodType, quantity, showLoader, undefined, configuratorStatistics);
684
754
  }
@@ -1215,11 +1285,36 @@ class CatalogConnectorService {
1215
1285
  return this._adapterService.getPriceLists();
1216
1286
  });
1217
1287
  }
1288
+ getUserGroups() {
1289
+ return __awaiter(this, void 0, void 0, function* () {
1290
+ return this._adapterService.getUserGroups();
1291
+ });
1292
+ }
1218
1293
  getSuppliers() {
1219
1294
  return __awaiter(this, void 0, void 0, function* () {
1220
1295
  return this._adapterService.getSuppliers();
1221
1296
  });
1222
1297
  }
1298
+ getPresets(module, user) {
1299
+ return __awaiter(this, void 0, void 0, function* () {
1300
+ return this._adapterService.getPresets(module, user);
1301
+ });
1302
+ }
1303
+ getPreset(presetId) {
1304
+ return __awaiter(this, void 0, void 0, function* () {
1305
+ return this._adapterService.getPreset(presetId);
1306
+ });
1307
+ }
1308
+ savePreset(preset) {
1309
+ return __awaiter(this, void 0, void 0, function* () {
1310
+ return this._adapterService.savePreset(preset);
1311
+ });
1312
+ }
1313
+ updatePreset(presetName) {
1314
+ return __awaiter(this, void 0, void 0, function* () {
1315
+ return this._adapterService.updatePreset(presetName);
1316
+ });
1317
+ }
1223
1318
  getDocumentContent(docId, thumbnail = true) {
1224
1319
  return __awaiter(this, void 0, void 0, function* () {
1225
1320
  return this._selectSingleParameterizedCacheService.requestCache(String, (docId, thumbnail) => {
@@ -1579,8 +1674,6 @@ class CatalogSearchService {
1579
1674
  this._settingsService = _settingsService;
1580
1675
  this._optionService = _optionService;
1581
1676
  this.searchRequest = new ArticleExtendedRequest();
1582
- // public activeSearchViewMode: SearchViewMode = SearchViewMode.FullScreen;
1583
- // public activeSearchBarViewMode: SearchbarViewMode = SearchbarViewMode.Expanded;
1584
1677
  this.showFilterSidebar = false;
1585
1678
  this.articles = [];
1586
1679
  this.articlesPerPage = 20;
@@ -1598,14 +1691,6 @@ class CatalogSearchService {
1598
1691
  }
1599
1692
  }));
1600
1693
  }
1601
- set filterText(value) {
1602
- this._setRequestParametersAndProps(null, null, value);
1603
- // this.searchTextChanged.next(this.filterText);
1604
- this.searchArticles();
1605
- }
1606
- get filterText() {
1607
- return this._filterText;
1608
- }
1609
1694
  set turnoverGroup(value) {
1610
1695
  this._setRequestParametersAndProps(null, value, null);
1611
1696
  // this.turnoverGroupChanged.next(this.turnoverGroup);
@@ -1632,60 +1717,6 @@ class CatalogSearchService {
1632
1717
  ngOnDestroy() {
1633
1718
  this._subs.forEach(s => s.unsubscribe());
1634
1719
  }
1635
- filterOnCollection(filterName, collection) {
1636
- if (!collection || collection.length === 0) {
1637
- return;
1638
- }
1639
- const searchFilterProp = this._filterService.getFilterItemMap(filterName);
1640
- if (searchFilterProp) {
1641
- this.searchRequest[searchFilterProp] = this.createFilterString(collection, searchFilterProp);
1642
- this.searchArticles();
1643
- }
1644
- }
1645
- createFilterString(collection, searchFilterProp) {
1646
- let cleared = false;
1647
- let filterRange = [];
1648
- collection.forEach((viewModel) => {
1649
- if (!cleared) {
1650
- this.searchRequest[searchFilterProp] = '';
1651
- cleared = true;
1652
- }
1653
- if (viewModel.checked) {
1654
- filterRange.push(`?='${viewModel.code}'`);
1655
- }
1656
- });
1657
- return filterRange.join(',');
1658
- }
1659
- createFilterStringCollection(collection) {
1660
- let filterRange = [];
1661
- collection.forEach((viewModel) => {
1662
- if (viewModel.checked) {
1663
- filterRange.push(viewModel.code.toString());
1664
- }
1665
- });
1666
- return filterRange;
1667
- }
1668
- createSingleSelectString(collection) {
1669
- let filterString = "";
1670
- collection.forEach((viewModel) => {
1671
- if (viewModel.checked) {
1672
- filterString = viewModel.code.toString();
1673
- }
1674
- });
1675
- return filterString;
1676
- }
1677
- createFilterNumber(collection) {
1678
- let filterNumber = null;
1679
- collection.forEach((viewModel) => {
1680
- if (viewModel.checked) {
1681
- if (filterNumber == null) {
1682
- filterNumber = 0;
1683
- }
1684
- filterNumber += Number(viewModel.code);
1685
- }
1686
- });
1687
- return filterNumber;
1688
- }
1689
1720
  searchArticles(getFilters = true) {
1690
1721
  const lowerBound = ((this.currentPage - 1) * this.articlesPerPage) + 1;
1691
1722
  this.searchRequest.paging = new PagingParameters(lowerBound, lowerBound + this.articlesPerPage - 1, this.articlesPerPage);
@@ -1732,9 +1763,6 @@ class CatalogSearchService {
1732
1763
  this.searchRequest.category = category;
1733
1764
  this.searchRequest.turnoverGroup = turnoverGroup;
1734
1765
  this.searchRequest.general = searchText ? searchText.join(' ') : null;
1735
- // this._category = category;
1736
- // this._turnoverGroup = turnoverGroup;
1737
- // this._filterText = searchText;
1738
1766
  }
1739
1767
  }
1740
1768
  CatalogSearchService.decorators = [
@@ -1757,6 +1785,7 @@ class CatalogService {
1757
1785
  this._filterService = _filterService;
1758
1786
  this._catalogSearchService = _catalogSearchService;
1759
1787
  this.externalSourceChanged = new BehaviorSubject(undefined);
1788
+ this.controllerInitialized = new BehaviorSubject(undefined);
1760
1789
  this.articleSearchFilters = {};
1761
1790
  this.articlesOnShowcase = [];
1762
1791
  this.showcaseTitle = 'CATALOG';
@@ -1782,6 +1811,7 @@ class CatalogService {
1782
1811
  this._subs.push(this.connectorAdapter.controllerInitialized.subscribe((initialized) => __awaiter(this, void 0, void 0, function* () {
1783
1812
  if (initialized) {
1784
1813
  this._controllerInitialized = true;
1814
+ this.controllerInitialized.next(this._controllerInitialized);
1785
1815
  // this.ensureDataListsLoaded();
1786
1816
  this.articlesPerPage = this.settingsService.settings.options.maxItemsPerPage;
1787
1817
  // if (this._settingsService.settings.options.searchOnStart) {
@@ -1860,6 +1890,11 @@ class CatalogService {
1860
1890
  yield this.connector.initConnector(this.settingsService.settings, forceReload);
1861
1891
  });
1862
1892
  }
1893
+ initConnector(settings, forceReload = false) {
1894
+ return __awaiter(this, void 0, void 0, function* () {
1895
+ yield this.connector.initConnector(this.settingsService.settings, forceReload);
1896
+ });
1897
+ }
1863
1898
  getCategories() {
1864
1899
  return __awaiter(this, void 0, void 0, function* () {
1865
1900
  const categories = yield this.connector.getArticleCategories(this.settingsService.settings.catalogParameters.publicationCode);
@@ -1887,6 +1922,12 @@ class CatalogService {
1887
1922
  return this._imageService.getTurnoverGroupImage(group);
1888
1923
  });
1889
1924
  }
1925
+ addWebSessionTransactionLine(sku, quantity) {
1926
+ this.connectorAdapter.addWebSessionTransactionLine(sku, quantity);
1927
+ }
1928
+ getWebTransaction() {
1929
+ this.connectorAdapter.getWebTransaction();
1930
+ }
1890
1931
  reset() {
1891
1932
  this.showCatOrTurnoverGroupArticles = false;
1892
1933
  this.showExternalSource = false;
@@ -1906,13 +1947,15 @@ CatalogService.ctorParameters = () => [
1906
1947
  ];
1907
1948
 
1908
1949
  class CatalogCategoriesComponent {
1909
- constructor(_catalogService) {
1950
+ constructor(_catalogService, _adapterService) {
1910
1951
  this._catalogService = _catalogService;
1952
+ this._adapterService = _adapterService;
1911
1953
  this.showTurnoverGroups = true;
1912
1954
  this.categoryClick = new EventEmitter();
1913
1955
  this.turnoverGroupClick = new EventEmitter();
1914
1956
  this.categories = [];
1915
1957
  this.turnoverGroups = [];
1958
+ this._subs = [];
1916
1959
  }
1917
1960
  showClass() {
1918
1961
  return true;
@@ -1920,7 +1963,14 @@ class CatalogCategoriesComponent {
1920
1963
  ngOnInit() {
1921
1964
  this.categories.length = 0;
1922
1965
  this.turnoverGroups.length = 0;
1923
- this.getCategories();
1966
+ this._subs.push(this._adapterService.controllerInitialized.subscribe((initialized) => {
1967
+ if (initialized) {
1968
+ this.getCategories();
1969
+ }
1970
+ }));
1971
+ }
1972
+ ngOnDestroy() {
1973
+ this._subs.forEach(s => s.unsubscribe());
1924
1974
  }
1925
1975
  getCategories() {
1926
1976
  return __awaiter(this, void 0, void 0, function* () {
@@ -1985,7 +2035,8 @@ CatalogCategoriesComponent.decorators = [
1985
2035
  },] }
1986
2036
  ];
1987
2037
  CatalogCategoriesComponent.ctorParameters = () => [
1988
- { type: CatalogService }
2038
+ { type: CatalogService },
2039
+ { type: CatalogConnectorAdapterService }
1989
2040
  ];
1990
2041
  CatalogCategoriesComponent.propDecorators = {
1991
2042
  showTurnoverGroups: [{ type: Input }],
@@ -2086,12 +2137,16 @@ IconCacheService.ctorParameters = () => [
2086
2137
  ];
2087
2138
 
2088
2139
  class CatalogFilterComponent {
2089
- constructor(iconCache, optionsService, changeDetector) {
2140
+ constructor(iconCache, optionsService, changeDetector, _catalogConnectorService, searchService) {
2090
2141
  this.iconCache = iconCache;
2091
2142
  this.optionsService = optionsService;
2092
2143
  this.changeDetector = changeDetector;
2144
+ this._catalogConnectorService = _catalogConnectorService;
2145
+ this.searchService = searchService;
2093
2146
  this.icons = IconEnum;
2147
+ this.updatePreset = false;
2094
2148
  this.showResetFilter = true;
2149
+ this.showSavePopup = false;
2095
2150
  this.filterCategories = [
2096
2151
  'Algemeen',
2097
2152
  'Inkoop',
@@ -2117,6 +2172,12 @@ class CatalogFilterComponent {
2117
2172
  }
2118
2173
  //this.initializePriceFilterMinMax();
2119
2174
  this.detectChanges();
2175
+ this.getUserGroups();
2176
+ }
2177
+ getUserGroups() {
2178
+ this._catalogConnectorService.getUserGroups().then((userGroups) => {
2179
+ this.userGroupCollection = userGroups;
2180
+ });
2120
2181
  }
2121
2182
  handleCategoryClick(cat) {
2122
2183
  if (cat === 'Algemeen') {
@@ -2145,6 +2206,14 @@ CatalogFilterComponent.decorators = [
2145
2206
  { type: Component, args: [{
2146
2207
  selector: 'co-catalog-filter',
2147
2208
  template: `
2209
+ <!--<div class="preset-button">
2210
+ <co-button [iconData]="iconCache.getIcon(icons.MagicWand)"
2211
+ (onClick)="loadSelectedPreset()">
2212
+ </co-button>
2213
+ <co-button [iconData]="iconCache.getIcon(icons.Check)"
2214
+ (onClick)="showSavePresetPopup()">
2215
+ </co-button>
2216
+ </div>-->
2148
2217
  <div class="catalog-filter-categories">
2149
2218
  <co-catalog-filter-categories [categories]="filterCategories"
2150
2219
  (categoryClick)="handleCategoryClick($event)"></co-catalog-filter-categories>
@@ -2159,23 +2228,43 @@ CatalogFilterComponent.decorators = [
2159
2228
  <div #logisticsFilter class="catalog-filter-category-content">
2160
2229
  <co-catalog-filter-content-logistics></co-catalog-filter-content-logistics>
2161
2230
  </div>
2162
- </div>
2163
-
2231
+ </div>
2164
2232
 
2165
- <!--<div class="catalog-filter-wrapper">
2166
- <div *ngIf="showResetFilter" class="reset-filter-wrapper">
2167
- <div class="reset-title-wrapper">
2168
- <div class="reset-title">
2169
- <div class="reset-filter-title" [textContent]="'FILTER' | localize"></div>
2170
- <co-icon class="reset-filter-icon" [iconData]="iconCache.getIcon(icons.SyncAlt)"></co-icon>
2171
- </div>
2172
- <co-icon-collapse-handle (click)="onHandleClick($event)"></co-icon-collapse-handle>
2173
- </div>
2174
- <div class="filter-reset" [textContent]="'RESET_FILTER' | localize" (click)="resetFilters($event)"></div>
2233
+ <!--<co-dialog *ngIf="showSavePopup" [headerTemplate]="headerTemplate" [footerTemplate]="footerTemplate" (closeClick)="cancelClicked()">
2234
+ <ng-template #headerTemplate>
2235
+ <span class="header" [textContent]="'SAVE_PRESET' | localize"></span>
2236
+ </ng-template>
2237
+
2238
+ <div class="save-dialog-contents">
2239
+ <co-input-text
2240
+ [hideArrowButtons]="true"
2241
+ [excludePlusMinus]="true"
2242
+ [(model)]="searchService.currentPreset.name"
2243
+ [label]="'PRESET_NAME' | localize"
2244
+ [placeholder]="'PRESET_NAME' | localize"
2245
+ ></co-input-text>
2246
+ <co-list-of-values [collection]="userGroupCollection"
2247
+ [displayField]="'description'"
2248
+ [label]="'USERGROUPS'| localize"
2249
+ [(model)]="userGroupsChosen"
2250
+ (modelChange)="userGroupsChanged()"
2251
+ [multiselect]="true"
2252
+ ></co-list-of-values>
2253
+ &lt;!&ndash;<co-input-checkbox *ngIf="updatePreset"
2254
+ [(model)]="searchService.currentPreset.default"
2255
+ [label]="'SAVE_AS_NEW' | localize"
2256
+ ></co-input-checkbox> &ndash;&gt;
2175
2257
  </div>
2176
- <div class="filter-items-wrapper co-small-scrollbar">
2177
- </div>
2178
- </div>-->
2258
+
2259
+ <ng-template #footerTemplate>
2260
+ <div class="co-dialog-footer-button-wrapper">
2261
+ <ng-container >
2262
+ <co-button [label]="'SAVE' | localize" (click)="saveClicked()"></co-button>
2263
+ <co-button [label]="'CANCEL' | localize" (click)="cancelClicked()"></co-button>
2264
+ </ng-container>
2265
+ </div>
2266
+ </ng-template>
2267
+ </co-dialog> -->
2179
2268
  `,
2180
2269
  animations: [
2181
2270
  trigger('showFilterItem', [
@@ -2190,7 +2279,9 @@ CatalogFilterComponent.decorators = [
2190
2279
  CatalogFilterComponent.ctorParameters = () => [
2191
2280
  { type: IconCacheService },
2192
2281
  { type: CatalogOptionsService },
2193
- { type: ChangeDetectorRef }
2282
+ { type: ChangeDetectorRef },
2283
+ { type: CatalogConnectorService },
2284
+ { type: CatalogSearchService }
2194
2285
  ];
2195
2286
  CatalogFilterComponent.propDecorators = {
2196
2287
  filterItems: [{ type: ViewChild, args: ['filterItems', { read: ElementRef },] }],
@@ -2309,17 +2400,11 @@ class CatalogFilterContentGeneralComponent {
2309
2400
  this._catalogConnectorService = _catalogConnectorService;
2310
2401
  this._adapterService = _adapterService;
2311
2402
  this.icons = IconEnum;
2403
+ this.modes = FilterItemMode;
2312
2404
  this._min = 0;
2313
2405
  this._max = 100000;
2314
2406
  this._subs = [];
2315
2407
  this.supplierDropdownFields = { text: "description", value: "storeGroupId" };
2316
- this.getRetail = (barcodeFilter) => __awaiter(this, void 0, void 0, function* () {
2317
- const request = new ArticleExtendedRequest();
2318
- request.barcode = barcodeFilter;
2319
- return this._catalogConnectorService.getArticlesForCatalog(request).then((articleResult) => {
2320
- return new FilterViewmodel(articleResult.articles, { text: 'barcode', value: 'barcode' }).filterItems;
2321
- });
2322
- });
2323
2408
  }
2324
2409
  showClass() {
2325
2410
  return true;
@@ -2387,66 +2472,6 @@ class CatalogFilterContentGeneralComponent {
2387
2472
  this.priceListsSalesCollection = this.filterService.createFilterSelectionsCollection(tempPriceListsSalesCollection, "code", "description");
2388
2473
  });
2389
2474
  }
2390
- filterOnPrice() {
2391
- this.filterService.priceMinFilter = !!this.filterService.priceMinFilter ? this.filterService.priceMinFilter : this._min;
2392
- this.filterService.priceMaxFilter = !!this.filterService.priceMaxFilter ? this.filterService.priceMaxFilter : this._max;
2393
- // some user error protection
2394
- let trueLowerBound = Math.min(this.filterService.priceMinFilter, this.filterService.priceMaxFilter);
2395
- let trueUpperBound = Math.max(this.filterService.priceMinFilter, this.filterService.priceMaxFilter);
2396
- this.catalogSearchService.searchRequest.rangePrice = `${trueLowerBound} - ${trueUpperBound}`;
2397
- this.catalogSearchService.searchArticles();
2398
- }
2399
- updateLengthFilter() {
2400
- this.filterService.lengthMinFilter = !!this.filterService.lengthMinFilter ? this.filterService.lengthMinFilter : this._min;
2401
- this.filterService.lengthMaxFilter = !!this.filterService.lengthMaxFilter ? this.filterService.lengthMaxFilter : this._max;
2402
- this.catalogSearchService.searchRequest.length = this.getFromToFilter(this.filterService.lengthMinFilter, this.filterService.lengthMaxFilter);
2403
- }
2404
- updateWidthFilter() {
2405
- this.filterService.widthMinFilter = !!this.filterService.widthMinFilter ? this.filterService.widthMinFilter : this._min;
2406
- this.filterService.widthMaxFilter = !!this.filterService.widthMaxFilter ? this.filterService.widthMaxFilter : this._max;
2407
- this.catalogSearchService.searchRequest.width = this.getFromToFilter(this.filterService.widthMinFilter, this.filterService.widthMaxFilter);
2408
- }
2409
- updateHeightFilter() {
2410
- this.filterService.heightMinFilter = !!this.filterService.heightMinFilter ? this.filterService.heightMinFilter : this._min;
2411
- this.filterService.heightMaxFilter = !!this.filterService.heightMaxFilter ? this.filterService.heightMaxFilter : this._max;
2412
- this.catalogSearchService.searchRequest.height = this.getFromToFilter(this.filterService.heightMinFilter, this.filterService.heightMaxFilter);
2413
- }
2414
- updateDepthFilter() {
2415
- this.filterService.depthMinFilter = !!this.filterService.depthMinFilter ? this.filterService.depthMinFilter : this._min;
2416
- this.filterService.depthMaxFilter = !!this.filterService.depthMaxFilter ? this.filterService.depthMaxFilter : this._max;
2417
- this.catalogSearchService.searchRequest.depth = this.getFromToFilter(this.filterService.depthMinFilter, this.filterService.depthMaxFilter);
2418
- }
2419
- getFromToFilter(min, max) {
2420
- // some user error protection
2421
- let trueLowerBound = Math.min(min, max);
2422
- let trueUpperBound = Math.max(min, max);
2423
- return `${trueLowerBound} - ${trueUpperBound}`;
2424
- }
2425
- handleCollectionChange(filterName, collection) {
2426
- this.catalogSearchService.filterOnCollection(filterName, collection);
2427
- }
2428
- handleSeparateCollectionChange(filterName, collection) {
2429
- this.catalogSearchService.searchRequest[filterName] = this.catalogSearchService.createFilterString(collection, filterName);
2430
- }
2431
- handleArticleTypeChange(filterName, collection) {
2432
- this.catalogSearchService.searchRequest.articleKindList = this.catalogSearchService.createFilterStringCollection(collection);
2433
- }
2434
- handleSingleSelectChange(filterName, collection) {
2435
- this.catalogSearchService.searchRequest[filterName] = this.catalogSearchService.createSingleSelectString(collection);
2436
- }
2437
- handleNumberListChange(filterName, collection) {
2438
- this.catalogSearchService.searchRequest[filterName] = this.catalogSearchService.createFilterNumber(collection);
2439
- }
2440
- handleCollectionChangeForSingleSelect(collection, modelName) {
2441
- this.catalogSearchService.searchRequest[modelName] = this._getFilterRequestForSingleSelect(collection);
2442
- this.catalogSearchService.searchArticles();
2443
- }
2444
- _getFilterRequestForSingleSelect(collection) {
2445
- let filterRequest = '';
2446
- const selectedItem = collection === null || collection === void 0 ? void 0 : collection.find(item => item.checked);
2447
- filterRequest = selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem.code.toString();
2448
- return filterRequest;
2449
- }
2450
2475
  }
2451
2476
  CatalogFilterContentGeneralComponent.decorators = [
2452
2477
  { type: Component, args: [{
@@ -2457,148 +2482,60 @@ CatalogFilterContentGeneralComponent.decorators = [
2457
2482
  <div class="catalog-filter-wrapper">
2458
2483
  <div class="filter-items-wrapper co-small-scrollbar">
2459
2484
  <div class="filter-item-wrapper">
2460
- <label class="temp">Price</label>
2461
- <div class="price-inputs">
2462
- <co-input-text
2463
- class="price-from"
2464
- [type]="'number'"
2465
- [digitsOnly]="true"
2466
- [hideArrowButtons]="true"
2467
- [excludePlusMinus]="true"
2468
- [label]="'BASELINE_PRICE' | localize"
2469
- [(model)]="filterService.priceMinFilter"
2470
- customWidth
2471
- ></co-input-text>
2472
- <co-input-text
2473
- class="price-to"
2474
- [type]="'number'"
2475
- [digitsOnly]="true"
2476
- [hideArrowButtons]="true"
2477
- [excludePlusMinus]="true"
2478
- [label]="'PRICE_TO' | localize"
2479
- [(model)]="filterService.priceMaxFilter"
2480
- customWidth
2481
- ></co-input-text>
2482
- <co-icon [iconData]="iconCache.getIcon(icons.Check)" (click)="filterOnPrice()"></co-icon>
2483
- </div>
2485
+ <co-filter-item [placeholder]="'PRICE' | localize"
2486
+ [expanded]="true"
2487
+ [mode]="modes.Slider"
2488
+ [sliderDefaultMin]="0"
2489
+ [sliderDefaultMax]="100000"
2490
+ [(model)]="catalogSearchService.searchRequest.rangePrice"
2491
+ >
2492
+ </co-filter-item>
2484
2493
  </div>
2485
2494
  <div class="filter-item-wrapper">
2486
- <label class="temp">Length</label>
2487
- <div class="price-inputs">
2488
- <co-input-text
2489
- class="price-from"
2490
- [type]="'number'"
2491
- [digitsOnly]="true"
2492
- [hideArrowButtons]="true"
2493
- [excludePlusMinus]="true"
2494
- [label]="'FROM' | localize"
2495
- [(model)]="filterService.lengthMinFilter"
2496
- (modelChange)="updateLengthFilter()"
2497
- customWidth
2498
- ></co-input-text>
2499
- <co-input-text
2500
- class="price-to"
2501
- [type]="'number'"
2502
- [digitsOnly]="true"
2503
- [hideArrowButtons]="true"
2504
- [excludePlusMinus]="true"
2505
- [label]="'FROM' | localize"
2506
- [(model)]="filterService.lengthMaxFilter"
2507
- (modelChange)="updateLengthFilter()"
2508
- customWidth
2509
- ></co-input-text>
2510
- <co-icon [iconData]="iconCache.getIcon(icons.Check)" (click)="filterOnPrice()"></co-icon>
2511
- </div>
2495
+ <co-filter-item [placeholder]="'LENGTH' | localize"
2496
+ [expanded]="true"
2497
+ [mode]="modes.Slider"
2498
+ [sliderDefaultMin]="0"
2499
+ [sliderDefaultMax]="5000"
2500
+ [(model)]="catalogSearchService.searchRequest.length"
2501
+ >
2502
+ </co-filter-item>
2512
2503
  </div>
2513
2504
  <div class="filter-item-wrapper">
2514
- <label class="temp">Width</label>
2515
- <div class="price-inputs">
2516
- <co-input-text
2517
- class="price-from"
2518
- [type]="'number'"
2519
- [digitsOnly]="true"
2520
- [hideArrowButtons]="true"
2521
- [excludePlusMinus]="true"
2522
- [label]="'FROM' | localize"
2523
- [(model)]="filterService.widthMinFilter"
2524
- (modelChange)="updateWidthFilter()"
2525
- customWidth
2526
- ></co-input-text>
2527
- <co-input-text
2528
- class="price-to"
2529
- [type]="'number'"
2530
- [digitsOnly]="true"
2531
- [hideArrowButtons]="true"
2532
- [excludePlusMinus]="true"
2533
- [label]="'TO' | localize"
2534
- [(model)]="filterService.widthMaxFilter"
2535
- (modelChange)="updateWidthFilter()"
2536
- customWidth
2537
- ></co-input-text>
2538
- <co-icon [iconData]="iconCache.getIcon(icons.Check)" (click)="filterOnPrice()"></co-icon>
2539
- </div>
2505
+ <co-filter-item [placeholder]="'WIDTH' | localize"
2506
+ [expanded]="true"
2507
+ [mode]="modes.Slider"
2508
+ [sliderDefaultMin]="0"
2509
+ [sliderDefaultMax]="5000"
2510
+ [(model)]="catalogSearchService.searchRequest.width"
2511
+ >
2512
+ </co-filter-item>
2540
2513
  </div>
2541
2514
  <div class="filter-item-wrapper">
2542
- <label class="temp">Height</label>
2543
- <div class="price-inputs">
2544
- <co-input-text
2545
- class="price-from"
2546
- [type]="'number'"
2547
- [digitsOnly]="true"
2548
- [hideArrowButtons]="true"
2549
- [excludePlusMinus]="true"
2550
- [label]="'FROM' | localize"
2551
- [(model)]="filterService.heightMinFilter"
2552
- (modelChange)="updateHeightFilter()"
2553
- customWidth
2554
- ></co-input-text>
2555
- <co-input-text
2556
- class="price-to"
2557
- [type]="'number'"
2558
- [digitsOnly]="true"
2559
- [hideArrowButtons]="true"
2560
- [excludePlusMinus]="true"
2561
- [label]="'TO' | localize"
2562
- [(model)]="filterService.heightMaxFilter"
2563
- (modelChange)="updateHeightFilter()"
2564
- customWidth
2565
- ></co-input-text>
2566
- <co-icon [iconData]="iconCache.getIcon(icons.Check)" (click)="filterOnPrice()"></co-icon>
2567
- </div>
2515
+ <co-filter-item [placeholder]="'HEIGHT' | localize"
2516
+ [expanded]="true"
2517
+ [mode]="modes.Slider"
2518
+ [sliderDefaultMin]="0"
2519
+ [sliderDefaultMax]="5000"
2520
+ [(model)]="catalogSearchService.searchRequest.height"
2521
+ >
2522
+ </co-filter-item>
2568
2523
  </div>
2569
2524
  <div class="filter-item-wrapper">
2570
- <label class="temp">Width</label>
2571
- <div class="price-inputs">
2572
- <co-input-text
2573
- class="price-from"
2574
- [type]="'number'"
2575
- [digitsOnly]="true"
2576
- [hideArrowButtons]="true"
2577
- [excludePlusMinus]="true"
2578
- [label]="'FROM' | localize"
2579
- [(model)]="filterService.depthMinFilter"
2580
- (modelChange)="updateDepthFilter()"
2581
- customWidth
2582
- ></co-input-text>
2583
- <co-input-text
2584
- class="price-to"
2585
- [type]="'number'"
2586
- [digitsOnly]="true"
2587
- [hideArrowButtons]="true"
2588
- [excludePlusMinus]="true"
2589
- [label]="'TO' | localize"
2590
- [(model)]="filterService.depthMaxFilter"
2591
- (modelChange)="updateDepthFilter()"
2592
- customWidth
2593
- ></co-input-text>
2594
- <co-icon [iconData]="iconCache.getIcon(icons.Check)" (click)="filterOnPrice()"></co-icon>
2595
- </div>
2525
+ <co-filter-item [placeholder]="'DEPTH' | localize"
2526
+ [expanded]="true"
2527
+ [mode]="modes.Slider"
2528
+ [sliderDefaultMin]="0"
2529
+ [sliderDefaultMax]="5000"
2530
+ [(model)]="catalogSearchService.searchRequest.depth"
2531
+ >
2532
+ </co-filter-item>
2596
2533
  </div>
2597
2534
  <div class="filter-item-wrapper">
2598
2535
  <co-filter-item [placeholder]="'RETAIL_FORMULA' | localize"
2599
2536
  [expanded]="true"
2600
2537
  [collection]="storeGroupCollection"
2601
- (collectionChange)="handleSeparateCollectionChange('rangeStoreGroup', $event)"
2538
+ [(model)]="catalogSearchService.searchRequest.rangeStoreGroup"
2602
2539
  >
2603
2540
  </co-filter-item>
2604
2541
  </div>
@@ -2606,7 +2543,7 @@ CatalogFilterContentGeneralComponent.decorators = [
2606
2543
  <co-filter-item [placeholder]="'IN_OUT_COLLECTION' | localize"
2607
2544
  [expanded]="true"
2608
2545
  [collection]="inOutCollectionCollection"
2609
- (collectionChange)="handleSeparateCollectionChange('collection', $event)"
2546
+ [(model)]="catalogSearchService.searchRequest.collection"
2610
2547
  >
2611
2548
  </co-filter-item>
2612
2549
  </div>
@@ -2614,7 +2551,8 @@ CatalogFilterContentGeneralComponent.decorators = [
2614
2551
  <co-filter-item [placeholder]="'ARTICLE_TYPE' | localize"
2615
2552
  [expanded]="true"
2616
2553
  [collection]="articleTypeCollection"
2617
- (collectionChange)="handleArticleTypeChange('rangeStoreGroup', $event)"
2554
+ [mode]="modes.SelectListWithStringCollectionOutput"
2555
+ [(model)]="catalogSearchService.searchRequest.articleKindList"
2618
2556
  >
2619
2557
  </co-filter-item>
2620
2558
  </div>
@@ -2622,7 +2560,8 @@ CatalogFilterContentGeneralComponent.decorators = [
2622
2560
  <co-filter-item [placeholder]="'PUBLISH_VIA' | localize"
2623
2561
  [expanded]="true"
2624
2562
  [collection]="artPublicationCollection"
2625
- (collectionChange)="handleNumberListChange('publicationCode', $event)"
2563
+ [(model)]="catalogSearchService.searchRequest.publicationCode"
2564
+ [mode]="modes.SelectListWithNumberOutput"
2626
2565
  >
2627
2566
  </co-filter-item>
2628
2567
  </div>
@@ -2630,25 +2569,26 @@ CatalogFilterContentGeneralComponent.decorators = [
2630
2569
  <co-filter-item [placeholder]="'SELL_VIA' | localize"
2631
2570
  [expanded]="true"
2632
2571
  [collection]="artPublicationSalesCollection"
2633
- (collectionChange)="handleNumberListChange('publicationWebshopSales', $event)"
2572
+ [(model)]="catalogSearchService.searchRequest.publicationWebshopSales"
2573
+ [mode]="modes.SelectListWithNumberOutput"
2634
2574
  >
2635
2575
  </co-filter-item>
2636
2576
  </div>
2637
2577
  <div class="filter-item-wrapper">
2638
2578
  <co-filter-item [placeholder]="'PRICELIST_SALES' | localize"
2639
2579
  [expanded]="true"
2640
- [singleSelect]="true"
2580
+ [(model)]="catalogSearchService.searchRequest.pricelistRetail"
2581
+ [mode]="modes.SingleSelectList"
2641
2582
  [collection]="priceListsSalesCollection"
2642
- (collectionChange)="handleSingleSelectChange('pricelistRetail', $event)"
2643
2583
  >
2644
2584
  </co-filter-item>
2645
2585
  </div>
2646
2586
  <div class="filter-item-wrapper">
2647
2587
  <co-filter-item [placeholder]="'CATEGORY' | localize"
2648
2588
  [expanded]="true"
2649
- [singleSelect]="true"
2589
+ [(model)]="catalogSearchService.searchRequest.category"
2590
+ [mode]="modes.SingleSelectList"
2650
2591
  [collection]="categoryCollection"
2651
- (collectionChange)="handleSingleSelectChange('category', $event)"
2652
2592
  >
2653
2593
  </co-filter-item>
2654
2594
  </div>
@@ -2656,13 +2596,13 @@ CatalogFilterContentGeneralComponent.decorators = [
2656
2596
  <co-filter-item
2657
2597
  [placeholder]="filter.filterName"
2658
2598
  [collection]="filter.filterItems"
2599
+ [(model)]="catalogSearchService.searchRequest[filterService.getFilterItemMap(filter.filterName)]"
2659
2600
  [showLessLabel]="'Bekijk minder...'"
2660
2601
  [showMoreLabel]="'Bekijk meer...'"
2661
2602
  [searchPlaceholder]="'Zoeken...'"
2662
2603
  [expanded]=true
2663
- [initialLimit]=5
2664
- (collectionChange)="handleCollectionChange(filter.filterName, $event)"
2665
- ></co-filter-item>
2604
+ [initialLimit]=5
2605
+ ></co-filter-item> <!--(collectionChange)="handleCollectionChange(filter.filterName, $event)"-->
2666
2606
  </div>
2667
2607
  </div>
2668
2608
  </div>
@@ -2710,6 +2650,7 @@ class CatalogFilterContentPurchaseComponent {
2710
2650
  this._catalogConnectorService = _catalogConnectorService;
2711
2651
  this._adapterService = _adapterService;
2712
2652
  this.icons = IconEnum;
2653
+ this.modes = FilterItemMode$1;
2713
2654
  this._subs = [];
2714
2655
  }
2715
2656
  showClass() {
@@ -2747,12 +2688,6 @@ class CatalogFilterContentPurchaseComponent {
2747
2688
  this.priceListsPurchCollection = this.filterService.createFilterSelectionsCollection(tempPriceListsPurchCollection, "code", "description");
2748
2689
  });
2749
2690
  }
2750
- handleSeparateCollectionChange(filterName, collection) {
2751
- this.catalogSearchService.searchRequest[filterName] = this.catalogSearchService.createFilterString(collection, filterName);
2752
- }
2753
- handleSingleSelectChange(filterName, collection) {
2754
- this.catalogSearchService.searchRequest[filterName] = this.catalogSearchService.createSingleSelectString(collection);
2755
- }
2756
2691
  }
2757
2692
  CatalogFilterContentPurchaseComponent.decorators = [
2758
2693
  { type: Component, args: [{
@@ -2766,30 +2701,26 @@ CatalogFilterContentPurchaseComponent.decorators = [
2766
2701
  <co-filter-item [placeholder]="'SUPPLIER' | localize"
2767
2702
  [expanded]="true"
2768
2703
  [collection]="suppliers"
2769
- (collectionChange)="handleSeparateCollectionChange('rangeSupplierNr', $event)"
2704
+ [(model)]="catalogSearchService.searchRequest.rangeSupplierNr"
2770
2705
  >
2771
2706
  </co-filter-item>
2772
- </div>
2707
+ </div>
2773
2708
  <co-filter-item [placeholder]="'ARTICLE_NR_SUPPLIER' | localize"
2774
2709
  [expanded]="true"
2775
- [customContent]="true"
2776
- >
2777
- <co-input-text [placeholder]="'ARTICLE_NR_SUPPLIER' | localize" [(model)]="catalogSearchService.searchRequest.artNrSupplier"
2778
- noValidation></co-input-text>
2710
+ [mode]="modes.TextField"
2711
+ [(model)]="catalogSearchService.searchRequest.artNrSupplier">
2779
2712
  </co-filter-item>
2780
2713
  <co-filter-item [placeholder]="'REFERENCE' | localize"
2781
2714
  [expanded]="true"
2782
- [customContent]="true"
2783
- >
2784
- <co-input-text [placeholder]="'REFERENCE' | localize" [(model)]="catalogSearchService.searchRequest.simpleReference"
2785
- noValidation></co-input-text>
2786
- </co-filter-item>
2715
+ [mode]="modes.TextField"
2716
+ [(model)]="catalogSearchService.searchRequest.simpleReference">
2717
+ </co-filter-item>
2787
2718
  <div class="filter-item-wrapper">
2788
2719
  <co-filter-item [placeholder]="'PRICELIST_PURCHASE' | localize"
2789
2720
  [expanded]="true"
2790
2721
  [collection]="priceListsPurchCollection"
2791
- [singleSelect]="true"
2792
- (collectionChange)="handleSingleSelectChange('pricelistPurchase', $event)"
2722
+ [mode]="modes.SingleSelectList"
2723
+ [(model)]="catalogSearchService.searchRequest.pricelistPurchase"
2793
2724
  >
2794
2725
  </co-filter-item>
2795
2726
  </div>
@@ -2808,8 +2739,7 @@ CatalogFilterContentPurchaseComponent.ctorParameters = () => [
2808
2739
  { type: CatalogConnectorAdapterService }
2809
2740
  ];
2810
2741
  CatalogFilterContentPurchaseComponent.propDecorators = {
2811
- showClass: [{ type: HostBinding, args: ['class.co-catalog-filter',] }],
2812
- priceSlider: [{ type: ViewChild, args: [SliderComponent, { static: true },] }]
2742
+ showClass: [{ type: HostBinding, args: ['class.co-catalog-filter',] }]
2813
2743
  };
2814
2744
 
2815
2745
  class CatalogFilterContentPurchaseModule {
@@ -2837,6 +2767,7 @@ class CatalogFilterContentLogisticsComponent {
2837
2767
  constructor(catalogSearchService, iconCache) {
2838
2768
  this.catalogSearchService = catalogSearchService;
2839
2769
  this.iconCache = iconCache;
2770
+ this.modes = FilterItemMode$1;
2840
2771
  this.icons = IconEnum;
2841
2772
  }
2842
2773
  showClass() {
@@ -2845,7 +2776,7 @@ class CatalogFilterContentLogisticsComponent {
2845
2776
  ngOnInit() {
2846
2777
  }
2847
2778
  handleAllChanged(value) {
2848
- this.catalogSearchService.searchRequest["doSync"] = value ? 'J' : 'N';
2779
+ this.catalogSearchService.searchRequest["doSync"] = value ? "J" : "N";
2849
2780
  this.catalogSearchService.searchRequest["showRegularArticles"] = value;
2850
2781
  this.catalogSearchService.searchRequest["showConfiguredArticles"] = value;
2851
2782
  this.catalogSearchService.searchRequest["showConfigurableArticles"] = value;
@@ -2853,19 +2784,6 @@ class CatalogFilterContentLogisticsComponent {
2853
2784
  this.catalogSearchService.searchRequest["showCustomizedArticles"] = value;
2854
2785
  this.catalogSearchService.searchRequest["showInactiveArticles"] = value;
2855
2786
  }
2856
- handleCheckboxValueChangeForString(value, modelName) {
2857
- this.catalogSearchService.searchRequest[modelName] = this._getFilterRequestForBooleanToString(value);
2858
- }
2859
- _getFilterRequestForBooleanToString(value) {
2860
- let filterRequest = '';
2861
- if (value) {
2862
- filterRequest = "?='J'";
2863
- }
2864
- else {
2865
- filterRequest = "?='N'";
2866
- }
2867
- return filterRequest;
2868
- }
2869
2787
  }
2870
2788
  CatalogFilterContentLogisticsComponent.decorators = [
2871
2789
  { type: Component, args: [{
@@ -2879,30 +2797,22 @@ CatalogFilterContentLogisticsComponent.decorators = [
2879
2797
  <div class="filter-item-wrapper">
2880
2798
  <co-filter-item [placeholder]="'SERIALNUMBER' | localize"
2881
2799
  [expanded]="true"
2882
- [customContent]="true"
2883
- >
2884
- <co-input-text [placeholder]="'SERIALNUMBER' | localize" [(model)]="catalogSearchService.searchRequest.serialNumber"
2885
- noValidation></co-input-text>
2886
- </co-filter-item>
2800
+ [mode]="modes.TextField"
2801
+ [(model)]="catalogSearchService.searchRequest.serialNumber">
2802
+ </co-filter-item>
2887
2803
  </div>
2888
2804
  <div class="filter-item-wrapper">
2889
2805
  <co-filter-item [placeholder]="'BATCH_NUMBER' | localize"
2890
2806
  [expanded]="true"
2891
- [customContent]="true"
2892
- >
2893
- <co-input-text [placeholder]="'BATCH_NUMBER' | localize" [(model)]="catalogSearchService.searchRequest.batchNumber"
2894
- noValidation></co-input-text>
2807
+ [mode]="modes.TextField"
2808
+ [(model)]="catalogSearchService.searchRequest.batchNumber">
2895
2809
  </co-filter-item>
2896
- </div>
2897
- <div class="filter-item-wrapper">
2810
+ </div>
2811
+ <div class="filter-item-wrapper">
2898
2812
  <co-filter-item [placeholder]="'MUTATION_DATE' | localize"
2899
2813
  [expanded]="true"
2900
- [customContent]="true"
2901
- >
2902
- <co-input-date
2903
- [(model)]="catalogSearchService.searchRequest.dateModified"
2904
- (modelChange)="catalogSearchService.searchArticles()"
2905
- ></co-input-date>
2814
+ [mode]="modes.DateField"
2815
+ [(model)]="catalogSearchService.searchRequest.dateModified">
2906
2816
  </co-filter-item>
2907
2817
  </div>
2908
2818
 
@@ -2915,81 +2825,58 @@ CatalogFilterContentLogisticsComponent.decorators = [
2915
2825
  (modelChange)="this.handleAllChanged($event)"
2916
2826
  [label]="'ALL' | localize"></co-input-checkbox>
2917
2827
  </co-filter-item>
2918
- </div>
2828
+ </div>
2919
2829
  <div class="filter-item-wrapper">
2920
- <co-filter-item
2921
- [placeholder]="'AUTOMATICALLY_UPDATE'"
2922
- [expanded]="true"
2923
- [customContent]="true">
2924
- <co-input-checkbox
2925
- [model]="catalogSearchService.searchRequest.doSync === 'J'"
2926
- (modelChange)="this.handleCheckboxValueChangeForString($event, 'doSync')"
2927
- [label]="'AUTOMATICALLY_UPDATE' | localize"></co-input-checkbox>
2830
+ <co-filter-item [placeholder]="'AUTOMATICALLY_UPDATE'"
2831
+ [expanded]="true"
2832
+ [mode]="modes.CheckboxToText"
2833
+ [(model)]="catalogSearchService.searchRequest.doSync">
2928
2834
  </co-filter-item>
2929
2835
  </div>
2930
2836
  <div class="filter-item-wrapper">
2931
- <co-filter-item
2932
- [placeholder]="'SHOW_REGULAR_ARTICLES'"
2933
- [expanded]="true"
2934
- [customContent]="true">
2935
- <co-input-checkbox
2936
- [(model)]="catalogSearchService.searchRequest.showRegularArticles"
2937
- [label]="'SHOW_REGULAR_ARTICLES' | localize"></co-input-checkbox>
2837
+ <co-filter-item [placeholder]="'SHOW_REGULAR_ARTICLES'"
2838
+ [expanded]="true"
2839
+ [mode]="modes.Checkbox"
2840
+ [(model)]="catalogSearchService.searchRequest.showRegularArticles">
2938
2841
  </co-filter-item>
2939
2842
  </div>
2940
2843
  <div class="filter-item-wrapper">
2941
- <co-filter-item
2942
- [placeholder]="'SHOW_CONFIGURED_ARTICLES'"
2943
- [expanded]="true"
2944
- [customContent]="true">
2945
- <co-input-checkbox
2946
- [(model)]="catalogSearchService.searchRequest.showConfiguredArticles"
2947
- [label]="'SHOW_CONFIGURED_ARTICLES' | localize"></co-input-checkbox>
2844
+ <co-filter-item [placeholder]="'SHOW_CONFIGURED_ARTICLES'"
2845
+ [expanded]="true"
2846
+ [mode]="modes.Checkbox"
2847
+ [(model)]="catalogSearchService.searchRequest.showConfiguredArticles">
2948
2848
  </co-filter-item>
2949
2849
  </div>
2950
2850
  <div class="filter-item-wrapper">
2951
- <co-filter-item
2952
- [placeholder]="'BASE_ARTICLES'"
2953
- [expanded]="true"
2954
- [customContent]="true">
2955
- <co-input-checkbox
2956
- [(model)]="catalogSearchService.searchRequest.showConfigurableArticles"
2957
- [label]="'BASE_ARTICLES' | localize"></co-input-checkbox>
2851
+ <co-filter-item [placeholder]="'BASE_ARTICLES'"
2852
+ [expanded]="true"
2853
+ [mode]="modes.Checkbox"
2854
+ [(model)]="catalogSearchService.searchRequest.showConfigurableArticles">
2958
2855
  </co-filter-item>
2959
2856
  </div>
2960
2857
  <div class="filter-item-wrapper">
2961
- <co-filter-item
2962
- [placeholder]="'COMPOSITION_ARTICLES'"
2963
- [expanded]="true"
2964
- [customContent]="true">
2965
- <co-input-checkbox
2966
- [(model)]="catalogSearchService.searchRequest.showCompositionArticles"
2967
- [label]="'COMPOSITION_ARTICLES' | localize"></co-input-checkbox>
2858
+ <co-filter-item [placeholder]="'COMPOSITION_ARTICLES'"
2859
+ [expanded]="true"
2860
+ [mode]="modes.Checkbox"
2861
+ [(model)]="catalogSearchService.searchRequest.showCompositionArticles">
2968
2862
  </co-filter-item>
2969
2863
  </div>
2970
2864
  <div class="filter-item-wrapper">
2971
- <co-filter-item
2972
- [placeholder]="'SHOW_CUSTOMIZED_ARTICLES'"
2973
- [expanded]="true"
2974
- [customContent]="true">
2975
- <co-input-checkbox
2976
- [(model)]="catalogSearchService.searchRequest.showCustomizedArticles"
2977
- [label]="'SHOW_CUSTOMIZED_ARTICLES' | localize"></co-input-checkbox>
2865
+ <co-filter-item [placeholder]="'SHOW_CUSTOMIZED_ARTICLES'"
2866
+ [expanded]="true"
2867
+ [mode]="modes.Checkbox"
2868
+ [(model)]="catalogSearchService.searchRequest.showCustomizedArticles">
2978
2869
  </co-filter-item>
2979
2870
  </div>
2980
2871
  <div class="filter-item-wrapper">
2981
- <co-filter-item
2982
- [placeholder]="'SHOW_INACTIVE_ARTICLES'"
2983
- [expanded]="true"
2984
- [customContent]="true">
2985
- <co-input-checkbox
2986
- [(model)]="catalogSearchService.searchRequest.showInactiveArticles"
2987
- [label]="'SHOW_INACTIVE_ARTICLES' | localize"></co-input-checkbox>
2872
+ <co-filter-item [placeholder]="'SHOW_INACTIVE_ARTICLES'"
2873
+ [expanded]="true"
2874
+ [mode]="modes.Checkbox"
2875
+ [(model)]="catalogSearchService.searchRequest.showInactiveArticles">
2988
2876
  </co-filter-item>
2989
2877
  </div>
2990
2878
  </div>
2991
- </div>
2992
-
2879
+ </div>
2993
2880
  </div>
2994
2881
  `
2995
2882
  },] }
@@ -3041,7 +2928,12 @@ CatalogFilterModule.decorators = [
3041
2928
  CatalogFilterContentGeneralModule,
3042
2929
  CatalogFilterContentPurchaseModule,
3043
2930
  CatalogFilterContentLogisticsModule,
3044
- PipeModule
2931
+ PipeModule,
2932
+ ButtonModule,
2933
+ CoDialogModule,
2934
+ ListOfValuesModule,
2935
+ CheckboxSelectModule,
2936
+ CheckmarkOverlayModule
3045
2937
  ],
3046
2938
  declarations: [
3047
2939
  CatalogFilterComponent
@@ -3130,10 +3022,11 @@ CatalogEventService.decorators = [
3130
3022
  ];
3131
3023
 
3132
3024
  class CatalogNavigationComponent {
3133
- constructor(iconCache, catalogService, _appEventService) {
3025
+ constructor(iconCache, catalogService, _appEventService, _adapterService) {
3134
3026
  this.iconCache = iconCache;
3135
3027
  this.catalogService = catalogService;
3136
3028
  this._appEventService = _appEventService;
3029
+ this._adapterService = _adapterService;
3137
3030
  this.icons = IconEnum;
3138
3031
  this.homeLabel = 'Home';
3139
3032
  this.collectionLabel = 'Collection';
@@ -3150,6 +3043,7 @@ class CatalogNavigationComponent {
3150
3043
  this.turnoverGroups = [];
3151
3044
  this.showCollectionOverlay = false;
3152
3045
  this.showExternalOverlay = false;
3046
+ this._subs = [];
3153
3047
  }
3154
3048
  get internalList() {
3155
3049
  let list = [];
@@ -3172,7 +3066,14 @@ class CatalogNavigationComponent {
3172
3066
  ngOnInit() {
3173
3067
  this.categories.length = 0;
3174
3068
  this.turnoverGroups.length = 0;
3175
- this.getCategories();
3069
+ this._subs.push(this._adapterService.controllerInitialized.subscribe((initialized) => {
3070
+ if (initialized) {
3071
+ this.getCategories();
3072
+ }
3073
+ }));
3074
+ }
3075
+ ngOnDestroy() {
3076
+ this._subs.forEach(s => s.unsubscribe());
3176
3077
  }
3177
3078
  getCategories() {
3178
3079
  return __awaiter(this, void 0, void 0, function* () {
@@ -3275,7 +3176,8 @@ CatalogNavigationComponent.decorators = [
3275
3176
  <co-icon class="hamburger-icon" [iconData]="iconCache.getIcon(icons.Hamburger)"></co-icon>
3276
3177
  <span [textContent]="collectionLabel"></span>
3277
3178
  <div class="navigation-overlay-wrapper" *ngIf="showCollectionOverlay" @showHideOverlay
3278
- [overlay]="collectionParentForOverlay"
3179
+ [overlay]="collectionParentForOverlay"
3180
+ [inline]="true"
3279
3181
  [keepInView]="true"
3280
3182
  [view]="view"
3281
3183
  [fullSize]="true">
@@ -3295,6 +3197,7 @@ CatalogNavigationComponent.decorators = [
3295
3197
  <span [textContent]="externalSourcesLabel"></span>
3296
3198
  <div class="navigation-overlay-wrapper" *ngIf="showExternalOverlay" @showHideOverlay
3297
3199
  [overlay]="externalParentForOverlay"
3200
+ [inline]="true"
3298
3201
  [keepInView]="true"
3299
3202
  [view]="view"
3300
3203
  [fullSize]="true">
@@ -3319,7 +3222,8 @@ CatalogNavigationComponent.decorators = [
3319
3222
  CatalogNavigationComponent.ctorParameters = () => [
3320
3223
  { type: IconCacheService },
3321
3224
  { type: CatalogService },
3322
- { type: CatalogEventService }
3225
+ { type: CatalogEventService },
3226
+ { type: CatalogConnectorAdapterService }
3323
3227
  ];
3324
3228
  CatalogNavigationComponent.propDecorators = {
3325
3229
  homeLabel: [{ type: Input }],
@@ -3568,11 +3472,15 @@ class CatalogSearchComponent {
3568
3472
  handleResetButtonClick(event) {
3569
3473
  this._catalogSearchService.resetFilters();
3570
3474
  }
3475
+ handleGetTransactionClick() {
3476
+ this._catalogService.getWebTransaction();
3477
+ }
3571
3478
  }
3572
3479
  CatalogSearchComponent.decorators = [
3573
3480
  { type: Component, args: [{
3574
3481
  selector: 'co-catalog-search',
3575
3482
  template: `
3483
+ <button (click)="handleGetTransactionClick()">get transaction</button>
3576
3484
  <div class="catalog-search-wrapper">
3577
3485
  <ng-container *ngIf="showFilter">
3578
3486
  <div class="filter-content" @showHideFilter>