@colijnit/catalog 256.1.7 → 256.1.8
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 +78 -17
- package/bundles/colijnit-catalog.umd.js.map +1 -1
- package/colijnit-catalog-256.1.7.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 +6 -6
- package/esm2015/lib/component/catalog-external-sources/catalog-external-sources.component.js +62 -17
- package/esm2015/lib/service/catalog-connector-adapter.service.js +13 -3
- package/esm2015/lib/service/catalog-connector.service.js +6 -1
- package/esm2015/lib/service/catalog-stock-comparison.service.js +1 -2
- package/esm2015/lib/service/catalog-stock-transfer.service.js +1 -2
- package/esm2015/lib/service/catalog-stock.service.js +1 -2
- package/fesm2015/colijnit-catalog.js +85 -28
- package/fesm2015/colijnit-catalog.js.map +1 -1
- package/lib/component/catalog-external-sources/catalog-external-sources.component.d.ts +5 -0
- package/lib/component/catalog-external-sources/style/_layout.scss +17 -0
- package/lib/service/catalog-connector-adapter.service.d.ts +1 -1
- package/lib/service/catalog-connector.service.d.ts +1 -0
- package/package.json +1 -1
- package/colijnit-catalog-256.1.6.tgz +0 -0
- package/lib/component/catalog-external-configurator/style/_layout.scss +0 -4
- package/lib/component/catalog-external-configurator/style/_material-definition.scss +0 -32
- package/lib/component/catalog-external-configurator/style/_theme.scss +0 -4
- package/lib/component/catalog-external-configurator/style/material.scss +0 -4
|
@@ -30,8 +30,8 @@
|
|
|
30
30
|
function Version() {
|
|
31
31
|
this.name = "@colijnit/catalog";
|
|
32
32
|
this.description = "iOne Catalog module based on Angular 12";
|
|
33
|
-
this.symVer = "256.1.
|
|
34
|
-
this.publishDate = "
|
|
33
|
+
this.symVer = "256.1.8";
|
|
34
|
+
this.publishDate = "29-11-2024 16:24:27";
|
|
35
35
|
}
|
|
36
36
|
return Version;
|
|
37
37
|
}());
|
|
@@ -807,7 +807,6 @@
|
|
|
807
807
|
this._boFactory = new businessObjectFactory.BusinessObjectFactory();
|
|
808
808
|
this._initializing = false;
|
|
809
809
|
this._initialized = false;
|
|
810
|
-
console.log('create');
|
|
811
810
|
}
|
|
812
811
|
Object.defineProperty(CatalogConnectorAdapterService.prototype, "shouldShowLoader", {
|
|
813
812
|
get: function () {
|
|
@@ -1543,6 +1542,26 @@
|
|
|
1543
1542
|
});
|
|
1544
1543
|
});
|
|
1545
1544
|
};
|
|
1545
|
+
CatalogConnectorAdapterService.prototype.getAvailabeCatalogsForLoggedInUser = function () {
|
|
1546
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
1547
|
+
var response;
|
|
1548
|
+
return __generator(this, function (_a) {
|
|
1549
|
+
switch (_a.label) {
|
|
1550
|
+
case 0: return [4 /*yield*/, this.relationConnector.getAvailabeCatalogsForLoggedInUser(true)];
|
|
1551
|
+
case 1:
|
|
1552
|
+
response = _a.sent();
|
|
1553
|
+
if (response && response.validationResult && response.validationResult.success) {
|
|
1554
|
+
return [2 /*return*/, response];
|
|
1555
|
+
}
|
|
1556
|
+
else {
|
|
1557
|
+
console.error(response.validationMessagesAsString);
|
|
1558
|
+
return [2 /*return*/, response];
|
|
1559
|
+
}
|
|
1560
|
+
return [2 /*return*/];
|
|
1561
|
+
}
|
|
1562
|
+
});
|
|
1563
|
+
});
|
|
1564
|
+
};
|
|
1546
1565
|
CatalogConnectorAdapterService.prototype.getPresets = function (module, user) {
|
|
1547
1566
|
return __awaiter(this, void 0, void 0, function () {
|
|
1548
1567
|
var response;
|
|
@@ -1841,8 +1860,7 @@
|
|
|
1841
1860
|
{ type: i0.Injectable, args: [{
|
|
1842
1861
|
providedIn: 'root'
|
|
1843
1862
|
},] }
|
|
1844
|
-
];
|
|
1845
|
-
CatalogConnectorAdapterService.ctorParameters = function () { return []; };
|
|
1863
|
+
];
|
|
1846
1864
|
|
|
1847
1865
|
// Class represents a value that is to be loaded only once, lazily, by its .loadFunction, despite how many times or how fast its getValue() is called.
|
|
1848
1866
|
var CacheField = /** @class */ (function () {
|
|
@@ -2600,6 +2618,13 @@
|
|
|
2600
2618
|
});
|
|
2601
2619
|
});
|
|
2602
2620
|
};
|
|
2621
|
+
CatalogConnectorService.prototype.getAvailabeCatalogsForLoggedInUser = function () {
|
|
2622
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
2623
|
+
return __generator(this, function (_a) {
|
|
2624
|
+
return [2 /*return*/, this._adapterService.getAvailabeCatalogsForLoggedInUser()];
|
|
2625
|
+
});
|
|
2626
|
+
});
|
|
2627
|
+
};
|
|
2603
2628
|
CatalogConnectorService.prototype.getPresets = function (module, user) {
|
|
2604
2629
|
return __awaiter(this, void 0, void 0, function () {
|
|
2605
2630
|
return __generator(this, function (_a) {
|
|
@@ -4753,8 +4778,10 @@
|
|
|
4753
4778
|
function CatalogExternalSourcesComponent(_catalogConnectorService, _imageService) {
|
|
4754
4779
|
this._catalogConnectorService = _catalogConnectorService;
|
|
4755
4780
|
this._imageService = _imageService;
|
|
4781
|
+
this.isStandalone = false;
|
|
4756
4782
|
this.externalSourceClick = new i0.EventEmitter();
|
|
4757
4783
|
this.externalSourceViewModels = [];
|
|
4784
|
+
this.unavailableCatalogs = [];
|
|
4758
4785
|
}
|
|
4759
4786
|
CatalogExternalSourcesComponent.prototype.showClass = function () {
|
|
4760
4787
|
return true;
|
|
@@ -4762,12 +4789,45 @@
|
|
|
4762
4789
|
CatalogExternalSourcesComponent.prototype.ngOnInit = function () {
|
|
4763
4790
|
var _this = this;
|
|
4764
4791
|
this.externalSourceViewModels.length = 0;
|
|
4765
|
-
this.
|
|
4792
|
+
if (!this.isStandalone) {
|
|
4793
|
+
this._catalogConnectorService.getAvailabeCatalogsForLoggedInUser().then(function (result) {
|
|
4794
|
+
if (result['validationResult']['success'] === true) {
|
|
4795
|
+
if (result['resultObject']['availableCatalogs']) {
|
|
4796
|
+
_this.loadCatalogs(result['resultObject']['availableCatalogs']).then(function (result) { });
|
|
4797
|
+
}
|
|
4798
|
+
if (result['resultObject']['unavailableCatalogs']) {
|
|
4799
|
+
_this.loadUnavailableCatalogs(result['resultObject']['unavailableCatalogs']);
|
|
4800
|
+
}
|
|
4801
|
+
}
|
|
4802
|
+
else {
|
|
4803
|
+
_this._catalogConnectorService.getCatalogDefinitions().then(function (defs) { return __awaiter(_this, void 0, void 0, function () {
|
|
4804
|
+
return __generator(this, function (_a) {
|
|
4805
|
+
if (defs) {
|
|
4806
|
+
this.loadCatalogs(defs).then(function (result) { });
|
|
4807
|
+
}
|
|
4808
|
+
return [2 /*return*/];
|
|
4809
|
+
});
|
|
4810
|
+
}); });
|
|
4811
|
+
}
|
|
4812
|
+
});
|
|
4813
|
+
}
|
|
4814
|
+
else {
|
|
4815
|
+
this._catalogConnectorService.getCatalogDefinitions().then(function (defs) { return __awaiter(_this, void 0, void 0, function () {
|
|
4816
|
+
return __generator(this, function (_a) {
|
|
4817
|
+
if (defs) {
|
|
4818
|
+
this.loadCatalogs(defs).then(function (result) { });
|
|
4819
|
+
}
|
|
4820
|
+
return [2 /*return*/];
|
|
4821
|
+
});
|
|
4822
|
+
}); });
|
|
4823
|
+
}
|
|
4824
|
+
};
|
|
4825
|
+
CatalogExternalSourcesComponent.prototype.loadCatalogs = function (defs) {
|
|
4826
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
4766
4827
|
var i, viewModel, _a, _b, _c;
|
|
4767
4828
|
return __generator(this, function (_d) {
|
|
4768
4829
|
switch (_d.label) {
|
|
4769
4830
|
case 0:
|
|
4770
|
-
if (!defs) return [3 /*break*/, 6];
|
|
4771
4831
|
i = 0;
|
|
4772
4832
|
_d.label = 1;
|
|
4773
4833
|
case 1:
|
|
@@ -4793,14 +4853,17 @@
|
|
|
4793
4853
|
case 6: return [2 /*return*/];
|
|
4794
4854
|
}
|
|
4795
4855
|
});
|
|
4796
|
-
});
|
|
4856
|
+
});
|
|
4857
|
+
};
|
|
4858
|
+
CatalogExternalSourcesComponent.prototype.loadUnavailableCatalogs = function (defs) {
|
|
4859
|
+
this.unavailableCatalogs = defs;
|
|
4797
4860
|
};
|
|
4798
4861
|
return CatalogExternalSourcesComponent;
|
|
4799
4862
|
}());
|
|
4800
4863
|
CatalogExternalSourcesComponent.decorators = [
|
|
4801
4864
|
{ type: i0.Component, args: [{
|
|
4802
4865
|
selector: 'co-catalog-external-sources',
|
|
4803
|
-
template: "\n
|
|
4866
|
+
template: "\n <ng-container *ngIf=\"externalSourceViewModels && externalSourceViewModels.length > 0\">\n <div class=\"catalog-external-sources-wrapper\">\n <div class=\"external-source-item\" *ngFor=\"let externalSourceViewModel of externalSourceViewModels\"\n (click)=\"externalSourceClick.emit(externalSourceViewModel)\">\n <div class=\"external-source-description\"\n [textContent]=\"externalSourceViewModel.catalogDefinition.name\"></div>\n <co-image [source]=\"externalSourceViewModel.catalogDefinition.imageData\"></co-image>\n </div>\n </div>\n </ng-container>\n <ng-container *ngIf=\"unavailableCatalogs && unavailableCatalogs.length > 0\">\n <div class=\"catalog-external-sources-wrapper catalog-external-sources-wrapper-unavailable\">\n <div class=\"external-source-item external-source-item-unavailable\"\n *ngFor=\"let unavailableCatalog of unavailableCatalogs\">\n <div class=\"external-source-description\"\n [textContent]=\"unavailableCatalog.name\"></div>\n <co-image [source]=\"unavailableCatalog.imageData\"></co-image>\n </div>\n </div>\n </ng-container>\n\n ",
|
|
4804
4867
|
encapsulation: i0.ViewEncapsulation.None
|
|
4805
4868
|
},] }
|
|
4806
4869
|
];
|
|
@@ -4809,6 +4872,7 @@
|
|
|
4809
4872
|
{ type: CatalogImageService }
|
|
4810
4873
|
]; };
|
|
4811
4874
|
CatalogExternalSourcesComponent.propDecorators = {
|
|
4875
|
+
isStandalone: [{ type: i0.Input }],
|
|
4812
4876
|
externalSourceClick: [{ type: i0.Output }],
|
|
4813
4877
|
showClass: [{ type: i0.HostBinding, args: ['class.co-catalog-external-sources',] }]
|
|
4814
4878
|
};
|
|
@@ -4937,7 +5001,6 @@
|
|
|
4937
5001
|
CatalogStockService.prototype.getArticleGridViewExcelFile = function () {
|
|
4938
5002
|
this.stockSearchRequest = Object.assign(Object.assign({}, this.searchRequest), { rangeStockMutationDate: null, rangeWarehouse: null, rangeStockStatus: null });
|
|
4939
5003
|
this._catalogConnectorService.getArticleGridViewExcelFile(this.stockSearchRequest).then(function (result) {
|
|
4940
|
-
console.log('export: ', result);
|
|
4941
5004
|
});
|
|
4942
5005
|
};
|
|
4943
5006
|
return CatalogStockService;
|
|
@@ -5031,7 +5094,6 @@
|
|
|
5031
5094
|
CatalogStockTransferService.prototype.getArticleGridViewExcelFile = function () {
|
|
5032
5095
|
this.stockSearchRequest = Object.assign(Object.assign({}, this.searchRequest), { rangeStockMutationDate: null, rangeStockStatus: null, rangeSourceWarehouse: null, rangeTargetWarehouse: null });
|
|
5033
5096
|
this._catalogConnectorService.getTransferArticleGridViewExcelFile(this.stockSearchRequest).then(function (result) {
|
|
5034
|
-
console.log('export: ', result);
|
|
5035
5097
|
});
|
|
5036
5098
|
};
|
|
5037
5099
|
return CatalogStockTransferService;
|
|
@@ -5125,7 +5187,6 @@
|
|
|
5125
5187
|
CatalogStockComparisonService.prototype.getArticleGridViewExcelFile = function () {
|
|
5126
5188
|
this.stockSearchRequest = Object.assign(Object.assign({}, this.searchRequest), { sourceWarehouse: 0, targetWarehouse: 1 });
|
|
5127
5189
|
this._catalogConnectorService.getComparisonArticleGridViewExcelFile(this.stockSearchRequest).then(function (result) {
|
|
5128
|
-
console.log('export: ', result);
|
|
5129
5190
|
});
|
|
5130
5191
|
};
|
|
5131
5192
|
return CatalogStockComparisonService;
|
|
@@ -6108,7 +6169,7 @@
|
|
|
6108
6169
|
}).catch(function (e) {
|
|
6109
6170
|
//If there is no price data, make that object null and pass data along
|
|
6110
6171
|
_this.create3DimerseFeedback(configurationData_1, null);
|
|
6111
|
-
console.log(e);
|
|
6172
|
+
// console.log(e);
|
|
6112
6173
|
});
|
|
6113
6174
|
}
|
|
6114
6175
|
else {
|
|
@@ -6118,17 +6179,17 @@
|
|
|
6118
6179
|
}).catch(function (e) {
|
|
6119
6180
|
//If we cannot fetch price data
|
|
6120
6181
|
_this.create3DimerseFeedback(configurationData_1, null);
|
|
6121
|
-
console.log(e);
|
|
6182
|
+
// console.log(e);
|
|
6122
6183
|
});
|
|
6123
6184
|
}).catch(function (e) {
|
|
6124
6185
|
//If there is an error fetching config data do not continue. just log the error.
|
|
6125
|
-
console.log(e);
|
|
6186
|
+
// console.log(e);
|
|
6126
6187
|
configurationData_1 = {};
|
|
6127
6188
|
});
|
|
6128
6189
|
}
|
|
6129
6190
|
}).catch(function (e) {
|
|
6130
6191
|
//If there is an error fetching config dat. just log the error.
|
|
6131
|
-
console.log(e);
|
|
6192
|
+
// console.log(e);
|
|
6132
6193
|
configurationData_1 = {};
|
|
6133
6194
|
});
|
|
6134
6195
|
}
|
|
@@ -6143,7 +6204,7 @@
|
|
|
6143
6204
|
var resultObject = {};
|
|
6144
6205
|
resultObject['configuratie-data'] = configurationData;
|
|
6145
6206
|
resultObject['prijs-data'] = priceData;
|
|
6146
|
-
console.log(resultObject);
|
|
6207
|
+
// console.log(resultObject);
|
|
6147
6208
|
this.iFrameFeedbackReceived.emit(JSON.stringify(resultObject));
|
|
6148
6209
|
};
|
|
6149
6210
|
CatalogExternalSourceComponent.prototype.fetchJsonFile = function (url) {
|