@colijnit/catalog 255.1.9 → 255.1.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/colijnit-catalog.umd.js +150 -29
- package/bundles/colijnit-catalog.umd.js.map +1 -1
- package/colijnit-catalog-255.1.11.tgz +0 -0
- package/colijnit-catalog.metadata.json +1 -1
- package/esm2015/lib/catalog-version.js +3 -3
- package/esm2015/lib/component/catalog-external-source/catalog-external-source.component.js +33 -15
- package/esm2015/lib/component/catalog-filter-content/catalog-filter-content-general/catalog-filter-content-general.component.js +37 -50
- package/esm2015/lib/component/catalog-filter-content/catalog-filter-content-general/catalog-filter-content-general.module.js +4 -3
- package/esm2015/lib/component/catalog-filter-content/catalog-filter-content-logistics/catalog-filter-content-logistics.component.js +27 -1
- package/esm2015/lib/component/catalog-filter-content/catalog-filter-content-purchase/catalog-filter-content-purchase.component.js +8 -2
- package/esm2015/lib/component/catalog-filter-item/catalog-filter-item.component.js +10 -3
- package/esm2015/lib/component/catalog-filter-item/catalog-filter-item.module.js +3 -2
- package/esm2015/lib/component/catalog-search/catalog-search.component.js +39 -6
- package/esm2015/lib/enum/config-name.enum.js +36 -0
- package/esm2015/lib/service/catalog-filter.service.js +21 -4
- package/fesm2015/colijnit-catalog.js +202 -76
- package/fesm2015/colijnit-catalog.js.map +1 -1
- package/lib/component/catalog-external-source/catalog-external-source.component.d.ts +1 -0
- package/lib/component/catalog-filter-content/catalog-filter-content-general/catalog-filter-content-general.component.d.ts +2 -0
- package/lib/component/catalog-filter-content/catalog-filter-content-logistics/catalog-filter-content-logistics.component.d.ts +2 -0
- package/lib/component/catalog-filter-content/catalog-filter-content-purchase/catalog-filter-content-purchase.component.d.ts +2 -0
- package/lib/component/catalog-filter-item/catalog-filter-item.component.d.ts +1 -0
- package/lib/component/catalog-search/catalog-search.component.d.ts +3 -1
- package/lib/enum/config-name.enum.d.ts +34 -0
- package/lib/service/catalog-filter.service.d.ts +2 -0
- package/package.json +2 -2
- package/colijnit-catalog-255.1.8.tgz +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Injectable, EventEmitter, Component, ViewEncapsulation, Input, Output, HostBinding, ChangeDetectorRef, ViewChild, ElementRef, Pipe, NgModule, Host, Directive, HostListener, ViewChildren } from '@angular/core';
|
|
2
|
+
import { Injectable, EventEmitter, Component, ViewEncapsulation, Input, Output, HostBinding, ChangeDetectorRef, ViewChild, ElementRef, Pipe, NgModule, forwardRef, Host, Directive, HostListener, ViewChildren } from '@angular/core';
|
|
3
3
|
import { CommonModule } from '@angular/common';
|
|
4
4
|
import { __awaiter, __decorate } from 'tslib';
|
|
5
5
|
import { Subject, BehaviorSubject, Observable } from 'rxjs';
|
|
@@ -35,7 +35,7 @@ import { TransactionInfoResponse } from '@colijnit/transactionapi/build/model/tr
|
|
|
35
35
|
import { DateField } from '@colijnit/ioneconnector/build/factory/decorators/date-field.decorator';
|
|
36
36
|
import { ObjectUtils } from '@colijnit/ioneconnector/build/utils/object-utils';
|
|
37
37
|
import { FileUtils } from '@colijnit/ioneconnector/build/utils/file-utils';
|
|
38
|
-
import { FilterViewmodel, FilterItemViewmodel, FilterItemModule, InputTextModule, ButtonModule, IconModule, FilterItemMode as FilterItemMode$1, InputDatePickerModule, IconCollapseHandleModule, CoDialogModule, ListOfValuesModule, CheckmarkOverlayModule, ImageModule, OverlayModule, OverlayService, InputSearchModule, PaginationBarModule, SimpleGridModule } from '@colijnit/corecomponents_v12';
|
|
38
|
+
import { FilterViewmodel, FilterItemViewmodel, SCREEN_CONFIG_ADAPTER_COMPONENT_INTERFACE_NAME, FilterItemModule, ScreenConfigurationModule, InputTextModule, ButtonModule, IconModule, FilterItemMode as FilterItemMode$1, InputDatePickerModule, IconCollapseHandleModule, CoDialogModule, ListOfValuesModule, CheckmarkOverlayModule, ImageModule, OverlayModule, OverlayService, BaseModuleScreenConfigService, InputSearchModule, PaginationBarModule, SimpleGridModule } from '@colijnit/corecomponents_v12';
|
|
39
39
|
import { PagingParameters } from '@colijnit/ioneconnector/build/model/paging-parameters';
|
|
40
40
|
import { trigger, state, style, transition, animate } from '@angular/animations';
|
|
41
41
|
import * as i1 from '@angular/platform-browser';
|
|
@@ -53,8 +53,8 @@ class Version {
|
|
|
53
53
|
constructor() {
|
|
54
54
|
this.name = "@colijnit/catalog";
|
|
55
55
|
this.description = "iOne Catalog module based on Angular 12";
|
|
56
|
-
this.symVer = "255.1.
|
|
57
|
-
this.publishDate = "
|
|
56
|
+
this.symVer = "255.1.11";
|
|
57
|
+
this.publishDate = "30-10-2024 10:28:55";
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
60
|
|
|
@@ -1819,8 +1819,6 @@ class CatalogFilterViewmodel extends FilterViewmodel {
|
|
|
1819
1819
|
}
|
|
1820
1820
|
|
|
1821
1821
|
class CatalogFilterService {
|
|
1822
|
-
//TODO reinitialize once screenconfig is implemented
|
|
1823
|
-
//['Catalog', 'rangeCatalog'],
|
|
1824
1822
|
constructor(_iOneController) {
|
|
1825
1823
|
this._iOneController = _iOneController;
|
|
1826
1824
|
this.priceMinFilter = 0;
|
|
@@ -1844,7 +1842,23 @@ class CatalogFilterService {
|
|
|
1844
1842
|
['Material', 'rangeMaterial'],
|
|
1845
1843
|
['Tag', 'tagRange'],
|
|
1846
1844
|
['Turnover group', 'rangeTurnoverGroup'],
|
|
1847
|
-
['Brand', 'rangeBrand']
|
|
1845
|
+
['Brand', 'rangeBrand'],
|
|
1846
|
+
['Catalog', 'rangeCatalog']
|
|
1847
|
+
]);
|
|
1848
|
+
//TODO reinitialize once screenconfig is implemented
|
|
1849
|
+
//['Catalog', 'rangeCatalog'],
|
|
1850
|
+
this.filterItemConfigMap = new Map([
|
|
1851
|
+
['Product group', 'articleGroupFilter'],
|
|
1852
|
+
['Atmosphere', 'sphereCodeFilter'],
|
|
1853
|
+
['Colour', 'colorCodesFilter'],
|
|
1854
|
+
['Concept', 'conceptFilter'],
|
|
1855
|
+
['Design', 'designCodeFilter'],
|
|
1856
|
+
['Main article', 'superArticleFilter'],
|
|
1857
|
+
['Material', 'materialFilter'],
|
|
1858
|
+
['Tag', 'tagFilter'],
|
|
1859
|
+
['Turnover group', 'turnoverGroupFilter'],
|
|
1860
|
+
['Brand', 'brandFilter'],
|
|
1861
|
+
['Catalog', 'catalogFilter']
|
|
1848
1862
|
]);
|
|
1849
1863
|
}
|
|
1850
1864
|
getFilters(filters) {
|
|
@@ -1926,6 +1940,9 @@ class CatalogFilterService {
|
|
|
1926
1940
|
getFilterItemMap(key) {
|
|
1927
1941
|
return this.filterItemMap.get(key);
|
|
1928
1942
|
}
|
|
1943
|
+
getFilterItemConfigMap(key) {
|
|
1944
|
+
return this.filterItemConfigMap.get(key);
|
|
1945
|
+
}
|
|
1929
1946
|
createFilterSelectionsCollection(collection, id, description) {
|
|
1930
1947
|
let returnCollection = [];
|
|
1931
1948
|
if (collection && Array.isArray(collection)) {
|
|
@@ -2734,6 +2751,42 @@ CatalogFilterCategoriesModule.decorators = [
|
|
|
2734
2751
|
},] }
|
|
2735
2752
|
];
|
|
2736
2753
|
|
|
2754
|
+
var ConfigNameEnum;
|
|
2755
|
+
(function (ConfigNameEnum) {
|
|
2756
|
+
ConfigNameEnum["PurchaseHeader"] = "purchaseHeader";
|
|
2757
|
+
ConfigNameEnum["LogisticsHeader"] = "logisticsHeader";
|
|
2758
|
+
ConfigNameEnum["ArticleNumberFilter"] = "articleNumberFilter";
|
|
2759
|
+
ConfigNameEnum["BarcodeFilter"] = "barcodeFilter";
|
|
2760
|
+
ConfigNameEnum["PriceFilter"] = "priceFilter";
|
|
2761
|
+
ConfigNameEnum["LengthFilter"] = "lengthFilter";
|
|
2762
|
+
ConfigNameEnum["WidthFilter"] = "widthFilter";
|
|
2763
|
+
ConfigNameEnum["HeightFilter"] = "heightFilter";
|
|
2764
|
+
ConfigNameEnum["DepthFilter"] = "depthFilter";
|
|
2765
|
+
ConfigNameEnum["ArticleTypeFilter"] = "articleTypeFilter";
|
|
2766
|
+
ConfigNameEnum["ColorFilter"] = "colorFilter";
|
|
2767
|
+
ConfigNameEnum["DeliveryDateFilter"] = "deliveryDateFilter";
|
|
2768
|
+
ConfigNameEnum["RetailFormulaFilter"] = "retailFormulaFilter";
|
|
2769
|
+
ConfigNameEnum["InOutFilter"] = "inOutFilter";
|
|
2770
|
+
ConfigNameEnum["PublishFilter"] = "publishFilter";
|
|
2771
|
+
ConfigNameEnum["SellViaFilter"] = "sellViaFilter";
|
|
2772
|
+
ConfigNameEnum["CategoryFilter"] = "categoryFilter";
|
|
2773
|
+
ConfigNameEnum["SupplierFilter"] = "supplierFilter";
|
|
2774
|
+
ConfigNameEnum["ArtNrSupplierFilter"] = "artNrSupplierFilter";
|
|
2775
|
+
ConfigNameEnum["ReferenceFilter"] = "referenceFilter";
|
|
2776
|
+
ConfigNameEnum["PricelistPurchaseFilter"] = "pricelistPurchaseFilter";
|
|
2777
|
+
ConfigNameEnum["SerialNumberFilter"] = "serialNumberFilter";
|
|
2778
|
+
ConfigNameEnum["BatchNumberFilter"] = "batchNumberFilter";
|
|
2779
|
+
ConfigNameEnum["DateModifiedFilter"] = "dateModifiedFilter";
|
|
2780
|
+
ConfigNameEnum["UpdateDateFilter"] = "updateDateFilter";
|
|
2781
|
+
ConfigNameEnum["StockMutationFilter"] = "stockMutationFilter";
|
|
2782
|
+
ConfigNameEnum["WarehouseFilter"] = "warehouseFilter";
|
|
2783
|
+
ConfigNameEnum["StockStateFilter"] = "stockStateFilter";
|
|
2784
|
+
ConfigNameEnum["SourceWarehouseFilter"] = "sourceWarehouseFilter";
|
|
2785
|
+
ConfigNameEnum["TargetWarehouseFilter"] = "targetWarehouseFilter";
|
|
2786
|
+
ConfigNameEnum["PricelistSalesFilter"] = "pricelistSalesFilter";
|
|
2787
|
+
ConfigNameEnum["ArticleKindFilter"] = "ArticleKindFilter";
|
|
2788
|
+
})(ConfigNameEnum || (ConfigNameEnum = {}));
|
|
2789
|
+
|
|
2737
2790
|
class CatalogFilterContentGeneralComponent {
|
|
2738
2791
|
constructor(catalogSearchService, filterService, iconCache, _catalogConnectorService, _adapterService) {
|
|
2739
2792
|
this.catalogSearchService = catalogSearchService;
|
|
@@ -2742,6 +2795,7 @@ class CatalogFilterContentGeneralComponent {
|
|
|
2742
2795
|
this._catalogConnectorService = _catalogConnectorService;
|
|
2743
2796
|
this._adapterService = _adapterService;
|
|
2744
2797
|
this.icons = IconEnum;
|
|
2798
|
+
this.cfgName = ConfigNameEnum;
|
|
2745
2799
|
this.modes = FilterItemMode;
|
|
2746
2800
|
this._subs = [];
|
|
2747
2801
|
}
|
|
@@ -2846,6 +2900,7 @@ CatalogFilterContentGeneralComponent.decorators = [
|
|
|
2846
2900
|
[mode]="modes.TextField"
|
|
2847
2901
|
[(model)]="catalogSearchService.searchRequest.articleNumber"
|
|
2848
2902
|
[expanded]="false"
|
|
2903
|
+
[screenConfigurationObjectName]="cfgName.ArticleNumberFilter"
|
|
2849
2904
|
>
|
|
2850
2905
|
</co-catalog-filter-item>
|
|
2851
2906
|
</div>
|
|
@@ -2854,6 +2909,7 @@ CatalogFilterContentGeneralComponent.decorators = [
|
|
|
2854
2909
|
[mode]="modes.TextField"
|
|
2855
2910
|
[(model)]="catalogSearchService.searchRequest.barcode"
|
|
2856
2911
|
[expanded]="false"
|
|
2912
|
+
[screenConfigurationObjectName]="cfgName.BarcodeFilter"
|
|
2857
2913
|
>
|
|
2858
2914
|
</co-catalog-filter-item>
|
|
2859
2915
|
</div>
|
|
@@ -2864,6 +2920,7 @@ CatalogFilterContentGeneralComponent.decorators = [
|
|
|
2864
2920
|
[sliderDefaultMax]=100000
|
|
2865
2921
|
[(model)]="catalogSearchService.searchRequest.rangePrice"
|
|
2866
2922
|
[expanded]="false"
|
|
2923
|
+
[screenConfigurationObjectName]="cfgName.PriceFilter"
|
|
2867
2924
|
>
|
|
2868
2925
|
</co-catalog-filter-item>
|
|
2869
2926
|
</div>
|
|
@@ -2874,6 +2931,7 @@ CatalogFilterContentGeneralComponent.decorators = [
|
|
|
2874
2931
|
[sliderDefaultMax]=5000
|
|
2875
2932
|
[(model)]="catalogSearchService.searchRequest.length"
|
|
2876
2933
|
[expanded]="false"
|
|
2934
|
+
[screenConfigurationObjectName]="cfgName.LengthFilter"
|
|
2877
2935
|
>
|
|
2878
2936
|
</co-catalog-filter-item>
|
|
2879
2937
|
</div>
|
|
@@ -2883,7 +2941,8 @@ CatalogFilterContentGeneralComponent.decorators = [
|
|
|
2883
2941
|
[sliderDefaultMin]=0
|
|
2884
2942
|
[sliderDefaultMax]=5000
|
|
2885
2943
|
[(model)]="catalogSearchService.searchRequest.width"
|
|
2886
|
-
[expanded]="false"
|
|
2944
|
+
[expanded]="false"
|
|
2945
|
+
[screenConfigurationObjectName]="cfgName.WidthFilter"
|
|
2887
2946
|
>
|
|
2888
2947
|
</co-catalog-filter-item>
|
|
2889
2948
|
</div>
|
|
@@ -2893,7 +2952,8 @@ CatalogFilterContentGeneralComponent.decorators = [
|
|
|
2893
2952
|
[sliderDefaultMin]=0
|
|
2894
2953
|
[sliderDefaultMax]=5000
|
|
2895
2954
|
[(model)]="catalogSearchService.searchRequest.height"
|
|
2896
|
-
[expanded]="false"
|
|
2955
|
+
[expanded]="false"
|
|
2956
|
+
[screenConfigurationObjectName]="cfgName.HeightFilter"
|
|
2897
2957
|
>
|
|
2898
2958
|
</co-catalog-filter-item>
|
|
2899
2959
|
</div>
|
|
@@ -2903,14 +2963,16 @@ CatalogFilterContentGeneralComponent.decorators = [
|
|
|
2903
2963
|
[sliderDefaultMin]=0
|
|
2904
2964
|
[sliderDefaultMax]=5000
|
|
2905
2965
|
[(model)]="catalogSearchService.searchRequest.depth"
|
|
2906
|
-
[expanded]="false"
|
|
2966
|
+
[expanded]="false"
|
|
2967
|
+
[screenConfigurationObjectName]="cfgName.DepthFilter"
|
|
2907
2968
|
>
|
|
2908
2969
|
</co-catalog-filter-item>
|
|
2909
2970
|
</div>
|
|
2910
2971
|
<div class="filter-item-wrapper">
|
|
2911
2972
|
<co-catalog-filter-item
|
|
2912
2973
|
[placeholder]="'ARTICLE_TYPE'"
|
|
2913
|
-
[customContent]="true"
|
|
2974
|
+
[customContent]="true"
|
|
2975
|
+
[screenConfigurationObjectName]="cfgName.ArticleTypeFilter">
|
|
2914
2976
|
<co-input-checkbox
|
|
2915
2977
|
(modelChange)="this.handleAllChanged($event)"
|
|
2916
2978
|
[label]="'ALL'"></co-input-checkbox>
|
|
@@ -2941,6 +3003,7 @@ CatalogFilterContentGeneralComponent.decorators = [
|
|
|
2941
3003
|
[mode]="modes.SelectListWithStringCollectionOutput"
|
|
2942
3004
|
[collection]="colorCollection"
|
|
2943
3005
|
[expanded]="false"
|
|
3006
|
+
[screenConfigurationObjectName]="cfgName.ColorFilter"
|
|
2944
3007
|
>
|
|
2945
3008
|
</co-catalog-filter-item>
|
|
2946
3009
|
</div>
|
|
@@ -2949,51 +3012,17 @@ CatalogFilterContentGeneralComponent.decorators = [
|
|
|
2949
3012
|
[(model)]="catalogSearchService.searchRequest.latestDeliveryDate"
|
|
2950
3013
|
[mode]="modes.DateField"
|
|
2951
3014
|
[expanded]="false"
|
|
3015
|
+
[screenConfigurationObjectName]="cfgName.DeliveryDateFilter"
|
|
2952
3016
|
>
|
|
2953
3017
|
</co-catalog-filter-item>
|
|
2954
3018
|
</div>
|
|
2955
3019
|
|
|
2956
|
-
<!--TODO reinitialize once screenconfig is implemented-->
|
|
2957
|
-
<!--<div class="filter-item-wrapper">
|
|
2958
|
-
<co-catalog-filter-item
|
|
2959
|
-
[placeholder]="'ARTICLE_TYPE'"
|
|
2960
|
-
[customContent]="true">
|
|
2961
|
-
<co-input-checkbox
|
|
2962
|
-
(modelChange)="this.handleAllChanged($event)"
|
|
2963
|
-
[label]="'ALL'"></co-input-checkbox>
|
|
2964
|
-
<co-input-checkbox
|
|
2965
|
-
[label]="'SHOW_REGULAR_ARTICLES' | localize"
|
|
2966
|
-
[(model)]="catalogSearchService.searchRequest.showRegularArticles"></co-input-checkbox>
|
|
2967
|
-
<co-input-checkbox
|
|
2968
|
-
[label]="'SHOW_CONFIGURED_ARTICLES' | localize"
|
|
2969
|
-
[(model)]="catalogSearchService.searchRequest.showConfiguredArticles"></co-input-checkbox>
|
|
2970
|
-
<co-input-checkbox
|
|
2971
|
-
[label]="'BASE_ARTICLES' | localize"
|
|
2972
|
-
[(model)]="catalogSearchService.searchRequest.showConfigurableArticles"></co-input-checkbox>
|
|
2973
|
-
<co-input-checkbox
|
|
2974
|
-
[label]="'COMPOSITION_ARTICLES' | localize"
|
|
2975
|
-
[(model)]="catalogSearchService.searchRequest.showCompositionArticles"></co-input-checkbox>
|
|
2976
|
-
<co-input-checkbox
|
|
2977
|
-
[label]="'SHOW_CUSTOMIZED_ARTICLES' | localize"
|
|
2978
|
-
[(model)]="catalogSearchService.searchRequest.showCustomizedArticles"></co-input-checkbox>
|
|
2979
|
-
<co-input-checkbox
|
|
2980
|
-
[label]="'SHOW_INACTIVE_ARTICLES' | localize"
|
|
2981
|
-
[(model)]="catalogSearchService.searchRequest.showInactiveArticles"></co-input-checkbox>
|
|
2982
|
-
</co-catalog-filter-item>
|
|
2983
|
-
</div>
|
|
2984
|
-
<div class="filter-item-wrapper">
|
|
2985
|
-
<co-catalog-filter-item [placeholder]="'AUTOMATICALLY_UPDATE'"
|
|
2986
|
-
[collection]="doSyncCollection"
|
|
2987
|
-
[mode]="modes.Filterlist"
|
|
2988
|
-
[(model)]="catalogSearchService.searchRequest.doSync"
|
|
2989
|
-
>
|
|
2990
|
-
</co-catalog-filter-item>
|
|
2991
|
-
</div> -->
|
|
2992
3020
|
<div class="filter-item-wrapper">
|
|
2993
3021
|
<co-catalog-filter-item [placeholder]="'RETAIL_FORMULA'"
|
|
2994
3022
|
[collection]="storeGroupCollection"
|
|
2995
3023
|
[mode]="modes.Filterlist"
|
|
2996
3024
|
[(model)]="catalogSearchService.searchRequest.rangeStoreGroup"
|
|
3025
|
+
[screenConfigurationObjectName]="cfgName.RetailFormulaFilter"
|
|
2997
3026
|
>
|
|
2998
3027
|
</co-catalog-filter-item>
|
|
2999
3028
|
</div>
|
|
@@ -3002,23 +3031,25 @@ CatalogFilterContentGeneralComponent.decorators = [
|
|
|
3002
3031
|
[collection]="inOutCollectionCollection"
|
|
3003
3032
|
[mode]="modes.Filterlist"
|
|
3004
3033
|
[(model)]="catalogSearchService.searchRequest.collection"
|
|
3034
|
+
[screenConfigurationObjectName]="cfgName.InOutFilter"
|
|
3005
3035
|
>
|
|
3006
3036
|
</co-catalog-filter-item>
|
|
3007
3037
|
</div>
|
|
3008
|
-
|
|
3009
|
-
|
|
3010
|
-
<co-catalog-filter-item [placeholder]="'ARTICLE_TYPE'"
|
|
3038
|
+
<div class="filter-item-wrapper">
|
|
3039
|
+
<co-catalog-filter-item [placeholder]="'ARTICLE_KIND'"
|
|
3011
3040
|
[collection]="articleTypeCollection"
|
|
3012
3041
|
[mode]="modes.SelectListWithStringCollectionOutput"
|
|
3013
3042
|
[(model)]="catalogSearchService.searchRequest.articleKindList"
|
|
3043
|
+
[screenConfigurationObjectName]="cfgName.ArticleKindFilter"
|
|
3014
3044
|
>
|
|
3015
3045
|
</co-catalog-filter-item>
|
|
3016
|
-
</div
|
|
3046
|
+
</div>
|
|
3017
3047
|
<div class="filter-item-wrapper">
|
|
3018
3048
|
<co-catalog-filter-item [placeholder]="'PUBLISH_VIA'"
|
|
3019
3049
|
[collection]="artPublicationCollection"
|
|
3020
3050
|
[(model)]="catalogSearchService.searchRequest.publicationCode"
|
|
3021
3051
|
[mode]="modes.SelectListWithNumberOutput"
|
|
3052
|
+
[screenConfigurationObjectName]="cfgName.PublishFilter"
|
|
3022
3053
|
[expanded]="false"
|
|
3023
3054
|
>
|
|
3024
3055
|
</co-catalog-filter-item>
|
|
@@ -3029,23 +3060,25 @@ CatalogFilterContentGeneralComponent.decorators = [
|
|
|
3029
3060
|
[(model)]="catalogSearchService.searchRequest.publicationWebshopSales"
|
|
3030
3061
|
[mode]="modes.SelectListWithNumberOutput"
|
|
3031
3062
|
[expanded]="false"
|
|
3063
|
+
[screenConfigurationObjectName]="cfgName.SellViaFilter"
|
|
3032
3064
|
>
|
|
3033
3065
|
</co-catalog-filter-item>
|
|
3034
3066
|
</div>
|
|
3035
|
-
|
|
3036
|
-
<!--<div class="filter-item-wrapper">
|
|
3067
|
+
<div class="filter-item-wrapper">
|
|
3037
3068
|
<co-catalog-filter-item [placeholder]="'PRICELIST_SALES'"
|
|
3038
3069
|
[(model)]="catalogSearchService.searchRequest.pricelistRetail"
|
|
3039
3070
|
[mode]="modes.SingleSelectList"
|
|
3040
3071
|
[collection]="priceListsSalesCollection"
|
|
3072
|
+
[screenConfigurationObjectName]="cfgName.PricelistSalesFilter"
|
|
3041
3073
|
>
|
|
3042
3074
|
</co-catalog-filter-item>
|
|
3043
|
-
</div
|
|
3075
|
+
</div>
|
|
3044
3076
|
<div class="filter-item-wrapper">
|
|
3045
3077
|
<co-catalog-filter-item [placeholder]="'CATEGORY'"
|
|
3046
3078
|
[(model)]="catalogSearchService.searchRequest.category"
|
|
3047
3079
|
[mode]="modes.Filterlist"
|
|
3048
3080
|
[collection]="categoryCollection"
|
|
3081
|
+
[screenConfigurationObjectName]="cfgName.CategoryFilter"
|
|
3049
3082
|
>
|
|
3050
3083
|
</co-catalog-filter-item>
|
|
3051
3084
|
</div>
|
|
@@ -3053,6 +3086,7 @@ CatalogFilterContentGeneralComponent.decorators = [
|
|
|
3053
3086
|
<co-catalog-filter-item
|
|
3054
3087
|
[placeholder]="filter.filterName"
|
|
3055
3088
|
[collection]="filter.filterItems"
|
|
3089
|
+
[screenConfigurationObjectName]="filterService.getFilterItemConfigMap(filter.filterName)"
|
|
3056
3090
|
[(model)]="catalogSearchService.searchRequest[filterService.getFilterItemMap(filter.filterName)]"
|
|
3057
3091
|
[mode]="modes.Filterlist"
|
|
3058
3092
|
[initialLimit]=5
|
|
@@ -3061,7 +3095,11 @@ CatalogFilterContentGeneralComponent.decorators = [
|
|
|
3061
3095
|
</div>
|
|
3062
3096
|
</div>
|
|
3063
3097
|
</div>
|
|
3064
|
-
|
|
3098
|
+
`,
|
|
3099
|
+
providers: [{
|
|
3100
|
+
provide: SCREEN_CONFIG_ADAPTER_COMPONENT_INTERFACE_NAME,
|
|
3101
|
+
useExisting: forwardRef(() => CatalogFilterContentGeneralComponent)
|
|
3102
|
+
}]
|
|
3065
3103
|
},] }
|
|
3066
3104
|
];
|
|
3067
3105
|
CatalogFilterContentGeneralComponent.ctorParameters = () => [
|
|
@@ -3126,10 +3164,15 @@ CatalogFilterItemComponent.decorators = [
|
|
|
3126
3164
|
(collectionChange)="collectionChange.emit($event)"
|
|
3127
3165
|
(modelChange)="modelChange.emit($event)"
|
|
3128
3166
|
(filterButtonClicked)="onFilterButtonClicked()"
|
|
3167
|
+
[screenConfigurationObject]="screenConfigurationObjectName"
|
|
3129
3168
|
>
|
|
3130
3169
|
<ng-content></ng-content>
|
|
3131
3170
|
</co-filter-item>
|
|
3132
3171
|
`,
|
|
3172
|
+
providers: [{
|
|
3173
|
+
provide: SCREEN_CONFIG_ADAPTER_COMPONENT_INTERFACE_NAME,
|
|
3174
|
+
useExisting: forwardRef(() => CatalogFilterItemComponent)
|
|
3175
|
+
}],
|
|
3133
3176
|
encapsulation: ViewEncapsulation.None
|
|
3134
3177
|
},] }
|
|
3135
3178
|
];
|
|
@@ -3151,7 +3194,8 @@ CatalogFilterItemComponent.propDecorators = {
|
|
|
3151
3194
|
searchCollectionPlaceholder: [{ type: Input }],
|
|
3152
3195
|
collectionLoadFn: [{ type: Input }],
|
|
3153
3196
|
modelChange: [{ type: Output }],
|
|
3154
|
-
collectionChange: [{ type: Output }]
|
|
3197
|
+
collectionChange: [{ type: Output }],
|
|
3198
|
+
screenConfigurationObjectName: [{ type: Input }]
|
|
3155
3199
|
};
|
|
3156
3200
|
|
|
3157
3201
|
class CatalogFilterItemModule {
|
|
@@ -3162,6 +3206,7 @@ CatalogFilterItemModule.decorators = [
|
|
|
3162
3206
|
CommonModule,
|
|
3163
3207
|
FilterItemModule,
|
|
3164
3208
|
PipeModule,
|
|
3209
|
+
ScreenConfigurationModule,
|
|
3165
3210
|
],
|
|
3166
3211
|
declarations: [
|
|
3167
3212
|
CatalogFilterItemComponent
|
|
@@ -3184,7 +3229,8 @@ CatalogFilterContentGeneralModule.decorators = [
|
|
|
3184
3229
|
IconModule,
|
|
3185
3230
|
PipeModule,
|
|
3186
3231
|
InputCheckboxModule,
|
|
3187
|
-
CatalogFilterItemModule
|
|
3232
|
+
CatalogFilterItemModule,
|
|
3233
|
+
ScreenConfigurationModule
|
|
3188
3234
|
],
|
|
3189
3235
|
declarations: [
|
|
3190
3236
|
CatalogFilterContentGeneralComponent
|
|
@@ -3203,6 +3249,7 @@ class CatalogFilterContentPurchaseComponent {
|
|
|
3203
3249
|
this._catalogConnectorService = _catalogConnectorService;
|
|
3204
3250
|
this._adapterService = _adapterService;
|
|
3205
3251
|
this.icons = IconEnum;
|
|
3252
|
+
this.cfgName = ConfigNameEnum;
|
|
3206
3253
|
this.modes = FilterItemMode$1;
|
|
3207
3254
|
this._subs = [];
|
|
3208
3255
|
}
|
|
@@ -3253,22 +3300,26 @@ CatalogFilterContentPurchaseComponent.decorators = [
|
|
|
3253
3300
|
<div class="filter-item-wrapper">
|
|
3254
3301
|
<co-catalog-filter-item [placeholder]="'SUPPLIER'"
|
|
3255
3302
|
[collection]="suppliers"
|
|
3303
|
+
[screenConfigurationObjectName]="cfgName.SupplierFilter"
|
|
3256
3304
|
[(model)]="catalogSearchService.searchRequest.rangeSupplierNr"
|
|
3257
3305
|
>
|
|
3258
3306
|
</co-catalog-filter-item>
|
|
3259
3307
|
</div>
|
|
3260
3308
|
<co-catalog-filter-item [placeholder]="'ARTICLE_NR_SUPPLIER'"
|
|
3261
3309
|
[mode]="modes.TextField"
|
|
3310
|
+
[screenConfigurationObjectName]="cfgName.ArtNrSupplierFilter"
|
|
3262
3311
|
[(model)]="catalogSearchService.searchRequest.artNrSupplier">
|
|
3263
3312
|
</co-catalog-filter-item>
|
|
3264
3313
|
<co-catalog-filter-item [placeholder]="'REFERENCE'"
|
|
3265
|
-
[mode]="modes.TextField"
|
|
3314
|
+
[mode]="modes.TextField"
|
|
3315
|
+
[screenConfigurationObjectName]="cfgName.ReferenceFilter"
|
|
3266
3316
|
[(model)]="catalogSearchService.searchRequest.simpleReference">
|
|
3267
3317
|
</co-catalog-filter-item>
|
|
3268
3318
|
<div class="filter-item-wrapper">
|
|
3269
3319
|
<co-catalog-filter-item [placeholder]="'PRICELIST_PURCHASE'"
|
|
3270
3320
|
[collection]="priceListsPurchCollection"
|
|
3271
3321
|
[mode]="modes.Filterlist"
|
|
3322
|
+
[screenConfigurationObjectName]="cfgName.PricelistPurchaseFilter"
|
|
3272
3323
|
[(model)]="catalogSearchService.searchRequest.pricelistPurchase"
|
|
3273
3324
|
>
|
|
3274
3325
|
</co-catalog-filter-item>
|
|
@@ -3318,6 +3369,7 @@ class CatalogFilterContentLogisticsComponent {
|
|
|
3318
3369
|
this.catalogSearchService = catalogSearchService;
|
|
3319
3370
|
this.iconCache = iconCache;
|
|
3320
3371
|
this.catalogService = catalogService;
|
|
3372
|
+
this.cfgName = ConfigNameEnum;
|
|
3321
3373
|
this.modes = FilterItemMode$1;
|
|
3322
3374
|
this.icons = IconEnum;
|
|
3323
3375
|
this.StockView = StockView;
|
|
@@ -3350,6 +3402,7 @@ CatalogFilterContentLogisticsComponent.decorators = [
|
|
|
3350
3402
|
<co-catalog-filter-item
|
|
3351
3403
|
[placeholder]="'SERIALNUMBER'"
|
|
3352
3404
|
[mode]="modes.TextField"
|
|
3405
|
+
[screenConfigurationObjectName]="cfgName.SerialNumberFilter"
|
|
3353
3406
|
[(model)]="catalogSearchService.searchRequest.serialNumber">
|
|
3354
3407
|
</co-catalog-filter-item>
|
|
3355
3408
|
</div>
|
|
@@ -3357,6 +3410,7 @@ CatalogFilterContentLogisticsComponent.decorators = [
|
|
|
3357
3410
|
<co-catalog-filter-item
|
|
3358
3411
|
[placeholder]="'BATCH_NUMBER'"
|
|
3359
3412
|
[mode]="modes.TextField"
|
|
3413
|
+
[screenConfigurationObjectName]="cfgName.BatchNumberFilter"
|
|
3360
3414
|
[(model)]="catalogSearchService.searchRequest.batchNumber">
|
|
3361
3415
|
</co-catalog-filter-item>
|
|
3362
3416
|
</div>
|
|
@@ -3364,6 +3418,7 @@ CatalogFilterContentLogisticsComponent.decorators = [
|
|
|
3364
3418
|
<co-catalog-filter-item
|
|
3365
3419
|
[placeholder]="'MUTATION_DATE'"
|
|
3366
3420
|
[mode]="modes.DateField"
|
|
3421
|
+
[screenConfigurationObjectName]="cfgName.DateModifiedFilter"
|
|
3367
3422
|
[(model)]="catalogSearchService.searchRequest.dateModified">
|
|
3368
3423
|
</co-catalog-filter-item>
|
|
3369
3424
|
</div>
|
|
@@ -3372,12 +3427,14 @@ CatalogFilterContentLogisticsComponent.decorators = [
|
|
|
3372
3427
|
<div class="filter-item-wrapper">
|
|
3373
3428
|
<co-catalog-filter-item
|
|
3374
3429
|
[placeholder]="'UPDATE_DATE'"
|
|
3430
|
+
[screenConfigurationObjectName]="cfgName.UpdateDateFilter"
|
|
3375
3431
|
[mode]="modes.DateRangeField">
|
|
3376
3432
|
</co-catalog-filter-item>
|
|
3377
3433
|
</div>
|
|
3378
3434
|
<div class="filter-item-wrapper">
|
|
3379
3435
|
<co-catalog-filter-item
|
|
3380
3436
|
[placeholder]="'STOCK_MUTATION_DATE'"
|
|
3437
|
+
[screenConfigurationObjectName]="cfgName.StockMutationFilter"
|
|
3381
3438
|
[mode]="modes.DateRangeField">
|
|
3382
3439
|
</co-catalog-filter-item>
|
|
3383
3440
|
</div>
|
|
@@ -3386,36 +3443,42 @@ CatalogFilterContentLogisticsComponent.decorators = [
|
|
|
3386
3443
|
<div class="filter-item-wrapper">
|
|
3387
3444
|
<co-catalog-filter-item
|
|
3388
3445
|
[placeholder]="'UPDATE_DATE'"
|
|
3446
|
+
[screenConfigurationObjectName]="cfgName.UpdateDateFilter"
|
|
3389
3447
|
[mode]="modes.DateRangeField">
|
|
3390
3448
|
</co-catalog-filter-item>
|
|
3391
3449
|
</div>
|
|
3392
3450
|
<div class="filter-item-wrapper">
|
|
3393
3451
|
<co-catalog-filter-item
|
|
3394
3452
|
[placeholder]="'STOCK_MUTATION_DATE'"
|
|
3453
|
+
[screenConfigurationObjectName]="cfgName.StockMutationFilter"
|
|
3395
3454
|
[mode]="modes.DateRangeField">
|
|
3396
3455
|
</co-catalog-filter-item>
|
|
3397
3456
|
</div>
|
|
3398
3457
|
<div class="filter-item-wrapper">
|
|
3399
3458
|
<co-catalog-filter-item
|
|
3400
3459
|
[placeholder]="'WAREHOUSE'"
|
|
3460
|
+
[screenConfigurationObjectName]="cfgName.WarehouseFilter"
|
|
3401
3461
|
[mode]="modes.Filterlist">
|
|
3402
3462
|
</co-catalog-filter-item>
|
|
3403
3463
|
</div>
|
|
3404
3464
|
<div class="filter-item-wrapper">
|
|
3405
3465
|
<co-catalog-filter-item
|
|
3406
3466
|
[placeholder]="'STOCK_STATUS'"
|
|
3467
|
+
[screenConfigurationObjectName]="cfgName.StockStateFilter"
|
|
3407
3468
|
[mode]="modes.Filterlist">
|
|
3408
3469
|
</co-catalog-filter-item>
|
|
3409
3470
|
</div>
|
|
3410
3471
|
<div class="filter-item-wrapper">
|
|
3411
3472
|
<co-catalog-filter-item
|
|
3412
3473
|
[placeholder]="'SERIAL_NUMBER'"
|
|
3474
|
+
[screenConfigurationObjectName]="cfgName.SerialNumberFilter"
|
|
3413
3475
|
[mode]="modes.TextField">
|
|
3414
3476
|
</co-catalog-filter-item>
|
|
3415
3477
|
</div>
|
|
3416
3478
|
<div class="filter-item-wrapper">
|
|
3417
3479
|
<co-catalog-filter-item
|
|
3418
3480
|
[placeholder]="'BATCH_NO'"
|
|
3481
|
+
[screenConfigurationObjectName]="cfgName.BatchNumberFilter"
|
|
3419
3482
|
[mode]="modes.TextField">
|
|
3420
3483
|
</co-catalog-filter-item>
|
|
3421
3484
|
</div>
|
|
@@ -3424,42 +3487,49 @@ CatalogFilterContentLogisticsComponent.decorators = [
|
|
|
3424
3487
|
<div class="filter-item-wrapper">
|
|
3425
3488
|
<co-catalog-filter-item
|
|
3426
3489
|
[placeholder]="'UPDATE_DATE'"
|
|
3490
|
+
[screenConfigurationObjectName]="cfgName.WarehouseFilter"
|
|
3427
3491
|
[mode]="modes.DateRangeField">
|
|
3428
3492
|
</co-catalog-filter-item>
|
|
3429
3493
|
</div>
|
|
3430
3494
|
<div class="filter-item-wrapper">
|
|
3431
3495
|
<co-catalog-filter-item
|
|
3432
3496
|
[placeholder]="'STOCK_MUTATION_DATE'"
|
|
3497
|
+
[screenConfigurationObjectName]="cfgName.StockMutationFilter"
|
|
3433
3498
|
[mode]="modes.DateRangeField">
|
|
3434
3499
|
</co-catalog-filter-item>
|
|
3435
3500
|
</div>
|
|
3436
3501
|
<div class="filter-item-wrapper">
|
|
3437
3502
|
<co-catalog-filter-item
|
|
3438
3503
|
[placeholder]="'STOCK_STATUS'"
|
|
3504
|
+
[screenConfigurationObjectName]="cfgName.StockStateFilter"
|
|
3439
3505
|
[mode]="modes.Filterlist">
|
|
3440
3506
|
</co-catalog-filter-item>
|
|
3441
3507
|
</div>
|
|
3442
3508
|
<div class="filter-item-wrapper">
|
|
3443
3509
|
<co-catalog-filter-item
|
|
3444
3510
|
[placeholder]="'SERIAL_NUMBER'"
|
|
3511
|
+
[screenConfigurationObjectName]="cfgName.SerialNumberFilter"
|
|
3445
3512
|
[mode]="modes.TextField">
|
|
3446
3513
|
</co-catalog-filter-item>
|
|
3447
3514
|
</div>
|
|
3448
3515
|
<div class="filter-item-wrapper">
|
|
3449
3516
|
<co-catalog-filter-item
|
|
3450
3517
|
[placeholder]="'BATCH_NO'"
|
|
3518
|
+
[screenConfigurationObjectName]="cfgName.BatchNumberFilter"
|
|
3451
3519
|
[mode]="modes.TextField">
|
|
3452
3520
|
</co-catalog-filter-item>
|
|
3453
3521
|
</div>
|
|
3454
3522
|
<div class="filter-item-wrapper">
|
|
3455
3523
|
<co-catalog-filter-item
|
|
3456
3524
|
[placeholder]="'SOURCE_WAREHOUSE'"
|
|
3525
|
+
[screenConfigurationObjectName]="cfgName.SourceWarehouseFilter"
|
|
3457
3526
|
[mode]="modes.Filterlist">
|
|
3458
3527
|
</co-catalog-filter-item>
|
|
3459
3528
|
</div>
|
|
3460
3529
|
<div class="filter-item-wrapper">
|
|
3461
3530
|
<co-catalog-filter-item
|
|
3462
3531
|
[placeholder]="'TARGET_WAREHOUSE'"
|
|
3532
|
+
[screenConfigurationObjectName]="cfgName.TargetWarehouseFilter"
|
|
3463
3533
|
[mode]="modes.Filterlist">
|
|
3464
3534
|
</co-catalog-filter-item>
|
|
3465
3535
|
</div>
|
|
@@ -3468,36 +3538,42 @@ CatalogFilterContentLogisticsComponent.decorators = [
|
|
|
3468
3538
|
<div class="filter-item-wrapper">
|
|
3469
3539
|
<co-catalog-filter-item
|
|
3470
3540
|
[placeholder]="'UPDATE_DATE'"
|
|
3541
|
+
[screenConfigurationObjectName]="cfgName.UpdateDateFilter"
|
|
3471
3542
|
[mode]="modes.DateRangeField">
|
|
3472
3543
|
</co-catalog-filter-item>
|
|
3473
3544
|
</div>
|
|
3474
3545
|
<div class="filter-item-wrapper">
|
|
3475
3546
|
<co-catalog-filter-item
|
|
3476
3547
|
[placeholder]="'STOCK_STATUS'"
|
|
3548
|
+
[screenConfigurationObjectName]="cfgName.StockStateFilter"
|
|
3477
3549
|
[mode]="modes.Filterlist">
|
|
3478
3550
|
</co-catalog-filter-item>
|
|
3479
3551
|
</div>
|
|
3480
3552
|
<div class="filter-item-wrapper">
|
|
3481
3553
|
<co-catalog-filter-item
|
|
3482
3554
|
[placeholder]="'SERIAL_NUMBER'"
|
|
3555
|
+
[screenConfigurationObjectName]="cfgName.SerialNumberFilter"
|
|
3483
3556
|
[mode]="modes.TextField">
|
|
3484
3557
|
</co-catalog-filter-item>
|
|
3485
3558
|
</div>
|
|
3486
3559
|
<div class="filter-item-wrapper">
|
|
3487
3560
|
<co-catalog-filter-item
|
|
3488
3561
|
[placeholder]="'BATCH_NO'"
|
|
3562
|
+
[screenConfigurationObjectName]="cfgName.BatchNumberFilter"
|
|
3489
3563
|
[mode]="modes.TextField">
|
|
3490
3564
|
</co-catalog-filter-item>
|
|
3491
3565
|
</div>
|
|
3492
3566
|
<div class="filter-item-wrapper">
|
|
3493
3567
|
<co-catalog-filter-item
|
|
3494
3568
|
[placeholder]="'SOURCE_WAREHOUSE'"
|
|
3569
|
+
[screenConfigurationObjectName]="cfgName.SourceWarehouseFilter"
|
|
3495
3570
|
[mode]="modes.Filterlist">
|
|
3496
3571
|
</co-catalog-filter-item>
|
|
3497
3572
|
</div>
|
|
3498
3573
|
<div class="filter-item-wrapper">
|
|
3499
3574
|
<co-catalog-filter-item
|
|
3500
3575
|
[placeholder]="'TARGET_WAREHOUSE'"
|
|
3576
|
+
[screenConfigurationObjectName]="cfgName.TargetWarehouseFilter"
|
|
3501
3577
|
[mode]="modes.Filterlist">
|
|
3502
3578
|
</co-catalog-filter-item>
|
|
3503
3579
|
</div>
|
|
@@ -4223,12 +4299,13 @@ CatalogStockComparisonService.ctorParameters = () => [
|
|
|
4223
4299
|
];
|
|
4224
4300
|
|
|
4225
4301
|
class CatalogSearchComponent {
|
|
4226
|
-
constructor(_settingsService, _catalogService, _catalogSearchService, _catalogEventService, iconCacheService) {
|
|
4302
|
+
constructor(_settingsService, _catalogService, _catalogSearchService, _catalogEventService, iconCacheService, _cfgService) {
|
|
4227
4303
|
this._settingsService = _settingsService;
|
|
4228
4304
|
this._catalogService = _catalogService;
|
|
4229
4305
|
this._catalogSearchService = _catalogSearchService;
|
|
4230
4306
|
this._catalogEventService = _catalogEventService;
|
|
4231
4307
|
this.iconCacheService = iconCacheService;
|
|
4308
|
+
this._cfgService = _cfgService;
|
|
4232
4309
|
this.icons = IconEnum;
|
|
4233
4310
|
this.createFrozenArticle = true;
|
|
4234
4311
|
this.showNavigation = false;
|
|
@@ -4254,6 +4331,7 @@ class CatalogSearchComponent {
|
|
|
4254
4331
|
else {
|
|
4255
4332
|
this._settings = value;
|
|
4256
4333
|
}
|
|
4334
|
+
this._catalogService.init(this._settings, true);
|
|
4257
4335
|
}
|
|
4258
4336
|
}
|
|
4259
4337
|
showClass() {
|
|
@@ -4262,7 +4340,9 @@ class CatalogSearchComponent {
|
|
|
4262
4340
|
ngOnInit() {
|
|
4263
4341
|
return __awaiter(this, void 0, void 0, function* () {
|
|
4264
4342
|
yield this._settingsService.initializeSettings();
|
|
4265
|
-
|
|
4343
|
+
if (this.settings) {
|
|
4344
|
+
yield this._catalogService.init(this._settings, true);
|
|
4345
|
+
}
|
|
4266
4346
|
this._subs.push(this._catalogEventService.addArticleButtonClick.subscribe((article) => {
|
|
4267
4347
|
this.onAddArticleButtonClick.emit(article);
|
|
4268
4348
|
}), this._catalogEventService.arButtonClick.subscribe((article) => {
|
|
@@ -4273,7 +4353,30 @@ class CatalogSearchComponent {
|
|
|
4273
4353
|
this.onLookAtArticleButtonClick.emit(article);
|
|
4274
4354
|
}), this._catalogEventService.stockDetailsClick.subscribe((article) => {
|
|
4275
4355
|
this.onStockDetailsClick.emit(article);
|
|
4356
|
+
}), this._cfgService.configSet.subscribe((config) => {
|
|
4357
|
+
if (config && config.length > 0) {
|
|
4358
|
+
let configObject = this._cfgService.getObjectConfigurationFor('resultSetting');
|
|
4359
|
+
if (configObject) {
|
|
4360
|
+
if (configObject.getDefaultBooleanValue()) {
|
|
4361
|
+
this.mode = 'tile';
|
|
4362
|
+
}
|
|
4363
|
+
else {
|
|
4364
|
+
this.mode = 'list';
|
|
4365
|
+
}
|
|
4366
|
+
}
|
|
4367
|
+
}
|
|
4276
4368
|
}));
|
|
4369
|
+
if (this._cfgService.configObjects && this._cfgService.configObjects.length > 0) {
|
|
4370
|
+
let config = this._cfgService.getObjectConfigurationFor('resultSetting');
|
|
4371
|
+
if (config) {
|
|
4372
|
+
if (config.getDefaultBooleanValue()) {
|
|
4373
|
+
this.mode = 'tile';
|
|
4374
|
+
}
|
|
4375
|
+
else {
|
|
4376
|
+
this.mode = 'list';
|
|
4377
|
+
}
|
|
4378
|
+
}
|
|
4379
|
+
}
|
|
4277
4380
|
});
|
|
4278
4381
|
}
|
|
4279
4382
|
ngOnDestroy() {
|
|
@@ -4388,7 +4491,11 @@ CatalogSearchComponent.decorators = [
|
|
|
4388
4491
|
CatalogSearchService,
|
|
4389
4492
|
CatalogStockService,
|
|
4390
4493
|
CatalogStockComparisonService,
|
|
4391
|
-
CatalogStockTransferService
|
|
4494
|
+
CatalogStockTransferService,
|
|
4495
|
+
{
|
|
4496
|
+
provide: SCREEN_CONFIG_ADAPTER_COMPONENT_INTERFACE_NAME,
|
|
4497
|
+
useExisting: forwardRef(() => CatalogSearchComponent)
|
|
4498
|
+
}
|
|
4392
4499
|
],
|
|
4393
4500
|
encapsulation: ViewEncapsulation.None,
|
|
4394
4501
|
animations: [
|
|
@@ -4405,7 +4512,8 @@ CatalogSearchComponent.ctorParameters = () => [
|
|
|
4405
4512
|
{ type: CatalogService, decorators: [{ type: Host }] },
|
|
4406
4513
|
{ type: CatalogSearchService, decorators: [{ type: Host }] },
|
|
4407
4514
|
{ type: CatalogEventService },
|
|
4408
|
-
{ type: IconCacheService }
|
|
4515
|
+
{ type: IconCacheService },
|
|
4516
|
+
{ type: BaseModuleScreenConfigService }
|
|
4409
4517
|
];
|
|
4410
4518
|
CatalogSearchComponent.propDecorators = {
|
|
4411
4519
|
settings: [{ type: Input }],
|
|
@@ -5297,12 +5405,15 @@ class CatalogExternalSourceComponent {
|
|
|
5297
5405
|
}
|
|
5298
5406
|
fetchAndCombineThreeDimerseData(hash) {
|
|
5299
5407
|
return __awaiter(this, void 0, void 0, function* () {
|
|
5300
|
-
const customerName =
|
|
5408
|
+
const customerName = this._externalSource.username;
|
|
5301
5409
|
// two main api urls
|
|
5302
5410
|
const configurationUrl = this._externalSource.domain + '/configurationData/' + hash;
|
|
5303
|
-
console.log('configurationUrl');
|
|
5304
5411
|
const priceDataUrl = this._externalSource.domain + '/rules/api/' + customerName.toLowerCase() + '/' + hash;
|
|
5305
|
-
|
|
5412
|
+
//test setup for local testing
|
|
5413
|
+
//const configurationUrl: string = "https://bertplantagie.platformapi-accept.3dimerce.com/configurationData/8eb5b35697c96716d3e253294344d98e4dcdcb68969c288189d45829164e3177";
|
|
5414
|
+
//console.log(configurationUrl);
|
|
5415
|
+
//const priceDataUrl: string = "https://bertplantagie.platformapi-accept.3dimerce.com/rules/api/bertplantagie/8eb5b35697c96716d3e253294344d98e4dcdcb68969c288189d45829164e3177";
|
|
5416
|
+
//console.log(priceDataUrl);
|
|
5306
5417
|
try {
|
|
5307
5418
|
let configurationData;
|
|
5308
5419
|
let priceData;
|
|
@@ -5310,33 +5421,41 @@ class CatalogExternalSourceComponent {
|
|
|
5310
5421
|
this.fetchJsonFile(configurationUrl).then(configResponse => {
|
|
5311
5422
|
if (configResponse && configResponse.ok) {
|
|
5312
5423
|
configResponse.json().then(result => {
|
|
5313
|
-
console.log(result);
|
|
5424
|
+
//console.log(result);
|
|
5314
5425
|
configurationData = result;
|
|
5315
|
-
//if we have config data
|
|
5426
|
+
//if we have config data continue to fetch price data
|
|
5316
5427
|
this.fetchJsonFile(priceDataUrl).then(priceResponse => {
|
|
5317
5428
|
if (priceResponse && priceResponse.ok) {
|
|
5318
5429
|
priceResponse.json().then(result => {
|
|
5319
|
-
console.log(result);
|
|
5430
|
+
//console.log(result);
|
|
5320
5431
|
priceData = result;
|
|
5321
5432
|
//If we have config and price data. Create the necessary data object and pass it along.
|
|
5322
|
-
|
|
5323
|
-
resultObject['configuratie-data'] = configurationData;
|
|
5324
|
-
resultObject['prijs-data'] = priceData;
|
|
5325
|
-
console.log(resultObject);
|
|
5326
|
-
this.iFrameFeedbackReceived.emit(JSON.stringify(resultObject));
|
|
5433
|
+
this.create3DimerseFeedback(configurationData, priceData);
|
|
5327
5434
|
}).catch(e => {
|
|
5328
|
-
//If there is no price data
|
|
5435
|
+
//If there is no price data, make that object null and pass data along
|
|
5436
|
+
this.create3DimerseFeedback(configurationData, null);
|
|
5329
5437
|
console.log(e);
|
|
5330
|
-
priceData = {};
|
|
5331
5438
|
});
|
|
5332
5439
|
}
|
|
5440
|
+
else {
|
|
5441
|
+
//If there is no valid price data, make that object null and pass data along
|
|
5442
|
+
this.create3DimerseFeedback(configurationData, null);
|
|
5443
|
+
}
|
|
5444
|
+
}).catch(e => {
|
|
5445
|
+
//If we cannot fetch price data
|
|
5446
|
+
this.create3DimerseFeedback(configurationData, null);
|
|
5447
|
+
console.log(e);
|
|
5333
5448
|
});
|
|
5334
5449
|
}).catch(e => {
|
|
5335
|
-
//If there is
|
|
5450
|
+
//If there is an error fetching config data do not continue. just log the error.
|
|
5336
5451
|
console.log(e);
|
|
5337
5452
|
configurationData = {};
|
|
5338
5453
|
});
|
|
5339
5454
|
}
|
|
5455
|
+
}).catch(e => {
|
|
5456
|
+
//If there is an error fetching config dat. just log the error.
|
|
5457
|
+
console.log(e);
|
|
5458
|
+
configurationData = {};
|
|
5340
5459
|
});
|
|
5341
5460
|
}
|
|
5342
5461
|
catch (error) {
|
|
@@ -5344,6 +5463,13 @@ class CatalogExternalSourceComponent {
|
|
|
5344
5463
|
}
|
|
5345
5464
|
});
|
|
5346
5465
|
}
|
|
5466
|
+
create3DimerseFeedback(configurationData, priceData) {
|
|
5467
|
+
let resultObject = {};
|
|
5468
|
+
resultObject['configuratie-data'] = configurationData;
|
|
5469
|
+
resultObject['prijs-data'] = priceData;
|
|
5470
|
+
console.log(resultObject);
|
|
5471
|
+
this.iFrameFeedbackReceived.emit(JSON.stringify(resultObject));
|
|
5472
|
+
}
|
|
5347
5473
|
fetchJsonFile(url) {
|
|
5348
5474
|
return __awaiter(this, void 0, void 0, function* () {
|
|
5349
5475
|
return yield fetch(url);
|