@colijnit/catalog 255.1.9 → 255.1.10
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 +34 -16
- package/bundles/colijnit-catalog.umd.js.map +1 -1
- package/colijnit-catalog-255.1.9.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/fesm2015/colijnit-catalog.js +34 -16
- package/fesm2015/colijnit-catalog.js.map +1 -1
- package/lib/component/catalog-external-source/catalog-external-source.component.d.ts +1 -0
- package/package.json +1 -1
- package/colijnit-catalog-255.1.8.tgz +0 -0
|
@@ -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 = "255.1.
|
|
34
|
-
this.publishDate = "
|
|
33
|
+
this.symVer = "255.1.10";
|
|
34
|
+
this.publishDate = "20-9-2024 11:08:40";
|
|
35
35
|
}
|
|
36
36
|
return Version;
|
|
37
37
|
}());
|
|
@@ -5870,43 +5870,54 @@
|
|
|
5870
5870
|
var customerName, configurationUrl, priceDataUrl, configurationData_1, priceData_1;
|
|
5871
5871
|
var _this = this;
|
|
5872
5872
|
return __generator(this, function (_a) {
|
|
5873
|
-
customerName =
|
|
5873
|
+
customerName = this._externalSource.username;
|
|
5874
5874
|
configurationUrl = this._externalSource.domain + '/configurationData/' + hash;
|
|
5875
|
-
console.log('configurationUrl');
|
|
5876
5875
|
priceDataUrl = this._externalSource.domain + '/rules/api/' + customerName.toLowerCase() + '/' + hash;
|
|
5877
|
-
|
|
5876
|
+
//test setup for local testing
|
|
5877
|
+
//const configurationUrl: string = "https://bertplantagie.platformapi-accept.3dimerce.com/configurationData/8eb5b35697c96716d3e253294344d98e4dcdcb68969c288189d45829164e3177";
|
|
5878
|
+
//console.log(configurationUrl);
|
|
5879
|
+
//const priceDataUrl: string = "https://bertplantagie.platformapi-accept.3dimerce.com/rules/api/bertplantagie/8eb5b35697c96716d3e253294344d98e4dcdcb68969c288189d45829164e3177";
|
|
5880
|
+
//console.log(priceDataUrl);
|
|
5878
5881
|
try {
|
|
5879
5882
|
//first fetch the configuration data
|
|
5880
5883
|
this.fetchJsonFile(configurationUrl).then(function (configResponse) {
|
|
5881
5884
|
if (configResponse && configResponse.ok) {
|
|
5882
5885
|
configResponse.json().then(function (result) {
|
|
5883
|
-
console.log(result);
|
|
5886
|
+
//console.log(result);
|
|
5884
5887
|
configurationData_1 = result;
|
|
5885
|
-
//if we have config data
|
|
5888
|
+
//if we have config data continue to fetch price data
|
|
5886
5889
|
_this.fetchJsonFile(priceDataUrl).then(function (priceResponse) {
|
|
5887
5890
|
if (priceResponse && priceResponse.ok) {
|
|
5888
5891
|
priceResponse.json().then(function (result) {
|
|
5889
|
-
console.log(result);
|
|
5892
|
+
//console.log(result);
|
|
5890
5893
|
priceData_1 = result;
|
|
5891
5894
|
//If we have config and price data. Create the necessary data object and pass it along.
|
|
5892
|
-
|
|
5893
|
-
resultObject['configuratie-data'] = configurationData_1;
|
|
5894
|
-
resultObject['prijs-data'] = priceData_1;
|
|
5895
|
-
console.log(resultObject);
|
|
5896
|
-
_this.iFrameFeedbackReceived.emit(JSON.stringify(resultObject));
|
|
5895
|
+
_this.create3DimerseFeedback(configurationData_1, priceData_1);
|
|
5897
5896
|
}).catch(function (e) {
|
|
5898
|
-
//If there is no price data
|
|
5897
|
+
//If there is no price data, make that object null and pass data along
|
|
5898
|
+
_this.create3DimerseFeedback(configurationData_1, null);
|
|
5899
5899
|
console.log(e);
|
|
5900
|
-
priceData_1 = {};
|
|
5901
5900
|
});
|
|
5902
5901
|
}
|
|
5902
|
+
else {
|
|
5903
|
+
//If there is no valid price data, make that object null and pass data along
|
|
5904
|
+
_this.create3DimerseFeedback(configurationData_1, null);
|
|
5905
|
+
}
|
|
5906
|
+
}).catch(function (e) {
|
|
5907
|
+
//If we cannot fetch price data
|
|
5908
|
+
_this.create3DimerseFeedback(configurationData_1, null);
|
|
5909
|
+
console.log(e);
|
|
5903
5910
|
});
|
|
5904
5911
|
}).catch(function (e) {
|
|
5905
|
-
//If there is
|
|
5912
|
+
//If there is an error fetching config data do not continue. just log the error.
|
|
5906
5913
|
console.log(e);
|
|
5907
5914
|
configurationData_1 = {};
|
|
5908
5915
|
});
|
|
5909
5916
|
}
|
|
5917
|
+
}).catch(function (e) {
|
|
5918
|
+
//If there is an error fetching config dat. just log the error.
|
|
5919
|
+
console.log(e);
|
|
5920
|
+
configurationData_1 = {};
|
|
5910
5921
|
});
|
|
5911
5922
|
}
|
|
5912
5923
|
catch (error) {
|
|
@@ -5916,6 +5927,13 @@
|
|
|
5916
5927
|
});
|
|
5917
5928
|
});
|
|
5918
5929
|
};
|
|
5930
|
+
CatalogExternalSourceComponent.prototype.create3DimerseFeedback = function (configurationData, priceData) {
|
|
5931
|
+
var resultObject = {};
|
|
5932
|
+
resultObject['configuratie-data'] = configurationData;
|
|
5933
|
+
resultObject['prijs-data'] = priceData;
|
|
5934
|
+
console.log(resultObject);
|
|
5935
|
+
this.iFrameFeedbackReceived.emit(JSON.stringify(resultObject));
|
|
5936
|
+
};
|
|
5919
5937
|
CatalogExternalSourceComponent.prototype.fetchJsonFile = function (url) {
|
|
5920
5938
|
return __awaiter(this, void 0, void 0, function () {
|
|
5921
5939
|
return __generator(this, function (_a) {
|