@colijnit/catalog 256.1.10 → 256.1.12
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 +145 -57
- package/bundles/colijnit-catalog.umd.js.map +1 -1
- package/colijnit-catalog.metadata.json +1 -1
- package/esm2015/lib/catalog-version.js +3 -3
- package/esm2015/lib/component/catalog-external-sources/catalog-external-sources.component.js +46 -32
- package/esm2015/lib/component/catalog-filter-content/catalog-filter-content-general/catalog-filter-content-general.component.js +45 -4
- package/esm2015/lib/enum/config-name.enum.js +3 -1
- package/esm2015/lib/service/catalog-connector-adapter.service.js +25 -1
- package/esm2015/lib/service/catalog-connector.service.js +11 -1
- package/fesm2015/colijnit-catalog.js +127 -38
- package/fesm2015/colijnit-catalog.js.map +1 -1
- package/lib/component/catalog-external-sources/catalog-external-sources.component.d.ts +7 -2
- package/lib/component/catalog-filter-content/catalog-filter-content-general/catalog-filter-content-general.component.d.ts +5 -2
- package/lib/enum/config-name.enum.d.ts +2 -0
- package/lib/service/catalog-connector-adapter.service.d.ts +4 -0
- package/lib/service/catalog-connector.service.d.ts +4 -0
- package/package.json +2 -2
- package/colijnit-catalog-256.1.9.tgz +0 -0
|
@@ -34,16 +34,17 @@ import { Color } from '@colijnit/mainapi/build/model/color.bo';
|
|
|
34
34
|
import { TransactionInfoResponse } from '@colijnit/transactionapi/build/model/transaction-info-response.bo';
|
|
35
35
|
import { DateField } from '@colijnit/ioneconnector/build/factory/decorators/date-field.decorator';
|
|
36
36
|
import { ObjectConfiguration } from '@colijnit/ioneconnector/build/model/object-configuration';
|
|
37
|
+
import { CategoryType } from '@colijnit/articleapi/build/model/category-type.bo';
|
|
38
|
+
import { CategoryDesign } from '@colijnit/articleapi/build/model/category-design.bo';
|
|
37
39
|
import { ObjectUtils } from '@colijnit/ioneconnector/build/utils/object-utils';
|
|
38
40
|
import { FileUtils } from '@colijnit/ioneconnector/build/utils/file-utils';
|
|
39
|
-
import { FilterViewmodel, FilterItemViewmodel, BaseModuleScreenConfigService, BaseModuleService, SCREEN_CONFIG_ADAPTER_COMPONENT_INTERFACE_NAME, FilterItemModule, ScreenConfigurationModule, InputTextModule, ButtonModule, IconModule,
|
|
41
|
+
import { FilterViewmodel, FilterItemViewmodel, BaseModuleScreenConfigService, BaseModuleService, FilterItemMode, SCREEN_CONFIG_ADAPTER_COMPONENT_INTERFACE_NAME, FilterItemModule, ScreenConfigurationModule, InputTextModule, ButtonModule, IconModule, InputDatePickerModule, IconCollapseHandleModule, CoDialogModule, ListOfValuesModule, CheckmarkOverlayModule, ImageModule, OverlayModule, OverlayService, InputSearchModule, PaginationBarModule, SimpleGridModule } from '@colijnit/corecomponents_v12';
|
|
40
42
|
import { PagingParameters } from '@colijnit/ioneconnector/build/model/paging-parameters';
|
|
41
43
|
import { trigger, state, style, transition, animate } from '@angular/animations';
|
|
42
44
|
import * as i1 from '@angular/platform-browser';
|
|
43
45
|
import { DomSanitizer } from '@angular/platform-browser';
|
|
44
46
|
import { InputCheckboxModule, SliderComponent, IconModule as IconModule$1, CheckboxSelectModule, PriceDisplayPipeModule, ButtonModule as ButtonModule$1 } from '@colijnit/corecomponents';
|
|
45
47
|
import { DomainName } from '@colijnit/mainapi/build/enum/domain-name.enum';
|
|
46
|
-
import { FilterItemMode } from '@colijnit/corecomponents_v12/';
|
|
47
48
|
import { ArticleStockSearchRequest } from '@colijnit/articleapi/build/model/article-stock-search-request';
|
|
48
49
|
import { ArticleStockTransferSearchRequest } from '@colijnit/articleapi/build/model/article-stock-transfer-search-request';
|
|
49
50
|
import { ArticleStockComparisonSearchRequest } from '@colijnit/articleapi/build/model/article-stock-comparison-search-request';
|
|
@@ -54,8 +55,8 @@ class Version {
|
|
|
54
55
|
constructor() {
|
|
55
56
|
this.name = "@colijnit/catalog";
|
|
56
57
|
this.description = "iOne Catalog module based on Angular 12";
|
|
57
|
-
this.symVer = "256.1.
|
|
58
|
-
this.publishDate = "
|
|
58
|
+
this.symVer = "256.1.12";
|
|
59
|
+
this.publishDate = "10-12-2024 12:28:29";
|
|
59
60
|
}
|
|
60
61
|
}
|
|
61
62
|
|
|
@@ -762,6 +763,28 @@ class CatalogConnectorAdapterService {
|
|
|
762
763
|
}
|
|
763
764
|
});
|
|
764
765
|
}
|
|
766
|
+
getCategoryTypes() {
|
|
767
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
768
|
+
const response = yield this.connector.getCategoryTypes();
|
|
769
|
+
if (response && response.validationResult && response.validationResult.success) {
|
|
770
|
+
return this._boFactory.makeBOArrayFromRawBackendDataArray(CategoryType, response.resultObjects);
|
|
771
|
+
}
|
|
772
|
+
else {
|
|
773
|
+
console.error(response.validationMessagesAsString);
|
|
774
|
+
}
|
|
775
|
+
});
|
|
776
|
+
}
|
|
777
|
+
getCategoryDesigns() {
|
|
778
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
779
|
+
const response = yield this.connector.getCategoryDesigns();
|
|
780
|
+
if (response && response.validationResult && response.validationResult.success) {
|
|
781
|
+
return this._boFactory.makeBOArrayFromRawBackendDataArray(CategoryDesign, response.resultObjects);
|
|
782
|
+
}
|
|
783
|
+
else {
|
|
784
|
+
console.error(response.validationMessagesAsString);
|
|
785
|
+
}
|
|
786
|
+
});
|
|
787
|
+
}
|
|
765
788
|
getAvailabeCatalogsForLoggedInUser() {
|
|
766
789
|
return __awaiter(this, void 0, void 0, function* () {
|
|
767
790
|
const response = yield this.relationConnector.getAvailabeCatalogsForLoggedInUser(true);
|
|
@@ -1583,6 +1606,16 @@ class CatalogConnectorService {
|
|
|
1583
1606
|
return this._adapterService.getSuppliers();
|
|
1584
1607
|
});
|
|
1585
1608
|
}
|
|
1609
|
+
getCategoryTypes() {
|
|
1610
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1611
|
+
return this._adapterService.getCategoryTypes();
|
|
1612
|
+
});
|
|
1613
|
+
}
|
|
1614
|
+
getCategoryDesigns() {
|
|
1615
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1616
|
+
return this._adapterService.getCategoryDesigns();
|
|
1617
|
+
});
|
|
1618
|
+
}
|
|
1586
1619
|
getAvailabeCatalogsForLoggedInUser() {
|
|
1587
1620
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1588
1621
|
return this._adapterService.getAvailabeCatalogsForLoggedInUser();
|
|
@@ -2849,6 +2882,8 @@ var ConfigNameEnum;
|
|
|
2849
2882
|
ConfigNameEnum["PublishFilter"] = "publishFilter";
|
|
2850
2883
|
ConfigNameEnum["SellViaFilter"] = "sellViaFilter";
|
|
2851
2884
|
ConfigNameEnum["CategoryFilter"] = "categoryFilter";
|
|
2885
|
+
ConfigNameEnum["CategoryTypeFilter"] = "categoryTypeFilter";
|
|
2886
|
+
ConfigNameEnum["CategoryDesignFilter"] = "categoryDesignFilter";
|
|
2852
2887
|
ConfigNameEnum["SupplierFilter"] = "supplierFilter";
|
|
2853
2888
|
ConfigNameEnum["ArtNrSupplierFilter"] = "artNrSupplierFilter";
|
|
2854
2889
|
ConfigNameEnum["ReferenceFilter"] = "referenceFilter";
|
|
@@ -2910,6 +2945,8 @@ class CatalogFilterContentGeneralComponent {
|
|
|
2910
2945
|
this._setCategories();
|
|
2911
2946
|
this._setColors();
|
|
2912
2947
|
this._setDoSyncValues();
|
|
2948
|
+
this._setCategoryTypes();
|
|
2949
|
+
this._setCategoryDesigns();
|
|
2913
2950
|
}
|
|
2914
2951
|
_setStoreGroups() {
|
|
2915
2952
|
this._catalogConnectorService.getStoreGroups().then((storeGroups) => {
|
|
@@ -2949,7 +2986,16 @@ class CatalogFilterContentGeneralComponent {
|
|
|
2949
2986
|
_setPublicationCodesSales() {
|
|
2950
2987
|
this._catalogConnectorService.getRVDomainCollection(DomainName.ArtPublicationSales).then((publicationCodes) => {
|
|
2951
2988
|
this.artPublicationSalesCollection = this.filterService.createFilterSelectionsCollection(publicationCodes, "code", "description");
|
|
2952
|
-
|
|
2989
|
+
});
|
|
2990
|
+
}
|
|
2991
|
+
_setCategoryTypes() {
|
|
2992
|
+
this._catalogConnectorService.getCategoryTypes().then((categoryTypeCollection) => {
|
|
2993
|
+
this.categoryTypes = this.filterService.createFilterSelectionsCollection(categoryTypeCollection, "typeCode", "description");
|
|
2994
|
+
});
|
|
2995
|
+
}
|
|
2996
|
+
_setCategoryDesigns() {
|
|
2997
|
+
this._catalogConnectorService.getCategoryDesigns().then((categoryDesignsCollection) => {
|
|
2998
|
+
this.categoryDesigns = this.filterService.createFilterSelectionsCollection(categoryDesignsCollection, "catDesignCode", "description");
|
|
2953
2999
|
});
|
|
2954
3000
|
}
|
|
2955
3001
|
_setPriceList() {
|
|
@@ -3002,6 +3048,17 @@ CatalogFilterContentGeneralComponent.decorators = [
|
|
|
3002
3048
|
[screenConfigurationObjectName]="cfgName.PriceFilter"
|
|
3003
3049
|
>
|
|
3004
3050
|
</co-catalog-filter-item>
|
|
3051
|
+
</div>
|
|
3052
|
+
<div class="filter-item-wrapper price">
|
|
3053
|
+
<co-catalog-filter-item [placeholder]="'PRICE'"
|
|
3054
|
+
[mode]="modes.Slider"
|
|
3055
|
+
[sliderDefaultMin]=0
|
|
3056
|
+
[sliderDefaultMax]=100000
|
|
3057
|
+
[(model)]="catalogSearchService.searchRequest.rangePrice"
|
|
3058
|
+
[expanded]="false"
|
|
3059
|
+
[screenConfigurationObjectName]="cfgName.PriceFilter"
|
|
3060
|
+
>
|
|
3061
|
+
</co-catalog-filter-item>
|
|
3005
3062
|
</div>
|
|
3006
3063
|
<div class="filter-item-wrapper length">
|
|
3007
3064
|
<co-catalog-filter-item [placeholder]="'LENGTH'"
|
|
@@ -3161,6 +3218,26 @@ CatalogFilterContentGeneralComponent.decorators = [
|
|
|
3161
3218
|
>
|
|
3162
3219
|
</co-catalog-filter-item>
|
|
3163
3220
|
</div>
|
|
3221
|
+
<div class="filter-item-wrapper price">
|
|
3222
|
+
<co-catalog-filter-item [placeholder]="'CAT_TYPES'"
|
|
3223
|
+
[mode]="modes.Filterlist"
|
|
3224
|
+
[collection]="categoryTypes"
|
|
3225
|
+
[(model)]="catalogSearchService.searchRequest.categoryTypeRange"
|
|
3226
|
+
[expanded]="false"
|
|
3227
|
+
[screenConfigurationObjectName]="cfgName.CategoryTypeFilter"
|
|
3228
|
+
>
|
|
3229
|
+
</co-catalog-filter-item>
|
|
3230
|
+
</div>
|
|
3231
|
+
<div class="filter-item-wrapper price">
|
|
3232
|
+
<co-catalog-filter-item [placeholder]="'CAT_DESIGN'"
|
|
3233
|
+
[mode]="modes.Filterlist"
|
|
3234
|
+
[collection]="categoryDesigns"
|
|
3235
|
+
[(model)]="catalogSearchService.searchRequest.categoryDesignRange"
|
|
3236
|
+
[expanded]="false"
|
|
3237
|
+
[screenConfigurationObjectName]="cfgName.CategoryDesignFilter"
|
|
3238
|
+
>
|
|
3239
|
+
</co-catalog-filter-item>
|
|
3240
|
+
</div>
|
|
3164
3241
|
<div class="filter-item-wrapper" *ngFor="let filter of filterService.filters" [ngClass]="filter.filterName">
|
|
3165
3242
|
<co-catalog-filter-item
|
|
3166
3243
|
[placeholder]="filter.filterName"
|
|
@@ -3346,7 +3423,7 @@ class CatalogFilterContentPurchaseComponent {
|
|
|
3346
3423
|
this._adapterService = _adapterService;
|
|
3347
3424
|
this.icons = IconEnum;
|
|
3348
3425
|
this.cfgName = ConfigNameEnum;
|
|
3349
|
-
this.modes = FilterItemMode
|
|
3426
|
+
this.modes = FilterItemMode;
|
|
3350
3427
|
this._subs = [];
|
|
3351
3428
|
}
|
|
3352
3429
|
showClass() {
|
|
@@ -3466,7 +3543,7 @@ class CatalogFilterContentLogisticsComponent {
|
|
|
3466
3543
|
this.iconCache = iconCache;
|
|
3467
3544
|
this.catalogService = catalogService;
|
|
3468
3545
|
this.cfgName = ConfigNameEnum;
|
|
3469
|
-
this.modes = FilterItemMode
|
|
3546
|
+
this.modes = FilterItemMode;
|
|
3470
3547
|
this.icons = IconEnum;
|
|
3471
3548
|
this.StockView = StockView;
|
|
3472
3549
|
this._subs = [];
|
|
@@ -4062,50 +4139,60 @@ class ExternalSourceViewmodel {
|
|
|
4062
4139
|
}
|
|
4063
4140
|
|
|
4064
4141
|
class CatalogExternalSourcesComponent {
|
|
4065
|
-
constructor(_catalogConnectorService, _imageService) {
|
|
4142
|
+
constructor(_catalogConnectorService, _imageService, _settingsService, _catalogService) {
|
|
4066
4143
|
this._catalogConnectorService = _catalogConnectorService;
|
|
4067
4144
|
this._imageService = _imageService;
|
|
4145
|
+
this._settingsService = _settingsService;
|
|
4146
|
+
this._catalogService = _catalogService;
|
|
4068
4147
|
this.isStandalone = false;
|
|
4069
4148
|
this.externalSourceClick = new EventEmitter();
|
|
4070
4149
|
this.externalSourceViewModels = [];
|
|
4071
4150
|
this.unavailableCatalogs = [];
|
|
4151
|
+
this._settings = { searchOnStart: true };
|
|
4072
4152
|
}
|
|
4073
4153
|
showClass() {
|
|
4074
4154
|
return true;
|
|
4075
4155
|
}
|
|
4076
4156
|
ngOnInit() {
|
|
4077
|
-
this
|
|
4078
|
-
|
|
4079
|
-
this.
|
|
4080
|
-
|
|
4081
|
-
|
|
4082
|
-
|
|
4083
|
-
|
|
4084
|
-
|
|
4085
|
-
availableCatalogs
|
|
4157
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
4158
|
+
yield this._settingsService.initializeSettings();
|
|
4159
|
+
yield this._catalogService.init(this._settings, true);
|
|
4160
|
+
this.externalSourceViewModels.length = 0;
|
|
4161
|
+
if (!this.isStandalone) {
|
|
4162
|
+
this._catalogConnectorService.getAvailabeCatalogsForLoggedInUser().then(result => {
|
|
4163
|
+
if (result['validationResult']['success'] === true) {
|
|
4164
|
+
if (result['resultObject']['availableCatalogs']) {
|
|
4165
|
+
let availableCatalogs = [];
|
|
4166
|
+
for (const availableCatalog of result['resultObject']['availableCatalogs']) {
|
|
4167
|
+
const instance = Object.assign(new CatalogDefinition(), availableCatalog);
|
|
4168
|
+
availableCatalogs.push(instance);
|
|
4169
|
+
}
|
|
4170
|
+
this.loadCatalogs(availableCatalogs).then(result => {
|
|
4171
|
+
});
|
|
4172
|
+
}
|
|
4173
|
+
if (result['resultObject']['unavailableCatalogs']) {
|
|
4174
|
+
this.loadUnavailableCatalogs(result['resultObject']['unavailableCatalogs']);
|
|
4086
4175
|
}
|
|
4087
|
-
this.loadCatalogs(availableCatalogs).then(result => { });
|
|
4088
4176
|
}
|
|
4089
|
-
|
|
4090
|
-
this.
|
|
4177
|
+
else {
|
|
4178
|
+
this._catalogConnectorService.getCatalogDefinitions().then((defs) => __awaiter(this, void 0, void 0, function* () {
|
|
4179
|
+
if (defs) {
|
|
4180
|
+
this.loadCatalogs(defs).then(result => {
|
|
4181
|
+
});
|
|
4182
|
+
}
|
|
4183
|
+
}));
|
|
4091
4184
|
}
|
|
4092
|
-
}
|
|
4093
|
-
|
|
4094
|
-
|
|
4095
|
-
|
|
4096
|
-
|
|
4097
|
-
|
|
4098
|
-
|
|
4099
|
-
|
|
4100
|
-
|
|
4101
|
-
|
|
4102
|
-
|
|
4103
|
-
this._catalogConnectorService.getCatalogDefinitions().then((defs) => __awaiter(this, void 0, void 0, function* () {
|
|
4104
|
-
if (defs) {
|
|
4105
|
-
this.loadCatalogs(defs).then(result => { });
|
|
4106
|
-
}
|
|
4107
|
-
}));
|
|
4108
|
-
}
|
|
4185
|
+
});
|
|
4186
|
+
}
|
|
4187
|
+
else {
|
|
4188
|
+
this._catalogConnectorService.getCatalogDefinitions().then((defs) => __awaiter(this, void 0, void 0, function* () {
|
|
4189
|
+
if (defs) {
|
|
4190
|
+
this.loadCatalogs(defs).then(result => {
|
|
4191
|
+
});
|
|
4192
|
+
}
|
|
4193
|
+
}));
|
|
4194
|
+
}
|
|
4195
|
+
});
|
|
4109
4196
|
}
|
|
4110
4197
|
loadCatalogs(defs) {
|
|
4111
4198
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -4151,7 +4238,9 @@ CatalogExternalSourcesComponent.decorators = [
|
|
|
4151
4238
|
];
|
|
4152
4239
|
CatalogExternalSourcesComponent.ctorParameters = () => [
|
|
4153
4240
|
{ type: CatalogConnectorService },
|
|
4154
|
-
{ type: CatalogImageService }
|
|
4241
|
+
{ type: CatalogImageService },
|
|
4242
|
+
{ type: CatalogSettingsService },
|
|
4243
|
+
{ type: CatalogService }
|
|
4155
4244
|
];
|
|
4156
4245
|
CatalogExternalSourcesComponent.propDecorators = {
|
|
4157
4246
|
isStandalone: [{ type: Input }],
|