@colijnit/product 257.1.2 → 257.1.4
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/app/components/product-external-source/product-external-source.component.d.ts +2 -0
- package/app/components/product-hd/product-hd.component.d.ts +3 -0
- package/bundles/colijnit-product.umd.js +82 -22
- package/bundles/colijnit-product.umd.js.map +1 -1
- package/colijnit-product-257.1.4.tgz +0 -0
- package/colijnit-product.metadata.json +1 -1
- package/esm2015/app/components/product-external-source/product-external-source.component.js +10 -5
- package/esm2015/app/components/product-hd/product-hd.component.js +40 -15
- package/esm2015/app/ione-product.component.js +3 -3
- package/esm2015/app/product-version.js +3 -3
- package/esm2015/assets/dictionary/text.properties.js +32 -1
- package/fesm2015/colijnit-product.js +83 -22
- package/fesm2015/colijnit-product.js.map +1 -1
- package/package.json +3 -3
|
@@ -30,8 +30,8 @@ class Version {
|
|
|
30
30
|
constructor() {
|
|
31
31
|
this.name = "@colijnit/product";
|
|
32
32
|
this.description = "Product detail page project for iOne";
|
|
33
|
-
this.symVer = "257.1.
|
|
34
|
-
this.publishDate = "
|
|
33
|
+
this.symVer = "257.1.4";
|
|
34
|
+
this.publishDate = "8-2-2025 19:30:37";
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
37
|
|
|
@@ -303,6 +303,37 @@ var LanguageCode;
|
|
|
303
303
|
class Dictionary {
|
|
304
304
|
constructor() {
|
|
305
305
|
this.strings = {
|
|
306
|
+
"en": {
|
|
307
|
+
"ADDITIONAL_DATA": "Additional information",
|
|
308
|
+
"ALTERNATIVE_PRODUCTS": "Alternative products",
|
|
309
|
+
"ARTICLE_NUMBER": "Productnumber",
|
|
310
|
+
"CATEGORY": "Category",
|
|
311
|
+
"CATEGORY_TYPE": "Category type",
|
|
312
|
+
"CONFIGURE": "Configure",
|
|
313
|
+
"DELIVERY_TIME_PERIOD": "Delivery time",
|
|
314
|
+
"DESCRIPTION": "Description",
|
|
315
|
+
"DOCUMENTS": "Documents",
|
|
316
|
+
"DOWNLOADS": "Downloads",
|
|
317
|
+
"FEATURES": "Features",
|
|
318
|
+
"HEIGHT": "Height",
|
|
319
|
+
"MATERIAL": "Material",
|
|
320
|
+
"PRODUCT_IN_STOCK": "In stock",
|
|
321
|
+
"PRODUCT_LIMITED_STOCK": "Limited stock",
|
|
322
|
+
"PRODUCT_NOT_IN_STOCK": "Not in stock",
|
|
323
|
+
"PROPERTIES": "Characteristics",
|
|
324
|
+
"QUOTATION": "Quotation",
|
|
325
|
+
"READ_MORE": "Read more",
|
|
326
|
+
"RELATED_PRODUCTS": "Related products",
|
|
327
|
+
"SHOPPING_CART_IN": "In Shopping Cart",
|
|
328
|
+
"SHOW_IN": "Show in",
|
|
329
|
+
"STOCK": "Stock",
|
|
330
|
+
"SYMBOLS": "Symbols",
|
|
331
|
+
"TITLE": "Title",
|
|
332
|
+
"TURNOVERGROUP": "Turnover group",
|
|
333
|
+
"VARIANTS": "Variations",
|
|
334
|
+
"WIDTH": "Width",
|
|
335
|
+
"SUGGESTION": "Suggestion",
|
|
336
|
+
},
|
|
306
337
|
"nl": {
|
|
307
338
|
"ADDITIONAL_DATA": "Extra informatie",
|
|
308
339
|
"ALTERNATIVE_PRODUCTS": "Alternatieve producten",
|
|
@@ -715,14 +746,14 @@ IoneProductComponent.decorators = [
|
|
|
715
746
|
{ type: Component, args: [{
|
|
716
747
|
selector: 'app-ione-product',
|
|
717
748
|
template: `
|
|
718
|
-
|
|
749
|
+
<app-product-page *ngIf="settingsLoaded"
|
|
719
750
|
[createFrozenArticle]="handleAddArticleInternally"
|
|
720
751
|
[isReturn]="isReturn"
|
|
721
752
|
(openStockEvent)="openStock()"
|
|
722
753
|
[sku]="sku"
|
|
723
754
|
[showRelatedProductsPopup]="showRelatedProductsPopup"
|
|
724
755
|
></app-product-page>
|
|
725
|
-
<!--
|
|
756
|
+
<!-- <co-button [label]="'click'" (click)="showHD = !showHD"></co-button>
|
|
726
757
|
<co-product-hd [sku]="'657946ca-e1e1-41fd-7ae0-08dbf7df0cef'" *ngIf="showHD"></co-product-hd>-->
|
|
727
758
|
`,
|
|
728
759
|
encapsulation: ViewEncapsulation.Emulated,
|
|
@@ -2685,6 +2716,7 @@ class ProductHdComponent {
|
|
|
2685
2716
|
this._scriptLoader = _scriptLoader;
|
|
2686
2717
|
this._renderer = _renderer;
|
|
2687
2718
|
this.variant = '';
|
|
2719
|
+
this.urlParams = [];
|
|
2688
2720
|
this.configuratorFinished = new EventEmitter();
|
|
2689
2721
|
this.configurationError = new EventEmitter();
|
|
2690
2722
|
this.showClass = true;
|
|
@@ -2715,7 +2747,10 @@ class ProductHdComponent {
|
|
|
2715
2747
|
this.configurationError.emit(event.detail.status);
|
|
2716
2748
|
}
|
|
2717
2749
|
_prepareAttributes() {
|
|
2718
|
-
if (this.hdeConfigurator && this.hdeConfigurator.nativeElement && this.token && (this.sku || this.variant)) {
|
|
2750
|
+
if (this.hdeConfigurator && this.hdeConfigurator.nativeElement && this.urlParams && this.token && (this.sku || this.variant)) {
|
|
2751
|
+
//for local testing please turn off for packing and publishing!
|
|
2752
|
+
//this.prepareTestingUrlparams();
|
|
2753
|
+
this._prepareConfiguratorUrls();
|
|
2719
2754
|
this.hdeConfigurator.nativeElement.setAttribute('bearerToken', this.token);
|
|
2720
2755
|
if (this._sku) {
|
|
2721
2756
|
this.hdeConfigurator.nativeElement.setAttribute('data-productId', this._sku);
|
|
@@ -2726,19 +2761,43 @@ class ProductHdComponent {
|
|
|
2726
2761
|
this._loadTheScripts();
|
|
2727
2762
|
}
|
|
2728
2763
|
}
|
|
2729
|
-
//
|
|
2764
|
+
//set necessary references to configurator.
|
|
2765
|
+
_prepareConfiguratorUrls() {
|
|
2766
|
+
//fetch the setting from the external source
|
|
2767
|
+
let apiurl = this.urlParams.find((item) => item.key === 'apiurl').value;
|
|
2768
|
+
let productVariantCommandApiUrl = this.urlParams.find((item) => item.key === 'productVariantCommandApiUrl').value;
|
|
2769
|
+
let productVariantQueryApiUrl = this.urlParams.find((item) => item.key === 'productVariantQueryApiUrl').value;
|
|
2770
|
+
let localizationApiUrl = this.urlParams.find((item) => item.key === 'localizationApiUrl').value;
|
|
2771
|
+
//apply to configurator
|
|
2772
|
+
this.hdeConfigurator.nativeElement.setAttribute('apiurl', apiurl);
|
|
2773
|
+
this.hdeConfigurator.nativeElement.setAttribute('productVariantCommandApiUrl', productVariantCommandApiUrl);
|
|
2774
|
+
this.hdeConfigurator.nativeElement.setAttribute('productVariantQueryApiUrl', productVariantQueryApiUrl);
|
|
2775
|
+
this.hdeConfigurator.nativeElement.setAttribute('localizationApiUrl', localizationApiUrl);
|
|
2776
|
+
}
|
|
2777
|
+
// load external scripts into client
|
|
2730
2778
|
_loadTheScripts() {
|
|
2731
2779
|
return __awaiter(this, void 0, void 0, function* () {
|
|
2732
|
-
|
|
2733
|
-
|
|
2734
|
-
|
|
2735
|
-
|
|
2736
|
-
|
|
2737
|
-
|
|
2780
|
+
let headerUrls = this.urlParams.find((item) => item.key === 'header').value;
|
|
2781
|
+
let headerArray = headerUrls.replace(/\s+/g, '').split(',');
|
|
2782
|
+
for (let i = 0; i < headerArray.length; i++) {
|
|
2783
|
+
yield this._scriptLoader.loadScript(headerArray[i], this._renderer).catch((error) => console.error(error));
|
|
2784
|
+
}
|
|
2785
|
+
let styles = this.urlParams.find((item) => item.key === 'stylesheet').value;
|
|
2786
|
+
let stylesArray = styles.replace(/\s+/g, '').split(',');
|
|
2787
|
+
for (let j = 0; j < stylesArray.length; j++) {
|
|
2788
|
+
yield this._scriptLoader.addStyleSheet(stylesArray[j], this._renderer);
|
|
2789
|
+
}
|
|
2790
|
+
//for local testing please turn off for packing and publishing!
|
|
2791
|
+
/*const scripts: string[] = [
|
|
2792
|
+
// hard-coded for now, should come from the external source
|
|
2793
|
+
'https://hde-cdn.azureedge.net/libs/components/Configurator/1.0.33/polyfills.js',
|
|
2794
|
+
'https://hde-cdn.azureedge.net/libs/components/Configurator/1.0.33/runtime.js',
|
|
2795
|
+
'https://hde-cdn.azureedge.net/libs/components/Configurator/1.0.33/main.js'
|
|
2796
|
+
]
|
|
2738
2797
|
for (let i = 0; i < scripts.length; i++) {
|
|
2739
|
-
|
|
2798
|
+
await this._scriptLoader.loadScript(scripts[i], this._renderer).catch((error) => console.error(error));
|
|
2740
2799
|
}
|
|
2741
|
-
|
|
2800
|
+
await this._scriptLoader.addStyleSheet('https://hde-cdn.azureedge.net/libs/components/Configurator/1.0.33/styles.css', this._renderer);*/
|
|
2742
2801
|
});
|
|
2743
2802
|
}
|
|
2744
2803
|
}
|
|
@@ -2747,11 +2806,7 @@ ProductHdComponent.decorators = [
|
|
|
2747
2806
|
selector: 'co-product-hd',
|
|
2748
2807
|
template: `
|
|
2749
2808
|
<hde-configurator #hdeConfigurator
|
|
2750
|
-
apiurl="https://bmsproductconfigurator-acceptance.azurewebsites.net/api/configurator/"
|
|
2751
|
-
productVariantCommandApiUrl="https://bmsproductvariantcommand-acceptance.azurewebsites.net/"
|
|
2752
|
-
productVariantQueryApiUrl="https://bmsproductvariantquery-acceptance.azurewebsites.net/"
|
|
2753
2809
|
language="nl"
|
|
2754
|
-
localizationApiUrl="https://hde-cdn.azureedge.net/libs/BMS.DST.Localization/"
|
|
2755
2810
|
localizationFileExtension=".json"
|
|
2756
2811
|
(configurationFinished)="handleConfigurationFinished($event)"
|
|
2757
2812
|
(configurationFailed)="handleError($event)"
|
|
@@ -2771,6 +2826,7 @@ ProductHdComponent.propDecorators = {
|
|
|
2771
2826
|
sku: [{ type: Input }],
|
|
2772
2827
|
token: [{ type: Input }],
|
|
2773
2828
|
variant: [{ type: Input }],
|
|
2829
|
+
urlParams: [{ type: Input }],
|
|
2774
2830
|
configuratorFinished: [{ type: Output }],
|
|
2775
2831
|
configurationError: [{ type: Output }],
|
|
2776
2832
|
showClass: [{ type: HostBinding, args: ['class.co-product-hd',] }]
|
|
@@ -2812,6 +2868,7 @@ class ProductExternalSourceComponent {
|
|
|
2812
2868
|
this.externalSettings = {};
|
|
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FtbKAFQv4hgFAxoyWqFVWyJvuOtQcWyZStROyPHwjAnpnj-x1cVQpOhbO-kQUFvy_VUrPpF3aYVCcO2cFirQTXR6kxSGcYGGcsPY-_eiAd93UdG2EM6xLAocDLaFV72CQI6XEs0WQG1f4SqvH52v3OTkgWBLgYV35gpyIe0-2nazGL0R8pTNuDqrOb7OGmuTRMoTIiRi67-wTxx8cQ";
|
|
2814
2870
|
this.variant = "";
|
|
2871
|
+
this.urlParams = [];
|
|
2815
2872
|
this._subs = [];
|
|
2816
2873
|
}
|
|
2817
2874
|
set externalSource(value) {
|
|
@@ -2823,10 +2880,12 @@ class ProductExternalSourceComponent {
|
|
|
2823
2880
|
return this._externalSource;
|
|
2824
2881
|
}
|
|
2825
2882
|
set externalCatalogStartupInfo(value) {
|
|
2826
|
-
|
|
2827
|
-
|
|
2828
|
-
|
|
2829
|
-
|
|
2883
|
+
if (value) {
|
|
2884
|
+
this._externalCatalogStartupInfo = value;
|
|
2885
|
+
this.externalSource = value.externalSource;
|
|
2886
|
+
this.loaded = false;
|
|
2887
|
+
this._prepareExternalSource();
|
|
2888
|
+
}
|
|
2830
2889
|
}
|
|
2831
2890
|
get externalCatalogStartupInfo() {
|
|
2832
2891
|
return this._externalCatalogStartupInfo;
|
|
@@ -2900,6 +2959,7 @@ class ProductExternalSourceComponent {
|
|
|
2900
2959
|
this.token = this.externalCatalogStartupInfo.token;
|
|
2901
2960
|
this.sku = this.externalCatalogStartupInfo.externalGoodId;
|
|
2902
2961
|
this.variant = this.externalCatalogStartupInfo.flattenedGoodId;
|
|
2962
|
+
this.urlParams = this.externalCatalogStartupInfo.externalSource.parameters;
|
|
2903
2963
|
this.switchToConfigurator();
|
|
2904
2964
|
this.loaded = true;
|
|
2905
2965
|
}
|
|
@@ -2946,6 +3006,7 @@ ProductExternalSourceComponent.decorators = [
|
|
|
2946
3006
|
[sku]="sku"
|
|
2947
3007
|
[variant]="variant"
|
|
2948
3008
|
[token]="token"
|
|
3009
|
+
[urlParams]="urlParams"
|
|
2949
3010
|
(configuratorFinished)="handleConfigurationFinished($event)"></co-product-hd>
|
|
2950
3011
|
</ng-container>
|
|
2951
3012
|
</ng-container>
|