@colijnit/catalog 256.1.7 → 256.1.9
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 +94 -17
- package/bundles/colijnit-catalog.umd.js.map +1 -1
- package/colijnit-catalog-256.1.8.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 +68 -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 +90 -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.9";
|
|
34
|
+
this.publishDate = "3-12-2024 09:26: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,61 @@
|
|
|
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
|
+
var e_1, _a;
|
|
4795
|
+
if (result['validationResult']['success'] === true) {
|
|
4796
|
+
if (result['resultObject']['availableCatalogs']) {
|
|
4797
|
+
var availableCatalogs = [];
|
|
4798
|
+
try {
|
|
4799
|
+
for (var _b = __values(result['resultObject']['availableCatalogs']), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
4800
|
+
var availableCatalog = _c.value;
|
|
4801
|
+
var instance = Object.assign(new catalogDefinition_bo.CatalogDefinition(), availableCatalog);
|
|
4802
|
+
availableCatalogs.push(instance);
|
|
4803
|
+
}
|
|
4804
|
+
}
|
|
4805
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
4806
|
+
finally {
|
|
4807
|
+
try {
|
|
4808
|
+
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
4809
|
+
}
|
|
4810
|
+
finally { if (e_1) throw e_1.error; }
|
|
4811
|
+
}
|
|
4812
|
+
_this.loadCatalogs(availableCatalogs).then(function (result) { });
|
|
4813
|
+
}
|
|
4814
|
+
if (result['resultObject']['unavailableCatalogs']) {
|
|
4815
|
+
_this.loadUnavailableCatalogs(result['resultObject']['unavailableCatalogs']);
|
|
4816
|
+
}
|
|
4817
|
+
}
|
|
4818
|
+
else {
|
|
4819
|
+
_this._catalogConnectorService.getCatalogDefinitions().then(function (defs) { return __awaiter(_this, void 0, void 0, function () {
|
|
4820
|
+
return __generator(this, function (_a) {
|
|
4821
|
+
if (defs) {
|
|
4822
|
+
this.loadCatalogs(defs).then(function (result) { });
|
|
4823
|
+
}
|
|
4824
|
+
return [2 /*return*/];
|
|
4825
|
+
});
|
|
4826
|
+
}); });
|
|
4827
|
+
}
|
|
4828
|
+
});
|
|
4829
|
+
}
|
|
4830
|
+
else {
|
|
4831
|
+
this._catalogConnectorService.getCatalogDefinitions().then(function (defs) { return __awaiter(_this, void 0, void 0, function () {
|
|
4832
|
+
return __generator(this, function (_a) {
|
|
4833
|
+
if (defs) {
|
|
4834
|
+
this.loadCatalogs(defs).then(function (result) { });
|
|
4835
|
+
}
|
|
4836
|
+
return [2 /*return*/];
|
|
4837
|
+
});
|
|
4838
|
+
}); });
|
|
4839
|
+
}
|
|
4840
|
+
};
|
|
4841
|
+
CatalogExternalSourcesComponent.prototype.loadCatalogs = function (defs) {
|
|
4842
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
4766
4843
|
var i, viewModel, _a, _b, _c;
|
|
4767
4844
|
return __generator(this, function (_d) {
|
|
4768
4845
|
switch (_d.label) {
|
|
4769
4846
|
case 0:
|
|
4770
|
-
if (!defs) return [3 /*break*/, 6];
|
|
4771
4847
|
i = 0;
|
|
4772
4848
|
_d.label = 1;
|
|
4773
4849
|
case 1:
|
|
@@ -4793,14 +4869,17 @@
|
|
|
4793
4869
|
case 6: return [2 /*return*/];
|
|
4794
4870
|
}
|
|
4795
4871
|
});
|
|
4796
|
-
});
|
|
4872
|
+
});
|
|
4873
|
+
};
|
|
4874
|
+
CatalogExternalSourcesComponent.prototype.loadUnavailableCatalogs = function (defs) {
|
|
4875
|
+
this.unavailableCatalogs = defs;
|
|
4797
4876
|
};
|
|
4798
4877
|
return CatalogExternalSourcesComponent;
|
|
4799
4878
|
}());
|
|
4800
4879
|
CatalogExternalSourcesComponent.decorators = [
|
|
4801
4880
|
{ type: i0.Component, args: [{
|
|
4802
4881
|
selector: 'co-catalog-external-sources',
|
|
4803
|
-
template: "\n
|
|
4882
|
+
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
4883
|
encapsulation: i0.ViewEncapsulation.None
|
|
4805
4884
|
},] }
|
|
4806
4885
|
];
|
|
@@ -4809,6 +4888,7 @@
|
|
|
4809
4888
|
{ type: CatalogImageService }
|
|
4810
4889
|
]; };
|
|
4811
4890
|
CatalogExternalSourcesComponent.propDecorators = {
|
|
4891
|
+
isStandalone: [{ type: i0.Input }],
|
|
4812
4892
|
externalSourceClick: [{ type: i0.Output }],
|
|
4813
4893
|
showClass: [{ type: i0.HostBinding, args: ['class.co-catalog-external-sources',] }]
|
|
4814
4894
|
};
|
|
@@ -4937,7 +5017,6 @@
|
|
|
4937
5017
|
CatalogStockService.prototype.getArticleGridViewExcelFile = function () {
|
|
4938
5018
|
this.stockSearchRequest = Object.assign(Object.assign({}, this.searchRequest), { rangeStockMutationDate: null, rangeWarehouse: null, rangeStockStatus: null });
|
|
4939
5019
|
this._catalogConnectorService.getArticleGridViewExcelFile(this.stockSearchRequest).then(function (result) {
|
|
4940
|
-
console.log('export: ', result);
|
|
4941
5020
|
});
|
|
4942
5021
|
};
|
|
4943
5022
|
return CatalogStockService;
|
|
@@ -5031,7 +5110,6 @@
|
|
|
5031
5110
|
CatalogStockTransferService.prototype.getArticleGridViewExcelFile = function () {
|
|
5032
5111
|
this.stockSearchRequest = Object.assign(Object.assign({}, this.searchRequest), { rangeStockMutationDate: null, rangeStockStatus: null, rangeSourceWarehouse: null, rangeTargetWarehouse: null });
|
|
5033
5112
|
this._catalogConnectorService.getTransferArticleGridViewExcelFile(this.stockSearchRequest).then(function (result) {
|
|
5034
|
-
console.log('export: ', result);
|
|
5035
5113
|
});
|
|
5036
5114
|
};
|
|
5037
5115
|
return CatalogStockTransferService;
|
|
@@ -5125,7 +5203,6 @@
|
|
|
5125
5203
|
CatalogStockComparisonService.prototype.getArticleGridViewExcelFile = function () {
|
|
5126
5204
|
this.stockSearchRequest = Object.assign(Object.assign({}, this.searchRequest), { sourceWarehouse: 0, targetWarehouse: 1 });
|
|
5127
5205
|
this._catalogConnectorService.getComparisonArticleGridViewExcelFile(this.stockSearchRequest).then(function (result) {
|
|
5128
|
-
console.log('export: ', result);
|
|
5129
5206
|
});
|
|
5130
5207
|
};
|
|
5131
5208
|
return CatalogStockComparisonService;
|
|
@@ -6108,7 +6185,7 @@
|
|
|
6108
6185
|
}).catch(function (e) {
|
|
6109
6186
|
//If there is no price data, make that object null and pass data along
|
|
6110
6187
|
_this.create3DimerseFeedback(configurationData_1, null);
|
|
6111
|
-
console.log(e);
|
|
6188
|
+
// console.log(e);
|
|
6112
6189
|
});
|
|
6113
6190
|
}
|
|
6114
6191
|
else {
|
|
@@ -6118,17 +6195,17 @@
|
|
|
6118
6195
|
}).catch(function (e) {
|
|
6119
6196
|
//If we cannot fetch price data
|
|
6120
6197
|
_this.create3DimerseFeedback(configurationData_1, null);
|
|
6121
|
-
console.log(e);
|
|
6198
|
+
// console.log(e);
|
|
6122
6199
|
});
|
|
6123
6200
|
}).catch(function (e) {
|
|
6124
6201
|
//If there is an error fetching config data do not continue. just log the error.
|
|
6125
|
-
console.log(e);
|
|
6202
|
+
// console.log(e);
|
|
6126
6203
|
configurationData_1 = {};
|
|
6127
6204
|
});
|
|
6128
6205
|
}
|
|
6129
6206
|
}).catch(function (e) {
|
|
6130
6207
|
//If there is an error fetching config dat. just log the error.
|
|
6131
|
-
console.log(e);
|
|
6208
|
+
// console.log(e);
|
|
6132
6209
|
configurationData_1 = {};
|
|
6133
6210
|
});
|
|
6134
6211
|
}
|
|
@@ -6143,7 +6220,7 @@
|
|
|
6143
6220
|
var resultObject = {};
|
|
6144
6221
|
resultObject['configuratie-data'] = configurationData;
|
|
6145
6222
|
resultObject['prijs-data'] = priceData;
|
|
6146
|
-
console.log(resultObject);
|
|
6223
|
+
// console.log(resultObject);
|
|
6147
6224
|
this.iFrameFeedbackReceived.emit(JSON.stringify(resultObject));
|
|
6148
6225
|
};
|
|
6149
6226
|
CatalogExternalSourceComponent.prototype.fetchJsonFile = function (url) {
|